integer test_x121 array B_nextFree115 integer B_firstFree115 integer B_maxIndex755 array B_typeId261 array B_y184 integer test_x121 = 2 integer B_firstFree115 = 0 integer B_maxIndex755 = 0 function initGlobals186() { B_firstFree_115 = 0; B_maxIndex_755 = 0; } function main832() { initGlobals186(); init_test198(); } function config514() { } function init_test198() { local integer a140 test_x_121 = 2; a_140 = new_A126(); dispatch_A_test_A_foo619(a_140); if (test_x_121 == 8) { testSuccess180(); } else { }; } IS_NATIVE function testSuccess180() { } function A_foo399(integer this172) { test_x_121 = (test_x_121 + B_y_184[this_172]); B_foo244(this_172); } function A_init862(integer this138) { } function new_A126() returns integer { local integer this612 this_612 = alloc_A172(); construct_A171(this_612); return this_612; } function construct_A171(integer this154) { construct_B136(this_154); A_init862(this_154); } function B_foo244(integer this212) { test_x_121 = (test_x_121 * B_y_184[this_212]); } function B_init522(integer this431) { B_y_184[this_431] = 2; } function construct_B136(integer this796) { B_init522(this_796); } function alloc_A172() returns integer { local integer this207 if (B_firstFree_115 == 0) { if (B_maxIndex_755 < 32768) { B_maxIndex_755 = (B_maxIndex_755 + 1); this_207 = B_maxIndex_755; B_typeId_261[this_207] = 2; } else { error148("Out of memory: Could not create A."); this_207 = 0; }; } else { B_firstFree_115 = (B_firstFree_115 - 1); this_207 = B_nextFree_115[B_firstFree_115]; B_typeId_261[this_207] = 2; }; return this_207; } function error148(string msg127) { $debugPrint674((msg_127 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo619(integer this102) { if (B_typeId_261[this_102] == 0) { if (this_102 == 0) { error148("Nullpointer exception when calling A.foo"); } else { error148("Called A.foo on invalid object."); }; } else { }; A_foo399(this_102); }