README: document nit_env.sh
[nit.git] / c_src / standard__hash_collection.sep.1.c
1 #include "standard__hash_collection.sep.0.h"
2 /* method hash_collection#HashCollection#index_at for (self: HashCollection[nullable Object], nullable Object): Int */
3 long standard__hash_collection___standard__hash_collection__HashCollection___index_at(val* self, val* p0) {
4 long var /* : Int */;
5 val* var_k /* var k: nullable Object */;
6 short int var1 /* : Bool */;
7 short int var2 /* : Bool */;
8 long var3 /* : Int */;
9 long var4 /* : Int */;
10 long var5 /* : Int */;
11 long var7 /* : Int */;
12 long var_i /* var i: Int */;
13 short int var8 /* : Bool */;
14 short int var10 /* : Bool */;
15 int cltype;
16 int idtype;
17 const char* var_class_name;
18 short int var11 /* : Bool */;
19 long var12 /* : Int */;
20 long var14 /* : Int */;
21 var_k = p0;
22 if (var_k == NULL) {
23 var1 = 1; /* is null */
24 } else {
25 var1 = 0; /* arg is null but recv is not */
26 }
27 if (0) {
28 var2 = ((short int(*)(val* self, val* p0))((((long)var_k&3)?class_info[((long)var_k&3)]:var_k->class)->vft[COLOR_standard__kernel__Object___61d_61d]))(var_k, ((val*)NULL)); /* == on <var_k:nullable Object>*/
29 var1 = var2;
30 }
31 if (var1){
32 var = 0l;
33 goto RET_LABEL;
34 } else {
35 }
36 {
37 var3 = ((long(*)(val* self))((((long)var_k&3)?class_info[((long)var_k&3)]:var_k->class)->vft[COLOR_standard__kernel__Object__hash]))(var_k); /* hash on <var_k:nullable Object(Object)>*/
38 }
39 var4 = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
40 {
41 { /* Inline kernel#Int#% (var3,var4) on <var3:Int> */
42 var7 = var3 % var4;
43 var5 = var7;
44 goto RET_LABEL6;
45 RET_LABEL6:(void)0;
46 }
47 }
48 var_i = var5;
49 {
50 { /* Inline kernel#Int#< (var_i,0l) on <var_i:Int> */
51 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
52 /* <0l:Int> isa OTHER */
53 var10 = 1; /* easy <0l:Int> isa OTHER*/
54 if (unlikely(!var10)) {
55 var_class_name = type_standard__Int.name;
56 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
57 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 534);
58 fatal_exit(1);
59 }
60 var11 = var_i < 0l;
61 var8 = var11;
62 goto RET_LABEL9;
63 RET_LABEL9:(void)0;
64 }
65 }
66 if (var8){
67 {
68 { /* Inline kernel#Int#unary - (var_i) on <var_i:Int> */
69 var14 = -var_i;
70 var12 = var14;
71 goto RET_LABEL13;
72 RET_LABEL13:(void)0;
73 }
74 }
75 var_i = var12;
76 } else {
77 }
78 var = var_i;
79 goto RET_LABEL;
80 RET_LABEL:;
81 return var;
82 }
83 /* method hash_collection#HashCollection#node_at for (self: HashCollection[nullable Object], nullable Object): nullable HashNode[nullable Object] */
84 val* standard__hash_collection___standard__hash_collection__HashCollection___node_at(val* self, val* p0) {
85 val* var /* : nullable HashNode[nullable Object] */;
86 val* var_k /* var k: nullable Object */;
87 val* var1 /* : nullable Object */;
88 short int var2 /* : Bool */;
89 short int var3 /* : Bool */;
90 short int var5 /* : Bool */;
91 val* var6 /* : nullable HashNode[nullable Object] */;
92 long var7 /* : Int */;
93 val* var8 /* : nullable HashNode[nullable Object] */;
94 val* var_res /* var res: nullable HashNode[nullable Object] */;
95 var_k = p0;
96 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
97 if (var_k == NULL) {
98 var2 = (var1 == NULL);
99 } else {
100 { /* Inline kernel#Object#is_same_instance (var_k,var1) on <var_k:nullable Object> */
101 var5 = var_k == var1 || (var_k != NULL && var1 != NULL && (!((long)var_k&3)) && (!((long)var1&3)) && var_k->class == var1->class && ((var_k->class->box_kind == 3 && ((struct instance_standard__Byte*)var_k)->value == ((struct instance_standard__Byte*)var1)->value) || (var_k->class->box_kind == 5 && ((struct instance_standard__Float*)var_k)->value == ((struct instance_standard__Float*)var1)->value) || (var_k->class->box_kind == 6 && ((struct instance_standard__NativeString*)var_k)->value == ((struct instance_standard__NativeString*)var1)->value) || (var_k->class->box_kind == 7 && ((struct instance_standard__Pointer*)var_k)->value == ((struct instance_standard__Pointer*)var1)->value)));
102 var3 = var5;
103 goto RET_LABEL4;
104 RET_LABEL4:(void)0;
105 }
106 var2 = var3;
107 }
108 if (var2){
109 var6 = self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_node].val; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
110 var = var6;
111 goto RET_LABEL;
112 } else {
113 }
114 {
115 var7 = standard__hash_collection___standard__hash_collection__HashCollection___index_at(self, var_k);
116 }
117 {
118 var8 = standard__hash_collection___standard__hash_collection__HashCollection___node_at_idx(self, var7, var_k);
119 }
120 var_res = var8;
121 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val = var_k; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
122 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_node].val = var_res; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
123 var = var_res;
124 goto RET_LABEL;
125 RET_LABEL:;
126 return var;
127 }
128 /* method hash_collection#HashCollection#node_at_idx for (self: HashCollection[nullable Object], Int, nullable Object): nullable HashNode[nullable Object] */
129 val* standard__hash_collection___standard__hash_collection__HashCollection___node_at_idx(val* self, long p0, val* p1) {
130 val* var /* : nullable HashNode[nullable Object] */;
131 long var_i /* var i: Int */;
132 val* var_k /* var k: nullable Object */;
133 val* var1 /* : nullable NativeArray[nullable HashNode[nullable Object]] */;
134 val* var2 /* : nullable Object */;
135 val* var4 /* : Object */;
136 val* var_c /* var c: nullable HashNode[nullable Object] */;
137 short int var5 /* : Bool */;
138 short int var6 /* : Bool */;
139 val* var_other /* var other: nullable Object */;
140 short int var8 /* : Bool */;
141 short int var9 /* : Bool */;
142 val* var10 /* : nullable Object */;
143 val* var_ck /* var ck: nullable Object */;
144 short int var11 /* : Bool */;
145 short int var12 /* : Bool */;
146 short int var13 /* : Bool */;
147 short int var15 /* : Bool */;
148 short int var_ /* var : Bool */;
149 short int var16 /* : Bool */;
150 short int var17 /* : Bool */;
151 val* var18 /* : nullable HashNode[nullable Object] */;
152 short int var19 /* : Bool */;
153 int cltype;
154 int idtype;
155 const struct type* type_struct;
156 const char* var_class_name;
157 var_i = p0;
158 var_k = p1;
159 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
160 if (var1 == NULL) {
161 PRINT_ERROR("Runtime error: %s", "Receiver is null");
162 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 65);
163 fatal_exit(1);
164 } else {
165 { /* Inline array#NativeArray#[] (var1,var_i) on <var1:nullable NativeArray[nullable HashNode[nullable Object]]> */
166 var4 = ((struct instance_standard__NativeArray*)var1)->values[var_i];
167 var2 = var4;
168 goto RET_LABEL3;
169 RET_LABEL3:(void)0;
170 }
171 }
172 var_c = var2;
173 for(;;) {
174 if (var_c == NULL) {
175 var5 = 0; /* is null */
176 } else {
177 var5 = 1; /* arg is null and recv is not */
178 }
179 if (0) {
180 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashNode[nullable Object]> */
181 var_other = ((val*)NULL);
182 {
183 var8 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
184 }
185 var9 = !var8;
186 var6 = var9;
187 goto RET_LABEL7;
188 RET_LABEL7:(void)0;
189 }
190 var5 = var6;
191 }
192 if (var5){
193 var10 = var_c->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
194 var_ck = var10;
195 if (var_ck == NULL) {
196 var12 = (var_k == NULL);
197 } else {
198 { /* Inline kernel#Object#is_same_instance (var_ck,var_k) on <var_ck:nullable Object> */
199 var15 = var_ck == var_k || (var_ck != NULL && var_k != NULL && (!((long)var_ck&3)) && (!((long)var_k&3)) && var_ck->class == var_k->class && ((var_ck->class->box_kind == 3 && ((struct instance_standard__Byte*)var_ck)->value == ((struct instance_standard__Byte*)var_k)->value) || (var_ck->class->box_kind == 5 && ((struct instance_standard__Float*)var_ck)->value == ((struct instance_standard__Float*)var_k)->value) || (var_ck->class->box_kind == 6 && ((struct instance_standard__NativeString*)var_ck)->value == ((struct instance_standard__NativeString*)var_k)->value) || (var_ck->class->box_kind == 7 && ((struct instance_standard__Pointer*)var_ck)->value == ((struct instance_standard__Pointer*)var_k)->value)));
200 var13 = var15;
201 goto RET_LABEL14;
202 RET_LABEL14:(void)0;
203 }
204 var12 = var13;
205 }
206 var_ = var12;
207 if (var12){
208 var11 = var_;
209 } else {
210 if (var_ck == NULL) {
211 var16 = (var_k == NULL);
212 } else {
213 var17 = ((short int(*)(val* self, val* p0))((((long)var_ck&3)?class_info[((long)var_ck&3)]:var_ck->class)->vft[COLOR_standard__kernel__Object___61d_61d]))(var_ck, var_k); /* == on <var_ck:nullable Object>*/
214 var16 = var17;
215 }
216 var11 = var16;
217 }
218 if (var11){
219 goto BREAK_label;
220 } else {
221 }
222 var18 = var_c->attrs[COLOR_standard__hash_collection__HashNode___next_in_bucklet].val; /* _next_in_bucklet on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
223 var_c = var18;
224 } else {
225 goto BREAK_label;
226 }
227 }
228 BREAK_label: (void)0;
229 /* <var_c:nullable HashNode[nullable Object]> isa nullable N */
230 type_struct = self->type->resolution_table->types[COLOR_nullable__standard__hash_collection__HashCollection__N];
231 cltype = type_struct->color;
232 idtype = type_struct->id;
233 if(var_c == NULL) {
234 var19 = 1;
235 } else {
236 if(cltype >= var_c->type->table_size) {
237 var19 = 0;
238 } else {
239 var19 = var_c->type->type_table[cltype] == idtype;
240 }
241 }
242 if (unlikely(!var19)) {
243 var_class_name = var_c == NULL ? "null" : var_c->type->name;
244 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name);
245 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 73);
246 fatal_exit(1);
247 }
248 var = var_c;
249 goto RET_LABEL;
250 RET_LABEL:;
251 return var;
252 }
253 /* method hash_collection#HashCollection#store for (self: HashCollection[nullable Object], Int, HashNode[nullable Object]) */
254 void standard__hash_collection___standard__hash_collection__HashCollection___store(val* self, long p0, val* p1) {
255 short int var /* : Bool */;
256 int cltype;
257 int idtype;
258 const struct type* type_struct;
259 const char* var_class_name;
260 long var_index /* var index: Int */;
261 val* var_node /* var node: HashNode[nullable Object] */;
262 val* var1 /* : nullable HashNode[nullable Object] */;
263 short int var2 /* : Bool */;
264 short int var3 /* : Bool */;
265 val* var_other /* var other: nullable Object */;
266 short int var5 /* : Bool */;
267 short int var7 /* : Bool */;
268 val* var8 /* : nullable HashNode[nullable Object] */;
269 val* var9 /* : nullable HashNode[nullable Object] */;
270 val* var10 /* : nullable NativeArray[nullable HashNode[nullable Object]] */;
271 val* var11 /* : nullable Object */;
272 val* var13 /* : Object */;
273 val* var_next /* var next: nullable HashNode[nullable Object] */;
274 val* var14 /* : nullable NativeArray[nullable HashNode[nullable Object]] */;
275 short int var16 /* : Bool */;
276 int cltype17;
277 int idtype18;
278 const struct type* type_struct19;
279 const char* var_class_name20;
280 short int var21 /* : Bool */;
281 short int var22 /* : Bool */;
282 val* var_other24 /* var other: nullable Object */;
283 short int var25 /* : Bool */;
284 short int var26 /* : Bool */;
285 val* var27 /* : nullable Object */;
286 long var28 /* : Int */;
287 long var_l /* var l: Int */;
288 long var29 /* : Int */;
289 short int var31 /* : Bool */;
290 int cltype32;
291 int idtype33;
292 const char* var_class_name34;
293 long var35 /* : Int */;
294 long var36 /* : Int */;
295 short int var38 /* : Bool */;
296 int cltype39;
297 int idtype40;
298 const char* var_class_name41;
299 long var42 /* : Int */;
300 long var43 /* : Int */;
301 short int var45 /* : Bool */;
302 int cltype46;
303 int idtype47;
304 const char* var_class_name48;
305 long var49 /* : Int */;
306 long var50 /* : Int */;
307 short int var52 /* : Bool */;
308 int cltype53;
309 int idtype54;
310 const char* var_class_name55;
311 long var56 /* : Int */;
312 long var57 /* : Int */;
313 short int var58 /* : Bool */;
314 short int var60 /* : Bool */;
315 int cltype61;
316 int idtype62;
317 const char* var_class_name63;
318 short int var64 /* : Bool */;
319 long var65 /* : Int */;
320 short int var67 /* : Bool */;
321 int cltype68;
322 int idtype69;
323 const char* var_class_name70;
324 long var71 /* : Int */;
325 long var72 /* : Int */;
326 short int var74 /* : Bool */;
327 int cltype75;
328 int idtype76;
329 const char* var_class_name77;
330 long var78 /* : Int */;
331 long var79 /* : Int */;
332 short int var81 /* : Bool */;
333 int cltype82;
334 int idtype83;
335 const char* var_class_name84;
336 long var85 /* : Int */;
337 /* Covariant cast for argument 1 (node) <p1:HashNode[nullable Object]> isa N */
338 /* <p1:HashNode[nullable Object]> isa N */
339 type_struct = self->type->resolution_table->types[COLOR_standard__hash_collection__HashCollection__N];
340 cltype = type_struct->color;
341 idtype = type_struct->id;
342 if(cltype >= p1->type->table_size) {
343 var = 0;
344 } else {
345 var = p1->type->type_table[cltype] == idtype;
346 }
347 if (unlikely(!var)) {
348 var_class_name = p1 == NULL ? "null" : p1->type->name;
349 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "N", var_class_name);
350 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 76);
351 fatal_exit(1);
352 }
353 var_index = p0;
354 var_node = p1;
355 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashCollection[nullable Object]> */
356 if (var1 == NULL) {
357 var2 = 1; /* is null */
358 } else {
359 var2 = 0; /* arg is null but recv is not */
360 }
361 if (0) {
362 { /* Inline kernel#Object#== (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object]> */
363 var_other = ((val*)NULL);
364 {
365 { /* Inline kernel#Object#is_same_instance (var1,var_other) on <var1:nullable HashNode[nullable Object](HashNode[nullable Object])> */
366 var7 = var1 == var_other;
367 var5 = var7;
368 goto RET_LABEL6;
369 RET_LABEL6:(void)0;
370 }
371 }
372 var3 = var5;
373 goto RET_LABEL4;
374 RET_LABEL4:(void)0;
375 }
376 var2 = var3;
377 }
378 if (var2){
379 self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val = var_node; /* _first_item on <self:HashCollection[nullable Object]> */
380 } else {
381 var8 = self->attrs[COLOR_standard__hash_collection__HashCollection___last_item].val; /* _last_item on <self:HashCollection[nullable Object]> */
382 if (unlikely(var8 == NULL)) {
383 PRINT_ERROR("Runtime error: %s", "Receiver is null");
384 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 83);
385 fatal_exit(1);
386 }
387 var8->attrs[COLOR_standard__hash_collection__HashNode___next_item].val = var_node; /* _next_item on <var8:nullable HashNode[nullable Object]> */
388 }
389 var9 = self->attrs[COLOR_standard__hash_collection__HashCollection___last_item].val; /* _last_item on <self:HashCollection[nullable Object]> */
390 var_node->attrs[COLOR_standard__hash_collection__HashNode___prev_item].val = var9; /* _prev_item on <var_node:HashNode[nullable Object]> */
391 var_node->attrs[COLOR_standard__hash_collection__HashNode___next_item].val = ((val*)NULL); /* _next_item on <var_node:HashNode[nullable Object]> */
392 self->attrs[COLOR_standard__hash_collection__HashCollection___last_item].val = var_node; /* _last_item on <self:HashCollection[nullable Object]> */
393 var10 = self->attrs[COLOR_standard__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
394 if (var10 == NULL) {
395 PRINT_ERROR("Runtime error: %s", "Receiver is null");
396 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 90);
397 fatal_exit(1);
398 } else {
399 { /* Inline array#NativeArray#[] (var10,var_index) on <var10:nullable NativeArray[nullable HashNode[nullable Object]]> */
400 var13 = ((struct instance_standard__NativeArray*)var10)->values[var_index];
401 var11 = var13;
402 goto RET_LABEL12;
403 RET_LABEL12:(void)0;
404 }
405 }
406 var_next = var11;
407 var14 = self->attrs[COLOR_standard__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
408 if (var14 == NULL) {
409 PRINT_ERROR("Runtime error: %s", "Receiver is null");
410 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 91);
411 fatal_exit(1);
412 } else {
413 { /* Inline array#NativeArray#[]= (var14,var_index,var_node) on <var14:nullable NativeArray[nullable HashNode[nullable Object]]> */
414 /* Covariant cast for argument 1 (item) <var_node:HashNode[nullable Object]> isa E */
415 /* <var_node:HashNode[nullable Object]> isa E */
416 type_struct19 = var14->type->resolution_table->types[COLOR_standard__NativeArray___35dE];
417 cltype17 = type_struct19->color;
418 idtype18 = type_struct19->id;
419 if(cltype17 >= var_node->type->table_size) {
420 var16 = 0;
421 } else {
422 var16 = var_node->type->type_table[cltype17] == idtype18;
423 }
424 if (unlikely(!var16)) {
425 var_class_name20 = var_node == NULL ? "null" : var_node->type->name;
426 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name20);
427 PRINT_ERROR(" (%s:%d)\n", FILE_standard__array, 957);
428 fatal_exit(1);
429 }
430 ((struct instance_standard__NativeArray*)var14)->values[var_index]=var_node;
431 RET_LABEL15:(void)0;
432 }
433 }
434 var_node->attrs[COLOR_standard__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_node:HashNode[nullable Object]> */
435 if (var_next == NULL) {
436 var21 = 0; /* is null */
437 } else {
438 var21 = 1; /* arg is null and recv is not */
439 }
440 if (0) {
441 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
442 var_other24 = ((val*)NULL);
443 {
444 var25 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_next, var_other24); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
445 }
446 var26 = !var25;
447 var22 = var26;
448 goto RET_LABEL23;
449 RET_LABEL23:(void)0;
450 }
451 var21 = var22;
452 }
453 if (var21){
454 var_next->attrs[COLOR_standard__hash_collection__HashNode___prev_in_bucklet].val = var_node; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
455 } else {
456 }
457 var27 = var_node->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var_node:HashNode[nullable Object]> */
458 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val = var27; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
459 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_node].val = var_node; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
460 var28 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
461 var_l = var28;
462 {
463 { /* Inline kernel#Int#+ (var_l,1l) on <var_l:Int> */
464 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
465 /* <1l:Int> isa OTHER */
466 var31 = 1; /* easy <1l:Int> isa OTHER*/
467 if (unlikely(!var31)) {
468 var_class_name34 = type_standard__Int.name;
469 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34);
470 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
471 fatal_exit(1);
472 }
473 var35 = var_l + 1l;
474 var29 = var35;
475 goto RET_LABEL30;
476 RET_LABEL30:(void)0;
477 }
478 }
479 self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l = var29; /* _the_length on <self:HashCollection[nullable Object]> */
480 {
481 { /* Inline kernel#Int#+ (var_l,5l) on <var_l:Int> */
482 /* Covariant cast for argument 0 (i) <5l:Int> isa OTHER */
483 /* <5l:Int> isa OTHER */
484 var38 = 1; /* easy <5l:Int> isa OTHER*/
485 if (unlikely(!var38)) {
486 var_class_name41 = type_standard__Int.name;
487 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41);
488 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
489 fatal_exit(1);
490 }
491 var42 = var_l + 5l;
492 var36 = var42;
493 goto RET_LABEL37;
494 RET_LABEL37:(void)0;
495 }
496 }
497 {
498 { /* Inline kernel#Int#* (var36,2l) on <var36:Int> */
499 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
500 /* <2l:Int> isa OTHER */
501 var45 = 1; /* easy <2l:Int> isa OTHER*/
502 if (unlikely(!var45)) {
503 var_class_name48 = type_standard__Int.name;
504 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48);
505 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 541);
506 fatal_exit(1);
507 }
508 var49 = var36 * 2l;
509 var43 = var49;
510 goto RET_LABEL44;
511 RET_LABEL44:(void)0;
512 }
513 }
514 {
515 { /* Inline kernel#Int#+ (var43,1l) on <var43:Int> */
516 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
517 /* <1l:Int> isa OTHER */
518 var52 = 1; /* easy <1l:Int> isa OTHER*/
519 if (unlikely(!var52)) {
520 var_class_name55 = type_standard__Int.name;
521 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name55);
522 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
523 fatal_exit(1);
524 }
525 var56 = var43 + 1l;
526 var50 = var56;
527 goto RET_LABEL51;
528 RET_LABEL51:(void)0;
529 }
530 }
531 var_l = var50;
532 var57 = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
533 {
534 { /* Inline kernel#Int#>= (var_l,var57) on <var_l:Int> */
535 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
536 /* <var57:Int> isa OTHER */
537 var60 = 1; /* easy <var57:Int> isa OTHER*/
538 if (unlikely(!var60)) {
539 var_class_name63 = type_standard__Int.name;
540 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63);
541 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 535);
542 fatal_exit(1);
543 }
544 var64 = var_l >= var57;
545 var58 = var64;
546 goto RET_LABEL59;
547 RET_LABEL59:(void)0;
548 }
549 }
550 if (var58){
551 {
552 { /* Inline kernel#Int#* (var_l,3l) on <var_l:Int> */
553 /* Covariant cast for argument 0 (i) <3l:Int> isa OTHER */
554 /* <3l:Int> isa OTHER */
555 var67 = 1; /* easy <3l:Int> isa OTHER*/
556 if (unlikely(!var67)) {
557 var_class_name70 = type_standard__Int.name;
558 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name70);
559 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 541);
560 fatal_exit(1);
561 }
562 var71 = var_l * 3l;
563 var65 = var71;
564 goto RET_LABEL66;
565 RET_LABEL66:(void)0;
566 }
567 }
568 {
569 { /* Inline kernel#Int#/ (var65,2l) on <var65:Int> */
570 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
571 /* <2l:Int> isa OTHER */
572 var74 = 1; /* easy <2l:Int> isa OTHER*/
573 if (unlikely(!var74)) {
574 var_class_name77 = type_standard__Int.name;
575 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name77);
576 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 542);
577 fatal_exit(1);
578 }
579 var78 = var65 / 2l;
580 var72 = var78;
581 goto RET_LABEL73;
582 RET_LABEL73:(void)0;
583 }
584 }
585 {
586 { /* Inline kernel#Int#+ (var72,1l) on <var72:Int> */
587 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
588 /* <1l:Int> isa OTHER */
589 var81 = 1; /* easy <1l:Int> isa OTHER*/
590 if (unlikely(!var81)) {
591 var_class_name84 = type_standard__Int.name;
592 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84);
593 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
594 fatal_exit(1);
595 }
596 var85 = var72 + 1l;
597 var79 = var85;
598 goto RET_LABEL80;
599 RET_LABEL80:(void)0;
600 }
601 }
602 {
603 standard__hash_collection___standard__hash_collection__HashCollection___enlarge(self, var79); /* Direct call hash_collection#HashCollection#enlarge on <self:HashCollection[nullable Object]>*/
604 }
605 } else {
606 }
607 RET_LABEL:;
608 }
609 /* method hash_collection#HashCollection#remove_node for (self: HashCollection[nullable Object], nullable Object) */
610 void standard__hash_collection___standard__hash_collection__HashCollection___remove_node(val* self, val* p0) {
611 val* var_k /* var k: nullable Object */;
612 long var /* : Int */;
613 long var_i /* var i: Int */;
614 val* var1 /* : nullable HashNode[nullable Object] */;
615 val* var_node /* var node: nullable HashNode[nullable Object] */;
616 short int var2 /* : Bool */;
617 short int var3 /* : Bool */;
618 val* var_other /* var other: nullable Object */;
619 short int var5 /* : Bool */;
620 short int var7 /* : Bool */;
621 val* var8 /* : nullable HashNode[nullable Object] */;
622 val* var_prev /* var prev: nullable HashNode[nullable Object] */;
623 val* var9 /* : nullable HashNode[nullable Object] */;
624 val* var_next /* var next: nullable HashNode[nullable Object] */;
625 short int var10 /* : Bool */;
626 short int var11 /* : Bool */;
627 val* var_other13 /* var other: nullable Object */;
628 short int var14 /* : Bool */;
629 short int var15 /* : Bool */;
630 short int var16 /* : Bool */;
631 int cltype;
632 int idtype;
633 const struct type* type_struct;
634 const char* var_class_name;
635 short int var17 /* : Bool */;
636 short int var18 /* : Bool */;
637 short int var20 /* : Bool */;
638 short int var21 /* : Bool */;
639 short int var22 /* : Bool */;
640 int cltype23;
641 int idtype24;
642 const struct type* type_struct25;
643 const char* var_class_name26;
644 val* var_ /* var : HashCollection[nullable Object] */;
645 long var27 /* : Int */;
646 long var28 /* : Int */;
647 short int var30 /* : Bool */;
648 int cltype31;
649 int idtype32;
650 const char* var_class_name33;
651 long var34 /* : Int */;
652 val* var35 /* : nullable HashNode[nullable Object] */;
653 val* var36 /* : nullable HashNode[nullable Object] */;
654 short int var37 /* : Bool */;
655 short int var38 /* : Bool */;
656 short int var40 /* : Bool */;
657 short int var41 /* : Bool */;
658 val* var42 /* : nullable NativeArray[nullable HashNode[nullable Object]] */;
659 short int var44 /* : Bool */;
660 int cltype45;
661 int idtype46;
662 const struct type* type_struct47;
663 short int is_nullable;
664 const char* var_class_name48;
665 short int var49 /* : Bool */;
666 short int var50 /* : Bool */;
667 short int var52 /* : Bool */;
668 short int var53 /* : Bool */;
669 var_k = p0;
670 {
671 var = standard__hash_collection___standard__hash_collection__HashCollection___index_at(self, var_k);
672 }
673 var_i = var;
674 {
675 var1 = standard__hash_collection___standard__hash_collection__HashCollection___node_at_idx(self, var_i, var_k);
676 }
677 var_node = var1;
678 if (var_node == NULL) {
679 var2 = 1; /* is null */
680 } else {
681 var2 = 0; /* arg is null but recv is not */
682 }
683 if (0) {
684 { /* Inline kernel#Object#== (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
685 var_other = ((val*)NULL);
686 {
687 { /* Inline kernel#Object#is_same_instance (var_node,var_other) on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
688 var7 = var_node == var_other;
689 var5 = var7;
690 goto RET_LABEL6;
691 RET_LABEL6:(void)0;
692 }
693 }
694 var3 = var5;
695 goto RET_LABEL4;
696 RET_LABEL4:(void)0;
697 }
698 var2 = var3;
699 }
700 if (var2){
701 goto RET_LABEL;
702 } else {
703 }
704 var8 = var_node->attrs[COLOR_standard__hash_collection__HashNode___prev_item].val; /* _prev_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
705 var_prev = var8;
706 var9 = var_node->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
707 var_next = var9;
708 if (var_prev == NULL) {
709 var10 = 0; /* is null */
710 } else {
711 var10 = 1; /* arg is null and recv is not */
712 }
713 if (0) {
714 { /* Inline kernel#Object#!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
715 var_other13 = ((val*)NULL);
716 {
717 var14 = ((short int(*)(val* self, val* p0))(var_prev->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_prev, var_other13); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
718 }
719 var15 = !var14;
720 var11 = var15;
721 goto RET_LABEL12;
722 RET_LABEL12:(void)0;
723 }
724 var10 = var11;
725 }
726 if (var10){
727 var_prev->attrs[COLOR_standard__hash_collection__HashNode___next_item].val = var_next; /* _next_item on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
728 } else {
729 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
730 type_struct = self->type->resolution_table->types[COLOR_nullable__standard__hash_collection__HashCollection__N];
731 cltype = type_struct->color;
732 idtype = type_struct->id;
733 if(var_next == NULL) {
734 var16 = 1;
735 } else {
736 if(cltype >= var_next->type->table_size) {
737 var16 = 0;
738 } else {
739 var16 = var_next->type->type_table[cltype] == idtype;
740 }
741 }
742 if (unlikely(!var16)) {
743 var_class_name = var_next == NULL ? "null" : var_next->type->name;
744 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name);
745 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 124);
746 fatal_exit(1);
747 }
748 self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val = var_next; /* _first_item on <self:HashCollection[nullable Object]> */
749 }
750 if (var_next == NULL) {
751 var17 = 0; /* is null */
752 } else {
753 var17 = 1; /* arg is null and recv is not */
754 }
755 if (0) {
756 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
757 var_other13 = ((val*)NULL);
758 {
759 var20 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_next, var_other13); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
760 }
761 var21 = !var20;
762 var18 = var21;
763 goto RET_LABEL19;
764 RET_LABEL19:(void)0;
765 }
766 var17 = var18;
767 }
768 if (var17){
769 var_next->attrs[COLOR_standard__hash_collection__HashNode___prev_item].val = var_prev; /* _prev_item on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
770 } else {
771 /* <var_prev:nullable HashNode[nullable Object]> isa nullable N */
772 type_struct25 = self->type->resolution_table->types[COLOR_nullable__standard__hash_collection__HashCollection__N];
773 cltype23 = type_struct25->color;
774 idtype24 = type_struct25->id;
775 if(var_prev == NULL) {
776 var22 = 1;
777 } else {
778 if(cltype23 >= var_prev->type->table_size) {
779 var22 = 0;
780 } else {
781 var22 = var_prev->type->type_table[cltype23] == idtype24;
782 }
783 }
784 if (unlikely(!var22)) {
785 var_class_name26 = var_prev == NULL ? "null" : var_prev->type->name;
786 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name26);
787 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 129);
788 fatal_exit(1);
789 }
790 self->attrs[COLOR_standard__hash_collection__HashCollection___last_item].val = var_prev; /* _last_item on <self:HashCollection[nullable Object]> */
791 }
792 var_ = self;
793 var27 = var_->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <var_:HashCollection[nullable Object]> */
794 {
795 { /* Inline kernel#Int#- (var27,1l) on <var27:Int> */
796 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
797 /* <1l:Int> isa OTHER */
798 var30 = 1; /* easy <1l:Int> isa OTHER*/
799 if (unlikely(!var30)) {
800 var_class_name33 = type_standard__Int.name;
801 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name33);
802 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 540);
803 fatal_exit(1);
804 }
805 var34 = var27 - 1l;
806 var28 = var34;
807 goto RET_LABEL29;
808 RET_LABEL29:(void)0;
809 }
810 }
811 var_->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l = var28; /* _the_length on <var_:HashCollection[nullable Object]> */
812 var35 = var_node->attrs[COLOR_standard__hash_collection__HashNode___prev_in_bucklet].val; /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
813 var_prev = var35;
814 var36 = var_node->attrs[COLOR_standard__hash_collection__HashNode___next_in_bucklet].val; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
815 var_next = var36;
816 if (var_prev == NULL) {
817 var37 = 0; /* is null */
818 } else {
819 var37 = 1; /* arg is null and recv is not */
820 }
821 if (0) {
822 { /* Inline kernel#Object#!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
823 var_other13 = ((val*)NULL);
824 {
825 var40 = ((short int(*)(val* self, val* p0))(var_prev->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_prev, var_other13); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
826 }
827 var41 = !var40;
828 var38 = var41;
829 goto RET_LABEL39;
830 RET_LABEL39:(void)0;
831 }
832 var37 = var38;
833 }
834 if (var37){
835 var_prev->attrs[COLOR_standard__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
836 } else {
837 var42 = self->attrs[COLOR_standard__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
838 if (var42 == NULL) {
839 PRINT_ERROR("Runtime error: %s", "Receiver is null");
840 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 139);
841 fatal_exit(1);
842 } else {
843 { /* Inline array#NativeArray#[]= (var42,var_i,var_next) on <var42:nullable NativeArray[nullable HashNode[nullable Object]]> */
844 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[nullable Object]> isa E */
845 /* <var_next:nullable HashNode[nullable Object]> isa E */
846 type_struct47 = var42->type->resolution_table->types[COLOR_standard__NativeArray___35dE];
847 cltype45 = type_struct47->color;
848 idtype46 = type_struct47->id;
849 is_nullable = type_struct47->is_nullable;
850 if(var_next == NULL) {
851 var44 = is_nullable;
852 } else {
853 if(cltype45 >= var_next->type->table_size) {
854 var44 = 0;
855 } else {
856 var44 = var_next->type->type_table[cltype45] == idtype46;
857 }
858 }
859 if (unlikely(!var44)) {
860 var_class_name48 = var_next == NULL ? "null" : var_next->type->name;
861 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name48);
862 PRINT_ERROR(" (%s:%d)\n", FILE_standard__array, 957);
863 fatal_exit(1);
864 }
865 ((struct instance_standard__NativeArray*)var42)->values[var_i]=var_next;
866 RET_LABEL43:(void)0;
867 }
868 }
869 }
870 if (var_next == NULL) {
871 var49 = 0; /* is null */
872 } else {
873 var49 = 1; /* arg is null and recv is not */
874 }
875 if (0) {
876 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
877 var_other13 = ((val*)NULL);
878 {
879 var52 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_next, var_other13); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
880 }
881 var53 = !var52;
882 var50 = var53;
883 goto RET_LABEL51;
884 RET_LABEL51:(void)0;
885 }
886 var49 = var50;
887 }
888 if (var49){
889 var_next->attrs[COLOR_standard__hash_collection__HashNode___prev_in_bucklet].val = var_prev; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
890 } else {
891 }
892 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
893 RET_LABEL:;
894 }
895 /* method hash_collection#HashCollection#raz for (self: HashCollection[nullable Object]) */
896 void standard__hash_collection___standard__hash_collection__HashCollection___raz(val* self) {
897 long var /* : Int */;
898 long var1 /* : Int */;
899 short int var3 /* : Bool */;
900 int cltype;
901 int idtype;
902 const char* var_class_name;
903 long var4 /* : Int */;
904 long var_i /* var i: Int */;
905 short int var5 /* : Bool */;
906 short int var7 /* : Bool */;
907 int cltype8;
908 int idtype9;
909 const char* var_class_name10;
910 short int var11 /* : Bool */;
911 val* var12 /* : nullable NativeArray[nullable HashNode[nullable Object]] */;
912 short int var14 /* : Bool */;
913 int cltype15;
914 int idtype16;
915 const struct type* type_struct;
916 short int is_nullable;
917 const char* var_class_name17;
918 long var18 /* : Int */;
919 short int var20 /* : Bool */;
920 int cltype21;
921 int idtype22;
922 const char* var_class_name23;
923 long var24 /* : Int */;
924 var = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
925 {
926 { /* Inline kernel#Int#- (var,1l) on <var:Int> */
927 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
928 /* <1l:Int> isa OTHER */
929 var3 = 1; /* easy <1l:Int> isa OTHER*/
930 if (unlikely(!var3)) {
931 var_class_name = type_standard__Int.name;
932 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
933 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 540);
934 fatal_exit(1);
935 }
936 var4 = var - 1l;
937 var1 = var4;
938 goto RET_LABEL2;
939 RET_LABEL2:(void)0;
940 }
941 }
942 var_i = var1;
943 for(;;) {
944 {
945 { /* Inline kernel#Int#>= (var_i,0l) on <var_i:Int> */
946 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
947 /* <0l:Int> isa OTHER */
948 var7 = 1; /* easy <0l:Int> isa OTHER*/
949 if (unlikely(!var7)) {
950 var_class_name10 = type_standard__Int.name;
951 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10);
952 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 535);
953 fatal_exit(1);
954 }
955 var11 = var_i >= 0l;
956 var5 = var11;
957 goto RET_LABEL6;
958 RET_LABEL6:(void)0;
959 }
960 }
961 if (var5){
962 var12 = self->attrs[COLOR_standard__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
963 if (var12 == NULL) {
964 PRINT_ERROR("Runtime error: %s", "Receiver is null");
965 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 153);
966 fatal_exit(1);
967 } else {
968 { /* Inline array#NativeArray#[]= (var12,var_i,((val*)NULL)) on <var12:nullable NativeArray[nullable HashNode[nullable Object]]> */
969 /* Covariant cast for argument 1 (item) <((val*)NULL):null> isa E */
970 /* <((val*)NULL):null> isa E */
971 type_struct = var12->type->resolution_table->types[COLOR_standard__NativeArray___35dE];
972 cltype15 = type_struct->color;
973 idtype16 = type_struct->id;
974 is_nullable = type_struct->is_nullable;
975 if(((val*)NULL) == NULL) {
976 var14 = is_nullable;
977 } else {
978 if(cltype15 >= ((val*)NULL)->type->table_size) {
979 var14 = 0;
980 } else {
981 var14 = ((val*)NULL)->type->type_table[cltype15] == idtype16;
982 }
983 }
984 if (unlikely(!var14)) {
985 var_class_name17 = ((val*)NULL) == NULL ? "null" : ((val*)NULL)->type->name;
986 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name17);
987 PRINT_ERROR(" (%s:%d)\n", FILE_standard__array, 957);
988 fatal_exit(1);
989 }
990 ((struct instance_standard__NativeArray*)var12)->values[var_i]=((val*)NULL);
991 RET_LABEL13:(void)0;
992 }
993 }
994 {
995 { /* Inline kernel#Int#- (var_i,1l) on <var_i:Int> */
996 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
997 /* <1l:Int> isa OTHER */
998 var20 = 1; /* easy <1l:Int> isa OTHER*/
999 if (unlikely(!var20)) {
1000 var_class_name23 = type_standard__Int.name;
1001 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23);
1002 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 540);
1003 fatal_exit(1);
1004 }
1005 var24 = var_i - 1l;
1006 var18 = var24;
1007 goto RET_LABEL19;
1008 RET_LABEL19:(void)0;
1009 }
1010 }
1011 var_i = var18;
1012 } else {
1013 goto BREAK_label;
1014 }
1015 }
1016 BREAK_label: (void)0;
1017 self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashCollection[nullable Object]> */
1018 self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val = ((val*)NULL); /* _first_item on <self:HashCollection[nullable Object]> */
1019 self->attrs[COLOR_standard__hash_collection__HashCollection___last_item].val = ((val*)NULL); /* _last_item on <self:HashCollection[nullable Object]> */
1020 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1021 RET_LABEL:;
1022 }
1023 /* method hash_collection#HashCollection#enlarge for (self: HashCollection[nullable Object], Int) */
1024 void standard__hash_collection___standard__hash_collection__HashCollection___enlarge(val* self, long p0) {
1025 long var_cap /* var cap: Int */;
1026 long var /* : Int */;
1027 long var_old_cap /* var old_cap: Int */;
1028 long var1 /* : Int */;
1029 long var2 /* : Int */;
1030 short int var4 /* : Bool */;
1031 int cltype;
1032 int idtype;
1033 const char* var_class_name;
1034 long var5 /* : Int */;
1035 short int var6 /* : Bool */;
1036 short int var8 /* : Bool */;
1037 int cltype9;
1038 int idtype10;
1039 const char* var_class_name11;
1040 short int var12 /* : Bool */;
1041 long var13 /* : Int */;
1042 long var14 /* : Int */;
1043 short int var16 /* : Bool */;
1044 int cltype17;
1045 int idtype18;
1046 const char* var_class_name19;
1047 long var20 /* : Int */;
1048 long var21 /* : Int */;
1049 short int var22 /* : Bool */;
1050 short int var24 /* : Bool */;
1051 int cltype25;
1052 int idtype26;
1053 const char* var_class_name27;
1054 short int var28 /* : Bool */;
1055 val* var29 /* : NativeArray[nullable HashNode[nullable Object]] */;
1056 val* var_new_array /* var new_array: NativeArray[nullable HashNode[nullable Object]] */;
1057 long var30 /* : Int */;
1058 short int var32 /* : Bool */;
1059 int cltype33;
1060 int idtype34;
1061 const char* var_class_name35;
1062 long var36 /* : Int */;
1063 long var_i /* var i: Int */;
1064 short int var37 /* : Bool */;
1065 short int var39 /* : Bool */;
1066 int cltype40;
1067 int idtype41;
1068 const char* var_class_name42;
1069 short int var43 /* : Bool */;
1070 short int var45 /* : Bool */;
1071 int cltype46;
1072 int idtype47;
1073 const struct type* type_struct;
1074 short int is_nullable;
1075 const char* var_class_name48;
1076 long var49 /* : Int */;
1077 short int var51 /* : Bool */;
1078 int cltype52;
1079 int idtype53;
1080 const char* var_class_name54;
1081 long var55 /* : Int */;
1082 long var56 /* : Int */;
1083 short int var57 /* : Bool */;
1084 short int var59 /* : Bool */;
1085 int cltype60;
1086 int idtype61;
1087 const char* var_class_name62;
1088 short int var63 /* : Bool */;
1089 val* var64 /* : nullable HashNode[nullable Object] */;
1090 val* var_node /* var node: nullable HashNode[nullable Object] */;
1091 short int var65 /* : Bool */;
1092 short int var66 /* : Bool */;
1093 val* var_other /* var other: nullable Object */;
1094 short int var68 /* : Bool */;
1095 short int var69 /* : Bool */;
1096 val* var70 /* : nullable Object */;
1097 long var71 /* : Int */;
1098 long var_index /* var index: Int */;
1099 val* var72 /* : nullable Object */;
1100 val* var74 /* : Object */;
1101 val* var_next /* var next: nullable HashNode[nullable Object] */;
1102 short int var76 /* : Bool */;
1103 int cltype77;
1104 int idtype78;
1105 const struct type* type_struct79;
1106 const char* var_class_name80;
1107 short int var81 /* : Bool */;
1108 short int var82 /* : Bool */;
1109 short int var84 /* : Bool */;
1110 short int var85 /* : Bool */;
1111 val* var86 /* : nullable HashNode[nullable Object] */;
1112 short int var87 /* : Bool */;
1113 int cltype88;
1114 int idtype89;
1115 const struct type* type_struct90;
1116 const char* var_class_name91;
1117 var_cap = p0;
1118 var = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
1119 var_old_cap = var;
1120 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
1121 {
1122 { /* Inline kernel#Int#+ (var1,1l) on <var1:Int> */
1123 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1124 /* <1l:Int> isa OTHER */
1125 var4 = 1; /* easy <1l:Int> isa OTHER*/
1126 if (unlikely(!var4)) {
1127 var_class_name = type_standard__Int.name;
1128 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
1129 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
1130 fatal_exit(1);
1131 }
1132 var5 = var1 + 1l;
1133 var2 = var5;
1134 goto RET_LABEL3;
1135 RET_LABEL3:(void)0;
1136 }
1137 }
1138 {
1139 { /* Inline kernel#Int#< (var_cap,var2) on <var_cap:Int> */
1140 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1141 /* <var2:Int> isa OTHER */
1142 var8 = 1; /* easy <var2:Int> isa OTHER*/
1143 if (unlikely(!var8)) {
1144 var_class_name11 = type_standard__Int.name;
1145 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11);
1146 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 534);
1147 fatal_exit(1);
1148 }
1149 var12 = var_cap < var2;
1150 var6 = var12;
1151 goto RET_LABEL7;
1152 RET_LABEL7:(void)0;
1153 }
1154 }
1155 if (var6){
1156 var13 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
1157 {
1158 { /* Inline kernel#Int#+ (var13,1l) on <var13:Int> */
1159 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1160 /* <1l:Int> isa OTHER */
1161 var16 = 1; /* easy <1l:Int> isa OTHER*/
1162 if (unlikely(!var16)) {
1163 var_class_name19 = type_standard__Int.name;
1164 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name19);
1165 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 537);
1166 fatal_exit(1);
1167 }
1168 var20 = var13 + 1l;
1169 var14 = var20;
1170 goto RET_LABEL15;
1171 RET_LABEL15:(void)0;
1172 }
1173 }
1174 var_cap = var14;
1175 } else {
1176 }
1177 var21 = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
1178 {
1179 { /* Inline kernel#Int#<= (var_cap,var21) on <var_cap:Int> */
1180 /* Covariant cast for argument 0 (i) <var21:Int> isa OTHER */
1181 /* <var21:Int> isa OTHER */
1182 var24 = 1; /* easy <var21:Int> isa OTHER*/
1183 if (unlikely(!var24)) {
1184 var_class_name27 = type_standard__Int.name;
1185 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27);
1186 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 533);
1187 fatal_exit(1);
1188 }
1189 var28 = var_cap <= var21;
1190 var22 = var28;
1191 goto RET_LABEL23;
1192 RET_LABEL23:(void)0;
1193 }
1194 }
1195 if (var22){
1196 goto RET_LABEL;
1197 } else {
1198 }
1199 self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l = var_cap; /* _capacity on <self:HashCollection[nullable Object]> */
1200 self->attrs[COLOR_standard__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1201 var29 = NEW_standard__NativeArray(var_cap, self->type->resolution_table->types[COLOR_standard__NativeArray__nullable__standard__hash_collection__HashCollection__N]);
1202 var_new_array = var29;
1203 self->attrs[COLOR_standard__hash_collection__HashCollection___array].val = var_new_array; /* _array on <self:HashCollection[nullable Object]> */
1204 {
1205 { /* Inline kernel#Int#- (var_cap,1l) on <var_cap:Int> */
1206 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1207 /* <1l:Int> isa OTHER */
1208 var32 = 1; /* easy <1l:Int> isa OTHER*/
1209 if (unlikely(!var32)) {
1210 var_class_name35 = type_standard__Int.name;
1211 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name35);
1212 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 540);
1213 fatal_exit(1);
1214 }
1215 var36 = var_cap - 1l;
1216 var30 = var36;
1217 goto RET_LABEL31;
1218 RET_LABEL31:(void)0;
1219 }
1220 }
1221 var_i = var30;
1222 for(;;) {
1223 {
1224 { /* Inline kernel#Int#>= (var_i,0l) on <var_i:Int> */
1225 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
1226 /* <0l:Int> isa OTHER */
1227 var39 = 1; /* easy <0l:Int> isa OTHER*/
1228 if (unlikely(!var39)) {
1229 var_class_name42 = type_standard__Int.name;
1230 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name42);
1231 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 535);
1232 fatal_exit(1);
1233 }
1234 var43 = var_i >= 0l;
1235 var37 = var43;
1236 goto RET_LABEL38;
1237 RET_LABEL38:(void)0;
1238 }
1239 }
1240 if (var37){
1241 {
1242 { /* Inline array#NativeArray#[]= (var_new_array,var_i,((val*)NULL)) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1243 /* Covariant cast for argument 1 (item) <((val*)NULL):null> isa E */
1244 /* <((val*)NULL):null> isa E */
1245 type_struct = var_new_array->type->resolution_table->types[COLOR_standard__NativeArray___35dE];
1246 cltype46 = type_struct->color;
1247 idtype47 = type_struct->id;
1248 is_nullable = type_struct->is_nullable;
1249 if(((val*)NULL) == NULL) {
1250 var45 = is_nullable;
1251 } else {
1252 if(cltype46 >= ((val*)NULL)->type->table_size) {
1253 var45 = 0;
1254 } else {
1255 var45 = ((val*)NULL)->type->type_table[cltype46] == idtype47;
1256 }
1257 }
1258 if (unlikely(!var45)) {
1259 var_class_name48 = ((val*)NULL) == NULL ? "null" : ((val*)NULL)->type->name;
1260 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name48);
1261 PRINT_ERROR(" (%s:%d)\n", FILE_standard__array, 957);
1262 fatal_exit(1);
1263 }
1264 ((struct instance_standard__NativeArray*)var_new_array)->values[var_i]=((val*)NULL);
1265 RET_LABEL44:(void)0;
1266 }
1267 }
1268 {
1269 { /* Inline kernel#Int#- (var_i,1l) on <var_i:Int> */
1270 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1271 /* <1l:Int> isa OTHER */
1272 var51 = 1; /* easy <1l:Int> isa OTHER*/
1273 if (unlikely(!var51)) {
1274 var_class_name54 = type_standard__Int.name;
1275 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name54);
1276 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 540);
1277 fatal_exit(1);
1278 }
1279 var55 = var_i - 1l;
1280 var49 = var55;
1281 goto RET_LABEL50;
1282 RET_LABEL50:(void)0;
1283 }
1284 }
1285 var_i = var49;
1286 } else {
1287 goto BREAK_label;
1288 }
1289 }
1290 BREAK_label: (void)0;
1291 var56 = self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
1292 {
1293 { /* Inline kernel#Int#<= (var56,var_old_cap) on <var56:Int> */
1294 /* Covariant cast for argument 0 (i) <var_old_cap:Int> isa OTHER */
1295 /* <var_old_cap:Int> isa OTHER */
1296 var59 = 1; /* easy <var_old_cap:Int> isa OTHER*/
1297 if (unlikely(!var59)) {
1298 var_class_name62 = type_standard__Int.name;
1299 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name62);
1300 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 533);
1301 fatal_exit(1);
1302 }
1303 var63 = var56 <= var_old_cap;
1304 var57 = var63;
1305 goto RET_LABEL58;
1306 RET_LABEL58:(void)0;
1307 }
1308 }
1309 if (var57){
1310 goto RET_LABEL;
1311 } else {
1312 }
1313 var64 = self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashCollection[nullable Object]> */
1314 var_node = var64;
1315 for(;;) {
1316 if (var_node == NULL) {
1317 var65 = 0; /* is null */
1318 } else {
1319 var65 = 1; /* arg is null and recv is not */
1320 }
1321 if (0) {
1322 { /* Inline kernel#Object#!= (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
1323 var_other = ((val*)NULL);
1324 {
1325 var68 = ((short int(*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other); /* == on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1326 }
1327 var69 = !var68;
1328 var66 = var69;
1329 goto RET_LABEL67;
1330 RET_LABEL67:(void)0;
1331 }
1332 var65 = var66;
1333 }
1334 if (var65){
1335 var70 = var_node->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1336 {
1337 var71 = standard__hash_collection___standard__hash_collection__HashCollection___index_at(self, var70);
1338 }
1339 var_index = var71;
1340 {
1341 { /* Inline array#NativeArray#[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1342 var74 = ((struct instance_standard__NativeArray*)var_new_array)->values[var_index];
1343 var72 = var74;
1344 goto RET_LABEL73;
1345 RET_LABEL73:(void)0;
1346 }
1347 }
1348 var_next = var72;
1349 {
1350 { /* Inline array#NativeArray#[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1351 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1352 /* <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1353 type_struct79 = var_new_array->type->resolution_table->types[COLOR_standard__NativeArray___35dE];
1354 cltype77 = type_struct79->color;
1355 idtype78 = type_struct79->id;
1356 if(cltype77 >= var_node->type->table_size) {
1357 var76 = 0;
1358 } else {
1359 var76 = var_node->type->type_table[cltype77] == idtype78;
1360 }
1361 if (unlikely(!var76)) {
1362 var_class_name80 = var_node == NULL ? "null" : var_node->type->name;
1363 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name80);
1364 PRINT_ERROR(" (%s:%d)\n", FILE_standard__array, 957);
1365 fatal_exit(1);
1366 }
1367 ((struct instance_standard__NativeArray*)var_new_array)->values[var_index]=var_node;
1368 RET_LABEL75:(void)0;
1369 }
1370 }
1371 var_node->attrs[COLOR_standard__hash_collection__HashNode___prev_in_bucklet].val = ((val*)NULL); /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1372 var_node->attrs[COLOR_standard__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1373 if (var_next == NULL) {
1374 var81 = 0; /* is null */
1375 } else {
1376 var81 = 1; /* arg is null and recv is not */
1377 }
1378 if (0) {
1379 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
1380 var_other = ((val*)NULL);
1381 {
1382 var84 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_next, var_other); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1383 }
1384 var85 = !var84;
1385 var82 = var85;
1386 goto RET_LABEL83;
1387 RET_LABEL83:(void)0;
1388 }
1389 var81 = var82;
1390 }
1391 if (var81){
1392 var_next->attrs[COLOR_standard__hash_collection__HashNode___prev_in_bucklet].val = var_node; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1393 } else {
1394 }
1395 var86 = var_node->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1396 /* <var86:nullable HashNode[nullable Object]> isa nullable N */
1397 type_struct90 = self->type->resolution_table->types[COLOR_nullable__standard__hash_collection__HashCollection__N];
1398 cltype88 = type_struct90->color;
1399 idtype89 = type_struct90->id;
1400 if(var86 == NULL) {
1401 var87 = 1;
1402 } else {
1403 if(cltype88 >= var86->type->table_size) {
1404 var87 = 0;
1405 } else {
1406 var87 = var86->type->type_table[cltype88] == idtype89;
1407 }
1408 }
1409 if (unlikely(!var87)) {
1410 var_class_name91 = var86 == NULL ? "null" : var86->type->name;
1411 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name91);
1412 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 195);
1413 fatal_exit(1);
1414 }
1415 var_node = var86;
1416 } else {
1417 goto BREAK_label92;
1418 }
1419 }
1420 BREAK_label92: (void)0;
1421 RET_LABEL:;
1422 }
1423 /* method hash_collection#HashNode#key= for (self: HashNode[nullable Object], nullable Object) */
1424 void standard__hash_collection___standard__hash_collection__HashNode___key_61d(val* self, val* p0) {
1425 short int var /* : Bool */;
1426 int cltype;
1427 int idtype;
1428 const struct type* type_struct;
1429 short int is_nullable;
1430 const char* var_class_name;
1431 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1432 /* <p0:nullable Object> isa K */
1433 type_struct = self->type->resolution_table->types[COLOR_standard__hash_collection__HashNode___35dK];
1434 cltype = type_struct->color;
1435 idtype = type_struct->id;
1436 is_nullable = type_struct->is_nullable;
1437 if(p0 == NULL) {
1438 var = is_nullable;
1439 } else {
1440 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1441 var = 0;
1442 } else {
1443 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1444 }
1445 }
1446 if (unlikely(!var)) {
1447 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1448 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
1449 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 201);
1450 fatal_exit(1);
1451 }
1452 self->attrs[COLOR_standard__hash_collection__HashNode___key].val = p0; /* _key on <self:HashNode[nullable Object]> */
1453 RET_LABEL:;
1454 }
1455 /* method hash_collection#HashNode#init for (self: HashNode[nullable Object]) */
1456 void standard__hash_collection___standard__hash_collection__HashNode___standard__kernel__Object__init(val* self) {
1457 {
1458 ((void(*)(val* self))(self->class->vft[COLOR_standard__hash_collection___standard__hash_collection__HashNode___standard__kernel__Object__init]))(self); /* init on <self:HashNode[nullable Object]>*/
1459 }
1460 RET_LABEL:;
1461 }
1462 /* method hash_collection#HashMap#[] for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1463 val* standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(val* self, val* p0) {
1464 val* var /* : nullable Object */;
1465 val* var_key /* var key: nullable Object */;
1466 val* var1 /* : nullable HashNode[nullable Object] */;
1467 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1468 short int var2 /* : Bool */;
1469 short int var3 /* : Bool */;
1470 val* var_other /* var other: nullable Object */;
1471 short int var5 /* : Bool */;
1472 short int var7 /* : Bool */;
1473 val* var8 /* : nullable Object */;
1474 val* var9 /* : nullable Object */;
1475 var_key = p0;
1476 {
1477 var1 = standard__hash_collection___standard__hash_collection__HashCollection___node_at(self, var_key);
1478 }
1479 var_c = var1;
1480 if (var_c == NULL) {
1481 var2 = 1; /* is null */
1482 } else {
1483 var2 = 0; /* arg is null but recv is not */
1484 }
1485 if (0) {
1486 { /* Inline kernel#Object#== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1487 var_other = ((val*)NULL);
1488 {
1489 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1490 var7 = var_c == var_other;
1491 var5 = var7;
1492 goto RET_LABEL6;
1493 RET_LABEL6:(void)0;
1494 }
1495 }
1496 var3 = var5;
1497 goto RET_LABEL4;
1498 RET_LABEL4:(void)0;
1499 }
1500 var2 = var3;
1501 }
1502 if (var2){
1503 {
1504 var8 = ((val*(*)(val* self, val* p0))(self->class->vft[COLOR_standard__abstract_collection__MapRead__provide_default_value]))(self, var_key); /* provide_default_value on <self:HashMap[nullable Object, nullable Object]>*/
1505 }
1506 var = var8;
1507 goto RET_LABEL;
1508 } else {
1509 var9 = var_c->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1510 var = var9;
1511 goto RET_LABEL;
1512 }
1513 RET_LABEL:;
1514 return var;
1515 }
1516 /* method hash_collection#HashMap#get_or_null for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1517 val* standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(val* self, val* p0) {
1518 val* var /* : nullable Object */;
1519 val* var_key /* var key: nullable Object */;
1520 val* var1 /* : nullable HashNode[nullable Object] */;
1521 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1522 short int var2 /* : Bool */;
1523 short int var3 /* : Bool */;
1524 val* var_other /* var other: nullable Object */;
1525 short int var5 /* : Bool */;
1526 short int var7 /* : Bool */;
1527 val* var8 /* : nullable Object */;
1528 var_key = p0;
1529 {
1530 var1 = standard__hash_collection___standard__hash_collection__HashCollection___node_at(self, var_key);
1531 }
1532 var_c = var1;
1533 if (var_c == NULL) {
1534 var2 = 1; /* is null */
1535 } else {
1536 var2 = 0; /* arg is null but recv is not */
1537 }
1538 if (0) {
1539 { /* Inline kernel#Object#== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1540 var_other = ((val*)NULL);
1541 {
1542 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1543 var7 = var_c == var_other;
1544 var5 = var7;
1545 goto RET_LABEL6;
1546 RET_LABEL6:(void)0;
1547 }
1548 }
1549 var3 = var5;
1550 goto RET_LABEL4;
1551 RET_LABEL4:(void)0;
1552 }
1553 var2 = var3;
1554 }
1555 if (var2){
1556 var = ((val*)NULL);
1557 goto RET_LABEL;
1558 } else {
1559 var8 = var_c->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1560 var = var8;
1561 goto RET_LABEL;
1562 }
1563 RET_LABEL:;
1564 return var;
1565 }
1566 /* method hash_collection#HashMap#iterator for (self: HashMap[nullable Object, nullable Object]): HashMapIterator[nullable Object, nullable Object] */
1567 val* standard___standard__HashMap___standard__abstract_collection__MapRead__iterator(val* self) {
1568 val* var /* : HashMapIterator[nullable Object, nullable Object] */;
1569 val* var1 /* : HashMapIterator[nullable Object, nullable Object] */;
1570 var1 = NEW_standard__HashMapIterator(self->type->resolution_table->types[COLOR_standard__HashMapIterator__standard__HashMap___35dK__standard__HashMap___35dV]);
1571 {
1572 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__hash_collection__HashMapIterator__map_61d]))(var1, self); /* map= on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1573 }
1574 {
1575 ((void(*)(val* self))(var1->class->vft[COLOR_standard__kernel__Object__init]))(var1); /* init on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1576 }
1577 var = var1;
1578 goto RET_LABEL;
1579 RET_LABEL:;
1580 return var;
1581 }
1582 /* method hash_collection#HashMap#length for (self: HashMap[nullable Object, nullable Object]): Int */
1583 long standard___standard__HashMap___standard__abstract_collection__MapRead__length(val* self) {
1584 long var /* : Int */;
1585 long var1 /* : Int */;
1586 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1587 var = var1;
1588 goto RET_LABEL;
1589 RET_LABEL:;
1590 return var;
1591 }
1592 /* method hash_collection#HashMap#is_empty for (self: HashMap[nullable Object, nullable Object]): Bool */
1593 short int standard___standard__HashMap___standard__abstract_collection__MapRead__is_empty(val* self) {
1594 short int var /* : Bool */;
1595 long var1 /* : Int */;
1596 short int var2 /* : Bool */;
1597 short int var4 /* : Bool */;
1598 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1599 {
1600 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
1601 var4 = var1 == 0l;
1602 var2 = var4;
1603 goto RET_LABEL3;
1604 RET_LABEL3:(void)0;
1605 }
1606 }
1607 var = var2;
1608 goto RET_LABEL;
1609 RET_LABEL:;
1610 return var;
1611 }
1612 /* method hash_collection#HashMap#[]= for (self: HashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
1613 void standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1) {
1614 short int var /* : Bool */;
1615 int cltype;
1616 int idtype;
1617 const struct type* type_struct;
1618 short int is_nullable;
1619 const char* var_class_name;
1620 short int var1 /* : Bool */;
1621 int cltype2;
1622 int idtype3;
1623 const struct type* type_struct4;
1624 short int is_nullable5;
1625 const char* var_class_name6;
1626 val* var_key /* var key: nullable Object */;
1627 val* var_v /* var v: nullable Object */;
1628 long var7 /* : Int */;
1629 long var_i /* var i: Int */;
1630 val* var8 /* : nullable HashNode[nullable Object] */;
1631 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1632 short int var9 /* : Bool */;
1633 short int var10 /* : Bool */;
1634 val* var_other /* var other: nullable Object */;
1635 short int var12 /* : Bool */;
1636 short int var13 /* : Bool */;
1637 val* var14 /* : HashMapNode[nullable Object, nullable Object] */;
1638 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1639 /* <p0:nullable Object> isa K */
1640 type_struct = self->type->resolution_table->types[COLOR_standard__HashMap___35dK];
1641 cltype = type_struct->color;
1642 idtype = type_struct->id;
1643 is_nullable = type_struct->is_nullable;
1644 if(p0 == NULL) {
1645 var = is_nullable;
1646 } else {
1647 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1648 var = 0;
1649 } else {
1650 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1651 }
1652 }
1653 if (unlikely(!var)) {
1654 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1655 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
1656 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 254);
1657 fatal_exit(1);
1658 }
1659 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
1660 /* <p1:nullable Object> isa V */
1661 type_struct4 = self->type->resolution_table->types[COLOR_standard__HashMap___35dV];
1662 cltype2 = type_struct4->color;
1663 idtype3 = type_struct4->id;
1664 is_nullable5 = type_struct4->is_nullable;
1665 if(p1 == NULL) {
1666 var1 = is_nullable5;
1667 } else {
1668 if(cltype2 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
1669 var1 = 0;
1670 } else {
1671 var1 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype2] == idtype3;
1672 }
1673 }
1674 if (unlikely(!var1)) {
1675 var_class_name6 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
1676 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6);
1677 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 254);
1678 fatal_exit(1);
1679 }
1680 var_key = p0;
1681 var_v = p1;
1682 {
1683 var7 = standard__hash_collection___standard__hash_collection__HashCollection___index_at(self, var_key);
1684 }
1685 var_i = var7;
1686 {
1687 var8 = standard__hash_collection___standard__hash_collection__HashCollection___node_at_idx(self, var_i, var_key);
1688 }
1689 var_c = var8;
1690 if (var_c == NULL) {
1691 var9 = 0; /* is null */
1692 } else {
1693 var9 = 1; /* arg is null and recv is not */
1694 }
1695 if (0) {
1696 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1697 var_other = ((val*)NULL);
1698 {
1699 var12 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1700 }
1701 var13 = !var12;
1702 var10 = var13;
1703 goto RET_LABEL11;
1704 RET_LABEL11:(void)0;
1705 }
1706 var9 = var10;
1707 }
1708 if (var9){
1709 var_c->attrs[COLOR_standard__hash_collection__HashNode___key].val = var_key; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1710 var_c->attrs[COLOR_standard__hash_collection__HashMapNode___value].val = var_v; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1711 } else {
1712 var14 = NEW_standard__hash_collection__HashMapNode(self->type->resolution_table->types[COLOR_standard__hash_collection__HashMapNode__standard__HashMap___35dK__standard__HashMap___35dV]);
1713 {
1714 ((void(*)(val* self, val* p0))(var14->class->vft[COLOR_standard__hash_collection__HashNode__key_61d]))(var14, var_key); /* key= on <var14:HashMapNode[nullable Object, nullable Object]>*/
1715 }
1716 {
1717 ((void(*)(val* self, val* p0))(var14->class->vft[COLOR_standard__hash_collection__HashMapNode__value_61d]))(var14, var_v); /* value= on <var14:HashMapNode[nullable Object, nullable Object]>*/
1718 }
1719 {
1720 ((void(*)(val* self))(var14->class->vft[COLOR_standard__kernel__Object__init]))(var14); /* init on <var14:HashMapNode[nullable Object, nullable Object]>*/
1721 }
1722 {
1723 standard__hash_collection___standard__hash_collection__HashCollection___store(self, var_i, var14); /* Direct call hash_collection#HashCollection#store on <self:HashMap[nullable Object, nullable Object]>*/
1724 }
1725 }
1726 RET_LABEL:;
1727 }
1728 /* method hash_collection#HashMap#clear for (self: HashMap[nullable Object, nullable Object]) */
1729 void standard___standard__HashMap___standard__abstract_collection__Map__clear(val* self) {
1730 {
1731 standard__hash_collection___standard__hash_collection__HashCollection___raz(self); /* Direct call hash_collection#HashCollection#raz on <self:HashMap[nullable Object, nullable Object]>*/
1732 }
1733 RET_LABEL:;
1734 }
1735 /* method hash_collection#HashMap#init for (self: HashMap[nullable Object, nullable Object]) */
1736 void standard___standard__HashMap___standard__kernel__Object__init(val* self) {
1737 {
1738 ((void(*)(val* self))(self->class->vft[COLOR_standard___standard__HashMap___standard__kernel__Object__init]))(self); /* init on <self:HashMap[nullable Object, nullable Object]>*/
1739 }
1740 self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l = 0l; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1741 self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1742 {
1743 standard__hash_collection___standard__hash_collection__HashCollection___enlarge(self, 0l); /* Direct call hash_collection#HashCollection#enlarge on <self:HashMap[nullable Object, nullable Object]>*/
1744 }
1745 RET_LABEL:;
1746 }
1747 /* method hash_collection#HashMap#keys for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1748 val* standard___standard__HashMap___standard__abstract_collection__MapRead__keys(val* self) {
1749 val* var /* : RemovableCollection[nullable Object] */;
1750 short int var1 /* : Bool */;
1751 val* var2 /* : RemovableCollection[nullable Object] */;
1752 val* var3 /* : HashMapKeys[nullable Object, nullable Object] */;
1753 var1 = self->attrs[COLOR_standard__hash_collection__HashMap___keys].val != NULL; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1754 if(likely(var1)) {
1755 var2 = self->attrs[COLOR_standard__hash_collection__HashMap___keys].val; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1756 if (unlikely(var2 == NULL)) {
1757 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
1758 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 275);
1759 fatal_exit(1);
1760 }
1761 } else {
1762 var3 = NEW_standard__hash_collection__HashMapKeys(self->type->resolution_table->types[COLOR_standard__hash_collection__HashMapKeys__standard__HashMap___35dK__standard__HashMap___35dV]);
1763 {
1764 ((void(*)(val* self, val* p0))(var3->class->vft[COLOR_standard__hash_collection__HashMapKeys__map_61d]))(var3, self); /* map= on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1765 }
1766 {
1767 ((void(*)(val* self))(var3->class->vft[COLOR_standard__kernel__Object__init]))(var3); /* init on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1768 }
1769 self->attrs[COLOR_standard__hash_collection__HashMap___keys].val = var3; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1770 var2 = var3;
1771 }
1772 var = var2;
1773 RET_LABEL:;
1774 return var;
1775 }
1776 /* method hash_collection#HashMap#values for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1777 val* standard___standard__HashMap___standard__abstract_collection__MapRead__values(val* self) {
1778 val* var /* : RemovableCollection[nullable Object] */;
1779 short int var1 /* : Bool */;
1780 val* var2 /* : RemovableCollection[nullable Object] */;
1781 val* var3 /* : HashMapValues[nullable Object, nullable Object] */;
1782 var1 = self->attrs[COLOR_standard__hash_collection__HashMap___values].val != NULL; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1783 if(likely(var1)) {
1784 var2 = self->attrs[COLOR_standard__hash_collection__HashMap___values].val; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1785 if (unlikely(var2 == NULL)) {
1786 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
1787 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 276);
1788 fatal_exit(1);
1789 }
1790 } else {
1791 var3 = NEW_standard__hash_collection__HashMapValues(self->type->resolution_table->types[COLOR_standard__hash_collection__HashMapValues__standard__HashMap___35dK__standard__HashMap___35dV]);
1792 {
1793 ((void(*)(val* self, val* p0))(var3->class->vft[COLOR_standard__hash_collection__HashMapValues__map_61d]))(var3, self); /* map= on <var3:HashMapValues[nullable Object, nullable Object]>*/
1794 }
1795 {
1796 ((void(*)(val* self))(var3->class->vft[COLOR_standard__kernel__Object__init]))(var3); /* init on <var3:HashMapValues[nullable Object, nullable Object]>*/
1797 }
1798 self->attrs[COLOR_standard__hash_collection__HashMap___values].val = var3; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1799 var2 = var3;
1800 }
1801 var = var2;
1802 RET_LABEL:;
1803 return var;
1804 }
1805 /* method hash_collection#HashMap#has_key for (self: HashMap[nullable Object, nullable Object], nullable Object): Bool */
1806 short int standard___standard__HashMap___standard__abstract_collection__MapRead__has_key(val* self, val* p0) {
1807 short int var /* : Bool */;
1808 val* var_k /* var k: nullable Object */;
1809 val* var1 /* : nullable HashNode[nullable Object] */;
1810 short int var2 /* : Bool */;
1811 short int var3 /* : Bool */;
1812 val* var_other /* var other: nullable Object */;
1813 short int var5 /* : Bool */;
1814 short int var6 /* : Bool */;
1815 var_k = p0;
1816 {
1817 var1 = standard__hash_collection___standard__hash_collection__HashCollection___node_at(self, var_k);
1818 }
1819 if (var1 == NULL) {
1820 var2 = 0; /* is null */
1821 } else {
1822 var2 = 1; /* arg is null and recv is not */
1823 }
1824 if (0) {
1825 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1826 var_other = ((val*)NULL);
1827 {
1828 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1829 }
1830 var6 = !var5;
1831 var3 = var6;
1832 goto RET_LABEL4;
1833 RET_LABEL4:(void)0;
1834 }
1835 var2 = var3;
1836 }
1837 var = var2;
1838 goto RET_LABEL;
1839 RET_LABEL:;
1840 return var;
1841 }
1842 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
1843 val* standard__hash_collection___standard__hash_collection__HashMapKeys___map(val* self) {
1844 val* var /* : HashMap[nullable Object, nullable Object] */;
1845 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1846 var1 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1847 if (unlikely(var1 == NULL)) {
1848 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1849 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
1850 fatal_exit(1);
1851 }
1852 var = var1;
1853 RET_LABEL:;
1854 return var;
1855 }
1856 /* method hash_collection#HashMapKeys#map= for (self: HashMapKeys[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
1857 void standard__hash_collection___standard__hash_collection__HashMapKeys___map_61d(val* self, val* p0) {
1858 short int var /* : Bool */;
1859 int cltype;
1860 int idtype;
1861 const struct type* type_struct;
1862 const char* var_class_name;
1863 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1864 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1865 type_struct = self->type->resolution_table->types[COLOR_standard__HashMap__standard__hash_collection__HashMapKeys___35dK__standard__hash_collection__HashMapKeys___35dV];
1866 cltype = type_struct->color;
1867 idtype = type_struct->id;
1868 if(cltype >= p0->type->table_size) {
1869 var = 0;
1870 } else {
1871 var = p0->type->type_table[cltype] == idtype;
1872 }
1873 if (unlikely(!var)) {
1874 var_class_name = p0 == NULL ? "null" : p0->type->name;
1875 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
1876 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
1877 fatal_exit(1);
1878 }
1879 self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val = p0; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1880 RET_LABEL:;
1881 }
1882 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[nullable Object, nullable Object]): nullable Object */
1883 val* standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__Collection__first(val* self) {
1884 val* var /* : nullable Object */;
1885 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1886 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1887 val* var4 /* : nullable HashNode[nullable Object] */;
1888 val* var5 /* : nullable Object */;
1889 {
1890 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1891 var3 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1892 if (unlikely(var3 == NULL)) {
1893 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1894 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
1895 fatal_exit(1);
1896 }
1897 var1 = var3;
1898 RET_LABEL2:(void)0;
1899 }
1900 }
1901 var4 = var1->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
1902 if (unlikely(var4 == NULL)) {
1903 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1904 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 287);
1905 fatal_exit(1);
1906 }
1907 var5 = var4->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1908 var = var5;
1909 goto RET_LABEL;
1910 RET_LABEL:;
1911 return var;
1912 }
1913 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Bool */
1914 short int standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__Collection__has(val* self, val* p0) {
1915 short int var /* : Bool */;
1916 val* var_k /* var k: nullable Object */;
1917 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1918 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1919 val* var4 /* : nullable HashNode[nullable Object] */;
1920 short int var5 /* : Bool */;
1921 short int var6 /* : Bool */;
1922 val* var_other /* var other: nullable Object */;
1923 short int var8 /* : Bool */;
1924 short int var9 /* : Bool */;
1925 var_k = p0;
1926 {
1927 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1928 var3 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1929 if (unlikely(var3 == NULL)) {
1930 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1931 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
1932 fatal_exit(1);
1933 }
1934 var1 = var3;
1935 RET_LABEL2:(void)0;
1936 }
1937 }
1938 {
1939 var4 = standard__hash_collection___standard__hash_collection__HashCollection___node_at(var1, var_k);
1940 }
1941 if (var4 == NULL) {
1942 var5 = 0; /* is null */
1943 } else {
1944 var5 = 1; /* arg is null and recv is not */
1945 }
1946 if (0) {
1947 { /* Inline kernel#Object#!= (var4,((val*)NULL)) on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1948 var_other = ((val*)NULL);
1949 {
1950 var8 = ((short int(*)(val* self, val* p0))(var4->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var4, var_other); /* == on <var4:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1951 }
1952 var9 = !var8;
1953 var6 = var9;
1954 goto RET_LABEL7;
1955 RET_LABEL7:(void)0;
1956 }
1957 var5 = var6;
1958 }
1959 var = var5;
1960 goto RET_LABEL;
1961 RET_LABEL:;
1962 return var;
1963 }
1964 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[nullable Object, nullable Object]): Bool */
1965 short int standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__Collection__is_empty(val* self) {
1966 short int var /* : Bool */;
1967 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1968 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1969 short int var4 /* : Bool */;
1970 {
1971 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1972 var3 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1973 if (unlikely(var3 == NULL)) {
1974 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1975 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
1976 fatal_exit(1);
1977 }
1978 var1 = var3;
1979 RET_LABEL2:(void)0;
1980 }
1981 }
1982 {
1983 var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__is_empty(var1);
1984 }
1985 var = var4;
1986 goto RET_LABEL;
1987 RET_LABEL:;
1988 return var;
1989 }
1990 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[nullable Object, nullable Object]): Int */
1991 long standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__Collection__length(val* self) {
1992 long var /* : Int */;
1993 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1994 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1995 long var4 /* : Int */;
1996 {
1997 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1998 var3 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1999 if (unlikely(var3 == NULL)) {
2000 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2001 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
2002 fatal_exit(1);
2003 }
2004 var1 = var3;
2005 RET_LABEL2:(void)0;
2006 }
2007 }
2008 {
2009 var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__length(var1);
2010 }
2011 var = var4;
2012 goto RET_LABEL;
2013 RET_LABEL:;
2014 return var;
2015 }
2016 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */
2017 val* standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__Collection__iterator(val* self) {
2018 val* var /* : Iterator[nullable Object] */;
2019 val* var1 /* : MapKeysIterator[nullable Object, nullable Object] */;
2020 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2021 val* var4 /* : HashMap[nullable Object, nullable Object] */;
2022 val* var5 /* : HashMapIterator[nullable Object, nullable Object] */;
2023 var1 = NEW_standard__MapKeysIterator(self->type->resolution_table->types[COLOR_standard__MapKeysIterator__standard__hash_collection__HashMapKeys___35dK__standard__hash_collection__HashMapKeys___35dV]);
2024 {
2025 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2026 var4 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2027 if (unlikely(var4 == NULL)) {
2028 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2029 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
2030 fatal_exit(1);
2031 }
2032 var2 = var4;
2033 RET_LABEL3:(void)0;
2034 }
2035 }
2036 {
2037 var5 = standard___standard__HashMap___standard__abstract_collection__MapRead__iterator(var2);
2038 }
2039 {
2040 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__abstract_collection__MapKeysIterator__original_iterator_61d]))(var1, var5); /* original_iterator= on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2041 }
2042 {
2043 ((void(*)(val* self))(var1->class->vft[COLOR_standard__kernel__Object__init]))(var1); /* init on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2044 }
2045 var = var1;
2046 goto RET_LABEL;
2047 RET_LABEL:;
2048 return var;
2049 }
2050 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[nullable Object, nullable Object]) */
2051 void standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__RemovableCollection__clear(val* self) {
2052 val* var /* : HashMap[nullable Object, nullable Object] */;
2053 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2054 {
2055 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2056 var2 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2057 if (unlikely(var2 == NULL)) {
2058 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2059 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
2060 fatal_exit(1);
2061 }
2062 var = var2;
2063 RET_LABEL1:(void)0;
2064 }
2065 }
2066 {
2067 standard___standard__HashMap___standard__abstract_collection__Map__clear(var); /* Direct call hash_collection#HashMap#clear on <var:HashMap[nullable Object, nullable Object]>*/
2068 }
2069 RET_LABEL:;
2070 }
2071 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[nullable Object, nullable Object], nullable Object) */
2072 void standard__hash_collection___standard__hash_collection__HashMapKeys___standard__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
2073 val* var_key /* var key: nullable Object */;
2074 val* var /* : HashMap[nullable Object, nullable Object] */;
2075 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2076 var_key = p0;
2077 {
2078 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2079 var2 = self->attrs[COLOR_standard__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2080 if (unlikely(var2 == NULL)) {
2081 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2082 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 283);
2083 fatal_exit(1);
2084 }
2085 var = var2;
2086 RET_LABEL1:(void)0;
2087 }
2088 }
2089 {
2090 standard__hash_collection___standard__hash_collection__HashCollection___remove_node(var, var_key); /* Direct call hash_collection#HashCollection#remove_node on <var:HashMap[nullable Object, nullable Object]>*/
2091 }
2092 RET_LABEL:;
2093 }
2094 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[nullable Object, nullable Object]) */
2095 void standard__hash_collection___standard__hash_collection__HashMapKeys___standard__kernel__Object__init(val* self) {
2096 {
2097 ((void(*)(val* self))(self->class->vft[COLOR_standard__hash_collection___standard__hash_collection__HashMapKeys___standard__kernel__Object__init]))(self); /* init on <self:HashMapKeys[nullable Object, nullable Object]>*/
2098 }
2099 RET_LABEL:;
2100 }
2101 /* method hash_collection#HashMapValues#map for (self: HashMapValues[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2102 val* standard__hash_collection___standard__hash_collection__HashMapValues___map(val* self) {
2103 val* var /* : HashMap[nullable Object, nullable Object] */;
2104 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2105 var1 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2106 if (unlikely(var1 == NULL)) {
2107 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2108 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2109 fatal_exit(1);
2110 }
2111 var = var1;
2112 RET_LABEL:;
2113 return var;
2114 }
2115 /* method hash_collection#HashMapValues#map= for (self: HashMapValues[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2116 void standard__hash_collection___standard__hash_collection__HashMapValues___map_61d(val* self, val* p0) {
2117 short int var /* : Bool */;
2118 int cltype;
2119 int idtype;
2120 const struct type* type_struct;
2121 const char* var_class_name;
2122 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2123 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2124 type_struct = self->type->resolution_table->types[COLOR_standard__HashMap__standard__hash_collection__HashMapValues___35dK__standard__hash_collection__HashMapValues___35dV];
2125 cltype = type_struct->color;
2126 idtype = type_struct->id;
2127 if(cltype >= p0->type->table_size) {
2128 var = 0;
2129 } else {
2130 var = p0->type->type_table[cltype] == idtype;
2131 }
2132 if (unlikely(!var)) {
2133 var_class_name = p0 == NULL ? "null" : p0->type->name;
2134 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
2135 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2136 fatal_exit(1);
2137 }
2138 self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val = p0; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2139 RET_LABEL:;
2140 }
2141 /* method hash_collection#HashMapValues#first for (self: HashMapValues[nullable Object, nullable Object]): nullable Object */
2142 val* standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__Collection__first(val* self) {
2143 val* var /* : nullable Object */;
2144 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2145 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2146 val* var4 /* : nullable HashNode[nullable Object] */;
2147 val* var5 /* : nullable Object */;
2148 {
2149 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2150 var3 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2151 if (unlikely(var3 == NULL)) {
2152 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2153 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2154 fatal_exit(1);
2155 }
2156 var1 = var3;
2157 RET_LABEL2:(void)0;
2158 }
2159 }
2160 var4 = var1->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2161 if (unlikely(var4 == NULL)) {
2162 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2163 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 317);
2164 fatal_exit(1);
2165 }
2166 var5 = var4->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
2167 var = var5;
2168 goto RET_LABEL;
2169 RET_LABEL:;
2170 return var;
2171 }
2172 /* method hash_collection#HashMapValues#has for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Bool */
2173 short int standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__Collection__has(val* self, val* p0) {
2174 short int var /* : Bool */;
2175 val* var_item /* var item: nullable Object */;
2176 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2177 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2178 val* var4 /* : nullable HashNode[nullable Object] */;
2179 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2180 short int var5 /* : Bool */;
2181 short int var6 /* : Bool */;
2182 val* var_other /* var other: nullable Object */;
2183 short int var8 /* : Bool */;
2184 short int var9 /* : Bool */;
2185 val* var10 /* : nullable Object */;
2186 short int var11 /* : Bool */;
2187 short int var12 /* : Bool */;
2188 val* var13 /* : nullable HashNode[nullable Object] */;
2189 var_item = p0;
2190 {
2191 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2192 var3 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2193 if (unlikely(var3 == NULL)) {
2194 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2195 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2196 fatal_exit(1);
2197 }
2198 var1 = var3;
2199 RET_LABEL2:(void)0;
2200 }
2201 }
2202 var4 = var1->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2203 var_c = var4;
2204 for(;;) {
2205 if (var_c == NULL) {
2206 var5 = 0; /* is null */
2207 } else {
2208 var5 = 1; /* arg is null and recv is not */
2209 }
2210 if (0) {
2211 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2212 var_other = ((val*)NULL);
2213 {
2214 var8 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2215 }
2216 var9 = !var8;
2217 var6 = var9;
2218 goto RET_LABEL7;
2219 RET_LABEL7:(void)0;
2220 }
2221 var5 = var6;
2222 }
2223 if (var5){
2224 var10 = var_c->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2225 if (var10 == NULL) {
2226 var11 = (var_item == NULL);
2227 } else {
2228 var12 = ((short int(*)(val* self, val* p0))((((long)var10&3)?class_info[((long)var10&3)]:var10->class)->vft[COLOR_standard__kernel__Object___61d_61d]))(var10, var_item); /* == on <var10:nullable Object>*/
2229 var11 = var12;
2230 }
2231 if (var11){
2232 var = 1;
2233 goto RET_LABEL;
2234 } else {
2235 }
2236 var13 = var_c->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2237 var_c = var13;
2238 } else {
2239 goto BREAK_label;
2240 }
2241 }
2242 BREAK_label: (void)0;
2243 var = 0;
2244 goto RET_LABEL;
2245 RET_LABEL:;
2246 return var;
2247 }
2248 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[nullable Object, nullable Object]): Bool */
2249 short int standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__Collection__is_empty(val* self) {
2250 short int var /* : Bool */;
2251 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2252 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2253 short int var4 /* : Bool */;
2254 {
2255 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2256 var3 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2257 if (unlikely(var3 == NULL)) {
2258 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2259 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2260 fatal_exit(1);
2261 }
2262 var1 = var3;
2263 RET_LABEL2:(void)0;
2264 }
2265 }
2266 {
2267 var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__is_empty(var1);
2268 }
2269 var = var4;
2270 goto RET_LABEL;
2271 RET_LABEL:;
2272 return var;
2273 }
2274 /* method hash_collection#HashMapValues#length for (self: HashMapValues[nullable Object, nullable Object]): Int */
2275 long standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__Collection__length(val* self) {
2276 long var /* : Int */;
2277 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2278 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2279 long var4 /* : Int */;
2280 {
2281 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2282 var3 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2283 if (unlikely(var3 == NULL)) {
2284 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2285 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2286 fatal_exit(1);
2287 }
2288 var1 = var3;
2289 RET_LABEL2:(void)0;
2290 }
2291 }
2292 {
2293 var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__length(var1);
2294 }
2295 var = var4;
2296 goto RET_LABEL;
2297 RET_LABEL:;
2298 return var;
2299 }
2300 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */
2301 val* standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__Collection__iterator(val* self) {
2302 val* var /* : Iterator[nullable Object] */;
2303 val* var1 /* : MapValuesIterator[nullable Object, nullable Object] */;
2304 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2305 val* var4 /* : HashMap[nullable Object, nullable Object] */;
2306 val* var5 /* : HashMapIterator[nullable Object, nullable Object] */;
2307 var1 = NEW_standard__MapValuesIterator(self->type->resolution_table->types[COLOR_standard__MapValuesIterator__standard__hash_collection__HashMapValues___35dK__standard__hash_collection__HashMapValues___35dV]);
2308 {
2309 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2310 var4 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2311 if (unlikely(var4 == NULL)) {
2312 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2313 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2314 fatal_exit(1);
2315 }
2316 var2 = var4;
2317 RET_LABEL3:(void)0;
2318 }
2319 }
2320 {
2321 var5 = standard___standard__HashMap___standard__abstract_collection__MapRead__iterator(var2);
2322 }
2323 {
2324 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__abstract_collection__MapValuesIterator__original_iterator_61d]))(var1, var5); /* original_iterator= on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2325 }
2326 {
2327 ((void(*)(val* self))(var1->class->vft[COLOR_standard__kernel__Object__init]))(var1); /* init on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2328 }
2329 var = var1;
2330 goto RET_LABEL;
2331 RET_LABEL:;
2332 return var;
2333 }
2334 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[nullable Object, nullable Object]) */
2335 void standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__RemovableCollection__clear(val* self) {
2336 val* var /* : HashMap[nullable Object, nullable Object] */;
2337 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2338 {
2339 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2340 var2 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2341 if (unlikely(var2 == NULL)) {
2342 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2343 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2344 fatal_exit(1);
2345 }
2346 var = var2;
2347 RET_LABEL1:(void)0;
2348 }
2349 }
2350 {
2351 standard___standard__HashMap___standard__abstract_collection__Map__clear(var); /* Direct call hash_collection#HashMap#clear on <var:HashMap[nullable Object, nullable Object]>*/
2352 }
2353 RET_LABEL:;
2354 }
2355 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[nullable Object, nullable Object], nullable Object) */
2356 void standard__hash_collection___standard__hash_collection__HashMapValues___standard__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
2357 val* var_item /* var item: nullable Object */;
2358 val* var /* : HashMap[nullable Object, nullable Object] */;
2359 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2360 val* var_map /* var map: HashMap[nullable Object, nullable Object] */;
2361 val* var3 /* : nullable HashNode[nullable Object] */;
2362 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2363 short int var4 /* : Bool */;
2364 short int var5 /* : Bool */;
2365 val* var_other /* var other: nullable Object */;
2366 short int var7 /* : Bool */;
2367 short int var8 /* : Bool */;
2368 val* var9 /* : nullable Object */;
2369 short int var10 /* : Bool */;
2370 short int var11 /* : Bool */;
2371 val* var12 /* : nullable Object */;
2372 val* var13 /* : nullable HashNode[nullable Object] */;
2373 var_item = p0;
2374 {
2375 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2376 var2 = self->attrs[COLOR_standard__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2377 if (unlikely(var2 == NULL)) {
2378 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2379 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 304);
2380 fatal_exit(1);
2381 }
2382 var = var2;
2383 RET_LABEL1:(void)0;
2384 }
2385 }
2386 var_map = var;
2387 var3 = var_map->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var_map:HashMap[nullable Object, nullable Object]> */
2388 var_c = var3;
2389 for(;;) {
2390 if (var_c == NULL) {
2391 var4 = 0; /* is null */
2392 } else {
2393 var4 = 1; /* arg is null and recv is not */
2394 }
2395 if (0) {
2396 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2397 var_other = ((val*)NULL);
2398 {
2399 var7 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2400 }
2401 var8 = !var7;
2402 var5 = var8;
2403 goto RET_LABEL6;
2404 RET_LABEL6:(void)0;
2405 }
2406 var4 = var5;
2407 }
2408 if (var4){
2409 var9 = var_c->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2410 if (var9 == NULL) {
2411 var10 = (var_item == NULL);
2412 } else {
2413 var11 = ((short int(*)(val* self, val* p0))((((long)var9&3)?class_info[((long)var9&3)]:var9->class)->vft[COLOR_standard__kernel__Object___61d_61d]))(var9, var_item); /* == on <var9:nullable Object>*/
2414 var10 = var11;
2415 }
2416 if (var10){
2417 var12 = var_c->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2418 {
2419 standard__hash_collection___standard__hash_collection__HashCollection___remove_node(var_map, var12); /* Direct call hash_collection#HashCollection#remove_node on <var_map:HashMap[nullable Object, nullable Object]>*/
2420 }
2421 goto RET_LABEL;
2422 } else {
2423 }
2424 var13 = var_c->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2425 var_c = var13;
2426 } else {
2427 goto BREAK_label;
2428 }
2429 }
2430 BREAK_label: (void)0;
2431 RET_LABEL:;
2432 }
2433 /* method hash_collection#HashMapValues#init for (self: HashMapValues[nullable Object, nullable Object]) */
2434 void standard__hash_collection___standard__hash_collection__HashMapValues___standard__kernel__Object__init(val* self) {
2435 {
2436 ((void(*)(val* self))(self->class->vft[COLOR_standard__hash_collection___standard__hash_collection__HashMapValues___standard__kernel__Object__init]))(self); /* init on <self:HashMapValues[nullable Object, nullable Object]>*/
2437 }
2438 RET_LABEL:;
2439 }
2440 /* method hash_collection#HashMapNode#value= for (self: HashMapNode[nullable Object, nullable Object], nullable Object) */
2441 void standard__hash_collection___standard__hash_collection__HashMapNode___value_61d(val* self, val* p0) {
2442 short int var /* : Bool */;
2443 int cltype;
2444 int idtype;
2445 const struct type* type_struct;
2446 short int is_nullable;
2447 const char* var_class_name;
2448 /* Covariant cast for argument 0 (value) <p0:nullable Object> isa V */
2449 /* <p0:nullable Object> isa V */
2450 type_struct = self->type->resolution_table->types[COLOR_standard__hash_collection__HashMapNode___35dV];
2451 cltype = type_struct->color;
2452 idtype = type_struct->id;
2453 is_nullable = type_struct->is_nullable;
2454 if(p0 == NULL) {
2455 var = is_nullable;
2456 } else {
2457 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2458 var = 0;
2459 } else {
2460 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2461 }
2462 }
2463 if (unlikely(!var)) {
2464 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2465 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name);
2466 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 375);
2467 fatal_exit(1);
2468 }
2469 self->attrs[COLOR_standard__hash_collection__HashMapNode___value].val = p0; /* _value on <self:HashMapNode[nullable Object, nullable Object]> */
2470 RET_LABEL:;
2471 }
2472 /* method hash_collection#HashMapNode#init for (self: HashMapNode[nullable Object, nullable Object]) */
2473 void standard__hash_collection___standard__hash_collection__HashMapNode___standard__kernel__Object__init(val* self) {
2474 {
2475 ((void(*)(val* self))(self->class->vft[COLOR_standard__hash_collection___standard__hash_collection__HashMapNode___standard__kernel__Object__init]))(self); /* init on <self:HashMapNode[nullable Object, nullable Object]>*/
2476 }
2477 RET_LABEL:;
2478 }
2479 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[nullable Object, nullable Object]): Bool */
2480 short int standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__is_ok(val* self) {
2481 short int var /* : Bool */;
2482 val* var1 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2483 short int var2 /* : Bool */;
2484 short int var3 /* : Bool */;
2485 val* var_other /* var other: nullable Object */;
2486 short int var5 /* : Bool */;
2487 short int var6 /* : Bool */;
2488 var1 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2489 if (var1 == NULL) {
2490 var2 = 0; /* is null */
2491 } else {
2492 var2 = 1; /* arg is null and recv is not */
2493 }
2494 if (0) {
2495 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2496 var_other = ((val*)NULL);
2497 {
2498 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2499 }
2500 var6 = !var5;
2501 var3 = var6;
2502 goto RET_LABEL4;
2503 RET_LABEL4:(void)0;
2504 }
2505 var2 = var3;
2506 }
2507 var = var2;
2508 goto RET_LABEL;
2509 RET_LABEL:;
2510 return var;
2511 }
2512 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2513 val* standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__item(val* self) {
2514 val* var /* : nullable Object */;
2515 short int var1 /* : Bool */;
2516 val* var2 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2517 val* var3 /* : nullable Object */;
2518 {
2519 var1 = standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__is_ok(self);
2520 }
2521 if (unlikely(!var1)) {
2522 PRINT_ERROR("Runtime error: %s", "Assert failed");
2523 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 385);
2524 fatal_exit(1);
2525 }
2526 var2 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2527 if (unlikely(var2 == NULL)) {
2528 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2529 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 386);
2530 fatal_exit(1);
2531 }
2532 var3 = var2->attrs[COLOR_standard__hash_collection__HashMapNode___value].val; /* _value on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2533 var = var3;
2534 goto RET_LABEL;
2535 RET_LABEL:;
2536 return var;
2537 }
2538 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2539 val* standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__key(val* self) {
2540 val* var /* : nullable Object */;
2541 short int var1 /* : Bool */;
2542 val* var2 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2543 val* var3 /* : nullable Object */;
2544 {
2545 var1 = standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__is_ok(self);
2546 }
2547 if (unlikely(!var1)) {
2548 PRINT_ERROR("Runtime error: %s", "Assert failed");
2549 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 397);
2550 fatal_exit(1);
2551 }
2552 var2 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2553 if (unlikely(var2 == NULL)) {
2554 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2555 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 398);
2556 fatal_exit(1);
2557 }
2558 var3 = var2->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2559 var = var3;
2560 goto RET_LABEL;
2561 RET_LABEL:;
2562 return var;
2563 }
2564 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[nullable Object, nullable Object]) */
2565 void standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__next(val* self) {
2566 short int var /* : Bool */;
2567 val* var1 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2568 val* var2 /* : nullable HashNode[nullable Object] */;
2569 {
2570 var = standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__is_ok(self);
2571 }
2572 if (unlikely(!var)) {
2573 PRINT_ERROR("Runtime error: %s", "Assert failed");
2574 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 403);
2575 fatal_exit(1);
2576 }
2577 var1 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2578 if (unlikely(var1 == NULL)) {
2579 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2580 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 404);
2581 fatal_exit(1);
2582 }
2583 var2 = var1->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2584 self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val = var2; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2585 RET_LABEL:;
2586 }
2587 /* method hash_collection#HashMapIterator#map for (self: HashMapIterator[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2588 val* standard___standard__HashMapIterator___map(val* self) {
2589 val* var /* : HashMap[nullable Object, nullable Object] */;
2590 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2591 var1 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2592 if (unlikely(var1 == NULL)) {
2593 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2594 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 407);
2595 fatal_exit(1);
2596 }
2597 var = var1;
2598 RET_LABEL:;
2599 return var;
2600 }
2601 /* method hash_collection#HashMapIterator#map= for (self: HashMapIterator[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2602 void standard___standard__HashMapIterator___map_61d(val* self, val* p0) {
2603 short int var /* : Bool */;
2604 int cltype;
2605 int idtype;
2606 const struct type* type_struct;
2607 const char* var_class_name;
2608 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2609 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2610 type_struct = self->type->resolution_table->types[COLOR_standard__HashMap__standard__HashMapIterator___35dK__standard__HashMapIterator___35dV];
2611 cltype = type_struct->color;
2612 idtype = type_struct->id;
2613 if(cltype >= p0->type->table_size) {
2614 var = 0;
2615 } else {
2616 var = p0->type->type_table[cltype] == idtype;
2617 }
2618 if (unlikely(!var)) {
2619 var_class_name = p0 == NULL ? "null" : p0->type->name;
2620 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
2621 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 407);
2622 fatal_exit(1);
2623 }
2624 self->attrs[COLOR_standard__hash_collection__HashMapIterator___map].val = p0; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2625 RET_LABEL:;
2626 }
2627 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[nullable Object, nullable Object]) */
2628 void standard___standard__HashMapIterator___standard__kernel__Object__init(val* self) {
2629 val* var /* : HashMap[nullable Object, nullable Object] */;
2630 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2631 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2632 val* var4 /* : nullable HashNode[nullable Object] */;
2633 {
2634 { /* Inline hash_collection#HashMapIterator#map (self) on <self:HashMapIterator[nullable Object, nullable Object]> */
2635 var2 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2636 if (unlikely(var2 == NULL)) {
2637 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2638 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 407);
2639 fatal_exit(1);
2640 }
2641 var = var2;
2642 RET_LABEL1:(void)0;
2643 }
2644 }
2645 self->attrs[COLOR_standard__hash_collection__HashMapIterator___map].val = var; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2646 var3 = self->attrs[COLOR_standard__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2647 if (unlikely(var3 == NULL)) {
2648 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2649 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 416);
2650 fatal_exit(1);
2651 }
2652 var4 = var3->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var3:HashMap[nullable Object, nullable Object]> */
2653 self->attrs[COLOR_standard__hash_collection__HashMapIterator___node].val = var4; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2654 RET_LABEL:;
2655 }
2656 /* method hash_collection#HashSet#length for (self: HashSet[nullable Object]): Int */
2657 long standard___standard__HashSet___standard__abstract_collection__Collection__length(val* self) {
2658 long var /* : Int */;
2659 long var1 /* : Int */;
2660 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2661 var = var1;
2662 goto RET_LABEL;
2663 RET_LABEL:;
2664 return var;
2665 }
2666 /* method hash_collection#HashSet#is_empty for (self: HashSet[nullable Object]): Bool */
2667 short int standard___standard__HashSet___standard__abstract_collection__Collection__is_empty(val* self) {
2668 short int var /* : Bool */;
2669 long var1 /* : Int */;
2670 short int var2 /* : Bool */;
2671 short int var4 /* : Bool */;
2672 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2673 {
2674 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
2675 var4 = var1 == 0l;
2676 var2 = var4;
2677 goto RET_LABEL3;
2678 RET_LABEL3:(void)0;
2679 }
2680 }
2681 var = var2;
2682 goto RET_LABEL;
2683 RET_LABEL:;
2684 return var;
2685 }
2686 /* method hash_collection#HashSet#first for (self: HashSet[nullable Object]): nullable Object */
2687 val* standard___standard__HashSet___standard__abstract_collection__Collection__first(val* self) {
2688 val* var /* : nullable Object */;
2689 long var1 /* : Int */;
2690 short int var2 /* : Bool */;
2691 short int var4 /* : Bool */;
2692 int cltype;
2693 int idtype;
2694 const char* var_class_name;
2695 short int var5 /* : Bool */;
2696 val* var6 /* : nullable HashNode[nullable Object] */;
2697 val* var7 /* : nullable Object */;
2698 var1 = self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2699 {
2700 { /* Inline kernel#Int#> (var1,0l) on <var1:Int> */
2701 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
2702 /* <0l:Int> isa OTHER */
2703 var4 = 1; /* easy <0l:Int> isa OTHER*/
2704 if (unlikely(!var4)) {
2705 var_class_name = type_standard__Int.name;
2706 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
2707 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel, 536);
2708 fatal_exit(1);
2709 }
2710 var5 = var1 > 0l;
2711 var2 = var5;
2712 goto RET_LABEL3;
2713 RET_LABEL3:(void)0;
2714 }
2715 }
2716 if (unlikely(!var2)) {
2717 PRINT_ERROR("Runtime error: %s", "Assert failed");
2718 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 434);
2719 fatal_exit(1);
2720 }
2721 var6 = self->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashSet[nullable Object]> */
2722 if (unlikely(var6 == NULL)) {
2723 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2724 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 435);
2725 fatal_exit(1);
2726 }
2727 var7 = var6->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var6:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2728 var = var7;
2729 goto RET_LABEL;
2730 RET_LABEL:;
2731 return var;
2732 }
2733 /* method hash_collection#HashSet#has for (self: HashSet[nullable Object], nullable Object): Bool */
2734 short int standard___standard__HashSet___standard__abstract_collection__Collection__has(val* self, val* p0) {
2735 short int var /* : Bool */;
2736 val* var_item /* var item: nullable Object */;
2737 val* var1 /* : nullable HashNode[nullable Object] */;
2738 short int var2 /* : Bool */;
2739 short int var3 /* : Bool */;
2740 val* var_other /* var other: nullable Object */;
2741 short int var5 /* : Bool */;
2742 short int var6 /* : Bool */;
2743 var_item = p0;
2744 {
2745 var1 = standard__hash_collection___standard__hash_collection__HashCollection___node_at(self, var_item);
2746 }
2747 if (var1 == NULL) {
2748 var2 = 0; /* is null */
2749 } else {
2750 var2 = 1; /* arg is null and recv is not */
2751 }
2752 if (0) {
2753 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2754 var_other = ((val*)NULL);
2755 {
2756 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
2757 }
2758 var6 = !var5;
2759 var3 = var6;
2760 goto RET_LABEL4;
2761 RET_LABEL4:(void)0;
2762 }
2763 var2 = var3;
2764 }
2765 var = var2;
2766 goto RET_LABEL;
2767 RET_LABEL:;
2768 return var;
2769 }
2770 /* method hash_collection#HashSet#add for (self: HashSet[nullable Object], nullable Object) */
2771 void standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(val* self, val* p0) {
2772 short int var /* : Bool */;
2773 int cltype;
2774 int idtype;
2775 const struct type* type_struct;
2776 short int is_nullable;
2777 const char* var_class_name;
2778 val* var_item /* var item: nullable Object */;
2779 long var1 /* : Int */;
2780 long var_i /* var i: Int */;
2781 val* var2 /* : nullable HashNode[nullable Object] */;
2782 val* var_c /* var c: nullable HashSetNode[nullable Object] */;
2783 short int var3 /* : Bool */;
2784 short int var4 /* : Bool */;
2785 val* var_other /* var other: nullable Object */;
2786 short int var6 /* : Bool */;
2787 short int var7 /* : Bool */;
2788 val* var8 /* : HashSetNode[nullable Object] */;
2789 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2790 /* <p0:nullable Object> isa E */
2791 type_struct = self->type->resolution_table->types[COLOR_standard__HashSet___35dE];
2792 cltype = type_struct->color;
2793 idtype = type_struct->id;
2794 is_nullable = type_struct->is_nullable;
2795 if(p0 == NULL) {
2796 var = is_nullable;
2797 } else {
2798 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2799 var = 0;
2800 } else {
2801 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2802 }
2803 }
2804 if (unlikely(!var)) {
2805 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2806 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
2807 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 443);
2808 fatal_exit(1);
2809 }
2810 var_item = p0;
2811 {
2812 var1 = standard__hash_collection___standard__hash_collection__HashCollection___index_at(self, var_item);
2813 }
2814 var_i = var1;
2815 {
2816 var2 = standard__hash_collection___standard__hash_collection__HashCollection___node_at_idx(self, var_i, var_item);
2817 }
2818 var_c = var2;
2819 if (var_c == NULL) {
2820 var3 = 0; /* is null */
2821 } else {
2822 var3 = 1; /* arg is null and recv is not */
2823 }
2824 if (0) {
2825 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashSetNode[nullable Object]> */
2826 var_other = ((val*)NULL);
2827 {
2828 var6 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
2829 }
2830 var7 = !var6;
2831 var4 = var7;
2832 goto RET_LABEL5;
2833 RET_LABEL5:(void)0;
2834 }
2835 var3 = var4;
2836 }
2837 if (var3){
2838 var_c->attrs[COLOR_standard__hash_collection__HashNode___key].val = var_item; /* _key on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])> */
2839 } else {
2840 var8 = NEW_standard__hash_collection__HashSetNode(self->type->resolution_table->types[COLOR_standard__hash_collection__HashSetNode__standard__HashSet___35dE]);
2841 {
2842 ((void(*)(val* self, val* p0))(var8->class->vft[COLOR_standard__hash_collection__HashNode__key_61d]))(var8, var_item); /* key= on <var8:HashSetNode[nullable Object]>*/
2843 }
2844 {
2845 ((void(*)(val* self))(var8->class->vft[COLOR_standard__kernel__Object__init]))(var8); /* init on <var8:HashSetNode[nullable Object]>*/
2846 }
2847 {
2848 standard__hash_collection___standard__hash_collection__HashCollection___store(self, var_i, var8); /* Direct call hash_collection#HashCollection#store on <self:HashSet[nullable Object]>*/
2849 }
2850 }
2851 RET_LABEL:;
2852 }
2853 /* method hash_collection#HashSet#remove for (self: HashSet[nullable Object], nullable Object) */
2854 void standard___standard__HashSet___standard__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
2855 val* var_item /* var item: nullable Object */;
2856 var_item = p0;
2857 {
2858 standard__hash_collection___standard__hash_collection__HashCollection___remove_node(self, var_item); /* Direct call hash_collection#HashCollection#remove_node on <self:HashSet[nullable Object]>*/
2859 }
2860 RET_LABEL:;
2861 }
2862 /* method hash_collection#HashSet#clear for (self: HashSet[nullable Object]) */
2863 void standard___standard__HashSet___standard__abstract_collection__RemovableCollection__clear(val* self) {
2864 {
2865 standard__hash_collection___standard__hash_collection__HashCollection___raz(self); /* Direct call hash_collection#HashCollection#raz on <self:HashSet[nullable Object]>*/
2866 }
2867 RET_LABEL:;
2868 }
2869 /* method hash_collection#HashSet#iterator for (self: HashSet[nullable Object]): Iterator[nullable Object] */
2870 val* standard___standard__HashSet___standard__abstract_collection__Collection__iterator(val* self) {
2871 val* var /* : Iterator[nullable Object] */;
2872 val* var1 /* : HashSetIterator[nullable Object] */;
2873 var1 = NEW_standard__hash_collection__HashSetIterator(self->type->resolution_table->types[COLOR_standard__hash_collection__HashSetIterator__standard__HashSet___35dE]);
2874 {
2875 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__hash_collection__HashSetIterator__set_61d]))(var1, self); /* set= on <var1:HashSetIterator[nullable Object]>*/
2876 }
2877 {
2878 ((void(*)(val* self))(var1->class->vft[COLOR_standard__kernel__Object__init]))(var1); /* init on <var1:HashSetIterator[nullable Object]>*/
2879 }
2880 var = var1;
2881 goto RET_LABEL;
2882 RET_LABEL:;
2883 return var;
2884 }
2885 /* method hash_collection#HashSet#init for (self: HashSet[nullable Object]) */
2886 void standard___standard__HashSet___standard__kernel__Object__init(val* self) {
2887 {
2888 ((void(*)(val* self))(self->class->vft[COLOR_standard___standard__HashSet___standard__kernel__Object__init]))(self); /* init on <self:HashSet[nullable Object]>*/
2889 }
2890 self->attrs[COLOR_standard__hash_collection__HashCollection___capacity].l = 0l; /* _capacity on <self:HashSet[nullable Object]> */
2891 self->attrs[COLOR_standard__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashSet[nullable Object]> */
2892 {
2893 standard__hash_collection___standard__hash_collection__HashCollection___enlarge(self, 0l); /* Direct call hash_collection#HashCollection#enlarge on <self:HashSet[nullable Object]>*/
2894 }
2895 RET_LABEL:;
2896 }
2897 /* method hash_collection#HashSet#from for (self: HashSet[nullable Object], Collection[nullable Object]) */
2898 void standard___standard__HashSet___from(val* self, val* p0) {
2899 short int var /* : Bool */;
2900 int cltype;
2901 int idtype;
2902 const struct type* type_struct;
2903 const char* var_class_name;
2904 val* var_coll /* var coll: Collection[nullable Object] */;
2905 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
2906 /* <p0:Collection[nullable Object]> isa Collection[E] */
2907 type_struct = self->type->resolution_table->types[COLOR_standard__Collection__standard__HashSet___35dE];
2908 cltype = type_struct->color;
2909 idtype = type_struct->id;
2910 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2911 var = 0;
2912 } else {
2913 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2914 }
2915 if (unlikely(!var)) {
2916 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2917 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name);
2918 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 467);
2919 fatal_exit(1);
2920 }
2921 var_coll = p0;
2922 {
2923 standard___standard__HashSet___standard__kernel__Object__init(self); /* Direct call hash_collection#HashSet#init on <self:HashSet[nullable Object]>*/
2924 }
2925 {
2926 standard___standard__SimpleCollection___add_all(self, var_coll); /* Direct call abstract_collection#SimpleCollection#add_all on <self:HashSet[nullable Object]>*/
2927 }
2928 RET_LABEL:;
2929 }
2930 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[nullable Object]): Bool */
2931 short int standard__hash_collection___standard__hash_collection__HashSetIterator___standard__abstract_collection__Iterator__is_ok(val* self) {
2932 short int var /* : Bool */;
2933 val* var1 /* : nullable HashSetNode[nullable Object] */;
2934 short int var2 /* : Bool */;
2935 short int var3 /* : Bool */;
2936 val* var_other /* var other: nullable Object */;
2937 short int var5 /* : Bool */;
2938 short int var6 /* : Bool */;
2939 var1 = self->attrs[COLOR_standard__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
2940 if (var1 == NULL) {
2941 var2 = 0; /* is null */
2942 } else {
2943 var2 = 1; /* arg is null and recv is not */
2944 }
2945 if (0) {
2946 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashSetNode[nullable Object]> */
2947 var_other = ((val*)NULL);
2948 {
2949 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
2950 }
2951 var6 = !var5;
2952 var3 = var6;
2953 goto RET_LABEL4;
2954 RET_LABEL4:(void)0;
2955 }
2956 var2 = var3;
2957 }
2958 var = var2;
2959 goto RET_LABEL;
2960 RET_LABEL:;
2961 return var;
2962 }
2963 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[nullable Object]): nullable Object */
2964 val* standard__hash_collection___standard__hash_collection__HashSetIterator___standard__abstract_collection__Iterator__item(val* self) {
2965 val* var /* : nullable Object */;
2966 short int var1 /* : Bool */;
2967 val* var2 /* : nullable HashSetNode[nullable Object] */;
2968 val* var3 /* : nullable Object */;
2969 {
2970 var1 = standard__hash_collection___standard__hash_collection__HashSetIterator___standard__abstract_collection__Iterator__is_ok(self);
2971 }
2972 if (unlikely(!var1)) {
2973 PRINT_ERROR("Runtime error: %s", "Assert failed");
2974 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 487);
2975 fatal_exit(1);
2976 }
2977 var2 = self->attrs[COLOR_standard__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
2978 if (unlikely(var2 == NULL)) {
2979 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2980 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 488);
2981 fatal_exit(1);
2982 }
2983 var3 = var2->attrs[COLOR_standard__hash_collection__HashNode___key].val; /* _key on <var2:nullable HashSetNode[nullable Object]> */
2984 var = var3;
2985 goto RET_LABEL;
2986 RET_LABEL:;
2987 return var;
2988 }
2989 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[nullable Object]) */
2990 void standard__hash_collection___standard__hash_collection__HashSetIterator___standard__abstract_collection__Iterator__next(val* self) {
2991 short int var /* : Bool */;
2992 val* var1 /* : nullable HashSetNode[nullable Object] */;
2993 val* var2 /* : nullable HashNode[nullable Object] */;
2994 {
2995 var = standard__hash_collection___standard__hash_collection__HashSetIterator___standard__abstract_collection__Iterator__is_ok(self);
2996 }
2997 if (unlikely(!var)) {
2998 PRINT_ERROR("Runtime error: %s", "Assert failed");
2999 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 493);
3000 fatal_exit(1);
3001 }
3002 var1 = self->attrs[COLOR_standard__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
3003 if (unlikely(var1 == NULL)) {
3004 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3005 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 494);
3006 fatal_exit(1);
3007 }
3008 var2 = var1->attrs[COLOR_standard__hash_collection__HashNode___next_item].val; /* _next_item on <var1:nullable HashSetNode[nullable Object]> */
3009 self->attrs[COLOR_standard__hash_collection__HashSetIterator___node].val = var2; /* _node on <self:HashSetIterator[nullable Object]> */
3010 RET_LABEL:;
3011 }
3012 /* method hash_collection#HashSetIterator#set= for (self: HashSetIterator[nullable Object], HashSet[nullable Object]) */
3013 void standard__hash_collection___standard__hash_collection__HashSetIterator___set_61d(val* self, val* p0) {
3014 short int var /* : Bool */;
3015 int cltype;
3016 int idtype;
3017 const struct type* type_struct;
3018 const char* var_class_name;
3019 /* Covariant cast for argument 0 (set) <p0:HashSet[nullable Object]> isa HashSet[E] */
3020 /* <p0:HashSet[nullable Object]> isa HashSet[E] */
3021 type_struct = self->type->resolution_table->types[COLOR_standard__HashSet__standard__hash_collection__HashSetIterator___35dE];
3022 cltype = type_struct->color;
3023 idtype = type_struct->id;
3024 if(cltype >= p0->type->table_size) {
3025 var = 0;
3026 } else {
3027 var = p0->type->type_table[cltype] == idtype;
3028 }
3029 if (unlikely(!var)) {
3030 var_class_name = p0 == NULL ? "null" : p0->type->name;
3031 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[E]", var_class_name);
3032 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 497);
3033 fatal_exit(1);
3034 }
3035 self->attrs[COLOR_standard__hash_collection__HashSetIterator___set].val = p0; /* _set on <self:HashSetIterator[nullable Object]> */
3036 RET_LABEL:;
3037 }
3038 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[nullable Object]) */
3039 void standard__hash_collection___standard__hash_collection__HashSetIterator___standard__kernel__Object__init(val* self) {
3040 val* var /* : HashSet[nullable Object] */;
3041 val* var1 /* : nullable HashNode[nullable Object] */;
3042 var = self->attrs[COLOR_standard__hash_collection__HashSetIterator___set].val; /* _set on <self:HashSetIterator[nullable Object]> */
3043 if (unlikely(var == NULL)) {
3044 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _set");
3045 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection, 505);
3046 fatal_exit(1);
3047 }
3048 var1 = var->attrs[COLOR_standard__hash_collection__HashCollection___first_item].val; /* _first_item on <var:HashSet[nullable Object]> */
3049 self->attrs[COLOR_standard__hash_collection__HashSetIterator___node].val = var1; /* _node on <self:HashSetIterator[nullable Object]> */
3050 RET_LABEL:;
3051 }