array Cell_nextFree495 integer Cell_firstFree510 integer Cell_maxIndex219 array Cell_typeId540 array Cell_elem986 integer blaFromIndex_return_z390 integer blaFromIndex_return_y124 integer Cell_firstFree510 = 0 integer Cell_maxIndex219 = 0 function initGlobals217() { } function main212() { initGlobals217(); init_test130(); } function config170() { } function init_test130() { local integer c923 c_923 = new_Cell186(); dispatch_Cell_test_Cell_set203(c_923, blaToIndex130(5, 3)); dispatch_Cell_test_Cell_set203(c_923, dispatch_Cell_test_Cell_get768(c_923)); if ((blaFromIndex173(dispatch_Cell_test_Cell_get768(c_923)) == 5) and (blaFromIndex_return_y_124 == 2)) { testSuccess146(); } else { }; } function blaToIndex130(integer b_z213, integer b_y132) returns integer { return b_z_213; } function blaFromIndex173(integer i214) returns integer { blaFromIndex_return_z_390 = i_214; blaFromIndex_return_y_124 = 2; return blaFromIndex_return_z_390; } IS_NATIVE function testSuccess146() { } function Cell_set115(integer this586, any t147) { Cell_elem_986[this_586] = t_147; } function Cell_get473(integer this340) returns any { return Cell_elem_986[this_340]; } function Cell_init147(integer this430) { } function new_Cell186() returns integer { local integer this153 this_153 = alloc_Cell363(); construct_Cell209(this_153); return this_153; } function construct_Cell209(integer this188) { Cell_init147(this_188); } function alloc_Cell363() returns integer { local integer this113 if (Cell_firstFree_510 == 0) { if (Cell_maxIndex_219 < 32768) { Cell_maxIndex_219 = (Cell_maxIndex_219 + 1); this_113 = Cell_maxIndex_219; Cell_typeId_540[this_113] = 1; } else { error227("Out of memory: Could not create Cell."); this_113 = 0; }; } else { Cell_firstFree_510 = (Cell_firstFree_510 - 1); this_113 = Cell_nextFree_495[Cell_firstFree_510]; Cell_typeId_540[this_113] = 1; }; return this_113; } function error227(string msg832) { $debugPrint180((msg_832 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set203(integer this699, any t241) { if (Cell_typeId_540[this_699] == 0) { if (this_699 == 0) { error227("Nullpointer exception when calling Cell.set"); } else { error227("Called Cell.set on invalid object."); }; } else { }; Cell_set115(this_699, t_241); } function dispatch_Cell_test_Cell_get768(integer this310) returns any { if (Cell_typeId_540[this_310] == 0) { if (this_310 == 0) { error227("Nullpointer exception when calling Cell.get"); } else { error227("Called Cell.get on invalid object."); }; } else { }; return Cell_get473(this_310); }