array Func_nextFree207 integer Func_firstFree926 integer Func_maxIndex146 array Func_typeId171 array C_nextFree102 integer C_firstFree136 integer C_maxIndex164 array C_typeId742 array C_x176 integer Func_firstFree926 = 0 integer Func_maxIndex146 = 0 integer C_firstFree136 = 0 integer C_maxIndex164 = 0 function initGlobals117() { Func_firstFree_926 = 0; Func_maxIndex_146 = 0; C_firstFree_136 = 0; C_maxIndex_164 = 0; } function main201() { initGlobals117(); init_A831(); } function config911() { } function init_A831() { local integer a365 local integer b260 local integer clVar146 local integer temp927 a_365 = new_C163(5); temp_927 = a_365; clVar_146 = alloc_Func_map_A608(); b_260 = dispatch_C_A_C_map186(temp_927, clVar_146); if (C_x_176[b_260] == 10) { testSuccess129(); } else { }; } IS_NATIVE function testSuccess129() { } function apply_map_A234(integer this190, integer x206) returns integer { return (2 * x_206); } function C_map210(integer this749, integer f360) returns integer { return new_C163(dispatch_Func_A_Func_apply159(f_360, C_x_176[this_749])); } function new_C163(any x191) returns integer { local integer this166 this_166 = alloc_C953(); construct_C517(this_166, x_191); return this_166; } function C_init262(integer this170) { } function construct_C517(integer this686, any x679) { C_init262(this_686); C_x_176[this_686] = x_679; } function alloc_Func_map_A608() returns integer { local integer this146 if (Func_firstFree_926 == 0) { if (Func_maxIndex_146 < 32768) { Func_maxIndex_146 = (Func_maxIndex_146 + 1); this_146 = Func_maxIndex_146; Func_typeId_171[this_146] = 3; } else { error629("Out of memory: Could not create Func_map_A."); this_146 = 0; }; } else { Func_firstFree_926 = (Func_firstFree_926 - 1); this_146 = Func_nextFree_207[Func_firstFree_926]; Func_typeId_171[this_146] = 3; }; return this_146; } function error629(string msg913) { $debugPrint431((msg_913 + (" " + #getStackTrace()))); } function alloc_C953() returns integer { local integer this383 if (C_firstFree_136 == 0) { if (C_maxIndex_164 < 32768) { C_maxIndex_164 = (C_maxIndex_164 + 1); this_383 = C_maxIndex_164; C_typeId_742[this_383] = 1; } else { error629("Out of memory: Could not create C."); this_383 = 0; }; } else { C_firstFree_136 = (C_firstFree_136 - 1); this_383 = C_nextFree_102[C_firstFree_136]; C_typeId_742[this_383] = 1; }; return this_383; } function dispatch_C_A_C_map186(integer this210, integer f191) returns integer { local integer A_C_map_result211 if (C_typeId_742[this_210] == 0) { if (this_210 == 0) { error629("Nullpointer exception when calling C.map"); } else { error629("Called C.map on invalid object."); }; } else { }; A_C_map_result_211 = C_map210(this_210, f_191); return A_C_map_result_211; } function dispatch_Func_A_Func_apply159(integer this628, any x310) returns any { local any A_Func_apply_result178 if (Func_typeId_171[this_628] == 0) { if (this_628 == 0) { error629("Nullpointer exception when calling Func.apply"); } else { error629("Called Func.apply on invalid object."); }; } else { }; A_Func_apply_result_178 = apply_map_A234(this_628, x_310); return A_Func_apply_result_178; }