array A_nextFree125 integer A_firstFree100 integer A_maxIndex171 array A_typeId141 integer A_firstFree100 = 0 integer A_maxIndex171 = 0 function initGlobals122() { } function main184() { initGlobals122(); init_test128(); } function config178() { } function init_test128() { if (dispatch_A_test_A_foo117(new_A144()) == 7) { testSuccess100(); } else { }; } IS_NATIVE function testSuccess100() { } function A_foo752(integer this186) returns integer { return 7; } function A_init159(integer this199) { } function new_A144() returns integer { local integer this561 this_561 = alloc_A128(); construct_A679(this_561); return this_561; } function construct_A679(integer this142) { A_init159(this_142); } function B_foo199(integer this124) returns integer { return 8; } function alloc_A128() returns integer { local integer this107 if (A_firstFree_100 == 0) { if (A_maxIndex_171 < 32768) { A_maxIndex_171 = (A_maxIndex_171 + 1); this_107 = A_maxIndex_171; A_typeId_141[this_107] = 1; } else { error421("Out of memory: Could not create A."); this_107 = 0; }; } else { A_firstFree_100 = (A_firstFree_100 - 1); this_107 = A_nextFree_125[A_firstFree_100]; A_typeId_141[this_107] = 1; }; return this_107; } function error421(string msg556) { $debugPrint648((msg_556 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo117(integer this157) returns integer { if (A_typeId_141[this_157] == 0) { if (this_157 == 0) { error421("Nullpointer exception when calling A.foo"); } else { error421("Called A.foo on invalid object."); }; } else { }; if (A_typeId_141[this_157] <= 1) { this_157 = A_foo752(this_157); } else { this_157 = B_foo199(this_157); }; return this_157; }