array Func_nextFree644 integer Func_firstFree132 integer Func_maxIndex823 array Func_typeId117 array C_nextFree273 integer C_firstFree348 integer C_maxIndex142 array C_typeId131 array C_x120 integer Func_firstFree132 = 0 integer Func_maxIndex823 = 0 integer C_firstFree348 = 0 integer C_maxIndex142 = 0 function initGlobals146() { Func_firstFree_132 = 0; Func_maxIndex_823 = 0; C_firstFree_348 = 0; C_maxIndex_142 = 0; } function main110() { initGlobals146(); init_A119(); } function config147() { } function init_A119() { local integer a203 local integer b161 local integer clVar210 local integer temp106 a_203 = new_C183(5); temp_106 = a_203; clVar_210 = alloc_Func_map_A468(); b_161 = dispatch_C_A_C_map126(temp_106, clVar_210); if (C_x_120[b_161] == 10) { testSuccess109(); } else { }; } IS_NATIVE function testSuccess109() { } function apply_map_A932(integer this171, integer x259) returns integer { return (2 * x_259); } function C_map181(integer this648, integer f197) returns integer { return new_C183(dispatch_Func_A_Func_apply730(f_197, C_x_120[this_648])); } function new_C183(any x117) returns integer { local integer this115 this_115 = alloc_C101(); construct_C939(this_115, x_117); return this_115; } function C_init179(integer this110) { } function construct_C939(integer this173, any x130) { C_init179(this_173); C_x_120[this_173] = x_130; } function alloc_Func_map_A468() returns integer { local integer this925 if (Func_firstFree_132 == 0) { if (Func_maxIndex_823 < 32768) { Func_maxIndex_823 = (Func_maxIndex_823 + 1); this_925 = Func_maxIndex_823; Func_typeId_117[this_925] = 3; } else { error189("Out of memory: Could not create Func_map_A."); this_925 = 0; }; } else { Func_firstFree_132 = (Func_firstFree_132 - 1); this_925 = Func_nextFree_644[Func_firstFree_132]; Func_typeId_117[this_925] = 3; }; return this_925; } function error189(string msg159) { $debugPrint185((msg_159 + (" " + #getStackTrace()))); } function alloc_C101() returns integer { local integer this265 if (C_firstFree_348 == 0) { if (C_maxIndex_142 < 32768) { C_maxIndex_142 = (C_maxIndex_142 + 1); this_265 = C_maxIndex_142; C_typeId_131[this_265] = 1; } else { error189("Out of memory: Could not create C."); this_265 = 0; }; } else { C_firstFree_348 = (C_firstFree_348 - 1); this_265 = C_nextFree_273[C_firstFree_348]; C_typeId_131[this_265] = 1; }; return this_265; } function dispatch_C_A_C_map126(integer this184, integer f171) returns integer { local integer A_C_map_result150 if (C_typeId_131[this_184] == 0) { if (this_184 == 0) { error189("Nullpointer exception when calling C.map"); } else { error189("Called C.map on invalid object."); }; } else { }; A_C_map_result_150 = C_map181(this_184, f_171); return A_C_map_result_150; } function dispatch_Func_A_Func_apply730(integer this173, any x141) returns any { local any A_Func_apply_result201 if (Func_typeId_117[this_173] == 0) { if (this_173 == 0) { error189("Nullpointer exception when calling Func.apply"); } else { error189("Called Func.apply on invalid object."); }; } else { }; A_Func_apply_result_201 = apply_map_A932(this_173, x_141); return A_Func_apply_result_201; }