array C_nextFree156 integer C_firstFree204 integer C_maxIndex115 integer C_firstFree204 = 0 integer C_maxIndex115 = 0 function initGlobals434() { C_firstFree_204 = 0; C_maxIndex_115 = 0; } function main100() { initGlobals434(); init_Test518(); } function config440() { } function init_Test518() { testEnum160(); testClass149(); } function testEnum160() { local integer zeroEnum110 local integer zeroInt178 local integer zeroEnum2208 zeroEnum_110 = 0; zeroInt_178 = (zeroEnum_110 castTo integer); zeroEnum2_208 = (zeroInt_178 castTo integer); takesInt202((zeroEnum_110 castTo integer)); takesInt202(zeroInt_178); takesInt202((zeroEnum2_208 castTo integer)); } IS_NATIVE function takesInt202(integer i166) { } function testClass149() { local integer cObj167 local integer cInt183 local integer cObj2829 cObj_167 = new_C153(); cInt_183 = (cObj_167 castTo integer); cObj2_829 = (cInt_183 castTo integer); takesC206(cObj_167); takesInt202(cInt_183); takesC206(cObj2_829); } IS_NATIVE function takesC206(integer c180) { } function C_init113(integer this204) { } function new_C153() returns integer { local integer this901 this_901 = alloc_C884(); construct_C194(this_901); return this_901; } function construct_C194(integer this993) { C_init113(this_993); } function alloc_C884() returns integer { local integer this574 if (C_firstFree_204 == 0) { if (C_maxIndex_115 < 32768) { C_maxIndex_115 = (C_maxIndex_115 + 1); this_574 = C_maxIndex_115; } else { error132("Out of memory: Could not create C."); this_574 = 0; }; } else { C_firstFree_204 = (C_firstFree_204 - 1); this_574 = C_nextFree_156[C_firstFree_204]; }; return this_574; } function error132(string msg622) { $debugPrint528((msg_622 + (" " + #getStackTrace()))); }