array I_nextFree196 integer I_firstFree589 integer I_maxIndex140 array I_typeId100 integer I_firstFree589 = 0 integer I_maxIndex140 = 0 function initGlobals727() { I_firstFree_589 = 0; I_maxIndex_140 = 0; } function main336() { initGlobals727(); init_test135(); } function config187() { } function init_test135() { local integer c1741 local integer c2207 c1_741 = new_C117(); c2_207 = new_D148(); if ((dispatch_B_test1_B_foo973(c1_741) == 2) and (dispatch_B_test1_B_foo973(c2_207) == 2)) { testSuccess107(); } else { }; } IS_NATIVE function testSuccess107() { } function B_foo680(integer this892) returns integer { return 2; } function B_init189(integer this555) { } function construct_B379(integer this158) { B_init189(this_158); } function C_init118(integer this125) { } function new_C117() returns integer { local integer this108 this_108 = alloc_C150(); construct_C195(this_108); return this_108; } function construct_C195(integer this181) { construct_B379(this_181); C_init118(this_181); } function D_init468(integer this107) { } function new_D148() returns integer { local integer this110 this_110 = alloc_D127(); construct_D134(this_110); return this_110; } function construct_D134(integer this188) { construct_C195(this_188); D_init468(this_188); } function error652(string msg993) { $debugPrint774((msg_993 + (" " + #getStackTrace()))); } function alloc_C150() returns integer { local integer this192 if (I_firstFree_589 == 0) { if (I_maxIndex_140 < 32768) { I_maxIndex_140 = (I_maxIndex_140 + 1); this_192 = I_maxIndex_140; I_typeId_100[this_192] = 3; } else { error652("Out of memory: Could not create C."); this_192 = 0; }; } else { I_firstFree_589 = (I_firstFree_589 - 1); this_192 = I_nextFree_196[I_firstFree_589]; I_typeId_100[this_192] = 3; }; return this_192; } function alloc_D127() returns integer { local integer this107 if (I_firstFree_589 == 0) { if (I_maxIndex_140 < 32768) { I_maxIndex_140 = (I_maxIndex_140 + 1); this_107 = I_maxIndex_140; I_typeId_100[this_107] = 4; } else { error652("Out of memory: Could not create D."); this_107 = 0; }; } else { I_firstFree_589 = (I_firstFree_589 - 1); this_107 = I_nextFree_196[I_firstFree_589]; I_typeId_100[this_107] = 4; }; return this_107; } function dispatch_B_test1_B_foo973(integer this826) returns integer { local integer test1_B_foo_result110 if (I_typeId_100[this_826] == 0) { if (this_826 == 0) { error652("Nullpointer exception when calling B.foo"); } else { error652("Called B.foo on invalid object."); }; } else { }; test1_B_foo_result_110 = B_foo680(this_826); return test1_B_foo_result_110; }