array A_nextFree775 integer A_firstFree335 integer A_maxIndex178 array A_typeId200 integer A_firstFree335 = 0 integer A_maxIndex178 = 0 function initGlobals185() { } function main146() { local integer b179 initGlobals185(); b_179 = new_A912(); if (dispatch_A_test_A_foo140(b_179) == 7) { testSuccess117(); } else { }; } function config602() { } IS_NATIVE function testSuccess117() { } function new_A912() returns integer { local integer this194 local integer this698 if (A_firstFree_335 == 0) { if (A_maxIndex_178 < 32768) { A_maxIndex_178 = (A_maxIndex_178 + 1); this_698 = A_maxIndex_178; A_typeId_200[this_698] = 1; } else { error139("Out of memory: Could not create A."); this_698 = 0; }; } else { A_firstFree_335 = (A_firstFree_335 - 1); this_698 = A_nextFree_775[A_firstFree_335]; A_typeId_200[this_698] = 1; }; this_194 = this_698; return this_194; } function error139(string msg171) { $debugPrint141((msg_171 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo140(integer this162) returns integer { local integer test_A_foo_result966 if (A_typeId_200[this_162] == 0) { if (this_162 == 0) { error139("Nullpointer exception when calling A.foo"); } else { error139("Called A.foo on invalid object."); }; } else { }; if (A_typeId_200[this_162] <= 1) { test_A_foo_result_966 = 7; } else { test_A_foo_result_966 = 8; }; return test_A_foo_result_966; }