array A_nextFree624 integer A_firstFree177 integer A_maxIndex361 array A_typeId509 integer A_firstFree177 = 0 integer A_maxIndex361 = 0 function initGlobals319() { } function main269() { initGlobals319(); init_test877(); } function config364() { } function init_test877() { if (dispatch_A_test_A_foo115(new_A140()) == 7) { testSuccess123(); } else { }; } IS_NATIVE function testSuccess123() { } function A_foo214(integer this206) returns integer { return 7; } function A_init155(integer this307) { } function new_A140() returns integer { local integer this136 this_136 = alloc_A191(); construct_A751(this_136); return this_136; } function construct_A751(integer this156) { A_init155(this_156); } function B_foo146(integer this163) returns integer { return 8; } function alloc_A191() returns integer { local integer this801 if (A_firstFree_177 == 0) { if (A_maxIndex_361 < 32768) { A_maxIndex_361 = (A_maxIndex_361 + 1); this_801 = A_maxIndex_361; A_typeId_509[this_801] = 1; } else { error183("Out of memory: Could not create A."); this_801 = 0; }; } else { A_firstFree_177 = (A_firstFree_177 - 1); this_801 = A_nextFree_624[A_firstFree_177]; A_typeId_509[this_801] = 1; }; return this_801; } function error183(string msg117) { $debugPrint156((msg_117 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo115(integer this592) returns integer { if (A_typeId_509[this_592] == 0) { if (this_592 == 0) { error183("Nullpointer exception when calling A.foo"); } else { error183("Called A.foo on invalid object."); }; } else { }; if (A_typeId_509[this_592] <= 1) { this_592 = A_foo214(this_592); } else { this_592 = B_foo146(this_592); }; return this_592; }