array I_nextFree487 integer I_firstFree523 integer I_maxIndex367 array I_typeId123 integer I_firstFree523 = 0 integer I_maxIndex367 = 0 function initGlobals638() { } function main166() { initGlobals638(); init_test291(); } function config349() { } function init_test291() { local integer b134 local integer c371 local integer d673 local integer this491 local integer test_B_foo_result608 local integer this136 local integer test_D_foo_result317 local boolean andLeft237 b_134 = new_B433(); c_371 = new_C146(); d_673 = new_D107(); this_491 = b_134; if (I_typeId_123[this_491] == 0) { if (this_491 == 0) { error121("Nullpointer exception when calling B.foo"); } else { error121("Called B.foo on invalid object."); }; } else { }; test_B_foo_result_608 = 2; if ((test_B_foo_result_608 == 2) and (dispatch_I_test_I_foo151(c_371) == 5)) { this_136 = d_673; if (I_typeId_123[this_136] == 0) { if (this_136 == 0) { error121("Nullpointer exception when calling D.foo"); } else { error121("Called D.foo on invalid object."); }; } else { }; test_D_foo_result_317 = 3; andLeft_237 = (test_D_foo_result_317 == 3); } else { andLeft_237 = false; }; if andLeft_237 { testSuccess267(); } else { }; } IS_NATIVE function testSuccess267() { } function new_B433() returns integer { local integer this133 local integer this348 if (I_firstFree_523 == 0) { if (I_maxIndex_367 < 32768) { I_maxIndex_367 = (I_maxIndex_367 + 1); this_348 = I_maxIndex_367; I_typeId_123[this_348] = 2; } else { error121("Out of memory: Could not create B."); this_348 = 0; }; } else { I_firstFree_523 = (I_firstFree_523 - 1); this_348 = I_nextFree_487[I_firstFree_523]; I_typeId_123[this_348] = 2; }; this_133 = this_348; return this_133; } function new_C146() returns integer { local integer this459 local integer this189 if (I_firstFree_523 == 0) { if (I_maxIndex_367 < 32768) { I_maxIndex_367 = (I_maxIndex_367 + 1); this_189 = I_maxIndex_367; I_typeId_123[this_189] = 3; } else { error121("Out of memory: Could not create C."); this_189 = 0; }; } else { I_firstFree_523 = (I_firstFree_523 - 1); this_189 = I_nextFree_487[I_firstFree_523]; I_typeId_123[this_189] = 3; }; this_459 = this_189; return this_459; } function new_D107() returns integer { local integer this143 local integer this165 if (I_firstFree_523 == 0) { if (I_maxIndex_367 < 32768) { I_maxIndex_367 = (I_maxIndex_367 + 1); this_165 = I_maxIndex_367; I_typeId_123[this_165] = 4; } else { error121("Out of memory: Could not create D."); this_165 = 0; }; } else { I_firstFree_523 = (I_firstFree_523 - 1); this_165 = I_nextFree_487[I_firstFree_523]; I_typeId_123[this_165] = 4; }; this_143 = this_165; return this_143; } function error121(string msg128) { $debugPrint782((msg_128 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo151(integer this157) returns integer { local integer test_I_foo_result137 if (I_typeId_123[this_157] == 0) { if (this_157 == 0) { error121("Nullpointer exception when calling I.foo"); } else { error121("Called I.foo on invalid object."); }; } else { }; if (I_typeId_123[this_157] <= 2) { if (I_typeId_123[this_157] <= 1) { test_I_foo_result_137 = 5; } else { test_I_foo_result_137 = 2; }; } else { if (I_typeId_123[this_157] <= 3) { test_I_foo_result_137 = 5; } else { test_I_foo_result_137 = 3; }; }; return test_I_foo_result_137; }