array A_nextFree165 integer A_firstFree566 integer A_maxIndex118 array Cell_nextFree374 integer Cell_firstFree199 integer Cell_maxIndex134 array Cell_typeId184 array A_x146 array Cell_x593 integer A_firstFree566 = 0 integer A_maxIndex118 = 0 integer Cell_firstFree199 = 0 integer Cell_maxIndex134 = 0 function initGlobals106() { } function main786() { initGlobals106(); init_test876(); } function config611() { } function init_test876() { local integer a508 local integer c569 a_508 = new_A413(42); c_569 = new_Cell161(); dispatch_Cell_test_Cell_set305(c_569, a_508); if (A_x_146[dispatch_Cell_test_Cell_get178(c_569)] == 42) { testSuccess894(); } else { }; } IS_NATIVE function testSuccess894() { } function A_init158(integer this363) { A_x_146[this_363] = 1; } function new_A413(integer x112) returns integer { local integer this128 this_128 = alloc_A113(); construct_A140(this_128, x_112); return this_128; } function construct_A140(integer this793, integer x128) { A_init158(this_793); A_x_146[this_793] = x_128; } function Cell_set200(integer this497, any x814) { Cell_x_593[this_497] = (x_814 castTo integer); } function Cell_get119(integer this117) returns any { return (Cell_x_593[this_117] castTo any); } function Cell_init105(integer this628) { } function new_Cell161() returns integer { local integer this162 this_162 = alloc_Cell165(); construct_Cell187(this_162); return this_162; } function construct_Cell187(integer this152) { Cell_init105(this_152); } function alloc_A113() returns integer { local integer this175 if (A_firstFree_566 == 0) { if (A_maxIndex_118 < 32768) { A_maxIndex_118 = (A_maxIndex_118 + 1); this_175 = A_maxIndex_118; } else { error154("Out of memory: Could not create A."); this_175 = 0; }; } else { A_firstFree_566 = (A_firstFree_566 - 1); this_175 = A_nextFree_165[A_firstFree_566]; }; return this_175; } function error154(string msg903) { $debugPrint111((msg_903 + (" " + #getStackTrace()))); } function alloc_Cell165() returns integer { local integer this681 if (Cell_firstFree_199 == 0) { if (Cell_maxIndex_134 < 32768) { Cell_maxIndex_134 = (Cell_maxIndex_134 + 1); this_681 = Cell_maxIndex_134; Cell_typeId_184[this_681] = 2; } else { error154("Out of memory: Could not create Cell."); this_681 = 0; }; } else { Cell_firstFree_199 = (Cell_firstFree_199 - 1); this_681 = Cell_nextFree_374[Cell_firstFree_199]; Cell_typeId_184[this_681] = 2; }; return this_681; } function dispatch_Cell_test_Cell_set305(integer this258, any x110) { if (Cell_typeId_184[this_258] == 0) { if (this_258 == 0) { error154("Nullpointer exception when calling Cell.set"); } else { error154("Called Cell.set on invalid object."); }; } else { }; Cell_set200(this_258, x_110); } function dispatch_Cell_test_Cell_get178(integer this664) returns any { if (Cell_typeId_184[this_664] == 0) { if (this_664 == 0) { error154("Nullpointer exception when calling Cell.get"); } else { error154("Called Cell.get on invalid object."); }; } else { }; return Cell_get119(this_664); }