array A_nextFree100 integer A_firstFree551 integer A_maxIndex187 array A_typeId131 integer A_firstFree551 = 0 integer A_maxIndex187 = 0 function initGlobals182() { A_firstFree_551 = 0; A_maxIndex_187 = 0; } function main109() { initGlobals182(); init_test416(); } function config666() { } function init_test416() { local integer a141 local integer b680 a_141 = new_A205(); b_680 = new_B334(); dispatch_A_test_A_foo212(a_141, 1, 1); dispatch_B_test_B_foo590(b_680, 1); } function A_foo131(integer this105, integer i758, integer i2468) { } function A_init154(integer this183) { } function new_A205() returns integer { local integer this106 this_106 = alloc_A175(); construct_A650(this_106); return this_106; } function construct_A650(integer this349) { A_init154(this_349); } function B_foo212(integer this161, integer i911) { } function B_init871(integer this541) { } function new_B334() returns integer { local integer this204 this_204 = alloc_B135(); construct_B489(this_204); return this_204; } function construct_B489(integer this711) { construct_A650(this_711); B_init871(this_711); } function alloc_A175() returns integer { local integer this116 if (A_firstFree_551 == 0) { if (A_maxIndex_187 < 32768) { A_maxIndex_187 = (A_maxIndex_187 + 1); this_116 = A_maxIndex_187; A_typeId_131[this_116] = 1; } else { error106("Out of memory: Could not create A."); this_116 = 0; }; } else { A_firstFree_551 = (A_firstFree_551 - 1); this_116 = A_nextFree_100[A_firstFree_551]; A_typeId_131[this_116] = 1; }; return this_116; } function error106(string msg883) { $debugPrint994((msg_883 + (" " + #getStackTrace()))); } function alloc_B135() returns integer { local integer this165 if (A_firstFree_551 == 0) { if (A_maxIndex_187 < 32768) { A_maxIndex_187 = (A_maxIndex_187 + 1); this_165 = A_maxIndex_187; A_typeId_131[this_165] = 2; } else { error106("Out of memory: Could not create B."); this_165 = 0; }; } else { A_firstFree_551 = (A_firstFree_551 - 1); this_165 = A_nextFree_100[A_firstFree_551]; A_typeId_131[this_165] = 2; }; return this_165; } function dispatch_A_test_A_foo212(integer this199, integer i657, integer i2192) { if (A_typeId_131[this_199] == 0) { if (this_199 == 0) { error106("Nullpointer exception when calling A.foo"); } else { error106("Called A.foo on invalid object."); }; } else { }; A_foo131(this_199, i_657, i2_192); } function dispatch_B_test_B_foo590(integer this316, integer i150) { if (A_typeId_131[this_316] == 0) { if (this_316 == 0) { error106("Nullpointer exception when calling B.foo"); } else { error106("Called B.foo on invalid object."); }; } else { }; B_foo212(this_316, i_150); }