array A_nextFree109 integer A_firstFree736 integer A_maxIndex159 array A_typeId180 array B_nextFree571 integer B_firstFree630 integer B_maxIndex775 array B_typeId187 array A_b435 integer A_firstFree736 = 0 integer A_maxIndex159 = 0 integer B_firstFree630 = 0 integer B_maxIndex775 = 0 function initGlobals176() { A_firstFree_736 = 0; A_maxIndex_159 = 0; B_firstFree_630 = 0; B_maxIndex_775 = 0; } function main109() { initGlobals176(); init_test154(); } function config158() { } function init_test154() { local integer a153 a_153 = new_A104(); if (dispatch_A_test_A_get207(a_153) == 1) { testSuccess168(); } else { }; } IS_NATIVE function testSuccess168() { } function A_get135(integer this183) returns integer { return dispatch_B_test_A_B_get319(A_b_435[this_183]); } function A_init139(integer this883) { A_b_435[this_883] = new_B725(); } function new_A104() returns integer { local integer this201 this_201 = alloc_A571(); construct_A664(this_201); return this_201; } function construct_A664(integer this282) { A_init139(this_282); } function B_get862(integer this186) returns integer { return 1; } function new_B725() returns integer { local integer this886 this_886 = alloc_B138(); construct_B466(this_886); return this_886; } function B_init899(integer this200) { } function construct_B466(integer this554) { B_init899(this_554); } function alloc_A571() returns integer { local integer this685 if (A_firstFree_736 == 0) { if (A_maxIndex_159 < 32768) { A_maxIndex_159 = (A_maxIndex_159 + 1); this_685 = A_maxIndex_159; A_typeId_180[this_685] = 1; } else { error167("Out of memory: Could not create A."); this_685 = 0; }; } else { A_firstFree_736 = (A_firstFree_736 - 1); this_685 = A_nextFree_109[A_firstFree_736]; A_typeId_180[this_685] = 1; }; return this_685; } function error167(string msg237) { $debugPrint136((msg_237 + (" " + #getStackTrace()))); } function alloc_B138() returns integer { local integer this111 if (B_firstFree_630 == 0) { if (B_maxIndex_775 < 32768) { B_maxIndex_775 = (B_maxIndex_775 + 1); this_111 = B_maxIndex_775; B_typeId_187[this_111] = 2; } else { error167("Out of memory: Could not create B."); this_111 = 0; }; } else { B_firstFree_630 = (B_firstFree_630 - 1); this_111 = B_nextFree_571[B_firstFree_630]; B_typeId_187[this_111] = 2; }; return this_111; } function dispatch_A_test_A_get207(integer this250) returns integer { local integer test_A_get_result107 if (A_typeId_180[this_250] == 0) { if (this_250 == 0) { error167("Nullpointer exception when calling A.get"); } else { error167("Called A.get on invalid object."); }; } else { }; test_A_get_result_107 = A_get135(this_250); return test_A_get_result_107; } function dispatch_B_test_A_B_get319(integer this149) returns integer { local integer test_A_B_get_result138 if (B_typeId_187[this_149] == 0) { if (this_149 == 0) { error167("Nullpointer exception when calling B.get"); } else { error167("Called B.get on invalid object."); }; } else { }; test_A_B_get_result_138 = B_get862(this_149); return test_A_B_get_result_138; }