array A_nextFree155 integer A_firstFree478 integer A_maxIndex154 array A_typeId122 array A_i440 integer A_firstFree478 = 0 integer A_maxIndex154 = 0 function initGlobals109() { A_firstFree_478 = 0; A_maxIndex_154 = 0; } function main312() { initGlobals109(); init_test141(); } function config141() { } function init_test141() { local integer a130 local integer receiver142 local integer receiver283 local integer receiver117 receiver_142 = new_A147(); dispatch_A_test_A_plus929(receiver_142, 3); receiver_283 = receiver_142; dispatch_A_test_A_minus203(receiver_283, 4); receiver_117 = receiver_283; dispatch_A_test_A_plus929(receiver_117, 5); a_130 = receiver_117; if (A_i_440[a_130] == 4) { testSuccess170(); } else { }; } IS_NATIVE function testSuccess170() { } function A_plus976(integer this141, integer x197) { A_i_440[this_141] = (A_i_440[this_141] + x_197); } function A_minus833(integer this441, integer x175) { A_i_440[this_441] = (A_i_440[this_441] - x_175); } function A_init323(integer this910) { } function new_A147() returns integer { local integer this144 this_144 = alloc_A186(); construct_A571(this_144); return this_144; } function construct_A571(integer this504) { A_init323(this_504); } function alloc_A186() returns integer { local integer this142 if (A_firstFree_478 == 0) { if (A_maxIndex_154 < 32768) { A_maxIndex_154 = (A_maxIndex_154 + 1); this_142 = A_maxIndex_154; A_typeId_122[this_142] = 1; } else { error141("Out of memory: Could not create A."); this_142 = 0; }; } else { A_firstFree_478 = (A_firstFree_478 - 1); this_142 = A_nextFree_155[A_firstFree_478]; A_typeId_122[this_142] = 1; }; return this_142; } function error141(string msg230) { $debugPrint110((msg_230 + (" " + #getStackTrace()))); } function dispatch_A_test_A_plus929(integer this199, integer x195) { if (A_typeId_122[this_199] == 0) { if (this_199 == 0) { error141("Nullpointer exception when calling A.plus"); } else { error141("Called A.plus on invalid object."); }; } else { }; A_plus976(this_199, x_195); } function dispatch_A_test_A_minus203(integer this251, integer x224) { if (A_typeId_122[this_251] == 0) { if (this_251 == 0) { error141("Nullpointer exception when calling A.minus"); } else { error141("Called A.minus on invalid object."); }; } else { }; A_minus833(this_251, x_224); }