array A_nextFree125 integer A_firstFree188 integer A_maxIndex157 array A_typeId111 integer A_firstFree188 = 0 integer A_maxIndex157 = 0 function initGlobals136() { } function main156() { initGlobals136(); init_test850(); } function config201() { } function init_test850() { if (dispatch_A_test_A_foo576(new_A154()) == 7) { testSuccess210(); } else { }; } IS_NATIVE function testSuccess210() { } function A_foo659(integer this121) returns integer { return 7; } function A_init155(integer this123) { } function new_A154() returns integer { local integer this467 this_467 = alloc_A143(); construct_A663(this_467); return this_467; } function construct_A663(integer this144) { A_init155(this_144); } function B_foo293(integer this177) returns integer { return 8; } function alloc_A143() returns integer { local integer this318 if (A_firstFree_188 == 0) { if (A_maxIndex_157 < 32768) { A_maxIndex_157 = (A_maxIndex_157 + 1); this_318 = A_maxIndex_157; A_typeId_111[this_318] = 1; } else { error179("Out of memory: Could not create A."); this_318 = 0; }; } else { A_firstFree_188 = (A_firstFree_188 - 1); this_318 = A_nextFree_125[A_firstFree_188]; A_typeId_111[this_318] = 1; }; return this_318; } function error179(string msg123) { $debugPrint164((msg_123 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo576(integer this173) returns integer { if (A_typeId_111[this_173] == 0) { if (this_173 == 0) { error179("Nullpointer exception when calling A.foo"); } else { error179("Called A.foo on invalid object."); }; } else { }; if (A_typeId_111[this_173] <= 1) { this_173 = A_foo659(this_173); } else { this_173 = B_foo293(this_173); }; return this_173; }