Merge: doc: fixed some typos and other misc. corrections
[nit.git] / c_src / poset.sep.1.c
1 #include "poset.sep.0.h"
2 /* method poset$POSet$iterator for (self: POSet[nullable Object]): Iterator[nullable Object] */
3 val* poset___poset__POSet___core__abstract_collection__Collection__iterator(val* self) {
4 val* var /* : Iterator[nullable Object] */;
5 val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
6 val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
7 val* var4 /* : RemovableCollection[nullable Object] */;
8 val* var5 /* : Iterator[nullable Object] */;
9 {
10 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
11 var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
12 if (unlikely(var3 == NULL)) {
13 if(catchStack.cursor >= 0){
14 longjmp(catchStack.envs[catchStack.cursor], 1);
15 }
16 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
17 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
18 fatal_exit(1);
19 }
20 var1 = var3;
21 RET_LABEL2:(void)0;
22 }
23 }
24 {
25 var4 = core___core__HashMap___core__abstract_collection__MapRead__keys(var1);
26 }
27 {
28 var5 = ((val*(*)(val* self))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_core__abstract_collection__Collection__iterator]))(var4); /* iterator on <var4:RemovableCollection[nullable Object]>*/
29 }
30 var = var5;
31 goto RET_LABEL;
32 RET_LABEL:;
33 return var;
34 }
35 /* method poset$POSet$elements for (self: POSet[nullable Object]): HashMap[nullable Object, POSetElement[nullable Object]] */
36 val* poset___poset__POSet___elements(val* self) {
37 val* var /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
38 val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
39 var1 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
40 if (unlikely(var1 == NULL)) {
41 if(catchStack.cursor >= 0){
42 longjmp(catchStack.envs[catchStack.cursor], 1);
43 }
44 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
45 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
46 fatal_exit(1);
47 }
48 var = var1;
49 RET_LABEL:;
50 return var;
51 }
52 /* method poset$POSet$has for (self: POSet[nullable Object], nullable Object): Bool */
53 short int poset___poset__POSet___core__abstract_collection__Collection__has(val* self, val* p0) {
54 short int var /* : Bool */;
55 val* var_e /* var e: nullable Object */;
56 val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
57 val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
58 val* var4 /* : RemovableCollection[nullable Object] */;
59 short int var5 /* : Bool */;
60 var_e = p0;
61 {
62 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
63 var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
64 if (unlikely(var3 == NULL)) {
65 if(catchStack.cursor >= 0){
66 longjmp(catchStack.envs[catchStack.cursor], 1);
67 }
68 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
69 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
70 fatal_exit(1);
71 }
72 var1 = var3;
73 RET_LABEL2:(void)0;
74 }
75 }
76 {
77 var4 = core___core__HashMap___core__abstract_collection__MapRead__keys(var1);
78 }
79 {
80 var5 = ((short int(*)(val* self, val* p0))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var4, var_e); /* has on <var4:RemovableCollection[nullable Object]>*/
81 }
82 var = var5;
83 goto RET_LABEL;
84 RET_LABEL:;
85 return var;
86 }
87 /* method poset$POSet$add_node for (self: POSet[nullable Object], nullable Object): POSetElement[nullable Object] */
88 val* poset___poset__POSet___add_node(val* self, val* p0) {
89 val* var /* : POSetElement[nullable Object] */;
90 short int var1 /* : Bool */;
91 int cltype;
92 int idtype;
93 const struct type* type_struct;
94 short int is_nullable;
95 const char* var_class_name;
96 val* var_e /* var e: nullable Object */;
97 val* var2 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
98 val* var4 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
99 val* var5 /* : RemovableCollection[nullable Object] */;
100 short int var6 /* : Bool */;
101 val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
102 val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
103 val* var10 /* : nullable Object */;
104 val* var11 /* : POSetElement[nullable Object] */;
105 val* var12 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
106 val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
107 long var15 /* : Int */;
108 val* var_poe /* var poe: POSetElement[nullable Object] */;
109 val* var16 /* : HashSet[nullable Object] */;
110 val* var18 /* : HashSet[nullable Object] */;
111 val* var19 /* : HashSet[nullable Object] */;
112 val* var21 /* : HashSet[nullable Object] */;
113 val* var22 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
114 val* var24 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
115 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
116 /* <p0:nullable Object> isa E */
117 type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
118 cltype = type_struct->color;
119 idtype = type_struct->id;
120 is_nullable = type_struct->is_nullable;
121 if(p0 == NULL) {
122 var1 = is_nullable;
123 } else {
124 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
125 var1 = 0;
126 } else {
127 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
128 }
129 }
130 if (unlikely(!var1)) {
131 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
132 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
133 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 91);
134 fatal_exit(1);
135 }
136 var_e = p0;
137 {
138 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
139 var4 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
140 if (unlikely(var4 == NULL)) {
141 if(catchStack.cursor >= 0){
142 longjmp(catchStack.envs[catchStack.cursor], 1);
143 }
144 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
145 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
146 fatal_exit(1);
147 }
148 var2 = var4;
149 RET_LABEL3:(void)0;
150 }
151 }
152 {
153 var5 = core___core__HashMap___core__abstract_collection__MapRead__keys(var2);
154 }
155 {
156 var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var5, var_e); /* has on <var5:RemovableCollection[nullable Object]>*/
157 }
158 if (var6){
159 {
160 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
161 var9 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
162 if (unlikely(var9 == NULL)) {
163 if(catchStack.cursor >= 0){
164 longjmp(catchStack.envs[catchStack.cursor], 1);
165 }
166 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
167 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
168 fatal_exit(1);
169 }
170 var7 = var9;
171 RET_LABEL8:(void)0;
172 }
173 }
174 {
175 var10 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var7, var_e);
176 }
177 var = var10;
178 goto RET_LABEL;
179 } else {
180 }
181 var11 = NEW_poset__POSetElement(self->type->resolution_table->types[COLOR_poset__POSetElement__poset__POSet___35dE]);
182 {
183 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
184 var14 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
185 if (unlikely(var14 == NULL)) {
186 if(catchStack.cursor >= 0){
187 longjmp(catchStack.envs[catchStack.cursor], 1);
188 }
189 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
190 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
191 fatal_exit(1);
192 }
193 var12 = var14;
194 RET_LABEL13:(void)0;
195 }
196 }
197 {
198 var15 = core___core__HashMap___core__abstract_collection__MapRead__length(var12);
199 }
200 {
201 ((void(*)(val* self, val* p0))(var11->class->vft[COLOR_poset__POSetElement__poset_61d]))(var11, self); /* poset= on <var11:POSetElement[nullable Object]>*/
202 }
203 {
204 ((void(*)(val* self, val* p0))(var11->class->vft[COLOR_poset__POSetElement__element_61d]))(var11, var_e); /* element= on <var11:POSetElement[nullable Object]>*/
205 }
206 {
207 ((void(*)(val* self, long p0))(var11->class->vft[COLOR_poset__POSetElement__count_61d]))(var11, var15); /* count= on <var11:POSetElement[nullable Object]>*/
208 }
209 {
210 ((void(*)(val* self))(var11->class->vft[COLOR_core__kernel__Object__init]))(var11); /* init on <var11:POSetElement[nullable Object]>*/
211 }
212 var_poe = var11;
213 {
214 { /* Inline poset$POSetElement$tos (var_poe) on <var_poe:POSetElement[nullable Object]> */
215 var18 = var_poe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_poe:POSetElement[nullable Object]> */
216 if (unlikely(var18 == NULL)) {
217 if(catchStack.cursor >= 0){
218 longjmp(catchStack.envs[catchStack.cursor], 1);
219 }
220 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
221 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
222 fatal_exit(1);
223 }
224 var16 = var18;
225 RET_LABEL17:(void)0;
226 }
227 }
228 {
229 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var16, var_e); /* Direct call hash_collection$HashSet$add on <var16:HashSet[nullable Object]>*/
230 }
231 {
232 { /* Inline poset$POSetElement$froms (var_poe) on <var_poe:POSetElement[nullable Object]> */
233 var21 = var_poe->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <var_poe:POSetElement[nullable Object]> */
234 if (unlikely(var21 == NULL)) {
235 if(catchStack.cursor >= 0){
236 longjmp(catchStack.envs[catchStack.cursor], 1);
237 }
238 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
239 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
240 fatal_exit(1);
241 }
242 var19 = var21;
243 RET_LABEL20:(void)0;
244 }
245 }
246 {
247 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var19, var_e); /* Direct call hash_collection$HashSet$add on <var19:HashSet[nullable Object]>*/
248 }
249 {
250 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
251 var24 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
252 if (unlikely(var24 == NULL)) {
253 if(catchStack.cursor >= 0){
254 longjmp(catchStack.envs[catchStack.cursor], 1);
255 }
256 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
257 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
258 fatal_exit(1);
259 }
260 var22 = var24;
261 RET_LABEL23:(void)0;
262 }
263 }
264 {
265 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(var22, var_e, var_poe); /* Direct call hash_collection$HashMap$[]= on <var22:HashMap[nullable Object, POSetElement[nullable Object]]>*/
266 }
267 var = var_poe;
268 goto RET_LABEL;
269 RET_LABEL:;
270 return var;
271 }
272 /* method poset$POSet$[] for (self: POSet[nullable Object], nullable Object): POSetElement[nullable Object] */
273 val* poset___poset__POSet____91d_93d(val* self, val* p0) {
274 val* var /* : POSetElement[nullable Object] */;
275 short int var1 /* : Bool */;
276 int cltype;
277 int idtype;
278 const struct type* type_struct;
279 short int is_nullable;
280 const char* var_class_name;
281 val* var_e /* var e: nullable Object */;
282 val* var2 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
283 val* var4 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
284 val* var5 /* : RemovableCollection[nullable Object] */;
285 short int var6 /* : Bool */;
286 val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
287 val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
288 val* var10 /* : nullable Object */;
289 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
290 /* <p0:nullable Object> isa E */
291 type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
292 cltype = type_struct->color;
293 idtype = type_struct->id;
294 is_nullable = type_struct->is_nullable;
295 if(p0 == NULL) {
296 var1 = is_nullable;
297 } else {
298 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
299 var1 = 0;
300 } else {
301 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
302 }
303 }
304 if (unlikely(!var1)) {
305 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
306 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
307 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 105);
308 fatal_exit(1);
309 }
310 var_e = p0;
311 {
312 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
313 var4 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
314 if (unlikely(var4 == NULL)) {
315 if(catchStack.cursor >= 0){
316 longjmp(catchStack.envs[catchStack.cursor], 1);
317 }
318 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
319 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
320 fatal_exit(1);
321 }
322 var2 = var4;
323 RET_LABEL3:(void)0;
324 }
325 }
326 {
327 var5 = core___core__HashMap___core__abstract_collection__MapRead__keys(var2);
328 }
329 {
330 var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var5, var_e); /* has on <var5:RemovableCollection[nullable Object]>*/
331 }
332 if (unlikely(!var6)) {
333 if(catchStack.cursor >= 0){
334 longjmp(catchStack.envs[catchStack.cursor], 1);
335 }
336 PRINT_ERROR("Runtime error: %s", "Assert failed");
337 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 119);
338 fatal_exit(1);
339 }
340 {
341 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
342 var9 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
343 if (unlikely(var9 == NULL)) {
344 if(catchStack.cursor >= 0){
345 longjmp(catchStack.envs[catchStack.cursor], 1);
346 }
347 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
348 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
349 fatal_exit(1);
350 }
351 var7 = var9;
352 RET_LABEL8:(void)0;
353 }
354 }
355 {
356 var10 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var7, var_e);
357 }
358 var = var10;
359 goto RET_LABEL;
360 RET_LABEL:;
361 return var;
362 }
363 /* method poset$POSet$add_edge for (self: POSet[nullable Object], nullable Object, nullable Object) */
364 void poset___poset__POSet___add_edge(val* self, val* p0, val* p1) {
365 short int var /* : Bool */;
366 int cltype;
367 int idtype;
368 const struct type* type_struct;
369 short int is_nullable;
370 const char* var_class_name;
371 short int var1 /* : Bool */;
372 int cltype2;
373 int idtype3;
374 const struct type* type_struct4;
375 short int is_nullable5;
376 const char* var_class_name6;
377 val* var_f /* var f: nullable Object */;
378 val* var_t /* var t: nullable Object */;
379 val* var7 /* : POSetElement[nullable Object] */;
380 val* var_fe /* var fe: POSetElement[nullable Object] */;
381 val* var8 /* : POSetElement[nullable Object] */;
382 val* var_te /* var te: POSetElement[nullable Object] */;
383 val* var9 /* : HashSet[nullable Object] */;
384 val* var11 /* : HashSet[nullable Object] */;
385 short int var12 /* : Bool */;
386 val* var13 /* : HashSet[nullable Object] */;
387 val* var15 /* : HashSet[nullable Object] */;
388 val* var_ /* var : HashSet[nullable Object] */;
389 val* var16 /* : Iterator[nullable Object] */;
390 val* var_17 /* var : Iterator[nullable Object] */;
391 short int var18 /* : Bool */;
392 val* var19 /* : nullable Object */;
393 val* var_ff /* var ff: nullable Object */;
394 val* var20 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
395 val* var22 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
396 val* var23 /* : nullable Object */;
397 val* var_ffe /* var ffe: POSetElement[nullable Object] */;
398 val* var24 /* : HashSet[nullable Object] */;
399 val* var26 /* : HashSet[nullable Object] */;
400 val* var_27 /* var : HashSet[nullable Object] */;
401 val* var28 /* : Iterator[nullable Object] */;
402 val* var_29 /* var : Iterator[nullable Object] */;
403 short int var30 /* : Bool */;
404 val* var32 /* : nullable Object */;
405 val* var_tt /* var tt: nullable Object */;
406 val* var33 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
407 val* var35 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
408 val* var36 /* : nullable Object */;
409 val* var_tte /* var tte: POSetElement[nullable Object] */;
410 val* var37 /* : HashSet[nullable Object] */;
411 val* var39 /* : HashSet[nullable Object] */;
412 val* var40 /* : HashSet[nullable Object] */;
413 val* var42 /* : HashSet[nullable Object] */;
414 val* var43 /* : HashSet[nullable Object] */;
415 val* var45 /* : HashSet[nullable Object] */;
416 short int var46 /* : Bool */;
417 val* var_to_remove /* var to_remove: nullable Array[nullable Object] */;
418 val* var47 /* : HashSet[nullable Object] */;
419 val* var49 /* : HashSet[nullable Object] */;
420 val* var_50 /* var : HashSet[nullable Object] */;
421 val* var51 /* : Iterator[nullable Object] */;
422 val* var_52 /* var : Iterator[nullable Object] */;
423 short int var53 /* : Bool */;
424 val* var55 /* : nullable Object */;
425 val* var_x /* var x: nullable Object */;
426 val* var56 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
427 val* var58 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
428 val* var59 /* : nullable Object */;
429 val* var_xe /* var xe: POSetElement[nullable Object] */;
430 val* var60 /* : HashSet[nullable Object] */;
431 val* var62 /* : HashSet[nullable Object] */;
432 short int var63 /* : Bool */;
433 short int var64 /* : Bool */;
434 short int var65 /* : Bool */;
435 val* var66 /* : Array[nullable Object] */;
436 val* var67 /* : HashSet[nullable Object] */;
437 val* var69 /* : HashSet[nullable Object] */;
438 short int var70 /* : Bool */;
439 short int var71 /* : Bool */;
440 val* var_other /* var other: nullable Object */;
441 short int var73 /* : Bool */;
442 short int var74 /* : Bool */;
443 val* var_75 /* var : Array[nullable Object] */;
444 val* var76 /* : IndexedIterator[nullable Object] */;
445 val* var_77 /* var : IndexedIterator[nullable Object] */;
446 short int var78 /* : Bool */;
447 val* var80 /* : nullable Object */;
448 val* var_x81 /* var x: nullable Object */;
449 val* var82 /* : HashSet[nullable Object] */;
450 val* var84 /* : HashSet[nullable Object] */;
451 val* var85 /* : HashSet[nullable Object] */;
452 val* var87 /* : HashSet[nullable Object] */;
453 val* var_88 /* var : HashSet[nullable Object] */;
454 val* var89 /* : Iterator[nullable Object] */;
455 val* var_90 /* var : Iterator[nullable Object] */;
456 short int var91 /* : Bool */;
457 val* var93 /* : nullable Object */;
458 val* var_x94 /* var x: nullable Object */;
459 val* var95 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
460 val* var97 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
461 val* var98 /* : nullable Object */;
462 val* var_xe99 /* var xe: POSetElement[nullable Object] */;
463 val* var100 /* : HashSet[nullable Object] */;
464 val* var102 /* : HashSet[nullable Object] */;
465 short int var103 /* : Bool */;
466 val* var104 /* : HashSet[nullable Object] */;
467 val* var106 /* : HashSet[nullable Object] */;
468 short int var107 /* : Bool */;
469 short int var108 /* : Bool */;
470 val* var109 /* : Array[nullable Object] */;
471 short int var110 /* : Bool */;
472 short int var111 /* : Bool */;
473 short int var113 /* : Bool */;
474 short int var114 /* : Bool */;
475 val* var_115 /* var : Array[nullable Object] */;
476 val* var116 /* : IndexedIterator[nullable Object] */;
477 val* var_117 /* var : IndexedIterator[nullable Object] */;
478 short int var118 /* : Bool */;
479 val* var120 /* : nullable Object */;
480 val* var_x121 /* var x: nullable Object */;
481 val* var122 /* : HashSet[nullable Object] */;
482 val* var124 /* : HashSet[nullable Object] */;
483 val* var125 /* : HashSet[nullable Object] */;
484 val* var127 /* : HashSet[nullable Object] */;
485 val* var128 /* : HashSet[nullable Object] */;
486 val* var130 /* : HashSet[nullable Object] */;
487 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa E */
488 /* <p0:nullable Object> isa E */
489 type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
490 cltype = type_struct->color;
491 idtype = type_struct->id;
492 is_nullable = type_struct->is_nullable;
493 if(p0 == NULL) {
494 var = is_nullable;
495 } else {
496 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
497 var = 0;
498 } else {
499 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
500 }
501 }
502 if (unlikely(!var)) {
503 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
504 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
505 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 123);
506 fatal_exit(1);
507 }
508 /* Covariant cast for argument 1 (t) <p1:nullable Object> isa E */
509 /* <p1:nullable Object> isa E */
510 type_struct4 = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
511 cltype2 = type_struct4->color;
512 idtype3 = type_struct4->id;
513 is_nullable5 = type_struct4->is_nullable;
514 if(p1 == NULL) {
515 var1 = is_nullable5;
516 } else {
517 if(cltype2 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
518 var1 = 0;
519 } else {
520 var1 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype2] == idtype3;
521 }
522 }
523 if (unlikely(!var1)) {
524 var_class_name6 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
525 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name6);
526 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 123);
527 fatal_exit(1);
528 }
529 var_f = p0;
530 var_t = p1;
531 {
532 var7 = poset___poset__POSet___add_node(self, var_f);
533 }
534 var_fe = var7;
535 {
536 var8 = poset___poset__POSet___add_node(self, var_t);
537 }
538 var_te = var8;
539 {
540 { /* Inline poset$POSetElement$tos (var_fe) on <var_fe:POSetElement[nullable Object]> */
541 var11 = var_fe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_fe:POSetElement[nullable Object]> */
542 if (unlikely(var11 == NULL)) {
543 if(catchStack.cursor >= 0){
544 longjmp(catchStack.envs[catchStack.cursor], 1);
545 }
546 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
547 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
548 fatal_exit(1);
549 }
550 var9 = var11;
551 RET_LABEL10:(void)0;
552 }
553 }
554 {
555 var12 = core___core__HashSet___core__abstract_collection__Collection__has(var9, var_t);
556 }
557 if (var12){
558 goto RET_LABEL;
559 } else {
560 }
561 {
562 { /* Inline poset$POSetElement$froms (var_fe) on <var_fe:POSetElement[nullable Object]> */
563 var15 = var_fe->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <var_fe:POSetElement[nullable Object]> */
564 if (unlikely(var15 == NULL)) {
565 if(catchStack.cursor >= 0){
566 longjmp(catchStack.envs[catchStack.cursor], 1);
567 }
568 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
569 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
570 fatal_exit(1);
571 }
572 var13 = var15;
573 RET_LABEL14:(void)0;
574 }
575 }
576 var_ = var13;
577 {
578 var16 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_);
579 }
580 var_17 = var16;
581 for(;;) {
582 {
583 var18 = ((short int(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_17); /* is_ok on <var_17:Iterator[nullable Object]>*/
584 }
585 if (var18){
586 } else {
587 goto BREAK_label;
588 }
589 {
590 var19 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_17); /* item on <var_17:Iterator[nullable Object]>*/
591 }
592 var_ff = var19;
593 {
594 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
595 var22 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
596 if (unlikely(var22 == NULL)) {
597 if(catchStack.cursor >= 0){
598 longjmp(catchStack.envs[catchStack.cursor], 1);
599 }
600 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
601 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
602 fatal_exit(1);
603 }
604 var20 = var22;
605 RET_LABEL21:(void)0;
606 }
607 }
608 {
609 var23 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var20, var_ff);
610 }
611 var_ffe = var23;
612 {
613 { /* Inline poset$POSetElement$tos (var_te) on <var_te:POSetElement[nullable Object]> */
614 var26 = var_te->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_te:POSetElement[nullable Object]> */
615 if (unlikely(var26 == NULL)) {
616 if(catchStack.cursor >= 0){
617 longjmp(catchStack.envs[catchStack.cursor], 1);
618 }
619 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
620 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
621 fatal_exit(1);
622 }
623 var24 = var26;
624 RET_LABEL25:(void)0;
625 }
626 }
627 var_27 = var24;
628 {
629 var28 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_27);
630 }
631 var_29 = var28;
632 for(;;) {
633 {
634 var30 = ((short int(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_29); /* is_ok on <var_29:Iterator[nullable Object]>*/
635 }
636 if (var30){
637 } else {
638 goto BREAK_label31;
639 }
640 {
641 var32 = ((val*(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_29); /* item on <var_29:Iterator[nullable Object]>*/
642 }
643 var_tt = var32;
644 {
645 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
646 var35 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
647 if (unlikely(var35 == NULL)) {
648 if(catchStack.cursor >= 0){
649 longjmp(catchStack.envs[catchStack.cursor], 1);
650 }
651 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
652 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
653 fatal_exit(1);
654 }
655 var33 = var35;
656 RET_LABEL34:(void)0;
657 }
658 }
659 {
660 var36 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var33, var_tt);
661 }
662 var_tte = var36;
663 {
664 { /* Inline poset$POSetElement$froms (var_tte) on <var_tte:POSetElement[nullable Object]> */
665 var39 = var_tte->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <var_tte:POSetElement[nullable Object]> */
666 if (unlikely(var39 == NULL)) {
667 if(catchStack.cursor >= 0){
668 longjmp(catchStack.envs[catchStack.cursor], 1);
669 }
670 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
671 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
672 fatal_exit(1);
673 }
674 var37 = var39;
675 RET_LABEL38:(void)0;
676 }
677 }
678 {
679 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var37, var_ff); /* Direct call hash_collection$HashSet$add on <var37:HashSet[nullable Object]>*/
680 }
681 {
682 { /* Inline poset$POSetElement$tos (var_ffe) on <var_ffe:POSetElement[nullable Object]> */
683 var42 = var_ffe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_ffe:POSetElement[nullable Object]> */
684 if (unlikely(var42 == NULL)) {
685 if(catchStack.cursor >= 0){
686 longjmp(catchStack.envs[catchStack.cursor], 1);
687 }
688 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
689 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
690 fatal_exit(1);
691 }
692 var40 = var42;
693 RET_LABEL41:(void)0;
694 }
695 }
696 {
697 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var40, var_tt); /* Direct call hash_collection$HashSet$add on <var40:HashSet[nullable Object]>*/
698 }
699 {
700 ((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_29); /* next on <var_29:Iterator[nullable Object]>*/
701 }
702 }
703 BREAK_label31: (void)0;
704 {
705 ((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_29); /* finish on <var_29:Iterator[nullable Object]>*/
706 }
707 {
708 ((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_17); /* next on <var_17:Iterator[nullable Object]>*/
709 }
710 }
711 BREAK_label: (void)0;
712 {
713 ((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_17); /* finish on <var_17:Iterator[nullable Object]>*/
714 }
715 {
716 { /* Inline poset$POSetElement$tos (var_te) on <var_te:POSetElement[nullable Object]> */
717 var45 = var_te->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_te:POSetElement[nullable Object]> */
718 if (unlikely(var45 == NULL)) {
719 if(catchStack.cursor >= 0){
720 longjmp(catchStack.envs[catchStack.cursor], 1);
721 }
722 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
723 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
724 fatal_exit(1);
725 }
726 var43 = var45;
727 RET_LABEL44:(void)0;
728 }
729 }
730 {
731 var46 = core___core__HashSet___core__abstract_collection__Collection__has(var43, var_f);
732 }
733 if (var46){
734 goto RET_LABEL;
735 } else {
736 }
737 var_to_remove = ((val*)NULL);
738 {
739 { /* Inline poset$POSetElement$dfroms (var_te) on <var_te:POSetElement[nullable Object]> */
740 var49 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <var_te:POSetElement[nullable Object]> */
741 if (unlikely(var49 == NULL)) {
742 if(catchStack.cursor >= 0){
743 longjmp(catchStack.envs[catchStack.cursor], 1);
744 }
745 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
746 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
747 fatal_exit(1);
748 }
749 var47 = var49;
750 RET_LABEL48:(void)0;
751 }
752 }
753 var_50 = var47;
754 {
755 var51 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_50);
756 }
757 var_52 = var51;
758 for(;;) {
759 {
760 var53 = ((short int(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_52); /* is_ok on <var_52:Iterator[nullable Object]>*/
761 }
762 if (var53){
763 } else {
764 goto BREAK_label54;
765 }
766 {
767 var55 = ((val*(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_52); /* item on <var_52:Iterator[nullable Object]>*/
768 }
769 var_x = var55;
770 {
771 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
772 var58 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
773 if (unlikely(var58 == NULL)) {
774 if(catchStack.cursor >= 0){
775 longjmp(catchStack.envs[catchStack.cursor], 1);
776 }
777 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
778 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
779 fatal_exit(1);
780 }
781 var56 = var58;
782 RET_LABEL57:(void)0;
783 }
784 }
785 {
786 var59 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var56, var_x);
787 }
788 var_xe = var59;
789 {
790 { /* Inline poset$POSetElement$tos (var_xe) on <var_xe:POSetElement[nullable Object]> */
791 var62 = var_xe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_xe:POSetElement[nullable Object]> */
792 if (unlikely(var62 == NULL)) {
793 if(catchStack.cursor >= 0){
794 longjmp(catchStack.envs[catchStack.cursor], 1);
795 }
796 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
797 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
798 fatal_exit(1);
799 }
800 var60 = var62;
801 RET_LABEL61:(void)0;
802 }
803 }
804 {
805 var63 = core___core__HashSet___core__abstract_collection__Collection__has(var60, var_f);
806 }
807 if (var63){
808 if (var_to_remove == NULL) {
809 var64 = 1; /* is null */
810 } else {
811 var64 = 0; /* arg is null but recv is not */
812 }
813 if (0) {
814 var65 = core___core__Array___core__kernel__Object___61d_61d(var_to_remove, ((val*)NULL));
815 var64 = var65;
816 }
817 if (var64){
818 var66 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__poset__POSet___35dE]);
819 {
820 core___core__Array___core__kernel__Object__init(var66); /* Direct call array$Array$init on <var66:Array[nullable Object]>*/
821 }
822 var_to_remove = var66;
823 } else {
824 }
825 {
826 core___core__Array___core__abstract_collection__SimpleCollection__add(var_to_remove, var_x); /* Direct call array$Array$add on <var_to_remove:nullable Array[nullable Object](Array[nullable Object])>*/
827 }
828 {
829 { /* Inline poset$POSetElement$dtos (var_xe) on <var_xe:POSetElement[nullable Object]> */
830 var69 = var_xe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <var_xe:POSetElement[nullable Object]> */
831 if (unlikely(var69 == NULL)) {
832 if(catchStack.cursor >= 0){
833 longjmp(catchStack.envs[catchStack.cursor], 1);
834 }
835 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
836 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
837 fatal_exit(1);
838 }
839 var67 = var69;
840 RET_LABEL68:(void)0;
841 }
842 }
843 {
844 core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var67, var_t); /* Direct call hash_collection$HashSet$remove on <var67:HashSet[nullable Object]>*/
845 }
846 } else {
847 }
848 {
849 ((void(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_52); /* next on <var_52:Iterator[nullable Object]>*/
850 }
851 }
852 BREAK_label54: (void)0;
853 {
854 ((void(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_52); /* finish on <var_52:Iterator[nullable Object]>*/
855 }
856 if (var_to_remove == NULL) {
857 var70 = 0; /* is null */
858 } else {
859 var70 = 1; /* arg is null and recv is not */
860 }
861 if (0) {
862 { /* Inline kernel$Object$!= (var_to_remove,((val*)NULL)) on <var_to_remove:nullable Array[nullable Object]> */
863 var_other = ((val*)NULL);
864 {
865 var73 = ((short int(*)(val* self, val* p0))(var_to_remove->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_to_remove, var_other); /* == on <var_to_remove:nullable Array[nullable Object](Array[nullable Object])>*/
866 }
867 var74 = !var73;
868 var71 = var74;
869 goto RET_LABEL72;
870 RET_LABEL72:(void)0;
871 }
872 var70 = var71;
873 }
874 if (var70){
875 var_75 = var_to_remove;
876 {
877 var76 = core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_75);
878 }
879 var_77 = var76;
880 for(;;) {
881 {
882 var78 = ((short int(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_77); /* is_ok on <var_77:IndexedIterator[nullable Object]>*/
883 }
884 if (var78){
885 } else {
886 goto BREAK_label79;
887 }
888 {
889 var80 = ((val*(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_77); /* item on <var_77:IndexedIterator[nullable Object]>*/
890 }
891 var_x81 = var80;
892 {
893 { /* Inline poset$POSetElement$dfroms (var_te) on <var_te:POSetElement[nullable Object]> */
894 var84 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <var_te:POSetElement[nullable Object]> */
895 if (unlikely(var84 == NULL)) {
896 if(catchStack.cursor >= 0){
897 longjmp(catchStack.envs[catchStack.cursor], 1);
898 }
899 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
900 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
901 fatal_exit(1);
902 }
903 var82 = var84;
904 RET_LABEL83:(void)0;
905 }
906 }
907 {
908 core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var82, var_x81); /* Direct call hash_collection$HashSet$remove on <var82:HashSet[nullable Object]>*/
909 }
910 {
911 ((void(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_77); /* next on <var_77:IndexedIterator[nullable Object]>*/
912 }
913 }
914 BREAK_label79: (void)0;
915 {
916 ((void(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_77); /* finish on <var_77:IndexedIterator[nullable Object]>*/
917 }
918 {
919 core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var_to_remove); /* Direct call array$AbstractArray$clear on <var_to_remove:nullable Array[nullable Object](Array[nullable Object])>*/
920 }
921 } else {
922 }
923 {
924 { /* Inline poset$POSetElement$dtos (var_fe) on <var_fe:POSetElement[nullable Object]> */
925 var87 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <var_fe:POSetElement[nullable Object]> */
926 if (unlikely(var87 == NULL)) {
927 if(catchStack.cursor >= 0){
928 longjmp(catchStack.envs[catchStack.cursor], 1);
929 }
930 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
931 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
932 fatal_exit(1);
933 }
934 var85 = var87;
935 RET_LABEL86:(void)0;
936 }
937 }
938 var_88 = var85;
939 {
940 var89 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_88);
941 }
942 var_90 = var89;
943 for(;;) {
944 {
945 var91 = ((short int(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_90); /* is_ok on <var_90:Iterator[nullable Object]>*/
946 }
947 if (var91){
948 } else {
949 goto BREAK_label92;
950 }
951 {
952 var93 = ((val*(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_90); /* item on <var_90:Iterator[nullable Object]>*/
953 }
954 var_x94 = var93;
955 {
956 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
957 var97 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
958 if (unlikely(var97 == NULL)) {
959 if(catchStack.cursor >= 0){
960 longjmp(catchStack.envs[catchStack.cursor], 1);
961 }
962 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
963 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
964 fatal_exit(1);
965 }
966 var95 = var97;
967 RET_LABEL96:(void)0;
968 }
969 }
970 {
971 var98 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var95, var_x94);
972 }
973 var_xe99 = var98;
974 {
975 { /* Inline poset$POSetElement$froms (var_xe99) on <var_xe99:POSetElement[nullable Object]> */
976 var102 = var_xe99->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <var_xe99:POSetElement[nullable Object]> */
977 if (unlikely(var102 == NULL)) {
978 if(catchStack.cursor >= 0){
979 longjmp(catchStack.envs[catchStack.cursor], 1);
980 }
981 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
982 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
983 fatal_exit(1);
984 }
985 var100 = var102;
986 RET_LABEL101:(void)0;
987 }
988 }
989 {
990 var103 = core___core__HashSet___core__abstract_collection__Collection__has(var100, var_t);
991 }
992 if (var103){
993 {
994 { /* Inline poset$POSetElement$dfroms (var_xe99) on <var_xe99:POSetElement[nullable Object]> */
995 var106 = var_xe99->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <var_xe99:POSetElement[nullable Object]> */
996 if (unlikely(var106 == NULL)) {
997 if(catchStack.cursor >= 0){
998 longjmp(catchStack.envs[catchStack.cursor], 1);
999 }
1000 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
1001 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
1002 fatal_exit(1);
1003 }
1004 var104 = var106;
1005 RET_LABEL105:(void)0;
1006 }
1007 }
1008 {
1009 core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var104, var_f); /* Direct call hash_collection$HashSet$remove on <var104:HashSet[nullable Object]>*/
1010 }
1011 if (var_to_remove == NULL) {
1012 var107 = 1; /* is null */
1013 } else {
1014 var107 = 0; /* arg is null but recv is not */
1015 }
1016 if (0) {
1017 var108 = core___core__Array___core__kernel__Object___61d_61d(var_to_remove, ((val*)NULL));
1018 var107 = var108;
1019 }
1020 if (var107){
1021 var109 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__poset__POSet___35dE]);
1022 {
1023 core___core__Array___core__kernel__Object__init(var109); /* Direct call array$Array$init on <var109:Array[nullable Object]>*/
1024 }
1025 var_to_remove = var109;
1026 } else {
1027 }
1028 {
1029 core___core__Array___core__abstract_collection__SimpleCollection__add(var_to_remove, var_x94); /* Direct call array$Array$add on <var_to_remove:nullable Array[nullable Object](Array[nullable Object])>*/
1030 }
1031 } else {
1032 }
1033 {
1034 ((void(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_90); /* next on <var_90:Iterator[nullable Object]>*/
1035 }
1036 }
1037 BREAK_label92: (void)0;
1038 {
1039 ((void(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_90); /* finish on <var_90:Iterator[nullable Object]>*/
1040 }
1041 if (var_to_remove == NULL) {
1042 var110 = 0; /* is null */
1043 } else {
1044 var110 = 1; /* arg is null and recv is not */
1045 }
1046 if (0) {
1047 { /* Inline kernel$Object$!= (var_to_remove,((val*)NULL)) on <var_to_remove:nullable Array[nullable Object]> */
1048 var_other = ((val*)NULL);
1049 {
1050 var113 = ((short int(*)(val* self, val* p0))(var_to_remove->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_to_remove, var_other); /* == on <var_to_remove:nullable Array[nullable Object](Array[nullable Object])>*/
1051 }
1052 var114 = !var113;
1053 var111 = var114;
1054 goto RET_LABEL112;
1055 RET_LABEL112:(void)0;
1056 }
1057 var110 = var111;
1058 }
1059 if (var110){
1060 var_115 = var_to_remove;
1061 {
1062 var116 = core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_115);
1063 }
1064 var_117 = var116;
1065 for(;;) {
1066 {
1067 var118 = ((short int(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_117); /* is_ok on <var_117:IndexedIterator[nullable Object]>*/
1068 }
1069 if (var118){
1070 } else {
1071 goto BREAK_label119;
1072 }
1073 {
1074 var120 = ((val*(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_117); /* item on <var_117:IndexedIterator[nullable Object]>*/
1075 }
1076 var_x121 = var120;
1077 {
1078 { /* Inline poset$POSetElement$dtos (var_fe) on <var_fe:POSetElement[nullable Object]> */
1079 var124 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <var_fe:POSetElement[nullable Object]> */
1080 if (unlikely(var124 == NULL)) {
1081 if(catchStack.cursor >= 0){
1082 longjmp(catchStack.envs[catchStack.cursor], 1);
1083 }
1084 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
1085 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
1086 fatal_exit(1);
1087 }
1088 var122 = var124;
1089 RET_LABEL123:(void)0;
1090 }
1091 }
1092 {
1093 core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var122, var_x121); /* Direct call hash_collection$HashSet$remove on <var122:HashSet[nullable Object]>*/
1094 }
1095 {
1096 ((void(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_117); /* next on <var_117:IndexedIterator[nullable Object]>*/
1097 }
1098 }
1099 BREAK_label119: (void)0;
1100 {
1101 ((void(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_117); /* finish on <var_117:IndexedIterator[nullable Object]>*/
1102 }
1103 } else {
1104 }
1105 {
1106 { /* Inline poset$POSetElement$dtos (var_fe) on <var_fe:POSetElement[nullable Object]> */
1107 var127 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <var_fe:POSetElement[nullable Object]> */
1108 if (unlikely(var127 == NULL)) {
1109 if(catchStack.cursor >= 0){
1110 longjmp(catchStack.envs[catchStack.cursor], 1);
1111 }
1112 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
1113 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
1114 fatal_exit(1);
1115 }
1116 var125 = var127;
1117 RET_LABEL126:(void)0;
1118 }
1119 }
1120 {
1121 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var125, var_t); /* Direct call hash_collection$HashSet$add on <var125:HashSet[nullable Object]>*/
1122 }
1123 {
1124 { /* Inline poset$POSetElement$dfroms (var_te) on <var_te:POSetElement[nullable Object]> */
1125 var130 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <var_te:POSetElement[nullable Object]> */
1126 if (unlikely(var130 == NULL)) {
1127 if(catchStack.cursor >= 0){
1128 longjmp(catchStack.envs[catchStack.cursor], 1);
1129 }
1130 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
1131 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
1132 fatal_exit(1);
1133 }
1134 var128 = var130;
1135 RET_LABEL129:(void)0;
1136 }
1137 }
1138 {
1139 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var128, var_f); /* Direct call hash_collection$HashSet$add on <var128:HashSet[nullable Object]>*/
1140 }
1141 RET_LABEL:;
1142 }
1143 /* method poset$POSet$has_edge for (self: POSet[nullable Object], nullable Object, nullable Object): Bool */
1144 short int poset___poset__POSet___has_edge(val* self, val* p0, val* p1) {
1145 short int var /* : Bool */;
1146 short int var1 /* : Bool */;
1147 int cltype;
1148 int idtype;
1149 const struct type* type_struct;
1150 short int is_nullable;
1151 const char* var_class_name;
1152 short int var2 /* : Bool */;
1153 int cltype3;
1154 int idtype4;
1155 const struct type* type_struct5;
1156 short int is_nullable6;
1157 const char* var_class_name7;
1158 val* var_f /* var f: nullable Object */;
1159 val* var_t /* var t: nullable Object */;
1160 val* var8 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1161 val* var10 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1162 val* var11 /* : RemovableCollection[nullable Object] */;
1163 short int var12 /* : Bool */;
1164 short int var13 /* : Bool */;
1165 val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1166 val* var16 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1167 val* var17 /* : nullable Object */;
1168 val* var_fe /* var fe: POSetElement[nullable Object] */;
1169 val* var18 /* : HashSet[nullable Object] */;
1170 val* var20 /* : HashSet[nullable Object] */;
1171 short int var21 /* : Bool */;
1172 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa E */
1173 /* <p0:nullable Object> isa E */
1174 type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
1175 cltype = type_struct->color;
1176 idtype = type_struct->id;
1177 is_nullable = type_struct->is_nullable;
1178 if(p0 == NULL) {
1179 var1 = is_nullable;
1180 } else {
1181 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1182 var1 = 0;
1183 } else {
1184 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1185 }
1186 }
1187 if (unlikely(!var1)) {
1188 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1189 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
1190 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 212);
1191 fatal_exit(1);
1192 }
1193 /* Covariant cast for argument 1 (t) <p1:nullable Object> isa E */
1194 /* <p1:nullable Object> isa E */
1195 type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
1196 cltype3 = type_struct5->color;
1197 idtype4 = type_struct5->id;
1198 is_nullable6 = type_struct5->is_nullable;
1199 if(p1 == NULL) {
1200 var2 = is_nullable6;
1201 } else {
1202 if(cltype3 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
1203 var2 = 0;
1204 } else {
1205 var2 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4;
1206 }
1207 }
1208 if (unlikely(!var2)) {
1209 var_class_name7 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
1210 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name7);
1211 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 212);
1212 fatal_exit(1);
1213 }
1214 var_f = p0;
1215 var_t = p1;
1216 {
1217 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1218 var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1219 if (unlikely(var10 == NULL)) {
1220 if(catchStack.cursor >= 0){
1221 longjmp(catchStack.envs[catchStack.cursor], 1);
1222 }
1223 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1224 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1225 fatal_exit(1);
1226 }
1227 var8 = var10;
1228 RET_LABEL9:(void)0;
1229 }
1230 }
1231 {
1232 var11 = core___core__HashMap___core__abstract_collection__MapRead__keys(var8);
1233 }
1234 {
1235 var12 = ((short int(*)(val* self, val* p0))((((long)var11&3)?class_info[((long)var11&3)]:var11->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var11, var_f); /* has on <var11:RemovableCollection[nullable Object]>*/
1236 }
1237 var13 = !var12;
1238 if (var13){
1239 var = 0;
1240 goto RET_LABEL;
1241 } else {
1242 }
1243 {
1244 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1245 var16 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1246 if (unlikely(var16 == NULL)) {
1247 if(catchStack.cursor >= 0){
1248 longjmp(catchStack.envs[catchStack.cursor], 1);
1249 }
1250 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1251 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1252 fatal_exit(1);
1253 }
1254 var14 = var16;
1255 RET_LABEL15:(void)0;
1256 }
1257 }
1258 {
1259 var17 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var14, var_f);
1260 }
1261 var_fe = var17;
1262 {
1263 { /* Inline poset$POSetElement$tos (var_fe) on <var_fe:POSetElement[nullable Object]> */
1264 var20 = var_fe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_fe:POSetElement[nullable Object]> */
1265 if (unlikely(var20 == NULL)) {
1266 if(catchStack.cursor >= 0){
1267 longjmp(catchStack.envs[catchStack.cursor], 1);
1268 }
1269 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
1270 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
1271 fatal_exit(1);
1272 }
1273 var18 = var20;
1274 RET_LABEL19:(void)0;
1275 }
1276 }
1277 {
1278 var21 = core___core__HashSet___core__abstract_collection__Collection__has(var18, var_t);
1279 }
1280 var = var21;
1281 goto RET_LABEL;
1282 RET_LABEL:;
1283 return var;
1284 }
1285 /* method poset$POSet$compare for (self: POSet[nullable Object], nullable Object, nullable Object): Int */
1286 long poset___poset__POSet___core__sorter__Comparator__compare(val* self, val* p0, val* p1) {
1287 long var /* : Int */;
1288 short int var1 /* : Bool */;
1289 int cltype;
1290 int idtype;
1291 const struct type* type_struct;
1292 short int is_nullable;
1293 const char* var_class_name;
1294 short int var2 /* : Bool */;
1295 int cltype3;
1296 int idtype4;
1297 const struct type* type_struct5;
1298 short int is_nullable6;
1299 const char* var_class_name7;
1300 val* var_a /* var a: nullable Object */;
1301 val* var_b /* var b: nullable Object */;
1302 val* var8 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1303 val* var10 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1304 val* var11 /* : nullable Object */;
1305 val* var_ae /* var ae: POSetElement[nullable Object] */;
1306 val* var12 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1307 val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1308 val* var15 /* : nullable Object */;
1309 val* var_be /* var be: POSetElement[nullable Object] */;
1310 val* var16 /* : HashSet[nullable Object] */;
1311 val* var18 /* : HashSet[nullable Object] */;
1312 long var19 /* : Int */;
1313 val* var20 /* : HashSet[nullable Object] */;
1314 val* var22 /* : HashSet[nullable Object] */;
1315 long var23 /* : Int */;
1316 long var24 /* : Int */;
1317 long var_res /* var res: Int */;
1318 short int var25 /* : Bool */;
1319 short int var27 /* : Bool */;
1320 short int var28 /* : Bool */;
1321 val* var29 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1322 val* var31 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1323 val* var32 /* : nullable Object */;
1324 long var33 /* : Int */;
1325 long var35 /* : Int */;
1326 val* var36 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1327 val* var38 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1328 val* var39 /* : nullable Object */;
1329 long var40 /* : Int */;
1330 long var42 /* : Int */;
1331 long var43 /* : Int */;
1332 /* Covariant cast for argument 0 (a) <p0:nullable Object> isa COMPARED */
1333 /* <p0:nullable Object> isa COMPARED */
1334 type_struct = self->type->resolution_table->types[COLOR_core__sorter__Comparator__COMPARED];
1335 cltype = type_struct->color;
1336 idtype = type_struct->id;
1337 is_nullable = type_struct->is_nullable;
1338 if(p0 == NULL) {
1339 var1 = is_nullable;
1340 } else {
1341 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1342 var1 = 0;
1343 } else {
1344 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1345 }
1346 }
1347 if (unlikely(!var1)) {
1348 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1349 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "COMPARED", var_class_name);
1350 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 288);
1351 fatal_exit(1);
1352 }
1353 /* Covariant cast for argument 1 (b) <p1:nullable Object> isa COMPARED */
1354 /* <p1:nullable Object> isa COMPARED */
1355 type_struct5 = self->type->resolution_table->types[COLOR_core__sorter__Comparator__COMPARED];
1356 cltype3 = type_struct5->color;
1357 idtype4 = type_struct5->id;
1358 is_nullable6 = type_struct5->is_nullable;
1359 if(p1 == NULL) {
1360 var2 = is_nullable6;
1361 } else {
1362 if(cltype3 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
1363 var2 = 0;
1364 } else {
1365 var2 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4;
1366 }
1367 }
1368 if (unlikely(!var2)) {
1369 var_class_name7 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
1370 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "COMPARED", var_class_name7);
1371 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 288);
1372 fatal_exit(1);
1373 }
1374 var_a = p0;
1375 var_b = p1;
1376 {
1377 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1378 var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1379 if (unlikely(var10 == NULL)) {
1380 if(catchStack.cursor >= 0){
1381 longjmp(catchStack.envs[catchStack.cursor], 1);
1382 }
1383 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1384 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1385 fatal_exit(1);
1386 }
1387 var8 = var10;
1388 RET_LABEL9:(void)0;
1389 }
1390 }
1391 {
1392 var11 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var8, var_a);
1393 }
1394 var_ae = var11;
1395 {
1396 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1397 var14 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1398 if (unlikely(var14 == NULL)) {
1399 if(catchStack.cursor >= 0){
1400 longjmp(catchStack.envs[catchStack.cursor], 1);
1401 }
1402 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1403 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1404 fatal_exit(1);
1405 }
1406 var12 = var14;
1407 RET_LABEL13:(void)0;
1408 }
1409 }
1410 {
1411 var15 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var12, var_b);
1412 }
1413 var_be = var15;
1414 {
1415 { /* Inline poset$POSetElement$tos (var_ae) on <var_ae:POSetElement[nullable Object]> */
1416 var18 = var_ae->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_ae:POSetElement[nullable Object]> */
1417 if (unlikely(var18 == NULL)) {
1418 if(catchStack.cursor >= 0){
1419 longjmp(catchStack.envs[catchStack.cursor], 1);
1420 }
1421 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
1422 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
1423 fatal_exit(1);
1424 }
1425 var16 = var18;
1426 RET_LABEL17:(void)0;
1427 }
1428 }
1429 {
1430 var19 = core___core__HashSet___core__abstract_collection__Collection__length(var16);
1431 }
1432 {
1433 { /* Inline poset$POSetElement$tos (var_be) on <var_be:POSetElement[nullable Object]> */
1434 var22 = var_be->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_be:POSetElement[nullable Object]> */
1435 if (unlikely(var22 == NULL)) {
1436 if(catchStack.cursor >= 0){
1437 longjmp(catchStack.envs[catchStack.cursor], 1);
1438 }
1439 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
1440 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
1441 fatal_exit(1);
1442 }
1443 var20 = var22;
1444 RET_LABEL21:(void)0;
1445 }
1446 }
1447 {
1448 var23 = core___core__HashSet___core__abstract_collection__Collection__length(var20);
1449 }
1450 {
1451 var24 = core___core__Int___Comparable___60d_61d_62d(var19, var23);
1452 }
1453 var_res = var24;
1454 {
1455 { /* Inline kernel$Int$!= (var_res,0l) on <var_res:Int> */
1456 var27 = var_res == 0l;
1457 var28 = !var27;
1458 var25 = var28;
1459 goto RET_LABEL26;
1460 RET_LABEL26:(void)0;
1461 }
1462 }
1463 if (var25){
1464 var = var_res;
1465 goto RET_LABEL;
1466 } else {
1467 }
1468 {
1469 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1470 var31 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1471 if (unlikely(var31 == NULL)) {
1472 if(catchStack.cursor >= 0){
1473 longjmp(catchStack.envs[catchStack.cursor], 1);
1474 }
1475 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1476 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1477 fatal_exit(1);
1478 }
1479 var29 = var31;
1480 RET_LABEL30:(void)0;
1481 }
1482 }
1483 {
1484 var32 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var29, var_a);
1485 }
1486 {
1487 { /* Inline poset$POSetElement$count (var32) on <var32:nullable Object(POSetElement[nullable Object])> */
1488 var35 = var32->attrs[COLOR_poset__POSetElement___count].l; /* _count on <var32:nullable Object(POSetElement[nullable Object])> */
1489 var33 = var35;
1490 RET_LABEL34:(void)0;
1491 }
1492 }
1493 {
1494 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1495 var38 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1496 if (unlikely(var38 == NULL)) {
1497 if(catchStack.cursor >= 0){
1498 longjmp(catchStack.envs[catchStack.cursor], 1);
1499 }
1500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1501 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1502 fatal_exit(1);
1503 }
1504 var36 = var38;
1505 RET_LABEL37:(void)0;
1506 }
1507 }
1508 {
1509 var39 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var36, var_b);
1510 }
1511 {
1512 { /* Inline poset$POSetElement$count (var39) on <var39:nullable Object(POSetElement[nullable Object])> */
1513 var42 = var39->attrs[COLOR_poset__POSetElement___count].l; /* _count on <var39:nullable Object(POSetElement[nullable Object])> */
1514 var40 = var42;
1515 RET_LABEL41:(void)0;
1516 }
1517 }
1518 {
1519 var43 = core___core__Int___Comparable___60d_61d_62d(var33, var40);
1520 }
1521 var = var43;
1522 goto RET_LABEL;
1523 RET_LABEL:;
1524 return var;
1525 }
1526 /* method poset$POSet$linearize for (self: POSet[nullable Object], Collection[nullable Object]): Array[nullable Object] */
1527 val* poset___poset__POSet___linearize(val* self, val* p0) {
1528 val* var /* : Array[nullable Object] */;
1529 short int var1 /* : Bool */;
1530 int cltype;
1531 int idtype;
1532 const struct type* type_struct;
1533 const char* var_class_name;
1534 val* var_elements /* var elements: Collection[nullable Object] */;
1535 val* var2 /* : Array[nullable Object] */;
1536 val* var_lin /* var lin: Array[nullable Object] */;
1537 /* Covariant cast for argument 0 (elements) <p0:Collection[nullable Object]> isa Collection[E] */
1538 /* <p0:Collection[nullable Object]> isa Collection[E] */
1539 type_struct = self->type->resolution_table->types[COLOR_core__Collection__poset__POSet___35dE];
1540 cltype = type_struct->color;
1541 idtype = type_struct->id;
1542 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1543 var1 = 0;
1544 } else {
1545 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1546 }
1547 if (unlikely(!var1)) {
1548 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1549 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name);
1550 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 374);
1551 fatal_exit(1);
1552 }
1553 var_elements = p0;
1554 {
1555 var2 = ((val*(*)(val* self))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__array__Collection__to_a]))(var_elements); /* to_a on <var_elements:Collection[nullable Object]>*/
1556 }
1557 var_lin = var2;
1558 {
1559 core___core__Comparator___sort(self, var_lin); /* Direct call sorter$Comparator$sort on <self:POSet[nullable Object]>*/
1560 }
1561 var = var_lin;
1562 goto RET_LABEL;
1563 RET_LABEL:;
1564 return var;
1565 }
1566 /* method poset$POSet$clone for (self: POSet[nullable Object]): POSet[nullable Object] */
1567 val* poset___poset__POSet___core__kernel__Cloneable__clone(val* self) {
1568 val* var /* : POSet[nullable Object] */;
1569 val* var1 /* : POSet[nullable Object] */;
1570 short int var2 /* : Bool */;
1571 int cltype;
1572 int idtype;
1573 const struct type* type_struct;
1574 const char* var_class_name;
1575 {
1576 var1 = poset___poset__POSet___sub(self, self);
1577 }
1578 /* <var1:POSet[nullable Object]> isa SELF */
1579 type_struct = self->type->resolution_table->types[COLOR_core__kernel__Object__SELF];
1580 cltype = type_struct->color;
1581 idtype = type_struct->id;
1582 if(cltype >= var1->type->table_size) {
1583 var2 = 0;
1584 } else {
1585 var2 = var1->type->type_table[cltype] == idtype;
1586 }
1587 if (unlikely(!var2)) {
1588 var_class_name = var1 == NULL ? "null" : var1->type->name;
1589 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SELF", var_class_name);
1590 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 388);
1591 fatal_exit(1);
1592 }
1593 var = var1;
1594 goto RET_LABEL;
1595 RET_LABEL:;
1596 return var;
1597 }
1598 /* method poset$POSet$sub for (self: POSet[nullable Object], Collection[nullable Object]): POSet[nullable Object] */
1599 val* poset___poset__POSet___sub(val* self, val* p0) {
1600 val* var /* : POSet[nullable Object] */;
1601 short int var1 /* : Bool */;
1602 int cltype;
1603 int idtype;
1604 const struct type* type_struct;
1605 const char* var_class_name;
1606 val* var_elements /* var elements: Collection[nullable Object] */;
1607 val* var2 /* : POSet[nullable Object] */;
1608 val* var_res /* var res: POSet[nullable Object] */;
1609 val* var_ /* var : POSet[nullable Object] */;
1610 val* var4 /* : Iterator[nullable Object] */;
1611 val* var_5 /* var : Iterator[nullable Object] */;
1612 short int var6 /* : Bool */;
1613 val* var7 /* : nullable Object */;
1614 val* var_e /* var e: nullable Object */;
1615 short int var8 /* : Bool */;
1616 short int var9 /* : Bool */;
1617 val* var11 /* : POSetElement[nullable Object] */;
1618 val* var_12 /* var : POSet[nullable Object] */;
1619 val* var13 /* : Iterator[nullable Object] */;
1620 val* var_14 /* var : Iterator[nullable Object] */;
1621 short int var15 /* : Bool */;
1622 val* var17 /* : nullable Object */;
1623 val* var_e18 /* var e: nullable Object */;
1624 val* var19 /* : POSetElement[nullable Object] */;
1625 val* var20 /* : Collection[nullable Object] */;
1626 val* var_21 /* var : Collection[nullable Object] */;
1627 val* var22 /* : Iterator[nullable Object] */;
1628 val* var_23 /* var : Iterator[nullable Object] */;
1629 short int var24 /* : Bool */;
1630 val* var26 /* : nullable Object */;
1631 val* var_f /* var f: nullable Object */;
1632 short int var27 /* : Bool */;
1633 short int var28 /* : Bool */;
1634 /* Covariant cast for argument 0 (elements) <p0:Collection[nullable Object]> isa Collection[E] */
1635 /* <p0:Collection[nullable Object]> isa Collection[E] */
1636 type_struct = self->type->resolution_table->types[COLOR_core__Collection__poset__POSet___35dE];
1637 cltype = type_struct->color;
1638 idtype = type_struct->id;
1639 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1640 var1 = 0;
1641 } else {
1642 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1643 }
1644 if (unlikely(!var1)) {
1645 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1646 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name);
1647 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 390);
1648 fatal_exit(1);
1649 }
1650 var_elements = p0;
1651 var2 = NEW_poset__POSet(self->type->resolution_table->types[COLOR_poset__POSet__poset__POSet___35dE]);
1652 {
1653 { /* Inline kernel$Object$init (var2) on <var2:POSet[nullable Object]> */
1654 RET_LABEL3:(void)0;
1655 }
1656 }
1657 var_res = var2;
1658 var_ = self;
1659 {
1660 var4 = poset___poset__POSet___core__abstract_collection__Collection__iterator(var_);
1661 }
1662 var_5 = var4;
1663 for(;;) {
1664 {
1665 var6 = ((short int(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_5); /* is_ok on <var_5:Iterator[nullable Object]>*/
1666 }
1667 if (var6){
1668 } else {
1669 goto BREAK_label;
1670 }
1671 {
1672 var7 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_5); /* item on <var_5:Iterator[nullable Object]>*/
1673 }
1674 var_e = var7;
1675 {
1676 var8 = ((short int(*)(val* self, val* p0))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var_elements, var_e); /* has on <var_elements:Collection[nullable Object]>*/
1677 }
1678 var9 = !var8;
1679 if (var9){
1680 goto BREAK_label10;
1681 } else {
1682 }
1683 {
1684 var11 = poset___poset__POSet___add_node(var_res, var_e);
1685 }
1686 BREAK_label10: (void)0;
1687 {
1688 ((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_5); /* next on <var_5:Iterator[nullable Object]>*/
1689 }
1690 }
1691 BREAK_label: (void)0;
1692 {
1693 ((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_5); /* finish on <var_5:Iterator[nullable Object]>*/
1694 }
1695 var_12 = var_res;
1696 {
1697 var13 = poset___poset__POSet___core__abstract_collection__Collection__iterator(var_12);
1698 }
1699 var_14 = var13;
1700 for(;;) {
1701 {
1702 var15 = ((short int(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_14); /* is_ok on <var_14:Iterator[nullable Object]>*/
1703 }
1704 if (var15){
1705 } else {
1706 goto BREAK_label16;
1707 }
1708 {
1709 var17 = ((val*(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_14); /* item on <var_14:Iterator[nullable Object]>*/
1710 }
1711 var_e18 = var17;
1712 {
1713 var19 = poset___poset__POSet____91d_93d(self, var_e18);
1714 }
1715 {
1716 var20 = poset___poset__POSetElement___greaters(var19);
1717 }
1718 var_21 = var20;
1719 {
1720 var22 = ((val*(*)(val* self))((((long)var_21&3)?class_info[((long)var_21&3)]:var_21->class)->vft[COLOR_core__abstract_collection__Collection__iterator]))(var_21); /* iterator on <var_21:Collection[nullable Object]>*/
1721 }
1722 var_23 = var22;
1723 for(;;) {
1724 {
1725 var24 = ((short int(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_23); /* is_ok on <var_23:Iterator[nullable Object]>*/
1726 }
1727 if (var24){
1728 } else {
1729 goto BREAK_label25;
1730 }
1731 {
1732 var26 = ((val*(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_23); /* item on <var_23:Iterator[nullable Object]>*/
1733 }
1734 var_f = var26;
1735 {
1736 var27 = ((short int(*)(val* self, val* p0))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var_elements, var_f); /* has on <var_elements:Collection[nullable Object]>*/
1737 }
1738 var28 = !var27;
1739 if (var28){
1740 goto BREAK_label29;
1741 } else {
1742 }
1743 {
1744 poset___poset__POSet___add_edge(var_res, var_e18, var_f); /* Direct call poset$POSet$add_edge on <var_res:POSet[nullable Object]>*/
1745 }
1746 BREAK_label29: (void)0;
1747 {
1748 ((void(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_23); /* next on <var_23:Iterator[nullable Object]>*/
1749 }
1750 }
1751 BREAK_label25: (void)0;
1752 {
1753 ((void(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_23); /* finish on <var_23:Iterator[nullable Object]>*/
1754 }
1755 {
1756 ((void(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_14); /* next on <var_14:Iterator[nullable Object]>*/
1757 }
1758 }
1759 BREAK_label16: (void)0;
1760 {
1761 ((void(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_14); /* finish on <var_14:Iterator[nullable Object]>*/
1762 }
1763 var = var_res;
1764 goto RET_LABEL;
1765 RET_LABEL:;
1766 return var;
1767 }
1768 /* method poset$POSet$== for (self: POSet[nullable Object], nullable Object): Bool */
1769 short int poset___poset__POSet___core__kernel__Object___61d_61d(val* self, val* p0) {
1770 short int var /* : Bool */;
1771 val* var_other /* var other: nullable Object */;
1772 short int var1 /* : Bool */;
1773 int cltype;
1774 int idtype;
1775 short int var2 /* : Bool */;
1776 val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1777 val* var5 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1778 val* var6 /* : RemovableCollection[nullable Object] */;
1779 val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1780 val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1781 val* var10 /* : RemovableCollection[nullable Object] */;
1782 short int var11 /* : Bool */;
1783 short int var12 /* : Bool */;
1784 val* var13 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1785 val* var15 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1786 val* var_ /* var : HashMap[nullable Object, POSetElement[nullable Object]] */;
1787 val* var16 /* : MapIterator[nullable Object, nullable Object] */;
1788 val* var_17 /* var : MapIterator[nullable Object, POSetElement[nullable Object]] */;
1789 short int var18 /* : Bool */;
1790 val* var19 /* : nullable Object */;
1791 val* var_e /* var e: nullable Object */;
1792 val* var20 /* : nullable Object */;
1793 val* var_ee /* var ee: POSetElement[nullable Object] */;
1794 val* var21 /* : Collection[nullable Object] */;
1795 val* var22 /* : POSetElement[nullable Object] */;
1796 val* var23 /* : Collection[nullable Object] */;
1797 short int var24 /* : Bool */;
1798 val* var_other26 /* var other: nullable Object */;
1799 short int var27 /* : Bool */;
1800 short int var28 /* : Bool */;
1801 long var30 /* : Int */;
1802 long var31 /* : Int */;
1803 short int var32 /* : Bool */;
1804 short int var34 /* : Bool */;
1805 var_other = p0;
1806 /* <var_other:nullable Object> isa POSet[nullable Object] */
1807 cltype = type_poset__POSet__nullable__core__Object.color;
1808 idtype = type_poset__POSet__nullable__core__Object.id;
1809 if(var_other == NULL) {
1810 var1 = 0;
1811 } else {
1812 if(cltype >= (((long)var_other&3)?type_info[((long)var_other&3)]:var_other->type)->table_size) {
1813 var1 = 0;
1814 } else {
1815 var1 = (((long)var_other&3)?type_info[((long)var_other&3)]:var_other->type)->type_table[cltype] == idtype;
1816 }
1817 }
1818 var2 = !var1;
1819 if (var2){
1820 var = 0;
1821 goto RET_LABEL;
1822 } else {
1823 }
1824 {
1825 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1826 var5 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1827 if (unlikely(var5 == NULL)) {
1828 if(catchStack.cursor >= 0){
1829 longjmp(catchStack.envs[catchStack.cursor], 1);
1830 }
1831 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1832 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1833 fatal_exit(1);
1834 }
1835 var3 = var5;
1836 RET_LABEL4:(void)0;
1837 }
1838 }
1839 {
1840 var6 = core___core__HashMap___core__abstract_collection__MapRead__keys(var3);
1841 }
1842 {
1843 { /* Inline poset$POSet$elements (var_other) on <var_other:nullable Object(POSet[nullable Object])> */
1844 var9 = var_other->attrs[COLOR_poset__POSet___elements].val; /* _elements on <var_other:nullable Object(POSet[nullable Object])> */
1845 if (unlikely(var9 == NULL)) {
1846 if(catchStack.cursor >= 0){
1847 longjmp(catchStack.envs[catchStack.cursor], 1);
1848 }
1849 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1850 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1851 fatal_exit(1);
1852 }
1853 var7 = var9;
1854 RET_LABEL8:(void)0;
1855 }
1856 }
1857 {
1858 var10 = core___core__HashMap___core__abstract_collection__MapRead__keys(var7);
1859 }
1860 {
1861 var11 = core___core__Collection___has_exactly(var6, var10);
1862 }
1863 var12 = !var11;
1864 if (var12){
1865 var = 0;
1866 goto RET_LABEL;
1867 } else {
1868 }
1869 {
1870 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
1871 var15 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
1872 if (unlikely(var15 == NULL)) {
1873 if(catchStack.cursor >= 0){
1874 longjmp(catchStack.envs[catchStack.cursor], 1);
1875 }
1876 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
1877 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
1878 fatal_exit(1);
1879 }
1880 var13 = var15;
1881 RET_LABEL14:(void)0;
1882 }
1883 }
1884 var_ = var13;
1885 {
1886 var16 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var_);
1887 }
1888 var_17 = var16;
1889 for(;;) {
1890 {
1891 var18 = ((short int(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__is_ok]))(var_17); /* is_ok on <var_17:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
1892 }
1893 if (var18){
1894 } else {
1895 goto BREAK_label;
1896 }
1897 {
1898 var19 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__key]))(var_17); /* key on <var_17:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
1899 }
1900 var_e = var19;
1901 {
1902 var20 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__item]))(var_17); /* item on <var_17:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
1903 }
1904 var_ee = var20;
1905 {
1906 var21 = poset___poset__POSetElement___direct_greaters(var_ee);
1907 }
1908 {
1909 var22 = poset___poset__POSet____91d_93d(var_other, var_e);
1910 }
1911 {
1912 var23 = poset___poset__POSetElement___direct_greaters(var22);
1913 }
1914 {
1915 { /* Inline kernel$Object$!= (var21,var23) on <var21:Collection[nullable Object]> */
1916 var_other26 = var23;
1917 {
1918 var27 = ((short int(*)(val* self, val* p0))((((long)var21&3)?class_info[((long)var21&3)]:var21->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var21, var_other26); /* == on <var21:Collection[nullable Object]>*/
1919 }
1920 var28 = !var27;
1921 var24 = var28;
1922 goto RET_LABEL25;
1923 RET_LABEL25:(void)0;
1924 }
1925 }
1926 if (var24){
1927 var = 0;
1928 goto RET_LABEL;
1929 } else {
1930 }
1931 {
1932 ((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__next]))(var_17); /* next on <var_17:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
1933 }
1934 }
1935 BREAK_label: (void)0;
1936 {
1937 { /* Inline abstract_collection$MapIterator$finish (var_17) on <var_17:MapIterator[nullable Object, POSetElement[nullable Object]]> */
1938 RET_LABEL29:(void)0;
1939 }
1940 }
1941 {
1942 var30 = poset___poset__POSet___core__kernel__Object__hash(self);
1943 }
1944 {
1945 var31 = poset___poset__POSet___core__kernel__Object__hash(var_other);
1946 }
1947 {
1948 { /* Inline kernel$Int$== (var30,var31) on <var30:Int> */
1949 var34 = var30 == var31;
1950 var32 = var34;
1951 goto RET_LABEL33;
1952 RET_LABEL33:(void)0;
1953 }
1954 }
1955 if (unlikely(!var32)) {
1956 if(catchStack.cursor >= 0){
1957 longjmp(catchStack.envs[catchStack.cursor], 1);
1958 }
1959 PRINT_ERROR("Runtime error: %s", "Assert failed");
1960 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 476);
1961 fatal_exit(1);
1962 }
1963 var = 1;
1964 goto RET_LABEL;
1965 RET_LABEL:;
1966 return var;
1967 }
1968 /* method poset$POSet$hash for (self: POSet[nullable Object]): Int */
1969 long poset___poset__POSet___core__kernel__Object__hash(val* self) {
1970 long var /* : Int */;
1971 long var_res /* var res: Int */;
1972 val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1973 val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
1974 val* var_ /* var : HashMap[nullable Object, POSetElement[nullable Object]] */;
1975 val* var4 /* : MapIterator[nullable Object, nullable Object] */;
1976 val* var_5 /* var : MapIterator[nullable Object, POSetElement[nullable Object]] */;
1977 short int var6 /* : Bool */;
1978 val* var7 /* : nullable Object */;
1979 val* var_e /* var e: nullable Object */;
1980 val* var8 /* : nullable Object */;
1981 val* var_ee /* var ee: POSetElement[nullable Object] */;
1982 short int var9 /* : Bool */;
1983 short int var10 /* : Bool */;
1984 long var12 /* : Int */;
1985 long var13 /* : Int */;
1986 short int var15 /* : Bool */;
1987 int cltype;
1988 int idtype;
1989 const char* var_class_name;
1990 long var16 /* : Int */;
1991 val* var17 /* : Collection[nullable Object] */;
1992 long var18 /* : Int */;
1993 long var19 /* : Int */;
1994 short int var21 /* : Bool */;
1995 int cltype22;
1996 int idtype23;
1997 const char* var_class_name24;
1998 long var25 /* : Int */;
1999 var_res = 0l;
2000 {
2001 { /* Inline poset$POSet$elements (self) on <self:POSet[nullable Object]> */
2002 var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
2003 if (unlikely(var3 == NULL)) {
2004 if(catchStack.cursor >= 0){
2005 longjmp(catchStack.envs[catchStack.cursor], 1);
2006 }
2007 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
2008 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86);
2009 fatal_exit(1);
2010 }
2011 var1 = var3;
2012 RET_LABEL2:(void)0;
2013 }
2014 }
2015 var_ = var1;
2016 {
2017 var4 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var_);
2018 }
2019 var_5 = var4;
2020 for(;;) {
2021 {
2022 var6 = ((short int(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__is_ok]))(var_5); /* is_ok on <var_5:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
2023 }
2024 if (var6){
2025 } else {
2026 goto BREAK_label;
2027 }
2028 {
2029 var7 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__key]))(var_5); /* key on <var_5:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
2030 }
2031 var_e = var7;
2032 {
2033 var8 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__item]))(var_5); /* item on <var_5:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
2034 }
2035 var_ee = var8;
2036 if (var_e == NULL) {
2037 var9 = 1; /* is null */
2038 } else {
2039 var9 = 0; /* arg is null but recv is not */
2040 }
2041 if (0) {
2042 var10 = ((short int(*)(val* self, val* p0))((((long)var_e&3)?class_info[((long)var_e&3)]:var_e->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var_e, ((val*)NULL)); /* == on <var_e:nullable Object>*/
2043 var9 = var10;
2044 }
2045 if (var9){
2046 goto BREAK_label11;
2047 } else {
2048 }
2049 {
2050 var12 = ((long(*)(val* self))((((long)var_e&3)?class_info[((long)var_e&3)]:var_e->class)->vft[COLOR_core__kernel__Object__hash]))(var_e); /* hash on <var_e:nullable Object(Object)>*/
2051 }
2052 {
2053 { /* Inline kernel$Int$+ (var_res,var12) on <var_res:Int> */
2054 /* Covariant cast for argument 0 (i) <var12:Int> isa OTHER */
2055 /* <var12:Int> isa OTHER */
2056 var15 = 1; /* easy <var12:Int> isa OTHER*/
2057 if (unlikely(!var15)) {
2058 var_class_name = type_core__Int.name;
2059 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
2060 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
2061 fatal_exit(1);
2062 }
2063 var16 = var_res + var12;
2064 var13 = var16;
2065 goto RET_LABEL14;
2066 RET_LABEL14:(void)0;
2067 }
2068 }
2069 var_res = var13;
2070 {
2071 var17 = poset___poset__POSetElement___direct_greaters(var_ee);
2072 }
2073 {
2074 var18 = ((long(*)(val* self))((((long)var17&3)?class_info[((long)var17&3)]:var17->class)->vft[COLOR_core__abstract_collection__Collection__length]))(var17); /* length on <var17:Collection[nullable Object]>*/
2075 }
2076 {
2077 { /* Inline kernel$Int$+ (var_res,var18) on <var_res:Int> */
2078 /* Covariant cast for argument 0 (i) <var18:Int> isa OTHER */
2079 /* <var18:Int> isa OTHER */
2080 var21 = 1; /* easy <var18:Int> isa OTHER*/
2081 if (unlikely(!var21)) {
2082 var_class_name24 = type_core__Int.name;
2083 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name24);
2084 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
2085 fatal_exit(1);
2086 }
2087 var25 = var_res + var18;
2088 var19 = var25;
2089 goto RET_LABEL20;
2090 RET_LABEL20:(void)0;
2091 }
2092 }
2093 var_res = var19;
2094 BREAK_label11: (void)0;
2095 {
2096 ((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__next]))(var_5); /* next on <var_5:MapIterator[nullable Object, POSetElement[nullable Object]]>*/
2097 }
2098 }
2099 BREAK_label: (void)0;
2100 {
2101 { /* Inline abstract_collection$MapIterator$finish (var_5) on <var_5:MapIterator[nullable Object, POSetElement[nullable Object]]> */
2102 RET_LABEL26:(void)0;
2103 }
2104 }
2105 var = var_res;
2106 goto RET_LABEL;
2107 RET_LABEL:;
2108 return var;
2109 }
2110 /* method poset$POSetElement$poset for (self: POSetElement[nullable Object]): POSet[nullable Object] */
2111 val* poset___poset__POSetElement___poset(val* self) {
2112 val* var /* : POSet[nullable Object] */;
2113 val* var1 /* : POSet[nullable Object] */;
2114 var1 = self->attrs[COLOR_poset__POSetElement___poset].val; /* _poset on <self:POSetElement[nullable Object]> */
2115 if (unlikely(var1 == NULL)) {
2116 if(catchStack.cursor >= 0){
2117 longjmp(catchStack.envs[catchStack.cursor], 1);
2118 }
2119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _poset");
2120 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 526);
2121 fatal_exit(1);
2122 }
2123 var = var1;
2124 RET_LABEL:;
2125 return var;
2126 }
2127 /* method poset$POSetElement$poset= for (self: POSetElement[nullable Object], POSet[nullable Object]) */
2128 void poset___poset__POSetElement___poset_61d(val* self, val* p0) {
2129 short int var /* : Bool */;
2130 int cltype;
2131 int idtype;
2132 const struct type* type_struct;
2133 const char* var_class_name;
2134 /* Covariant cast for argument 0 (poset) <p0:POSet[nullable Object]> isa POSet[E] */
2135 /* <p0:POSet[nullable Object]> isa POSet[E] */
2136 type_struct = self->type->resolution_table->types[COLOR_poset__POSet__poset__POSetElement___35dE];
2137 cltype = type_struct->color;
2138 idtype = type_struct->id;
2139 if(cltype >= p0->type->table_size) {
2140 var = 0;
2141 } else {
2142 var = p0->type->type_table[cltype] == idtype;
2143 }
2144 if (unlikely(!var)) {
2145 var_class_name = p0 == NULL ? "null" : p0->type->name;
2146 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet[E]", var_class_name);
2147 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 526);
2148 fatal_exit(1);
2149 }
2150 self->attrs[COLOR_poset__POSetElement___poset].val = p0; /* _poset on <self:POSetElement[nullable Object]> */
2151 RET_LABEL:;
2152 }
2153 /* method poset$POSetElement$element for (self: POSetElement[nullable Object]): nullable Object */
2154 val* poset___poset__POSetElement___element(val* self) {
2155 val* var /* : nullable Object */;
2156 val* var1 /* : nullable Object */;
2157 var1 = self->attrs[COLOR_poset__POSetElement___element].val; /* _element on <self:POSetElement[nullable Object]> */
2158 var = var1;
2159 RET_LABEL:;
2160 return var;
2161 }
2162 /* method poset$POSetElement$element= for (self: POSetElement[nullable Object], nullable Object) */
2163 void poset___poset__POSetElement___element_61d(val* self, val* p0) {
2164 short int var /* : Bool */;
2165 int cltype;
2166 int idtype;
2167 const struct type* type_struct;
2168 short int is_nullable;
2169 const char* var_class_name;
2170 /* Covariant cast for argument 0 (element) <p0:nullable Object> isa E */
2171 /* <p0:nullable Object> isa E */
2172 type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE];
2173 cltype = type_struct->color;
2174 idtype = type_struct->id;
2175 is_nullable = type_struct->is_nullable;
2176 if(p0 == NULL) {
2177 var = is_nullable;
2178 } else {
2179 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2180 var = 0;
2181 } else {
2182 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2183 }
2184 }
2185 if (unlikely(!var)) {
2186 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2187 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
2188 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 529);
2189 fatal_exit(1);
2190 }
2191 self->attrs[COLOR_poset__POSetElement___element].val = p0; /* _element on <self:POSetElement[nullable Object]> */
2192 RET_LABEL:;
2193 }
2194 /* method poset$POSetElement$tos for (self: POSetElement[nullable Object]): HashSet[nullable Object] */
2195 val* poset___poset__POSetElement___tos(val* self) {
2196 val* var /* : HashSet[nullable Object] */;
2197 val* var1 /* : HashSet[nullable Object] */;
2198 var1 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <self:POSetElement[nullable Object]> */
2199 if (unlikely(var1 == NULL)) {
2200 if(catchStack.cursor >= 0){
2201 longjmp(catchStack.envs[catchStack.cursor], 1);
2202 }
2203 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
2204 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
2205 fatal_exit(1);
2206 }
2207 var = var1;
2208 RET_LABEL:;
2209 return var;
2210 }
2211 /* method poset$POSetElement$froms for (self: POSetElement[nullable Object]): HashSet[nullable Object] */
2212 val* poset___poset__POSetElement___froms(val* self) {
2213 val* var /* : HashSet[nullable Object] */;
2214 val* var1 /* : HashSet[nullable Object] */;
2215 var1 = self->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <self:POSetElement[nullable Object]> */
2216 if (unlikely(var1 == NULL)) {
2217 if(catchStack.cursor >= 0){
2218 longjmp(catchStack.envs[catchStack.cursor], 1);
2219 }
2220 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
2221 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
2222 fatal_exit(1);
2223 }
2224 var = var1;
2225 RET_LABEL:;
2226 return var;
2227 }
2228 /* method poset$POSetElement$dtos for (self: POSetElement[nullable Object]): HashSet[nullable Object] */
2229 val* poset___poset__POSetElement___dtos(val* self) {
2230 val* var /* : HashSet[nullable Object] */;
2231 val* var1 /* : HashSet[nullable Object] */;
2232 var1 = self->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <self:POSetElement[nullable Object]> */
2233 if (unlikely(var1 == NULL)) {
2234 if(catchStack.cursor >= 0){
2235 longjmp(catchStack.envs[catchStack.cursor], 1);
2236 }
2237 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
2238 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
2239 fatal_exit(1);
2240 }
2241 var = var1;
2242 RET_LABEL:;
2243 return var;
2244 }
2245 /* method poset$POSetElement$dfroms for (self: POSetElement[nullable Object]): HashSet[nullable Object] */
2246 val* poset___poset__POSetElement___dfroms(val* self) {
2247 val* var /* : HashSet[nullable Object] */;
2248 val* var1 /* : HashSet[nullable Object] */;
2249 var1 = self->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <self:POSetElement[nullable Object]> */
2250 if (unlikely(var1 == NULL)) {
2251 if(catchStack.cursor >= 0){
2252 longjmp(catchStack.envs[catchStack.cursor], 1);
2253 }
2254 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
2255 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
2256 fatal_exit(1);
2257 }
2258 var = var1;
2259 RET_LABEL:;
2260 return var;
2261 }
2262 /* method poset$POSetElement$count for (self: POSetElement[nullable Object]): Int */
2263 long poset___poset__POSetElement___count(val* self) {
2264 long var /* : Int */;
2265 long var1 /* : Int */;
2266 var1 = self->attrs[COLOR_poset__POSetElement___count].l; /* _count on <self:POSetElement[nullable Object]> */
2267 var = var1;
2268 RET_LABEL:;
2269 return var;
2270 }
2271 /* method poset$POSetElement$count= for (self: POSetElement[nullable Object], Int) */
2272 void poset___poset__POSetElement___count_61d(val* self, long p0) {
2273 self->attrs[COLOR_poset__POSetElement___count].l = p0; /* _count on <self:POSetElement[nullable Object]> */
2274 RET_LABEL:;
2275 }
2276 /* method poset$POSetElement$greaters for (self: POSetElement[nullable Object]): Collection[nullable Object] */
2277 val* poset___poset__POSetElement___greaters(val* self) {
2278 val* var /* : Collection[nullable Object] */;
2279 val* var1 /* : HashSet[nullable Object] */;
2280 val* var3 /* : HashSet[nullable Object] */;
2281 {
2282 { /* Inline poset$POSetElement$tos (self) on <self:POSetElement[nullable Object]> */
2283 var3 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <self:POSetElement[nullable Object]> */
2284 if (unlikely(var3 == NULL)) {
2285 if(catchStack.cursor >= 0){
2286 longjmp(catchStack.envs[catchStack.cursor], 1);
2287 }
2288 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
2289 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
2290 fatal_exit(1);
2291 }
2292 var1 = var3;
2293 RET_LABEL2:(void)0;
2294 }
2295 }
2296 var = var1;
2297 goto RET_LABEL;
2298 RET_LABEL:;
2299 return var;
2300 }
2301 /* method poset$POSetElement$direct_greaters for (self: POSetElement[nullable Object]): Collection[nullable Object] */
2302 val* poset___poset__POSetElement___direct_greaters(val* self) {
2303 val* var /* : Collection[nullable Object] */;
2304 val* var1 /* : HashSet[nullable Object] */;
2305 val* var3 /* : HashSet[nullable Object] */;
2306 {
2307 { /* Inline poset$POSetElement$dtos (self) on <self:POSetElement[nullable Object]> */
2308 var3 = self->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on <self:POSetElement[nullable Object]> */
2309 if (unlikely(var3 == NULL)) {
2310 if(catchStack.cursor >= 0){
2311 longjmp(catchStack.envs[catchStack.cursor], 1);
2312 }
2313 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos");
2314 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534);
2315 fatal_exit(1);
2316 }
2317 var1 = var3;
2318 RET_LABEL2:(void)0;
2319 }
2320 }
2321 var = var1;
2322 goto RET_LABEL;
2323 RET_LABEL:;
2324 return var;
2325 }
2326 /* method poset$POSetElement$smallers for (self: POSetElement[nullable Object]): Collection[nullable Object] */
2327 val* poset___poset__POSetElement___smallers(val* self) {
2328 val* var /* : Collection[nullable Object] */;
2329 val* var1 /* : HashSet[nullable Object] */;
2330 val* var3 /* : HashSet[nullable Object] */;
2331 {
2332 { /* Inline poset$POSetElement$froms (self) on <self:POSetElement[nullable Object]> */
2333 var3 = self->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on <self:POSetElement[nullable Object]> */
2334 if (unlikely(var3 == NULL)) {
2335 if(catchStack.cursor >= 0){
2336 longjmp(catchStack.envs[catchStack.cursor], 1);
2337 }
2338 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms");
2339 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533);
2340 fatal_exit(1);
2341 }
2342 var1 = var3;
2343 RET_LABEL2:(void)0;
2344 }
2345 }
2346 var = var1;
2347 goto RET_LABEL;
2348 RET_LABEL:;
2349 return var;
2350 }
2351 /* method poset$POSetElement$direct_smallers for (self: POSetElement[nullable Object]): Collection[nullable Object] */
2352 val* poset___poset__POSetElement___direct_smallers(val* self) {
2353 val* var /* : Collection[nullable Object] */;
2354 val* var1 /* : HashSet[nullable Object] */;
2355 val* var3 /* : HashSet[nullable Object] */;
2356 {
2357 { /* Inline poset$POSetElement$dfroms (self) on <self:POSetElement[nullable Object]> */
2358 var3 = self->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on <self:POSetElement[nullable Object]> */
2359 if (unlikely(var3 == NULL)) {
2360 if(catchStack.cursor >= 0){
2361 longjmp(catchStack.envs[catchStack.cursor], 1);
2362 }
2363 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms");
2364 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535);
2365 fatal_exit(1);
2366 }
2367 var1 = var3;
2368 RET_LABEL2:(void)0;
2369 }
2370 }
2371 var = var1;
2372 goto RET_LABEL;
2373 RET_LABEL:;
2374 return var;
2375 }
2376 /* method poset$POSetElement$<= for (self: POSetElement[nullable Object], nullable Object): Bool */
2377 short int poset___poset__POSetElement____60d_61d(val* self, val* p0) {
2378 short int var /* : Bool */;
2379 short int var1 /* : Bool */;
2380 int cltype;
2381 int idtype;
2382 const struct type* type_struct;
2383 short int is_nullable;
2384 const char* var_class_name;
2385 val* var_t /* var t: nullable Object */;
2386 val* var2 /* : HashSet[nullable Object] */;
2387 val* var4 /* : HashSet[nullable Object] */;
2388 short int var5 /* : Bool */;
2389 /* Covariant cast for argument 0 (t) <p0:nullable Object> isa E */
2390 /* <p0:nullable Object> isa E */
2391 type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE];
2392 cltype = type_struct->color;
2393 idtype = type_struct->id;
2394 is_nullable = type_struct->is_nullable;
2395 if(p0 == NULL) {
2396 var1 = is_nullable;
2397 } else {
2398 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2399 var1 = 0;
2400 } else {
2401 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2402 }
2403 }
2404 if (unlikely(!var1)) {
2405 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2406 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
2407 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 591);
2408 fatal_exit(1);
2409 }
2410 var_t = p0;
2411 {
2412 { /* Inline poset$POSetElement$tos (self) on <self:POSetElement[nullable Object]> */
2413 var4 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <self:POSetElement[nullable Object]> */
2414 if (unlikely(var4 == NULL)) {
2415 if(catchStack.cursor >= 0){
2416 longjmp(catchStack.envs[catchStack.cursor], 1);
2417 }
2418 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
2419 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
2420 fatal_exit(1);
2421 }
2422 var2 = var4;
2423 RET_LABEL3:(void)0;
2424 }
2425 }
2426 {
2427 var5 = core___core__HashSet___core__abstract_collection__Collection__has(var2, var_t);
2428 }
2429 var = var5;
2430 goto RET_LABEL;
2431 RET_LABEL:;
2432 return var;
2433 }
2434 /* method poset$POSetElement$< for (self: POSetElement[nullable Object], nullable Object): Bool */
2435 short int poset___poset__POSetElement____60d(val* self, val* p0) {
2436 short int var /* : Bool */;
2437 short int var1 /* : Bool */;
2438 int cltype;
2439 int idtype;
2440 const struct type* type_struct;
2441 short int is_nullable;
2442 const char* var_class_name;
2443 val* var_t /* var t: nullable Object */;
2444 short int var2 /* : Bool */;
2445 val* var3 /* : nullable Object */;
2446 val* var5 /* : nullable Object */;
2447 short int var6 /* : Bool */;
2448 short int var7 /* : Bool */;
2449 short int var_ /* var : Bool */;
2450 val* var8 /* : HashSet[nullable Object] */;
2451 val* var10 /* : HashSet[nullable Object] */;
2452 short int var11 /* : Bool */;
2453 /* Covariant cast for argument 0 (t) <p0:nullable Object> isa E */
2454 /* <p0:nullable Object> isa E */
2455 type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE];
2456 cltype = type_struct->color;
2457 idtype = type_struct->id;
2458 is_nullable = type_struct->is_nullable;
2459 if(p0 == NULL) {
2460 var1 = is_nullable;
2461 } else {
2462 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2463 var1 = 0;
2464 } else {
2465 var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2466 }
2467 }
2468 if (unlikely(!var1)) {
2469 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2470 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
2471 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 606);
2472 fatal_exit(1);
2473 }
2474 var_t = p0;
2475 {
2476 { /* Inline poset$POSetElement$element (self) on <self:POSetElement[nullable Object]> */
2477 var5 = self->attrs[COLOR_poset__POSetElement___element].val; /* _element on <self:POSetElement[nullable Object]> */
2478 var3 = var5;
2479 RET_LABEL4:(void)0;
2480 }
2481 }
2482 if (var_t == NULL) {
2483 var6 = (var3 != NULL);
2484 } else {
2485 var7 = ((short int(*)(val* self, val* p0))((((long)var_t&3)?class_info[((long)var_t&3)]:var_t->class)->vft[COLOR_core__kernel__Object___33d_61d]))(var_t, var3); /* != on <var_t:nullable Object>*/
2486 var6 = var7;
2487 }
2488 var_ = var6;
2489 if (var6){
2490 {
2491 { /* Inline poset$POSetElement$tos (self) on <self:POSetElement[nullable Object]> */
2492 var10 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <self:POSetElement[nullable Object]> */
2493 if (unlikely(var10 == NULL)) {
2494 if(catchStack.cursor >= 0){
2495 longjmp(catchStack.envs[catchStack.cursor], 1);
2496 }
2497 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
2498 PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532);
2499 fatal_exit(1);
2500 }
2501 var8 = var10;
2502 RET_LABEL9:(void)0;
2503 }
2504 }
2505 {
2506 var11 = core___core__HashSet___core__abstract_collection__Collection__has(var8, var_t);
2507 }
2508 var2 = var11;
2509 } else {
2510 var2 = var_;
2511 }
2512 var = var2;
2513 goto RET_LABEL;
2514 RET_LABEL:;
2515 return var;
2516 }
2517 /* method poset$POSetElement$init for (self: POSetElement[nullable Object]) */
2518 void poset___poset__POSetElement___core__kernel__Object__init(val* self) {
2519 {
2520 ((void(*)(val* self))(self->class->vft[COLOR_poset___poset__POSetElement___core__kernel__Object__init]))(self); /* init on <self:POSetElement[nullable Object]>*/
2521 }
2522 RET_LABEL:;
2523 }