integer test_i204 array A_nextFree895 integer A_firstFree112 integer A_maxIndex557 array A_typeId123 integer A_firstFree112 = 0 integer A_maxIndex557 = 0 function initGlobals157() { A_firstFree_112 = 0; A_maxIndex_557 = 0; } function main209() { initGlobals157(); init_test379(); } function config149() { } function init_test379() { local integer b560 b_560 = new_B132(); if (dispatch_A_test_A_foo150(b_560) == 8) { testSuccess180(); } else { }; } IS_NATIVE function testSuccess180() { } function A_init191(integer this149) { } function construct_A302(integer this345) { A_init191(this_345); } function B_foo110(integer this174) returns integer { test_i_204 = 8; return test_i_204; } function B_init849(integer this153) { } function new_B132() returns integer { local integer this478 this_478 = alloc_B190(); construct_B951(this_478); return this_478; } function construct_B951(integer this110) { construct_A302(this_110); B_init849(this_110); } function error966(string msg161) { $debugPrint166((msg_161 + (" " + #getStackTrace()))); } function alloc_B190() returns integer { local integer this499 if (A_firstFree_112 == 0) { if (A_maxIndex_557 < 32768) { A_maxIndex_557 = (A_maxIndex_557 + 1); this_499 = A_maxIndex_557; A_typeId_123[this_499] = 2; } else { error966("Out of memory: Could not create B."); this_499 = 0; }; } else { A_firstFree_112 = (A_firstFree_112 - 1); this_499 = A_nextFree_895[A_firstFree_112]; A_typeId_123[this_499] = 2; }; return this_499; } function dispatch_A_test_A_foo150(integer this590) returns integer { local integer test_A_foo_result152 if (A_typeId_123[this_590] == 0) { if (this_590 == 0) { error966("Nullpointer exception when calling A.foo"); } else { error966("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_152 = B_foo110(this_590); return test_A_foo_result_152; }