array SimpleFunc_nextFree164 integer SimpleFunc_firstFree238 integer SimpleFunc_maxIndex916 array SimpleFunc_typeId113 array y159 integer SimpleFunc_firstFree238 = 0 integer SimpleFunc_maxIndex916 = 0 function initGlobals108() { } function main813() { initGlobals108(); init_test499(); } function config158() { } function init_test499() { local integer clVar193 clVar_193 = alloc_SimpleFunc_test197(); y_159[clVar_193] = 4; if (dispatch_SimpleFunc_test_SimpleFunc_apply207(clVar_193, 3) == 7) { testSuccess517(); } else { }; } IS_NATIVE function testSuccess517() { } function apply_test188(integer this152, integer x185) returns integer { return (y_159[this_152] + x_185); } function alloc_SimpleFunc_test197() returns integer { local integer this111 if (SimpleFunc_firstFree_238 == 0) { if (SimpleFunc_maxIndex_916 < 32768) { SimpleFunc_maxIndex_916 = (SimpleFunc_maxIndex_916 + 1); this_111 = SimpleFunc_maxIndex_916; SimpleFunc_typeId_113[this_111] = 2; } else { error157("Out of memory: Could not create SimpleFunc_test."); this_111 = 0; }; } else { SimpleFunc_firstFree_238 = (SimpleFunc_firstFree_238 - 1); this_111 = SimpleFunc_nextFree_164[SimpleFunc_firstFree_238]; SimpleFunc_typeId_113[this_111] = 2; }; return this_111; } function error157(string msg197) { $debugPrint112((msg_197 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply207(integer this160, integer x827) returns integer { if (SimpleFunc_typeId_113[this_160] == 0) { if (this_160 == 0) { error157("Nullpointer exception when calling SimpleFunc.apply"); } else { error157("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_test188(this_160, x_827); }