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: sqopt.m
    path of file: ./repos/snopt-matlab/matlab
    
    the code of the file until where you have to start completion: function [x,obj,info,output,lambda,states] = sqopt(H, c, x0, xl, xu, A, al, au, varargin)
% function [x,obj,info,output,lambda,states] = sqopt(H, c, x0, xl, xu, A, al, au, varargin)
%
% This function solves the quadratic optimization problem:
%   minimize:
%              c'x + x'*H*x
%   subject to:
%            xl <=  x <= xu
%            al <= Ax <= au
% where:
%  x        is the column vector of initial values of the unknowns
%  xl, xu   are the lower and upper bounds of the variables
%  c        is the linear term of the objective
%  H        is the Hessian matrix of the objective
%  A        is the linear constraint matrix
%  al, au   are the lower and upper bounds of the linear constraints
%
% Calling sequences:
%  [] = sqopt(H, c, x0, xl, xu, A, al, au)
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, options)
%
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, states, lambda)
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, states, lambda, options)
%
%  [x,obj,info,output,lambda,states] = sqopt(...)
%
%
% INPUT:
%  x0       is the initial guess for x
%
%  H        is a Matlab function (either a function handle or string)
%           that computes H*x for a given x or a matrix (dense or sparse).
%           If the problem is an LP (H = 0), then set H = 0 or H = []
%           (or call lpopt).
%
%  c        is the linear term of the quadratic objective
%
%  xl, xu   are the upper and lower bounds on x
%
%  A        is the linear constraint matrix. A can be a structure, or a
%           dense or sparse matrix.
%           If A is a structure, then A is represented as a
%           sparse-by-column matrix and should  have fields:
%               A.loc -- column pointers
%               A.ind -- row indices
%               A.val -- matrix values
%
%  al, au   are the upper and lower bounds on the linear constraints A*x
%
%  options  is an (optional) input argument of type struct.  SNOPT
%           options can be set using this structure by creating an entry with a
%           field name equal to the SNOPT keyword with spaces replaced by
%           underscores '_'.  For example,
%              options.iterations_limit = 250;

    
function [x,obj,info,output,lambda,states] = sqopt(H, c, x0, xl, xu, A, al, au, varargin)
% function [x,obj,info,output,lambda,states] = sqopt(H, c, x0, xl, xu, A, al, au, varargin)
%
% This function solves the quadratic optimization problem:
%   minimize:
%              c'x + x'*H*x
%   subject to:
%            xl <=  x <= xu
%            al <= Ax <= au
% where:
%  x        is the column vector of initial values of the unknowns
%  xl, xu   are the lower and upper bounds of the variables
%  c        is the linear term of the objective
%  H        is the Hessian matrix of the objective
%  A        is the linear constraint matrix
%  al, au   are the lower and upper bounds of the linear constraints
%
% Calling sequences:
%  [] = sqopt(H, c, x0, xl, xu, A, al, au)
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, options)
%
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, states, lambda)
%  [] = sqopt(H, c, x0, xl, xu, A, al, au, states, lambda, options)
%
%  [x,obj,info,output,lambda,states] = sqopt(...)
%
%
% INPUT:
%  x0       is the initial guess for x
%
%  H        is a Matlab function (either a function handle or string)
%           that computes H*x for a given x or a matrix (dense or sparse).
%           If the problem is an LP (H = 0), then set H = 0 or H = []
%           (or call lpopt).
%
%  c        is the linear term of the quadratic objective
%
%  xl, xu   are the upper and lower bounds on x
%
%  A        is the linear constraint matrix. A can be a structure, or a
%           dense or sparse matrix.
%           If A is a structure, then A is represented as a
%           sparse-by-column matrix and should  have fields:
%               A.loc -- column pointers
%               A.ind -- row indices
%               A.val -- matrix values
%
%  al, au   are the upper and lower bounds on the linear constraints A*x
%
%  options  is an (optional) input argument of type struct.  SNOPT
%           options can be set using this structure by creating an entry with a
%           field name equal to the SNOPT keyword with spaces replaced by
%           underscores '_'.  For example,
%              options.iterations_limit = 250;
%
%           Additional keywords include:
%
%               options.name        is the problem name
%
%               options.start       'Cold', 'Warm'
%
%               options.screen      is a string set to 'on' or 'off'.
%                                   Summary to the screen is controlled
%                                   by this option. (default 'on')
%
%               options.printfile   is a string denoting the print file.
%                                   By default, no print file is created.
%                                   Not setting this option or setting it to
%                                   '' turns off print output.
%
%               options.specsfile   is a string denoting the options
%                                   filename.
%
%               options.iwork       is an integer defining the integer
%                                   SNOPT workspace length.
%
%               options.rwork       is an integer defining the real
%                                   SNOPT workspace length.
%
%
% OUTPUT:
%  x        is the final point
%
%  obj      is the final objective value
%
%  info     is the exit flag returned by the solver
%
%  output   is a structure containing run information --
%           output.iterations is the total number of iterations
%           output.funcCount   is the total number of function evaluations
%
%  lambda   is a structure containing the multipliers
%           lambda.x          are for the variables
%           lambda.linear     are for the linear constraints
%
%  states   is a structure
%           states.x          are for the variables
%           states.linear     are for the linear constraints
%

name       = '';
start      = 'Cold';

printfile  = '';
screen     = 'on';
specsfile  = '';

iwork      = 0;
rwork      = 0;

% Deal with options.
optionsLoc = 0;
if nargin == 9 || nargin == 11,
  optionsLoc = nargin - 8;
  if isstruct(varargin{optionsLoc}),
    options = varargin{optionsLoc};
    % Name
    if isfield(options,'name'),
      name = options.name;
    end