array Cell_nextFree119 integer Cell_firstFree205 integer Cell_maxIndex937 array Cell_typeId179 array Cell_elem158 integer blaFromIndex_return_z684 integer blaFromIndex_return_y186 integer Cell_firstFree205 = 0 integer Cell_maxIndex937 = 0 function initGlobals140() { } function main476() { initGlobals140(); init_test283(); } function config282() { } function init_test283() { local integer c449 c_449 = new_Cell203(); dispatch_Cell_test_Cell_set143(c_449, blaToIndex487(5, 3)); if ((blaFromIndex167(dispatch_Cell_test_Cell_get171(c_449)) == 5) and (blaFromIndex_return_y_186 == 2)) { testSuccess143(); } else { }; } function blaToIndex487(integer b_z687, integer b_y735) returns integer { return b_z_687; } function blaFromIndex167(integer i280) returns integer { blaFromIndex_return_z_684 = i_280; blaFromIndex_return_y_186 = 2; return blaFromIndex_return_z_684; } IS_NATIVE function testSuccess143() { } function Cell_set128(integer this718, any t167) { Cell_elem_158[this_718] = t_167; } function Cell_get209(integer this677) returns any { return Cell_elem_158[this_677]; } function Cell_init124(integer this154) { } function new_Cell203() returns integer { local integer this125 this_125 = alloc_Cell107(); construct_Cell998(this_125); return this_125; } function construct_Cell998(integer this122) { Cell_init124(this_122); } function alloc_Cell107() returns integer { local integer this705 if (Cell_firstFree_205 == 0) { if (Cell_maxIndex_937 < 32768) { Cell_maxIndex_937 = (Cell_maxIndex_937 + 1); this_705 = Cell_maxIndex_937; Cell_typeId_179[this_705] = 1; } else { error966("Out of memory: Could not create Cell."); this_705 = 0; }; } else { Cell_firstFree_205 = (Cell_firstFree_205 - 1); this_705 = Cell_nextFree_119[Cell_firstFree_205]; Cell_typeId_179[this_705] = 1; }; return this_705; } function error966(string msg871) { $debugPrint161((msg_871 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set143(integer this831, any t103) { if (Cell_typeId_179[this_831] == 0) { if (this_831 == 0) { error966("Nullpointer exception when calling Cell.set"); } else { error966("Called Cell.set on invalid object."); }; } else { }; Cell_set128(this_831, t_103); } function dispatch_Cell_test_Cell_get171(integer this960) returns any { if (Cell_typeId_179[this_960] == 0) { if (this_960 == 0) { error966("Nullpointer exception when calling Cell.get"); } else { error966("Called Cell.get on invalid object."); }; } else { }; return Cell_get209(this_960); }