array SimpleFunc_nextFree396 integer SimpleFunc_firstFree102 integer SimpleFunc_maxIndex202 array SimpleFunc_typeId748 array y168 integer SimpleFunc_firstFree102 = 0 integer SimpleFunc_maxIndex202 = 0 function initGlobals979() { } function main140() { initGlobals979(); init_test110(); } function config102() { } function init_test110() { local integer clVar798 clVar_798 = alloc_SimpleFunc_test166(); y_168[clVar_798] = 4; if (dispatch_SimpleFunc_test_SimpleFunc_apply124(clVar_798, 3) == 7) { testSuccess131(); } else { }; } IS_NATIVE function testSuccess131() { } function apply_test150(integer this100, integer x176) returns integer { return (y_168[this_100] + x_176); } function alloc_SimpleFunc_test166() returns integer { local integer this958 if (SimpleFunc_firstFree_102 == 0) { if (SimpleFunc_maxIndex_202 < 32768) { SimpleFunc_maxIndex_202 = (SimpleFunc_maxIndex_202 + 1); this_958 = SimpleFunc_maxIndex_202; SimpleFunc_typeId_748[this_958] = 2; } else { error148("Out of memory: Could not create SimpleFunc_test."); this_958 = 0; }; } else { SimpleFunc_firstFree_102 = (SimpleFunc_firstFree_102 - 1); this_958 = SimpleFunc_nextFree_396[SimpleFunc_firstFree_102]; SimpleFunc_typeId_748[this_958] = 2; }; return this_958; } function error148(string msg760) { $debugPrint168((msg_760 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply124(integer this373, integer x161) returns integer { if (SimpleFunc_typeId_748[this_373] == 0) { if (this_373 == 0) { error148("Nullpointer exception when calling SimpleFunc.apply"); } else { error148("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_test150(this_373, x_161); }