array C_nextFree623 integer C_firstFree449 integer C_maxIndex211 array C_typeId344 array SimpleFunc_nextFree283 integer SimpleFunc_firstFree132 integer SimpleFunc_maxIndex275 array SimpleFunc_typeId193 array C_y286 array this121 integer C_firstFree449 = 0 integer C_maxIndex211 = 0 integer SimpleFunc_firstFree132 = 0 integer SimpleFunc_maxIndex275 = 0 function initGlobals572() { } function main986() { local integer c537 local integer this210 initGlobals572(); new_C837(); c_537 = new_C837(); C_y_286[c_537] = 4; this_210 = c_537; if (C_typeId_344[this_210] == 0) { if (this_210 == 0) { error536("Nullpointer exception when calling C.foo"); } else { error536("Called C.foo on invalid object."); }; } else { }; C_foo189(this_210); } function config195() { } IS_NATIVE function testSuccess146() { } function C_foo189(integer this912) { local integer clVar105 local integer temp166 local integer this172 local integer this146 local integer f176 local integer f161 temp_166 = this_912; if (SimpleFunc_firstFree_132 == 0) { if (SimpleFunc_maxIndex_275 < 32768) { SimpleFunc_maxIndex_275 = (SimpleFunc_maxIndex_275 + 1); this_172 = SimpleFunc_maxIndex_275; SimpleFunc_typeId_193[this_172] = 3; } else { error536("Out of memory: Could not create SimpleFunc_bar_C_test."); this_172 = 0; }; } else { SimpleFunc_firstFree_132 = (SimpleFunc_firstFree_132 - 1); this_172 = SimpleFunc_nextFree_283[SimpleFunc_firstFree_132]; SimpleFunc_typeId_193[this_172] = 3; }; clVar_105 = this_172; this_121[clVar_105] = this_912; this_146 = temp_166; f_176 = clVar_105; if (C_typeId_344[this_146] == 0) { if (this_146 == 0) { error536("Nullpointer exception when calling C.bar"); } else { error536("Called C.bar on invalid object."); }; } else { }; f_161 = f_176; if (dispatch_SimpleFunc_test_SimpleFunc_apply638(f_161) == 7) { testSuccess146(); } else { }; } function new_C837() returns integer { local integer this112 local integer this125 if (C_firstFree_449 == 0) { if (C_maxIndex_211 < 32768) { C_maxIndex_211 = (C_maxIndex_211 + 1); this_125 = C_maxIndex_211; C_typeId_344[this_125] = 1; } else { error536("Out of memory: Could not create C."); this_125 = 0; }; } else { C_firstFree_449 = (C_firstFree_449 - 1); this_125 = C_nextFree_623[C_firstFree_449]; C_typeId_344[this_125] = 1; }; this_112 = this_125; return this_112; } function error536(string msg175) { $debugPrint143((msg_175 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply638(integer this134) returns integer { local integer test_SimpleFunc_apply_result991 local integer this115 local integer this354 local integer test_C_x_result295 if (SimpleFunc_typeId_193[this_134] == 0) { if (this_134 == 0) { error536("Nullpointer exception when calling SimpleFunc.apply"); } else { error536("Called SimpleFunc.apply on invalid object."); }; } else { }; this_115 = this_134; this_354 = this_121[this_115]; if (C_typeId_344[this_354] == 0) { if (this_354 == 0) { error536("Nullpointer exception when calling C.x"); } else { error536("Called C.x on invalid object."); }; } else { }; test_C_x_result_295 = 3; test_SimpleFunc_apply_result_991 = (test_C_x_result_295 + C_y_286[this_121[this_115]]); return test_SimpleFunc_apply_result_991; }