function [adigatorFunInfo, adigatorOutputs] = adigatortempfunc22(adigatorFunInfo,adigatorInputs)
[flag, adigatorFunInfo, adigatorInputs] = adigatorFunctionInitialize(22,adigatorFunInfo,adigatorInputs);
if flag; adigatorOutputs = adigatorInputs; return; end;
x = adigatorInputs{1};
y = adigatorInputs{2};
n = length(x);
n = adigatorVarAnalyzer('n = length(x);',n,'n',0);
z = zeros(1,n);
z = adigatorVarAnalyzer('z = zeros(1,n);',z,'z',0);
a = zeros(1,n);
a = adigatorVarAnalyzer('a = zeros(1,n);',a,'a',0);
if ~exist('z','var'); z = cadastruct([],'z',[],0); end
z(1) = 0;
z = adigatorVarAnalyzer('z(1) = 0;',z,'z',1);
% ADiGator FOR Statement #2: START
cadaforvar2 = 1:(n-1);
cadaforvar2 = adigatorVarAnalyzer('cadaforvar2 = 1:(n-1);',cadaforvar2,'cadaforvar2',0);
[adigatorForVariable2, adigatorForEvalStr, adigatorForEvalVar] = adigatorForInitialize(2,cadaforvar2,0);%#ok<NASGU>
if ~isempty(adigatorForEvalStr)
    adigatorSetCellEvalFlag(1); cellfun(@eval,adigatorForEvalStr); adigatorSetCellEvalFlag(0);
end
for adigatorForVariable2i = adigatorForVariable2
cadaforcount2 = adigatorForIterStart(2,adigatorForVariable2i);
i = cadaforvar2(:,cadaforcount2);
i = adigatorVarAnalyzer('i = cadaforvar2(:,cadaforcount2);',i,'i',0);
    if ~exist('a','var'); a = cadastruct([],'a',[],0); end
    a(i) = 0.5*(x(i+1)-x(i))*(y(i+1)+y(i));
    a = adigatorVarAnalyzer('a(i) = 0.5*(x(i+1)-x(i))*(y(i+1)+y(i));',a,'a',1);
[adigatorForEvalStr, adigatorForEvalVar]= adigatorForIterEnd(2,adigatorForVariable2i);
if ~isempty(adigatorForEvalStr)
    adigatorSetCellEvalFlag(1); cellfun(@eval,adigatorForEvalStr); adigatorSetCellEvalFlag(0);
end
end
% ADiGator FOR Statement #2: END
% ADiGator FOR Statement #3: START
cadaforvar3 = 2:n;
cadaforvar3 = adigatorVarAnalyzer('cadaforvar3 = 2:n;',cadaforvar3,'cadaforvar3',0);
[adigatorForVariable3, adigatorForEvalStr, adigatorForEvalVar] = adigatorForInitialize(3,cadaforvar3,0);%#ok<NASGU>
if ~isempty(adigatorForEvalStr)
    adigatorSetCellEvalFlag(1); cellfun(@eval,adigatorForEvalStr); adigatorSetCellEvalFlag(0);
end
for adigatorForVariable3i = adigatorForVariable3
cadaforcount3 = adigatorForIterStart(3,adigatorForVariable3i);
i = cadaforvar3(:,cadaforcount3);
i = adigatorVarAnalyzer('i = cadaforvar3(:,cadaforcount3);',i,'i',0);
    if ~exist('z','var'); z = cadastruct([],'z',[],0); end
    z(i) = z(i-1) + a(i-1);
    z = adigatorVarAnalyzer('z(i) = z(i-1) + a(i-1);',z,'z',1);
[adigatorForEvalStr, adigatorForEvalVar]= adigatorForIterEnd(3,adigatorForVariable3i);
if ~isempty(adigatorForEvalStr)
    adigatorSetCellEvalFlag(1); cellfun(@eval,adigatorForEvalStr); adigatorSetCellEvalFlag(0);
end
end
% ADiGator FOR Statement #3: END
adigatorOutputs = {z};
[adigatorFunInfo, adigatorOutputs] = adigatorFunctionEnd(22,adigatorFunInfo,adigatorOutputs);
