remove putenv, setenv and unsetenv
[nit.git] / c_src / array._sep.c
1 /* This C file is generated by NIT to compile module array. */
2 #include "array._sep.h"
3 void array___AbstractArray___enlarge(val_t self, val_t param0) {
4 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___enlarge, 23};
5 trace.prev = tracehead; tracehead = &trace;
6 fprintf(stderr, "Deferred method %s called (%s: %d)\n", "enlarge", LOCATE_array, 23);
7 nit_exit(1);
8 tracehead = trace.prev;
9 return;
10 }
11 val_t array___AbstractArray___length(val_t self) {
12 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___length, 25};
13 trace.prev = tracehead; tracehead = &trace;
14 tracehead = trace.prev;
15 return ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/;
16 }
17 val_t array___AbstractArray___is_empty(val_t self) {
18 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___is_empty, 28};
19 val_t variable0;
20 trace.prev = tracehead; tracehead = &trace;
21 variable0 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/;
22 variable0 = TAG_Bool((variable0)==( TAG_Int(0)));
23 goto return_label0;
24 return_label0: while(false);
25 tracehead = trace.prev;
26 return variable0;
27 }
28 void array___AbstractArray___push(val_t self, val_t param0) {
29 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___push, 30};
30 val_t variable0;
31 trace.prev = tracehead; tracehead = &trace;
32 variable0 = param0;
33 ((array___AbstractArray___add_t)CALL( self,COLOR_abstract_collection___SimpleCollection___add))( self, variable0 /*item*/) /*AbstractArray::add*/;
34 tracehead = trace.prev;
35 return;
36 }
37 val_t array___AbstractArray___pop(val_t self) {
38 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___pop, 32};
39 val_t variable0;
40 val_t variable1;
41 trace.prev = tracehead; tracehead = &trace;
42 variable0 = ((array___AbstractArray___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*AbstractArray::is_empty*/;
43 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'not_empty' ", LOCATE_array___AbstractArray___pop, 34); nit_exit(1);}
44 variable1 = ((abstract_collection___IndexedCollection___last_t)CALL( self,COLOR_abstract_collection___IndexedCollection___last))( self) /*AbstractArray::last*/;
45 variable0 = variable1;
46 ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/)-UNTAG_Int( TAG_Int(1)));
47 variable0 = variable0 /*r*/;
48 goto return_label2;
49 return_label2: while(false);
50 tracehead = trace.prev;
51 return variable0;
52 }
53 val_t array___AbstractArray___shift(val_t self) {
54 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___shift, 40};
55 val_t variable0;
56 val_t variable1;
57 val_t variable2;
58 val_t variable3;
59 val_t variable4;
60 trace.prev = tracehead; tracehead = &trace;
61 variable0 = ((array___AbstractArray___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*AbstractArray::is_empty*/;
62 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'not_empty' ", LOCATE_array___AbstractArray___shift, 42); nit_exit(1);}
63 variable1 = ((abstract_collection___IndexedCollection___first_t)CALL( self,COLOR_abstract_collection___Collection___first))( self) /*AbstractArray::first*/;
64 variable0 = variable1;
65 variable1 = TAG_Int(1);
66 variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
67 variable2 = variable3;
68 while (true) { /*while*/
69 variable3 = TAG_Bool(UNTAG_Int( variable1 /*i*/)<UNTAG_Int( variable2 /*l*/));
70 if (!UNTAG_Bool(variable3)) break; /* while*/
71 variable3 = TAG_Int(UNTAG_Int( variable1 /*i*/)-UNTAG_Int( TAG_Int(1)));
72 variable4 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*AbstractArray::[]*/;
73 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable3, variable4) /*AbstractArray::[]=*/;
74 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*i*/;
75 continue_4: while(0);
76 }
77 break_4: while(0);
78 variable3 = TAG_Int(UNTAG_Int( variable2 /*l*/)-UNTAG_Int( TAG_Int(1)));
79 ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable3;
80 variable0 = variable0 /*r*/;
81 goto return_label3;
82 return_label3: while(false);
83 tracehead = trace.prev;
84 return variable0;
85 }
86 void array___AbstractArray___unshift(val_t self, val_t param0) {
87 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___unshift, 54};
88 val_t variable0;
89 val_t variable1;
90 val_t variable2;
91 val_t variable3;
92 trace.prev = tracehead; tracehead = &trace;
93 variable0 = param0;
94 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
95 variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1)));
96 variable1 = variable2;
97 while (true) { /*while*/
98 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>UNTAG_Int( TAG_Int(0)));
99 if (!UNTAG_Bool(variable2)) break; /* while*/
100 variable2 = TAG_Int(UNTAG_Int( variable1 /*i*/)+UNTAG_Int( TAG_Int(1)));
101 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*AbstractArray::[]*/;
102 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable2, variable3) /*AbstractArray::[]=*/;
103 variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/;
104 continue_6: while(0);
105 }
106 break_6: while(0);
107 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, TAG_Int(0), variable0 /*item*/) /*AbstractArray::[]=*/;
108 tracehead = trace.prev;
109 return;
110 }
111 void array___AbstractArray___insert(val_t self, val_t param0, val_t param1) {
112 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___insert, 64};
113 val_t variable0;
114 val_t variable1;
115 val_t variable2;
116 val_t variable3;
117 trace.prev = tracehead; tracehead = &trace;
118 variable0 = param0;
119 variable1 = param1;
120 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
121 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1)));
122 ((array___AbstractArray___enlarge_t)CALL( self,COLOR_array___AbstractArray___enlarge))( self, variable2) /*AbstractArray::enlarge*/;
123 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
124 variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( variable1 /*pos*/));
125 variable3 = TAG_Int(UNTAG_Int( variable1 /*pos*/)+UNTAG_Int( TAG_Int(1)));
126 ((array___AbstractArray___copy_to_t)CALL( self,COLOR_array___AbstractArray___copy_to))( self, variable1 /*pos*/, variable2, self, variable3) /*AbstractArray::copy_to*/;
127 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable1 /*pos*/, variable0 /*item*/) /*AbstractArray::[]=*/;
128 tracehead = trace.prev;
129 return;
130 }
131 void array___AbstractArray___add(val_t self, val_t param0) {
132 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___add, 71};
133 val_t variable0;
134 val_t variable1;
135 trace.prev = tracehead; tracehead = &trace;
136 variable0 = param0;
137 variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
138 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable1, variable0 /*item*/) /*AbstractArray::[]=*/;
139 tracehead = trace.prev;
140 return;
141 }
142 void array___AbstractArray___clear(val_t self) {
143 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___clear, 73};
144 trace.prev = tracehead; tracehead = &trace;
145 ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(0);
146 tracehead = trace.prev;
147 return;
148 }
149 val_t array___AbstractArray___has(val_t self, val_t param0) {
150 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___has, 75};
151 val_t variable0;
152 val_t variable1;
153 val_t variable2;
154 val_t variable3;
155 trace.prev = tracehead; tracehead = &trace;
156 variable0 = param0;
157 variable1 = TAG_Int(0);
158 variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
159 variable2 = variable3;
160 while (true) { /*while*/
161 variable3 = TAG_Bool(UNTAG_Int( variable1 /*i*/)<UNTAG_Int( variable2 /*l*/));
162 if (!UNTAG_Bool(variable3)) break; /* while*/
163 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*AbstractArray::[]*/;
164 variable3 = TAG_Bool((variable3 == variable0 /*item*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*item*/) /*Object::==*/)))));
165 if (UNTAG_Bool(variable3)) { /*if*/
166 variable1 = TAG_Bool(true);
167 goto return_label10;
168 }
169 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*i*/;
170 continue_11: while(0);
171 }
172 break_11: while(0);
173 variable1 = TAG_Bool(false);
174 goto return_label10;
175 return_label10: while(false);
176 tracehead = trace.prev;
177 return variable1;
178 }
179 val_t array___AbstractArray___has_only(val_t self, val_t param0) {
180 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___has_only, 86};
181 val_t variable0;
182 val_t variable1;
183 val_t variable2;
184 val_t variable3;
185 trace.prev = tracehead; tracehead = &trace;
186 variable0 = param0;
187 variable1 = TAG_Int(0);
188 variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
189 variable2 = variable3;
190 while (true) { /*while*/
191 variable3 = TAG_Bool(UNTAG_Int( variable1 /*i*/)<UNTAG_Int( variable2 /*l*/));
192 if (!UNTAG_Bool(variable3)) break; /* while*/
193 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*AbstractArray::[]*/;
194 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == variable0 /*item*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*item*/) /*Object::==*/)))))));
195 if (UNTAG_Bool(variable3)) { /*if*/
196 variable1 = TAG_Bool(false);
197 goto return_label12;
198 }
199 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*i*/;
200 continue_13: while(0);
201 }
202 break_13: while(0);
203 variable1 = TAG_Bool(true);
204 goto return_label12;
205 return_label12: while(false);
206 tracehead = trace.prev;
207 return variable1;
208 }
209 val_t array___AbstractArray___has_key(val_t self, val_t param0) {
210 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___has_key, 97};
211 val_t variable0;
212 val_t variable1;
213 val_t variable2;
214 trace.prev = tracehead; tracehead = &trace;
215 variable0 = param0;
216 variable1 = TAG_Bool(UNTAG_Int( variable0 /*index*/)>=UNTAG_Int( TAG_Int(0)));
217 variable2 = variable1;
218 if (UNTAG_Bool(variable2)) { /* and */
219 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
220 variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)<UNTAG_Int(variable2));
221 }
222 variable1 = variable2;
223 goto return_label14;
224 return_label14: while(false);
225 tracehead = trace.prev;
226 return variable1;
227 }
228 val_t array___AbstractArray___count(val_t self, val_t param0) {
229 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___count, 99};
230 val_t variable0;
231 val_t variable1;
232 val_t variable2;
233 val_t variable3;
234 val_t variable4;
235 trace.prev = tracehead; tracehead = &trace;
236 variable0 = param0;
237 variable1 = TAG_Int(0);
238 variable2 = TAG_Int(0);
239 variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
240 variable3 = variable4;
241 while (true) { /*while*/
242 variable4 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable3 /*l*/));
243 if (!UNTAG_Bool(variable4)) break; /* while*/
244 variable4 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*i*/) /*AbstractArray::[]*/;
245 variable4 = TAG_Bool((variable4 == variable0 /*item*/) || ((variable4 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable4, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))(variable4, variable0 /*item*/) /*Object::==*/)))));
246 if (UNTAG_Bool(variable4)) { /*if*/
247 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*res*/;
248 }
249 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
250 continue_16: while(0);
251 }
252 break_16: while(0);
253 variable1 = variable1 /*res*/;
254 goto return_label15;
255 return_label15: while(false);
256 tracehead = trace.prev;
257 return variable1;
258 }
259 val_t array___AbstractArray___index_of(val_t self, val_t param0) {
260 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___index_of, 111};
261 val_t variable0;
262 val_t variable1;
263 trace.prev = tracehead; tracehead = &trace;
264 variable0 = param0;
265 variable1 = ((array___AbstractArray___index_of_from_t)CALL( self,COLOR_array___AbstractArray___index_of_from))( self, variable0 /*item*/, TAG_Int(0)) /*AbstractArray::index_of_from*/;
266 goto return_label17;
267 return_label17: while(false);
268 tracehead = trace.prev;
269 return variable1;
270 }
271 val_t array___AbstractArray___last_index_of(val_t self, val_t param0) {
272 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___last_index_of, 113};
273 val_t variable0;
274 val_t variable1;
275 trace.prev = tracehead; tracehead = &trace;
276 variable0 = param0;
277 variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
278 variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1)));
279 variable1 = ((array___AbstractArray___last_index_of_from_t)CALL( self,COLOR_array___AbstractArray___last_index_of_from))( self, variable0 /*item*/, variable1) /*AbstractArray::last_index_of_from*/;
280 goto return_label18;
281 return_label18: while(false);
282 tracehead = trace.prev;
283 return variable1;
284 }
285 val_t array___AbstractArray___index_of_from(val_t self, val_t param0, val_t param1) {
286 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___index_of_from, 115};
287 val_t variable0;
288 val_t variable1;
289 val_t variable2;
290 val_t variable3;
291 val_t variable4;
292 trace.prev = tracehead; tracehead = &trace;
293 variable0 = param0;
294 variable1 = param1;
295 variable2 = variable1 /*pos*/;
296 variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
297 variable3 = variable4;
298 while (true) { /*while*/
299 variable4 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable3 /*len*/));
300 if (!UNTAG_Bool(variable4)) break; /* while*/
301 variable4 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*i*/) /*AbstractArray::[]*/;
302 variable4 = TAG_Bool((variable4 == variable0 /*item*/) || ((variable4 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable4, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))(variable4, variable0 /*item*/) /*Object::==*/)))));
303 if (UNTAG_Bool(variable4)) { /*if*/
304 variable2 = variable2 /*i*/;
305 goto return_label19;
306 }
307 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
308 continue_20: while(0);
309 }
310 break_20: while(0);
311 variable4 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
312 variable2 = variable4;
313 goto return_label19;
314 return_label19: while(false);
315 tracehead = trace.prev;
316 return variable2;
317 }
318 val_t array___AbstractArray___last_index_of_from(val_t self, val_t param0, val_t param1) {
319 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___last_index_of_from, 128};
320 val_t variable0;
321 val_t variable1;
322 val_t variable2;
323 val_t variable3;
324 trace.prev = tracehead; tracehead = &trace;
325 variable0 = param0;
326 variable1 = param1;
327 variable2 = variable1 /*pos*/;
328 while (true) { /*while*/
329 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)>=UNTAG_Int( TAG_Int(0)));
330 if (!UNTAG_Bool(variable3)) break; /* while*/
331 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*i*/) /*AbstractArray::[]*/;
332 variable3 = TAG_Bool((variable3 == variable0 /*item*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*item*/) /*Object::==*/)))));
333 if (UNTAG_Bool(variable3)) { /*if*/
334 variable2 = variable2 /*i*/;
335 goto return_label21;
336 } else { /*if*/
337 variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1))) /*i*/;
338 }
339 continue_22: while(0);
340 }
341 break_22: while(0);
342 variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
343 variable2 = variable3;
344 goto return_label21;
345 return_label21: while(false);
346 tracehead = trace.prev;
347 return variable2;
348 }
349 val_t array___AbstractArray___reversed(val_t self) {
350 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___reversed, 141};
351 val_t variable0;
352 val_t variable1;
353 val_t variable2;
354 trace.prev = tracehead; tracehead = &trace;
355 variable1 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/;
356 variable0 = variable1;
357 variable2 = NEW_array___Array___with_capacity( variable0 /*cmp*/); /*new Array[E]*/
358 variable1 = variable2;
359 while (true) { /*while*/
360 variable2 = TAG_Bool(UNTAG_Int( variable0 /*cmp*/)>UNTAG_Int( TAG_Int(0)));
361 if (!UNTAG_Bool(variable2)) break; /* while*/
362 variable0 = TAG_Int(UNTAG_Int(variable0)-UNTAG_Int( TAG_Int(1))) /*cmp*/;
363 variable2 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable0 /*cmp*/) /*AbstractArray::[]*/;
364 ((array___AbstractArray___add_t)CALL( variable1 /*result*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*result*/, variable2) /*Array::add*/;
365 continue_24: while(0);
366 }
367 break_24: while(0);
368 variable0 = variable1 /*result*/;
369 goto return_label23;
370 return_label23: while(false);
371 tracehead = trace.prev;
372 return variable0;
373 }
374 void array___AbstractArray___remove(val_t self, val_t param0) {
375 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___remove, 152};
376 val_t variable0;
377 val_t variable1;
378 trace.prev = tracehead; tracehead = &trace;
379 variable0 = param0;
380 variable1 = ((array___AbstractArray___index_of_t)CALL( self,COLOR_abstract_collection___IndexedCollection___index_of))( self, variable0 /*item*/) /*AbstractArray::index_of*/;
381 ((array___AbstractArray___remove_at_t)CALL( self,COLOR_abstract_collection___Map___remove_at))( self, variable1) /*AbstractArray::remove_at*/;
382 tracehead = trace.prev;
383 return;
384 }
385 void array___AbstractArray___remove_all(val_t self, val_t param0) {
386 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___remove_all, 154};
387 val_t variable0;
388 val_t variable1;
389 val_t variable2;
390 trace.prev = tracehead; tracehead = &trace;
391 variable0 = param0;
392 variable2 = ((array___AbstractArray___index_of_t)CALL( self,COLOR_abstract_collection___IndexedCollection___index_of))( self, variable0 /*item*/) /*AbstractArray::index_of*/;
393 variable1 = variable2;
394 while (true) { /*while*/
395 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
396 if (!UNTAG_Bool(variable2)) break; /* while*/
397 ((array___AbstractArray___remove_at_t)CALL( self,COLOR_abstract_collection___Map___remove_at))( self, variable1 /*i*/) /*AbstractArray::remove_at*/;
398 variable2 = ((array___AbstractArray___index_of_from_t)CALL( self,COLOR_array___AbstractArray___index_of_from))( self, variable0 /*item*/, variable1 /*i*/) /*AbstractArray::index_of_from*/;
399 variable1 = variable2 /*i=*/;
400 continue_27: while(0);
401 }
402 break_27: while(0);
403 tracehead = trace.prev;
404 return;
405 }
406 void array___AbstractArray___remove_at(val_t self, val_t param0) {
407 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___remove_at, 163};
408 val_t variable0;
409 val_t variable1;
410 val_t variable2;
411 val_t variable3;
412 val_t variable4;
413 trace.prev = tracehead; tracehead = &trace;
414 variable0 = param0;
415 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
416 variable1 = variable2;
417 variable2 = TAG_Bool(UNTAG_Int( variable0 /*i*/)>=UNTAG_Int( TAG_Int(0)));
418 variable3 = variable2;
419 if (UNTAG_Bool(variable3)) { /* and */
420 variable3 = TAG_Bool(UNTAG_Int( variable0 /*i*/)<UNTAG_Int( variable1 /*l*/));
421 }
422 variable2 = variable3;
423 if (UNTAG_Bool(variable2)) { /*if*/
424 variable3 = TAG_Int(UNTAG_Int( variable0 /*i*/)+UNTAG_Int( TAG_Int(1)));
425 variable2 = variable3;
426 while (true) { /*while*/
427 variable3 = TAG_Bool(UNTAG_Int( variable2 /*j*/)<UNTAG_Int( variable1 /*l*/));
428 if (!UNTAG_Bool(variable3)) break; /* while*/
429 variable3 = TAG_Int(UNTAG_Int( variable2 /*j*/)-UNTAG_Int( TAG_Int(1)));
430 variable4 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*j*/) /*AbstractArray::[]*/;
431 ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable3, variable4) /*AbstractArray::[]=*/;
432 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*j*/;
433 continue_29: while(0);
434 }
435 break_29: while(0);
436 variable3 = TAG_Int(UNTAG_Int( variable1 /*l*/)-UNTAG_Int( TAG_Int(1)));
437 ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable3;
438 }
439 tracehead = trace.prev;
440 return;
441 }
442 void array___AbstractArray___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
443 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___copy_to, 176};
444 val_t variable0;
445 val_t variable1;
446 val_t variable2;
447 val_t variable3;
448 val_t variable4;
449 val_t variable5;
450 val_t variable6;
451 trace.prev = tracehead; tracehead = &trace;
452 variable0 = param0;
453 variable1 = param1;
454 variable2 = param2;
455 variable3 = param3;
456 variable4 = variable1 /*len*/;
457 while (true) { /*while*/
458 variable5 = TAG_Bool(UNTAG_Int( variable4 /*i*/)>UNTAG_Int( TAG_Int(0)));
459 if (!UNTAG_Bool(variable5)) break; /* while*/
460 variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( TAG_Int(1))) /*i*/;
461 variable5 = TAG_Int(UNTAG_Int( variable3 /*new_start*/)+UNTAG_Int( variable4 /*i*/));
462 variable6 = TAG_Int(UNTAG_Int( variable0 /*start*/)+UNTAG_Int( variable4 /*i*/));
463 variable6 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable6) /*AbstractArray::[]*/;
464 ((abstract_collection___Map_____braeq_t)CALL( variable2 /*dest*/,COLOR_abstract_collection___Map_____braeq))( variable2 /*dest*/, variable5, variable6) /*AbstractArray::[]=*/;
465 continue_31: while(0);
466 }
467 break_31: while(0);
468 tracehead = trace.prev;
469 return;
470 }
471 void array___AbstractArray___output(val_t self) {
472 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___output, 186};
473 val_t variable0;
474 val_t variable1;
475 val_t variable2;
476 val_t variable3;
477 trace.prev = tracehead; tracehead = &trace;
478 variable0 = TAG_Int(0);
479 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
480 variable1 = variable2;
481 while (true) { /*while*/
482 variable2 = TAG_Bool(UNTAG_Int( variable0 /*i*/)<UNTAG_Int( variable1 /*l*/));
483 if (!UNTAG_Bool(variable2)) break; /* while*/
484 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable0 /*i*/) /*AbstractArray::[]*/;
485 variable2 = variable3;
486 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*e*/ == NIT_NULL /*null*/) || (( variable2 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*e*/,COLOR_kernel___Object_____eqeq))( variable2 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
487 if (UNTAG_Bool(variable3)) { /*if*/
488 ((kernel___Object___output_t)CALL( variable2 /*e*/,COLOR_kernel___Object___output))( variable2 /*e*/) /*Object::output*/;
489 }
490 variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int( TAG_Int(1))) /*i*/;
491 continue_33: while(0);
492 }
493 break_33: while(0);
494 tracehead = trace.prev;
495 return;
496 }
497 val_t array___AbstractArray___iterator(val_t self) {
498 struct trace_t trace = {NULL, LOCATE_array___AbstractArray___iterator, 197};
499 val_t variable0;
500 trace.prev = tracehead; tracehead = &trace;
501 variable0 = NEW_array___ArrayIterator___init( self); /*new ArrayIterator[E]*/
502 goto return_label34;
503 return_label34: while(false);
504 tracehead = trace.prev;
505 return variable0;
506 }
507 val_t array___AbstractArray_____eqeq(val_t self, val_t param0) {
508 struct trace_t trace = {NULL, LOCATE_array___AbstractArray_____eqeq, 199};
509 val_t variable0;
510 val_t variable1;
511 val_t variable2;
512 val_t variable3;
513 val_t variable4;
514 trace.prev = tracehead; tracehead = &trace;
515 variable0 = param0;
516 variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/;
517 variable1 = TAG_Bool(!UNTAG_Bool(variable1));
518 if (!UNTAG_Bool(variable1)) { /* or */
519 variable1 = TAG_Bool(IS_EQUAL_NN( variable0 /*o*/, NIT_NULL /*null*/));
520 }
521 if (UNTAG_Bool(variable1)) { /*if*/
522 variable1 = TAG_Bool(false);
523 goto return_label35;
524 }
525 variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/;
526 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_array___AbstractArray_____eqeq, 203); nit_exit(1);}
527 variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/;
528 variable1 = variable2;
529 variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*o*/,COLOR_abstract_collection___Collection___length))( variable0 /*o*/) /*AbstractArray::length*/;
530 variable2 = TAG_Bool((variable2)!=( variable1 /*l*/));
531 if (UNTAG_Bool(variable2)) { /*if*/
532 variable1 = TAG_Bool(false);
533 goto return_label35;
534 }
535 variable2 = TAG_Int(0);
536 while (true) { /*while*/
537 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable1 /*l*/));
538 if (!UNTAG_Bool(variable3)) break; /* while*/
539 variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*i*/) /*AbstractArray::[]*/;
540 variable4 = ((abstract_collection___Map_____bra_t)CALL( variable0 /*o*/,COLOR_abstract_collection___Map_____bra))( variable0 /*o*/, variable2 /*i*/) /*AbstractArray::[]*/;
541 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == variable4) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3,variable4)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable4) /*Object::==*/)))))));
542 if (UNTAG_Bool(variable3)) { /*if*/
543 variable1 = TAG_Bool(false);
544 goto return_label35;
545 }
546 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
547 continue_36: while(0);
548 }
549 break_36: while(0);
550 variable1 = TAG_Bool(true);
551 goto return_label35;
552 return_label35: while(false);
553 tracehead = trace.prev;
554 return variable1;
555 }
556 val_t array___Array_____bra(val_t self, val_t param0) {
557 struct trace_t trace = {NULL, LOCATE_array___Array_____bra, 227};
558 val_t variable0;
559 val_t variable1;
560 val_t variable2;
561 trace.prev = tracehead; tracehead = &trace;
562 variable0 = param0;
563 variable1 = TAG_Bool(UNTAG_Int( variable0 /*index*/)>=UNTAG_Int( TAG_Int(0)));
564 variable2 = variable1;
565 if (UNTAG_Bool(variable2)) { /* and */
566 variable2 = ATTR_array___AbstractArray____length( self) /*Array::_length*/;
567 variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)<UNTAG_Int(variable2));
568 }
569 variable1 = variable2;
570 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
571 variable1 = ATTR_array___Array____items( self) /*Array::_items*/;
572 variable1 = UNBOX_NativeArray(variable1)[UNTAG_Int( variable0 /*index*/)];
573 goto return_label37;
574 return_label37: while(false);
575 tracehead = trace.prev;
576 return variable1;
577 }
578 void array___Array_____braeq(val_t self, val_t param0, val_t param1) {
579 struct trace_t trace = {NULL, LOCATE_array___Array_____braeq, 233};
580 val_t variable0;
581 val_t variable1;
582 val_t variable2;
583 val_t variable3;
584 trace.prev = tracehead; tracehead = &trace;
585 variable0 = param0;
586 variable1 = param1;
587 variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)>=UNTAG_Int( TAG_Int(0)));
588 variable3 = variable2;
589 if (UNTAG_Bool(variable3)) { /* and */
590 variable3 = ATTR_array___AbstractArray____length( self) /*Array::_length*/;
591 variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( TAG_Int(1)));
592 variable3 = TAG_Bool(UNTAG_Int( variable0 /*index*/)<UNTAG_Int(variable3));
593 }
594 variable2 = variable3;
595 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____braeq, 235); nit_exit(1);}
596 variable2 = ATTR_array___Array____capacity( self) /*Array::_capacity*/;
597 variable2 = TAG_Bool(UNTAG_Int(variable2)<=UNTAG_Int( variable0 /*index*/));
598 if (UNTAG_Bool(variable2)) { /*if*/
599 variable2 = TAG_Int(UNTAG_Int( variable0 /*index*/)+UNTAG_Int( TAG_Int(1)));
600 ((array___Array___enlarge_t)CALL( self,COLOR_array___AbstractArray___enlarge))( self, variable2) /*Array::enlarge*/;
601 }
602 variable2 = ATTR_array___AbstractArray____length( self) /*Array::_length*/;
603 variable2 = TAG_Bool(UNTAG_Int(variable2)<=UNTAG_Int( variable0 /*index*/));
604 if (UNTAG_Bool(variable2)) { /*if*/
605 variable2 = TAG_Int(UNTAG_Int( variable0 /*index*/)+UNTAG_Int( TAG_Int(1)));
606 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = variable2;
607 }
608 variable2 = ATTR_array___Array____items( self) /*Array::_items*/;
609 UNBOX_NativeArray(variable2)[UNTAG_Int( variable0 /*index*/)]= variable1 /*item*/;
610 tracehead = trace.prev;
611 return;
612 }
613 void array___Array___enlarge(val_t self, val_t param0) {
614 struct trace_t trace = {NULL, LOCATE_array___Array___enlarge, 245};
615 val_t variable0;
616 val_t variable1;
617 val_t variable2;
618 val_t variable3;
619 val_t variable4;
620 trace.prev = tracehead; tracehead = &trace;
621 variable0 = param0;
622 variable2 = ATTR_array___Array____capacity( self) /*Array::_capacity*/;
623 variable1 = variable2;
624 variable2 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)<=UNTAG_Int( variable1 /*c*/));
625 if (UNTAG_Bool(variable2)) { /*if*/
626 goto return_label39;
627 }
628 while (true) { /*while*/
629 variable2 = TAG_Bool(UNTAG_Int( variable1 /*c*/)<=UNTAG_Int( variable0 /*cap*/));
630 if (!UNTAG_Bool(variable2)) break; /* while*/
631 variable2 = TAG_Int(UNTAG_Int( variable1 /*c*/)*UNTAG_Int( TAG_Int(2)));
632 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(2)));
633 variable1 = variable2 /*c=*/;
634 continue_40: while(0);
635 }
636 break_40: while(0);
637 variable3 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable1 /*c*/) * sizeof(val_t))));
638 variable2 = variable3;
639 variable3 = ATTR_array___Array____capacity( self) /*Array::_capacity*/;
640 variable3 = TAG_Bool(UNTAG_Int(variable3)>UNTAG_Int( TAG_Int(0)));
641 if (UNTAG_Bool(variable3)) { /*if*/
642 variable3 = ATTR_array___Array____items( self) /*Array::_items*/;
643 variable4 = ATTR_array___AbstractArray____length( self) /*Array::_length*/;
644 (void)memcpy(UNBOX_NativeArray( variable2 /*a*/), UNBOX_NativeArray(variable3), UNTAG_Int(variable4)*sizeof(val_t));
645 }
646 ATTR_array___Array____items( self) /*Array::_items*/ = variable2 /*a*/;
647 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*c*/;
648 return_label39: while(false);
649 tracehead = trace.prev;
650 return;
651 }
652 void array___Array___init(val_t self, int* init_table) {
653 struct trace_t trace = {NULL, LOCATE_array___Array___init, 256};
654 trace.prev = tracehead; tracehead = &trace;
655 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return;
656 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = TAG_Int(0);
657 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = TAG_Int(0);
658 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1;
659 tracehead = trace.prev;
660 return;
661 }
662 void array___Array___with(val_t self, val_t param0, int* init_table) {
663 struct trace_t trace = {NULL, LOCATE_array___Array___with, 263};
664 val_t variable0;
665 val_t variable1;
666 trace.prev = tracehead; tracehead = &trace;
667 /* check if p<Array[E] with p:E */
668 if (( param0!=NIT_NULL) && !VAL_ISA( param0, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled (%s: %d)\n", LOCATE_array___Array___init, 264); nit_exit(1); } /*cast Array[E]*/;
669 variable0 = param0;
670 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return;
671 variable1 = ATTR_array___Array____items( variable0 /*objects*/) /*Array::_items*/;
672 ATTR_array___Array____items( self) /*Array::_items*/ = variable1;
673 variable1 = ATTR_array___Array____capacity( variable0 /*objects*/) /*Array::_capacity*/;
674 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1;
675 variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*objects*/,COLOR_abstract_collection___Collection___length))( variable0 /*objects*/) /*Array::length*/;
676 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = variable1;
677 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1;
678 tracehead = trace.prev;
679 return;
680 }
681 void array___Array___with_capacity(val_t self, val_t param0, int* init_table) {
682 struct trace_t trace = {NULL, LOCATE_array___Array___with_capacity, 271};
683 val_t variable0;
684 val_t variable1;
685 trace.prev = tracehead; tracehead = &trace;
686 variable0 = param0;
687 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return;
688 variable1 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)>=UNTAG_Int( TAG_Int(0)));
689 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___with_capacity, 274); nit_exit(1);}
690 variable1 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable0 /*cap*/) * sizeof(val_t))));
691 ATTR_array___Array____items( self) /*Array::_items*/ = variable1;
692 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable0 /*cap*/;
693 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = TAG_Int(0);
694 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1;
695 tracehead = trace.prev;
696 return;
697 }
698 void array___Array___filled_with(val_t self, val_t param0, val_t param1, int* init_table) {
699 struct trace_t trace = {NULL, LOCATE_array___Array___filled_with, 280};
700 val_t variable0;
701 val_t variable1;
702 val_t variable2;
703 val_t variable3;
704 trace.prev = tracehead; tracehead = &trace;
705 variable0 = param0;
706 variable1 = param1;
707 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return;
708 variable2 = TAG_Bool(UNTAG_Int( variable1 /*count*/)>=UNTAG_Int( TAG_Int(0)));
709 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___filled_with, 283); nit_exit(1);}
710 variable2 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable1 /*count*/) * sizeof(val_t))));
711 ATTR_array___Array____items( self) /*Array::_items*/ = variable2;
712 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*count*/;
713 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = variable1 /*count*/;
714 variable2 = TAG_Int(0);
715 while (true) { /*while*/
716 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable1 /*count*/));
717 if (!UNTAG_Bool(variable3)) break; /* while*/
718 ((array___Array_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable2 /*i*/, variable0 /*value*/) /*Array::[]=*/;
719 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
720 continue_45: while(0);
721 }
722 break_45: while(0);
723 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1;
724 tracehead = trace.prev;
725 return;
726 }
727 void array___Array___with_native(val_t self, val_t param0, val_t param1, int* init_table) {
728 struct trace_t trace = {NULL, LOCATE_array___Array___with_native, 294};
729 val_t variable0;
730 val_t variable1;
731 val_t variable2;
732 trace.prev = tracehead; tracehead = &trace;
733 variable0 = param0;
734 variable1 = param1;
735 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return;
736 variable2 = TAG_Bool(UNTAG_Int( variable1 /*size*/)>=UNTAG_Int( TAG_Int(0)));
737 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___with_native, 297); nit_exit(1);}
738 ATTR_array___Array____items( self) /*Array::_items*/ = variable0 /*nat*/;
739 ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*size*/;
740 ATTR_array___AbstractArray____length( self) /*Array::_length*/ = variable1 /*size*/;
741 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1;
742 tracehead = trace.prev;
743 return;
744 }
745 val_t array___ArrayIterator___item(val_t self) {
746 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___item, 313};
747 val_t variable0;
748 val_t variable1;
749 trace.prev = tracehead; tracehead = &trace;
750 variable0 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/;
751 variable1 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/;
752 variable0 = ((abstract_collection___Map_____bra_t)CALL(variable0,COLOR_abstract_collection___Map_____bra))(variable0, variable1) /*AbstractArray::[]*/;
753 goto return_label47;
754 return_label47: while(false);
755 tracehead = trace.prev;
756 return variable0;
757 }
758 void array___ArrayIterator___item__eq(val_t self, val_t param0) {
759 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___item__eq, 315};
760 val_t variable0;
761 val_t variable1;
762 val_t variable2;
763 trace.prev = tracehead; tracehead = &trace;
764 variable0 = param0;
765 variable1 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/;
766 variable2 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/;
767 ((abstract_collection___Map_____braeq_t)CALL(variable1,COLOR_abstract_collection___Map_____braeq))(variable1, variable2, variable0 /*e*/) /*AbstractArray::[]=*/;
768 tracehead = trace.prev;
769 return;
770 }
771 val_t array___ArrayIterator___is_ok(val_t self) {
772 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___is_ok, 317};
773 val_t variable0;
774 val_t variable1;
775 trace.prev = tracehead; tracehead = &trace;
776 variable0 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/;
777 variable1 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/;
778 variable1 = ((array___AbstractArray___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*AbstractArray::length*/;
779 variable0 = TAG_Bool(UNTAG_Int(variable0)<UNTAG_Int(variable1));
780 goto return_label49;
781 return_label49: while(false);
782 tracehead = trace.prev;
783 return variable0;
784 }
785 void array___ArrayIterator___next(val_t self) {
786 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___next, 319};
787 trace.prev = tracehead; tracehead = &trace;
788 ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/ = TAG_Int(UNTAG_Int(ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/)+UNTAG_Int( TAG_Int(1)));
789 tracehead = trace.prev;
790 return;
791 }
792 void array___ArrayIterator___init(val_t self, val_t param0, int* init_table) {
793 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___init, 321};
794 val_t variable0;
795 val_t variable1;
796 trace.prev = tracehead; tracehead = &trace;
797 variable0 = param0;
798 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayIterator].i]) return;
799 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*a*/ == NIT_NULL /*null*/) || (( variable0 /*a*/ != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL( variable0 /*a*/,COLOR_kernel___Object_____eqeq))( variable0 /*a*/, NIT_NULL /*null*/) /*AbstractArray::==*/)))));
800 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'not_nil' ", LOCATE_array___ArrayIterator___init, 323); nit_exit(1);}
801 ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/ = variable0 /*a*/;
802 ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/ = TAG_Int(0);
803 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayIterator].i] = 1;
804 tracehead = trace.prev;
805 return;
806 }
807 val_t array___ArrayIterator___index(val_t self) {
808 struct trace_t trace = {NULL, LOCATE_array___ArrayIterator___index, 328};
809 trace.prev = tracehead; tracehead = &trace;
810 tracehead = trace.prev;
811 return ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/;
812 }
813 val_t array___ArraySet___has(val_t self, val_t param0) {
814 struct trace_t trace = {NULL, LOCATE_array___ArraySet___has, 340};
815 val_t variable0;
816 val_t variable1;
817 trace.prev = tracehead; tracehead = &trace;
818 variable0 = param0;
819 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
820 variable1 = ((array___AbstractArray___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*e*/) /*Array::has*/;
821 goto return_label52;
822 return_label52: while(false);
823 tracehead = trace.prev;
824 return variable1;
825 }
826 void array___ArraySet___add(val_t self, val_t param0) {
827 struct trace_t trace = {NULL, LOCATE_array___ArraySet___add, 342};
828 val_t variable0;
829 val_t variable1;
830 trace.prev = tracehead; tracehead = &trace;
831 variable0 = param0;
832 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
833 variable1 = ((array___AbstractArray___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*e*/) /*Array::has*/;
834 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { /*if*/
835 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
836 ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*e*/) /*Array::add*/;
837 }
838 tracehead = trace.prev;
839 return;
840 }
841 val_t array___ArraySet___is_empty(val_t self) {
842 struct trace_t trace = {NULL, LOCATE_array___ArraySet___is_empty, 344};
843 val_t variable0;
844 trace.prev = tracehead; tracehead = &trace;
845 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
846 variable0 = ((array___AbstractArray___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*Array::is_empty*/;
847 goto return_label54;
848 return_label54: while(false);
849 tracehead = trace.prev;
850 return variable0;
851 }
852 val_t array___ArraySet___length(val_t self) {
853 struct trace_t trace = {NULL, LOCATE_array___ArraySet___length, 346};
854 val_t variable0;
855 trace.prev = tracehead; tracehead = &trace;
856 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
857 variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Array::length*/;
858 goto return_label55;
859 return_label55: while(false);
860 tracehead = trace.prev;
861 return variable0;
862 }
863 val_t array___ArraySet___first(val_t self) {
864 struct trace_t trace = {NULL, LOCATE_array___ArraySet___first, 348};
865 val_t variable0;
866 trace.prev = tracehead; tracehead = &trace;
867 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
868 variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Array::length*/;
869 variable0 = TAG_Bool(UNTAG_Int(variable0)>UNTAG_Int( TAG_Int(0)));
870 if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_array___ArraySet___first, 350); nit_exit(1);}
871 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
872 variable0 = ((abstract_collection___IndexedCollection___first_t)CALL(variable0,COLOR_abstract_collection___Collection___first))(variable0) /*Array::first*/;
873 goto return_label56;
874 return_label56: while(false);
875 tracehead = trace.prev;
876 return variable0;
877 }
878 void array___ArraySet___remove(val_t self, val_t param0) {
879 struct trace_t trace = {NULL, LOCATE_array___ArraySet___remove, 354};
880 val_t variable0;
881 val_t variable1;
882 val_t variable2;
883 trace.prev = tracehead; tracehead = &trace;
884 variable0 = param0;
885 variable2 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
886 variable2 = ((array___AbstractArray___index_of_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___index_of))(variable2, variable0 /*item*/) /*Array::index_of*/;
887 variable1 = variable2;
888 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
889 if (UNTAG_Bool(variable2)) { /*if*/
890 ((array___ArraySet___remove_at_t)CALL( self,COLOR_array___ArraySet___remove_at))( self, variable1 /*i*/) /*ArraySet::remove_at*/;
891 }
892 tracehead = trace.prev;
893 return;
894 }
895 void array___ArraySet___remove_all(val_t self, val_t param0) {
896 struct trace_t trace = {NULL, LOCATE_array___ArraySet___remove_all, 360};
897 val_t variable0;
898 trace.prev = tracehead; tracehead = &trace;
899 variable0 = param0;
900 ((array___ArraySet___remove_t)CALL( self,COLOR_abstract_collection___RemovableCollection___remove))( self, variable0 /*item*/) /*ArraySet::remove*/;
901 tracehead = trace.prev;
902 return;
903 }
904 void array___ArraySet___clear(val_t self) {
905 struct trace_t trace = {NULL, LOCATE_array___ArraySet___clear, 362};
906 val_t variable0;
907 trace.prev = tracehead; tracehead = &trace;
908 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
909 ((array___AbstractArray___clear_t)CALL(variable0,COLOR_abstract_collection___RemovableCollection___clear))(variable0) /*Array::clear*/;
910 tracehead = trace.prev;
911 return;
912 }
913 val_t array___ArraySet___iterator(val_t self) {
914 struct trace_t trace = {NULL, LOCATE_array___ArraySet___iterator, 364};
915 val_t variable0;
916 val_t variable1;
917 trace.prev = tracehead; tracehead = &trace;
918 variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
919 variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Array::iterator*/;
920 variable1 = NEW_array___ArraySetIterator___init(variable0); /*new ArraySetIterator[E]*/
921 variable0 = variable1;
922 goto return_label60;
923 return_label60: while(false);
924 tracehead = trace.prev;
925 return variable0;
926 }
927 void array___ArraySet___enlarge(val_t self, val_t param0) {
928 struct trace_t trace = {NULL, LOCATE_array___ArraySet___enlarge, 366};
929 val_t variable0;
930 val_t variable1;
931 trace.prev = tracehead; tracehead = &trace;
932 variable0 = param0;
933 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
934 ((array___Array___enlarge_t)CALL(variable1,COLOR_array___AbstractArray___enlarge))(variable1, variable0 /*cap*/) /*Array::enlarge*/;
935 tracehead = trace.prev;
936 return;
937 }
938 void array___ArraySet___remove_at(val_t self, val_t param0) {
939 struct trace_t trace = {NULL, LOCATE_array___ArraySet___remove_at, 369};
940 val_t variable0;
941 val_t variable1;
942 val_t variable2;
943 trace.prev = tracehead; tracehead = &trace;
944 variable0 = param0;
945 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
946 variable2 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
947 variable2 = ((abstract_collection___IndexedCollection___last_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___last))(variable2) /*Array::last*/;
948 ((array___Array_____braeq_t)CALL(variable1,COLOR_abstract_collection___Map_____braeq))(variable1, variable0 /*i*/, variable2) /*Array::[]=*/;
949 variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/;
950 ((array___AbstractArray___pop_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___pop))(variable1) /*Array::pop*/;
951 tracehead = trace.prev;
952 return;
953 }
954 void array___ArraySet___init(val_t self, int* init_table) {
955 struct trace_t trace = {NULL, LOCATE_array___ArraySet___init, 375};
956 val_t variable0;
957 trace.prev = tracehead; tracehead = &trace;
958 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return;
959 variable0 = NEW_array___Array___init(); /*new Array[E]*/
960 ATTR_array___ArraySet____array( self) /*ArraySet::_array*/ = variable0;
961 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i] = 1;
962 tracehead = trace.prev;
963 return;
964 }
965 void array___ArraySet___with_capacity(val_t self, val_t param0, int* init_table) {
966 struct trace_t trace = {NULL, LOCATE_array___ArraySet___with_capacity, 378};
967 val_t variable0;
968 val_t variable1;
969 trace.prev = tracehead; tracehead = &trace;
970 variable0 = param0;
971 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return;
972 variable1 = NEW_array___Array___with_capacity( variable0 /*i*/); /*new Array[E]*/
973 ATTR_array___ArraySet____array( self) /*ArraySet::_array*/ = variable1;
974 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i] = 1;
975 tracehead = trace.prev;
976 return;
977 }
978 val_t array___ArraySetIterator___is_ok(val_t self) {
979 struct trace_t trace = {NULL, LOCATE_array___ArraySetIterator___is_ok, 386};
980 val_t variable0;
981 trace.prev = tracehead; tracehead = &trace;
982 variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/;
983 variable0 = ((array___ArrayIterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*ArrayIterator::is_ok*/;
984 goto return_label65;
985 return_label65: while(false);
986 tracehead = trace.prev;
987 return variable0;
988 }
989 void array___ArraySetIterator___next(val_t self) {
990 struct trace_t trace = {NULL, LOCATE_array___ArraySetIterator___next, 388};
991 val_t variable0;
992 trace.prev = tracehead; tracehead = &trace;
993 variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/;
994 ((array___ArrayIterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*ArrayIterator::next*/;
995 tracehead = trace.prev;
996 return;
997 }
998 val_t array___ArraySetIterator___item(val_t self) {
999 struct trace_t trace = {NULL, LOCATE_array___ArraySetIterator___item, 390};
1000 val_t variable0;
1001 trace.prev = tracehead; tracehead = &trace;
1002 variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/;
1003 variable0 = ((array___ArrayIterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*ArrayIterator::item*/;
1004 goto return_label67;
1005 return_label67: while(false);
1006 tracehead = trace.prev;
1007 return variable0;
1008 }
1009 void array___ArraySetIterator___init(val_t self, val_t param0, int* init_table) {
1010 struct trace_t trace = {NULL, LOCATE_array___ArraySetIterator___init, 392};
1011 val_t variable0;
1012 trace.prev = tracehead; tracehead = &trace;
1013 variable0 = param0;
1014 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySetIterator].i]) return;
1015 ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/ = variable0 /*iter*/;
1016 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySetIterator].i] = 1;
1017 tracehead = trace.prev;
1018 return;
1019 }
1020 val_t array___ArrayMap_____bra(val_t self, val_t param0) {
1021 struct trace_t trace = {NULL, LOCATE_array___ArrayMap_____bra, 402};
1022 val_t variable0;
1023 val_t variable1;
1024 val_t variable2;
1025 val_t variable3;
1026 val_t variable4;
1027 val_t variable5;
1028 trace.prev = tracehead; tracehead = &trace;
1029 variable0 = param0;
1030 variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/;
1031 variable1 = variable2;
1032 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1033 if (UNTAG_Bool(variable2)) { /*if*/
1034 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1035 variable3 = variable1 /*i*/;
1036 variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1037 variable5 = variable4;
1038 if (UNTAG_Bool(variable5)) { /* and */
1039 variable5 = variable2;
1040 variable5 = ATTR_array___AbstractArray____length(variable5) /*Array::_length*/;
1041 variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)<UNTAG_Int(variable5));
1042 }
1043 variable4 = variable5;
1044 if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1045 variable4 = variable2;
1046 variable4 = ATTR_array___Array____items(variable4) /*Array::_items*/;
1047 variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)];
1048 goto return_label70;
1049 return_label70: while(false);
1050 variable2 = variable4;
1051 variable2 = ((abstract_collection___Couple___second_t)CALL(variable2,COLOR_abstract_collection___Couple___second))(variable2) /*Couple::second*/;
1052 variable1 = variable2;
1053 goto return_label69;
1054 } else { /*if*/
1055 variable1 = NIT_NULL /*null*/;
1056 goto return_label69;
1057 }
1058 return_label69: while(false);
1059 tracehead = trace.prev;
1060 return variable1;
1061 }
1062 void array___ArrayMap_____braeq(val_t self, val_t param0, val_t param1) {
1063 struct trace_t trace = {NULL, LOCATE_array___ArrayMap_____braeq, 413};
1064 val_t variable0;
1065 val_t variable1;
1066 val_t variable2;
1067 val_t variable3;
1068 val_t variable4;
1069 val_t variable5;
1070 val_t variable6;
1071 trace.prev = tracehead; tracehead = &trace;
1072 variable0 = param0;
1073 variable1 = param1;
1074 variable3 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/;
1075 variable2 = variable3;
1076 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1077 if (UNTAG_Bool(variable3)) { /*if*/
1078 variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1079 variable4 = variable2 /*i*/;
1080 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1081 variable6 = variable5;
1082 if (UNTAG_Bool(variable6)) { /* and */
1083 variable6 = variable3;
1084 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
1085 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
1086 }
1087 variable5 = variable6;
1088 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1089 variable5 = variable3;
1090 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
1091 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
1092 goto return_label72;
1093 return_label72: while(false);
1094 variable3 = variable5;
1095 ((abstract_collection___Couple___second__eq_t)CALL(variable3,COLOR_abstract_collection___Couple___second__eq))(variable3, variable1 /*item*/) /*Couple::second=*/;
1096 } else { /*if*/
1097 variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1098 variable4 = NEW_abstract_collection___Couple___init( variable0 /*key*/, variable1 /*item*/); /*new Couple[K, E]*/
1099 ((array___AbstractArray___push_t)CALL(variable3,COLOR_abstract_collection___IndexedCollection___push))(variable3, variable4) /*Array::push*/;
1100 }
1101 tracehead = trace.prev;
1102 return;
1103 }
1104 val_t array___ArrayMap___has_key(val_t self, val_t param0) {
1105 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___has_key, 424};
1106 val_t variable0;
1107 val_t variable1;
1108 trace.prev = tracehead; tracehead = &trace;
1109 variable0 = param0;
1110 variable1 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/;
1111 variable1 = TAG_Bool(UNTAG_Int(variable1)>=UNTAG_Int( TAG_Int(0)));
1112 goto return_label73;
1113 return_label73: while(false);
1114 tracehead = trace.prev;
1115 return variable1;
1116 }
1117 val_t array___ArrayMap___has(val_t self, val_t param0) {
1118 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___has, 427};
1119 val_t variable0;
1120 val_t variable1;
1121 val_t variable2;
1122 val_t variable3;
1123 trace.prev = tracehead; tracehead = &trace;
1124 variable0 = param0;
1125 variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1126 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
1127 while (true) { /*for*/
1128 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
1129 if (!UNTAG_Bool(variable2)) break; /*for*/
1130 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
1131 variable3 = ((abstract_collection___Couple___second_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Couple___second))( variable2 /*i*/) /*Couple::second*/;
1132 variable3 = TAG_Bool((variable3 == variable0 /*item*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*item*/) /*Object::==*/)))));
1133 if (UNTAG_Bool(variable3)) { /*if*/
1134 variable1 = TAG_Bool(true);
1135 goto return_label74;
1136 }
1137 continue_75: while(0);
1138 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
1139 }
1140 break_75: while(0);
1141 variable1 = TAG_Bool(false);
1142 goto return_label74;
1143 return_label74: while(false);
1144 tracehead = trace.prev;
1145 return variable1;
1146 }
1147 val_t array___ArrayMap___has_only(val_t self, val_t param0) {
1148 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___has_only, 434};
1149 val_t variable0;
1150 val_t variable1;
1151 val_t variable2;
1152 val_t variable3;
1153 trace.prev = tracehead; tracehead = &trace;
1154 variable0 = param0;
1155 variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1156 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
1157 while (true) { /*for*/
1158 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
1159 if (!UNTAG_Bool(variable2)) break; /*for*/
1160 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
1161 variable3 = ((abstract_collection___Couple___second_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Couple___second))( variable2 /*i*/) /*Couple::second*/;
1162 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == variable0 /*item*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*item*/) /*Object::==*/)))))));
1163 if (UNTAG_Bool(variable3)) { /*if*/
1164 variable1 = TAG_Bool(false);
1165 goto return_label76;
1166 }
1167 continue_77: while(0);
1168 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
1169 }
1170 break_77: while(0);
1171 variable1 = TAG_Bool(true);
1172 goto return_label76;
1173 return_label76: while(false);
1174 tracehead = trace.prev;
1175 return variable1;
1176 }
1177 val_t array___ArrayMap___length(val_t self) {
1178 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___length, 441};
1179 val_t variable0;
1180 trace.prev = tracehead; tracehead = &trace;
1181 variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1182 variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Array::length*/;
1183 goto return_label78;
1184 return_label78: while(false);
1185 tracehead = trace.prev;
1186 return variable0;
1187 }
1188 val_t array___ArrayMap___first(val_t self) {
1189 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___first, 444};
1190 val_t variable0;
1191 trace.prev = tracehead; tracehead = &trace;
1192 variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1193 variable0 = ((abstract_collection___IndexedCollection___first_t)CALL(variable0,COLOR_abstract_collection___Collection___first))(variable0) /*Array::first*/;
1194 variable0 = ((abstract_collection___Couple___first_t)CALL(variable0,COLOR_abstract_collection___Couple___first))(variable0) /*Couple::first*/;
1195 goto return_label79;
1196 return_label79: while(false);
1197 tracehead = trace.prev;
1198 return variable0;
1199 }
1200 val_t array___ArrayMap___count(val_t self, val_t param0) {
1201 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___count, 446};
1202 val_t variable0;
1203 val_t variable1;
1204 val_t variable2;
1205 val_t variable3;
1206 val_t variable4;
1207 trace.prev = tracehead; tracehead = &trace;
1208 variable0 = param0;
1209 variable1 = TAG_Int(0);
1210 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1211 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*Array::iterator*/;
1212 while (true) { /*for*/
1213 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
1214 if (!UNTAG_Bool(variable3)) break; /*for*/
1215 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
1216 variable4 = ((abstract_collection___Couple___second_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Couple___second))( variable3 /*i*/) /*Couple::second*/;
1217 variable4 = TAG_Bool((variable4 == variable0 /*item*/) || ((variable4 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable4, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable4,COLOR_kernel___Object_____eqeq))(variable4, variable0 /*item*/) /*Object::==*/)))));
1218 if (UNTAG_Bool(variable4)) { /*if*/
1219 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*nb*/;
1220 }
1221 continue_81: while(0);
1222 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
1223 }
1224 break_81: while(0);
1225 variable1 = variable1 /*nb*/;
1226 goto return_label80;
1227 return_label80: while(false);
1228 tracehead = trace.prev;
1229 return variable1;
1230 }
1231 val_t array___ArrayMap___iterator(val_t self) {
1232 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___iterator, 454};
1233 val_t variable0;
1234 val_t variable1;
1235 trace.prev = tracehead; tracehead = &trace;
1236 variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1237 variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Array::iterator*/;
1238 variable1 = NEW_abstract_collection___CoupleMapIterator___init(variable0); /*new CoupleMapIterator[K, E]*/
1239 variable0 = variable1;
1240 goto return_label82;
1241 return_label82: while(false);
1242 tracehead = trace.prev;
1243 return variable0;
1244 }
1245 val_t array___ArrayMap___is_empty(val_t self) {
1246 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___is_empty, 456};
1247 val_t variable0;
1248 trace.prev = tracehead; tracehead = &trace;
1249 variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1250 variable0 = ((array___AbstractArray___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*Array::is_empty*/;
1251 goto return_label83;
1252 return_label83: while(false);
1253 tracehead = trace.prev;
1254 return variable0;
1255 }
1256 void array___ArrayMap___remove(val_t self, val_t param0) {
1257 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___remove, 458};
1258 val_t variable0;
1259 val_t variable1;
1260 val_t variable2;
1261 val_t variable3;
1262 val_t variable4;
1263 val_t variable5;
1264 trace.prev = tracehead; tracehead = &trace;
1265 variable0 = param0;
1266 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1267 variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*Array::length*/;
1268 variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1)));
1269 variable1 = variable2;
1270 while (true) { /*while*/
1271 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1272 if (!UNTAG_Bool(variable2)) break; /* while*/
1273 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1274 variable3 = variable1 /*i*/;
1275 variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1276 variable5 = variable4;
1277 if (UNTAG_Bool(variable5)) { /* and */
1278 variable5 = variable2;
1279 variable5 = ATTR_array___AbstractArray____length(variable5) /*Array::_length*/;
1280 variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)<UNTAG_Int(variable5));
1281 }
1282 variable4 = variable5;
1283 if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1284 variable4 = variable2;
1285 variable4 = ATTR_array___Array____items(variable4) /*Array::_items*/;
1286 variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)];
1287 goto return_label86;
1288 return_label86: while(false);
1289 variable2 = variable4;
1290 variable2 = ((abstract_collection___Couple___second_t)CALL(variable2,COLOR_abstract_collection___Couple___second))(variable2) /*Couple::second*/;
1291 variable2 = TAG_Bool((variable2 == variable0 /*item*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*item*/) /*Object::==*/)))));
1292 if (UNTAG_Bool(variable2)) { /*if*/
1293 ((array___ArrayMap___remove_at_index_t)CALL( self,COLOR_array___ArrayMap___remove_at_index))( self, variable1 /*i*/) /*ArrayMap::remove_at_index*/;
1294 goto return_label84;
1295 }
1296 variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/;
1297 continue_85: while(0);
1298 }
1299 break_85: while(0);
1300 return_label84: while(false);
1301 tracehead = trace.prev;
1302 return;
1303 }
1304 void array___ArrayMap___remove_all(val_t self, val_t param0) {
1305 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___remove_all, 470};
1306 val_t variable0;
1307 val_t variable1;
1308 val_t variable2;
1309 val_t variable3;
1310 val_t variable4;
1311 val_t variable5;
1312 trace.prev = tracehead; tracehead = &trace;
1313 variable0 = param0;
1314 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1315 variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*Array::length*/;
1316 variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1)));
1317 variable1 = variable2;
1318 while (true) { /*while*/
1319 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1320 if (!UNTAG_Bool(variable2)) break; /* while*/
1321 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1322 variable3 = variable1 /*i*/;
1323 variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1324 variable5 = variable4;
1325 if (UNTAG_Bool(variable5)) { /* and */
1326 variable5 = variable2;
1327 variable5 = ATTR_array___AbstractArray____length(variable5) /*Array::_length*/;
1328 variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)<UNTAG_Int(variable5));
1329 }
1330 variable4 = variable5;
1331 if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1332 variable4 = variable2;
1333 variable4 = ATTR_array___Array____items(variable4) /*Array::_items*/;
1334 variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)];
1335 goto return_label89;
1336 return_label89: while(false);
1337 variable2 = variable4;
1338 variable2 = ((abstract_collection___Couple___second_t)CALL(variable2,COLOR_abstract_collection___Couple___second))(variable2) /*Couple::second*/;
1339 variable2 = TAG_Bool((variable2 == variable0 /*item*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*item*/) /*Object::==*/)))));
1340 if (UNTAG_Bool(variable2)) { /*if*/
1341 ((array___ArrayMap___remove_at_index_t)CALL( self,COLOR_array___ArrayMap___remove_at_index))( self, variable1 /*i*/) /*ArrayMap::remove_at_index*/;
1342 }
1343 variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/;
1344 continue_88: while(0);
1345 }
1346 break_88: while(0);
1347 tracehead = trace.prev;
1348 return;
1349 }
1350 void array___ArrayMap___remove_at(val_t self, val_t param0) {
1351 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___remove_at, 481};
1352 val_t variable0;
1353 val_t variable1;
1354 val_t variable2;
1355 trace.prev = tracehead; tracehead = &trace;
1356 variable0 = param0;
1357 variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/;
1358 variable1 = variable2;
1359 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1360 if (UNTAG_Bool(variable2)) { /*if*/
1361 ((array___ArrayMap___remove_at_index_t)CALL( self,COLOR_array___ArrayMap___remove_at_index))( self, variable1 /*i*/) /*ArrayMap::remove_at_index*/;
1362 }
1363 tracehead = trace.prev;
1364 return;
1365 }
1366 void array___ArrayMap___clear(val_t self) {
1367 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___clear, 487};
1368 val_t variable0;
1369 trace.prev = tracehead; tracehead = &trace;
1370 variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1371 ((array___AbstractArray___clear_t)CALL(variable0,COLOR_abstract_collection___RemovableCollection___clear))(variable0) /*Array::clear*/;
1372 tracehead = trace.prev;
1373 return;
1374 }
1375 void array___ArrayMap___enlarge(val_t self, val_t param0) {
1376 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___enlarge, 489};
1377 val_t variable0;
1378 val_t variable1;
1379 trace.prev = tracehead; tracehead = &trace;
1380 variable0 = param0;
1381 variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1382 ((array___Array___enlarge_t)CALL(variable1,COLOR_array___AbstractArray___enlarge))(variable1, variable0 /*cap*/) /*Array::enlarge*/;
1383 tracehead = trace.prev;
1384 return;
1385 }
1386 val_t array___ArrayMap___couple_at(val_t self, val_t param0) {
1387 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___couple_at, 492};
1388 val_t variable0;
1389 val_t variable1;
1390 val_t variable2;
1391 val_t variable3;
1392 val_t variable4;
1393 val_t variable5;
1394 trace.prev = tracehead; tracehead = &trace;
1395 variable0 = param0;
1396 variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/;
1397 variable1 = variable2;
1398 variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0)));
1399 if (UNTAG_Bool(variable2)) { /*if*/
1400 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1401 variable3 = variable1 /*i*/;
1402 variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1403 variable5 = variable4;
1404 if (UNTAG_Bool(variable5)) { /* and */
1405 variable5 = variable2;
1406 variable5 = ATTR_array___AbstractArray____length(variable5) /*Array::_length*/;
1407 variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)<UNTAG_Int(variable5));
1408 }
1409 variable4 = variable5;
1410 if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1411 variable4 = variable2;
1412 variable4 = ATTR_array___Array____items(variable4) /*Array::_items*/;
1413 variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)];
1414 goto return_label94;
1415 return_label94: while(false);
1416 variable2 = variable4;
1417 variable1 = variable2;
1418 goto return_label93;
1419 } else { /*if*/
1420 variable1 = NIT_NULL /*null*/;
1421 goto return_label93;
1422 }
1423 return_label93: while(false);
1424 tracehead = trace.prev;
1425 return variable1;
1426 }
1427 void array___ArrayMap___remove_at_index(val_t self, val_t param0) {
1428 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___remove_at_index, 505};
1429 val_t variable0;
1430 val_t variable1;
1431 val_t variable2;
1432 trace.prev = tracehead; tracehead = &trace;
1433 variable0 = param0;
1434 variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1435 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1436 variable2 = ((abstract_collection___IndexedCollection___last_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___last))(variable2) /*Array::last*/;
1437 ((array___Array_____braeq_t)CALL(variable1,COLOR_abstract_collection___Map_____braeq))(variable1, variable0 /*i*/, variable2) /*Array::[]=*/;
1438 variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1439 ((array___AbstractArray___pop_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___pop))(variable1) /*Array::pop*/;
1440 tracehead = trace.prev;
1441 return;
1442 }
1443 val_t array___ArrayMap___index(val_t self, val_t param0) {
1444 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___index, 515};
1445 val_t variable0;
1446 val_t variable1;
1447 val_t variable2;
1448 val_t variable3;
1449 val_t variable4;
1450 val_t variable5;
1451 val_t variable6;
1452 trace.prev = tracehead; tracehead = &trace;
1453 variable0 = param0;
1454 variable2 = ATTR_array___ArrayMap____last_index( self) /*ArrayMap::_last_index*/;
1455 variable1 = variable2;
1456 variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1457 variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*Array::length*/;
1458 variable2 = TAG_Bool(UNTAG_Int( variable1 /*l*/)<UNTAG_Int(variable2));
1459 variable3 = variable2;
1460 if (UNTAG_Bool(variable3)) { /* and */
1461 variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1462 variable4 = variable1 /*l*/;
1463 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1464 variable6 = variable5;
1465 if (UNTAG_Bool(variable6)) { /* and */
1466 variable6 = variable3;
1467 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
1468 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
1469 }
1470 variable5 = variable6;
1471 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1472 variable5 = variable3;
1473 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
1474 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
1475 goto return_label97;
1476 return_label97: while(false);
1477 variable3 = variable5;
1478 variable3 = ((abstract_collection___Couple___first_t)CALL(variable3,COLOR_abstract_collection___Couple___first))(variable3) /*Couple::first*/;
1479 variable3 = TAG_Bool((variable3 == variable0 /*key*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*key*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*key*/) /*Object::==*/)))));
1480 }
1481 variable2 = variable3;
1482 if (UNTAG_Bool(variable2)) { /*if*/
1483 variable1 = variable1 /*l*/;
1484 goto return_label96;
1485 }
1486 variable2 = TAG_Int(0);
1487 while (true) { /*while*/
1488 variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1489 variable3 = ((array___AbstractArray___length_t)CALL(variable3,COLOR_abstract_collection___Collection___length))(variable3) /*Array::length*/;
1490 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int(variable3));
1491 if (!UNTAG_Bool(variable3)) break; /* while*/
1492 variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/;
1493 variable4 = variable2 /*i*/;
1494 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
1495 variable6 = variable5;
1496 if (UNTAG_Bool(variable6)) { /* and */
1497 variable6 = variable3;
1498 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
1499 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
1500 }
1501 variable5 = variable6;
1502 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
1503 variable5 = variable3;
1504 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
1505 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
1506 goto return_label99;
1507 return_label99: while(false);
1508 variable3 = variable5;
1509 variable3 = ((abstract_collection___Couple___first_t)CALL(variable3,COLOR_abstract_collection___Couple___first))(variable3) /*Couple::first*/;
1510 variable3 = TAG_Bool((variable3 == variable0 /*key*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, variable0 /*key*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable0 /*key*/) /*Object::==*/)))));
1511 if (UNTAG_Bool(variable3)) { /*if*/
1512 ATTR_array___ArrayMap____last_index( self) /*ArrayMap::_last_index*/ = variable2 /*i*/;
1513 variable1 = variable2 /*i*/;
1514 goto return_label96;
1515 }
1516 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
1517 continue_98: while(0);
1518 }
1519 break_98: while(0);
1520 variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
1521 variable1 = variable3;
1522 goto return_label96;
1523 return_label96: while(false);
1524 tracehead = trace.prev;
1525 return variable1;
1526 }
1527 void array___ArrayMap___init(val_t self, int* init_table) {
1528 struct trace_t trace = {NULL, LOCATE_array___ArrayMap___init, 533};
1529 val_t variable0;
1530 trace.prev = tracehead; tracehead = &trace;
1531 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayMap].i]) return;
1532 variable0 = NEW_array___Array___init(); /*new Array[Couple[K, E]]*/
1533 ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/ = variable0;
1534 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayMap].i] = 1;
1535 tracehead = trace.prev;
1536 return;
1537 }
1538 val_t array___Iterator___to_a(val_t self) {
1539 struct trace_t trace = {NULL, LOCATE_array___Iterator___to_a, 543};
1540 val_t variable0;
1541 val_t variable1;
1542 trace.prev = tracehead; tracehead = &trace;
1543 variable1 = NEW_array___Array___init(); /*new Array[E]*/
1544 variable0 = variable1;
1545 while (true) { /*while*/
1546 variable1 = ((abstract_collection___Iterator___is_ok_t)CALL( self,COLOR_abstract_collection___Iterator___is_ok))( self) /*Iterator::is_ok*/;
1547 if (!UNTAG_Bool(variable1)) break; /* while*/
1548 variable1 = ((abstract_collection___Iterator___item_t)CALL( self,COLOR_abstract_collection___Iterator___item))( self) /*Iterator::item*/;
1549 ((array___AbstractArray___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable1) /*Array::add*/;
1550 ((abstract_collection___Iterator___next_t)CALL( self,COLOR_abstract_collection___Iterator___next))( self) /*Iterator::next*/;
1551 continue_102: while(0);
1552 }
1553 break_102: while(0);
1554 variable0 = variable0 /*res*/;
1555 goto return_label101;
1556 return_label101: while(false);
1557 tracehead = trace.prev;
1558 return variable0;
1559 }
1560 val_t array___Collection___to_a(val_t self) {
1561 struct trace_t trace = {NULL, LOCATE_array___Collection___to_a, 556};
1562 val_t variable0;
1563 trace.prev = tracehead; tracehead = &trace;
1564 variable0 = ((abstract_collection___Collection___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*Collection::iterator*/;
1565 variable0 = ((array___Iterator___to_a_t)CALL(variable0,COLOR_array___Iterator___to_a))(variable0) /*Iterator::to_a*/;
1566 goto return_label103;
1567 return_label103: while(false);
1568 tracehead = trace.prev;
1569 return variable0;
1570 }
1571 val_t array___ArrayCapable___calloc_array(val_t self, val_t param0) {
1572 struct trace_t trace = {NULL, LOCATE_array___ArrayCapable___calloc_array, 567};
1573 trace.prev = tracehead; tracehead = &trace;
1574 tracehead = trace.prev;
1575 return BOX_NativeArray((val_t*)malloc((UNTAG_Int( param0) * sizeof(val_t))));
1576 }
1577 val_t array___NativeArray_____bra(val_t self, val_t param0) {
1578 struct trace_t trace = {NULL, LOCATE_array___NativeArray_____bra, 573};
1579 trace.prev = tracehead; tracehead = &trace;
1580 tracehead = trace.prev;
1581 return UNBOX_NativeArray( self)[UNTAG_Int( param0)];
1582 }
1583 void array___NativeArray_____braeq(val_t self, val_t param0, val_t param1) {
1584 struct trace_t trace = {NULL, LOCATE_array___NativeArray_____braeq, 574};
1585 trace.prev = tracehead; tracehead = &trace;
1586 UNBOX_NativeArray( self)[UNTAG_Int( param0)]= param1;
1587 tracehead = trace.prev;
1588 return;
1589 }
1590 void array___NativeArray___copy_to(val_t self, val_t param0, val_t param1) {
1591 struct trace_t trace = {NULL, LOCATE_array___NativeArray___copy_to, 575};
1592 trace.prev = tracehead; tracehead = &trace;
1593 (void)memcpy(UNBOX_NativeArray( param0), UNBOX_NativeArray( self), UNTAG_Int( param1)*sizeof(val_t));
1594 tracehead = trace.prev;
1595 return;
1596 }