array A_nextFree193 integer A_firstFree182 integer A_maxIndex103 array A_typeId190 integer A_firstFree182 = 0 integer A_maxIndex103 = 0 function initGlobals119() { A_firstFree_182 = 0; A_maxIndex_103 = 0; } function main161() { initGlobals119(); init_test640(); } function config186() { } function init_test640() { local integer b107 b_107 = new_A210(); if (dispatch_A_test_A_foo277(b_107) == 7) { testSuccess123(); } else { }; } IS_NATIVE function testSuccess123() { } function A_foo178(integer this104) returns integer { return 7; } function A_init218(integer this124) { } function new_A210() returns integer { local integer this165 this_165 = alloc_A382(); construct_A984(this_165); return this_165; } function construct_A984(integer this479) { A_init218(this_479); } function B_foo104(integer this319) returns integer { return 8; } function alloc_A382() returns integer { local integer this140 if (A_firstFree_182 == 0) { if (A_maxIndex_103 < 32768) { A_maxIndex_103 = (A_maxIndex_103 + 1); this_140 = A_maxIndex_103; A_typeId_190[this_140] = 1; } else { error750("Out of memory: Could not create A."); this_140 = 0; }; } else { A_firstFree_182 = (A_firstFree_182 - 1); this_140 = A_nextFree_193[A_firstFree_182]; A_typeId_190[this_140] = 1; }; return this_140; } function error750(string msg162) { $debugPrint583((msg_162 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo277(integer this571) returns integer { local integer test_A_foo_result785 if (A_typeId_190[this_571] == 0) { if (this_571 == 0) { error750("Nullpointer exception when calling A.foo"); } else { error750("Called A.foo on invalid object."); }; } else { }; if (A_typeId_190[this_571] <= 1) { test_A_foo_result_785 = A_foo178(this_571); } else { test_A_foo_result_785 = B_foo104(this_571); }; return test_A_foo_result_785; }