array SimpleFunc_nextFree358 integer SimpleFunc_firstFree939 integer SimpleFunc_maxIndex160 array SimpleFunc_typeId224 array y213 integer SimpleFunc_firstFree939 = 0 integer SimpleFunc_maxIndex160 = 0 function initGlobals191() { SimpleFunc_firstFree_939 = 0; SimpleFunc_maxIndex_160 = 0; } function main496() { initGlobals191(); init_test178(); } function config249() { } function init_test178() { local integer y138 local integer f182 local integer clVar158 y_138 = 4; clVar_158 = alloc_SimpleFunc_test110(); y_213[clVar_158] = y_138; f_182 = clVar_158; if (dispatch_SimpleFunc_test_SimpleFunc_apply938(f_182, 3) == 7) { testSuccess420(); } else { }; } IS_NATIVE function testSuccess420() { } function apply_test226(integer this154, integer x204) returns integer { return (x_204 + y_213[this_154]); } function alloc_SimpleFunc_test110() returns integer { local integer this425 if (SimpleFunc_firstFree_939 == 0) { if (SimpleFunc_maxIndex_160 < 32768) { SimpleFunc_maxIndex_160 = (SimpleFunc_maxIndex_160 + 1); this_425 = SimpleFunc_maxIndex_160; SimpleFunc_typeId_224[this_425] = 2; } else { error457("Out of memory: Could not create SimpleFunc_test."); this_425 = 0; }; } else { SimpleFunc_firstFree_939 = (SimpleFunc_firstFree_939 - 1); this_425 = SimpleFunc_nextFree_358[SimpleFunc_firstFree_939]; SimpleFunc_typeId_224[this_425] = 2; }; return this_425; } function error457(string msg170) { $debugPrint105((msg_170 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply938(integer this251, integer x669) returns integer { local integer test_SimpleFunc_apply_result157 if (SimpleFunc_typeId_224[this_251] == 0) { if (this_251 == 0) { error457("Nullpointer exception when calling SimpleFunc.apply"); } else { error457("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_157 = apply_test226(this_251, x_669); return test_SimpleFunc_apply_result_157; }