array I_nextFree173 integer I_firstFree156 integer I_maxIndex154 array I_typeId600 integer I_firstFree156 = 0 integer I_maxIndex154 = 0 function initGlobals457() { } function main669() { initGlobals457(); init_test206(); } function config880() { } function init_test206() { local integer i1196 i1_196 = new_B179(); if ((dispatch_I_test_I_foo156(new_C405()) == 3) and (dispatch_I_test_I_foo156(i1_196) == 2)) { testSuccess131(); } else { }; } IS_NATIVE function testSuccess131() { } function new_B179() returns integer { local integer this435 if (I_firstFree_156 == 0) { if (I_maxIndex_154 < 32768) { I_maxIndex_154 = (I_maxIndex_154 + 1); this_435 = I_maxIndex_154; I_typeId_600[this_435] = 2; } else { error183("Out of memory: Could not create B."); this_435 = 0; }; } else { I_firstFree_156 = (I_firstFree_156 - 1); this_435 = I_nextFree_173[I_firstFree_156]; I_typeId_600[this_435] = 2; }; return this_435; } function new_C405() returns integer { local integer this122 if (I_firstFree_156 == 0) { if (I_maxIndex_154 < 32768) { I_maxIndex_154 = (I_maxIndex_154 + 1); this_122 = I_maxIndex_154; I_typeId_600[this_122] = 3; } else { error183("Out of memory: Could not create C."); this_122 = 0; }; } else { I_firstFree_156 = (I_firstFree_156 - 1); this_122 = I_nextFree_173[I_firstFree_156]; I_typeId_600[this_122] = 3; }; return this_122; } function error183(string msg999) { $debugPrint108((msg_999 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo156(integer this178) returns integer { if (I_typeId_600[this_178] == 0) { if (this_178 == 0) { error183("Nullpointer exception when calling I.foo"); } else { error183("Called I.foo on invalid object."); }; } else { }; if (I_typeId_600[this_178] <= 2) { this_178 = 2; } else { this_178 = 3; }; return this_178; }