array A_nextFree199 integer A_firstFree123 integer A_maxIndex556 array A_typeId214 array B_nextFree772 integer B_firstFree159 integer B_maxIndex192 array B_typeId512 array A_b123 integer A_firstFree123 = 0 integer A_maxIndex556 = 0 integer B_firstFree159 = 0 integer B_maxIndex192 = 0 function initGlobals157() { A_firstFree_123 = 0; A_maxIndex_556 = 0; B_firstFree_159 = 0; B_maxIndex_192 = 0; } function main923() { initGlobals157(); init_test595(); } function config618() { } function init_test595() { local integer a136 a_136 = new_A113(); if (dispatch_A_test_A_get100(a_136) == 1) { testSuccess970(); } else { }; } IS_NATIVE function testSuccess970() { } function A_get142(integer this148) returns integer { return dispatch_B_test_A_B_get722(A_b_123[this_148]); } function A_init196(integer this183) { A_b_123[this_183] = new_B827(); } function new_A113() returns integer { local integer this214 this_214 = alloc_A953(); construct_A839(this_214); return this_214; } function construct_A839(integer this930) { A_init196(this_930); } function B_get170(integer this127) returns integer { return 1; } function new_B827() returns integer { local integer this120 this_120 = alloc_B836(); construct_B946(this_120); return this_120; } function B_init125(integer this184) { } function construct_B946(integer this973) { B_init125(this_973); } function alloc_A953() returns integer { local integer this179 if (A_firstFree_123 == 0) { if (A_maxIndex_556 < 32768) { A_maxIndex_556 = (A_maxIndex_556 + 1); this_179 = A_maxIndex_556; A_typeId_214[this_179] = 1; } else { error190("Out of memory: Could not create A."); this_179 = 0; }; } else { A_firstFree_123 = (A_firstFree_123 - 1); this_179 = A_nextFree_199[A_firstFree_123]; A_typeId_214[this_179] = 1; }; return this_179; } function error190(string msg613) { $debugPrint109((msg_613 + (" " + #getStackTrace()))); } function alloc_B836() returns integer { local integer this190 if (B_firstFree_159 == 0) { if (B_maxIndex_192 < 32768) { B_maxIndex_192 = (B_maxIndex_192 + 1); this_190 = B_maxIndex_192; B_typeId_512[this_190] = 2; } else { error190("Out of memory: Could not create B."); this_190 = 0; }; } else { B_firstFree_159 = (B_firstFree_159 - 1); this_190 = B_nextFree_772[B_firstFree_159]; B_typeId_512[this_190] = 2; }; return this_190; } function dispatch_A_test_A_get100(integer this899) returns integer { local integer test_A_get_result383 if (A_typeId_214[this_899] == 0) { if (this_899 == 0) { error190("Nullpointer exception when calling A.get"); } else { error190("Called A.get on invalid object."); }; } else { }; test_A_get_result_383 = A_get142(this_899); return test_A_get_result_383; } function dispatch_B_test_A_B_get722(integer this147) returns integer { local integer test_A_B_get_result134 if (B_typeId_512[this_147] == 0) { if (this_147 == 0) { error190("Nullpointer exception when calling B.get"); } else { error190("Called B.get on invalid object."); }; } else { }; test_A_B_get_result_134 = B_get170(this_147); return test_A_B_get_result_134; }