array Func_nextFree169 integer Func_firstFree156 integer Func_maxIndex141 array Func_typeId290 array C_nextFree205 integer C_firstFree155 integer C_maxIndex112 array C_typeId606 array C_x162 integer Func_firstFree156 = 0 integer Func_maxIndex141 = 0 integer C_firstFree155 = 0 integer C_maxIndex112 = 0 function initGlobals204() { Func_firstFree_156 = 0; Func_maxIndex_141 = 0; C_firstFree_155 = 0; C_maxIndex_112 = 0; } function main673() { initGlobals204(); init_A612(); } function config162() { } function init_A612() { local integer a101 local integer b104 local integer clVar197 local integer temp186 a_101 = new_C646(5); temp_186 = a_101; clVar_197 = alloc_Func_map_A208(); b_104 = dispatch_C_A_C_map184(temp_186, clVar_197); if (C_x_162[b_104] == 10) { testSuccess114(); } else { }; } IS_NATIVE function testSuccess114() { } function apply_map_A131(integer this121, integer x130) returns integer { return (2 * x_130); } function C_map125(integer this170, integer f131) returns integer { return new_C646(dispatch_Func_A_Func_apply235(f_131, C_x_162[this_170])); } function new_C646(any x210) returns integer { local integer this290 this_290 = alloc_C181(); construct_C103(this_290, x_210); return this_290; } function C_init134(integer this134) { } function construct_C103(integer this114, any x577) { C_init134(this_114); C_x_162[this_114] = x_577; } function alloc_Func_map_A208() returns integer { local integer this119 if (Func_firstFree_156 == 0) { if (Func_maxIndex_141 < 32768) { Func_maxIndex_141 = (Func_maxIndex_141 + 1); this_119 = Func_maxIndex_141; Func_typeId_290[this_119] = 3; } else { error180("Out of memory: Could not create Func_map_A."); this_119 = 0; }; } else { Func_firstFree_156 = (Func_firstFree_156 - 1); this_119 = Func_nextFree_169[Func_firstFree_156]; Func_typeId_290[this_119] = 3; }; return this_119; } function error180(string msg149) { $debugPrint427((msg_149 + (" " + #getStackTrace()))); } function alloc_C181() returns integer { local integer this107 if (C_firstFree_155 == 0) { if (C_maxIndex_112 < 32768) { C_maxIndex_112 = (C_maxIndex_112 + 1); this_107 = C_maxIndex_112; C_typeId_606[this_107] = 1; } else { error180("Out of memory: Could not create C."); this_107 = 0; }; } else { C_firstFree_155 = (C_firstFree_155 - 1); this_107 = C_nextFree_205[C_firstFree_155]; C_typeId_606[this_107] = 1; }; return this_107; } function dispatch_C_A_C_map184(integer this118, integer f594) returns integer { local integer A_C_map_result592 if (C_typeId_606[this_118] == 0) { if (this_118 == 0) { error180("Nullpointer exception when calling C.map"); } else { error180("Called C.map on invalid object."); }; } else { }; A_C_map_result_592 = C_map125(this_118, f_594); return A_C_map_result_592; } function dispatch_Func_A_Func_apply235(integer this103, any x209) returns any { local any A_Func_apply_result289 if (Func_typeId_290[this_103] == 0) { if (this_103 == 0) { error180("Nullpointer exception when calling Func.apply"); } else { error180("Called Func.apply on invalid object."); }; } else { }; A_Func_apply_result_289 = apply_map_A131(this_103, x_209); return A_Func_apply_result_289; }