array FoldClosure_nextFree148 integer FoldClosure_firstFree161 integer FoldClosure_maxIndex116 array FoldClosure_typeId961 array Cell_nextFree176 integer Cell_firstFree697 integer Cell_maxIndex197 array Cell_typeId116 array Cell_elem108 integer blaFromIndex_return_z211 integer blaFromIndex_return_y204 integer FoldClosure_firstFree161 = 0 integer FoldClosure_maxIndex116 = 0 integer Cell_firstFree697 = 0 integer Cell_maxIndex197 = 0 function initGlobals122() { FoldClosure_firstFree_161 = 0; FoldClosure_maxIndex_116 = 0; Cell_firstFree_697 = 0; Cell_maxIndex_197 = 0; } function main181() { initGlobals122(); init_test583(); } function config480() { } function init_test583() { local integer c194 local integer x485 local integer clVar114 local integer temp118 c_194 = new_Cell212(); dispatch_Cell_test_Cell_set191(c_194, blaToIndex795(5, 3)); temp_118 = c_194; clVar_114 = alloc_FoldClosure_fold_test109(); x_485 = dispatch_Cell_test_Cell_fold155(temp_118, 2, clVar_114); if (x_485 == 7) { testSuccess139(); } else { }; } function blaToIndex795(integer b_z127, integer b_y902) returns integer { return b_z_127; } function blaFromIndex206(integer i147) returns integer { blaFromIndex_return_z_211 = i_147; blaFromIndex_return_y_204 = 2; return blaFromIndex_return_z_211; } function apply_wrapper504(integer this178, any t146, any q829) returns any { return apply_fold_test182(this_178, blaFromIndex206(t_146), blaFromIndex_return_y_204, q_829); } IS_NATIVE function testSuccess139() { } function apply_fold_test182(integer this172, integer e_z906, integer e_y209, integer a838) returns integer { return (e_z_906 + a_838); } function Cell_set595(integer this669, any t106) { Cell_elem_108[this_669] = t_106; } function Cell_fold147(integer this172, any start100, integer f162) returns any { return dispatch_FoldClosure_test_FoldClosure_apply157(f_162, Cell_elem_108[this_172], start_100); } function Cell_init141(integer this803) { } function new_Cell212() returns integer { local integer this370 this_370 = alloc_Cell163(); construct_Cell165(this_370); return this_370; } function construct_Cell165(integer this653) { Cell_init141(this_653); } function alloc_FoldClosure_fold_test109() returns integer { local integer this150 if (FoldClosure_firstFree_161 == 0) { if (FoldClosure_maxIndex_116 < 32768) { FoldClosure_maxIndex_116 = (FoldClosure_maxIndex_116 + 1); this_150 = FoldClosure_maxIndex_116; FoldClosure_typeId_961[this_150] = 3; } else { error973("Out of memory: Could not create FoldClosure_fold_test."); this_150 = 0; }; } else { FoldClosure_firstFree_161 = (FoldClosure_firstFree_161 - 1); this_150 = FoldClosure_nextFree_148[FoldClosure_firstFree_161]; FoldClosure_typeId_961[this_150] = 3; }; return this_150; } function error973(string msg487) { $debugPrint189((msg_487 + (" " + #getStackTrace()))); } function alloc_Cell163() returns integer { local integer this661 if (Cell_firstFree_697 == 0) { if (Cell_maxIndex_197 < 32768) { Cell_maxIndex_197 = (Cell_maxIndex_197 + 1); this_661 = Cell_maxIndex_197; Cell_typeId_116[this_661] = 1; } else { error973("Out of memory: Could not create Cell."); this_661 = 0; }; } else { Cell_firstFree_697 = (Cell_firstFree_697 - 1); this_661 = Cell_nextFree_176[Cell_firstFree_697]; Cell_typeId_116[this_661] = 1; }; return this_661; } function dispatch_Cell_test_Cell_set191(integer this102, any t542) { if (Cell_typeId_116[this_102] == 0) { if (this_102 == 0) { error973("Nullpointer exception when calling Cell.set"); } else { error973("Called Cell.set on invalid object."); }; } else { }; Cell_set595(this_102, t_542); } function dispatch_Cell_test_Cell_fold155(integer this133, any start122, integer f397) returns any { local any test_Cell_fold_result173 if (Cell_typeId_116[this_133] == 0) { if (this_133 == 0) { error973("Nullpointer exception when calling Cell.fold"); } else { error973("Called Cell.fold on invalid object."); }; } else { }; test_Cell_fold_result_173 = Cell_fold147(this_133, start_122, f_397); return test_Cell_fold_result_173; } function dispatch_FoldClosure_test_FoldClosure_apply157(integer this814, any t108, any q127) returns any { local any test_FoldClosure_apply_result141 if (FoldClosure_typeId_961[this_814] == 0) { if (this_814 == 0) { error973("Nullpointer exception when calling FoldClosure.apply"); } else { error973("Called FoldClosure.apply on invalid object."); }; } else { }; test_FoldClosure_apply_result_141 = apply_wrapper504(this_814, t_108, q_127); return test_FoldClosure_apply_result_141; }