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_dev_MakeStandalone.m
    path of file: ./repos/ExploreASL/Functions/Development
    
    the code of the file until where you have to start completion: function xASL_dev_MakeStandalone(outputPath, bCompileSPM, markAsLatest)
%xASL_dev_MakeStandalone This function was written to create a compiled "standalone" version of
% ExploreASL using the mcc compiler from Matlab.
%
% FORMAT: xASL_adm_MakeStandalone(outputPath, bCompileSPM, markAsLatest);
%
% INPUT:
%   outputPath      - Folder where the compiled version should be saved (REQUIRED)
%   bCompileSPM     - Boolean specifying whether SPM is compiled first (OPTIONAL, DEFAULT = true)
%   markAsLatest    - Option to mark the generated compiled versions as "latest" instead, to simplify 
%                     the docker integration for example (OPTIONAL, DEFAULT = true)
%
% OUTPUT:             Generates a standalone/executable version of ExploreASL.
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% DESCRIPTION: This function creates an output folder including a standalone version of ExploreASL, 
%              which can be used with the Matlab Runtime outside of Matlab itself.
%              
%              A quick fix to solve path dependencies etc. is to first compile SPM (but this can be turned off for speed).
%
% This function performs the following steps:
%
% 1. Manage ExploreASL and compiler code folders
% 2. Capture version/date/time
% 3. File management output folder & starting diary
% 4. Handle SPM Specific Options
% 5. Manage compilation paths
% 6. Run SPM compilation
% 7. Run ExploreASL compilation
% 8. Print done
%
% EXAMPLE: 
%
% 1. Compilation marked as latest including compiled SPM: xASL_dev_MakeStandalone('Drive/User/Folder/',true,true);
% 2. Compilation marked with version number including compiled SPM: xASL_dev_MakeStandalone('Drive/User/Folder/',true,false);
%

    
function xASL_dev_MakeStandalone(outputPath, bCompileSPM, markAsLatest)
%xASL_dev_MakeStandalone This function was written to create a compiled "standalone" version of
% ExploreASL using the mcc compiler from Matlab.
%
% FORMAT: xASL_adm_MakeStandalone(outputPath, bCompileSPM, markAsLatest);
%
% INPUT:
%   outputPath      - Folder where the compiled version should be saved (REQUIRED)
%   bCompileSPM     - Boolean specifying whether SPM is compiled first (OPTIONAL, DEFAULT = true)
%   markAsLatest    - Option to mark the generated compiled versions as "latest" instead, to simplify 
%                     the docker integration for example (OPTIONAL, DEFAULT = true)
%
% OUTPUT:             Generates a standalone/executable version of ExploreASL.
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% DESCRIPTION: This function creates an output folder including a standalone version of ExploreASL, 
%              which can be used with the Matlab Runtime outside of Matlab itself.
%              
%              A quick fix to solve path dependencies etc. is to first compile SPM (but this can be turned off for speed).
%
% This function performs the following steps:
%
% 1. Manage ExploreASL and compiler code folders
% 2. Capture version/date/time
% 3. File management output folder & starting diary
% 4. Handle SPM Specific Options
% 5. Manage compilation paths
% 6. Run SPM compilation
% 7. Run ExploreASL compilation
% 8. Print done
%
% EXAMPLE: 
%
% 1. Compilation marked as latest including compiled SPM: xASL_dev_MakeStandalone('Drive/User/Folder/',true,true);
% 2. Compilation marked with version number including compiled SPM: xASL_dev_MakeStandalone('Drive/User/Folder/',true,false);
%
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% Copyright (c) 2015-2022 ExploreASL


%% 1) Manage ExploreASL and compiler code folders
if nargin<1 || isempty(outputPath);     error('OutputPath missing...');     end
if nargin<2 || isempty(bCompileSPM);    bCompileSPM = true;                 end
if nargin<3 || isempty(markAsLatest);   markAsLatest = true;                end

% Mana file handle issues
close all

% Initialize Explore ASL
x = ExploreASL_Initialize;

%% 2) Define Versioning
VersionPath = xASL_adm_GetFileList(x.opts.MyPath, '^VERSION_.*', 'List', [0 Inf]);
if ~isempty(VersionPath)
    xASLVersion = VersionPath{1}(9:end