array Cell_nextFree199 integer Cell_firstFree137 integer Cell_maxIndex492 array Cell_typeId896 array Cell_elem495 integer blaFromIndex_return_z911 integer blaFromIndex_return_y131 integer Cell_firstFree137 = 0 integer Cell_maxIndex492 = 0 function initGlobals950() { } function main149() { initGlobals950(); init_test689(); } function config106() { } function init_test689() { local integer c701 c_701 = new_Cell970(); dispatch_Cell_test_Cell_set494(c_701, blaToIndex194(5, 3)); dispatch_Cell_test_Cell_set494(c_701, dispatch_Cell_test_Cell_get183(c_701)); if ((blaFromIndex252(dispatch_Cell_test_Cell_get183(c_701)) == 5) and (blaFromIndex_return_y_131 == 2)) { testSuccess146(); } else { }; } function blaToIndex194(integer b_z110, integer b_y296) returns integer { return b_z_110; } function blaFromIndex252(integer i159) returns integer { blaFromIndex_return_z_911 = i_159; blaFromIndex_return_y_131 = 2; return blaFromIndex_return_z_911; } IS_NATIVE function testSuccess146() { } function Cell_set701(integer this702, any t482) { Cell_elem_495[this_702] = t_482; } function Cell_get175(integer this171) returns any { return Cell_elem_495[this_171]; } function Cell_init205(integer this820) { } function new_Cell970() returns integer { local integer this691 this_691 = alloc_Cell153(); construct_Cell125(this_691); return this_691; } function construct_Cell125(integer this803) { Cell_init205(this_803); } function alloc_Cell153() returns integer { local integer this172 if (Cell_firstFree_137 == 0) { if (Cell_maxIndex_492 < 32768) { Cell_maxIndex_492 = (Cell_maxIndex_492 + 1); this_172 = Cell_maxIndex_492; Cell_typeId_896[this_172] = 1; } else { error604("Out of memory: Could not create Cell."); this_172 = 0; }; } else { Cell_firstFree_137 = (Cell_firstFree_137 - 1); this_172 = Cell_nextFree_199[Cell_firstFree_137]; Cell_typeId_896[this_172] = 1; }; return this_172; } function error604(string msg175) { $debugPrint374((msg_175 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set494(integer this362, any t203) { if (Cell_typeId_896[this_362] == 0) { if (this_362 == 0) { error604("Nullpointer exception when calling Cell.set"); } else { error604("Called Cell.set on invalid object."); }; } else { }; Cell_set701(this_362, t_203); } function dispatch_Cell_test_Cell_get183(integer this322) returns any { if (Cell_typeId_896[this_322] == 0) { if (this_322 == 0) { error604("Nullpointer exception when calling Cell.get"); } else { error604("Called Cell.get on invalid object."); }; } else { }; return Cell_get175(this_322); }