array A_nextFree458 integer A_firstFree142 integer A_maxIndex190 array A_typeId214 array A_M_i182 integer A_firstFree142 = 0 integer A_maxIndex190 = 0 function initGlobals173() { } function main170() { initGlobals173(); init_Test150(); } function config992() { } function init_Test150() { local integer b904 b_904 = new_B198(); dispatch_A_Test_A_f929(b_904); dispatch_B_Test_B_g147(b_904); if (A_M_i_182[b_904] != 5) { testFail338("foo"); } else { }; testSuccess209(); } IS_NATIVE function testFail338(string message173) { } IS_NATIVE function testSuccess209() { } function A_f109(integer this933) { A_M_i_182[this_933] = (A_M_i_182[this_933] + 1); A_M_i_182[this_933] = (A_M_i_182[this_933] + 1); } function A_init151(integer this493) { A_M_i_182[this_493] = 0; construct_A_M125(this_493); } function construct_A_M125(integer this418) { } function construct_A127(integer this400) { A_init151(this_400); } function B_g114(integer this141) { A_M_i_182[this_141] = (A_M_i_182[this_141] + 1); A_M_i_182[this_141] = (A_M_i_182[this_141] + 1); A_M_i_182[this_141] = (A_M_i_182[this_141] + 1); } function B_init113(integer this176) { } function new_B198() returns integer { local integer this149 this_149 = alloc_B105(); construct_B148(this_149); return this_149; } function construct_B148(integer this120) { construct_A127(this_120); B_init113(this_120); } function error662(string msg120) { $debugPrint125((msg_120 + (" " + #getStackTrace()))); } function alloc_B105() returns integer { local integer this443 if (A_firstFree_142 == 0) { if (A_maxIndex_190 < 32768) { A_maxIndex_190 = (A_maxIndex_190 + 1); this_443 = A_maxIndex_190; A_typeId_214[this_443] = 2; } else { error662("Out of memory: Could not create B."); this_443 = 0; }; } else { A_firstFree_142 = (A_firstFree_142 - 1); this_443 = A_nextFree_458[A_firstFree_142]; A_typeId_214[this_443] = 2; }; return this_443; } function dispatch_A_Test_A_f929(integer this807) { if (A_typeId_214[this_807] == 0) { if (this_807 == 0) { error662("Nullpointer exception when calling A.f"); } else { error662("Called A.f on invalid object."); }; } else { }; A_f109(this_807); } function dispatch_B_Test_B_g147(integer this246) { if (A_typeId_214[this_246] == 0) { if (this_246 == 0) { error662("Nullpointer exception when calling B.g"); } else { error662("Called B.g on invalid object."); }; } else { }; B_g114(this_246); }