array SimpleFunc_nextFree209 integer SimpleFunc_firstFree196 integer SimpleFunc_maxIndex113 array SimpleFunc_typeId144 array y723 integer SimpleFunc_firstFree196 = 0 integer SimpleFunc_maxIndex113 = 0 function initGlobals255() { SimpleFunc_firstFree_196 = 0; SimpleFunc_maxIndex_113 = 0; } function main102() { initGlobals255(); init_test695(); } function config145() { } function init_test695() { local integer y178 local integer f188 local integer clVar732 y_178 = 4; clVar_732 = alloc_SimpleFunc_test177(); y_723[clVar_732] = y_178; f_188 = clVar_732; if (dispatch_SimpleFunc_test_SimpleFunc_apply128(f_188, 3) == 7) { testSuccess163(); } else { }; } IS_NATIVE function testSuccess163() { } function apply_test948(integer this203, integer x898) returns integer { local integer a213 local integer b961 a_213 = y_723[this_203]; b_961 = (a_213 + x_898); return b_961; } function alloc_SimpleFunc_test177() returns integer { local integer this768 if (SimpleFunc_firstFree_196 == 0) { if (SimpleFunc_maxIndex_113 < 32768) { SimpleFunc_maxIndex_113 = (SimpleFunc_maxIndex_113 + 1); this_768 = SimpleFunc_maxIndex_113; SimpleFunc_typeId_144[this_768] = 2; } else { error169("Out of memory: Could not create SimpleFunc_test."); this_768 = 0; }; } else { SimpleFunc_firstFree_196 = (SimpleFunc_firstFree_196 - 1); this_768 = SimpleFunc_nextFree_209[SimpleFunc_firstFree_196]; SimpleFunc_typeId_144[this_768] = 2; }; return this_768; } function error169(string msg188) { $debugPrint183((msg_188 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply128(integer this694, integer x204) returns integer { local integer test_SimpleFunc_apply_result176 if (SimpleFunc_typeId_144[this_694] == 0) { if (this_694 == 0) { error169("Nullpointer exception when calling SimpleFunc.apply"); } else { error169("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_176 = apply_test948(this_694, x_204); return test_SimpleFunc_apply_result_176; }