array C_nextFree192 integer C_firstFree908 integer C_maxIndex158 array C_typeId294 integer C_firstFree908 = 0 integer C_maxIndex158 = 0 function initGlobals946() { } function main173() { initGlobals946(); init_test202(); } function config176() { } function init_test202() { local integer this167 this_167 = new_D205(); if (C_typeId_294[this_167] == 0) { if (this_167 == 0) { error178("Nullpointer exception when calling C.foo"); } else { error178("Called C.foo on invalid object."); }; } else { }; testSuccess512(); } IS_NATIVE function testSuccess512() { } function new_D205() returns integer { local integer this171 if (C_firstFree_908 == 0) { if (C_maxIndex_158 < 32768) { C_maxIndex_158 = (C_maxIndex_158 + 1); this_171 = C_maxIndex_158; C_typeId_294[this_171] = 2; } else { error178("Out of memory: Could not create D."); this_171 = 0; }; } else { C_firstFree_908 = (C_firstFree_908 - 1); this_171 = C_nextFree_192[C_firstFree_908]; C_typeId_294[this_171] = 2; }; return this_171; } function error178(string msg123) { $debugPrint125((msg_123 + (" " + #getStackTrace()))); }