array SimpleFunc_nextFree125 integer SimpleFunc_firstFree824 integer SimpleFunc_maxIndex154 array SimpleFunc_typeId146 array y657 integer SimpleFunc_firstFree824 = 0 integer SimpleFunc_maxIndex154 = 0 function initGlobals171() { SimpleFunc_firstFree_824 = 0; SimpleFunc_maxIndex_154 = 0; } function main166() { initGlobals171(); init_test284(); } function config161() { } function init_test284() { local integer y130 local integer f919 local integer clVar815 y_130 = 4; clVar_815 = alloc_SimpleFunc_test132(); y_657[clVar_815] = y_130; f_919 = clVar_815; if (dispatch_SimpleFunc_test_SimpleFunc_apply154(f_919, 3) == 7) { testSuccess796(); } else { }; } IS_NATIVE function testSuccess796() { } function apply_test395(integer this120, integer x205) returns integer { return (x_205 + y_657[this_120]); } function alloc_SimpleFunc_test132() returns integer { local integer this153 if (SimpleFunc_firstFree_824 == 0) { if (SimpleFunc_maxIndex_154 < 32768) { SimpleFunc_maxIndex_154 = (SimpleFunc_maxIndex_154 + 1); this_153 = SimpleFunc_maxIndex_154; SimpleFunc_typeId_146[this_153] = 2; } else { error746("Out of memory: Could not create SimpleFunc_test."); this_153 = 0; }; } else { SimpleFunc_firstFree_824 = (SimpleFunc_firstFree_824 - 1); this_153 = SimpleFunc_nextFree_125[SimpleFunc_firstFree_824]; SimpleFunc_typeId_146[this_153] = 2; }; return this_153; } function error746(string msg703) { $debugPrint108((msg_703 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply154(integer this969, integer x216) returns integer { local integer test_SimpleFunc_apply_result114 if (SimpleFunc_typeId_146[this_969] == 0) { if (this_969 == 0) { error746("Nullpointer exception when calling SimpleFunc.apply"); } else { error746("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_114 = apply_test395(this_969, x_216); return test_SimpleFunc_apply_result_114; }