array C_nextFree153 integer C_firstFree331 integer C_maxIndex168 array C_typeId325 integer C_firstFree331 = 0 integer C_maxIndex168 = 0 function initGlobals198() { } function main691() { initGlobals198(); init_test836(); } function config382() { } function init_test836() { local integer this197 local integer test_C_foo_result169 this_197 = new_D539(); if (C_typeId_325[this_197] == 0) { if (this_197 == 0) { error492("Nullpointer exception when calling C.foo"); } else { error492("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_169 = 3; if (test_C_foo_result_169 == 3) { testSuccess195(); } else { }; } IS_NATIVE function testSuccess195() { } function new_D539() returns integer { local integer this208 local integer this111 if (C_firstFree_331 == 0) { if (C_maxIndex_168 < 32768) { C_maxIndex_168 = (C_maxIndex_168 + 1); this_111 = C_maxIndex_168; C_typeId_325[this_111] = 2; } else { error492("Out of memory: Could not create D."); this_111 = 0; }; } else { C_firstFree_331 = (C_firstFree_331 - 1); this_111 = C_nextFree_153[C_firstFree_331]; C_typeId_325[this_111] = 2; }; this_208 = this_111; return this_208; } function error492(string msg950) { $debugPrint211((msg_950 + (" " + #getStackTrace()))); }