array C_nextFree316 integer C_firstFree673 integer C_maxIndex540 array C_typeId570 array SimpleFunc_nextFree193 integer SimpleFunc_firstFree120 integer SimpleFunc_maxIndex297 array SimpleFunc_typeId422 array C_y196 array this148 integer C_firstFree673 = 0 integer C_maxIndex540 = 0 integer SimpleFunc_firstFree120 = 0 integer SimpleFunc_maxIndex297 = 0 function initGlobals201() { } function main158() { initGlobals201(); init_test187(); } function config163() { } function init_test187() { local integer c102 new_C121(); c_102 = new_C121(); C_y_196[c_102] = 4; dispatch_C_test_C_foo149(c_102); } IS_NATIVE function testSuccess284() { } function C_foo498(integer this172) { local integer clVar875 clVar_875 = alloc_SimpleFunc_bar_C_test953(); this_148[clVar_875] = this_172; dispatch_C_test_C_bar965(this_172, clVar_875); } function C_x214(integer this516) returns integer { return 3; } function C_bar834(integer this188, integer f971) { if (dispatch_SimpleFunc_test_SimpleFunc_apply197(f_971) == 7) { testSuccess284(); } else { }; } function C_init165(integer this763) { } function new_C121() returns integer { local integer this147 this_147 = alloc_C153(); construct_C200(this_147); return this_147; } function construct_C200(integer this191) { C_init165(this_191); } function apply_bar_C_test127(integer this201) returns integer { return (dispatch_C_test_C_x138(this_148[this_201]) + C_y_196[this_148[this_201]]); } function alloc_C153() returns integer { local integer this461 if (C_firstFree_673 == 0) { if (C_maxIndex_540 < 32768) { C_maxIndex_540 = (C_maxIndex_540 + 1); this_461 = C_maxIndex_540; C_typeId_570[this_461] = 1; } else { error670("Out of memory: Could not create C."); this_461 = 0; }; } else { C_firstFree_673 = (C_firstFree_673 - 1); this_461 = C_nextFree_316[C_firstFree_673]; C_typeId_570[this_461] = 1; }; return this_461; } function error670(string msg755) { $debugPrint200((msg_755 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test953() returns integer { local integer this169 if (SimpleFunc_firstFree_120 == 0) { if (SimpleFunc_maxIndex_297 < 32768) { SimpleFunc_maxIndex_297 = (SimpleFunc_maxIndex_297 + 1); this_169 = SimpleFunc_maxIndex_297; SimpleFunc_typeId_422[this_169] = 3; } else { error670("Out of memory: Could not create SimpleFunc_bar_C_test."); this_169 = 0; }; } else { SimpleFunc_firstFree_120 = (SimpleFunc_firstFree_120 - 1); this_169 = SimpleFunc_nextFree_193[SimpleFunc_firstFree_120]; SimpleFunc_typeId_422[this_169] = 3; }; return this_169; } function dispatch_C_test_C_foo149(integer this202) { if (C_typeId_570[this_202] == 0) { if (this_202 == 0) { error670("Nullpointer exception when calling C.foo"); } else { error670("Called C.foo on invalid object."); }; } else { }; C_foo498(this_202); } function dispatch_C_test_C_bar965(integer this127, integer f198) { if (C_typeId_570[this_127] == 0) { if (this_127 == 0) { error670("Nullpointer exception when calling C.bar"); } else { error670("Called C.bar on invalid object."); }; } else { }; C_bar834(this_127, f_198); } function dispatch_C_test_C_x138(integer this100) returns integer { if (C_typeId_570[this_100] == 0) { if (this_100 == 0) { error670("Nullpointer exception when calling C.x"); } else { error670("Called C.x on invalid object."); }; } else { }; return C_x214(this_100); } function dispatch_SimpleFunc_test_SimpleFunc_apply197(integer this323) returns integer { if (SimpleFunc_typeId_422[this_323] == 0) { if (this_323 == 0) { error670("Nullpointer exception when calling SimpleFunc.apply"); } else { error670("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_bar_C_test127(this_323); }