array I_nextFree480 integer I_firstFree263 integer I_maxIndex651 array I_typeId119 integer I_firstFree263 = 0 integer I_maxIndex651 = 0 function initGlobals187() { } function main758() { initGlobals187(); init_test409(); } function config756() { } function init_test409() { local integer b133 local integer c843 local integer d960 b_133 = new_B114(); c_843 = new_C427(); d_960 = new_D125(); if (((dispatch_B_test_B_foo211(b_133) == 2) and (dispatch_I_test_I_foo196(c_843) == 5)) and (dispatch_D_test_D_foo175(d_960) == 3)) { testSuccess187(); } else { }; } IS_NATIVE function testSuccess187() { } function B_foo572(integer this750) returns integer { return 2; } function B_init106(integer this101) { } function new_B114() returns integer { local integer this696 this_696 = alloc_B185(); construct_B308(this_696); return this_696; } function construct_B308(integer this747) { B_init106(this_747); } function C_init183(integer this189) { } function new_C427() returns integer { local integer this283 this_283 = alloc_C219(); construct_C872(this_283); return this_283; } function construct_C872(integer this185) { C_init183(this_185); } function D_foo997(integer this166) returns integer { return 3; } function D_init209(integer this145) { } function new_D125() returns integer { local integer this138 this_138 = alloc_D164(); construct_D556(this_138); return this_138; } function construct_D556(integer this389) { D_init209(this_389); } function I_foo613(integer this199) returns integer { return 5; } function alloc_B185() returns integer { local integer this560 if (I_firstFree_263 == 0) { if (I_maxIndex_651 < 32768) { I_maxIndex_651 = (I_maxIndex_651 + 1); this_560 = I_maxIndex_651; I_typeId_119[this_560] = 2; } else { error105("Out of memory: Could not create B."); this_560 = 0; }; } else { I_firstFree_263 = (I_firstFree_263 - 1); this_560 = I_nextFree_480[I_firstFree_263]; I_typeId_119[this_560] = 2; }; return this_560; } function error105(string msg637) { $debugPrint112((msg_637 + (" " + #getStackTrace()))); } function alloc_C219() returns integer { local integer this113 if (I_firstFree_263 == 0) { if (I_maxIndex_651 < 32768) { I_maxIndex_651 = (I_maxIndex_651 + 1); this_113 = I_maxIndex_651; I_typeId_119[this_113] = 3; } else { error105("Out of memory: Could not create C."); this_113 = 0; }; } else { I_firstFree_263 = (I_firstFree_263 - 1); this_113 = I_nextFree_480[I_firstFree_263]; I_typeId_119[this_113] = 3; }; return this_113; } function alloc_D164() returns integer { local integer this175 if (I_firstFree_263 == 0) { if (I_maxIndex_651 < 32768) { I_maxIndex_651 = (I_maxIndex_651 + 1); this_175 = I_maxIndex_651; I_typeId_119[this_175] = 4; } else { error105("Out of memory: Could not create D."); this_175 = 0; }; } else { I_firstFree_263 = (I_firstFree_263 - 1); this_175 = I_nextFree_480[I_firstFree_263]; I_typeId_119[this_175] = 4; }; return this_175; } function dispatch_B_test_B_foo211(integer this123) returns integer { if (I_typeId_119[this_123] == 0) { if (this_123 == 0) { error105("Nullpointer exception when calling B.foo"); } else { error105("Called B.foo on invalid object."); }; } else { }; return B_foo572(this_123); } function dispatch_D_test_D_foo175(integer this165) returns integer { if (I_typeId_119[this_165] == 0) { if (this_165 == 0) { error105("Nullpointer exception when calling D.foo"); } else { error105("Called D.foo on invalid object."); }; } else { }; return D_foo997(this_165); } function dispatch_I_test_I_foo196(integer this159) returns integer { if (I_typeId_119[this_159] == 0) { if (this_159 == 0) { error105("Nullpointer exception when calling I.foo"); } else { error105("Called I.foo on invalid object."); }; } else { }; if (I_typeId_119[this_159] <= 2) { if (I_typeId_119[this_159] <= 1) { this_159 = I_foo613(this_159); } else { this_159 = B_foo572(this_159); }; } else { if (I_typeId_119[this_159] <= 3) { this_159 = I_foo613(this_159); } else { this_159 = D_foo997(this_159); }; }; return this_159; }