integer test_i186 array A_nextFree183 integer A_firstFree135 integer A_maxIndex515 array A_typeId160 integer A_firstFree135 = 0 integer A_maxIndex515 = 0 function initGlobals144() { A_firstFree_135 = 0; A_maxIndex_515 = 0; } function main195() { initGlobals144(); init_test157(); } function config545() { } function init_test157() { local integer b117 b_117 = new_B196(); dispatch_A_test_A_foo109(b_117); if (test_i_186 == 8) { testSuccess210(); } else { }; } IS_NATIVE function testSuccess210() { } function A_init538(integer this939) { } function construct_A110(integer this558) { A_init538(this_558); } function B_foo974(integer this731) { test_i_186 = 8; } function B_init360(integer this205) { } function new_B196() returns integer { local integer this189 this_189 = alloc_B202(); construct_B907(this_189); return this_189; } function construct_B907(integer this183) { construct_A110(this_183); B_init360(this_183); } function error997(string msg234) { $debugPrint534((msg_234 + (" " + #getStackTrace()))); } function alloc_B202() returns integer { local integer this167 if (A_firstFree_135 == 0) { if (A_maxIndex_515 < 32768) { A_maxIndex_515 = (A_maxIndex_515 + 1); this_167 = A_maxIndex_515; A_typeId_160[this_167] = 2; } else { error997("Out of memory: Could not create B."); this_167 = 0; }; } else { A_firstFree_135 = (A_firstFree_135 - 1); this_167 = A_nextFree_183[A_firstFree_135]; A_typeId_160[this_167] = 2; }; return this_167; } function dispatch_A_test_A_foo109(integer this873) { if (A_typeId_160[this_873] == 0) { if (this_873 == 0) { error997("Nullpointer exception when calling A.foo"); } else { error997("Called A.foo on invalid object."); }; } else { }; B_foo974(this_873); }