array A_nextFree132 integer A_firstFree196 integer A_maxIndex138 array A_typeId142 integer A_firstFree196 = 0 integer A_maxIndex138 = 0 function initGlobals116() { } function main155() { initGlobals116(); init_test213(); } function config115() { } function init_test213() { local integer this187 this_187 = new_A114(); if (A_typeId_142[this_187] == 0) { if (this_187 == 0) { error733("Nullpointer exception when calling A.foo"); } else { error733("Called A.foo on invalid object."); }; } else { }; } function new_A114() returns integer { local integer this423 if (A_firstFree_196 == 0) { if (A_maxIndex_138 < 32768) { A_maxIndex_138 = (A_maxIndex_138 + 1); this_423 = A_maxIndex_138; A_typeId_142[this_423] = 1; } else { error733("Out of memory: Could not create A."); this_423 = 0; }; } else { A_firstFree_196 = (A_firstFree_196 - 1); this_423 = A_nextFree_132[A_firstFree_196]; A_typeId_142[this_423] = 1; }; return this_423; } function error733(string msg202) { $debugPrint398((msg_202 + (" " + #getStackTrace()))); }