array C_nextFree207 integer C_firstFree157 integer C_maxIndex203 array C_typeId201 array SimpleFunc_nextFree531 integer SimpleFunc_firstFree307 integer SimpleFunc_maxIndex135 array SimpleFunc_typeId251 array C_y155 array this120 integer C_firstFree157 = 0 integer C_maxIndex203 = 0 integer SimpleFunc_firstFree307 = 0 integer SimpleFunc_maxIndex135 = 0 function initGlobals103() { C_firstFree_157 = 0; C_maxIndex_203 = 0; SimpleFunc_firstFree_307 = 0; SimpleFunc_maxIndex_135 = 0; } function main156() { initGlobals103(); init_test530(); } function config180() { } function init_test530() { local integer c500 new_C111(); c_500 = new_C111(); C_y_155[c_500] = 4; dispatch_C_test_C_foo143(c_500); } IS_NATIVE function testSuccess359() { } function C_foo864(integer this110) { local integer clVar163 local integer temp599 temp_599 = this_110; clVar_163 = alloc_SimpleFunc_bar_C_test247(); this_120[clVar_163] = this_110; dispatch_C_test_C_bar211(temp_599, clVar_163); } function C_x121(integer this863) returns integer { return 3; } function C_bar757(integer this352, integer f985) { if (dispatch_SimpleFunc_test_SimpleFunc_apply113(f_985) == 7) { testSuccess359(); } else { }; } function C_init123(integer this153) { } function new_C111() returns integer { local integer this179 this_179 = alloc_C146(); construct_C311(this_179); return this_179; } function construct_C311(integer this464) { C_init123(this_464); } function apply_bar_C_test145(integer this159) returns integer { return (dispatch_C_test_C_x145(this_120[this_159]) + C_y_155[this_120[this_159]]); } function alloc_C146() returns integer { local integer this155 if (C_firstFree_157 == 0) { if (C_maxIndex_203 < 32768) { C_maxIndex_203 = (C_maxIndex_203 + 1); this_155 = C_maxIndex_203; C_typeId_201[this_155] = 1; } else { error189("Out of memory: Could not create C."); this_155 = 0; }; } else { C_firstFree_157 = (C_firstFree_157 - 1); this_155 = C_nextFree_207[C_firstFree_157]; C_typeId_201[this_155] = 1; }; return this_155; } function error189(string msg870) { $debugPrint126((msg_870 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test247() returns integer { local integer this114 if (SimpleFunc_firstFree_307 == 0) { if (SimpleFunc_maxIndex_135 < 32768) { SimpleFunc_maxIndex_135 = (SimpleFunc_maxIndex_135 + 1); this_114 = SimpleFunc_maxIndex_135; SimpleFunc_typeId_251[this_114] = 3; } else { error189("Out of memory: Could not create SimpleFunc_bar_C_test."); this_114 = 0; }; } else { SimpleFunc_firstFree_307 = (SimpleFunc_firstFree_307 - 1); this_114 = SimpleFunc_nextFree_531[SimpleFunc_firstFree_307]; SimpleFunc_typeId_251[this_114] = 3; }; return this_114; } function dispatch_C_test_C_foo143(integer this185) { if (C_typeId_201[this_185] == 0) { if (this_185 == 0) { error189("Nullpointer exception when calling C.foo"); } else { error189("Called C.foo on invalid object."); }; } else { }; C_foo864(this_185); } function dispatch_C_test_C_bar211(integer this119, integer f122) { if (C_typeId_201[this_119] == 0) { if (this_119 == 0) { error189("Nullpointer exception when calling C.bar"); } else { error189("Called C.bar on invalid object."); }; } else { }; C_bar757(this_119, f_122); } function dispatch_C_test_C_x145(integer this408) returns integer { local integer test_C_x_result118 if (C_typeId_201[this_408] == 0) { if (this_408 == 0) { error189("Nullpointer exception when calling C.x"); } else { error189("Called C.x on invalid object."); }; } else { }; test_C_x_result_118 = C_x121(this_408); return test_C_x_result_118; } function dispatch_SimpleFunc_test_SimpleFunc_apply113(integer this137) returns integer { local integer test_SimpleFunc_apply_result173 if (SimpleFunc_typeId_251[this_137] == 0) { if (this_137 == 0) { error189("Nullpointer exception when calling SimpleFunc.apply"); } else { error189("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_173 = apply_bar_C_test145(this_137); return test_SimpleFunc_apply_result_173; }