+/* method poset#POSet#has_edge for (self: POSet[nullable Object], nullable Object, nullable Object): Bool */
+short int poset___poset__POSet___has_edge(val* self, val* p0, val* p1) {
+short int var /* : Bool */;
+short int var1 /* : Bool */;
+int cltype;
+int idtype;
+const struct type* type_struct;
+short int is_nullable;
+const char* var_class_name;
+short int var2 /* : Bool */;
+int cltype3;
+int idtype4;
+const struct type* type_struct5;
+short int is_nullable6;
+const char* var_class_name7;
+val* var_f /* var f: nullable Object */;
+val* var_t /* var t: nullable Object */;
+val* var8 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
+val* var10 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
+val* var11 /* : RemovableCollection[nullable Object] */;
+short int var12 /* : Bool */;
+short int var13 /* : Bool */;
+val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
+val* var16 /* : HashMap[nullable Object, POSetElement[nullable Object]] */;
+val* var17 /* : nullable Object */;
+val* var_fe /* var fe: POSetElement[nullable Object] */;
+val* var18 /* : HashSet[nullable Object] */;
+val* var20 /* : HashSet[nullable Object] */;
+short int var21 /* : Bool */;
+/* Covariant cast for argument 0 (f) <p0:nullable Object> isa E */
+/* <p0:nullable Object> isa E */
+type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
+cltype = type_struct->color;
+idtype = type_struct->id;
+is_nullable = type_struct->is_nullable;
+if(p0 == NULL) {
+var1 = is_nullable;
+} else {
+if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
+var1 = 0;
+} else {
+var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
+}
+}
+if (unlikely(!var1)) {
+var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
+PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
+PRINT_ERROR(" (%s:%d)\n", FILE_poset, 208);
+fatal_exit(1);
+}
+/* Covariant cast for argument 1 (t) <p1:nullable Object> isa E */
+/* <p1:nullable Object> isa E */
+type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet___35dE];
+cltype3 = type_struct5->color;
+idtype4 = type_struct5->id;
+is_nullable6 = type_struct5->is_nullable;
+if(p1 == NULL) {
+var2 = is_nullable6;
+} else {
+if(cltype3 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
+var2 = 0;
+} else {
+var2 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4;
+}
+}
+if (unlikely(!var2)) {
+var_class_name7 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
+PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name7);
+PRINT_ERROR(" (%s:%d)\n", FILE_poset, 208);
+fatal_exit(1);
+}
+var_f = p0;
+var_t = p1;
+{
+{ /* Inline poset#POSet#elements (self) on <self:POSet[nullable Object]> */
+var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
+if (unlikely(var10 == NULL)) {
+PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
+PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82);
+fatal_exit(1);
+}
+var8 = var10;
+RET_LABEL9:(void)0;
+}
+}
+{
+var11 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var8);
+}
+{
+var12 = ((short int(*)(val* self, val* p0))((((long)var11&3)?class_info[((long)var11&3)]:var11->class)->vft[COLOR_standard__abstract_collection__Collection__has]))(var11, var_f); /* has on <var11:RemovableCollection[nullable Object]>*/
+}
+var13 = !var12;
+if (var13){
+var = 0;
+goto RET_LABEL;
+} else {
+}
+{
+{ /* Inline poset#POSet#elements (self) on <self:POSet[nullable Object]> */
+var16 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on <self:POSet[nullable Object]> */
+if (unlikely(var16 == NULL)) {
+PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements");
+PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82);
+fatal_exit(1);
+}
+var14 = var16;
+RET_LABEL15:(void)0;
+}
+}
+{
+var17 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var14, var_f);
+}
+var_fe = var17;
+{
+{ /* Inline poset#POSetElement#tos (var_fe) on <var_fe:POSetElement[nullable Object]> */
+var20 = var_fe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on <var_fe:POSetElement[nullable Object]> */
+if (unlikely(var20 == NULL)) {
+PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos");
+PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406);
+fatal_exit(1);
+}
+var18 = var20;
+RET_LABEL19:(void)0;
+}
+}
+{
+var21 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var18, var_t);
+}
+var = var21;
+goto RET_LABEL;
+RET_LABEL:;
+return var;
+}