array I_nextFree211 integer I_firstFree264 integer I_maxIndex210 array I_typeId159 integer I_firstFree264 = 0 integer I_maxIndex210 = 0 function initGlobals265() { } function main490() { initGlobals265(); init_test784(); } function config167() { } function init_test784() { local integer b514 local integer c204 local integer d177 b_514 = new_B590(); c_204 = new_C157(); d_177 = new_D189(); if (((dispatch_B_test_B_foo188(b_514) == 2) and (dispatch_I_test_I_foo491(c_204) == 5)) and (dispatch_I_test_I_foo491(d_177) == 3)) { testSuccess203(); } else { }; } IS_NATIVE function testSuccess203() { } function B_foo185(integer this125) returns integer { return 2; } function B_init112(integer this992) { } function new_B590() returns integer { local integer this172 this_172 = alloc_B125(); construct_B204(this_172); return this_172; } function construct_B204(integer this581) { B_init112(this_581); } function C_init162(integer this183) { } function new_C157() returns integer { local integer this103 this_103 = alloc_C125(); construct_C200(this_103); return this_103; } function construct_C200(integer this713) { C_init162(this_713); } function D_bar496(integer this433) returns integer { return 3; } function D_init922(integer this621) { } function new_D189() returns integer { local integer this124 this_124 = alloc_D221(); construct_D947(this_124); return this_124; } function construct_D947(integer this797) { D_init922(this_797); } function I_foo196(integer this234) returns integer { return dispatch_I_test_I_bar932(this_234); } function I_bar550(integer this253) returns integer { return 5; } function alloc_B125() returns integer { local integer this735 if (I_firstFree_264 == 0) { if (I_maxIndex_210 < 32768) { I_maxIndex_210 = (I_maxIndex_210 + 1); this_735 = I_maxIndex_210; I_typeId_159[this_735] = 2; } else { error119("Out of memory: Could not create B."); this_735 = 0; }; } else { I_firstFree_264 = (I_firstFree_264 - 1); this_735 = I_nextFree_211[I_firstFree_264]; I_typeId_159[this_735] = 2; }; return this_735; } function error119(string msg337) { $debugPrint194((msg_337 + (" " + #getStackTrace()))); } function alloc_C125() returns integer { local integer this967 if (I_firstFree_264 == 0) { if (I_maxIndex_210 < 32768) { I_maxIndex_210 = (I_maxIndex_210 + 1); this_967 = I_maxIndex_210; I_typeId_159[this_967] = 3; } else { error119("Out of memory: Could not create C."); this_967 = 0; }; } else { I_firstFree_264 = (I_firstFree_264 - 1); this_967 = I_nextFree_211[I_firstFree_264]; I_typeId_159[this_967] = 3; }; return this_967; } function alloc_D221() returns integer { local integer this587 if (I_firstFree_264 == 0) { if (I_maxIndex_210 < 32768) { I_maxIndex_210 = (I_maxIndex_210 + 1); this_587 = I_maxIndex_210; I_typeId_159[this_587] = 4; } else { error119("Out of memory: Could not create D."); this_587 = 0; }; } else { I_firstFree_264 = (I_firstFree_264 - 1); this_587 = I_nextFree_211[I_firstFree_264]; I_typeId_159[this_587] = 4; }; return this_587; } function dispatch_B_test_B_foo188(integer this390) returns integer { if (I_typeId_159[this_390] == 0) { if (this_390 == 0) { error119("Nullpointer exception when calling B.foo"); } else { error119("Called B.foo on invalid object."); }; } else { }; return B_foo185(this_390); } function dispatch_I_test_I_foo491(integer this164) returns integer { if (I_typeId_159[this_164] == 0) { if (this_164 == 0) { error119("Nullpointer exception when calling I.foo"); } else { error119("Called I.foo on invalid object."); }; } else { }; if (I_typeId_159[this_164] <= 2) { if (I_typeId_159[this_164] <= 1) { this_164 = I_foo196(this_164); } else { this_164 = B_foo185(this_164); }; } else { this_164 = I_foo196(this_164); }; return this_164; } function dispatch_I_test_I_bar932(integer this587) returns integer { if (I_typeId_159[this_587] == 0) { if (this_587 == 0) { error119("Nullpointer exception when calling I.bar"); } else { error119("Called I.bar on invalid object."); }; } else { }; if (I_typeId_159[this_587] <= 3) { this_587 = I_bar550(this_587); } else { this_587 = D_bar496(this_587); }; return this_587; }