; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2016.02 (balancing)

; 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::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" }
%"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 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::initializer_list" = type { ptr, i64 }

@pfx = external dso_local global [1005 x [1005 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca %"class.std::set", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"class.std::map", align 8
  %14 = alloca %"class.std::map", align 8
  %15 = alloca %"class.std::map", align 8
  %16 = alloca %"class.std::map", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca %"class.std::initializer_list", align 8
  %39 = alloca [4 x i32], align 4
  store i32 0, ptr %1, align 4
  %40 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %41 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %42 = getelementptr i8, ptr %41, i64 -24
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %43
  %45 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %44, ptr noundef null)
  %46 = load ptr, ptr @stdin, align 8, !tbaa !8
  %47 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %46)
  %48 = load ptr, ptr @stdout, align 8, !tbaa !8
  %49 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %51 = load i32, ptr %2, align 4, !tbaa !11
  %52 = zext i32 %51 to i64
  %53 = call ptr @llvm.stacksave.p0()
  store ptr %53, ptr %5, align 8
  %54 = alloca i32, i64 %52, align 16
  store i64 %52, ptr %6, align 8
  %55 = load i32, ptr %2, align 4, !tbaa !11
  %56 = zext i32 %55 to i64
  %57 = alloca i32, i64 %56, align 16
  store i64 %56, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %92, %0
  %59 = load i32, ptr %8, align 4, !tbaa !11
  %60 = load i32, ptr %2, align 4, !tbaa !11
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %99

63:                                               ; preds = %58
  %64 = load i32, ptr %8, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %54, i64 %65
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %68 unwind label %95

68:                                               ; preds = %63
  %69 = load i32, ptr %8, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %57, i64 %70
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %73 unwind label %95

73:                                               ; preds = %68
  %74 = load i32, ptr %8, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %54, i64 %75
  %77 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %76)
          to label %78 unwind label %95

78:                                               ; preds = %73
  %79 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %80 = extractvalue { ptr, i8 } %77, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %82 = extractvalue { ptr, i8 } %77, 1
  store i8 %82, ptr %81, align 8
  %83 = load i32, ptr %8, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %57, i64 %84
  %86 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %85)
          to label %87 unwind label %95

87:                                               ; preds = %78
  %88 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %89 = extractvalue { ptr, i8 } %86, 0
  store ptr %89, ptr %88, align 8
  %90 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %91 = extractvalue { ptr, i8 } %86, 1
  store i8 %91, ptr %90, align 8
  br label %92

92:                                               ; preds = %87
  %93 = load i32, ptr %8, align 4, !tbaa !11
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !11
  br label %58, !llvm.loop !13

95:                                               ; preds = %78, %73, %68, %63
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %334

99:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store ptr %3, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %100 = load ptr, ptr %18, align 8, !tbaa !8
  %101 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %100) #8
  %102 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %103 = load ptr, ptr %18, align 8, !tbaa !8
  %104 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %103) #8
  %105 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  br label %106

106:                                              ; preds = %120, %99
  %107 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  br i1 %107, label %109, label %108

108:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %126

109:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %111 = load i32, ptr %110, align 4, !tbaa !11
  store i32 %111, ptr %21, align 4, !tbaa !11
  %112 = load i32, ptr %17, align 4, !tbaa !11
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %114 unwind label %122

114:                                              ; preds = %109
  store i32 %112, ptr %113, align 4, !tbaa !11
  %115 = load i32, ptr %21, align 4, !tbaa !11
  %116 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %117 unwind label %122

117:                                              ; preds = %114
  store i32 %115, ptr %116, align 4, !tbaa !11
  %118 = load i32, ptr %17, align 4, !tbaa !11
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %120

120:                                              ; preds = %117
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br label %106

122:                                              ; preds = %114, %109
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %9, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %333

126:                                              ; preds = %108
  store i32 1, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr %4, ptr %22, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %127 = load ptr, ptr %22, align 8, !tbaa !8
  %128 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %127) #8
  %129 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %128, ptr %129, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %130 = load ptr, ptr %22, align 8, !tbaa !8
  %131 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %130) #8
  %132 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  store ptr %131, ptr %132, align 8
  br label %133

133:                                              ; preds = %147, %126
  %134 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %134, label %136, label %135

135:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %153

136:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %138 = load i32, ptr %137, align 4, !tbaa !11
  store i32 %138, ptr %25, align 4, !tbaa !11
  %139 = load i32, ptr %17, align 4, !tbaa !11
  %140 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %141 unwind label %149

141:                                              ; preds = %136
  store i32 %139, ptr %140, align 4, !tbaa !11
  %142 = load i32, ptr %25, align 4, !tbaa !11
  %143 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %144 unwind label %149

144:                                              ; preds = %141
  store i32 %142, ptr %143, align 4, !tbaa !11
  %145 = load i32, ptr %17, align 4, !tbaa !11
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %147

147:                                              ; preds = %144
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br label %133

149:                                              ; preds = %141, %136
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %9, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %333

153:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !11
  br label %154

154:                                              ; preds = %178, %153
  %155 = load i32, ptr %26, align 4, !tbaa !11
  %156 = load i32, ptr %2, align 4, !tbaa !11
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %185

159:                                              ; preds = %154
  %160 = load i32, ptr %26, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %54, i64 %161
  %163 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %162)
          to label %164 unwind label %181

164:                                              ; preds = %159
  %165 = load i32, ptr %163, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %166
  %168 = load i32, ptr %26, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %57, i64 %169
  %171 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) %170)
          to label %172 unwind label %181

172:                                              ; preds = %164
  %173 = load i32, ptr %171, align 4, !tbaa !11
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1005 x i32], ptr %167, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !11
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %175, align 4, !tbaa !11
  br label %178

178:                                              ; preds = %172
  %179 = load i32, ptr %26, align 4, !tbaa !11
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %26, align 4, !tbaa !11
  br label %154, !llvm.loop !15

181:                                              ; preds = %164, %159
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %9, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %333

185:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 1, ptr %27, align 4, !tbaa !11
  br label %186

186:                                              ; preds = %237, %185
  %187 = load i32, ptr %27, align 4, !tbaa !11
  %188 = load i32, ptr %2, align 4, !tbaa !11
  %189 = icmp sle i32 %187, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  store i32 12, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %240

191:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 1, ptr %29, align 4, !tbaa !11
  br label %192

192:                                              ; preds = %233, %191
  %193 = load i32, ptr %29, align 4, !tbaa !11
  %194 = load i32, ptr %2, align 4, !tbaa !11
  %195 = icmp sle i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 15, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %236

197:                                              ; preds = %192
  %198 = load i32, ptr %27, align 4, !tbaa !11
  %199 = sub nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %200
  %202 = load i32, ptr %29, align 4, !tbaa !11
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [1005 x i32], ptr %201, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !11
  %206 = load i32, ptr %27, align 4, !tbaa !11
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %207
  %209 = load i32, ptr %29, align 4, !tbaa !11
  %210 = sub nsw i32 %209, 1
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [1005 x i32], ptr %208, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !11
  %214 = add nsw i32 %205, %213
  %215 = load i32, ptr %27, align 4, !tbaa !11
  %216 = sub nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %217
  %219 = load i32, ptr %29, align 4, !tbaa !11
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [1005 x i32], ptr %218, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !11
  %224 = sub nsw i32 %214, %223
  %225 = load i32, ptr %27, align 4, !tbaa !11
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %226
  %228 = load i32, ptr %29, align 4, !tbaa !11
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [1005 x i32], ptr %227, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !11
  %232 = add nsw i32 %231, %224
  store i32 %232, ptr %230, align 4, !tbaa !11
  br label %233

233:                                              ; preds = %197
  %234 = load i32, ptr %29, align 4, !tbaa !11
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %29, align 4, !tbaa !11
  br label %192, !llvm.loop !16

236:                                              ; preds = %196
  br label %237

237:                                              ; preds = %236
  %238 = load i32, ptr %27, align 4, !tbaa !11
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %27, align 4, !tbaa !11
  br label %186, !llvm.loop !17

240:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 2147483647, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %241

241:                                              ; preds = %317, %240
  %242 = load i32, ptr %31, align 4, !tbaa !11
  %243 = load i32, ptr %2, align 4, !tbaa !11
  %244 = icmp sle i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 18, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %320

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store i32 0, ptr %32, align 4, !tbaa !11
  br label %247

247:                                              ; preds = %309, %246
  %248 = load i32, ptr %32, align 4, !tbaa !11
  %249 = load i32, ptr %2, align 4, !tbaa !11
  %250 = icmp sle i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 21, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %316

252:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %253 = load i32, ptr %31, align 4, !tbaa !11
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %254
  %256 = load i32, ptr %32, align 4, !tbaa !11
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1005 x i32], ptr %255, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !11
  store i32 %259, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %260 = load i32, ptr %2, align 4, !tbaa !11
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %261
  %263 = load i32, ptr %32, align 4, !tbaa !11
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [1005 x i32], ptr %262, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !11
  %267 = load i32, ptr %33, align 4, !tbaa !11
  %268 = sub nsw i32 %266, %267
  store i32 %268, ptr %34, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %269 = load i32, ptr %31, align 4, !tbaa !11
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %270
  %272 = load i32, ptr %2, align 4, !tbaa !11
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [1005 x i32], ptr %271, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !11
  %276 = load i32, ptr %33, align 4, !tbaa !11
  %277 = sub nsw i32 %275, %276
  store i32 %277, ptr %35, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %278 = load i32, ptr %2, align 4, !tbaa !11
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %279
  %281 = load i32, ptr %2, align 4, !tbaa !11
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [1005 x i32], ptr %280, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !11
  %285 = load i32, ptr %34, align 4, !tbaa !11
  %286 = sub nsw i32 %284, %285
  %287 = load i32, ptr %35, align 4, !tbaa !11
  %288 = sub nsw i32 %286, %287
  %289 = load i32, ptr %33, align 4, !tbaa !11
  %290 = sub nsw i32 %288, %289
  store i32 %290, ptr %36, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #8
  %291 = load i32, ptr %33, align 4, !tbaa !11
  store i32 %291, ptr %39, align 4, !tbaa !11
  %292 = getelementptr inbounds i32, ptr %39, i64 1
  %293 = load i32, ptr %34, align 4, !tbaa !11
  store i32 %293, ptr %292, align 4, !tbaa !11
  %294 = getelementptr inbounds i32, ptr %39, i64 2
  %295 = load i32, ptr %35, align 4, !tbaa !11
  store i32 %295, ptr %294, align 4, !tbaa !11
  %296 = getelementptr inbounds i32, ptr %39, i64 3
  %297 = load i32, ptr %36, align 4, !tbaa !11
  store i32 %297, ptr %296, align 4, !tbaa !11
  %298 = getelementptr inbounds %"class.std::initializer_list", ptr %38, i32 0, i32 0
  store ptr %39, ptr %298, align 8, !tbaa !18
  %299 = getelementptr inbounds %"class.std::initializer_list", ptr %38, i32 0, i32 1
  store i64 4, ptr %299, align 8, !tbaa !21
  %300 = getelementptr inbounds { ptr, i64 }, ptr %38, i32 0, i32 0
  %301 = load ptr, ptr %300, align 8
  %302 = getelementptr inbounds { ptr, i64 }, ptr %38, i32 0, i32 1
  %303 = load i64, ptr %302, align 8
  %304 = invoke noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr %301, i64 %303)
          to label %305 unwind label %312

305:                                              ; preds = %252
  store i32 %304, ptr %37, align 4, !tbaa !11
  %306 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %307 unwind label %312

307:                                              ; preds = %305
  %308 = load i32, ptr %306, align 4, !tbaa !11
  store i32 %308, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %309

309:                                              ; preds = %307
  %310 = load i32, ptr %32, align 4, !tbaa !11
  %311 = add nsw i32 %310, 1
  store i32 %311, ptr %32, align 4, !tbaa !11
  br label %247, !llvm.loop !22

312:                                              ; preds = %305, %252
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %9, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %332

316:                                              ; preds = %251
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %31, align 4, !tbaa !11
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %31, align 4, !tbaa !11
  br label %241, !llvm.loop !23

320:                                              ; preds = %245
  %321 = load i32, ptr %30, align 4, !tbaa !11
  %322 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %321)
          to label %323 unwind label %328

323:                                              ; preds = %320
  %324 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %322, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %325 unwind label %328

325:                                              ; preds = %323
  store i32 0, ptr %1, align 4
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  %326 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %326)
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %327 = load i32, ptr %1, align 4
  ret i32 %327

328:                                              ; preds = %323, %320
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %9, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %10, align 4
  br label %332

332:                                              ; preds = %328, %312
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %333

333:                                              ; preds = %332, %181, %149, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  br label %334

334:                                              ; preds = %333, %95
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %335

335:                                              ; preds = %334
  %336 = load ptr, ptr %9, align 8
  %337 = load i32, ptr %10, align 4
  %338 = insertvalue { ptr, i32 } poison, ptr %336, 0
  %339 = insertvalue { ptr, i32 } %338, i32 %337, 1
  resume { ptr, i32 } %339
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 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)) #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)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr, i64) #7

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; 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)) #7

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
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 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 #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 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = !{!19, !9, i64 0}
!19 = !{!"_ZTSSt16initializer_listIiE", !9, i64 0, !20, i64 8}
!20 = !{!"long", !10, i64 0}
!21 = !{!19, !20, i64 8}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


; 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::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" }
%"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::map" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@pfx = external dso_local local_unnamed_addr global [1005 x [1005 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::set", align 8
  %3 = alloca %"class.std::set", align 8
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"class.std::map", align 8
  %6 = alloca %"class.std::map", align 8
  %7 = alloca %"class.std::map", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca [4 x i32], align 4
  %18 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %29 = load i32, ptr %1, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca i32, i64 %30, align 16
  %33 = load i32, ptr %1, align 4, !tbaa !11
  %34 = zext i32 %33 to i64
  %35 = alloca i32, i64 %34, align 16
  %36 = icmp sgt i32 %33, 0
  br i1 %36, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %49, %0
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 1, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %37 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  store ptr %37, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %38 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  store ptr %38, ptr %10, align 8
  %39 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %39, label %.lr.ph75, label %._crit_edge76

.lr.ph:                                           ; preds = %0, %49
  %indvars.iv = phi i64 [ %indvars.iv.next, %49 ], [ 0, %0 ]
  %40 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv
  %41 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
          to label %42 unwind label %53

42:                                               ; preds = %.lr.ph
  %43 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv
  %44 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %45 unwind label %53

45:                                               ; preds = %42
  %46 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %40)
          to label %47 unwind label %53

47:                                               ; preds = %45
  %48 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %49 unwind label %53

49:                                               ; preds = %47
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %1, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !13

53:                                               ; preds = %47, %45, %42, %.lr.ph
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %172

._crit_edge76:                                    ; preds = %65, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  store i32 1, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %55 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  store ptr %55, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %56 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  store ptr %56, ptr %13, align 8
  %57 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %57, label %.lr.ph78, label %._crit_edge79

.lr.ph75:                                         ; preds = %._crit_edge, %65
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %59 = load i32, ptr %58, align 4, !tbaa !11
  store i32 %59, ptr %11, align 4, !tbaa !11
  %60 = load i32, ptr %8, align 4, !tbaa !11
  %61 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %62 unwind label %70

62:                                               ; preds = %.lr.ph75
  store i32 %60, ptr %61, align 4, !tbaa !11
  %63 = load i32, ptr %11, align 4, !tbaa !11
  %64 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %65 unwind label %70

65:                                               ; preds = %62
  store i32 %63, ptr %64, align 4, !tbaa !11
  %66 = load i32, ptr %8, align 4, !tbaa !11
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %69 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %69, label %.lr.ph75, label %._crit_edge76

70:                                               ; preds = %62, %.lr.ph75
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %171

._crit_edge79:                                    ; preds = %81, %._crit_edge76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %72 = load i32, ptr %1, align 4, !tbaa !11
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph82, label %._crit_edge89

.lr.ph78:                                         ; preds = %._crit_edge76, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %75 = load i32, ptr %74, align 4, !tbaa !11
  store i32 %75, ptr %14, align 4, !tbaa !11
  %76 = load i32, ptr %8, align 4, !tbaa !11
  %77 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %78 unwind label %86

78:                                               ; preds = %.lr.ph78
  store i32 %76, ptr %77, align 4, !tbaa !11
  %79 = load i32, ptr %14, align 4, !tbaa !11
  %80 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %81 unwind label %86

81:                                               ; preds = %78
  store i32 %79, ptr %80, align 4, !tbaa !11
  %82 = load i32, ptr %8, align 4, !tbaa !11
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %85 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %85, label %.lr.ph78, label %._crit_edge79

86:                                               ; preds = %78, %.lr.ph78
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %171

.preheader71:                                     ; preds = %97
  %.not87 = icmp slt i32 %104, 1
  br i1 %.not87, label %._crit_edge89, label %.preheader70.preheader

.preheader70.preheader:                           ; preds = %.preheader71
  %88 = add nuw i32 %104, 1
  %wide.trip.count109 = zext i32 %88 to i64
  %.pre118.pre = load i32, ptr @pfx, align 16, !tbaa !11
  %89 = zext nneg i32 %104 to i64
  %xtraiter = and i64 %89, 1
  %90 = icmp eq i32 %88, 2
  %unroll_iter = and i64 %89, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader70

.lr.ph82:                                         ; preds = %._crit_edge79, %97
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %97 ], [ 0, %._crit_edge79 ]
  %91 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv100
  %92 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %91)
          to label %93 unwind label %107

93:                                               ; preds = %.lr.ph82
  %94 = load i32, ptr %92, align 4, !tbaa !11
  %95 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv100
  %96 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %95)
          to label %97 unwind label %107

97:                                               ; preds = %93
  %98 = sext i32 %94 to i64
  %99 = load i32, ptr %96, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %98, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %101, align 4, !tbaa !11
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %104 = load i32, ptr %1, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next101, %105
  br i1 %106, label %.lr.ph82, label %.preheader71, !llvm.loop !15

107:                                              ; preds = %93, %.lr.ph82
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %171

.preheader70:                                     ; preds = %.preheader70.preheader, %._crit_edge86
  %.pre118 = phi i32 [ %.pre118.pre, %.preheader70.preheader ], [ %.pre, %._crit_edge86 ]
  %indvars.iv106 = phi i64 [ 1, %.preheader70.preheader ], [ %indvars.iv.next107, %._crit_edge86 ]
  %109 = add nsw i64 %indvars.iv106, -1
  %.phi.trans.insert = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv106, i64 0
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !11
  br i1 %90, label %._crit_edge86.unr-lcssa, label %.preheader70.new

._crit_edge89:                                    ; preds = %._crit_edge86, %._crit_edge79, %.preheader71
  %110 = phi i32 [ %104, %.preheader71 ], [ %72, %._crit_edge79 ], [ %104, %._crit_edge86 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 2147483647, ptr %15, align 4, !tbaa !11
  %.not5994 = icmp slt i32 %110, 0
  br i1 %.not5994, label %._crit_edge96, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge89
  %111 = getelementptr inbounds i8, ptr %17, i64 4
  %112 = getelementptr inbounds i8, ptr %17, i64 8
  %113 = getelementptr inbounds i8, ptr %17, i64 12
  br label %.preheader

._crit_edge86.unr-lcssa:                          ; preds = %.preheader70.new, %.preheader70
  %.unr = phi i32 [ %.pre118, %.preheader70 ], [ %131, %.preheader70.new ]
  %.unr134 = phi i32 [ %.pre, %.preheader70 ], [ %136, %.preheader70.new ]
  %indvars.iv103.unr = phi i64 [ 1, %.preheader70 ], [ %indvars.iv.next104.1, %.preheader70.new ]
  br i1 %lcmp.mod.not, label %._crit_edge86, label %._crit_edge86.epilog-lcssa

._crit_edge86.epilog-lcssa:                       ; preds = %._crit_edge86.unr-lcssa
  %114 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %109, i64 %indvars.iv103.unr
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = add nsw i32 %.unr134, %115
  %117 = sub i32 %116, %.unr
  %118 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv106, i64 %indvars.iv103.unr
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = add nsw i32 %117, %119
  store i32 %120, ptr %118, align 4, !tbaa !11
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge86.unr-lcssa, %._crit_edge86.epilog-lcssa
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count109
  br i1 %exitcond110.not, label %._crit_edge89, label %.preheader70, !llvm.loop !16

.preheader70.new:                                 ; preds = %.preheader70, %.preheader70.new
  %121 = phi i32 [ %131, %.preheader70.new ], [ %.pre118, %.preheader70 ]
  %122 = phi i32 [ %136, %.preheader70.new ], [ %.pre, %.preheader70 ]
  %indvars.iv103 = phi i64 [ %indvars.iv.next104.1, %.preheader70.new ], [ 1, %.preheader70 ]
  %niter = phi i64 [ %niter.next.1, %.preheader70.new ], [ 0, %.preheader70 ]
  %123 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %109, i64 %indvars.iv103
  %124 = load i32, ptr %123, align 4, !tbaa !11
  %125 = add nsw i32 %122, %124
  %126 = sub i32 %125, %121
  %127 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv106, i64 %indvars.iv103
  %128 = load i32, ptr %127, align 4, !tbaa !11
  %129 = add nsw i32 %126, %128
  store i32 %129, ptr %127, align 4, !tbaa !11
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %130 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %109, i64 %indvars.iv.next104
  %131 = load i32, ptr %130, align 4, !tbaa !11
  %132 = add nsw i32 %129, %131
  %133 = sub i32 %132, %124
  %134 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv106, i64 %indvars.iv.next104
  %135 = load i32, ptr %134, align 4, !tbaa !11
  %136 = add nsw i32 %133, %135
  store i32 %136, ptr %134, align 4, !tbaa !11
  %indvars.iv.next104.1 = add nuw nsw i64 %indvars.iv103, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge86.unr-lcssa, label %.preheader70.new, !llvm.loop !17

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge93
  %137 = phi i32 [ 2147483647, %.preheader.preheader ], [ %141, %._crit_edge93 ]
  %138 = phi i32 [ %110, %.preheader.preheader ], [ %142, %._crit_edge93 ]
  %indvars.iv114 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next115, %._crit_edge93 ]
  %.not6090 = icmp slt i32 %138, 0
  br i1 %.not6090, label %.preheader.._crit_edge93_crit_edge, label %.lr.ph92

.preheader.._crit_edge93_crit_edge:               ; preds = %.preheader
  %.pre120 = sext i32 %138 to i64
  br label %._crit_edge93

._crit_edge96:                                    ; preds = %._crit_edge93, %._crit_edge89
  %139 = phi i32 [ 2147483647, %._crit_edge89 ], [ %141, %._crit_edge93 ]
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %139)
          to label %165 unwind label %168

._crit_edge93:                                    ; preds = %158, %.preheader.._crit_edge93_crit_edge
  %.pre-phi = phi i64 [ %.pre120, %.preheader.._crit_edge93_crit_edge ], [ %162, %158 ]
  %141 = phi i32 [ %137, %.preheader.._crit_edge93_crit_edge ], [ %160, %158 ]
  %142 = phi i32 [ %138, %.preheader.._crit_edge93_crit_edge ], [ %161, %158 ]
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %.not59.not = icmp slt i64 %indvars.iv114, %.pre-phi
  br i1 %.not59.not, label %.preheader, label %._crit_edge96, !llvm.loop !18

.lr.ph92:                                         ; preds = %.preheader, %158
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %158 ], [ 0, %.preheader ]
  %143 = phi i32 [ %161, %158 ], [ %138, %.preheader ]
  %144 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv114, i64 %indvars.iv111
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = sext i32 %143 to i64
  %147 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %146, i64 %indvars.iv111
  %148 = load i32, ptr %147, align 4, !tbaa !11
  %149 = sub nsw i32 %148, %145
  %150 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %indvars.iv114, i64 %146
  %151 = load i32, ptr %150, align 4, !tbaa !11
  %152 = sub nsw i32 %151, %145
  %153 = getelementptr inbounds [1005 x [1005 x i32]], ptr @pfx, i64 0, i64 %146, i64 %146
  %154 = load i32, ptr %153, align 4, !tbaa !11
  %155 = add i32 %149, %151
  %156 = sub i32 %154, %155
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  store i32 %145, ptr %17, align 4, !tbaa !11
  store i32 %149, ptr %111, align 4, !tbaa !11
  store i32 %152, ptr %112, align 4, !tbaa !11
  store i32 %156, ptr %113, align 4, !tbaa !11
  %157 = invoke noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr nonnull %17, i64 4)
          to label %158 unwind label %163

158:                                              ; preds = %.lr.ph92
  store i32 %157, ptr %16, align 4, !tbaa !11
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %160 = load i32, ptr %159, align 4, !tbaa !11
  store i32 %160, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %161 = load i32, ptr %1, align 4, !tbaa !11
  %162 = sext i32 %161 to i64
  %.not60.not = icmp slt i64 %indvars.iv111, %162
  br i1 %.not60.not, label %.lr.ph92, label %._crit_edge93, !llvm.loop !20

163:                                              ; preds = %.lr.ph92
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  br label %170

165:                                              ; preds = %._crit_edge96
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %167 unwind label %168

167:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  call void @llvm.stackrestore.p0(ptr %31)
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

168:                                              ; preds = %165, %._crit_edge96
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %170

170:                                              ; preds = %168, %163
  %.pn = phi { ptr, i32 } [ %164, %163 ], [ %169, %168 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %171

171:                                              ; preds = %170, %107, %86, %70
  %.pn63 = phi { ptr, i32 } [ %71, %70 ], [ %87, %86 ], [ %108, %107 ], [ %.pn, %170 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  br label %172

172:                                              ; preds = %171, %53
  %.pn65 = phi { ptr, i32 } [ %54, %53 ], [ %.pn63, %171 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn65
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) 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) #3

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 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 #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 #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 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 #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3maxIiET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #7

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; 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 #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)) #7

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 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 #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 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = distinct !{!20, !14}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass