array test_b131 array Blub_nextFree878 integer Blub_firstFree132 integer Blub_maxIndex158 array Blub_typeId716 array Blub_x889 integer Blub_firstFree132 = 0 integer Blub_maxIndex158 = 0 function initGlobals173() { } function main899() { initGlobals173(); init_test180(); } function config129() { } function init_test180() { local integer i179 local integer x127 local integer this191 local integer this120 local integer this193 local integer x142 local integer x142 local integer this188 local integer this408 local integer this108 local integer x498 local integer x195 local integer this801 local integer this128 local integer this171 local integer x705 local integer x161 local integer this681 local integer this170 local integer this111 local integer x246 local integer x156 local integer this473 local integer this102 local integer this140 local integer x946 local integer x201 local integer this103 local integer this186 local integer this516 local integer x118 local integer x158 local integer this495 local integer this719 local integer this826 local integer x879 local integer x689 local integer this139 local integer this177 local integer this689 local integer x904 local integer x494 local integer this619 local integer this191 local integer this177 local integer x122 local integer x142 local integer this165 local integer this112 local integer this607 local integer x726 x_127 = 0; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_120 = Blub_maxIndex_158; Blub_typeId_716[this_120] = 1; } else { error843("Out of memory: Could not create Blub."); this_120 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_120 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_120] = 1; }; this_191 = this_120; this_193 = this_191; x_142 = x_127; Blub_x_889[this_193] = x_142; test_b_131[0] = this_191; x_142 = 1; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_408 = Blub_maxIndex_158; Blub_typeId_716[this_408] = 1; } else { error843("Out of memory: Could not create Blub."); this_408 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_408 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_408] = 1; }; this_188 = this_408; this_108 = this_188; x_498 = x_142; Blub_x_889[this_108] = x_498; test_b_131[1] = this_188; x_195 = 2; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_128 = Blub_maxIndex_158; Blub_typeId_716[this_128] = 1; } else { error843("Out of memory: Could not create Blub."); this_128 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_128 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_128] = 1; }; this_801 = this_128; this_171 = this_801; x_705 = x_195; Blub_x_889[this_171] = x_705; test_b_131[2] = this_801; x_161 = 3; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_170 = Blub_maxIndex_158; Blub_typeId_716[this_170] = 1; } else { error843("Out of memory: Could not create Blub."); this_170 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_170 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_170] = 1; }; this_681 = this_170; this_111 = this_681; x_246 = x_161; Blub_x_889[this_111] = x_246; test_b_131[3] = this_681; x_156 = 4; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_102 = Blub_maxIndex_158; Blub_typeId_716[this_102] = 1; } else { error843("Out of memory: Could not create Blub."); this_102 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_102 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_102] = 1; }; this_473 = this_102; this_140 = this_473; x_946 = x_156; Blub_x_889[this_140] = x_946; test_b_131[4] = this_473; x_201 = 5; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_186 = Blub_maxIndex_158; Blub_typeId_716[this_186] = 1; } else { error843("Out of memory: Could not create Blub."); this_186 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_186 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_186] = 1; }; this_103 = this_186; this_516 = this_103; x_118 = x_201; Blub_x_889[this_516] = x_118; test_b_131[5] = this_103; x_158 = 6; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_719 = Blub_maxIndex_158; Blub_typeId_716[this_719] = 1; } else { error843("Out of memory: Could not create Blub."); this_719 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_719 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_719] = 1; }; this_495 = this_719; this_826 = this_495; x_879 = x_158; Blub_x_889[this_826] = x_879; test_b_131[6] = this_495; x_689 = 7; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_177 = Blub_maxIndex_158; Blub_typeId_716[this_177] = 1; } else { error843("Out of memory: Could not create Blub."); this_177 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_177 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_177] = 1; }; this_139 = this_177; this_689 = this_139; x_904 = x_689; Blub_x_889[this_689] = x_904; test_b_131[7] = this_139; dispatch_Blub_destroyBlub117(test_b_131[0]); dispatch_Blub_destroyBlub117(test_b_131[6]); dispatch_Blub_destroyBlub117(test_b_131[2]); dispatch_Blub_destroyBlub117(test_b_131[4]); x_494 = 8; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_191 = Blub_maxIndex_158; Blub_typeId_716[this_191] = 1; } else { error843("Out of memory: Could not create Blub."); this_191 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_191 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_191] = 1; }; this_619 = this_191; this_177 = this_619; x_122 = x_494; Blub_x_889[this_177] = x_122; test_b_131[8] = this_619; x_142 = 9; if (Blub_firstFree_132 == 0) { if (Blub_maxIndex_158 < 32768) { Blub_maxIndex_158 = (Blub_maxIndex_158 + 1); this_112 = Blub_maxIndex_158; Blub_typeId_716[this_112] = 1; } else { error843("Out of memory: Could not create Blub."); this_112 = 0; }; } else { Blub_firstFree_132 = (Blub_firstFree_132 - 1); this_112 = Blub_nextFree_878[Blub_firstFree_132]; Blub_typeId_716[this_112] = 1; }; this_165 = this_112; this_607 = this_165; x_726 = x_142; Blub_x_889[this_607] = x_726; test_b_131[9] = this_165; i_179 = 0; loop { exitwhen (not (i_179 < 10)); if (((i_179 mod 2) == 1) and (Blub_x_889[test_b_131[i_179]] != i_179)) { testFail646(((("fail " + I2S112(i_179)) + ", ") + I2S112(Blub_x_889[test_b_131[i_179]]))); } else { }; i_179 = (i_179 + 1); }; testSuccess325(); } IS_NATIVE IS_EXTERN @extern function I2S112(integer i185) returns string { } IS_NATIVE function testFail646(string msg544) { } IS_NATIVE function testSuccess325() { } function error843(string msg482) { $debugPrint448((msg_482 + (" " + #getStackTrace()))); } function dispatch_Blub_destroyBlub117(integer this964) { local integer this190 local integer obj106 if (Blub_typeId_716[this_964] == 0) { if (this_964 == 0) { error843("Nullpointer exception when calling Blub.Blub"); } else { error843("Called Blub.Blub on invalid object."); }; } else { }; this_190 = this_964; obj_106 = this_190; if (Blub_typeId_716[obj_106] == 0) { error843("Double free: object of type Blub"); } else { Blub_nextFree_878[Blub_firstFree_132] = obj_106; Blub_firstFree_132 = (Blub_firstFree_132 + 1); Blub_typeId_716[obj_106] = 0; }; }