array A_nextFree183 integer A_firstFree166 integer A_maxIndex107 array A_typeId148 integer A_firstFree166 = 0 integer A_maxIndex107 = 0 function initGlobals180() { } function main632() { initGlobals180(); init_test176(); } function config752() { } function init_test176() { local integer a103 local integer b454 a_103 = new_A202(); b_454 = new_B796(); dispatch_A_test_A_foo332(a_103, 1, 1); dispatch_B_test_B_foo547(b_454, 1); } function A_foo318(integer this169, integer i130, integer i2393) { } function A_init197(integer this393) { } function new_A202() returns integer { local integer this379 this_379 = alloc_A482(); construct_A209(this_379); return this_379; } function construct_A209(integer this463) { A_init197(this_463); } function B_foo868(integer this106, integer i117) { } function B_init505(integer this254) { } function new_B796() returns integer { local integer this177 this_177 = alloc_B243(); construct_B176(this_177); return this_177; } function construct_B176(integer this194) { construct_A209(this_194); B_init505(this_194); } function alloc_A482() returns integer { local integer this965 if (A_firstFree_166 == 0) { if (A_maxIndex_107 < 32768) { A_maxIndex_107 = (A_maxIndex_107 + 1); this_965 = A_maxIndex_107; A_typeId_148[this_965] = 1; } else { error167("Out of memory: Could not create A."); this_965 = 0; }; } else { A_firstFree_166 = (A_firstFree_166 - 1); this_965 = A_nextFree_183[A_firstFree_166]; A_typeId_148[this_965] = 1; }; return this_965; } function error167(string msg149) { $debugPrint911((msg_149 + (" " + #getStackTrace()))); } function alloc_B243() returns integer { local integer this674 if (A_firstFree_166 == 0) { if (A_maxIndex_107 < 32768) { A_maxIndex_107 = (A_maxIndex_107 + 1); this_674 = A_maxIndex_107; A_typeId_148[this_674] = 2; } else { error167("Out of memory: Could not create B."); this_674 = 0; }; } else { A_firstFree_166 = (A_firstFree_166 - 1); this_674 = A_nextFree_183[A_firstFree_166]; A_typeId_148[this_674] = 2; }; return this_674; } function dispatch_A_test_A_foo332(integer this555, integer i301, integer i2176) { if (A_typeId_148[this_555] == 0) { if (this_555 == 0) { error167("Nullpointer exception when calling A.foo"); } else { error167("Called A.foo on invalid object."); }; } else { }; A_foo318(this_555, i_301, i2_176); } function dispatch_B_test_B_foo547(integer this907, integer i170) { if (A_typeId_148[this_907] == 0) { if (this_907 == 0) { error167("Nullpointer exception when calling B.foo"); } else { error167("Called B.foo on invalid object."); }; } else { }; B_foo868(this_907, i_170); }