array FoldClosure_nextFree737 integer FoldClosure_firstFree166 integer FoldClosure_maxIndex574 array FoldClosure_typeId156 array Cell_nextFree161 integer Cell_firstFree445 integer Cell_maxIndex180 array Cell_typeId119 array Cell_elem484 integer blaFromIndex_return_z114 integer blaFromIndex_return_y184 integer FoldClosure_firstFree166 = 0 integer FoldClosure_maxIndex574 = 0 integer Cell_firstFree445 = 0 integer Cell_maxIndex180 = 0 function initGlobals162() { FoldClosure_firstFree_166 = 0; FoldClosure_maxIndex_574 = 0; Cell_firstFree_445 = 0; Cell_maxIndex_180 = 0; } function main152() { initGlobals162(); init_test129(); } function config138() { } function init_test129() { local integer c213 local integer x175 local integer clVar470 local integer temp485 c_213 = new_Cell140(); dispatch_Cell_test_Cell_set516(c_213, blaToIndex946(5, 3)); temp_485 = c_213; clVar_470 = alloc_FoldClosure_fold_test171(); x_175 = dispatch_Cell_test_Cell_fold178(temp_485, 2, clVar_470); if (x_175 == 7) { testSuccess918(); } else { }; } function blaToIndex946(integer b_z141, integer b_y142) returns integer { return b_z_141; } function blaFromIndex162(integer i168) returns integer { blaFromIndex_return_z_114 = i_168; blaFromIndex_return_y_184 = 2; return blaFromIndex_return_z_114; } function apply_wrapper802(integer this152, any t122, any q567) returns any { return apply_fold_test996(this_152, blaFromIndex162(t_122), blaFromIndex_return_y_184, q_567); } IS_NATIVE function testSuccess918() { } function apply_fold_test996(integer this157, integer e_z181, integer e_y110, integer a178) returns integer { return (e_z_181 + a_178); } function Cell_set172(integer this792, any t212) { Cell_elem_484[this_792] = t_212; } function Cell_fold850(integer this196, any start100, integer f710) returns any { return dispatch_FoldClosure_test_FoldClosure_apply888(f_710, Cell_elem_484[this_196], start_100); } function Cell_init104(integer this112) { } function new_Cell140() returns integer { local integer this164 this_164 = alloc_Cell127(); construct_Cell159(this_164); return this_164; } function construct_Cell159(integer this289) { Cell_init104(this_289); } function alloc_FoldClosure_fold_test171() returns integer { local integer this928 if (FoldClosure_firstFree_166 == 0) { if (FoldClosure_maxIndex_574 < 32768) { FoldClosure_maxIndex_574 = (FoldClosure_maxIndex_574 + 1); this_928 = FoldClosure_maxIndex_574; FoldClosure_typeId_156[this_928] = 3; } else { error459("Out of memory: Could not create FoldClosure_fold_test."); this_928 = 0; }; } else { FoldClosure_firstFree_166 = (FoldClosure_firstFree_166 - 1); this_928 = FoldClosure_nextFree_737[FoldClosure_firstFree_166]; FoldClosure_typeId_156[this_928] = 3; }; return this_928; } function error459(string msg140) { $debugPrint193((msg_140 + (" " + #getStackTrace()))); } function alloc_Cell127() returns integer { local integer this444 if (Cell_firstFree_445 == 0) { if (Cell_maxIndex_180 < 32768) { Cell_maxIndex_180 = (Cell_maxIndex_180 + 1); this_444 = Cell_maxIndex_180; Cell_typeId_119[this_444] = 1; } else { error459("Out of memory: Could not create Cell."); this_444 = 0; }; } else { Cell_firstFree_445 = (Cell_firstFree_445 - 1); this_444 = Cell_nextFree_161[Cell_firstFree_445]; Cell_typeId_119[this_444] = 1; }; return this_444; } function dispatch_Cell_test_Cell_set516(integer this199, any t121) { if (Cell_typeId_119[this_199] == 0) { if (this_199 == 0) { error459("Nullpointer exception when calling Cell.set"); } else { error459("Called Cell.set on invalid object."); }; } else { }; Cell_set172(this_199, t_121); } function dispatch_Cell_test_Cell_fold178(integer this206, any start771, integer f206) returns any { local any test_Cell_fold_result182 if (Cell_typeId_119[this_206] == 0) { if (this_206 == 0) { error459("Nullpointer exception when calling Cell.fold"); } else { error459("Called Cell.fold on invalid object."); }; } else { }; test_Cell_fold_result_182 = Cell_fold850(this_206, start_771, f_206); return test_Cell_fold_result_182; } function dispatch_FoldClosure_test_FoldClosure_apply888(integer this212, any t795, any q139) returns any { local any test_FoldClosure_apply_result165 if (FoldClosure_typeId_156[this_212] == 0) { if (this_212 == 0) { error459("Nullpointer exception when calling FoldClosure.apply"); } else { error459("Called FoldClosure.apply on invalid object."); }; } else { }; test_FoldClosure_apply_result_165 = apply_wrapper802(this_212, t_795, q_139); return test_FoldClosure_apply_result_165; }