array A_nextFree155 integer A_firstFree895 integer A_maxIndex842 array A_typeId196 integer A_firstFree895 = 0 integer A_maxIndex842 = 0 function initGlobals793() { A_firstFree_895 = 0; A_maxIndex_842 = 0; } function main157() { initGlobals793(); init_test451(); } function config493() { } function init_test451() { dispatch_A_test_A_foo420(new_A129()); } function A_foo548(integer this157) { } function A_init538(integer this583) { } function new_A129() returns integer { local integer this177 this_177 = alloc_A125(); construct_A103(this_177); return this_177; } function construct_A103(integer this474) { A_init538(this_474); } function alloc_A125() returns integer { local integer this237 if (A_firstFree_895 == 0) { if (A_maxIndex_842 < 32768) { A_maxIndex_842 = (A_maxIndex_842 + 1); this_237 = A_maxIndex_842; A_typeId_196[this_237] = 1; } else { error140("Out of memory: Could not create A."); this_237 = 0; }; } else { A_firstFree_895 = (A_firstFree_895 - 1); this_237 = A_nextFree_155[A_firstFree_895]; A_typeId_196[this_237] = 1; }; return this_237; } function error140(string msg180) { $debugPrint116((msg_180 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo420(integer this164) { if (A_typeId_196[this_164] == 0) { if (this_164 == 0) { error140("Nullpointer exception when calling A.foo"); } else { error140("Called A.foo on invalid object."); }; } else { }; A_foo548(this_164); }