array A_nextFree201 integer A_firstFree573 integer A_maxIndex106 array A_typeId329 array Cell_nextFree119 integer Cell_firstFree321 integer Cell_maxIndex110 array Cell_o203 integer A_firstFree573 = 0 integer A_maxIndex106 = 0 integer Cell_firstFree321 = 0 integer Cell_maxIndex110 = 0 function initGlobals213() { } function main105() { initGlobals213(); init_Test126(); } function config190() { } function init_Test126() { local integer c171 c_171 = new_Cell849(); Cell_o_203[c_171] = new_B100(); if (dispatch_A_Test_A_foo304(Cell_o_203[c_171]) == 6) { testSuccess105(); } else { }; } IS_NATIVE function testSuccess105() { } function new_B100() returns integer { local integer this145 if (A_firstFree_573 == 0) { if (A_maxIndex_106 < 32768) { A_maxIndex_106 = (A_maxIndex_106 + 1); this_145 = A_maxIndex_106; A_typeId_329[this_145] = 2; } else { error443("Out of memory: Could not create B."); this_145 = 0; }; } else { A_firstFree_573 = (A_firstFree_573 - 1); this_145 = A_nextFree_201[A_firstFree_573]; A_typeId_329[this_145] = 2; }; return this_145; } function new_Cell849() returns integer { local integer this124 if (Cell_firstFree_321 == 0) { if (Cell_maxIndex_110 < 32768) { Cell_maxIndex_110 = (Cell_maxIndex_110 + 1); this_124 = Cell_maxIndex_110; } else { error443("Out of memory: Could not create Cell."); this_124 = 0; }; } else { Cell_firstFree_321 = (Cell_firstFree_321 - 1); this_124 = Cell_nextFree_119[Cell_firstFree_321]; }; return this_124; } function error443(string msg497) { $debugPrint299((msg_497 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_foo304(integer this682) returns integer { if (A_typeId_329[this_682] == 0) { if (this_682 == 0) { error443("Nullpointer exception when calling A.foo"); } else { error443("Called A.foo on invalid object."); }; } else { }; if (A_typeId_329[this_682] <= 1) { this_682 = 5; } else { this_682 = 6; }; return this_682; }