array C_nextFree432 integer C_firstFree600 integer C_maxIndex719 array C_typeId235 array C_i312 integer C_firstFree600 = 0 integer C_maxIndex719 = 0 function initGlobals601() { } function main876() { local integer this242 initGlobals601(); this_242 = new_C110(); if (C_typeId_235[this_242] == 0) { if (this_242 == 0) { error688("Nullpointer exception when calling C.C"); } else { error688("Called C.C on invalid object."); }; } else { }; destroyC104(this_242); } function config158() { } IS_NATIVE function testSuccess161() { } function new_C110() returns integer { local integer this195 if (C_firstFree_600 == 0) { if (C_maxIndex_719 < 32768) { C_maxIndex_719 = (C_maxIndex_719 + 1); this_195 = C_maxIndex_719; C_typeId_235[this_195] = 1; } else { error688("Out of memory: Could not create C."); this_195 = 0; }; } else { C_firstFree_600 = (C_firstFree_600 - 1); this_195 = C_nextFree_432[C_firstFree_600]; C_typeId_235[this_195] = 1; }; C_i_312[this_195] = 3; return this_195; } function destroyC104(integer this153) { C_i_312[this_153] = (C_i_312[this_153] + 1); testSuccess161(); if (C_typeId_235[this_153] == 0) { error688("Double free: object of type C"); } else { C_nextFree_432[C_firstFree_600] = this_153; C_firstFree_600 = (C_firstFree_600 + 1); C_typeId_235[this_153] = 0; }; } function error688(string msg806) { $debugPrint624((msg_806 + (" " + #getStackTrace()))); }