array I_nextFree143 integer I_firstFree527 integer I_maxIndex199 array I_typeId566 integer I_firstFree527 = 0 integer I_maxIndex199 = 0 function initGlobals128() { I_firstFree_527 = 0; I_maxIndex_199 = 0; } function main143() { initGlobals128(); init_test789(); } function config105() { } function init_test789() { local integer i116 i_116 = new_C131(); if (dispatch_I_test_I_foo124(i_116, 1) == 43) { testSuccess720(); } else { }; } IS_NATIVE function testSuccess720() { } function C_init135(integer this189) { } function new_C131() returns integer { local integer this177 this_177 = alloc_C918(); construct_C151(this_177); return this_177; } function construct_C151(integer this204) { C_init135(this_204); } function I_foo948(integer this809, integer x864) returns integer { return (x_864 + 42); } function alloc_C918() returns integer { local integer this235 if (I_firstFree_527 == 0) { if (I_maxIndex_199 < 32768) { I_maxIndex_199 = (I_maxIndex_199 + 1); this_235 = I_maxIndex_199; I_typeId_566[this_235] = 2; } else { error134("Out of memory: Could not create C."); this_235 = 0; }; } else { I_firstFree_527 = (I_firstFree_527 - 1); this_235 = I_nextFree_143[I_firstFree_527]; I_typeId_566[this_235] = 2; }; return this_235; } function error134(string msg642) { $debugPrint633((msg_642 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo124(integer this203, integer x208) returns integer { local integer test_I_foo_result524 if (I_typeId_566[this_203] == 0) { if (this_203 == 0) { error134("Nullpointer exception when calling I.foo"); } else { error134("Called I.foo on invalid object."); }; } else { }; test_I_foo_result_524 = I_foo948(this_203, x_208); return test_I_foo_result_524; }