array C_nextFree212 integer C_firstFree622 integer C_maxIndex119 array C_typeId208 array SimpleFunc_nextFree194 integer SimpleFunc_firstFree115 integer SimpleFunc_maxIndex428 array SimpleFunc_typeId131 array C_y643 array this112 integer C_firstFree622 = 0 integer C_maxIndex119 = 0 integer SimpleFunc_firstFree115 = 0 integer SimpleFunc_maxIndex428 = 0 function initGlobals144() { } function main795() { initGlobals144(); init_test137(); } function config446() { } function init_test137() { local integer c134 new_C502(); c_134 = new_C502(); C_y_643[c_134] = 4; dispatch_C_test_C_foo109(c_134); } IS_NATIVE function testSuccess140() { } function C_foo870(integer this111) { local integer clVar169 clVar_169 = alloc_SimpleFunc_bar_C_test527(); this_112[clVar_169] = this_111; dispatch_C_test_C_bar631(this_111, clVar_169); } function C_x344(integer this189) returns integer { return 3; } function C_bar876(integer this210, integer f142) { if (dispatch_SimpleFunc_test_SimpleFunc_apply193(f_142) == 7) { testSuccess140(); } else { }; } function C_init798(integer this889) { } function new_C502() returns integer { local integer this152 this_152 = alloc_C166(); construct_C507(this_152); return this_152; } function construct_C507(integer this694) { C_init798(this_694); } function apply_bar_C_test388(integer this696) returns integer { return (dispatch_C_test_C_x841(this_112[this_696]) + C_y_643[this_112[this_696]]); } function alloc_C166() returns integer { local integer this161 if (C_firstFree_622 == 0) { if (C_maxIndex_119 < 32768) { C_maxIndex_119 = (C_maxIndex_119 + 1); this_161 = C_maxIndex_119; C_typeId_208[this_161] = 1; } else { error125("Out of memory: Could not create C."); this_161 = 0; }; } else { C_firstFree_622 = (C_firstFree_622 - 1); this_161 = C_nextFree_212[C_firstFree_622]; C_typeId_208[this_161] = 1; }; return this_161; } function error125(string msg143) { $debugPrint210((msg_143 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test527() returns integer { local integer this616 if (SimpleFunc_firstFree_115 == 0) { if (SimpleFunc_maxIndex_428 < 32768) { SimpleFunc_maxIndex_428 = (SimpleFunc_maxIndex_428 + 1); this_616 = SimpleFunc_maxIndex_428; SimpleFunc_typeId_131[this_616] = 3; } else { error125("Out of memory: Could not create SimpleFunc_bar_C_test."); this_616 = 0; }; } else { SimpleFunc_firstFree_115 = (SimpleFunc_firstFree_115 - 1); this_616 = SimpleFunc_nextFree_194[SimpleFunc_firstFree_115]; SimpleFunc_typeId_131[this_616] = 3; }; return this_616; } function dispatch_C_test_C_foo109(integer this160) { if (C_typeId_208[this_160] == 0) { if (this_160 == 0) { error125("Nullpointer exception when calling C.foo"); } else { error125("Called C.foo on invalid object."); }; } else { }; C_foo870(this_160); } function dispatch_C_test_C_bar631(integer this114, integer f161) { if (C_typeId_208[this_114] == 0) { if (this_114 == 0) { error125("Nullpointer exception when calling C.bar"); } else { error125("Called C.bar on invalid object."); }; } else { }; C_bar876(this_114, f_161); } function dispatch_C_test_C_x841(integer this199) returns integer { if (C_typeId_208[this_199] == 0) { if (this_199 == 0) { error125("Nullpointer exception when calling C.x"); } else { error125("Called C.x on invalid object."); }; } else { }; return C_x344(this_199); } function dispatch_SimpleFunc_test_SimpleFunc_apply193(integer this734) returns integer { if (SimpleFunc_typeId_131[this_734] == 0) { if (this_734 == 0) { error125("Nullpointer exception when calling SimpleFunc.apply"); } else { error125("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_bar_C_test388(this_734); }