array Cell_nextFree296 integer Cell_firstFree110 integer Cell_maxIndex897 array Cell_typeId138 array Cell_elem194 integer blaFromIndex_return_z195 integer blaFromIndex_return_y155 integer Cell_firstFree110 = 0 integer Cell_maxIndex897 = 0 function initGlobals331() { } function main111() { initGlobals331(); init_test143(); } function config592() { } function init_test143() { local integer c209 c_209 = new_Cell122(); dispatch_Cell_test_Cell_set879(c_209, blaToIndex298(5, 3)); dispatch_Cell_test_Cell_set879(c_209, dispatch_Cell_test_Cell_get113(c_209)); if ((blaFromIndex214(dispatch_Cell_test_Cell_get113(c_209)) == 5) and (blaFromIndex_return_y_155 == 2)) { testSuccess188(); } else { }; } function blaToIndex298(integer b_z209, integer b_y205) returns integer { return b_z_209; } function blaFromIndex214(integer i816) returns integer { blaFromIndex_return_z_195 = i_816; blaFromIndex_return_y_155 = 2; return blaFromIndex_return_z_195; } IS_NATIVE function testSuccess188() { } function Cell_set191(integer this201, any t474) { Cell_elem_194[this_201] = t_474; } function Cell_get965(integer this459) returns any { return Cell_elem_194[this_459]; } function Cell_init135(integer this788) { } function new_Cell122() returns integer { local integer this998 this_998 = alloc_Cell103(); construct_Cell178(this_998); return this_998; } function construct_Cell178(integer this122) { Cell_init135(this_122); } function alloc_Cell103() returns integer { local integer this432 if (Cell_firstFree_110 == 0) { if (Cell_maxIndex_897 < 32768) { Cell_maxIndex_897 = (Cell_maxIndex_897 + 1); this_432 = Cell_maxIndex_897; Cell_typeId_138[this_432] = 1; } else { error111("Out of memory: Could not create Cell."); this_432 = 0; }; } else { Cell_firstFree_110 = (Cell_firstFree_110 - 1); this_432 = Cell_nextFree_296[Cell_firstFree_110]; Cell_typeId_138[this_432] = 1; }; return this_432; } function error111(string msg189) { $debugPrint114((msg_189 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set879(integer this125, any t146) { if (Cell_typeId_138[this_125] == 0) { if (this_125 == 0) { error111("Nullpointer exception when calling Cell.set"); } else { error111("Called Cell.set on invalid object."); }; } else { }; Cell_set191(this_125, t_146); } function dispatch_Cell_test_Cell_get113(integer this170) returns any { if (Cell_typeId_138[this_170] == 0) { if (this_170 == 0) { error111("Nullpointer exception when calling Cell.get"); } else { error111("Called Cell.get on invalid object."); }; } else { }; return Cell_get965(this_170); }