array A_nextFree163 integer A_firstFree680 integer A_maxIndex447 array A_typeId168 integer A_firstFree680 = 0 integer A_maxIndex447 = 0 function initGlobals152() { } function main708() { initGlobals152(); init_test155(); } function config198() { } function init_test155() { local integer a243 local integer b724 a_243 = new_A125(); b_724 = new_B182(); dispatch_A_test_A_foo808(a_243, 1, 1); dispatch_B_test_B_foo210(b_724, 1); } function A_foo190(integer this194, integer i258, integer i2726) { } function A_init213(integer this196) { } function new_A125() returns integer { local integer this138 this_138 = alloc_A603(); construct_A338(this_138); return this_138; } function construct_A338(integer this142) { A_init213(this_142); } function B_foo121(integer this388, integer i137) { } function B_init170(integer this102) { } function new_B182() returns integer { local integer this126 this_126 = alloc_B132(); construct_B581(this_126); return this_126; } function construct_B581(integer this748) { construct_A338(this_748); B_init170(this_748); } function alloc_A603() returns integer { local integer this543 if (A_firstFree_680 == 0) { if (A_maxIndex_447 < 32768) { A_maxIndex_447 = (A_maxIndex_447 + 1); this_543 = A_maxIndex_447; A_typeId_168[this_543] = 1; } else { error144("Out of memory: Could not create A."); this_543 = 0; }; } else { A_firstFree_680 = (A_firstFree_680 - 1); this_543 = A_nextFree_163[A_firstFree_680]; A_typeId_168[this_543] = 1; }; return this_543; } function error144(string msg594) { $debugPrint135((msg_594 + (" " + #getStackTrace()))); } function alloc_B132() returns integer { local integer this513 if (A_firstFree_680 == 0) { if (A_maxIndex_447 < 32768) { A_maxIndex_447 = (A_maxIndex_447 + 1); this_513 = A_maxIndex_447; A_typeId_168[this_513] = 2; } else { error144("Out of memory: Could not create B."); this_513 = 0; }; } else { A_firstFree_680 = (A_firstFree_680 - 1); this_513 = A_nextFree_163[A_firstFree_680]; A_typeId_168[this_513] = 2; }; return this_513; } function dispatch_A_test_A_foo808(integer this584, integer i194, integer i2111) { if (A_typeId_168[this_584] == 0) { if (this_584 == 0) { error144("Nullpointer exception when calling A.foo"); } else { error144("Called A.foo on invalid object."); }; } else { }; A_foo190(this_584, i_194, i2_111); } function dispatch_B_test_B_foo210(integer this194, integer i136) { if (A_typeId_168[this_194] == 0) { if (this_194 == 0) { error144("Nullpointer exception when calling B.foo"); } else { error144("Called B.foo on invalid object."); }; } else { }; B_foo121(this_194, i_136); }