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: ls_hprod.m
    path of file: ./repos/d2d/arFramework3/ThirdParty/StrucID/adimat/opt_derivclass/@adderiv
    
    the code of the file until where you have to start completion: function res= ls_hprod(h_s1, g_s1, s1, h_s2, g_s2, s2)
%ADDERIV/LS_HPROD Execute the elementwise product rule for Hessians.
%
% Copyright 2001-2004 Andre Vehreschild, Institute for Scientific Computing   
%                     RWTH Aachen University
% This code is under development! Use at your own risk! Duplication,
% modification and distribution FORBIDDEN!

res= adderiv(h_s1);

for i= 1: res.ndd

    
function res= ls_hprod(h_s1, g_s1, s1, h_s2, g_s2, s2)
%ADDERIV/LS_HPROD Execute the elementwise product rule for Hessians.
%
% Copyright 2001-2004 Andre Vehreschild, Institute for Scientific Computing   
%                     RWTH Aachen University
% This code is under development! Use at your own risk! Duplication,
% modification and distribution FORBIDDEN!

res= adderiv(h_s1);

for i= 1: res.ndd
   for j= 1: res.ndd
      res.deriv{i,j}= h_s1.deriv{i,j}.* s2+ g_s1.deriv{i}.* g_s2.deriv{j}+ ...
                      g_s1.deriv{j}.* g_s2.deriv{i}+ s1.* h_s2.deriv{i,j};
   end