integer test_x158 array B_nextFree926 integer B_firstFree143 integer B_maxIndex139 array B_typeId126 array B_y173 integer test_x158 = 2 integer B_firstFree143 = 0 integer B_maxIndex139 = 0 function initGlobals656() { } function main935() { initGlobals656(); init_test888(); } function config988() { } function init_test888() { test_x_158 = 2; dispatch_A_test_A_foo144(new_A147()); if (test_x_158 == 8) { testSuccess197(); } else { }; } IS_NATIVE function testSuccess197() { } function A_foo849(integer this609) { test_x_158 = (test_x_158 + B_y_173[this_609]); B_foo104(this_609); } function A_init201(integer this122) { } function new_A147() returns integer { local integer this306 this_306 = alloc_A179(); construct_A189(this_306); return this_306; } function construct_A189(integer this420) { construct_B112(this_420); A_init201(this_420); } function B_foo104(integer this494) { test_x_158 = (test_x_158 * B_y_173[this_494]); } function B_init108(integer this196) { B_y_173[this_196] = 2; } function construct_B112(integer this165) { B_init108(this_165); } function alloc_A179() returns integer { local integer this707 if (B_firstFree_143 == 0) { if (B_maxIndex_139 < 32768) { B_maxIndex_139 = (B_maxIndex_139 + 1); this_707 = B_maxIndex_139; B_typeId_126[this_707] = 2; } else { error258("Out of memory: Could not create A."); this_707 = 0; }; } else { B_firstFree_143 = (B_firstFree_143 - 1); this_707 = B_nextFree_926[B_firstFree_143]; B_typeId_126[this_707] = 2; }; return this_707; } function error258(string msg185) { $debugPrint160((msg_185 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo144(integer this261) { if (B_typeId_126[this_261] == 0) { if (this_261 == 0) { error258("Nullpointer exception when calling A.foo"); } else { error258("Called A.foo on invalid object."); }; } else { }; A_foo849(this_261); }