array A_nextFree120 integer A_firstFree103 integer A_maxIndex390 array A_typeId208 integer A_firstFree103 = 0 integer A_maxIndex390 = 0 function initGlobals221() { } function main676() { initGlobals221(); init_test111(); } function config942() { } function init_test111() { local integer a197 local integer b131 a_197 = new_A455(); b_131 = new_B704(); dispatch_A_test_A_foo889(a_197, 1, 1); dispatch_B_test_B_foo165(b_131, 1); } function A_foo406(integer this229, integer i233, integer i2145) { } function A_init124(integer this179) { } function new_A455() returns integer { local integer this133 this_133 = alloc_A160(); construct_A170(this_133); return this_133; } function construct_A170(integer this138) { A_init124(this_138); } function B_foo601(integer this195, integer i534) { } function B_init154(integer this854) { } function new_B704() returns integer { local integer this583 this_583 = alloc_B286(); construct_B702(this_583); return this_583; } function construct_B702(integer this428) { construct_A170(this_428); B_init154(this_428); } function alloc_A160() returns integer { local integer this212 if (A_firstFree_103 == 0) { if (A_maxIndex_390 < 32768) { A_maxIndex_390 = (A_maxIndex_390 + 1); this_212 = A_maxIndex_390; A_typeId_208[this_212] = 1; } else { error140("Out of memory: Could not create A."); this_212 = 0; }; } else { A_firstFree_103 = (A_firstFree_103 - 1); this_212 = A_nextFree_120[A_firstFree_103]; A_typeId_208[this_212] = 1; }; return this_212; } function error140(string msg452) { $debugPrint128((msg_452 + (" " + #getStackTrace()))); } function alloc_B286() returns integer { local integer this923 if (A_firstFree_103 == 0) { if (A_maxIndex_390 < 32768) { A_maxIndex_390 = (A_maxIndex_390 + 1); this_923 = A_maxIndex_390; A_typeId_208[this_923] = 2; } else { error140("Out of memory: Could not create B."); this_923 = 0; }; } else { A_firstFree_103 = (A_firstFree_103 - 1); this_923 = A_nextFree_120[A_firstFree_103]; A_typeId_208[this_923] = 2; }; return this_923; } function dispatch_A_test_A_foo889(integer this841, integer i132, integer i2209) { if (A_typeId_208[this_841] == 0) { if (this_841 == 0) { error140("Nullpointer exception when calling A.foo"); } else { error140("Called A.foo on invalid object."); }; } else { }; A_foo406(this_841, i_132, i2_209); } function dispatch_B_test_B_foo165(integer this110, integer i121) { if (A_typeId_208[this_110] == 0) { if (this_110 == 0) { error140("Nullpointer exception when calling B.foo"); } else { error140("Called B.foo on invalid object."); }; } else { }; B_foo601(this_110, i_121); }