integer test_x243 array B_nextFree131 integer B_firstFree183 integer B_maxIndex124 array B_typeId140 array B_y155 integer test_x243 = 2 integer B_firstFree183 = 0 integer B_maxIndex124 = 0 function initGlobals188() { B_firstFree_183 = 0; B_maxIndex_124 = 0; } function main176() { initGlobals188(); init_test140(); } function config117() { } function init_test140() { local integer a127 test_x_243 = 2; a_127 = new_A183(); dispatch_A_test_A_foo630(a_127); if (test_x_243 == 8) { testSuccess111(); } else { }; } IS_NATIVE function testSuccess111() { } function A_foo135(integer this208) { test_x_243 = (test_x_243 + B_y_155[this_208]); B_foo139(this_208); } function A_init121(integer this146) { } function new_A183() returns integer { local integer this126 this_126 = alloc_A122(); construct_A976(this_126); return this_126; } function construct_A976(integer this116) { construct_B142(this_116); A_init121(this_116); } function B_foo139(integer this193) { test_x_243 = (test_x_243 * B_y_155[this_193]); } function B_init204(integer this197) { B_y_155[this_197] = 2; } function construct_B142(integer this148) { B_init204(this_148); } function alloc_A122() returns integer { local integer this186 if (B_firstFree_183 == 0) { if (B_maxIndex_124 < 32768) { B_maxIndex_124 = (B_maxIndex_124 + 1); this_186 = B_maxIndex_124; B_typeId_140[this_186] = 2; } else { error166("Out of memory: Could not create A."); this_186 = 0; }; } else { B_firstFree_183 = (B_firstFree_183 - 1); this_186 = B_nextFree_131[B_firstFree_183]; B_typeId_140[this_186] = 2; }; return this_186; } function error166(string msg382) { $debugPrint154((msg_382 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo630(integer this192) { if (B_typeId_140[this_192] == 0) { if (this_192 == 0) { error166("Nullpointer exception when calling A.foo"); } else { error166("Called A.foo on invalid object."); }; } else { }; A_foo135(this_192); }