array A_nextFree140 integer A_firstFree612 integer A_maxIndex167 array A_typeId100 integer A_firstFree612 = 0 integer A_maxIndex167 = 0 function initGlobals653() { } function main381() { local integer this170 initGlobals653(); this_170 = new_A136(); if (A_typeId_100[this_170] == 0) { if (this_170 == 0) { error155("Nullpointer exception when calling A.foo"); } else { error155("Called A.foo on invalid object."); }; } else { }; } function config115() { } function new_A136() returns integer { local integer this171 local integer this100 if (A_firstFree_612 == 0) { if (A_maxIndex_167 < 32768) { A_maxIndex_167 = (A_maxIndex_167 + 1); this_100 = A_maxIndex_167; A_typeId_100[this_100] = 1; } else { error155("Out of memory: Could not create A."); this_100 = 0; }; } else { A_firstFree_612 = (A_firstFree_612 - 1); this_100 = A_nextFree_140[A_firstFree_612]; A_typeId_100[this_100] = 1; }; this_171 = this_100; return this_171; } function error155(string msg107) { $debugPrint191((msg_107 + (" " + #getStackTrace()))); }