integer test_x107 array B_nextFree178 integer B_firstFree397 integer B_maxIndex147 array B_typeId268 array B_y175 integer test_x107 = 2 integer B_firstFree397 = 0 integer B_maxIndex147 = 0 function initGlobals930() { B_firstFree_397 = 0; B_maxIndex_147 = 0; } function main113() { initGlobals930(); init_test161(); } function config201() { } function init_test161() { local integer a170 test_x_107 = 2; a_170 = new_A974(); dispatch_A_test_A_foo821(a_170); if (test_x_107 == 8) { testSuccess121(); } else { }; } IS_NATIVE function testSuccess121() { } function A_foo158(integer this570) { test_x_107 = (test_x_107 + B_y_175[this_570]); B_foo466(this_570); } function A_init449(integer this638) { } function new_A974() returns integer { local integer this590 this_590 = alloc_A161(); construct_A861(this_590); return this_590; } function construct_A861(integer this201) { construct_B118(this_201); A_init449(this_201); } function B_foo466(integer this489) { test_x_107 = (test_x_107 * B_y_175[this_489]); } function B_init554(integer this102) { B_y_175[this_102] = 2; } function construct_B118(integer this680) { B_init554(this_680); } function alloc_A161() returns integer { local integer this161 if (B_firstFree_397 == 0) { if (B_maxIndex_147 < 32768) { B_maxIndex_147 = (B_maxIndex_147 + 1); this_161 = B_maxIndex_147; B_typeId_268[this_161] = 2; } else { error450("Out of memory: Could not create A."); this_161 = 0; }; } else { B_firstFree_397 = (B_firstFree_397 - 1); this_161 = B_nextFree_178[B_firstFree_397]; B_typeId_268[this_161] = 2; }; return this_161; } function error450(string msg192) { $debugPrint796((msg_192 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo821(integer this162) { if (B_typeId_268[this_162] == 0) { if (this_162 == 0) { error450("Nullpointer exception when calling A.foo"); } else { error450("Called A.foo on invalid object."); }; } else { }; A_foo158(this_162); }