array A_nextFree194 integer A_firstFree162 integer A_maxIndex546 array A_typeId136 array B_nextFree392 integer B_firstFree134 integer B_maxIndex925 array B_typeId112 integer A_firstFree162 = 0 integer A_maxIndex546 = 0 integer B_firstFree134 = 0 integer B_maxIndex925 = 0 function initGlobals105() { } function main457() { initGlobals105(); init_test197(); } function config856() { } function init_test197() { if (dispatch_A_test_A_M_bar202(new_A224()) == 42) { testSuccess160(); } else { }; } IS_NATIVE function testSuccess160() { } function A_M_bar167(integer this214) returns integer { return ((dispatch_B_test_A_M_B_foo802(new_B374()) * 10) + 2); } function A_init151(integer this144) { construct_A_M109(this_144); } function construct_A_M109(integer this150) { } function new_A224() returns integer { local integer this141 this_141 = alloc_A186(); construct_A540(this_141); return this_141; } function construct_A540(integer this410) { A_init151(this_410); } function new_B374() returns integer { local integer this517 this_517 = alloc_B153(); construct_B141(this_517); return this_517; } function B_foo183(integer this180) returns integer { return 4; } function B_init939(integer this912) { } function construct_B141(integer this194) { B_init939(this_194); } function alloc_A186() returns integer { local integer this192 if (A_firstFree_162 == 0) { if (A_maxIndex_546 < 32768) { A_maxIndex_546 = (A_maxIndex_546 + 1); this_192 = A_maxIndex_546; A_typeId_136[this_192] = 1; } else { error233("Out of memory: Could not create A."); this_192 = 0; }; } else { A_firstFree_162 = (A_firstFree_162 - 1); this_192 = A_nextFree_194[A_firstFree_162]; A_typeId_136[this_192] = 1; }; return this_192; } function error233(string msg671) { $debugPrint382((msg_671 + (" " + #getStackTrace()))); } function alloc_B153() returns integer { local integer this901 if (B_firstFree_134 == 0) { if (B_maxIndex_925 < 32768) { B_maxIndex_925 = (B_maxIndex_925 + 1); this_901 = B_maxIndex_925; B_typeId_112[this_901] = 2; } else { error233("Out of memory: Could not create B."); this_901 = 0; }; } else { B_firstFree_134 = (B_firstFree_134 - 1); this_901 = B_nextFree_392[B_firstFree_134]; B_typeId_112[this_901] = 2; }; return this_901; } function dispatch_A_test_A_M_bar202(integer this193) returns integer { if (A_typeId_136[this_193] == 0) { if (this_193 == 0) { error233("Nullpointer exception when calling A.bar"); } else { error233("Called A.bar on invalid object."); }; } else { }; return A_M_bar167(this_193); } function dispatch_B_test_A_M_B_foo802(integer this954) returns integer { if (B_typeId_112[this_954] == 0) { if (this_954 == 0) { error233("Nullpointer exception when calling B.foo"); } else { error233("Called B.foo on invalid object."); }; } else { }; return B_foo183(this_954); }