integer BugClass_mws119 array MiddlewareUnary_nextFree334 integer MiddlewareUnary_firstFree152 integer MiddlewareUnary_maxIndex682 array MiddlewareUnary_typeId185 array CallbackUnary_nextFree358 integer CallbackUnary_firstFree573 integer CallbackUnary_maxIndex749 array CallbackUnary_typeId141 array BugClass_nextFree194 integer BugClass_firstFree112 integer BugClass_maxIndex956 array LinkedList_nextFree297 integer LinkedList_firstFree197 integer LinkedList_maxIndex207 array LinkedList_typeId718 array cb478 array LinkedList_elem198 integer BugClass_mws119 = new_LinkedList181() integer MiddlewareUnary_firstFree152 = 0 integer MiddlewareUnary_maxIndex682 = 0 integer CallbackUnary_firstFree573 = 0 integer CallbackUnary_maxIndex749 = 0 integer BugClass_firstFree112 = 0 integer BugClass_maxIndex956 = 0 integer CallbackNullary_firstFree341 = 0 integer CallbackNullary_maxIndex866 = 0 integer LinkedList_firstFree197 = 0 integer LinkedList_maxIndex207 = 0 function initGlobals120() { } function main523() { initGlobals120(); init_Bug154(); } function config631() { } function init_Bug154() { local integer clVar178 local integer temp273 local integer this134 BugClass_mws_119 = new_LinkedList181(); temp_273 = BugClass_mws_119; if (CallbackUnary_firstFree_573 == 0) { if (CallbackUnary_maxIndex_749 < 32768) { CallbackUnary_maxIndex_749 = (CallbackUnary_maxIndex_749 + 1); this_134 = CallbackUnary_maxIndex_749; CallbackUnary_typeId_141[this_134] = 4; } else { error139("Out of memory: Could not create CallbackUnary_add_Bug."); this_134 = 0; }; } else { CallbackUnary_firstFree_573 = (CallbackUnary_firstFree_573 - 1); this_134 = CallbackUnary_nextFree_358[CallbackUnary_firstFree_573]; CallbackUnary_typeId_141[this_134] = 4; }; clVar_178 = this_134; LinkedList_add_1213(temp_273, clVar_178); LinkedList_call178(BugClass_mws_119, new_BugClass146()); } function LinkedList_call178(integer this135, any t0133) { local integer clVar582 local any temp129 local any temp118 local integer this129 temp_129 = LinkedList_elem_198[this_135]; temp_118 = t0_133; if (CallbackUnary_firstFree_573 == 0) { if (CallbackUnary_maxIndex_749 < 32768) { CallbackUnary_maxIndex_749 = (CallbackUnary_maxIndex_749 + 1); this_129 = CallbackUnary_maxIndex_749; CallbackUnary_typeId_141[this_129] = 5; } else { error139("Out of memory: Could not create CallbackUnary_call_Bug."); this_129 = 0; }; } else { CallbackUnary_firstFree_573 = (CallbackUnary_firstFree_573 - 1); this_129 = CallbackUnary_nextFree_358[CallbackUnary_firstFree_573]; CallbackUnary_typeId_141[this_129] = 5; }; clVar_582 = this_129; dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call475(temp_129, temp_118, clVar_582); } IS_NATIVE function println210(string msg228) { } IS_NATIVE function testSuccess119() { } function call_Bug104(integer this160, any t794, integer mwCb942) { local integer this871 local any t867 local integer this129 local any t664 this_871 = mwCb_942; t_867 = t_794; if (CallbackUnary_typeId_141[this_871] == 0) { if (this_871 == 0) { error139("Nullpointer exception when calling CallbackUnary.callAndDestroy"); } else { error139("Called CallbackUnary.callAndDestroy on invalid object."); }; } else { }; this_129 = this_871; t_664 = t_867; dispatch_CallbackUnary_Bug_CallbackUnary_call545(this_129, t_664); dispatch_CallbackUnary_destroyCallbackUnary364(this_129); } function call_Bug_3131(integer this161, any t149, integer mwCb510) { local integer this178 local any t807 local integer this130 local any t121 dispatch_CallbackUnary_Bug_CallbackUnary_call545(cb_478[this_161], t_149); this_178 = mwCb_510; t_807 = t_149; if (CallbackUnary_typeId_141[this_178] == 0) { if (this_178 == 0) { error139("Nullpointer exception when calling CallbackUnary.callAndDestroy"); } else { error139("Called CallbackUnary.callAndDestroy on invalid object."); }; } else { }; this_130 = this_178; t_121 = t_807; dispatch_CallbackUnary_Bug_CallbackUnary_call545(this_130, t_121); dispatch_CallbackUnary_destroyCallbackUnary364(this_130); } function new_BugClass146() returns integer { local integer this359 local integer this897 if (BugClass_firstFree_112 == 0) { if (BugClass_maxIndex_956 < 32768) { BugClass_maxIndex_956 = (BugClass_maxIndex_956 + 1); this_897 = BugClass_maxIndex_956; } else { error139("Out of memory: Could not create BugClass."); this_897 = 0; }; } else { BugClass_firstFree_112 = (BugClass_firstFree_112 - 1); this_897 = BugClass_nextFree_194[BugClass_firstFree_112]; }; this_359 = this_897; return this_359; } function new_LinkedList181() returns integer { local integer this100 local integer this133 if (LinkedList_firstFree_197 == 0) { if (LinkedList_maxIndex_207 < 32768) { LinkedList_maxIndex_207 = (LinkedList_maxIndex_207 + 1); this_133 = LinkedList_maxIndex_207; LinkedList_typeId_718[this_133] = 6; } else { error139("Out of memory: Could not create LinkedList."); this_133 = 0; }; } else { LinkedList_firstFree_197 = (LinkedList_firstFree_197 - 1); this_133 = LinkedList_nextFree_297[LinkedList_firstFree_197]; LinkedList_typeId_718[this_133] = 6; }; this_100 = this_133; return this_100; } function error139(string msg334) { $debugPrint718((msg_334 + (" " + #getStackTrace()))); } function dispatch_CallbackUnary_destroyCallbackUnary364(integer this508) { local integer this143 local integer obj231 if (CallbackUnary_typeId_141[this_508] == 0) { if (this_508 == 0) { error139("Nullpointer exception when calling CallbackUnary.CallbackUnary"); } else { error139("Called CallbackUnary.CallbackUnary on invalid object."); }; } else { }; this_143 = this_508; obj_231 = this_143; if (CallbackUnary_typeId_141[obj_231] == 0) { error139("Double free: object of type CallbackUnary"); } else { CallbackUnary_nextFree_358[CallbackUnary_firstFree_573] = obj_231; CallbackUnary_firstFree_573 = (CallbackUnary_firstFree_573 + 1); CallbackUnary_typeId_141[obj_231] = 0; }; } function dispatch_CallbackUnary_Bug_CallbackUnary_call545(integer this171, any t121) { if (CallbackUnary_typeId_141[this_171] == 0) { if (this_171 == 0) { error139("Nullpointer exception when calling CallbackUnary.call"); } else { error139("Called CallbackUnary.call on invalid object."); }; } else { }; if (CallbackUnary_typeId_141[this_171] <= 4) { testSuccess119(); } else { println210("called"); }; } function dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call475(integer this973, any t129, integer cb200) { if (MiddlewareUnary_typeId_185[this_973] == 0) { if (this_973 == 0) { error139("Nullpointer exception when calling MiddlewareUnary.call"); } else { error139("Called MiddlewareUnary.call on invalid object."); }; } else { }; if (MiddlewareUnary_typeId_185[this_973] <= 8) { call_Bug104(this_973, t_129, cb_200); } else { call_Bug_3131(this_973, t_129, cb_200); }; } function LinkedList_add_1213(integer this803, integer cbs_0203) { local integer this503 local any t199 local integer this574 local any t111 local integer cb144 local integer clVar563 local integer this701 this_503 = this_803; cb_144 = cbs_0_203; if (MiddlewareUnary_firstFree_152 == 0) { if (MiddlewareUnary_maxIndex_682 < 32768) { MiddlewareUnary_maxIndex_682 = (MiddlewareUnary_maxIndex_682 + 1); this_701 = MiddlewareUnary_maxIndex_682; MiddlewareUnary_typeId_185[this_701] = 9; } else { error139("Out of memory: Could not create MiddlewareUnary_Bug."); this_701 = 0; }; } else { MiddlewareUnary_firstFree_152 = (MiddlewareUnary_firstFree_152 - 1); this_701 = MiddlewareUnary_nextFree_334[MiddlewareUnary_firstFree_152]; MiddlewareUnary_typeId_185[this_701] = 9; }; clVar_563 = this_701; cb_478[clVar_563] = cb_144; t_199 = clVar_563; if (LinkedList_typeId_718[this_503] == 0) { if (this_503 == 0) { error139("Nullpointer exception when calling LinkedList.add"); } else { error139("Called LinkedList.add on invalid object."); }; } else { }; this_574 = this_503; t_111 = t_199; LinkedList_elem_198[this_574] = t_111; }