array A_nextFree151 integer A_firstFree685 integer A_maxIndex970 array A_typeId141 array B_nextFree915 integer B_firstFree187 integer B_maxIndex536 array B_typeId202 integer A_firstFree685 = 0 integer A_maxIndex970 = 0 integer B_firstFree187 = 0 integer B_maxIndex536 = 0 function initGlobals634() { A_firstFree_685 = 0; A_maxIndex_970 = 0; B_firstFree_187 = 0; B_maxIndex_536 = 0; } function main463() { initGlobals634(); init_test129(); } function config127() { } function init_test129() { local integer i168 i_168 = dispatch_A_test_A_M_bar774(new_A183()); if (i_168 == 42) { testSuccess170(); } else { }; } IS_NATIVE function testSuccess170() { } function A_M_bar128(integer this152) returns integer { local integer b832 b_832 = new_B588(); return ((dispatch_B_test_A_M_B_foo126(b_832) * 10) + 2); } function A_init133(integer this886) { construct_A_M205(this_886); } function construct_A_M205(integer this120) { } function new_A183() returns integer { local integer this191 this_191 = alloc_A774(); construct_A200(this_191); return this_191; } function construct_A200(integer this190) { A_init133(this_190); } function new_B588() returns integer { local integer this206 this_206 = alloc_B145(); construct_B686(this_206); return this_206; } function B_foo924(integer this153) returns integer { return 4; } function B_init104(integer this141) { } function construct_B686(integer this163) { B_init104(this_163); } function alloc_A774() returns integer { local integer this629 if (A_firstFree_685 == 0) { if (A_maxIndex_970 < 32768) { A_maxIndex_970 = (A_maxIndex_970 + 1); this_629 = A_maxIndex_970; A_typeId_141[this_629] = 1; } else { error208("Out of memory: Could not create A."); this_629 = 0; }; } else { A_firstFree_685 = (A_firstFree_685 - 1); this_629 = A_nextFree_151[A_firstFree_685]; A_typeId_141[this_629] = 1; }; return this_629; } function error208(string msg103) { $debugPrint587((msg_103 + (" " + #getStackTrace()))); } function alloc_B145() returns integer { local integer this126 if (B_firstFree_187 == 0) { if (B_maxIndex_536 < 32768) { B_maxIndex_536 = (B_maxIndex_536 + 1); this_126 = B_maxIndex_536; B_typeId_202[this_126] = 2; } else { error208("Out of memory: Could not create B."); this_126 = 0; }; } else { B_firstFree_187 = (B_firstFree_187 - 1); this_126 = B_nextFree_915[B_firstFree_187]; B_typeId_202[this_126] = 2; }; return this_126; } function dispatch_A_test_A_M_bar774(integer this119) returns integer { local integer test_A_M_bar_result141 if (A_typeId_141[this_119] == 0) { if (this_119 == 0) { error208("Nullpointer exception when calling A.bar"); } else { error208("Called A.bar on invalid object."); }; } else { }; test_A_M_bar_result_141 = A_M_bar128(this_119); return test_A_M_bar_result_141; } function dispatch_B_test_A_M_B_foo126(integer this184) returns integer { local integer test_A_M_B_foo_result122 if (B_typeId_202[this_184] == 0) { if (this_184 == 0) { error208("Nullpointer exception when calling B.foo"); } else { error208("Called B.foo on invalid object."); }; } else { }; test_A_M_B_foo_result_122 = B_foo924(this_184); return test_A_M_B_foo_result_122; }