array A_nextFree305 integer A_firstFree419 integer A_maxIndex361 array A_typeId168 array B_nextFree166 integer B_firstFree769 integer B_maxIndex812 array B_typeId152 integer A_firstFree419 = 0 integer A_maxIndex361 = 0 integer B_firstFree769 = 0 integer B_maxIndex812 = 0 function initGlobals155() { } function main226() { initGlobals155(); init_test131(); } function config173() { } function init_test131() { if (dispatch_A_test_A_bar118(new_A113()) == 42) { testSuccess592(); } else { }; } IS_NATIVE function testSuccess592() { } function A_bar970(integer this133) returns integer { return ((dispatch_B_test_A_B_foo141(new_B430()) * 10) + 2); } function A_init175(integer this202) { } function new_A113() returns integer { local integer this146 this_146 = alloc_A144(); construct_A119(this_146); return this_146; } function construct_A119(integer this562) { A_init175(this_562); } function new_B430() returns integer { local integer this193 this_193 = alloc_B683(); construct_B517(this_193); return this_193; } function B_foo340(integer this753) returns integer { return 4; } function B_init133(integer this171) { } function construct_B517(integer this881) { B_init133(this_881); } function alloc_A144() returns integer { local integer this136 if (A_firstFree_419 == 0) { if (A_maxIndex_361 < 32768) { A_maxIndex_361 = (A_maxIndex_361 + 1); this_136 = A_maxIndex_361; A_typeId_168[this_136] = 1; } else { error168("Out of memory: Could not create A."); this_136 = 0; }; } else { A_firstFree_419 = (A_firstFree_419 - 1); this_136 = A_nextFree_305[A_firstFree_419]; A_typeId_168[this_136] = 1; }; return this_136; } function error168(string msg201) { $debugPrint152((msg_201 + (" " + #getStackTrace()))); } function alloc_B683() returns integer { local integer this742 if (B_firstFree_769 == 0) { if (B_maxIndex_812 < 32768) { B_maxIndex_812 = (B_maxIndex_812 + 1); this_742 = B_maxIndex_812; B_typeId_152[this_742] = 2; } else { error168("Out of memory: Could not create B."); this_742 = 0; }; } else { B_firstFree_769 = (B_firstFree_769 - 1); this_742 = B_nextFree_166[B_firstFree_769]; B_typeId_152[this_742] = 2; }; return this_742; } function dispatch_A_test_A_bar118(integer this167) returns integer { if (A_typeId_168[this_167] == 0) { if (this_167 == 0) { error168("Nullpointer exception when calling A.bar"); } else { error168("Called A.bar on invalid object."); }; } else { }; return A_bar970(this_167); } function dispatch_B_test_A_B_foo141(integer this162) returns integer { if (B_typeId_152[this_162] == 0) { if (this_162 == 0) { error168("Nullpointer exception when calling B.foo"); } else { error168("Called B.foo on invalid object."); }; } else { }; return B_foo340(this_162); }