array SimpleFunc_nextFree173 integer SimpleFunc_firstFree148 integer SimpleFunc_maxIndex398 array SimpleFunc_typeId458 array y504 integer SimpleFunc_firstFree148 = 0 integer SimpleFunc_maxIndex398 = 0 function initGlobals317() { } function main178() { initGlobals317(); init_test125(); } function config376() { } function init_test125() { test578(4); } function test578(integer y165) { local integer clVar196 clVar_196 = alloc_SimpleFunc_test767(); y_504[clVar_196] = y_165; if (dispatch_SimpleFunc_test_SimpleFunc_apply764(clVar_196, 3) == 7) { testSuccess242(); } else { }; } IS_NATIVE function testSuccess242() { } function apply_test180(integer this148, integer x689) returns integer { return (x_689 + y_504[this_148]); } function alloc_SimpleFunc_test767() returns integer { local integer this130 if (SimpleFunc_firstFree_148 == 0) { if (SimpleFunc_maxIndex_398 < 32768) { SimpleFunc_maxIndex_398 = (SimpleFunc_maxIndex_398 + 1); this_130 = SimpleFunc_maxIndex_398; SimpleFunc_typeId_458[this_130] = 2; } else { error589("Out of memory: Could not create SimpleFunc_test."); this_130 = 0; }; } else { SimpleFunc_firstFree_148 = (SimpleFunc_firstFree_148 - 1); this_130 = SimpleFunc_nextFree_173[SimpleFunc_firstFree_148]; SimpleFunc_typeId_458[this_130] = 2; }; return this_130; } function error589(string msg190) { $debugPrint817((msg_190 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply764(integer this158, integer x813) returns integer { if (SimpleFunc_typeId_458[this_158] == 0) { if (this_158 == 0) { error589("Nullpointer exception when calling SimpleFunc.apply"); } else { error589("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_test180(this_158, x_813); }