array Func_nextFree117 integer Func_firstFree188 integer Func_maxIndex125 array Func_typeId867 array C_nextFree713 integer C_firstFree187 integer C_maxIndex142 array C_typeId243 array C_x162 integer Func_firstFree188 = 0 integer Func_maxIndex125 = 0 integer C_firstFree187 = 0 integer C_maxIndex142 = 0 function initGlobals417() { Func_firstFree_188 = 0; Func_maxIndex_125 = 0; C_firstFree_187 = 0; C_maxIndex_142 = 0; } function main382() { initGlobals417(); init_A844(); } function config420() { } function init_A844() { local integer a235 local integer b136 local integer clVar843 local integer temp171 a_235 = new_C110(5); temp_171 = a_235; clVar_843 = alloc_Func_map_A914(); b_136 = dispatch_C_A_C_map614(temp_171, clVar_843); if (C_x_162[b_136] == 10) { testSuccess188(); } else { }; } IS_NATIVE function testSuccess188() { } function apply_map_A175(integer this192, integer x896) returns integer { return (2 * x_896); } function C_map152(integer this171, integer f174) returns integer { return new_C110(dispatch_Func_A_Func_apply673(f_174, C_x_162[this_171])); } function new_C110(any x542) returns integer { local integer this183 this_183 = alloc_C207(); construct_C212(this_183, x_542); return this_183; } function C_init720(integer this119) { } function construct_C212(integer this153, any x941) { C_init720(this_153); C_x_162[this_153] = x_941; } function alloc_Func_map_A914() returns integer { local integer this136 if (Func_firstFree_188 == 0) { if (Func_maxIndex_125 < 32768) { Func_maxIndex_125 = (Func_maxIndex_125 + 1); this_136 = Func_maxIndex_125; Func_typeId_867[this_136] = 3; } else { error534("Out of memory: Could not create Func_map_A."); this_136 = 0; }; } else { Func_firstFree_188 = (Func_firstFree_188 - 1); this_136 = Func_nextFree_117[Func_firstFree_188]; Func_typeId_867[this_136] = 3; }; return this_136; } function error534(string msg442) { $debugPrint555((msg_442 + (" " + #getStackTrace()))); } function alloc_C207() returns integer { local integer this168 if (C_firstFree_187 == 0) { if (C_maxIndex_142 < 32768) { C_maxIndex_142 = (C_maxIndex_142 + 1); this_168 = C_maxIndex_142; C_typeId_243[this_168] = 1; } else { error534("Out of memory: Could not create C."); this_168 = 0; }; } else { C_firstFree_187 = (C_firstFree_187 - 1); this_168 = C_nextFree_713[C_firstFree_187]; C_typeId_243[this_168] = 1; }; return this_168; } function dispatch_C_A_C_map614(integer this134, integer f131) returns integer { local integer A_C_map_result270 if (C_typeId_243[this_134] == 0) { if (this_134 == 0) { error534("Nullpointer exception when calling C.map"); } else { error534("Called C.map on invalid object."); }; } else { }; A_C_map_result_270 = C_map152(this_134, f_131); return A_C_map_result_270; } function dispatch_Func_A_Func_apply673(integer this696, any x200) returns any { local any A_Func_apply_result274 if (Func_typeId_867[this_696] == 0) { if (this_696 == 0) { error534("Nullpointer exception when calling Func.apply"); } else { error534("Called Func.apply on invalid object."); }; } else { }; A_Func_apply_result_274 = apply_map_A175(this_696, x_200); return A_Func_apply_result_274; }