array A_nextFree702 integer A_firstFree209 integer A_maxIndex159 array Cell_nextFree287 integer Cell_firstFree692 integer Cell_maxIndex172 array Cell_typeId346 array A_x182 array Cell_x891 integer A_firstFree209 = 0 integer A_maxIndex159 = 0 integer Cell_firstFree692 = 0 integer Cell_maxIndex172 = 0 function initGlobals200() { A_firstFree_209 = 0; A_maxIndex_159 = 0; Cell_firstFree_692 = 0; Cell_maxIndex_172 = 0; } function main994() { initGlobals200(); init_test104(); } function config213() { } function init_test104() { local integer a164 local integer c144 a_164 = new_A178(42); c_144 = new_Cell151(); dispatch_Cell_test_Cell_set144(c_144, a_164); if (A_x_182[dispatch_Cell_test_Cell_get126(c_144)] == 42) { testSuccess743(); } else { }; } IS_NATIVE function testSuccess743() { } function A_init107(integer this425) { A_x_182[this_425] = 1; } function new_A178(integer x461) returns integer { local integer this382 this_382 = alloc_A494(); construct_A103(this_382, x_461); return this_382; } function construct_A103(integer this151, integer x117) { A_init107(this_151); A_x_182[this_151] = x_117; } function Cell_set438(integer this128, any x181) { Cell_x_891[this_128] = (x_181 castTo integer); } function Cell_get889(integer this122) returns any { return (Cell_x_891[this_122] castTo any); } function Cell_init106(integer this316) { } function new_Cell151() returns integer { local integer this797 this_797 = alloc_Cell175(); construct_Cell806(this_797); return this_797; } function construct_Cell806(integer this135) { Cell_init106(this_135); } function alloc_A494() returns integer { local integer this181 if (A_firstFree_209 == 0) { if (A_maxIndex_159 < 32768) { A_maxIndex_159 = (A_maxIndex_159 + 1); this_181 = A_maxIndex_159; } else { error142("Out of memory: Could not create A."); this_181 = 0; }; } else { A_firstFree_209 = (A_firstFree_209 - 1); this_181 = A_nextFree_702[A_firstFree_209]; }; return this_181; } function error142(string msg202) { $debugPrint653((msg_202 + (" " + #getStackTrace()))); } function alloc_Cell175() returns integer { local integer this132 if (Cell_firstFree_692 == 0) { if (Cell_maxIndex_172 < 32768) { Cell_maxIndex_172 = (Cell_maxIndex_172 + 1); this_132 = Cell_maxIndex_172; Cell_typeId_346[this_132] = 2; } else { error142("Out of memory: Could not create Cell."); this_132 = 0; }; } else { Cell_firstFree_692 = (Cell_firstFree_692 - 1); this_132 = Cell_nextFree_287[Cell_firstFree_692]; Cell_typeId_346[this_132] = 2; }; return this_132; } function dispatch_Cell_test_Cell_set144(integer this168, any x750) { if (Cell_typeId_346[this_168] == 0) { if (this_168 == 0) { error142("Nullpointer exception when calling Cell.set"); } else { error142("Called Cell.set on invalid object."); }; } else { }; Cell_set438(this_168, x_750); } function dispatch_Cell_test_Cell_get126(integer this159) returns any { local any test_Cell_get_result187 if (Cell_typeId_346[this_159] == 0) { if (this_159 == 0) { error142("Nullpointer exception when calling Cell.get"); } else { error142("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_187 = Cell_get889(this_159); return test_Cell_get_result_187; }