array FoldClosure_nextFree141 integer FoldClosure_firstFree988 integer FoldClosure_maxIndex814 array FoldClosure_typeId127 array Cell_nextFree902 integer Cell_firstFree108 integer Cell_maxIndex127 array Cell_typeId906 array Cell_elem209 integer blaFromIndex_return_z174 integer blaFromIndex_return_y377 integer FoldClosure_firstFree988 = 0 integer FoldClosure_maxIndex814 = 0 integer Cell_firstFree108 = 0 integer Cell_maxIndex127 = 0 function initGlobals161() { } function main108() { initGlobals161(); init_test116(); } function config155() { } function init_test116() { local integer c109 c_109 = new_Cell697(); dispatch_Cell_test_Cell_set183(c_109, blaToIndex197(5, 3)); if (dispatch_Cell_test_Cell_fold967(c_109, 2, alloc_FoldClosure_fold_test118()) == 7) { testSuccess148(); } else { }; } function blaToIndex197(integer b_z194, integer b_y113) returns integer { return b_z_194; } function blaFromIndex180(integer i212) returns integer { blaFromIndex_return_z_174 = i_212; blaFromIndex_return_y_377 = 2; return blaFromIndex_return_z_174; } function apply_wrapper180(integer this304, any t438, any q152) returns any { return apply_fold_test213(this_304, blaFromIndex180(t_438), blaFromIndex_return_y_377, q_152); } IS_NATIVE function testSuccess148() { } function apply_fold_test213(integer this487, integer e_z804, integer e_y201, integer a206) returns integer { return (e_z_804 + a_206); } function Cell_set323(integer this822, any t105) { Cell_elem_209[this_822] = t_105; } function Cell_fold187(integer this113, any start573, integer f499) returns any { return dispatch_FoldClosure_test_FoldClosure_apply211(f_499, Cell_elem_209[this_113], start_573); } function Cell_init176(integer this153) { } function new_Cell697() returns integer { local integer this197 this_197 = alloc_Cell204(); construct_Cell961(this_197); return this_197; } function construct_Cell961(integer this214) { Cell_init176(this_214); } function alloc_FoldClosure_fold_test118() returns integer { local integer this121 if (FoldClosure_firstFree_988 == 0) { if (FoldClosure_maxIndex_814 < 32768) { FoldClosure_maxIndex_814 = (FoldClosure_maxIndex_814 + 1); this_121 = FoldClosure_maxIndex_814; FoldClosure_typeId_127[this_121] = 3; } else { error626("Out of memory: Could not create FoldClosure_fold_test."); this_121 = 0; }; } else { FoldClosure_firstFree_988 = (FoldClosure_firstFree_988 - 1); this_121 = FoldClosure_nextFree_141[FoldClosure_firstFree_988]; FoldClosure_typeId_127[this_121] = 3; }; return this_121; } function error626(string msg108) { $debugPrint206((msg_108 + (" " + #getStackTrace()))); } function alloc_Cell204() returns integer { local integer this452 if (Cell_firstFree_108 == 0) { if (Cell_maxIndex_127 < 32768) { Cell_maxIndex_127 = (Cell_maxIndex_127 + 1); this_452 = Cell_maxIndex_127; Cell_typeId_906[this_452] = 1; } else { error626("Out of memory: Could not create Cell."); this_452 = 0; }; } else { Cell_firstFree_108 = (Cell_firstFree_108 - 1); this_452 = Cell_nextFree_902[Cell_firstFree_108]; Cell_typeId_906[this_452] = 1; }; return this_452; } function dispatch_Cell_test_Cell_set183(integer this141, any t158) { if (Cell_typeId_906[this_141] == 0) { if (this_141 == 0) { error626("Nullpointer exception when calling Cell.set"); } else { error626("Called Cell.set on invalid object."); }; } else { }; Cell_set323(this_141, t_158); } function dispatch_Cell_test_Cell_fold967(integer this994, any start816, integer f125) returns any { if (Cell_typeId_906[this_994] == 0) { if (this_994 == 0) { error626("Nullpointer exception when calling Cell.fold"); } else { error626("Called Cell.fold on invalid object."); }; } else { }; return Cell_fold187(this_994, start_816, f_125); } function dispatch_FoldClosure_test_FoldClosure_apply211(integer this202, any t103, any q197) returns any { if (FoldClosure_typeId_127[this_202] == 0) { if (this_202 == 0) { error626("Nullpointer exception when calling FoldClosure.apply"); } else { error626("Called FoldClosure.apply on invalid object."); }; } else { }; return apply_wrapper180(this_202, t_103, q_197); }