array A_nextFree169 integer A_firstFree127 integer A_maxIndex214 array A_typeId711 integer A_firstFree127 = 0 integer A_maxIndex214 = 0 function initGlobals102() { A_firstFree_127 = 0; A_maxIndex_214 = 0; } function main153() { initGlobals102(); init_test114(); } function config118() { } function init_test114() { local integer a333 local integer b116 a_333 = new_A147(); b_116 = new_B745(); dispatch_A_test_A_foo121(a_333, 1, 1); dispatch_B_test_B_foo191(b_116, 1); } function A_foo887(integer this721, integer i227, integer i2188) { } function A_init707(integer this174) { } function new_A147() returns integer { local integer this124 this_124 = alloc_A340(); construct_A105(this_124); return this_124; } function construct_A105(integer this321) { A_init707(this_321); } function B_foo725(integer this406, integer i447) { } function B_init178(integer this131) { } function new_B745() returns integer { local integer this479 this_479 = alloc_B853(); construct_B102(this_479); return this_479; } function construct_B102(integer this589) { construct_A105(this_589); B_init178(this_589); } function alloc_A340() returns integer { local integer this715 if (A_firstFree_127 == 0) { if (A_maxIndex_214 < 32768) { A_maxIndex_214 = (A_maxIndex_214 + 1); this_715 = A_maxIndex_214; A_typeId_711[this_715] = 1; } else { error108("Out of memory: Could not create A."); this_715 = 0; }; } else { A_firstFree_127 = (A_firstFree_127 - 1); this_715 = A_nextFree_169[A_firstFree_127]; A_typeId_711[this_715] = 1; }; return this_715; } function error108(string msg112) { $debugPrint118((msg_112 + (" " + #getStackTrace()))); } function alloc_B853() returns integer { local integer this209 if (A_firstFree_127 == 0) { if (A_maxIndex_214 < 32768) { A_maxIndex_214 = (A_maxIndex_214 + 1); this_209 = A_maxIndex_214; A_typeId_711[this_209] = 2; } else { error108("Out of memory: Could not create B."); this_209 = 0; }; } else { A_firstFree_127 = (A_firstFree_127 - 1); this_209 = A_nextFree_169[A_firstFree_127]; A_typeId_711[this_209] = 2; }; return this_209; } function dispatch_A_test_A_foo121(integer this189, integer i119, integer i2156) { if (A_typeId_711[this_189] == 0) { if (this_189 == 0) { error108("Nullpointer exception when calling A.foo"); } else { error108("Called A.foo on invalid object."); }; } else { }; A_foo887(this_189, i_119, i2_156); } function dispatch_B_test_B_foo191(integer this260, integer i473) { if (A_typeId_711[this_260] == 0) { if (this_260 == 0) { error108("Nullpointer exception when calling B.foo"); } else { error108("Called B.foo on invalid object."); }; } else { }; B_foo725(this_260, i_473); }