array A_nextFree277 integer A_firstFree130 integer A_maxIndex179 array A_typeId103 array B_nextFree985 integer B_firstFree180 integer B_maxIndex131 array B_typeId161 integer A_firstFree130 = 0 integer A_maxIndex179 = 0 integer B_firstFree180 = 0 integer B_maxIndex131 = 0 function initGlobals146() { A_firstFree_130 = 0; A_maxIndex_179 = 0; B_firstFree_180 = 0; B_maxIndex_131 = 0; } function main156() { initGlobals146(); init_test159(); } function config205() { } function init_test159() { local integer i139 i_139 = dispatch_A_test_A_M_bar139(new_A190()); if (i_139 == 42) { testSuccess174(); } else { }; } IS_NATIVE function testSuccess174() { } function A_M_bar150(integer this124) returns integer { local integer b525 b_525 = new_B483(); return ((dispatch_B_test_A_M_B_foo200(b_525) * 10) + 2); } function A_init180(integer this121) { construct_A_M803(this_121); } function construct_A_M803(integer this963) { } function new_A190() returns integer { local integer this671 this_671 = alloc_A160(); construct_A670(this_671); return this_671; } function construct_A670(integer this860) { A_init180(this_860); } function new_B483() returns integer { local integer this371 this_371 = alloc_B164(); construct_B145(this_371); return this_371; } function B_foo212(integer this967) returns integer { return 4; } function B_init305(integer this492) { } function construct_B145(integer this704) { B_init305(this_704); } function alloc_A160() returns integer { local integer this424 if (A_firstFree_130 == 0) { if (A_maxIndex_179 < 32768) { A_maxIndex_179 = (A_maxIndex_179 + 1); this_424 = A_maxIndex_179; A_typeId_103[this_424] = 1; } else { error129("Out of memory: Could not create A."); this_424 = 0; }; } else { A_firstFree_130 = (A_firstFree_130 - 1); this_424 = A_nextFree_277[A_firstFree_130]; A_typeId_103[this_424] = 1; }; return this_424; } function error129(string msg114) { $debugPrint112((msg_114 + (" " + #getStackTrace()))); } function alloc_B164() returns integer { local integer this644 if (B_firstFree_180 == 0) { if (B_maxIndex_131 < 32768) { B_maxIndex_131 = (B_maxIndex_131 + 1); this_644 = B_maxIndex_131; B_typeId_161[this_644] = 2; } else { error129("Out of memory: Could not create B."); this_644 = 0; }; } else { B_firstFree_180 = (B_firstFree_180 - 1); this_644 = B_nextFree_985[B_firstFree_180]; B_typeId_161[this_644] = 2; }; return this_644; } function dispatch_A_test_A_M_bar139(integer this185) returns integer { local integer test_A_M_bar_result152 if (A_typeId_103[this_185] == 0) { if (this_185 == 0) { error129("Nullpointer exception when calling A.bar"); } else { error129("Called A.bar on invalid object."); }; } else { }; test_A_M_bar_result_152 = A_M_bar150(this_185); return test_A_M_bar_result_152; } function dispatch_B_test_A_M_B_foo200(integer this173) returns integer { local integer test_A_M_B_foo_result191 if (B_typeId_161[this_173] == 0) { if (this_173 == 0) { error129("Nullpointer exception when calling B.foo"); } else { error129("Called B.foo on invalid object."); }; } else { }; test_A_M_B_foo_result_191 = B_foo212(this_173); return test_A_M_B_foo_result_191; }