array A_nextFree120 integer A_firstFree101 integer A_maxIndex130 array A_typeId476 integer A_firstFree101 = 0 integer A_maxIndex130 = 0 function initGlobals124() { A_firstFree_101 = 0; A_maxIndex_130 = 0; } function main169() { initGlobals124(); init_test170(); } function config136() { } function init_test170() { local integer c189 c_189 = new_C344(); if (dispatch_A_test_A_foo136(c_189) == 8) { testSuccess285(); } else { }; } IS_NATIVE function testSuccess285() { } function A_foo126(integer this235) returns integer { return 7; } function A_init207(integer this982) { } function construct_A948(integer this149) { A_init207(this_149); } function B_foo191(integer this305) returns integer { return 8; } function B_init550(integer this152) { } function construct_B152(integer this152) { construct_A948(this_152); B_init550(this_152); } function C_init982(integer this301) { } function new_C344() returns integer { local integer this194 this_194 = alloc_C180(); construct_C194(this_194); return this_194; } function construct_C194(integer this107) { construct_B152(this_107); C_init982(this_107); } function error154(string msg135) { $debugPrint157((msg_135 + (" " + #getStackTrace()))); } function alloc_C180() returns integer { local integer this243 if (A_firstFree_101 == 0) { if (A_maxIndex_130 < 32768) { A_maxIndex_130 = (A_maxIndex_130 + 1); this_243 = A_maxIndex_130; A_typeId_476[this_243] = 3; } else { error154("Out of memory: Could not create C."); this_243 = 0; }; } else { A_firstFree_101 = (A_firstFree_101 - 1); this_243 = A_nextFree_120[A_firstFree_101]; A_typeId_476[this_243] = 3; }; return this_243; } function dispatch_A_test_A_foo136(integer this213) returns integer { local integer test_A_foo_result474 if (A_typeId_476[this_213] == 0) { if (this_213 == 0) { error154("Nullpointer exception when calling A.foo"); } else { error154("Called A.foo on invalid object."); }; } else { }; if (A_typeId_476[this_213] <= 1) { test_A_foo_result_474 = A_foo126(this_213); } else { test_A_foo_result_474 = B_foo191(this_213); }; return test_A_foo_result_474; }