array Cell_nextFree322 integer Cell_firstFree362 integer Cell_maxIndex203 array Cell_typeId248 array Cell_elem110 integer blaFromIndex_return_z440 integer blaFromIndex_return_y397 integer Cell_firstFree362 = 0 integer Cell_maxIndex203 = 0 function initGlobals702() { Cell_firstFree_362 = 0; Cell_maxIndex_203 = 0; } function main492() { initGlobals702(); init_test482(); } function config896() { } function init_test482() { local integer c495 c_495 = new_Cell171(); dispatch_Cell_test_Cell_set296(c_495, blaToIndex820(5, 3)); dispatch_Cell_test_Cell_set296(c_495, dispatch_Cell_test_Cell_get911(c_495)); if ((blaFromIndex691(dispatch_Cell_test_Cell_get911(c_495)) == 5) and (blaFromIndex_return_y_397 == 2)) { testSuccess803(); } else { }; } function blaToIndex820(integer b_z200, integer b_y120) returns integer { return b_z_200; } function blaFromIndex691(integer i104) returns integer { blaFromIndex_return_z_440 = i_104; blaFromIndex_return_y_397 = 2; return blaFromIndex_return_z_440; } IS_NATIVE function testSuccess803() { } function Cell_set206(integer this472, any t172) { Cell_elem_110[this_472] = t_172; } function Cell_get134(integer this604) returns any { return Cell_elem_110[this_604]; } function Cell_init156(integer this175) { } function new_Cell171() returns integer { local integer this374 this_374 = alloc_Cell131(); construct_Cell796(this_374); return this_374; } function construct_Cell796(integer this315) { Cell_init156(this_315); } function alloc_Cell131() returns integer { local integer this853 if (Cell_firstFree_362 == 0) { if (Cell_maxIndex_203 < 32768) { Cell_maxIndex_203 = (Cell_maxIndex_203 + 1); this_853 = Cell_maxIndex_203; Cell_typeId_248[this_853] = 1; } else { error204("Out of memory: Could not create Cell."); this_853 = 0; }; } else { Cell_firstFree_362 = (Cell_firstFree_362 - 1); this_853 = Cell_nextFree_322[Cell_firstFree_362]; Cell_typeId_248[this_853] = 1; }; return this_853; } function error204(string msg157) { $debugPrint801((msg_157 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set296(integer this184, any t450) { if (Cell_typeId_248[this_184] == 0) { if (this_184 == 0) { error204("Nullpointer exception when calling Cell.set"); } else { error204("Called Cell.set on invalid object."); }; } else { }; Cell_set206(this_184, t_450); } function dispatch_Cell_test_Cell_get911(integer this969) returns any { local any test_Cell_get_result996 if (Cell_typeId_248[this_969] == 0) { if (this_969 == 0) { error204("Nullpointer exception when calling Cell.get"); } else { error204("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_996 = Cell_get134(this_969); return test_Cell_get_result_996; }