array I_nextFree926 integer I_firstFree566 integer I_maxIndex117 array I_typeId613 integer I_firstFree566 = 0 integer I_maxIndex117 = 0 function initGlobals235() { I_firstFree_566 = 0; I_maxIndex_117 = 0; } function main307() { initGlobals235(); init_test140(); } function config291() { } function init_test140() { local integer c1162 local integer c2718 c1_162 = new_C206(); c2_718 = new_D166(); if ((dispatch_B_test1_B_foo145(c1_162) == 2) and (dispatch_B_test1_B_foo145(c2_718) == 2)) { testSuccess793(); } else { }; } IS_NATIVE function testSuccess793() { } function B_foo597(integer this288) returns integer { return 2; } function B_init105(integer this200) { } function construct_B202(integer this587) { B_init105(this_587); } function C_init158(integer this153) { } function new_C206() returns integer { local integer this188 this_188 = alloc_C110(); construct_C284(this_188); return this_188; } function construct_C284(integer this118) { construct_B202(this_118); C_init158(this_118); } function D_init190(integer this206) { } function new_D166() returns integer { local integer this351 this_351 = alloc_D115(); construct_D148(this_351); return this_351; } function construct_D148(integer this177) { construct_C284(this_177); D_init190(this_177); } function error832(string msg547) { $debugPrint211((msg_547 + (" " + #getStackTrace()))); } function alloc_C110() returns integer { local integer this159 if (I_firstFree_566 == 0) { if (I_maxIndex_117 < 32768) { I_maxIndex_117 = (I_maxIndex_117 + 1); this_159 = I_maxIndex_117; I_typeId_613[this_159] = 3; } else { error832("Out of memory: Could not create C."); this_159 = 0; }; } else { I_firstFree_566 = (I_firstFree_566 - 1); this_159 = I_nextFree_926[I_firstFree_566]; I_typeId_613[this_159] = 3; }; return this_159; } function alloc_D115() returns integer { local integer this867 if (I_firstFree_566 == 0) { if (I_maxIndex_117 < 32768) { I_maxIndex_117 = (I_maxIndex_117 + 1); this_867 = I_maxIndex_117; I_typeId_613[this_867] = 4; } else { error832("Out of memory: Could not create D."); this_867 = 0; }; } else { I_firstFree_566 = (I_firstFree_566 - 1); this_867 = I_nextFree_926[I_firstFree_566]; I_typeId_613[this_867] = 4; }; return this_867; } function dispatch_B_test1_B_foo145(integer this113) returns integer { local integer test1_B_foo_result167 if (I_typeId_613[this_113] == 0) { if (this_113 == 0) { error832("Nullpointer exception when calling B.foo"); } else { error832("Called B.foo on invalid object."); }; } else { }; test1_B_foo_result_167 = B_foo597(this_113); return test1_B_foo_result_167; }