array FoldClosure_nextFree180 integer FoldClosure_firstFree648 integer FoldClosure_maxIndex151 array FoldClosure_typeId134 array Cell_nextFree164 integer Cell_firstFree238 integer Cell_maxIndex113 array Cell_typeId331 array Cell_elem635 integer blaFromIndex_return_z294 integer blaFromIndex_return_y665 integer FoldClosure_firstFree648 = 0 integer FoldClosure_maxIndex151 = 0 integer Cell_firstFree238 = 0 integer Cell_maxIndex113 = 0 function initGlobals156() { FoldClosure_firstFree_648 = 0; FoldClosure_maxIndex_151 = 0; Cell_firstFree_238 = 0; Cell_maxIndex_113 = 0; } function main678() { initGlobals156(); init_test139(); } function config825() { } function init_test139() { local integer c266 local integer x136 local integer clVar195 local integer temp555 c_266 = new_Cell550(); dispatch_Cell_test_Cell_set134(c_266, blaToIndex603(5, 3)); temp_555 = c_266; clVar_195 = alloc_FoldClosure_fold_test209(); x_136 = dispatch_Cell_test_Cell_fold898(temp_555, 2, clVar_195); if (x_136 == 7) { testSuccess688(); } else { }; } function blaToIndex603(integer b_z169, integer b_y659) returns integer { return b_z_169; } function blaFromIndex213(integer i912) returns integer { blaFromIndex_return_z_294 = i_912; blaFromIndex_return_y_665 = 2; return blaFromIndex_return_z_294; } function apply_wrapper189(integer this764, any t121, any q408) returns any { return apply_fold_test209(this_764, blaFromIndex213(t_121), blaFromIndex_return_y_665, q_408); } IS_NATIVE function testSuccess688() { } function apply_fold_test209(integer this212, integer e_z193, integer e_y151, integer a193) returns integer { return (e_z_193 + a_193); } function Cell_set512(integer this197, any t192) { Cell_elem_635[this_197] = t_192; } function Cell_fold149(integer this194, any start174, integer f107) returns any { return dispatch_FoldClosure_test_FoldClosure_apply925(f_107, Cell_elem_635[this_194], start_174); } function Cell_init472(integer this110) { } function new_Cell550() returns integer { local integer this107 this_107 = alloc_Cell123(); construct_Cell612(this_107); return this_107; } function construct_Cell612(integer this157) { Cell_init472(this_157); } function alloc_FoldClosure_fold_test209() returns integer { local integer this203 if (FoldClosure_firstFree_648 == 0) { if (FoldClosure_maxIndex_151 < 32768) { FoldClosure_maxIndex_151 = (FoldClosure_maxIndex_151 + 1); this_203 = FoldClosure_maxIndex_151; FoldClosure_typeId_134[this_203] = 3; } else { error935("Out of memory: Could not create FoldClosure_fold_test."); this_203 = 0; }; } else { FoldClosure_firstFree_648 = (FoldClosure_firstFree_648 - 1); this_203 = FoldClosure_nextFree_180[FoldClosure_firstFree_648]; FoldClosure_typeId_134[this_203] = 3; }; return this_203; } function error935(string msg162) { $debugPrint197((msg_162 + (" " + #getStackTrace()))); } function alloc_Cell123() returns integer { local integer this214 if (Cell_firstFree_238 == 0) { if (Cell_maxIndex_113 < 32768) { Cell_maxIndex_113 = (Cell_maxIndex_113 + 1); this_214 = Cell_maxIndex_113; Cell_typeId_331[this_214] = 1; } else { error935("Out of memory: Could not create Cell."); this_214 = 0; }; } else { Cell_firstFree_238 = (Cell_firstFree_238 - 1); this_214 = Cell_nextFree_164[Cell_firstFree_238]; Cell_typeId_331[this_214] = 1; }; return this_214; } function dispatch_Cell_test_Cell_set134(integer this795, any t131) { if (Cell_typeId_331[this_795] == 0) { if (this_795 == 0) { error935("Nullpointer exception when calling Cell.set"); } else { error935("Called Cell.set on invalid object."); }; } else { }; Cell_set512(this_795, t_131); } function dispatch_Cell_test_Cell_fold898(integer this121, any start725, integer f139) returns any { local any test_Cell_fold_result104 if (Cell_typeId_331[this_121] == 0) { if (this_121 == 0) { error935("Nullpointer exception when calling Cell.fold"); } else { error935("Called Cell.fold on invalid object."); }; } else { }; test_Cell_fold_result_104 = Cell_fold149(this_121, start_725, f_139); return test_Cell_fold_result_104; } function dispatch_FoldClosure_test_FoldClosure_apply925(integer this180, any t128, any q166) returns any { local any test_FoldClosure_apply_result118 if (FoldClosure_typeId_134[this_180] == 0) { if (this_180 == 0) { error935("Nullpointer exception when calling FoldClosure.apply"); } else { error935("Called FoldClosure.apply on invalid object."); }; } else { }; test_FoldClosure_apply_result_118 = apply_wrapper189(this_180, t_128, q_166); return test_FoldClosure_apply_result_118; }