integer test_x698 array B_nextFree668 integer B_firstFree870 integer B_maxIndex107 array B_typeId177 array B_y849 integer test_x698 = 2 integer B_firstFree870 = 0 integer B_maxIndex107 = 0 function initGlobals600() { B_firstFree_870 = 0; B_maxIndex_107 = 0; } function main862() { initGlobals600(); init_test986(); } function config113() { } function init_test986() { local integer a104 test_x_698 = 2; a_104 = new_A182(); dispatch_A_test_A_foo212(a_104); if (test_x_698 == 8) { testSuccess874(); } else { }; } IS_NATIVE function testSuccess874() { } function A_foo555(integer this145) { test_x_698 = (test_x_698 + B_y_849[this_145]); B_foo505(this_145); } function A_init174(integer this143) { } function new_A182() returns integer { local integer this189 this_189 = alloc_A161(); construct_A902(this_189); return this_189; } function construct_A902(integer this260) { construct_B101(this_260); A_init174(this_260); } function B_foo505(integer this110) { test_x_698 = (test_x_698 * B_y_849[this_110]); } function B_init688(integer this636) { B_y_849[this_636] = 2; } function construct_B101(integer this212) { B_init688(this_212); } function alloc_A161() returns integer { local integer this100 if (B_firstFree_870 == 0) { if (B_maxIndex_107 < 32768) { B_maxIndex_107 = (B_maxIndex_107 + 1); this_100 = B_maxIndex_107; B_typeId_177[this_100] = 2; } else { error617("Out of memory: Could not create A."); this_100 = 0; }; } else { B_firstFree_870 = (B_firstFree_870 - 1); this_100 = B_nextFree_668[B_firstFree_870]; B_typeId_177[this_100] = 2; }; return this_100; } function error617(string msg274) { $debugPrint248((msg_274 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo212(integer this880) { if (B_typeId_177[this_880] == 0) { if (this_880 == 0) { error617("Nullpointer exception when calling A.foo"); } else { error617("Called A.foo on invalid object."); }; } else { }; A_foo555(this_880); }