array A_nextFree388 integer A_firstFree620 integer A_maxIndex148 array A_typeId633 integer A_firstFree620 = 0 integer A_maxIndex148 = 0 function initGlobals871() { A_firstFree_620 = 0; A_maxIndex_148 = 0; } function main719() { initGlobals871(); init_test374(); } function config117() { } function init_test374() { local integer a128 local integer b198 a_128 = new_A132(); b_198 = new_B176(); dispatch_A_test_A_foo927(a_128, 1, 1); dispatch_B_test_B_foo203(b_198, 1); } function A_foo188(integer this363, integer i153, integer i2188) { } function A_init754(integer this119) { } function new_A132() returns integer { local integer this152 this_152 = alloc_A549(); construct_A880(this_152); return this_152; } function construct_A880(integer this576) { A_init754(this_576); } function B_foo473(integer this262, integer i889) { } function B_init664(integer this120) { } function new_B176() returns integer { local integer this501 this_501 = alloc_B479(); construct_B160(this_501); return this_501; } function construct_B160(integer this288) { construct_A880(this_288); B_init664(this_288); } function alloc_A549() returns integer { local integer this390 if (A_firstFree_620 == 0) { if (A_maxIndex_148 < 32768) { A_maxIndex_148 = (A_maxIndex_148 + 1); this_390 = A_maxIndex_148; A_typeId_633[this_390] = 1; } else { error840("Out of memory: Could not create A."); this_390 = 0; }; } else { A_firstFree_620 = (A_firstFree_620 - 1); this_390 = A_nextFree_388[A_firstFree_620]; A_typeId_633[this_390] = 1; }; return this_390; } function error840(string msg143) { $debugPrint167((msg_143 + (" " + #getStackTrace()))); } function alloc_B479() returns integer { local integer this594 if (A_firstFree_620 == 0) { if (A_maxIndex_148 < 32768) { A_maxIndex_148 = (A_maxIndex_148 + 1); this_594 = A_maxIndex_148; A_typeId_633[this_594] = 2; } else { error840("Out of memory: Could not create B."); this_594 = 0; }; } else { A_firstFree_620 = (A_firstFree_620 - 1); this_594 = A_nextFree_388[A_firstFree_620]; A_typeId_633[this_594] = 2; }; return this_594; } function dispatch_A_test_A_foo927(integer this134, integer i816, integer i2349) { if (A_typeId_633[this_134] == 0) { if (this_134 == 0) { error840("Nullpointer exception when calling A.foo"); } else { error840("Called A.foo on invalid object."); }; } else { }; A_foo188(this_134, i_816, i2_349); } function dispatch_B_test_B_foo203(integer this143, integer i208) { if (A_typeId_633[this_143] == 0) { if (this_143 == 0) { error840("Nullpointer exception when calling B.foo"); } else { error840("Called B.foo on invalid object."); }; } else { }; B_foo473(this_143, i_208); }