array A_nextFree409 integer A_firstFree113 integer A_maxIndex337 array A_typeId765 integer A_firstFree113 = 0 integer A_maxIndex337 = 0 function initGlobals516() { } function main599() { initGlobals516(); init_test891(); } function config147() { } function init_test891() { local integer this322 this_322 = new_A109(); if (A_typeId_765[this_322] == 0) { if (this_322 == 0) { error244("Nullpointer exception when calling A.foo"); } else { error244("Called A.foo on invalid object."); }; } else { }; } function new_A109() returns integer { local integer this453 local integer this204 if (A_firstFree_113 == 0) { if (A_maxIndex_337 < 32768) { A_maxIndex_337 = (A_maxIndex_337 + 1); this_204 = A_maxIndex_337; A_typeId_765[this_204] = 1; } else { error244("Out of memory: Could not create A."); this_204 = 0; }; } else { A_firstFree_113 = (A_firstFree_113 - 1); this_204 = A_nextFree_409[A_firstFree_113]; A_typeId_765[this_204] = 1; }; this_453 = this_204; return this_453; } function error244(string msg205) { $debugPrint199((msg_205 + (" " + #getStackTrace()))); }