array Func_nextFree133 integer Func_firstFree774 integer Func_maxIndex144 array Func_typeId208 array C_nextFree203 integer C_firstFree137 integer C_maxIndex501 array C_typeId124 array C_x168 integer Func_firstFree774 = 0 integer Func_maxIndex144 = 0 integer C_firstFree137 = 0 integer C_maxIndex501 = 0 function initGlobals831() { Func_firstFree_774 = 0; Func_maxIndex_144 = 0; C_firstFree_137 = 0; C_maxIndex_501 = 0; } function main101() { initGlobals831(); init_A137(); } function config142() { } function init_A137() { local integer a355 local integer b150 local integer clVar252 local integer temp153 a_355 = new_C143(5); temp_153 = a_355; clVar_252 = alloc_Func_map_A189(); b_150 = dispatch_C_A_C_map181(temp_153, clVar_252); if (C_x_168[b_150] == 10) { testSuccess679(); } else { }; } IS_NATIVE function testSuccess679() { } function apply_map_A827(integer this145, integer x669) returns integer { return (2 * x_669); } function C_map312(integer this876, integer f116) returns integer { return new_C143(dispatch_Func_A_Func_apply142(f_116, C_x_168[this_876])); } function new_C143(any x104) returns integer { local integer this192 this_192 = alloc_C147(); construct_C812(this_192, x_104); return this_192; } function C_init462(integer this133) { } function construct_C812(integer this307, any x204) { C_init462(this_307); C_x_168[this_307] = x_204; } function alloc_Func_map_A189() returns integer { local integer this151 if (Func_firstFree_774 == 0) { if (Func_maxIndex_144 < 32768) { Func_maxIndex_144 = (Func_maxIndex_144 + 1); this_151 = Func_maxIndex_144; Func_typeId_208[this_151] = 3; } else { error210("Out of memory: Could not create Func_map_A."); this_151 = 0; }; } else { Func_firstFree_774 = (Func_firstFree_774 - 1); this_151 = Func_nextFree_133[Func_firstFree_774]; Func_typeId_208[this_151] = 3; }; return this_151; } function error210(string msg706) { $debugPrint770((msg_706 + (" " + #getStackTrace()))); } function alloc_C147() returns integer { local integer this494 if (C_firstFree_137 == 0) { if (C_maxIndex_501 < 32768) { C_maxIndex_501 = (C_maxIndex_501 + 1); this_494 = C_maxIndex_501; C_typeId_124[this_494] = 1; } else { error210("Out of memory: Could not create C."); this_494 = 0; }; } else { C_firstFree_137 = (C_firstFree_137 - 1); this_494 = C_nextFree_203[C_firstFree_137]; C_typeId_124[this_494] = 1; }; return this_494; } function dispatch_C_A_C_map181(integer this101, integer f926) returns integer { local integer A_C_map_result441 if (C_typeId_124[this_101] == 0) { if (this_101 == 0) { error210("Nullpointer exception when calling C.map"); } else { error210("Called C.map on invalid object."); }; } else { }; A_C_map_result_441 = C_map312(this_101, f_926); return A_C_map_result_441; } function dispatch_Func_A_Func_apply142(integer this116, any x142) returns any { local any A_Func_apply_result148 if (Func_typeId_208[this_116] == 0) { if (this_116 == 0) { error210("Nullpointer exception when calling Func.apply"); } else { error210("Called Func.apply on invalid object."); }; } else { }; A_Func_apply_result_148 = apply_map_A827(this_116, x_142); return A_Func_apply_result_148; }