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: snopt.m
    path of file: ./repos/snopt-matlab/matlab
    
    the code of the file until where you have to start completion: function [x,F,info,xmul,Fmul,xstate,Fstate,output] = snopt(x, xlow, xupp, xmul, xstate,...
						  Flow, Fupp, Fmul, Fstate,...
						  userfun, varargin);
% This function solves the nonlinear optimization problem:
% minimize:
%            F(ObjRow) + ObjAdd
% subject to:
%            xlow <= x <= xupp
%            Flow <= F <= Fupp
% where:
%  x        is the column vector of initial values of the unknowns.
%
%  F        is a vector of objective and constraint functions specified
%           in the m-file userfun.
%
%  ObjRow   is the objective row of F (default ObjRow = 1).
%
%  userfun  is the handle for a Matlab funcion that defines the elements of F
%           and optionally, their derivatives.
%
% Additional arguments allow the specification of more detailed problem information.
%
% Calling sequence 1:

    
function [x,F,info,xmul,Fmul,xstate,Fstate,output] = snopt(x, xlow, xupp, xmul, xstate,...
						  Flow, Fupp, Fmul, Fstate,...
						  userfun, varargin);
% This function solves the nonlinear optimization problem:
% minimize:
%            F(ObjRow) + ObjAdd
% subject to:
%            xlow <= x <= xupp
%            Flow <= F <= Fupp
% where:
%  x        is the column vector of initial values of the unknowns.
%
%  F        is a vector of objective and constraint functions specified
%           in the m-file userfun.
%
%  ObjRow   is the objective row of F (default ObjRow = 1).
%
%  userfun  is the handle for a Matlab funcion that defines the elements of F
%           and optionally, their derivatives.
%
% Additional arguments allow the specification of more detailed problem information.
%
% Calling sequence 1:
%  [...] = snopt(x, xlow, xupp, xmul, xstate,
%                     Flow, Fupp, Fmul, Fstate, userfun,
%                     [options])
%
% Calling sequence 2:
%  [...] = snopt(x, xlow, xupp, xmul, xstate,...
%                     Flow, Fupp, Fmul, Fstate, userfun,...
%                     ObjAdd, ObjRow, [options])
%
% Calling sequence 3:
%  [...] = snopt(x, xlow, xupp, xmul, xstate,...
%                     Flow, Fupp, Fmul, Fstate, userfun,...
%                     ObjAdd, ObjRow,
%                     A, G, [options])
%
% Output from snopt:
%  [x,F,info,xmul,Fmul,xstate,Fstate,output] = snopt(...)
%
%
% INPUT:
%  x             is the initial guess for x.
%
%  xlow, xupp    are the upper and lower bounds on x.
%
%  xmul          contains the initial multipliers for x.
%
%  xstate        are the states of the variables x.
%
%  Flow, Fupp    are the upper and lower bounds on F.
%
%  Fmul          contains the initial multipliers for F.
%
%  Fstate        are the states of the constraints F.
%
%  userfun       is the user-defined Matlab function that computes the
%                objective and constraint functions and their corresponding
%                derivatives.
%                userfun can be either a function handle or a string.
%
%                WARNING: If arguments iAfun, jAvar, and A, are provided,
%                then it is crucial that the associated linear terms
%                are not included in the calculation of F in userfun.
%                **Example:
%                      >> [f,G] = userfun(x);
%                      >> F  = sparse(iAfun,jAvar,A)*x + f
%                      >> DF = sparse(iAfun,jAvar,A) + sparse(iGfun,jGvar,G)
%                (where DF denotes F').
%                G must be either a dense matrix, or a vector of derivatives
%                in the same order as the indices iGfun and jGvar, i.e.,
%                if G is a vector, the Jacobian of f is given
%                by sparse(iGfun,jGvar,G).
%
%                **More details on G:
%                The user maybe define, all, some, or none of the
%                entries of G.  If the user does NOT intend