array A_nextFree732 integer A_firstFree565 integer A_maxIndex207 array A_typeId152 integer A_firstFree565 = 0 integer A_maxIndex207 = 0 function initGlobals201() { } function main130() { local integer b482 initGlobals201(); b_482 = new_B618(); if (dispatch_A_test_A_foo690(b_482) == 8) { testSuccess270(); } else { }; } function config545() { } IS_NATIVE function testSuccess270() { } function new_B618() returns integer { local integer this597 local integer this150 if (A_firstFree_565 == 0) { if (A_maxIndex_207 < 32768) { A_maxIndex_207 = (A_maxIndex_207 + 1); this_150 = A_maxIndex_207; A_typeId_152[this_150] = 2; } else { error733("Out of memory: Could not create B."); this_150 = 0; }; } else { A_firstFree_565 = (A_firstFree_565 - 1); this_150 = A_nextFree_732[A_firstFree_565]; A_typeId_152[this_150] = 2; }; this_597 = this_150; return this_597; } function error733(string msg184) { $debugPrint123((msg_184 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo690(integer this180) returns integer { local integer test_A_foo_result670 if (A_typeId_152[this_180] == 0) { if (this_180 == 0) { error733("Nullpointer exception when calling A.foo"); } else { error733("Called A.foo on invalid object."); }; } else { }; if (A_typeId_152[this_180] <= 1) { test_A_foo_result_670 = 7; } else { test_A_foo_result_670 = 8; }; return test_A_foo_result_670; }