array I_nextFree201 integer I_firstFree118 integer I_maxIndex168 array I_typeId871 integer I_firstFree118 = 0 integer I_maxIndex168 = 0 function initGlobals151() { } function main774() { initGlobals151(); init_test929(); } function config110() { } function init_test929() { test146(new_B108(), new_C146()); } function test146(integer i1168, integer i2198) { if ((dispatch_I_test_I_foo229(i1_168) == 2) and (dispatch_I_test_I_foo229(i2_198) == 3)) { testSuccess148(); } else { }; } IS_NATIVE function testSuccess148() { } function B_foo209(integer this123) returns integer { return 2; } function B_init202(integer this101) { } function new_B108() returns integer { local integer this587 this_587 = alloc_B931(); construct_B318(this_587); return this_587; } function construct_B318(integer this162) { B_init202(this_162); } function C_foo132(integer this776) returns integer { return 3; } function C_init354(integer this194) { } function new_C146() returns integer { local integer this139 this_139 = alloc_C531(); construct_C103(this_139); return this_139; } function construct_C103(integer this891) { C_init354(this_891); } function alloc_B931() returns integer { local integer this140 if (I_firstFree_118 == 0) { if (I_maxIndex_168 < 32768) { I_maxIndex_168 = (I_maxIndex_168 + 1); this_140 = I_maxIndex_168; I_typeId_871[this_140] = 2; } else { error148("Out of memory: Could not create B."); this_140 = 0; }; } else { I_firstFree_118 = (I_firstFree_118 - 1); this_140 = I_nextFree_201[I_firstFree_118]; I_typeId_871[this_140] = 2; }; return this_140; } function error148(string msg549) { $debugPrint416((msg_549 + (" " + #getStackTrace()))); } function alloc_C531() returns integer { local integer this130 if (I_firstFree_118 == 0) { if (I_maxIndex_168 < 32768) { I_maxIndex_168 = (I_maxIndex_168 + 1); this_130 = I_maxIndex_168; I_typeId_871[this_130] = 3; } else { error148("Out of memory: Could not create C."); this_130 = 0; }; } else { I_firstFree_118 = (I_firstFree_118 - 1); this_130 = I_nextFree_201[I_firstFree_118]; I_typeId_871[this_130] = 3; }; return this_130; } function dispatch_I_test_I_foo229(integer this136) returns integer { if (I_typeId_871[this_136] == 0) { if (this_136 == 0) { error148("Nullpointer exception when calling I.foo"); } else { error148("Called I.foo on invalid object."); }; } else { }; if (I_typeId_871[this_136] <= 2) { this_136 = B_foo209(this_136); } else { this_136 = C_foo132(this_136); }; return this_136; }