array C_nextFree199 integer C_firstFree593 integer C_maxIndex109 array C_typeId189 array SimpleFunc_nextFree794 integer SimpleFunc_firstFree139 integer SimpleFunc_maxIndex192 array SimpleFunc_typeId201 array C_y196 array this162 integer C_firstFree593 = 0 integer C_maxIndex109 = 0 integer SimpleFunc_firstFree139 = 0 integer SimpleFunc_maxIndex192 = 0 function initGlobals441() { } function main306() { local integer c921 local integer this417 initGlobals441(); new_C128(); c_921 = new_C128(); C_y_196[c_921] = 4; this_417 = c_921; if (C_typeId_189[this_417] == 0) { if (this_417 == 0) { error133("Nullpointer exception when calling C.foo"); } else { error133("Called C.foo on invalid object."); }; } else { }; C_foo888(this_417); } function config110() { } IS_NATIVE function testSuccess665() { } function C_foo888(integer this222) { local integer clVar598 local integer temp755 local integer this122 local integer this220 local integer f982 local integer f725 temp_755 = this_222; if (SimpleFunc_firstFree_139 == 0) { if (SimpleFunc_maxIndex_192 < 32768) { SimpleFunc_maxIndex_192 = (SimpleFunc_maxIndex_192 + 1); this_122 = SimpleFunc_maxIndex_192; SimpleFunc_typeId_201[this_122] = 3; } else { error133("Out of memory: Could not create SimpleFunc_bar_C_test."); this_122 = 0; }; } else { SimpleFunc_firstFree_139 = (SimpleFunc_firstFree_139 - 1); this_122 = SimpleFunc_nextFree_794[SimpleFunc_firstFree_139]; SimpleFunc_typeId_201[this_122] = 3; }; clVar_598 = this_122; this_162[clVar_598] = this_222; this_220 = temp_755; f_982 = clVar_598; if (C_typeId_189[this_220] == 0) { if (this_220 == 0) { error133("Nullpointer exception when calling C.bar"); } else { error133("Called C.bar on invalid object."); }; } else { }; f_725 = f_982; if (dispatch_SimpleFunc_test_SimpleFunc_apply156(f_725) == 7) { testSuccess665(); } else { }; } function new_C128() returns integer { local integer this112 local integer this251 if (C_firstFree_593 == 0) { if (C_maxIndex_109 < 32768) { C_maxIndex_109 = (C_maxIndex_109 + 1); this_251 = C_maxIndex_109; C_typeId_189[this_251] = 1; } else { error133("Out of memory: Could not create C."); this_251 = 0; }; } else { C_firstFree_593 = (C_firstFree_593 - 1); this_251 = C_nextFree_199[C_firstFree_593]; C_typeId_189[this_251] = 1; }; this_112 = this_251; return this_112; } function error133(string msg797) { $debugPrint233((msg_797 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply156(integer this134) returns integer { local integer test_SimpleFunc_apply_result115 local integer this149 local integer this256 local integer test_C_x_result267 if (SimpleFunc_typeId_201[this_134] == 0) { if (this_134 == 0) { error133("Nullpointer exception when calling SimpleFunc.apply"); } else { error133("Called SimpleFunc.apply on invalid object."); }; } else { }; this_149 = this_134; this_256 = this_162[this_149]; if (C_typeId_189[this_256] == 0) { if (this_256 == 0) { error133("Nullpointer exception when calling C.x"); } else { error133("Called C.x on invalid object."); }; } else { }; test_C_x_result_267 = 3; test_SimpleFunc_apply_result_115 = (test_C_x_result_267 + C_y_196[this_162[this_149]]); return test_SimpleFunc_apply_result_115; }