array I_nextFree996 integer I_firstFree197 integer I_maxIndex464 array I_typeId400 integer I_firstFree197 = 0 integer I_maxIndex464 = 0 function initGlobals164() { } function main185() { initGlobals164(); init_test261(); } function config179() { } function init_test261() { local integer b219 local integer c165 local integer d196 b_219 = new_B185(); c_165 = new_C964(); d_196 = new_D659(); if (((dispatch_B_test_B_foo396(b_219) == 2) and (dispatch_I_test_I_foo123(c_165) == 5)) and (dispatch_I_test_I_foo123(d_196) == 3)) { testSuccess193(); } else { }; } IS_NATIVE function testSuccess193() { } function B_foo162(integer this601) returns integer { return 2; } function B_init131(integer this417) { } function new_B185() returns integer { local integer this179 this_179 = alloc_B148(); construct_B163(this_179); return this_179; } function construct_B163(integer this116) { B_init131(this_116); } function C_init128(integer this315) { } function new_C964() returns integer { local integer this435 this_435 = alloc_C197(); construct_C139(this_435); return this_435; } function construct_C139(integer this375) { C_init128(this_375); } function D_bar278(integer this112) returns integer { return 3; } function D_init184(integer this129) { } function new_D659() returns integer { local integer this693 this_693 = alloc_D506(); construct_D219(this_693); return this_693; } function construct_D219(integer this205) { D_init184(this_205); } function I_foo147(integer this313) returns integer { return dispatch_I_test_I_bar194(this_313); } function I_bar191(integer this415) returns integer { return 5; } function alloc_B148() returns integer { local integer this788 if (I_firstFree_197 == 0) { if (I_maxIndex_464 < 32768) { I_maxIndex_464 = (I_maxIndex_464 + 1); this_788 = I_maxIndex_464; I_typeId_400[this_788] = 2; } else { error112("Out of memory: Could not create B."); this_788 = 0; }; } else { I_firstFree_197 = (I_firstFree_197 - 1); this_788 = I_nextFree_996[I_firstFree_197]; I_typeId_400[this_788] = 2; }; return this_788; } function error112(string msg668) { $debugPrint195((msg_668 + (" " + #getStackTrace()))); } function alloc_C197() returns integer { local integer this194 if (I_firstFree_197 == 0) { if (I_maxIndex_464 < 32768) { I_maxIndex_464 = (I_maxIndex_464 + 1); this_194 = I_maxIndex_464; I_typeId_400[this_194] = 3; } else { error112("Out of memory: Could not create C."); this_194 = 0; }; } else { I_firstFree_197 = (I_firstFree_197 - 1); this_194 = I_nextFree_996[I_firstFree_197]; I_typeId_400[this_194] = 3; }; return this_194; } function alloc_D506() returns integer { local integer this693 if (I_firstFree_197 == 0) { if (I_maxIndex_464 < 32768) { I_maxIndex_464 = (I_maxIndex_464 + 1); this_693 = I_maxIndex_464; I_typeId_400[this_693] = 4; } else { error112("Out of memory: Could not create D."); this_693 = 0; }; } else { I_firstFree_197 = (I_firstFree_197 - 1); this_693 = I_nextFree_996[I_firstFree_197]; I_typeId_400[this_693] = 4; }; return this_693; } function dispatch_B_test_B_foo396(integer this663) returns integer { if (I_typeId_400[this_663] == 0) { if (this_663 == 0) { error112("Nullpointer exception when calling B.foo"); } else { error112("Called B.foo on invalid object."); }; } else { }; return B_foo162(this_663); } function dispatch_I_test_I_foo123(integer this172) returns integer { if (I_typeId_400[this_172] == 0) { if (this_172 == 0) { error112("Nullpointer exception when calling I.foo"); } else { error112("Called I.foo on invalid object."); }; } else { }; if (I_typeId_400[this_172] <= 2) { if (I_typeId_400[this_172] <= 1) { this_172 = I_foo147(this_172); } else { this_172 = B_foo162(this_172); }; } else { this_172 = I_foo147(this_172); }; return this_172; } function dispatch_I_test_I_bar194(integer this123) returns integer { if (I_typeId_400[this_123] == 0) { if (this_123 == 0) { error112("Nullpointer exception when calling I.bar"); } else { error112("Called I.bar on invalid object."); }; } else { }; if (I_typeId_400[this_123] <= 3) { this_123 = I_bar191(this_123); } else { this_123 = D_bar278(this_123); }; return this_123; }