array A_nextFree188 integer A_firstFree120 integer A_maxIndex213 array A_typeId119 array A_i209 integer A_firstFree120 = 0 integer A_maxIndex213 = 0 function initGlobals148() { A_firstFree_120 = 0; A_maxIndex_213 = 0; } function main176() { initGlobals148(); init_test248(); } function config117() { } function init_test248() { local integer a140 local integer receiver205 local integer receiver199 local integer receiver172 receiver_205 = new_A138(); dispatch_A_test_A_plus111(receiver_205, 3); receiver_199 = receiver_205; dispatch_A_test_A_minus609(receiver_199, 4); receiver_172 = receiver_199; dispatch_A_test_A_plus111(receiver_172, 5); a_140 = receiver_172; if (A_i_209[a_140] == 4) { testSuccess585(); } else { }; } IS_NATIVE function testSuccess585() { } function A_plus632(integer this869, integer x183) { A_i_209[this_869] = (A_i_209[this_869] + x_183); } function A_minus194(integer this157, integer x206) { A_i_209[this_157] = (A_i_209[this_157] - x_206); } function A_init647(integer this974) { } function new_A138() returns integer { local integer this212 this_212 = alloc_A210(); construct_A115(this_212); return this_212; } function construct_A115(integer this100) { A_init647(this_100); } function alloc_A210() returns integer { local integer this175 if (A_firstFree_120 == 0) { if (A_maxIndex_213 < 32768) { A_maxIndex_213 = (A_maxIndex_213 + 1); this_175 = A_maxIndex_213; A_typeId_119[this_175] = 1; } else { error124("Out of memory: Could not create A."); this_175 = 0; }; } else { A_firstFree_120 = (A_firstFree_120 - 1); this_175 = A_nextFree_188[A_firstFree_120]; A_typeId_119[this_175] = 1; }; return this_175; } function error124(string msg241) { $debugPrint117((msg_241 + (" " + #getStackTrace()))); } function dispatch_A_test_A_plus111(integer this188, integer x140) { if (A_typeId_119[this_188] == 0) { if (this_188 == 0) { error124("Nullpointer exception when calling A.plus"); } else { error124("Called A.plus on invalid object."); }; } else { }; A_plus632(this_188, x_140); } function dispatch_A_test_A_minus609(integer this709, integer x774) { if (A_typeId_119[this_709] == 0) { if (this_709 == 0) { error124("Nullpointer exception when calling A.minus"); } else { error124("Called A.minus on invalid object."); }; } else { }; A_minus194(this_709, x_774); }