You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: xASL_module_ASL.m
    path of file: ./repos/ExploreASL/Modules
    
    the code of the file until where you have to start completion: function [result, x] = xASL_module_ASL(x)
%xASL_module_ASL ExploreASL module for ASL processing
%
% FORMAT: [result, x] = xASL_module_ASL(x)
%
% INPUT:
%   x  - x structure containing all input parameters (REQUIRED)
%   x.dir.SUBJECTDIR  -  anatomical directory, containin
    
function cleans all ASL sessions, so only run this (once) for the first session
    xASL_adm_CleanUpBeforeRerun(x.D.ROOT, 2, false, false, x.P.SubjectID, x.P.SessionID);
	
	% Also clean the QC output files
	x = xASL_adm_LoadX(x, [], true); % assume x.mat is newer than x

	% Clear any previous QC images
	if isfield(x,'Output_im') && isfield(x.Output_im,'ASL')
		x.Output_im = rmfield(x.Output_im,'ASL');
	end