array A_nextFree143 integer A_firstFree519 integer A_maxIndex654 array A_typeId163 array Cell_nextFree142 integer Cell_firstFree178 integer Cell_maxIndex791 array Cell_o485 integer A_firstFree519 = 0 integer A_maxIndex654 = 0 integer Cell_firstFree178 = 0 integer Cell_maxIndex791 = 0 function initGlobals140() { } function main177() { initGlobals140(); init_Test150(); } function config100() { } function init_Test150() { local integer c676 c_676 = new_Cell170(); Cell_o_485[c_676] = new_B207(); if (dispatch_A_Test_A_foo213(Cell_o_485[c_676]) == 6) { testSuccess194(); } else { }; } IS_NATIVE function testSuccess194() { } function new_B207() returns integer { local integer this135 if (A_firstFree_519 == 0) { if (A_maxIndex_654 < 32768) { A_maxIndex_654 = (A_maxIndex_654 + 1); this_135 = A_maxIndex_654; A_typeId_163[this_135] = 2; } else { error119("Out of memory: Could not create B."); this_135 = 0; }; } else { A_firstFree_519 = (A_firstFree_519 - 1); this_135 = A_nextFree_143[A_firstFree_519]; A_typeId_163[this_135] = 2; }; return this_135; } function new_Cell170() returns integer { local integer this124 if (Cell_firstFree_178 == 0) { if (Cell_maxIndex_791 < 32768) { Cell_maxIndex_791 = (Cell_maxIndex_791 + 1); this_124 = Cell_maxIndex_791; } else { error119("Out of memory: Could not create Cell."); this_124 = 0; }; } else { Cell_firstFree_178 = (Cell_firstFree_178 - 1); this_124 = Cell_nextFree_142[Cell_firstFree_178]; }; return this_124; } function error119(string msg205) { $debugPrint126((msg_205 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_foo213(integer this159) returns integer { if (A_typeId_163[this_159] == 0) { if (this_159 == 0) { error119("Nullpointer exception when calling A.foo"); } else { error119("Called A.foo on invalid object."); }; } else { }; if (A_typeId_163[this_159] <= 1) { this_159 = 5; } else { this_159 = 6; }; return this_159; }