array FoldClosure_nextFree167 integer FoldClosure_firstFree188 integer FoldClosure_maxIndex346 array FoldClosure_typeId177 array Cell_nextFree115 integer Cell_firstFree610 integer Cell_maxIndex208 array Cell_typeId443 array Cell_elem256 integer FoldClosure_firstFree188 = 0 integer FoldClosure_maxIndex346 = 0 integer Cell_firstFree610 = 0 integer Cell_maxIndex208 = 0 function initGlobals185() { } function main378() { initGlobals185(); init_test163(); } function config114() { } function init_test163() { local integer c188 local integer x129 local integer clVar376 local integer temp418 local integer this134 local any t181 local integer this533 local any t811 local integer b_z132 local integer this130 local integer this122 local any start145 local integer f211 local any test_Cell_fold_result611 local integer this182 local any start676 local integer f102 local integer tuple_temp113 c_188 = new_Cell159(); this_134 = c_188; tuple_temp_113 = 5; b_z_132 = tuple_temp_113; t_181 = b_z_132; if (Cell_typeId_443[this_134] == 0) { if (this_134 == 0) { error166("Nullpointer exception when calling Cell.set"); } else { error166("Called Cell.set on invalid object."); }; } else { }; this_533 = this_134; t_811 = t_181; Cell_elem_256[this_533] = t_811; temp_418 = c_188; if (FoldClosure_firstFree_188 == 0) { if (FoldClosure_maxIndex_346 < 32768) { FoldClosure_maxIndex_346 = (FoldClosure_maxIndex_346 + 1); this_130 = FoldClosure_maxIndex_346; FoldClosure_typeId_177[this_130] = 3; } else { error166("Out of memory: Could not create FoldClosure_fold_test."); this_130 = 0; }; } else { FoldClosure_firstFree_188 = (FoldClosure_firstFree_188 - 1); this_130 = FoldClosure_nextFree_167[FoldClosure_firstFree_188]; FoldClosure_typeId_177[this_130] = 3; }; clVar_376 = this_130; this_122 = temp_418; start_145 = 2; f_211 = clVar_376; if (Cell_typeId_443[this_122] == 0) { if (this_122 == 0) { error166("Nullpointer exception when calling Cell.fold"); } else { error166("Called Cell.fold on invalid object."); }; } else { }; this_182 = this_122; start_676 = start_145; f_102 = f_211; test_Cell_fold_result_611 = dispatch_FoldClosure_test_FoldClosure_apply139(f_102, Cell_elem_256[this_182], start_676); x_129 = test_Cell_fold_result_611; if (x_129 == 7) { testSuccess179(); } else { }; } IS_NATIVE function testSuccess179() { } function new_Cell159() returns integer { local integer this174 local integer this195 if (Cell_firstFree_610 == 0) { if (Cell_maxIndex_208 < 32768) { Cell_maxIndex_208 = (Cell_maxIndex_208 + 1); this_195 = Cell_maxIndex_208; Cell_typeId_443[this_195] = 1; } else { error166("Out of memory: Could not create Cell."); this_195 = 0; }; } else { Cell_firstFree_610 = (Cell_firstFree_610 - 1); this_195 = Cell_nextFree_115[Cell_firstFree_610]; Cell_typeId_443[this_195] = 1; }; this_174 = this_195; return this_174; } function error166(string msg915) { $debugPrint171((msg_915 + (" " + #getStackTrace()))); } function dispatch_FoldClosure_test_FoldClosure_apply139(integer this205, any t868, any q828) returns any { local any test_FoldClosure_apply_result210 local any t155 local any q172 local integer e_z127 local integer a127 local integer i144 local integer tuple_temp714 if (FoldClosure_typeId_177[this_205] == 0) { if (this_205 == 0) { error166("Nullpointer exception when calling FoldClosure.apply"); } else { error166("Called FoldClosure.apply on invalid object."); }; } else { }; t_155 = t_868; q_172 = q_828; i_144 = t_155; tuple_temp_714 = i_144; e_z_127 = tuple_temp_714; a_127 = q_172; test_FoldClosure_apply_result_210 = (e_z_127 + a_127); return test_FoldClosure_apply_result_210; }