integer test_x601 array A_nextFree416 integer A_firstFree411 integer A_maxIndex945 array A_typeId177 integer test_x601 = 2 integer A_firstFree411 = 0 integer A_maxIndex945 = 0 function initGlobals799() { A_firstFree_411 = 0; A_maxIndex_945 = 0; } function main164() { initGlobals799(); init_test260(); } function config732() { } function init_test260() { local integer a453 test_x_601 = 2; a_453 = new_B152(); dispatch_A_test_A_foo644(a_453); if (test_x_601 == 5) { testSuccess196(); } else { }; } IS_NATIVE function testSuccess196() { } function A_foo674(integer this129) { test_x_601 = 4; } function A_init136(integer this779) { } function construct_A195(integer this431) { A_init136(this_431); } function B_foo119(integer this146) { test_x_601 = 5; } function B_init137(integer this933) { } function new_B152() returns integer { local integer this388 this_388 = alloc_B103(); construct_B163(this_388); return this_388; } function construct_B163(integer this334) { construct_A195(this_334); B_init137(this_334); } function C_foo908(integer this412) { test_x_601 = 6; } function error151(string msg996) { $debugPrint181((msg_996 + (" " + #getStackTrace()))); } function alloc_B103() returns integer { local integer this183 if (A_firstFree_411 == 0) { if (A_maxIndex_945 < 32768) { A_maxIndex_945 = (A_maxIndex_945 + 1); this_183 = A_maxIndex_945; A_typeId_177[this_183] = 2; } else { error151("Out of memory: Could not create B."); this_183 = 0; }; } else { A_firstFree_411 = (A_firstFree_411 - 1); this_183 = A_nextFree_416[A_firstFree_411]; A_typeId_177[this_183] = 2; }; return this_183; } function dispatch_A_test_A_foo644(integer this189) { if (A_typeId_177[this_189] == 0) { if (this_189 == 0) { error151("Nullpointer exception when calling A.foo"); } else { error151("Called A.foo on invalid object."); }; } else { }; if (A_typeId_177[this_189] <= 2) { if (A_typeId_177[this_189] <= 1) { A_foo674(this_189); } else { B_foo119(this_189); }; } else { C_foo908(this_189); }; }