array C_nextFree278 integer C_firstFree202 integer C_maxIndex692 array C_typeId272 array SimpleFunc_nextFree735 integer SimpleFunc_firstFree602 integer SimpleFunc_maxIndex113 array SimpleFunc_typeId163 array C_y142 array this111 integer C_firstFree202 = 0 integer C_maxIndex692 = 0 integer SimpleFunc_firstFree602 = 0 integer SimpleFunc_maxIndex113 = 0 function initGlobals165() { C_firstFree_202 = 0; C_maxIndex_692 = 0; SimpleFunc_firstFree_602 = 0; SimpleFunc_maxIndex_113 = 0; } function main164() { initGlobals165(); init_test176(); } function config201() { } function init_test176() { local integer c882 new_C134(); c_882 = new_C134(); C_y_142[c_882] = 4; dispatch_C_test_C_foo322(c_882); } IS_NATIVE function testSuccess155() { } function C_foo109(integer this191) { local integer clVar599 local integer temp685 temp_685 = this_191; clVar_599 = alloc_SimpleFunc_bar_C_test132(); this_111[clVar_599] = this_191; dispatch_C_test_C_bar118(temp_685, clVar_599); } function C_x174(integer this120) returns integer { return 3; } function C_bar803(integer this168, integer f172) { if (dispatch_SimpleFunc_test_SimpleFunc_apply184(f_172) == 7) { testSuccess155(); } else { }; } function C_init506(integer this130) { } function new_C134() returns integer { local integer this104 this_104 = alloc_C501(); construct_C242(this_104); return this_104; } function construct_C242(integer this107) { C_init506(this_107); } function apply_bar_C_test299(integer this142) returns integer { return (dispatch_C_test_C_x100(this_111[this_142]) + C_y_142[this_111[this_142]]); } function alloc_C501() returns integer { local integer this780 if (C_firstFree_202 == 0) { if (C_maxIndex_692 < 32768) { C_maxIndex_692 = (C_maxIndex_692 + 1); this_780 = C_maxIndex_692; C_typeId_272[this_780] = 1; } else { error119("Out of memory: Could not create C."); this_780 = 0; }; } else { C_firstFree_202 = (C_firstFree_202 - 1); this_780 = C_nextFree_278[C_firstFree_202]; C_typeId_272[this_780] = 1; }; return this_780; } function error119(string msg208) { $debugPrint226((msg_208 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test132() returns integer { local integer this777 if (SimpleFunc_firstFree_602 == 0) { if (SimpleFunc_maxIndex_113 < 32768) { SimpleFunc_maxIndex_113 = (SimpleFunc_maxIndex_113 + 1); this_777 = SimpleFunc_maxIndex_113; SimpleFunc_typeId_163[this_777] = 3; } else { error119("Out of memory: Could not create SimpleFunc_bar_C_test."); this_777 = 0; }; } else { SimpleFunc_firstFree_602 = (SimpleFunc_firstFree_602 - 1); this_777 = SimpleFunc_nextFree_735[SimpleFunc_firstFree_602]; SimpleFunc_typeId_163[this_777] = 3; }; return this_777; } function dispatch_C_test_C_foo322(integer this166) { if (C_typeId_272[this_166] == 0) { if (this_166 == 0) { error119("Nullpointer exception when calling C.foo"); } else { error119("Called C.foo on invalid object."); }; } else { }; C_foo109(this_166); } function dispatch_C_test_C_bar118(integer this581, integer f470) { if (C_typeId_272[this_581] == 0) { if (this_581 == 0) { error119("Nullpointer exception when calling C.bar"); } else { error119("Called C.bar on invalid object."); }; } else { }; C_bar803(this_581, f_470); } function dispatch_C_test_C_x100(integer this140) returns integer { local integer test_C_x_result663 if (C_typeId_272[this_140] == 0) { if (this_140 == 0) { error119("Nullpointer exception when calling C.x"); } else { error119("Called C.x on invalid object."); }; } else { }; test_C_x_result_663 = C_x174(this_140); return test_C_x_result_663; } function dispatch_SimpleFunc_test_SimpleFunc_apply184(integer this140) returns integer { local integer test_SimpleFunc_apply_result592 if (SimpleFunc_typeId_163[this_140] == 0) { if (this_140 == 0) { error119("Nullpointer exception when calling SimpleFunc.apply"); } else { error119("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_592 = apply_bar_C_test299(this_140); return test_SimpleFunc_apply_result_592; }