array C_nextFree137 integer C_firstFree343 integer C_maxIndex537 array C_typeId441 integer C_firstFree343 = 0 integer C_maxIndex537 = 0 function initGlobals169() { } function main523() { local integer e675 initGlobals169(); e_675 = new_E588(); if (dispatch_C_test_C_foo181(e_675) == 4) { testSuccess162(); } else { }; } function config417() { } IS_NATIVE function testSuccess162() { } function new_E588() returns integer { local integer this646 local integer this185 local integer this560 if (C_firstFree_343 == 0) { if (C_maxIndex_537 < 32768) { C_maxIndex_537 = (C_maxIndex_537 + 1); this_185 = C_maxIndex_537; C_typeId_441[this_185] = 3; } else { error734("Out of memory: Could not create E."); this_185 = 0; }; } else { C_firstFree_343 = (C_firstFree_343 - 1); this_185 = C_nextFree_137[C_firstFree_343]; C_typeId_441[this_185] = 3; }; this_646 = this_185; this_560 = this_646; return this_646; } function error734(string msg150) { $debugPrint688((msg_150 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo181(integer this161) returns integer { local integer test_C_foo_result156 if (C_typeId_441[this_161] == 0) { if (this_161 == 0) { error734("Nullpointer exception when calling C.foo"); } else { error734("Called C.foo on invalid object."); }; } else { }; if (C_typeId_441[this_161] <= 2) { test_C_foo_result_156 = 3; } else { test_C_foo_result_156 = 4; }; return test_C_foo_result_156; }