array C_nextFree375 integer C_firstFree103 integer C_maxIndex690 array C_typeId453 integer C_firstFree103 = 0 integer C_maxIndex690 = 0 function initGlobals136() { } function main117() { initGlobals136(); init_test397(); } function config156() { } function init_test397() { local integer c892 c_892 = new_C664(); if (C_typeId_453[c_892] == 0) { if (c_892 == 0) { error105("Nullpointer exception when calling C.foo"); } else { error105("Called C.foo on invalid object."); }; } else { }; testSuccess146(); } IS_NATIVE function testSuccess146() { } function new_C664() returns integer { local integer this784 if (C_firstFree_103 == 0) { if (C_maxIndex_690 < 32768) { C_maxIndex_690 = (C_maxIndex_690 + 1); this_784 = C_maxIndex_690; C_typeId_453[this_784] = 1; } else { error105("Out of memory: Could not create C."); this_784 = 0; }; } else { C_firstFree_103 = (C_firstFree_103 - 1); this_784 = C_nextFree_375[C_firstFree_103]; C_typeId_453[this_784] = 1; }; return this_784; } function error105(string msg212) { $debugPrint183((msg_212 + (" " + #getStackTrace()))); }