array C_nextFree143 integer C_firstFree149 integer C_maxIndex657 integer C_firstFree149 = 0 integer C_maxIndex657 = 0 function initGlobals148() { C_firstFree_149 = 0; C_maxIndex_657 = 0; } function main800() { initGlobals148(); init_Test122(); } function config118() { } function init_Test122() { testEnum192(); testClass161(); } function testEnum192() { local integer zeroEnum898 local integer zeroInt681 local integer zeroEnum2171 zeroEnum_898 = 0; zeroInt_681 = (zeroEnum_898 castTo integer); zeroEnum2_171 = (zeroInt_681 castTo integer); takesInt202((zeroEnum_898 castTo integer)); takesInt202(zeroInt_681); takesInt202((zeroEnum2_171 castTo integer)); } IS_NATIVE function takesInt202(integer i165) { } function testClass161() { local integer cObj594 local integer cInt160 local integer cObj2100 cObj_594 = new_C189(); cInt_160 = (cObj_594 castTo integer); cObj2_100 = (cInt_160 castTo integer); takesC153(cObj_594); takesInt202(cInt_160); takesC153(cObj2_100); } IS_NATIVE function takesC153(integer c346) { } function C_init130(integer this140) { } function new_C189() returns integer { local integer this176 this_176 = alloc_C121(); construct_C145(this_176); return this_176; } function construct_C145(integer this129) { C_init130(this_129); } function alloc_C121() returns integer { local integer this703 if (C_firstFree_149 == 0) { if (C_maxIndex_657 < 32768) { C_maxIndex_657 = (C_maxIndex_657 + 1); this_703 = C_maxIndex_657; } else { error761("Out of memory: Could not create C."); this_703 = 0; }; } else { C_firstFree_149 = (C_firstFree_149 - 1); this_703 = C_nextFree_143[C_firstFree_149]; }; return this_703; } function error761(string msg148) { $debugPrint877((msg_148 + (" " + #getStackTrace()))); }