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: lbfgs_doc.m
    path of file: ./repos/poblano_toolbox/docs
    
    the code of the file until where you have to start completion: %% Poblano Toolbox for MATLAB: Limited-Memory BFGS Optimization
% Limited-memory quasi-Newton methods [2] are a class of methods that
% compute and/or maintain
    
function for the L-BFGS method is called |lbfgs|.
%%
%
% <html><hr></html>
%% Introduction
% The general steps of L-BFGS methods are given below in high-level
% pseudo-code [2]:
%%
%
% 
% $$
% \begin{tabular}{ll}
% \emph{1.} & Input: $x_0$, a starting point; $M > 0$, an integer\\
% \emph{2.} & Evaluate $f_0 = f(x_0)$, $g_0 = \nabla f(x_0)$\\
% \emph{3.} & Set $p_0 = -g_0$, $\gamma_0 = 1$, $i = 0$\\
% \emph{4.} & \textbf{while} $\|g_i\| > 0$\\
% \emph{5.} & \qquad Choose an initial Hessian approximation: $H_i^0 = \gamma_i I$\\
% \emph{6.} & \qquad Compute a step direction $p_i = -r$ using {\tt TwoLoopRecursion} method\\
% \emph{7.} & \qquad Compute a step length $\alpha_i$ and set $x_{i+1} = x_i + \alpha_i p_i$\\
% \emph{8.} & \qquad Set $g_i = \nabla f(x_{i+1})$\\
% \emph{9.} & \qquad \textbf{if} $i > M$\\
% \emph{10.} & \qquad \qquad Discard vectors $\left\{s_{i-m}, y_{i-m}\right\}$ from storage\\
% \emph{11.} & \qquad \textbf{end