array A_nextFree568 integer A_firstFree174 integer A_maxIndex718 array A_typeId100 array B_nextFree755 integer B_firstFree194 integer B_maxIndex127 array B_typeId598 integer A_firstFree174 = 0 integer A_maxIndex718 = 0 integer B_firstFree194 = 0 integer B_maxIndex127 = 0 function initGlobals853() { A_firstFree_174 = 0; A_maxIndex_718 = 0; B_firstFree_194 = 0; B_maxIndex_127 = 0; } function main588() { initGlobals853(); init_test178(); } function config149() { } function init_test178() { local integer i207 i_207 = dispatch_A_test_A_bar269(new_A730()); if (i_207 == 42) { testSuccess102(); } else { }; } IS_NATIVE function testSuccess102() { } function A_bar200(integer this123) returns integer { local integer b931 b_931 = new_B718(); return ((dispatch_B_test_A_B_foo817(b_931) * 10) + 2); } function A_init965(integer this141) { } function new_A730() returns integer { local integer this171 this_171 = alloc_A938(); construct_A387(this_171); return this_171; } function construct_A387(integer this150) { A_init965(this_150); } function new_B718() returns integer { local integer this856 this_856 = alloc_B171(); construct_B110(this_856); return this_856; } function B_foo574(integer this206) returns integer { return 4; } function B_init105(integer this753) { } function construct_B110(integer this193) { B_init105(this_193); } function alloc_A938() returns integer { local integer this797 if (A_firstFree_174 == 0) { if (A_maxIndex_718 < 32768) { A_maxIndex_718 = (A_maxIndex_718 + 1); this_797 = A_maxIndex_718; A_typeId_100[this_797] = 1; } else { error887("Out of memory: Could not create A."); this_797 = 0; }; } else { A_firstFree_174 = (A_firstFree_174 - 1); this_797 = A_nextFree_568[A_firstFree_174]; A_typeId_100[this_797] = 1; }; return this_797; } function error887(string msg173) { $debugPrint183((msg_173 + (" " + #getStackTrace()))); } function alloc_B171() returns integer { local integer this166 if (B_firstFree_194 == 0) { if (B_maxIndex_127 < 32768) { B_maxIndex_127 = (B_maxIndex_127 + 1); this_166 = B_maxIndex_127; B_typeId_598[this_166] = 2; } else { error887("Out of memory: Could not create B."); this_166 = 0; }; } else { B_firstFree_194 = (B_firstFree_194 - 1); this_166 = B_nextFree_755[B_firstFree_194]; B_typeId_598[this_166] = 2; }; return this_166; } function dispatch_A_test_A_bar269(integer this203) returns integer { local integer test_A_bar_result786 if (A_typeId_100[this_203] == 0) { if (this_203 == 0) { error887("Nullpointer exception when calling A.bar"); } else { error887("Called A.bar on invalid object."); }; } else { }; test_A_bar_result_786 = A_bar200(this_203); return test_A_bar_result_786; } function dispatch_B_test_A_B_foo817(integer this130) returns integer { local integer test_A_B_foo_result125 if (B_typeId_598[this_130] == 0) { if (this_130 == 0) { error887("Nullpointer exception when calling B.foo"); } else { error887("Called B.foo on invalid object."); }; } else { }; test_A_B_foo_result_125 = B_foo574(this_130); return test_A_B_foo_result_125; }