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

; 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"

%"struct.std::pair" = type { i32, i32 }
%"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::basic_ostream" = type { ptr, %"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 }
%"struct.std::pair.0" = 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
@h = external dso_local global [2001 x %"struct.std::pair"], align 16
@d = external dso_local global %"class.std::set", align 8
@res = external dso_local global [2001 x [3 x i32]], align 16
@v = external dso_local global [2001 x [3 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 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 %"struct.std::pair.0", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = 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 %11

11:                                               ; preds = %37, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %18
  %20 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %20)
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %25
  %27 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 1
  store i32 %23, ptr %27, align 4, !tbaa !9
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %29
  %31 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %32 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @d, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = getelementptr inbounds { ptr, i8 }, ptr %4, i32 0, i32 0
  %34 = extractvalue { ptr, i8 } %32, 0
  store ptr %34, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i8 }, ptr %4, i32 0, i32 1
  %36 = extractvalue { ptr, i8 } %32, 1
  store i8 %36, ptr %35, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %37

37:                                               ; preds = %16
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

40:                                               ; preds = %15
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @d) #7
  %44 = sub i64 %42, %43
  %45 = icmp ule i64 %44, 1
  br i1 %45, label %46, label %48

46:                                               ; preds = %40
  %47 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  br label %212

48:                                               ; preds = %40
  %49 = call i32 @puts(ptr noundef @.str.3)
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds %"struct.std::pair", ptr @h, i64 %51
  call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef @h, ptr noundef %52)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %113, %48
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %116

58:                                               ; preds = %53
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %60
  %62 = getelementptr inbounds %"struct.std::pair", ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %65
  %67 = getelementptr inbounds [3 x i32], ptr %66, i64 0, i64 0
  store i32 %63, ptr %67, align 4, !tbaa !5
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %69
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !13
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %74
  %76 = getelementptr inbounds [3 x i32], ptr %75, i64 0, i64 0
  store i32 %72, ptr %76, align 4, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %78
  %80 = getelementptr inbounds %"struct.std::pair", ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %83
  %85 = getelementptr inbounds [3 x i32], ptr %84, i64 0, i64 1
  store i32 %81, ptr %85, align 4, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %87
  %89 = getelementptr inbounds %"struct.std::pair", ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !13
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %92
  %94 = getelementptr inbounds [3 x i32], ptr %93, i64 0, i64 1
  store i32 %90, ptr %94, align 4, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %96
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %101
  %103 = getelementptr inbounds [3 x i32], ptr %102, i64 0, i64 2
  store i32 %99, ptr %103, align 4, !tbaa !5
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %105
  %107 = getelementptr inbounds %"struct.std::pair", ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %110
  %112 = getelementptr inbounds [3 x i32], ptr %111, i64 0, i64 2
  store i32 %108, ptr %112, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %58
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %5, align 4, !tbaa !5
  br label %53, !llvm.loop !14

116:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %145, %116
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %121, label %148

121:                                              ; preds = %117
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %123
  %125 = getelementptr inbounds [3 x i32], ptr %124, i64 0, i64 1
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sub nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %129
  %131 = getelementptr inbounds [3 x i32], ptr %130, i64 0, i64 1
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = icmp eq i32 %126, %132
  br i1 %133, label %134, label %144

134:                                              ; preds = %121
  %135 = load i32, ptr %6, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %136
  %138 = getelementptr inbounds [3 x i32], ptr %137, i64 0, i64 1
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sub nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %141
  %143 = getelementptr inbounds [3 x i32], ptr %142, i64 0, i64 1
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %138, ptr noundef nonnull align 4 dereferenceable(4) %143) #7
  br label %148

144:                                              ; preds = %121
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %6, align 4, !tbaa !5
  br label %117, !llvm.loop !15

148:                                              ; preds = %134, %117
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %6, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %179, %148
  %152 = load i32, ptr %6, align 4, !tbaa !5
  %153 = load i32, ptr @n, align 4, !tbaa !5
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %182

155:                                              ; preds = %151
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %157
  %159 = getelementptr inbounds [3 x i32], ptr %158, i64 0, i64 2
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = load i32, ptr %6, align 4, !tbaa !5
  %162 = sub nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %163
  %165 = getelementptr inbounds [3 x i32], ptr %164, i64 0, i64 2
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = icmp eq i32 %160, %166
  br i1 %167, label %168, label %178

168:                                              ; preds = %155
  %169 = load i32, ptr %6, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %170
  %172 = getelementptr inbounds [3 x i32], ptr %171, i64 0, i64 2
  %173 = load i32, ptr %6, align 4, !tbaa !5
  %174 = sub nsw i32 %173, 1
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %175
  %177 = getelementptr inbounds [3 x i32], ptr %176, i64 0, i64 2
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %172, ptr noundef nonnull align 4 dereferenceable(4) %177) #7
  br label %182

178:                                              ; preds = %155
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %6, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %6, align 4, !tbaa !5
  br label %151, !llvm.loop !16

182:                                              ; preds = %168, %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %208, %182
  %184 = load i32, ptr %7, align 4, !tbaa !5
  %185 = icmp slt i32 %184, 3
  br i1 %185, label %187, label %186

186:                                              ; preds = %183
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %211

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %188

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

192:                                              ; preds = %188
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %206

193:                                              ; preds = %188
  %194 = load i32, ptr %9, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %195
  %197 = load i32, ptr %7, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [3 x i32], ptr %196, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %200)
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %201, ptr noundef @.str.4)
  br label %203

203:                                              ; preds = %193
  %204 = load i32, ptr %9, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %9, align 4, !tbaa !5
  br label %188, !llvm.loop !17

206:                                              ; preds = %192
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  br label %208

208:                                              ; preds = %206
  %209 = load i32, ptr %7, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %7, align 4, !tbaa !5
  br label %183, !llvm.loop !18

211:                                              ; preds = %186
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %212

212:                                              ; preds = %211, %46
  %213 = load i32, ptr %1, align 4
  ret i32 %213
}

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

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

; 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 dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

declare i32 @puts(ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) #5

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

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

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

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 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 = { 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 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 = { 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 = !{!10, !6, i64 4}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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"

%"struct.std::pair" = type { i32, i32 }
%"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::basic_ostream" = type { ptr, %"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 }

@n = external dso_local global i32, align 4
@h = external dso_local global [2001 x %"struct.std::pair"], align 16
@d = external dso_local global %"class.std::set", align 8
@res = external dso_local global [2001 x [3 x i32]], align 16
@v = external dso_local local_unnamed_addr global [2001 x [3 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre97 = sext i32 %2 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre97, %.._crit_edge_crit_edge ], [ %13, %.lr.ph ]
  %4 = tail call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @d) #7
  %5 = sub i64 %.pre-phi, %4
  %6 = icmp ult i64 %5, 2
  br i1 %6, label %15, label %17

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %7 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %indvars.iv
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = getelementptr inbounds i8, ptr %7, i64 4
  %10 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %10, ptr %9, align 4, !tbaa !9
  %11 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @d, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %._crit_edge, !llvm.loop !11

15:                                               ; preds = %._crit_edge
  %16 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

17:                                               ; preds = %._crit_edge
  %18 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds %"struct.std::pair", ptr @h, i64 %20
  tail call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef nonnull @h, ptr noundef nonnull %21)
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph59.preheader, label %.loopexit48

.lr.ph59.preheader:                               ; preds = %17
  %wide.trip.count = zext nneg i32 %22 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %24 = icmp eq i32 %22, 1
  br i1 %24, label %.preheader47.unr-lcssa, label %.lr.ph59.preheader.new

.lr.ph59.preheader.new:                           ; preds = %.lr.ph59.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph59

.preheader47.unr-lcssa:                           ; preds = %.lr.ph59, %.lr.ph59.preheader
  %indvars.iv77.unr = phi i64 [ 0, %.lr.ph59.preheader ], [ %indvars.iv.next78.1, %.lr.ph59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader47, label %.lr.ph59.epil

.lr.ph59.epil:                                    ; preds = %.preheader47.unr-lcssa
  %25 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %indvars.iv77.unr
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !9
  %28 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv77.unr
  store i32 %27, ptr %28, align 4, !tbaa !5
  %29 = load i32, ptr %25, align 8, !tbaa !13
  %30 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv77.unr
  store i32 %29, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %28, i64 4
  store i32 %27, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %30, i64 4
  store i32 %29, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %28, i64 8
  store i32 %27, ptr %33, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %30, i64 8
  store i32 %29, ptr %34, align 4, !tbaa !5
  br label %.preheader47

.preheader47:                                     ; preds = %.preheader47.unr-lcssa, %.lr.ph59.epil
  %.not = icmp eq i32 %22, 1
  br i1 %.not, label %.loopexit48, label %.lr.ph62.preheader

.lr.ph62.preheader:                               ; preds = %.preheader47
  %wide.trip.count83 = zext nneg i32 %22 to i64
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @v, i64 4), align 4, !tbaa !5
  br label %.lr.ph62

.lr.ph59:                                         ; preds = %.lr.ph59, %.lr.ph59.preheader.new
  %indvars.iv77 = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %indvars.iv.next78.1, %.lr.ph59 ]
  %niter = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %niter.next.1, %.lr.ph59 ]
  %35 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %indvars.iv77
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv77
  store i32 %37, ptr %38, align 8, !tbaa !5
  %39 = load i32, ptr %35, align 16, !tbaa !13
  %40 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv77
  store i32 %39, ptr %40, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %38, i64 4
  store i32 %37, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %40, i64 4
  store i32 %39, ptr %42, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %38, i64 8
  store i32 %37, ptr %43, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %40, i64 8
  store i32 %39, ptr %44, align 8, !tbaa !5
  %indvars.iv.next78 = or disjoint i64 %indvars.iv77, 1
  %45 = getelementptr inbounds [2001 x %"struct.std::pair"], ptr @h, i64 0, i64 %indvars.iv.next78
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv.next78
  store i32 %47, ptr %48, align 4, !tbaa !5
  %49 = load i32, ptr %45, align 8, !tbaa !13
  %50 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv.next78
  store i32 %49, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %48, i64 4
  store i32 %47, ptr %51, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %50, i64 4
  store i32 %49, ptr %52, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 %47, ptr %53, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %50, i64 8
  store i32 %49, ptr %54, align 4, !tbaa !5
  %indvars.iv.next78.1 = add nuw nsw i64 %indvars.iv77, 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 %.preheader47.unr-lcssa, label %.lr.ph59, !llvm.loop !14

.lr.ph62:                                         ; preds = %.lr.ph62.preheader, %64
  %55 = phi i32 [ %.pre, %.lr.ph62.preheader ], [ %57, %64 ]
  %indvars.iv80 = phi i64 [ 1, %.lr.ph62.preheader ], [ %indvars.iv.next81, %64 ]
  %56 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv80, i64 1
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp eq i32 %57, %55
  br i1 %58, label %59, label %64

59:                                               ; preds = %.lr.ph62
  %60 = add nsw i64 %indvars.iv80, -1
  %61 = trunc nuw nsw i64 %indvars.iv80 to i32
  %62 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv80, i64 1
  %63 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %60, i64 1
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(4) %63) #7
  %.pre95 = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit48

64:                                               ; preds = %.lr.ph62
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %.loopexit48, label %.lr.ph62, !llvm.loop !15

.loopexit48:                                      ; preds = %64, %17, %.preheader47, %59
  %65 = phi i32 [ %.pre95, %59 ], [ %22, %.preheader47 ], [ %22, %17 ], [ %22, %64 ]
  %.04151 = phi i32 [ %61, %59 ], [ 1, %.preheader47 ], [ 1, %17 ], [ %22, %64 ]
  %66 = zext i32 %.04151 to i64
  br label %67

67:                                               ; preds = %70, %.loopexit48
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %70 ], [ %66, %.loopexit48 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %68 = trunc nuw i64 %indvars.iv.next86 to i32
  %69 = icmp sgt i32 %65, %68
  br i1 %69, label %70, label %.loopexit46

70:                                               ; preds = %67
  %71 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv.next86, i64 2
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = getelementptr inbounds [2001 x [3 x i32]], ptr @v, i64 0, i64 %indvars.iv85, i64 2
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = icmp eq i32 %72, %74
  br i1 %75, label %76, label %67, !llvm.loop !16

76:                                               ; preds = %70
  %77 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv.next86, i64 2
  %78 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv85, i64 2
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %78) #7
  %.pre96 = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit46

.loopexit46:                                      ; preds = %67, %76
  %79 = phi i32 [ %.pre96, %76 ], [ %65, %67 ]
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph65, label %._crit_edge66

._crit_edge66:                                    ; preds = %.lr.ph65, %.loopexit46
  %81 = tail 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.5)
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph65.1, label %._crit_edge66.1

.lr.ph65.1:                                       ; preds = %._crit_edge66, %.lr.ph65.1
  %indvars.iv88.1 = phi i64 [ %indvars.iv.next89.1, %.lr.ph65.1 ], [ 0, %._crit_edge66 ]
  %84 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv88.1, i64 1
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %85)
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @.str.4)
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88.1, 1
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next89.1, %89
  br i1 %90, label %.lr.ph65.1, label %._crit_edge66.1, !llvm.loop !17

._crit_edge66.1:                                  ; preds = %.lr.ph65.1, %._crit_edge66
  %91 = tail 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.5)
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %.lr.ph65.2, label %._crit_edge66.2

.lr.ph65.2:                                       ; preds = %._crit_edge66.1, %.lr.ph65.2
  %indvars.iv88.2 = phi i64 [ %indvars.iv.next89.2, %.lr.ph65.2 ], [ 0, %._crit_edge66.1 ]
  %94 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv88.2, i64 2
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %95)
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @.str.4)
  %indvars.iv.next89.2 = add nuw nsw i64 %indvars.iv88.2, 1
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next89.2, %99
  br i1 %100, label %.lr.ph65.2, label %._crit_edge66.2, !llvm.loop !17

._crit_edge66.2:                                  ; preds = %.lr.ph65.2, %._crit_edge66.1
  %101 = tail 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.5)
  br label %.loopexit

.lr.ph65:                                         ; preds = %.loopexit46, %.lr.ph65
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph65 ], [ 0, %.loopexit46 ]
  %102 = getelementptr inbounds [2001 x [3 x i32]], ptr @res, i64 0, i64 %indvars.iv88, i64 0
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %103)
  %105 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @.str.4)
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next89, %107
  br i1 %108, label %.lr.ph65, label %._crit_edge66, !llvm.loop !17

.loopexit:                                        ; preds = %._crit_edge66.2, %15
  ret i32 0
}

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

; 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 #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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 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 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 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 = { "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 = !{!10, !6, i64 4}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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