; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/290 Division 2/Problem C (C)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@visited = external dso_local global [26 x i32], align 16
@flag = external dso_local global i32, align 4
@l1 = external dso_local global i32, align 4
@l2 = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@q = external dso_local global %"class.std::priority_queue", align 8
@_Z4nameB5cxx11 = external dso_local global [100 x %"class.std::__cxx11::basic_string"], align 16
@adj = external dso_local global [26 x %"class.std::set"], align 16
@indegree = external dso_local global [26 x %"class.std::set"], align 16
@order = external dso_local global %"class.std::vector.6", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %34, %0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %37

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %31
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %32)
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !9

37:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %242, %37
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 5, ptr %4, align 4
  br label %245

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %188

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %184, %78, %49
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %68

54:                                               ; preds = %50
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %56
  %58 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef 0)
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i32
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %62
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %63, i64 noundef 0)
  %65 = load i8, ptr %64, align 1, !tbaa !11
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %60, %66
  br label %68

68:                                               ; preds = %54, %50
  %69 = phi i1 [ false, %50 ], [ %67, %54 ]
  br i1 %69, label %70, label %187

70:                                               ; preds = %68
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %75
  %77 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef nonnull align 8 dereferenceable(32) %76) #7
  br i1 %77, label %78, label %81

78:                                               ; preds = %70
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !5
  br label %50, !llvm.loop !12

81:                                               ; preds = %70
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %83
  %85 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %84) #7
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr @l1, align 4, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %88
  %90 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %89) #7
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr @l2, align 4, !tbaa !5
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @l1, ptr noundef nonnull align 4 dereferenceable(4) @l2)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr @l, align 4, !tbaa !5
  store i32 0, ptr @flag, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %169, %81
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = load i32, ptr @l, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 10, ptr %4, align 4
  br label %172

99:                                               ; preds = %94
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %101
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %102, i64 noundef %104)
  %106 = load i8, ptr %105, align 1, !tbaa !11
  %107 = sext i8 %106 to i32
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %109
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %110, i64 noundef %112)
  %114 = load i8, ptr %113, align 1, !tbaa !11
  %115 = sext i8 %114 to i32
  %116 = icmp eq i32 %107, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %99
  br label %169

118:                                              ; preds = %99
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %120
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %121, i64 noundef %123)
  %125 = load i8, ptr %124, align 1, !tbaa !11
  %126 = sext i8 %125 to i32
  %127 = sub nsw i32 %126, 97
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %131
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %132, i64 noundef %134)
  %136 = load i8, ptr %135, align 1, !tbaa !11
  %137 = sext i8 %136 to i32
  %138 = sub nsw i32 %137, 97
  store i32 %138, ptr %7, align 4, !tbaa !5
  %139 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %129, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %140 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 0
  %141 = extractvalue { ptr, i8 } %139, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 1
  %143 = extractvalue { ptr, i8 } %139, 1
  store i8 %143, ptr %142, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  %144 = load i32, ptr %5, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %145
  %147 = load i32, ptr %6, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %146, i64 noundef %148)
  %150 = load i8, ptr %149, align 1, !tbaa !11
  %151 = sext i8 %150 to i32
  %152 = sub nsw i32 %151, 97
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %155 = load i32, ptr %3, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %156
  %158 = load i32, ptr %6, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %157, i64 noundef %159)
  %161 = load i8, ptr %160, align 1, !tbaa !11
  %162 = sext i8 %161 to i32
  %163 = sub nsw i32 %162, 97
  store i32 %163, ptr %9, align 4, !tbaa !5
  %164 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %154, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %165 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %166 = extractvalue { ptr, i8 } %164, 0
  store ptr %166, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %168 = extractvalue { ptr, i8 } %164, 1
  store i8 %168, ptr %167, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  store i32 1, ptr @flag, align 4, !tbaa !5
  store i32 10, ptr %4, align 4
  br label %172

169:                                              ; preds = %117
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %6, align 4, !tbaa !5
  br label %94, !llvm.loop !13

172:                                              ; preds = %118, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr @flag, align 4, !tbaa !5
  %175 = icmp eq i32 %174, 0
  br i1 %175, label %176, label %184

176:                                              ; preds = %173
  %177 = load i32, ptr @l1, align 4, !tbaa !5
  %178 = load i32, ptr @l2, align 4, !tbaa !5
  %179 = icmp sgt i32 %177, %178
  br i1 %179, label %180, label %183

180:                                              ; preds = %176
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %239

183:                                              ; preds = %176
  br label %184

184:                                              ; preds = %183, %173
  %185 = load i32, ptr %5, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %5, align 4, !tbaa !5
  br label %50, !llvm.loop !12

187:                                              ; preds = %68
  br label %188

188:                                              ; preds = %187, %43
  br label %189

189:                                              ; preds = %193, %188
  %190 = load i32, ptr %5, align 4, !tbaa !5
  %191 = load i32, ptr @n, align 4, !tbaa !5
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %238

193:                                              ; preds = %189
  %194 = load i32, ptr %3, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %195
  %197 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %196, i64 noundef 0)
  %198 = load i8, ptr %197, align 1, !tbaa !11
  %199 = sext i8 %198 to i32
  %200 = sub nsw i32 %199, 97
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %203 = load i32, ptr %5, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %204
  %206 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %205, i64 noundef 0)
  %207 = load i8, ptr %206, align 1, !tbaa !11
  %208 = sext i8 %207 to i32
  %209 = sub nsw i32 %208, 97
  store i32 %209, ptr %11, align 4, !tbaa !5
  %210 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %202, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %211 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %212 = extractvalue { ptr, i8 } %210, 0
  store ptr %212, ptr %211, align 8
  %213 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %214 = extractvalue { ptr, i8 } %210, 1
  store i8 %214, ptr %213, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %215 = load i32, ptr %5, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %216
  %218 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %217, i64 noundef 0)
  %219 = load i8, ptr %218, align 1, !tbaa !11
  %220 = sext i8 %219 to i32
  %221 = sub nsw i32 %220, 97
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %224 = load i32, ptr %3, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %225
  %227 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %226, i64 noundef 0)
  %228 = load i8, ptr %227, align 1, !tbaa !11
  %229 = sext i8 %228 to i32
  %230 = sub nsw i32 %229, 97
  store i32 %230, ptr %13, align 4, !tbaa !5
  %231 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %223, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %232 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %233 = extractvalue { ptr, i8 } %231, 0
  store ptr %233, ptr %232, align 8
  %234 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %235 = extractvalue { ptr, i8 } %231, 1
  store i8 %235, ptr %234, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %236 = load i32, ptr %5, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %5, align 4, !tbaa !5
  br label %189, !llvm.loop !14

238:                                              ; preds = %189
  store i32 0, ptr %4, align 4
  br label %239

239:                                              ; preds = %238, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %240 = load i32, ptr %4, align 4
  switch i32 %240, label %245 [
    i32 0, label %241
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %3, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %3, align 4, !tbaa !5
  br label %38, !llvm.loop !15

245:                                              ; preds = %239, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %246 = load i32, ptr %4, align 4
  switch i32 %246, label %361 [
    i32 5, label %247
    i32 1, label %359
  ]

247:                                              ; preds = %245
  store i32 0, ptr @flag, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %248

248:                                              ; preds = %265, %247
  %249 = load i32, ptr %15, align 4, !tbaa !5
  %250 = icmp slt i32 %249, 26
  br i1 %250, label %252, label %251

251:                                              ; preds = %248
  store i32 15, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %268

252:                                              ; preds = %248
  %253 = load i32, ptr %15, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %254
  %256 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %255) #7
  %257 = icmp eq i64 %256, 0
  br i1 %257, label %258, label %264

258:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %259 = load i32, ptr %15, align 4, !tbaa !5
  %260 = sub nsw i32 0, %259
  store i32 %260, ptr %16, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25) @q, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %261 = load i32, ptr %15, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %262
  store i32 1, ptr %263, align 4, !tbaa !5
  store i32 1, ptr @flag, align 4, !tbaa !5
  br label %264

264:                                              ; preds = %258, %252
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %15, align 4, !tbaa !5
  br label %248, !llvm.loop !16

268:                                              ; preds = %251
  %269 = load i32, ptr @flag, align 4, !tbaa !5
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %274

271:                                              ; preds = %268
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %359

274:                                              ; preds = %268
  br label %275

275:                                              ; preds = %333, %274
  %276 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  %277 = xor i1 %276, true
  br i1 %277, label %278, label %334

278:                                              ; preds = %275
  %279 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = sub nsw i32 0, %280
  store i32 %281, ptr @cur, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  %282 = load i32, ptr @cur, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %283
  store i32 1, ptr %284, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  %285 = load i32, ptr @cur, align 4, !tbaa !5
  %286 = trunc i32 %285 to i8
  store i8 %286, ptr %17, align 1, !tbaa !11
  call void @_ZNSt6vectorIcSaIcEE9push_backEOc(ptr noundef nonnull align 8 dereferenceable(24) @order, ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %287 = load i32, ptr @cur, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %288
  %290 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %289) #7
  %291 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %290, ptr %291, align 8
  br label %292

292:                                              ; preds = %328, %278
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %293 = load i32, ptr @cur, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %294
  %296 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %295) #7
  %297 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %296, ptr %297, align 8
  %298 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br i1 %298, label %300, label %299

299:                                              ; preds = %292
  store i32 20, ptr %4, align 4
  br label %331

300:                                              ; preds = %292
  %301 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = icmp eq i32 %305, 1
  br i1 %306, label %307, label %310

307:                                              ; preds = %300
  %308 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %308, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %331

310:                                              ; preds = %300
  %311 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %313
  %315 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %314, ptr noundef nonnull align 4 dereferenceable(4) @cur)
  %316 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %318
  %320 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %319) #7
  %321 = icmp eq i64 %320, 0
  br i1 %321, label %322, label %326

322:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %323 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = sub nsw i32 0, %324
  store i32 %325, ptr %20, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25) @q, ptr noundef nonnull align 4 dereferenceable(4) %20)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %326

326:                                              ; preds = %322, %310
  br label %327

327:                                              ; preds = %326
  br label %328

328:                                              ; preds = %327
  %329 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef 0) #7
  %330 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %21, i32 0, i32 0
  store ptr %329, ptr %330, align 8
  br label %292, !llvm.loop !17

331:                                              ; preds = %307, %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %332 = load i32, ptr %4, align 4
  switch i32 %332, label %361 [
    i32 20, label %333
    i32 1, label %359
  ]

333:                                              ; preds = %331
  br label %275, !llvm.loop !18

334:                                              ; preds = %275
  %335 = call noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @order) #7
  %336 = icmp ne i64 %335, 26
  br i1 %336, label %337, label %340

337:                                              ; preds = %334
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %339 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %338, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %359

340:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %341

341:                                              ; preds = %354, %340
  %342 = load i32, ptr %22, align 4, !tbaa !5
  %343 = icmp slt i32 %342, 26
  br i1 %343, label %345, label %344

344:                                              ; preds = %341
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %357

345:                                              ; preds = %341
  %346 = load i32, ptr %22, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef %347) #7
  %349 = load i8, ptr %348, align 1, !tbaa !11
  %350 = sext i8 %349 to i32
  %351 = add nsw i32 %350, 97
  %352 = trunc i32 %351 to i8
  %353 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %352)
  br label %354

354:                                              ; preds = %345
  %355 = load i32, ptr %22, align 4, !tbaa !5
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %22, align 4, !tbaa !5
  br label %341, !llvm.loop !19

357:                                              ; preds = %344
  %358 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %359

359:                                              ; preds = %357, %337, %331, %271, %245
  %360 = load i32, ptr %1, align 4
  ret i32 %360

361:                                              ; preds = %331, %245
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEE9push_backEOc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@visited = external dso_local local_unnamed_addr global [26 x i32], align 16
@flag = external dso_local local_unnamed_addr global i32, align 4
@l1 = external dso_local global i32, align 4
@l2 = external dso_local global i32, align 4
@l = external dso_local local_unnamed_addr global i32, align 4
@cur = external dso_local global i32, align 4
@q = external dso_local global %"class.std::priority_queue", align 8
@_Z4nameB5cxx11 = external dso_local global [100 x %"class.std::__cxx11::basic_string"], align 16
@adj = external dso_local global [26 x %"class.std::set"], align 16
@indegree = external dso_local global [26 x %"class.std::set"], align 16
@order = external dso_local global %"class.std::vector.6", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %11 = load i32, ptr @n, align 4
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge96

.preheader83:                                     ; preds = %.lr.ph
  %13 = icmp sgt i32 %16, 0
  br i1 %13, label %.lr.ph95, label %._crit_edge96

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %indvars.iv
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr @n, align 4
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %.preheader83, !llvm.loop !5

.loopexit:                                        ; preds = %82, %.critedge..loopexit_crit_edge
  %.pre-phi = phi i64 [ %.pre134, %.critedge..loopexit_crit_edge ], [ %105, %82 ]
  %19 = phi i32 [ %78, %.critedge..loopexit_crit_edge ], [ %104, %82 ]
  %20 = icmp slt i64 %indvars.iv.next120, %.pre-phi
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  br i1 %20, label %.lr.ph95, label %._crit_edge96, !llvm.loop !7

.lr.ph95:                                         ; preds = %.preheader83, %.loopexit
  %21 = phi i32 [ %19, %.loopexit ], [ %16, %.preheader83 ]
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %.loopexit ], [ 0, %.preheader83 ]
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.loopexit ], [ 1, %.preheader83 ]
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next120, %22
  br i1 %23, label %.lr.ph89, label %.critedge

.lr.ph89:                                         ; preds = %.lr.ph95
  %24 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %indvars.iv119
  br label %25

25:                                               ; preds = %.lr.ph89, %.backedge
  %indvars.iv112 = phi i64 [ %indvars.iv110, %.lr.ph89 ], [ %indvars.iv.next113, %.backedge ]
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %24, i64 noundef 0)
  %27 = load i8, ptr %26, align 1, !tbaa !8
  %28 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %indvars.iv112
  %29 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef 0)
  %30 = load i8, ptr %29, align 1, !tbaa !8
  %31 = icmp eq i8 %27, %30
  br i1 %31, label %32, label %..critedge.loopexit_crit_edge

..critedge.loopexit_crit_edge:                    ; preds = %25
  %.pre.pre = load i32, ptr @n, align 4
  br label %.critedge

32:                                               ; preds = %25
  %33 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %28) #8
  br i1 %33, label %.backedge, label %37

.backedge:                                        ; preds = %._crit_edge, %._crit_edge.thread, %.thread, %32
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %34 = load i32, ptr @n, align 4
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next113, %35
  br i1 %36, label %25, label %.critedge, !llvm.loop !11

37:                                               ; preds = %32
  %38 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #8
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr @l1, align 4, !tbaa !12
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %28) #8
  %41 = trunc i64 %40 to i32
  store i32 %41, ptr @l2, align 4, !tbaa !12
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @l1, ptr noundef nonnull align 4 dereferenceable(4) @l2)
  %43 = load i32, ptr %42, align 4, !tbaa !12
  store i32 %43, ptr @l, align 4, !tbaa !12
  store i32 0, ptr @flag, align 4, !tbaa !12
  %44 = icmp sgt i32 %43, 1
  br i1 %44, label %.lr.ph87, label %._crit_edge.thread

45:                                               ; preds = %.lr.ph87
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %46 = load i32, ptr @l, align 4, !tbaa !12
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next108, %47
  br i1 %48, label %.lr.ph87, label %._crit_edge, !llvm.loop !14

.lr.ph87:                                         ; preds = %37, %45
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %45 ], [ 1, %37 ]
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %24, i64 noundef %indvars.iv107)
  %50 = load i8, ptr %49, align 1, !tbaa !8
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef %indvars.iv107)
  %52 = load i8, ptr %51, align 1, !tbaa !8
  %53 = icmp eq i8 %50, %52
  br i1 %53, label %45, label %.thread

.thread:                                          ; preds = %.lr.ph87
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %24, i64 noundef %indvars.iv107)
  %55 = load i8, ptr %54, align 1, !tbaa !8
  %56 = sext i8 %55 to i64
  %57 = add nsw i64 %56, -97
  %58 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef %indvars.iv107)
  %60 = load i8, ptr %59, align 1, !tbaa !8
  %61 = sext i8 %60 to i32
  %62 = add nsw i32 %61, -97
  store i32 %62, ptr %1, align 4, !tbaa !12
  %63 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %28, i64 noundef %indvars.iv107)
  %65 = load i8, ptr %64, align 1, !tbaa !8
  %66 = sext i8 %65 to i64
  %67 = add nsw i64 %66, -97
  %68 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %24, i64 noundef %indvars.iv107)
  %70 = load i8, ptr %69, align 1, !tbaa !8
  %71 = sext i8 %70 to i32
  %72 = add nsw i32 %71, -97
  store i32 %72, ptr %2, align 4, !tbaa !12
  %73 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  store i32 1, ptr @flag, align 4, !tbaa !12
  br label %.backedge

._crit_edge:                                      ; preds = %45
  %.pr.pre = load i32, ptr @flag, align 4, !tbaa !12
  %74 = icmp eq i32 %.pr.pre, 0
  br i1 %74, label %._crit_edge.thread, label %.backedge

._crit_edge.thread:                               ; preds = %37, %._crit_edge
  %75 = load i32, ptr @l1, align 4, !tbaa !12
  %76 = load i32, ptr @l2, align 4, !tbaa !12
  %77 = icmp sgt i32 %75, %76
  br i1 %77, label %107, label %.backedge

.critedge:                                        ; preds = %.backedge, %..critedge.loopexit_crit_edge, %.lr.ph95
  %78 = phi i32 [ %21, %.lr.ph95 ], [ %.pre.pre, %..critedge.loopexit_crit_edge ], [ %34, %.backedge ]
  %.163.in = phi i64 [ %indvars.iv.next120, %.lr.ph95 ], [ %indvars.iv112, %..critedge.loopexit_crit_edge ], [ %indvars.iv.next113, %.backedge ]
  %.163 = trunc i64 %.163.in to i32
  %79 = icmp sgt i32 %78, %.163
  br i1 %79, label %.lr.ph93, label %.critedge..loopexit_crit_edge

.critedge..loopexit_crit_edge:                    ; preds = %.critedge
  %.pre134 = sext i32 %78 to i64
  br label %.loopexit

.lr.ph93:                                         ; preds = %.critedge
  %80 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %indvars.iv119
  %sext = shl i64 %.163.in, 32
  %81 = ashr exact i64 %sext, 32
  br label %82

82:                                               ; preds = %.lr.ph93, %82
  %indvars.iv115 = phi i64 [ %81, %.lr.ph93 ], [ %indvars.iv.next116, %82 ]
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef 0)
  %84 = load i8, ptr %83, align 1, !tbaa !8
  %85 = sext i8 %84 to i64
  %86 = add nsw i64 %85, -97
  %87 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %88 = getelementptr inbounds [100 x %"class.std::__cxx11::basic_string"], ptr @_Z4nameB5cxx11, i64 0, i64 %indvars.iv115
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %88, i64 noundef 0)
  %90 = load i8, ptr %89, align 1, !tbaa !8
  %91 = sext i8 %90 to i32
  %92 = add nsw i32 %91, -97
  store i32 %92, ptr %3, align 4, !tbaa !12
  %93 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %87, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %94 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %88, i64 noundef 0)
  %95 = load i8, ptr %94, align 1, !tbaa !8
  %96 = sext i8 %95 to i64
  %97 = add nsw i64 %96, -97
  %98 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %97
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef 0)
  %100 = load i8, ptr %99, align 1, !tbaa !8
  %101 = sext i8 %100 to i32
  %102 = add nsw i32 %101, -97
  store i32 %102, ptr %4, align 4, !tbaa !12
  %103 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %98, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  %104 = load i32, ptr @n, align 4
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next116, %105
  br i1 %106, label %82, label %.loopexit, !llvm.loop !15

107:                                              ; preds = %._crit_edge.thread
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

._crit_edge96:                                    ; preds = %.loopexit, %0, %.preheader83
  store i32 0, ptr @flag, align 4, !tbaa !12
  br label %114

110:                                              ; preds = %122
  %111 = load i32, ptr @flag, align 4, !tbaa !12
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %123, label %.preheader81

.preheader81:                                     ; preds = %110
  %113 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  br i1 %113, label %._crit_edge102, label %.lr.ph101

114:                                              ; preds = %._crit_edge96, %122
  %indvars.iv123 = phi i64 [ 0, %._crit_edge96 ], [ %indvars.iv.next124, %122 ]
  %115 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %indvars.iv123
  %116 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %115) #8
  %117 = icmp eq i64 %116, 0
  br i1 %117, label %118, label %122

118:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %119 = trunc i64 %indvars.iv123 to i32
  %120 = sub i32 0, %119
  store i32 %120, ptr %5, align 4, !tbaa !12
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25) @q, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %121 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %indvars.iv123
  store i32 1, ptr %121, align 4, !tbaa !12
  store i32 1, ptr @flag, align 4, !tbaa !12
  br label %122

122:                                              ; preds = %114, %118
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next124, 26
  br i1 %exitcond.not, label %110, label %114, !llvm.loop !16

123:                                              ; preds = %110
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

.lr.ph101:                                        ; preds = %.preheader81, %._crit_edge100
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = sub nsw i32 0, %127
  store i32 %128, ptr @cur, align 4, !tbaa !12
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  %129 = load i32, ptr @cur, align 4, !tbaa !12
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %130
  store i32 1, ptr %131, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  %132 = trunc i32 %129 to i8
  store i8 %132, ptr %6, align 1, !tbaa !8
  call void @_ZNSt6vectorIcSaIcEE9push_backEOc(ptr noundef nonnull align 8 dereferenceable(24) @order, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %133 = load i32, ptr @cur, align 4, !tbaa !12
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %134
  %136 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %135) #8
  store ptr %136, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %137 = load i32, ptr @cur, align 4, !tbaa !12
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %138
  %140 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %139) #8
  store ptr %140, ptr %8, align 8
  %141 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %141, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %.lr.ph101, %166
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %143 = load i32, ptr %142, align 4, !tbaa !12
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [26 x i32], ptr @visited, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !12
  %147 = icmp eq i32 %146, 1
  br i1 %147, label %.thread77, label %150

.thread77:                                        ; preds = %.lr.ph99
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %283

150:                                              ; preds = %.lr.ph99
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %152 = load i32, ptr %151, align 4, !tbaa !12
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %153
  %155 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %154, ptr noundef nonnull align 4 dereferenceable(4) @cur)
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %157 = load i32, ptr %156, align 4, !tbaa !12
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [26 x %"class.std::set"], ptr @indegree, i64 0, i64 %158
  %160 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %159) #8
  %161 = icmp eq i64 %160, 0
  br i1 %161, label %162, label %166

162:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %164 = load i32, ptr %163, align 4, !tbaa !12
  %165 = sub nsw i32 0, %164
  store i32 %165, ptr %9, align 4, !tbaa !12
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25) @q, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %166

166:                                              ; preds = %162, %150
  %167 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %168 = load i32, ptr @cur, align 4, !tbaa !12
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [26 x %"class.std::set"], ptr @adj, i64 0, i64 %169
  %171 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %170) #8
  store ptr %171, ptr %8, align 8
  %172 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %172, label %.lr.ph99, label %._crit_edge100, !llvm.loop !17

._crit_edge100:                                   ; preds = %166, %.lr.ph101
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %173 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @q)
  br i1 %173, label %._crit_edge102, label %.lr.ph101

._crit_edge102:                                   ; preds = %._crit_edge100, %.preheader81
  %174 = call noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @order) #8
  %.not = icmp eq i64 %174, 26
  br i1 %.not, label %.preheader.preheader, label %280

.preheader.preheader:                             ; preds = %._crit_edge102
  %175 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 0) #8
  %176 = load i8, ptr %175, align 1, !tbaa !8
  %177 = add i8 %176, 97
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %177)
  %179 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 1) #8
  %180 = load i8, ptr %179, align 1, !tbaa !8
  %181 = add i8 %180, 97
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %181)
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 2) #8
  %184 = load i8, ptr %183, align 1, !tbaa !8
  %185 = add i8 %184, 97
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %185)
  %187 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 3) #8
  %188 = load i8, ptr %187, align 1, !tbaa !8
  %189 = add i8 %188, 97
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %189)
  %191 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 4) #8
  %192 = load i8, ptr %191, align 1, !tbaa !8
  %193 = add i8 %192, 97
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %193)
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 5) #8
  %196 = load i8, ptr %195, align 1, !tbaa !8
  %197 = add i8 %196, 97
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %197)
  %199 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 6) #8
  %200 = load i8, ptr %199, align 1, !tbaa !8
  %201 = add i8 %200, 97
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %201)
  %203 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 7) #8
  %204 = load i8, ptr %203, align 1, !tbaa !8
  %205 = add i8 %204, 97
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %205)
  %207 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 8) #8
  %208 = load i8, ptr %207, align 1, !tbaa !8
  %209 = add i8 %208, 97
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %209)
  %211 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 9) #8
  %212 = load i8, ptr %211, align 1, !tbaa !8
  %213 = add i8 %212, 97
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %213)
  %215 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 10) #8
  %216 = load i8, ptr %215, align 1, !tbaa !8
  %217 = add i8 %216, 97
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %217)
  %219 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 11) #8
  %220 = load i8, ptr %219, align 1, !tbaa !8
  %221 = add i8 %220, 97
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %221)
  %223 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 12) #8
  %224 = load i8, ptr %223, align 1, !tbaa !8
  %225 = add i8 %224, 97
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %225)
  %227 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 13) #8
  %228 = load i8, ptr %227, align 1, !tbaa !8
  %229 = add i8 %228, 97
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %229)
  %231 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 14) #8
  %232 = load i8, ptr %231, align 1, !tbaa !8
  %233 = add i8 %232, 97
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %233)
  %235 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 15) #8
  %236 = load i8, ptr %235, align 1, !tbaa !8
  %237 = add i8 %236, 97
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %237)
  %239 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 16) #8
  %240 = load i8, ptr %239, align 1, !tbaa !8
  %241 = add i8 %240, 97
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %241)
  %243 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 17) #8
  %244 = load i8, ptr %243, align 1, !tbaa !8
  %245 = add i8 %244, 97
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %245)
  %247 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 18) #8
  %248 = load i8, ptr %247, align 1, !tbaa !8
  %249 = add i8 %248, 97
  %250 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %249)
  %251 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 19) #8
  %252 = load i8, ptr %251, align 1, !tbaa !8
  %253 = add i8 %252, 97
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %253)
  %255 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 20) #8
  %256 = load i8, ptr %255, align 1, !tbaa !8
  %257 = add i8 %256, 97
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %257)
  %259 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 21) #8
  %260 = load i8, ptr %259, align 1, !tbaa !8
  %261 = add i8 %260, 97
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %261)
  %263 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 22) #8
  %264 = load i8, ptr %263, align 1, !tbaa !8
  %265 = add i8 %264, 97
  %266 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %265)
  %267 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 23) #8
  %268 = load i8, ptr %267, align 1, !tbaa !8
  %269 = add i8 %268, 97
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %269)
  %271 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 24) #8
  %272 = load i8, ptr %271, align 1, !tbaa !8
  %273 = add i8 %272, 97
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %273)
  %275 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @order, i64 noundef 25) #8
  %276 = load i8, ptr %275, align 1, !tbaa !8
  %277 = add i8 %276, 97
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %277)
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

280:                                              ; preds = %._crit_edge102
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %281, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %283

283:                                              ; preds = %.thread77, %107, %.preheader.preheader, %280, %123
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEE9push_backEOc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass