array C_nextFree174 integer C_firstFree107 integer C_maxIndex206 array C_typeId147 integer C_firstFree107 = 0 integer C_maxIndex206 = 0 function initGlobals103() { } function main207() { local integer e282 initGlobals103(); e_282 = new_E114(); if (dispatch_C_test_C_foo180(e_282) == 4) { testSuccess145(); } else { }; } function config100() { } IS_NATIVE function testSuccess145() { } function new_E114() returns integer { local integer this561 local integer this372 local integer this183 if (C_firstFree_107 == 0) { if (C_maxIndex_206 < 32768) { C_maxIndex_206 = (C_maxIndex_206 + 1); this_372 = C_maxIndex_206; C_typeId_147[this_372] = 3; } else { error226("Out of memory: Could not create E."); this_372 = 0; }; } else { C_firstFree_107 = (C_firstFree_107 - 1); this_372 = C_nextFree_174[C_firstFree_107]; C_typeId_147[this_372] = 3; }; this_561 = this_372; this_183 = this_561; return this_561; } function error226(string msg486) { $debugPrint145((msg_486 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo180(integer this190) returns integer { local integer test_C_foo_result152 if (C_typeId_147[this_190] == 0) { if (this_190 == 0) { error226("Nullpointer exception when calling C.foo"); } else { error226("Called C.foo on invalid object."); }; } else { }; if (C_typeId_147[this_190] <= 2) { test_C_foo_result_152 = 3; } else { test_C_foo_result_152 = 4; }; return test_C_foo_result_152; }