niti, nitg & rta: use lookup_first_definition
[nit.git] / c_src / standard___collection___sorter._sep.c
1 /* This C file is generated by NIT to compile module standard___collection___sorter. */
2 #include "standard___collection___sorter._sep.h"
3 val_t standard___collection___sorter___AbstractSorter___compare(val_t p0, val_t p1, val_t p2){
4 struct {struct stack_frame_t me;} fra;
5 val_t tmp;
6 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
7 fra.me.file = LOCATE_standard___collection___sorter;
8 fra.me.line = 22;
9 fra.me.meth = LOCATE_standard___collection___sorter___AbstractSorter___compare;
10 fra.me.has_broke = 0;
11 fra.me.REG_size = 0;
12 fra.me.nitni_local_ref_head = NULL;
13 /* ../lib/standard/collection/sorter.nit:22 */
14 nit_abort("Deferred method called", NULL, LOCATE_standard___collection___sorter, 22);
15 stack_frame_head = fra.me.prev;
16 return NIT_NULL;
17 }
18 void standard___collection___sorter___AbstractSorter___sort(val_t p0, val_t p1){
19 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
20 val_t REGB0;
21 val_t REGB1;
22 val_t REGB2;
23 val_t tmp;
24 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
25 fra.me.file = LOCATE_standard___collection___sorter;
26 fra.me.line = 29;
27 fra.me.meth = LOCATE_standard___collection___sorter___AbstractSorter___sort;
28 fra.me.has_broke = 0;
29 fra.me.REG_size = 2;
30 fra.me.nitni_local_ref_head = NULL;
31 fra.me.REG[0] = NIT_NULL;
32 fra.me.REG[1] = NIT_NULL;
33 fra.me.REG[0] = p0;
34 fra.me.REG[1] = p1;
35 /* ../lib/standard/collection/sorter.nit:30 */
36 REGB0 = TAG_Int(0);
37 /* ../lib/standard/collection/array.nit:24 */
38 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
39 if (UNTAG_Bool(REGB1)) {
40 } else {
41 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
42 }
43 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
44 /* ../lib/standard/collection/sorter.nit:30 */
45 REGB2 = TAG_Int(1);
46 /* ../lib/standard/kernel.nit:237 */
47 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
48 /* ../lib/standard/collection/sorter.nit:30 */
49 CALL_standard___collection___sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB2);
50 stack_frame_head = fra.me.prev;
51 return;
52 }
53 void standard___collection___sorter___AbstractSorter___sub_sort(val_t p0, val_t p1, val_t p2, val_t p3){
54 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
55 val_t REGB0;
56 val_t REGB1;
57 val_t REGB2;
58 val_t REGB3;
59 val_t tmp;
60 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
61 fra.me.file = LOCATE_standard___collection___sorter;
62 fra.me.line = 32;
63 fra.me.meth = LOCATE_standard___collection___sorter___AbstractSorter___sub_sort;
64 fra.me.has_broke = 0;
65 fra.me.REG_size = 2;
66 fra.me.nitni_local_ref_head = NULL;
67 fra.me.REG[0] = NIT_NULL;
68 fra.me.REG[1] = NIT_NULL;
69 fra.me.REG[0] = p0;
70 fra.me.REG[1] = p1;
71 REGB0 = p2;
72 REGB1 = p3;
73 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
74 if (UNTAG_Bool(REGB2)) {
75 } else {
76 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
77 }
78 /* ../lib/standard/kernel.nit:233 */
79 REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
80 /* ../lib/standard/collection/sorter.nit:35 */
81 if (UNTAG_Bool(REGB2)) {
82 /* ../lib/standard/collection/sorter.nit:36 */
83 goto label1;
84 } else {
85 /* ../lib/standard/collection/sorter.nit:37 */
86 REGB2 = TAG_Int(7);
87 /* ../lib/standard/kernel.nit:235 */
88 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
89 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
90 if (UNTAG_Bool(REGB3)) {
91 } else {
92 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
93 }
94 /* ../lib/standard/kernel.nit:232 */
95 REGB2 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
96 /* ../lib/standard/collection/sorter.nit:37 */
97 if (UNTAG_Bool(REGB2)) {
98 /* ../lib/standard/collection/sorter.nit:38 */
99 CALL_standard___collection___sorter___AbstractSorter___quick_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB1);
100 } else {
101 /* ../lib/standard/collection/sorter.nit:40 */
102 CALL_standard___collection___sorter___AbstractSorter___bubble_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB1);
103 }
104 }
105 label1: while(0);
106 stack_frame_head = fra.me.prev;
107 return;
108 }
109 void standard___collection___sorter___AbstractSorter___quick_sort(val_t p0, val_t p1, val_t p2, val_t p3){
110 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
111 val_t REGB0;
112 val_t REGB1;
113 val_t REGB2;
114 val_t REGB3;
115 val_t REGB4;
116 val_t REGB5;
117 val_t REGB6;
118 val_t tmp;
119 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
120 fra.me.file = LOCATE_standard___collection___sorter;
121 fra.me.line = 44;
122 fra.me.meth = LOCATE_standard___collection___sorter___AbstractSorter___quick_sort;
123 fra.me.has_broke = 0;
124 fra.me.REG_size = 5;
125 fra.me.nitni_local_ref_head = NULL;
126 fra.me.REG[0] = NIT_NULL;
127 fra.me.REG[1] = NIT_NULL;
128 fra.me.REG[2] = NIT_NULL;
129 fra.me.REG[3] = NIT_NULL;
130 fra.me.REG[4] = NIT_NULL;
131 fra.me.REG[0] = p0;
132 fra.me.REG[1] = p1;
133 REGB0 = p2;
134 REGB1 = p3;
135 /* ../lib/standard/collection/array.nit:278 */
136 fra.me.REG[2] = fra.me.REG[1];
137 REGB2 = REGB0;
138 /* ../lib/standard/collection/array.nit:280 */
139 REGB3 = TAG_Int(0);
140 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
141 if (UNTAG_Bool(REGB4)) {
142 } else {
143 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
144 }
145 /* ../lib/standard/kernel.nit:233 */
146 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
147 /* ../lib/standard/collection/array.nit:280 */
148 if (UNTAG_Bool(REGB3)) {
149 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
150 if (UNTAG_Bool(REGB3)) {
151 } else {
152 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
153 }
154 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
155 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
156 if (UNTAG_Bool(REGB4)) {
157 } else {
158 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
159 }
160 /* ../lib/standard/kernel.nit:232 */
161 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB3));
162 } else {
163 /* ../lib/standard/collection/array.nit:280 */
164 REGB4 = TAG_Bool(false);
165 REGB3 = REGB4;
166 }
167 if (UNTAG_Bool(REGB3)) {
168 } else {
169 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
170 }
171 /* ../lib/standard/collection/array.nit:281 */
172 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
173 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
174 if (UNTAG_Bool(REGB3)) {
175 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
176 }
177 /* ../lib/standard/collection/array.nit:718 */
178 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
179 /* ../lib/standard/collection/array.nit:281 */
180 goto label1;
181 label1: while(0);
182 /* ../lib/standard/collection/sorter.nit:48 */
183 REGB2 = REGB0;
184 /* ../lib/standard/collection/sorter.nit:49 */
185 REGB3 = REGB1;
186 /* ../lib/standard/collection/sorter.nit:50 */
187 while(1) {
188 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
189 if (UNTAG_Bool(REGB4)) {
190 } else {
191 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
192 }
193 /* ../lib/standard/kernel.nit:234 */
194 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
195 /* ../lib/standard/collection/sorter.nit:50 */
196 if (UNTAG_Bool(REGB4)) {
197 /* ../lib/standard/collection/sorter.nit:51 */
198 while(1) {
199 REGB4 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
200 if (UNTAG_Bool(REGB4)) {
201 } else {
202 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
203 }
204 /* ../lib/standard/kernel.nit:231 */
205 REGB4 = TAG_Bool(UNTAG_Int(REGB2)<=UNTAG_Int(REGB1));
206 /* ../lib/standard/collection/sorter.nit:51 */
207 if (UNTAG_Bool(REGB4)) {
208 /* ../lib/standard/collection/array.nit:278 */
209 fra.me.REG[3] = fra.me.REG[1];
210 REGB4 = REGB2;
211 /* ../lib/standard/collection/array.nit:280 */
212 REGB5 = TAG_Int(0);
213 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
214 if (UNTAG_Bool(REGB6)) {
215 } else {
216 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
217 }
218 /* ../lib/standard/kernel.nit:233 */
219 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
220 /* ../lib/standard/collection/array.nit:280 */
221 if (UNTAG_Bool(REGB5)) {
222 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
223 if (UNTAG_Bool(REGB5)) {
224 } else {
225 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
226 }
227 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
228 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
229 if (UNTAG_Bool(REGB6)) {
230 } else {
231 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
232 }
233 /* ../lib/standard/kernel.nit:232 */
234 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
235 } else {
236 /* ../lib/standard/collection/array.nit:280 */
237 REGB6 = TAG_Bool(false);
238 REGB5 = REGB6;
239 }
240 if (UNTAG_Bool(REGB5)) {
241 } else {
242 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
243 }
244 /* ../lib/standard/collection/array.nit:281 */
245 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
246 REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
247 if (UNTAG_Bool(REGB5)) {
248 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
249 }
250 /* ../lib/standard/collection/array.nit:718 */
251 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
252 /* ../lib/standard/collection/array.nit:281 */
253 goto label2;
254 label2: while(0);
255 /* ../lib/standard/collection/sorter.nit:51 */
256 REGB4 = CALL_standard___collection___sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3], fra.me.REG[2]);
257 REGB5 = TAG_Int(0);
258 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
259 if (UNTAG_Bool(REGB6)) {
260 } else {
261 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
262 }
263 /* ../lib/standard/kernel.nit:231 */
264 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<=UNTAG_Int(REGB5));
265 } else {
266 /* ../lib/standard/collection/sorter.nit:51 */
267 REGB4 = TAG_Bool(false);
268 REGB5 = REGB4;
269 }
270 if (UNTAG_Bool(REGB5)) {
271 REGB5 = TAG_Int(1);
272 /* ../lib/standard/kernel.nit:235 */
273 REGB5 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB5));
274 /* ../lib/standard/collection/sorter.nit:51 */
275 REGB2 = REGB5;
276 } else {
277 goto label3;
278 }
279 }
280 label3: while(0);
281 /* ../lib/standard/collection/sorter.nit:52 */
282 while(1) {
283 REGB5 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
284 if (UNTAG_Bool(REGB5)) {
285 } else {
286 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
287 }
288 /* ../lib/standard/kernel.nit:234 */
289 REGB5 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
290 /* ../lib/standard/collection/sorter.nit:52 */
291 if (UNTAG_Bool(REGB5)) {
292 /* ../lib/standard/collection/array.nit:278 */
293 fra.me.REG[3] = fra.me.REG[1];
294 REGB5 = REGB3;
295 /* ../lib/standard/collection/array.nit:280 */
296 REGB4 = TAG_Int(0);
297 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
298 if (UNTAG_Bool(REGB6)) {
299 } else {
300 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
301 }
302 /* ../lib/standard/kernel.nit:233 */
303 REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
304 /* ../lib/standard/collection/array.nit:280 */
305 if (UNTAG_Bool(REGB4)) {
306 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
307 if (UNTAG_Bool(REGB4)) {
308 } else {
309 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
310 }
311 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
312 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
313 if (UNTAG_Bool(REGB6)) {
314 } else {
315 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
316 }
317 /* ../lib/standard/kernel.nit:232 */
318 REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
319 } else {
320 /* ../lib/standard/collection/array.nit:280 */
321 REGB6 = TAG_Bool(false);
322 REGB4 = REGB6;
323 }
324 if (UNTAG_Bool(REGB4)) {
325 } else {
326 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
327 }
328 /* ../lib/standard/collection/array.nit:281 */
329 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
330 REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
331 if (UNTAG_Bool(REGB4)) {
332 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
333 }
334 /* ../lib/standard/collection/array.nit:718 */
335 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB5)];
336 /* ../lib/standard/collection/array.nit:281 */
337 goto label4;
338 label4: while(0);
339 /* ../lib/standard/collection/sorter.nit:52 */
340 REGB5 = CALL_standard___collection___sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3], fra.me.REG[2]);
341 REGB4 = TAG_Int(0);
342 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
343 if (UNTAG_Bool(REGB6)) {
344 } else {
345 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
346 }
347 /* ../lib/standard/kernel.nit:233 */
348 REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
349 } else {
350 /* ../lib/standard/collection/sorter.nit:52 */
351 REGB5 = TAG_Bool(false);
352 REGB4 = REGB5;
353 }
354 if (UNTAG_Bool(REGB4)) {
355 REGB4 = TAG_Int(1);
356 /* ../lib/standard/kernel.nit:237 */
357 REGB4 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB4));
358 /* ../lib/standard/collection/sorter.nit:52 */
359 REGB3 = REGB4;
360 } else {
361 goto label5;
362 }
363 }
364 label5: while(0);
365 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
366 if (UNTAG_Bool(REGB4)) {
367 } else {
368 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
369 }
370 /* ../lib/standard/kernel.nit:234 */
371 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
372 /* ../lib/standard/collection/sorter.nit:53 */
373 if (UNTAG_Bool(REGB4)) {
374 /* ../lib/standard/collection/array.nit:278 */
375 fra.me.REG[3] = fra.me.REG[1];
376 REGB4 = REGB2;
377 /* ../lib/standard/collection/array.nit:280 */
378 REGB5 = TAG_Int(0);
379 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
380 if (UNTAG_Bool(REGB6)) {
381 } else {
382 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
383 }
384 /* ../lib/standard/kernel.nit:233 */
385 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
386 /* ../lib/standard/collection/array.nit:280 */
387 if (UNTAG_Bool(REGB5)) {
388 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
389 if (UNTAG_Bool(REGB5)) {
390 } else {
391 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
392 }
393 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
394 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
395 if (UNTAG_Bool(REGB6)) {
396 } else {
397 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
398 }
399 /* ../lib/standard/kernel.nit:232 */
400 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
401 } else {
402 /* ../lib/standard/collection/array.nit:280 */
403 REGB6 = TAG_Bool(false);
404 REGB5 = REGB6;
405 }
406 if (UNTAG_Bool(REGB5)) {
407 } else {
408 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
409 }
410 /* ../lib/standard/collection/array.nit:281 */
411 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
412 REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
413 if (UNTAG_Bool(REGB5)) {
414 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
415 }
416 /* ../lib/standard/collection/array.nit:718 */
417 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
418 /* ../lib/standard/collection/array.nit:281 */
419 goto label6;
420 label6: while(0);
421 /* ../lib/standard/collection/array.nit:278 */
422 fra.me.REG[4] = fra.me.REG[1];
423 REGB4 = REGB3;
424 /* ../lib/standard/collection/array.nit:280 */
425 REGB5 = TAG_Int(0);
426 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
427 if (UNTAG_Bool(REGB6)) {
428 } else {
429 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
430 }
431 /* ../lib/standard/kernel.nit:233 */
432 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
433 /* ../lib/standard/collection/array.nit:280 */
434 if (UNTAG_Bool(REGB5)) {
435 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
436 if (UNTAG_Bool(REGB5)) {
437 } else {
438 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
439 }
440 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4]);
441 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
442 if (UNTAG_Bool(REGB6)) {
443 } else {
444 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
445 }
446 /* ../lib/standard/kernel.nit:232 */
447 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
448 } else {
449 /* ../lib/standard/collection/array.nit:280 */
450 REGB6 = TAG_Bool(false);
451 REGB5 = REGB6;
452 }
453 if (UNTAG_Bool(REGB5)) {
454 } else {
455 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
456 }
457 /* ../lib/standard/collection/array.nit:281 */
458 fra.me.REG[4] = ATTR_standard___collection___array___Array____items(fra.me.REG[4]);
459 REGB5 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
460 if (UNTAG_Bool(REGB5)) {
461 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
462 }
463 /* ../lib/standard/collection/array.nit:718 */
464 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB4)];
465 /* ../lib/standard/collection/array.nit:281 */
466 goto label7;
467 label7: while(0);
468 /* ../lib/standard/collection/sorter.nit:55 */
469 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[4]);
470 /* ../lib/standard/collection/sorter.nit:56 */
471 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB3, fra.me.REG[3]);
472 }
473 } else {
474 /* ../lib/standard/collection/sorter.nit:50 */
475 goto label8;
476 }
477 }
478 label8: while(0);
479 /* ../lib/standard/collection/sorter.nit:59 */
480 REGB3 = TAG_Int(1);
481 /* ../lib/standard/kernel.nit:237 */
482 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
483 /* ../lib/standard/collection/array.nit:278 */
484 fra.me.REG[3] = fra.me.REG[1];
485 /* ../lib/standard/collection/array.nit:280 */
486 REGB4 = TAG_Int(0);
487 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
488 if (UNTAG_Bool(REGB5)) {
489 } else {
490 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
491 }
492 /* ../lib/standard/kernel.nit:233 */
493 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4));
494 /* ../lib/standard/collection/array.nit:280 */
495 if (UNTAG_Bool(REGB4)) {
496 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
497 if (UNTAG_Bool(REGB4)) {
498 } else {
499 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
500 }
501 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
502 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
503 if (UNTAG_Bool(REGB5)) {
504 } else {
505 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
506 }
507 /* ../lib/standard/kernel.nit:232 */
508 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
509 } else {
510 /* ../lib/standard/collection/array.nit:280 */
511 REGB5 = TAG_Bool(false);
512 REGB4 = REGB5;
513 }
514 if (UNTAG_Bool(REGB4)) {
515 } else {
516 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
517 }
518 /* ../lib/standard/collection/array.nit:281 */
519 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
520 REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
521 if (UNTAG_Bool(REGB4)) {
522 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
523 }
524 /* ../lib/standard/collection/array.nit:718 */
525 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB3)];
526 /* ../lib/standard/collection/array.nit:281 */
527 goto label9;
528 label9: while(0);
529 /* ../lib/standard/collection/sorter.nit:59 */
530 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[3]);
531 /* ../lib/standard/collection/sorter.nit:60 */
532 REGB3 = TAG_Int(1);
533 /* ../lib/standard/kernel.nit:237 */
534 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
535 /* ../lib/standard/collection/sorter.nit:60 */
536 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB3, fra.me.REG[2]);
537 /* ../lib/standard/collection/sorter.nit:61 */
538 REGB3 = TAG_Int(2);
539 /* ../lib/standard/kernel.nit:237 */
540 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
541 /* ../lib/standard/collection/sorter.nit:61 */
542 CALL_standard___collection___sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB3);
543 /* ../lib/standard/collection/sorter.nit:62 */
544 CALL_standard___collection___sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB2, REGB1);
545 stack_frame_head = fra.me.prev;
546 return;
547 }
548 void standard___collection___sorter___AbstractSorter___bubble_sort(val_t p0, val_t p1, val_t p2, val_t p3){
549 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
550 val_t REGB0;
551 val_t REGB1;
552 val_t REGB2;
553 val_t REGB3;
554 val_t REGB4;
555 val_t REGB5;
556 val_t REGB6;
557 val_t tmp;
558 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
559 fra.me.file = LOCATE_standard___collection___sorter;
560 fra.me.line = 65;
561 fra.me.meth = LOCATE_standard___collection___sorter___AbstractSorter___bubble_sort;
562 fra.me.has_broke = 0;
563 fra.me.REG_size = 4;
564 fra.me.nitni_local_ref_head = NULL;
565 fra.me.REG[0] = NIT_NULL;
566 fra.me.REG[1] = NIT_NULL;
567 fra.me.REG[2] = NIT_NULL;
568 fra.me.REG[3] = NIT_NULL;
569 fra.me.REG[0] = p0;
570 fra.me.REG[1] = p1;
571 REGB0 = p2;
572 REGB1 = p3;
573 /* ../lib/standard/collection/sorter.nit:69 */
574 while(1) {
575 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
576 if (UNTAG_Bool(REGB2)) {
577 } else {
578 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
579 }
580 /* ../lib/standard/kernel.nit:232 */
581 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
582 /* ../lib/standard/collection/sorter.nit:69 */
583 if (UNTAG_Bool(REGB2)) {
584 /* ../lib/standard/collection/sorter.nit:70 */
585 REGB2 = REGB0;
586 /* ../lib/standard/collection/array.nit:278 */
587 fra.me.REG[2] = fra.me.REG[1];
588 REGB3 = REGB0;
589 /* ../lib/standard/collection/array.nit:280 */
590 REGB4 = TAG_Int(0);
591 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
592 if (UNTAG_Bool(REGB5)) {
593 } else {
594 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
595 }
596 /* ../lib/standard/kernel.nit:233 */
597 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4));
598 /* ../lib/standard/collection/array.nit:280 */
599 if (UNTAG_Bool(REGB4)) {
600 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
601 if (UNTAG_Bool(REGB4)) {
602 } else {
603 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
604 }
605 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
606 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
607 if (UNTAG_Bool(REGB5)) {
608 } else {
609 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
610 }
611 /* ../lib/standard/kernel.nit:232 */
612 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
613 } else {
614 /* ../lib/standard/collection/array.nit:280 */
615 REGB5 = TAG_Bool(false);
616 REGB4 = REGB5;
617 }
618 if (UNTAG_Bool(REGB4)) {
619 } else {
620 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
621 }
622 /* ../lib/standard/collection/array.nit:281 */
623 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
624 REGB4 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
625 if (UNTAG_Bool(REGB4)) {
626 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
627 }
628 /* ../lib/standard/collection/array.nit:718 */
629 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB3)];
630 /* ../lib/standard/collection/array.nit:281 */
631 goto label1;
632 label1: while(0);
633 /* ../lib/standard/collection/sorter.nit:72 */
634 REGB3 = REGB0;
635 /* ../lib/standard/collection/sorter.nit:73 */
636 while(1) {
637 REGB4 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
638 if (UNTAG_Bool(REGB4)) {
639 } else {
640 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
641 }
642 /* ../lib/standard/kernel.nit:231 */
643 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<=UNTAG_Int(REGB1));
644 /* ../lib/standard/collection/sorter.nit:73 */
645 if (UNTAG_Bool(REGB4)) {
646 /* ../lib/standard/collection/array.nit:278 */
647 fra.me.REG[3] = fra.me.REG[1];
648 REGB4 = REGB3;
649 /* ../lib/standard/collection/array.nit:280 */
650 REGB5 = TAG_Int(0);
651 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
652 if (UNTAG_Bool(REGB6)) {
653 } else {
654 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
655 }
656 /* ../lib/standard/kernel.nit:233 */
657 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
658 /* ../lib/standard/collection/array.nit:280 */
659 if (UNTAG_Bool(REGB5)) {
660 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
661 if (UNTAG_Bool(REGB5)) {
662 } else {
663 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
664 }
665 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
666 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
667 if (UNTAG_Bool(REGB6)) {
668 } else {
669 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
670 }
671 /* ../lib/standard/kernel.nit:232 */
672 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
673 } else {
674 /* ../lib/standard/collection/array.nit:280 */
675 REGB6 = TAG_Bool(false);
676 REGB5 = REGB6;
677 }
678 if (UNTAG_Bool(REGB5)) {
679 } else {
680 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
681 }
682 /* ../lib/standard/collection/array.nit:281 */
683 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
684 REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
685 if (UNTAG_Bool(REGB5)) {
686 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
687 }
688 /* ../lib/standard/collection/array.nit:718 */
689 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
690 /* ../lib/standard/collection/array.nit:281 */
691 goto label2;
692 label2: while(0);
693 /* ../lib/standard/collection/sorter.nit:74 */
694 REGB4 = CALL_standard___collection___sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], fra.me.REG[3]);
695 REGB5 = TAG_Int(0);
696 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
697 if (UNTAG_Bool(REGB6)) {
698 } else {
699 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
700 }
701 /* ../lib/standard/kernel.nit:234 */
702 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>UNTAG_Int(REGB5));
703 /* ../lib/standard/collection/sorter.nit:74 */
704 if (UNTAG_Bool(REGB5)) {
705 /* ../lib/standard/collection/sorter.nit:75 */
706 REGB2 = REGB3;
707 /* ../lib/standard/collection/array.nit:278 */
708 fra.me.REG[3] = fra.me.REG[1];
709 REGB5 = REGB3;
710 /* ../lib/standard/collection/array.nit:280 */
711 REGB4 = TAG_Int(0);
712 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
713 if (UNTAG_Bool(REGB6)) {
714 } else {
715 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
716 }
717 /* ../lib/standard/kernel.nit:233 */
718 REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
719 /* ../lib/standard/collection/array.nit:280 */
720 if (UNTAG_Bool(REGB4)) {
721 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
722 if (UNTAG_Bool(REGB4)) {
723 } else {
724 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
725 }
726 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
727 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
728 if (UNTAG_Bool(REGB6)) {
729 } else {
730 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
731 }
732 /* ../lib/standard/kernel.nit:232 */
733 REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
734 } else {
735 /* ../lib/standard/collection/array.nit:280 */
736 REGB6 = TAG_Bool(false);
737 REGB4 = REGB6;
738 }
739 if (UNTAG_Bool(REGB4)) {
740 } else {
741 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
742 }
743 /* ../lib/standard/collection/array.nit:281 */
744 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
745 REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
746 if (UNTAG_Bool(REGB4)) {
747 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
748 }
749 /* ../lib/standard/collection/array.nit:718 */
750 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB5)];
751 /* ../lib/standard/collection/array.nit:281 */
752 goto label3;
753 label3: while(0);
754 /* ../lib/standard/collection/sorter.nit:76 */
755 fra.me.REG[2] = fra.me.REG[3];
756 }
757 /* ../lib/standard/collection/sorter.nit:78 */
758 REGB5 = TAG_Int(1);
759 /* ../lib/standard/kernel.nit:235 */
760 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
761 /* ../lib/standard/collection/sorter.nit:78 */
762 REGB3 = REGB5;
763 } else {
764 /* ../lib/standard/collection/sorter.nit:73 */
765 goto label4;
766 }
767 }
768 label4: while(0);
769 /* ../lib/standard/collection/sorter.nit:80 */
770 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB0));
771 if (UNTAG_Bool(REGB3)) {
772 } else {
773 /* ../lib/standard/kernel.nit:227 */
774 REGB5 = TAG_Bool((REGB2)==(REGB0));
775 /* ../lib/standard/collection/sorter.nit:80 */
776 REGB3 = REGB5;
777 }
778 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
779 if (UNTAG_Bool(REGB3)) {
780 /* ../lib/standard/collection/array.nit:278 */
781 fra.me.REG[3] = fra.me.REG[1];
782 REGB3 = REGB0;
783 /* ../lib/standard/collection/array.nit:280 */
784 REGB5 = TAG_Int(0);
785 REGB4 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
786 if (UNTAG_Bool(REGB4)) {
787 } else {
788 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
789 }
790 /* ../lib/standard/kernel.nit:233 */
791 REGB5 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB5));
792 /* ../lib/standard/collection/array.nit:280 */
793 if (UNTAG_Bool(REGB5)) {
794 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
795 if (UNTAG_Bool(REGB5)) {
796 } else {
797 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
798 }
799 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
800 REGB4 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
801 if (UNTAG_Bool(REGB4)) {
802 } else {
803 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
804 }
805 /* ../lib/standard/kernel.nit:232 */
806 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
807 } else {
808 /* ../lib/standard/collection/array.nit:280 */
809 REGB4 = TAG_Bool(false);
810 REGB5 = REGB4;
811 }
812 if (UNTAG_Bool(REGB5)) {
813 } else {
814 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
815 }
816 /* ../lib/standard/collection/array.nit:281 */
817 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
818 REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
819 if (UNTAG_Bool(REGB5)) {
820 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
821 }
822 /* ../lib/standard/collection/array.nit:718 */
823 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB3)];
824 /* ../lib/standard/collection/array.nit:281 */
825 goto label5;
826 label5: while(0);
827 /* ../lib/standard/collection/sorter.nit:81 */
828 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[3]);
829 /* ../lib/standard/collection/sorter.nit:82 */
830 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[2]);
831 }
832 /* ../lib/standard/collection/sorter.nit:84 */
833 REGB2 = TAG_Int(1);
834 /* ../lib/standard/kernel.nit:235 */
835 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
836 /* ../lib/standard/collection/sorter.nit:84 */
837 REGB0 = REGB2;
838 } else {
839 /* ../lib/standard/collection/sorter.nit:69 */
840 goto label6;
841 }
842 }
843 label6: while(0);
844 stack_frame_head = fra.me.prev;
845 return;
846 }
847 val_t standard___collection___sorter___ComparableSorter___compare(val_t p0, val_t p1, val_t p2){
848 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
849 val_t REGB0;
850 val_t tmp;
851 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
852 fra.me.file = LOCATE_standard___collection___sorter;
853 fra.me.line = 93;
854 fra.me.meth = LOCATE_standard___collection___sorter___ComparableSorter___compare;
855 fra.me.has_broke = 0;
856 fra.me.REG_size = 3;
857 fra.me.nitni_local_ref_head = NULL;
858 fra.me.REG[0] = NIT_NULL;
859 fra.me.REG[1] = NIT_NULL;
860 fra.me.REG[2] = NIT_NULL;
861 fra.me.REG[0] = p0;
862 fra.me.REG[1] = p1;
863 fra.me.REG[2] = p2;
864 /* ../lib/standard/collection/sorter.nit:94 */
865 REGB0 = CALL_standard___kernel___Comparable_____leqg(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
866 goto label1;
867 label1: while(0);
868 stack_frame_head = fra.me.prev;
869 return REGB0;
870 }
871 void standard___collection___sorter___ComparableSorter___init(val_t p0, int* init_table){
872 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___collection___sorter___ComparableSorter].i;
873 struct {struct stack_frame_t me;} fra;
874 val_t tmp;
875 if (init_table[itpos0]) return;
876 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
877 fra.me.file = LOCATE_standard___collection___sorter;
878 fra.me.line = 96;
879 fra.me.meth = LOCATE_standard___collection___sorter___ComparableSorter___init;
880 fra.me.has_broke = 0;
881 fra.me.REG_size = 1;
882 fra.me.nitni_local_ref_head = NULL;
883 fra.me.REG[0] = NIT_NULL;
884 fra.me.REG[0] = p0;
885 stack_frame_head = fra.me.prev;
886 init_table[itpos0] = 1;
887 return;
888 }