array A_nextFree149 integer A_firstFree325 integer A_maxIndex210 array Cell_nextFree363 integer Cell_firstFree101 integer Cell_maxIndex154 array Cell_typeId968 array A_x514 array Cell_x188 integer A_firstFree325 = 0 integer A_maxIndex210 = 0 integer Cell_firstFree101 = 0 integer Cell_maxIndex154 = 0 function initGlobals343() { A_firstFree_325 = 0; A_maxIndex_210 = 0; Cell_firstFree_101 = 0; Cell_maxIndex_154 = 0; } function main560() { initGlobals343(); init_test550(); } function config172() { } function init_test550() { local integer a903 local integer c491 a_903 = new_A920(42); c_491 = new_Cell192(); dispatch_Cell_test_Cell_set789(c_491, a_903); if (A_x_514[dispatch_Cell_test_Cell_get193(c_491)] == 42) { testSuccess344(); } else { }; } IS_NATIVE function testSuccess344() { } function A_init105(integer this211) { A_x_514[this_211] = 1; } function new_A920(integer x549) returns integer { local integer this232 this_232 = alloc_A541(); construct_A178(this_232, x_549); return this_232; } function construct_A178(integer this408, integer x210) { A_init105(this_408); A_x_514[this_408] = x_210; } function Cell_set155(integer this787, any x101) { Cell_x_188[this_787] = (x_101 castTo integer); } function Cell_get143(integer this959) returns any { return (Cell_x_188[this_959] castTo any); } function Cell_init106(integer this815) { } function new_Cell192() returns integer { local integer this381 this_381 = alloc_Cell209(); construct_Cell785(this_381); return this_381; } function construct_Cell785(integer this145) { Cell_init106(this_145); } function alloc_A541() returns integer { local integer this157 if (A_firstFree_325 == 0) { if (A_maxIndex_210 < 32768) { A_maxIndex_210 = (A_maxIndex_210 + 1); this_157 = A_maxIndex_210; } else { error205("Out of memory: Could not create A."); this_157 = 0; }; } else { A_firstFree_325 = (A_firstFree_325 - 1); this_157 = A_nextFree_149[A_firstFree_325]; }; return this_157; } function error205(string msg198) { $debugPrint162((msg_198 + (" " + #getStackTrace()))); } function alloc_Cell209() returns integer { local integer this436 if (Cell_firstFree_101 == 0) { if (Cell_maxIndex_154 < 32768) { Cell_maxIndex_154 = (Cell_maxIndex_154 + 1); this_436 = Cell_maxIndex_154; Cell_typeId_968[this_436] = 2; } else { error205("Out of memory: Could not create Cell."); this_436 = 0; }; } else { Cell_firstFree_101 = (Cell_firstFree_101 - 1); this_436 = Cell_nextFree_363[Cell_firstFree_101]; Cell_typeId_968[this_436] = 2; }; return this_436; } function dispatch_Cell_test_Cell_set789(integer this138, any x107) { if (Cell_typeId_968[this_138] == 0) { if (this_138 == 0) { error205("Nullpointer exception when calling Cell.set"); } else { error205("Called Cell.set on invalid object."); }; } else { }; Cell_set155(this_138, x_107); } function dispatch_Cell_test_Cell_get193(integer this122) returns any { local any test_Cell_get_result207 if (Cell_typeId_968[this_122] == 0) { if (this_122 == 0) { error205("Nullpointer exception when calling Cell.get"); } else { error205("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_207 = Cell_get143(this_122); return test_Cell_get_result_207; }