array A_nextFree677 integer A_firstFree149 integer A_maxIndex934 array Cell_nextFree111 integer Cell_firstFree121 integer Cell_maxIndex763 array Cell_typeId119 array A_x890 array Cell_x337 integer A_firstFree149 = 0 integer A_maxIndex934 = 0 integer Cell_firstFree121 = 0 integer Cell_maxIndex763 = 0 function initGlobals203() { } function main295() { initGlobals203(); init_test736(); } function config200() { } function init_test736() { local integer a723 local integer c117 a_723 = new_A151(42); c_117 = new_Cell142(); dispatch_Cell_test_Cell_set203(c_117, a_723); if (A_x_890[dispatch_Cell_test_Cell_get123(c_117)] == 42) { testSuccess206(); } else { }; } IS_NATIVE function testSuccess206() { } function A_init766(integer this213) { A_x_890[this_213] = 1; } function new_A151(integer x208) returns integer { local integer this157 this_157 = alloc_A299(); construct_A120(this_157, x_208); return this_157; } function construct_A120(integer this923, integer x148) { A_init766(this_923); A_x_890[this_923] = x_148; } function Cell_set198(integer this185, any x458) { Cell_x_337[this_185] = (x_458 castTo integer); } function Cell_get271(integer this183) returns any { return (Cell_x_337[this_183] castTo any); } function Cell_init799(integer this184) { } function new_Cell142() returns integer { local integer this107 this_107 = alloc_Cell758(); construct_Cell110(this_107); return this_107; } function construct_Cell110(integer this584) { Cell_init799(this_584); } function alloc_A299() returns integer { local integer this532 if (A_firstFree_149 == 0) { if (A_maxIndex_934 < 32768) { A_maxIndex_934 = (A_maxIndex_934 + 1); this_532 = A_maxIndex_934; } else { error143("Out of memory: Could not create A."); this_532 = 0; }; } else { A_firstFree_149 = (A_firstFree_149 - 1); this_532 = A_nextFree_677[A_firstFree_149]; }; return this_532; } function error143(string msg910) { $debugPrint145((msg_910 + (" " + #getStackTrace()))); } function alloc_Cell758() returns integer { local integer this770 if (Cell_firstFree_121 == 0) { if (Cell_maxIndex_763 < 32768) { Cell_maxIndex_763 = (Cell_maxIndex_763 + 1); this_770 = Cell_maxIndex_763; Cell_typeId_119[this_770] = 2; } else { error143("Out of memory: Could not create Cell."); this_770 = 0; }; } else { Cell_firstFree_121 = (Cell_firstFree_121 - 1); this_770 = Cell_nextFree_111[Cell_firstFree_121]; Cell_typeId_119[this_770] = 2; }; return this_770; } function dispatch_Cell_test_Cell_set203(integer this844, any x108) { if (Cell_typeId_119[this_844] == 0) { if (this_844 == 0) { error143("Nullpointer exception when calling Cell.set"); } else { error143("Called Cell.set on invalid object."); }; } else { }; Cell_set198(this_844, x_108); } function dispatch_Cell_test_Cell_get123(integer this113) returns any { if (Cell_typeId_119[this_113] == 0) { if (this_113 == 0) { error143("Nullpointer exception when calling Cell.get"); } else { error143("Called Cell.get on invalid object."); }; } else { }; return Cell_get271(this_113); }