array A_nextFree850 integer A_firstFree171 integer A_maxIndex151 array Cell_nextFree335 integer Cell_firstFree929 integer Cell_maxIndex903 array Cell_typeId374 array A_x109 array Cell_x105 integer A_firstFree171 = 0 integer A_maxIndex151 = 0 integer Cell_firstFree929 = 0 integer Cell_maxIndex903 = 0 function initGlobals644() { A_firstFree_171 = 0; A_maxIndex_151 = 0; Cell_firstFree_929 = 0; Cell_maxIndex_903 = 0; } function main146() { initGlobals644(); init_test725(); } function config194() { } function init_test725() { local integer a207 local integer c104 a_207 = new_A284(42); c_104 = new_Cell190(); dispatch_Cell_test_Cell_set184(c_104, a_207); if (A_x_109[dispatch_Cell_test_Cell_get460(c_104)] == 42) { testSuccess191(); } else { }; } IS_NATIVE function testSuccess191() { } function A_init170(integer this499) { A_x_109[this_499] = 1; } function new_A284(integer x916) returns integer { local integer this162 this_162 = alloc_A134(); construct_A104(this_162, x_916); return this_162; } function construct_A104(integer this118, integer x186) { A_init170(this_118); A_x_109[this_118] = x_186; } function Cell_set128(integer this179, any x127) { Cell_x_105[this_179] = (x_127 castTo integer); } function Cell_get752(integer this800) returns any { return (Cell_x_105[this_800] castTo any); } function Cell_init153(integer this155) { } function new_Cell190() returns integer { local integer this144 this_144 = alloc_Cell122(); construct_Cell119(this_144); return this_144; } function construct_Cell119(integer this122) { Cell_init153(this_122); } function alloc_A134() returns integer { local integer this110 if (A_firstFree_171 == 0) { if (A_maxIndex_151 < 32768) { A_maxIndex_151 = (A_maxIndex_151 + 1); this_110 = A_maxIndex_151; } else { error290("Out of memory: Could not create A."); this_110 = 0; }; } else { A_firstFree_171 = (A_firstFree_171 - 1); this_110 = A_nextFree_850[A_firstFree_171]; }; return this_110; } function error290(string msg984) { $debugPrint111((msg_984 + (" " + #getStackTrace()))); } function alloc_Cell122() returns integer { local integer this120 if (Cell_firstFree_929 == 0) { if (Cell_maxIndex_903 < 32768) { Cell_maxIndex_903 = (Cell_maxIndex_903 + 1); this_120 = Cell_maxIndex_903; Cell_typeId_374[this_120] = 2; } else { error290("Out of memory: Could not create Cell."); this_120 = 0; }; } else { Cell_firstFree_929 = (Cell_firstFree_929 - 1); this_120 = Cell_nextFree_335[Cell_firstFree_929]; Cell_typeId_374[this_120] = 2; }; return this_120; } function dispatch_Cell_test_Cell_set184(integer this400, any x106) { if (Cell_typeId_374[this_400] == 0) { if (this_400 == 0) { error290("Nullpointer exception when calling Cell.set"); } else { error290("Called Cell.set on invalid object."); }; } else { }; Cell_set128(this_400, x_106); } function dispatch_Cell_test_Cell_get460(integer this169) returns any { local any test_Cell_get_result171 if (Cell_typeId_374[this_169] == 0) { if (this_169 == 0) { error290("Nullpointer exception when calling Cell.get"); } else { error290("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_171 = Cell_get752(this_169); return test_Cell_get_result_171; }