; LLVM IR from tangjz/acm-icpc :: hdu (6046)

; 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 { i64, i64 }

@tot = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@seq = external dso_local global [1030225 x %"struct.std::pair"], align 16
@val = external dso_local global [1001 x [1001 x i64]], align 16
@str = external dso_local global [1001 x [1001 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4testii(i32 noundef, i32 noundef) #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z1fii(i32 noundef, i32 noundef) #2

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

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

24:                                               ; preds = %83, %0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp sle i32 %25, 1000000
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %86

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

29:                                               ; preds = %79, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp sle i32 %30, 1000000
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %82

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %59, %33
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 7
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %62

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

39:                                               ; preds = %55, %38
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 7
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %58

43:                                               ; preds = %39
  %44 = load i64, ptr %5, align 8, !tbaa !9
  %45 = shl i64 %44, 1
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = add nsw i32 %46, %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = call noundef i32 @_Z1fii(i32 noundef %48, i32 noundef %51)
  %53 = sext i32 %52 to i64
  %54 = or i64 %45, %53
  store i64 %54, ptr %5, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %43
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !5
  br label %39, !llvm.loop !11

58:                                               ; preds = %42
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %6, align 4, !tbaa !5
  br label %34, !llvm.loop !13

62:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = mul nsw i64 %64, 1000000
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = add nsw i64 %65, %67
  store i64 %68, ptr %9, align 8, !tbaa !9
  %69 = call { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %70 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %71 = extractvalue { i64, i64 } %69, 0
  store i64 %71, ptr %70, align 8
  %72 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %73 = extractvalue { i64, i64 } %69, 1
  store i64 %73, ptr %72, align 8
  %74 = load i32, ptr @tot, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @tot, align 4, !tbaa !5
  %76 = sext i32 %74 to i64
  %77 = getelementptr inbounds [1030225 x %"struct.std::pair"], ptr @seq, i64 0, i64 %76
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %79

79:                                               ; preds = %62
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = add nsw i32 %80, 986
  store i32 %81, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !14

82:                                               ; preds = %32
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = add nsw i32 %84, 986
  store i32 %85, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !15

86:                                               ; preds = %27
  %87 = load i32, ptr @tot, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %"struct.std::pair", ptr @seq, i64 %88
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef @seq, ptr noundef %89)
  %90 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %275, %86
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = load i32, ptr @t, align 4, !tbaa !5
  %94 = icmp sle i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %278

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %143, %96
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = icmp sle i32 %98, 1000
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %146

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %103
  %105 = getelementptr inbounds [1001 x i64], ptr %104, i64 0, i64 0
  store ptr %105, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1001 x [1001 x i8]], ptr @str, i64 0, i64 %107
  %109 = getelementptr inbounds [1001 x i8], ptr %108, i64 0, i64 0
  store ptr %109, ptr %13, align 8, !tbaa !16
  %110 = load ptr, ptr %13, align 8, !tbaa !16
  %111 = getelementptr inbounds i8, ptr %110, i64 1
  %112 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %111)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %139, %101
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = icmp sle i32 %114, 1000
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %142

117:                                              ; preds = %113
  %118 = load ptr, ptr %12, align 8, !tbaa !16
  %119 = load i32, ptr %14, align 4, !tbaa !5
  %120 = sub nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i64, ptr %118, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = shl i64 %123, 1
  %125 = load ptr, ptr %13, align 8, !tbaa !16
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i8, ptr %125, i64 %127
  %129 = load i8, ptr %128, align 1, !tbaa !18
  %130 = sext i8 %129 to i32
  %131 = icmp eq i32 %130, 49
  %132 = zext i1 %131 to i64
  %133 = or i64 %124, %132
  %134 = and i64 %133, 127
  %135 = load ptr, ptr %12, align 8, !tbaa !16
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i64, ptr %135, i64 %137
  store i64 %134, ptr %138, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %117
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %14, align 4, !tbaa !5
  br label %113, !llvm.loop !19

142:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %11, align 4, !tbaa !5
  br label %97, !llvm.loop !20

146:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %271, %146
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = icmp sle i32 %148, 1000
  br i1 %149, label %150, label %154

150:                                              ; preds = %147
  %151 = load i8, ptr %15, align 1, !tbaa !21, !range !23, !noundef !24
  %152 = trunc i8 %151 to i1
  %153 = xor i1 %152, true
  br label %154

154:                                              ; preds = %150, %147
  %155 = phi i1 [ false, %147 ], [ %153, %150 ]
  br i1 %155, label %157, label %156

156:                                              ; preds = %154
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %274

157:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %266, %157
  %159 = load i32, ptr %17, align 4, !tbaa !5
  %160 = icmp sle i32 %159, 1000
  br i1 %160, label %162, label %161

161:                                              ; preds = %158
  store i32 26, ptr %3, align 4
  br label %269

162:                                              ; preds = %158
  %163 = load i32, ptr %16, align 4, !tbaa !5
  %164 = sub nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %165
  %167 = load i32, ptr %17, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [1001 x i64], ptr %166, i64 0, i64 %168
  %170 = load i64, ptr %169, align 8, !tbaa !9
  %171 = shl i64 %170, 7
  %172 = load i32, ptr %16, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %173
  %175 = load i32, ptr %17, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1001 x i64], ptr %174, i64 0, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = or i64 %171, %178
  %180 = and i64 %179, 562949953421311
  %181 = load i32, ptr %16, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %182
  %184 = load i32, ptr %17, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1001 x i64], ptr %183, i64 0, i64 %185
  store i64 %180, ptr %186, align 8, !tbaa !9
  %187 = load i32, ptr %16, align 4, !tbaa !5
  %188 = icmp slt i32 %187, 7
  br i1 %188, label %192, label %189

189:                                              ; preds = %162
  %190 = load i32, ptr %17, align 4, !tbaa !5
  %191 = icmp slt i32 %190, 7
  br i1 %191, label %192, label %193

192:                                              ; preds = %189, %162
  br label %266

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %194 = load i32, ptr @tot, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %"struct.std::pair", ptr @seq, i64 %195
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %198
  %200 = load i32, ptr %17, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1001 x i64], ptr %199, i64 0, i64 %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !9
  %203 = call { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %204 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %205 = extractvalue { i64, i64 } %203, 0
  store i64 %205, ptr %204, align 8
  %206 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %207 = extractvalue { i64, i64 } %203, 1
  store i64 %207, ptr %206, align 8
  %208 = call noundef ptr @_ZSt11lower_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef @seq, ptr noundef %196, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %209 = ptrtoint ptr %208 to i64
  %210 = sub i64 %209, ptrtoint (ptr @seq to i64)
  %211 = sdiv exact i64 %210, 16
  %212 = trunc i64 %211 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  store i32 %212, ptr %18, align 4, !tbaa !5
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = load i32, ptr @tot, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %216, label %262

216:                                              ; preds = %193
  %217 = load i32, ptr %18, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [1030225 x %"struct.std::pair"], ptr @seq, i64 0, i64 %218
  %220 = getelementptr inbounds %"struct.std::pair", ptr %219, i32 0, i32 0
  %221 = load i64, ptr %220, align 16, !tbaa !25
  %222 = load i32, ptr %16, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %223
  %225 = load i32, ptr %17, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1001 x i64], ptr %224, i64 0, i64 %226
  %228 = load i64, ptr %227, align 8, !tbaa !9
  %229 = icmp eq i64 %221, %228
  br i1 %229, label %230, label %262

230:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %231 = load i32, ptr %18, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [1030225 x %"struct.std::pair"], ptr @seq, i64 0, i64 %232
  %234 = getelementptr inbounds %"struct.std::pair", ptr %233, i32 0, i32 1
  %235 = load i64, ptr %234, align 8, !tbaa !27
  store i64 %235, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %236 = load i64, ptr %21, align 8, !tbaa !9
  %237 = sdiv i64 %236, 1000000
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = sub nsw i64 %237, %239
  %241 = add nsw i64 %240, 7
  %242 = trunc i64 %241 to i32
  store i32 %242, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %243 = load i64, ptr %21, align 8, !tbaa !9
  %244 = srem i64 %243, 1000000
  %245 = load i32, ptr %17, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = sub nsw i64 %244, %246
  %248 = add nsw i64 %247, 7
  %249 = trunc i64 %248 to i32
  store i32 %249, ptr %23, align 4, !tbaa !5
  %250 = load i32, ptr %22, align 4, !tbaa !5
  %251 = load i32, ptr %23, align 4, !tbaa !5
  %252 = call noundef zeroext i1 @_Z4testii(i32 noundef %250, i32 noundef %251)
  br i1 %252, label %253, label %258

253:                                              ; preds = %230
  store i8 1, ptr %15, align 1, !tbaa !21
  %254 = load i32, ptr %10, align 4, !tbaa !5
  %255 = load i32, ptr %22, align 4, !tbaa !5
  %256 = load i32, ptr %23, align 4, !tbaa !5
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %254, i32 noundef %255, i32 noundef %256)
  store i32 26, ptr %3, align 4
  br label %259

258:                                              ; preds = %230
  store i32 0, ptr %3, align 4
  br label %259

259:                                              ; preds = %258, %253
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %260 = load i32, ptr %3, align 4
  switch i32 %260, label %263 [
    i32 0, label %261
  ]

261:                                              ; preds = %259
  br label %262

262:                                              ; preds = %261, %216, %193
  store i32 0, ptr %3, align 4
  br label %263

263:                                              ; preds = %262, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %264 = load i32, ptr %3, align 4
  switch i32 %264, label %269 [
    i32 0, label %265
  ]

265:                                              ; preds = %263
  br label %266

266:                                              ; preds = %265, %192
  %267 = load i32, ptr %17, align 4, !tbaa !5
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %17, align 4, !tbaa !5
  br label %158, !llvm.loop !28

269:                                              ; preds = %263, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %270

270:                                              ; preds = %269
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %16, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %16, align 4, !tbaa !5
  br label %147, !llvm.loop !29

274:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %10, align 4, !tbaa !5
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %10, align 4, !tbaa !5
  br label %91, !llvm.loop !30

278:                                              ; preds = %95
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) #5

declare i32 @printf(ptr noundef, ...) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { "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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSSt4pairIxxE", !10, i64 0, !10, i64 8}
!27 = !{!26, !10, i64 8}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !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 { i64, i64 }

@tot = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local global i32, align 4
@seq = external dso_local global [1030225 x %"struct.std::pair"], align 16
@val = external dso_local global [1001 x [1001 x i64]], align 16
@str = external dso_local global [1001 x [1001 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4testii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z1fii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i64, align 8
  %6 = getelementptr inbounds i8, ptr %2, i64 8
  br label %.preheader90

.preheader90:                                     ; preds = %0, %16
  %indvars.iv107 = phi i64 [ 1, %0 ], [ %indvars.iv.next108, %16 ]
  %7 = mul nuw nsw i64 %indvars.iv107, 1000000
  %8 = trunc nuw nsw i64 %indvars.iv107 to i32
  br label %18

9:                                                ; preds = %16
  %10 = load i32, ptr @tot, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds %"struct.std::pair", ptr @seq, i64 %11
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef nonnull @seq, ptr noundef nonnull %12)
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %.not102 = icmp slt i32 %14, 1
  br i1 %.not102, label %._crit_edge, label %.preheader88.lr.ph

.preheader88.lr.ph:                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  br label %.preheader88

16:                                               ; preds = %63
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 986
  %17 = icmp ult i64 %indvars.iv107, 999015
  br i1 %17, label %.preheader90, label %9, !llvm.loop !9

18:                                               ; preds = %.preheader90, %63
  %indvars.iv = phi i64 [ 1, %.preheader90 ], [ %indvars.iv.next, %63 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !11
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  %20 = trunc i64 %indvars.iv to i32
  %21 = add i32 %20, 1
  %22 = trunc i64 %indvars.iv to i32
  %23 = add i32 %22, 2
  %24 = trunc i64 %indvars.iv to i32
  %25 = add i32 %24, 3
  %26 = trunc i64 %indvars.iv to i32
  %27 = add i32 %26, 4
  %28 = trunc i64 %indvars.iv to i32
  %29 = add i32 %28, 5
  %30 = trunc i64 %indvars.iv to i32
  %31 = add i32 %30, 6
  br label %.preheader89

.preheader89:                                     ; preds = %18, %.preheader89
  %32 = phi i64 [ 0, %18 ], [ %61, %.preheader89 ]
  %.06393 = phi i32 [ 0, %18 ], [ %62, %.preheader89 ]
  %33 = add nuw nsw i32 %.06393, %8
  %34 = shl i64 %32, 1
  %35 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %19)
  %36 = sext i32 %35 to i64
  %37 = or i64 %34, %36
  store i64 %37, ptr %1, align 8, !tbaa !11
  %38 = shl i64 %37, 1
  %39 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %21)
  %40 = sext i32 %39 to i64
  %41 = or i64 %38, %40
  store i64 %41, ptr %1, align 8, !tbaa !11
  %42 = shl i64 %41, 1
  %43 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %23)
  %44 = sext i32 %43 to i64
  %45 = or i64 %42, %44
  store i64 %45, ptr %1, align 8, !tbaa !11
  %46 = shl i64 %45, 1
  %47 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %25)
  %48 = sext i32 %47 to i64
  %49 = or i64 %46, %48
  store i64 %49, ptr %1, align 8, !tbaa !11
  %50 = shl i64 %49, 1
  %51 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %27)
  %52 = sext i32 %51 to i64
  %53 = or i64 %50, %52
  store i64 %53, ptr %1, align 8, !tbaa !11
  %54 = shl i64 %53, 1
  %55 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %29)
  %56 = sext i32 %55 to i64
  %57 = or i64 %54, %56
  store i64 %57, ptr %1, align 8, !tbaa !11
  %58 = shl i64 %57, 1
  %59 = call noundef i32 @_Z1fii(i32 noundef %33, i32 noundef %31)
  %60 = sext i32 %59 to i64
  %61 = or i64 %58, %60
  store i64 %61, ptr %1, align 8, !tbaa !11
  %62 = add nuw nsw i32 %.06393, 1
  %exitcond.not = icmp eq i32 %62, 7
  br i1 %exitcond.not, label %63, label %.preheader89, !llvm.loop !13

63:                                               ; preds = %.preheader89
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %64 = add nuw nsw i64 %7, %indvars.iv
  store i64 %64, ptr %3, align 8, !tbaa !11
  %65 = call { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %66 = extractvalue { i64, i64 } %65, 0
  store i64 %66, ptr %2, align 8
  %67 = extractvalue { i64, i64 } %65, 1
  store i64 %67, ptr %6, align 8
  %68 = load i32, ptr @tot, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr @tot, align 4, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [1030225 x %"struct.std::pair"], ptr @seq, i64 0, i64 %70
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 8 dereferenceable(16) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 986
  %73 = icmp ult i64 %indvars.iv, 999015
  br i1 %73, label %18, label %16, !llvm.loop !14

.preheader88:                                     ; preds = %.preheader88.lr.ph, %.loopexit132
  %.070103 = phi i32 [ 1, %.preheader88.lr.ph ], [ %110, %.loopexit132 ]
  br label %74

._crit_edge:                                      ; preds = %.loopexit132, %9
  ret i32 0

74:                                               ; preds = %.preheader88, %80
  %indvar = phi i64 [ 0, %.preheader88 ], [ %indvar.next, %80 ]
  %indvars.iv114 = phi i64 [ 1, %.preheader88 ], [ %indvars.iv.next115, %80 ]
  %75 = mul nuw nsw i64 %indvar, 8008
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @val, i64 8008), i64 %75
  %76 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %indvars.iv114
  %77 = getelementptr inbounds [1001 x [1001 x i8]], ptr @str, i64 0, i64 %indvars.iv114
  %78 = getelementptr inbounds i8, ptr %77, i64 1
  %79 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %78)
  %load_initial = load i64, ptr %gep, align 8
  br label %81

80:                                               ; preds = %81
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next115, 1001
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond117.not, label %.preheader, label %74, !llvm.loop !15

81:                                               ; preds = %81, %74
  %store_forwarded = phi i64 [ %load_initial, %74 ], [ %95, %81 ]
  %indvars.iv110 = phi i64 [ 1, %74 ], [ %indvars.iv.next111.1, %81 ]
  %82 = getelementptr i64, ptr %76, i64 %indvars.iv110
  %83 = shl i64 %store_forwarded, 1
  %84 = getelementptr inbounds i8, ptr %77, i64 %indvars.iv110
  %85 = load i8, ptr %84, align 1, !tbaa !16
  %86 = icmp eq i8 %85, 49
  %87 = zext i1 %86 to i64
  %.masked = and i64 %83, 126
  %88 = or disjoint i64 %.masked, %87
  store i64 %88, ptr %82, align 8, !tbaa !11
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %89 = getelementptr i64, ptr %76, i64 %indvars.iv.next111
  %90 = shl nuw nsw i64 %88, 1
  %91 = getelementptr inbounds i8, ptr %77, i64 %indvars.iv.next111
  %92 = load i8, ptr %91, align 1, !tbaa !16
  %93 = icmp eq i8 %92, 49
  %94 = zext i1 %93 to i64
  %.masked.1 = and i64 %90, 126
  %95 = or disjoint i64 %.masked.1, %94
  store i64 %95, ptr %89, align 8, !tbaa !11
  %indvars.iv.next111.1 = add nuw nsw i64 %indvars.iv110, 2
  %exitcond113.not.1 = icmp eq i64 %indvars.iv.next111.1, 1001
  br i1 %exitcond113.not.1, label %80, label %81, !llvm.loop !17

.preheader:                                       ; preds = %80, %.loopexit
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.loopexit ], [ 1, %80 ]
  %96 = add nsw i64 %indvars.iv126, -1
  %97 = icmp ult i64 %indvars.iv126, 7
  br i1 %97, label %vector.body, label %.preheader.split.preheader

vector.body:                                      ; preds = %.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader ]
  %offset.idx = or disjoint i64 %index, 1
  %98 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %96, i64 %offset.idx
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  %wide.load = load <2 x i64>, ptr %98, align 8, !tbaa !11
  %wide.load136 = load <2 x i64>, ptr %99, align 8, !tbaa !11
  %100 = shl <2 x i64> %wide.load, <i64 7, i64 7>
  %101 = shl <2 x i64> %wide.load136, <i64 7, i64 7>
  %102 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %indvars.iv126, i64 %offset.idx
  %103 = getelementptr inbounds i8, ptr %102, i64 16
  %wide.load137 = load <2 x i64>, ptr %102, align 8, !tbaa !11
  %wide.load138 = load <2 x i64>, ptr %103, align 8, !tbaa !11
  %104 = or <2 x i64> %100, %wide.load137
  %105 = or <2 x i64> %101, %wide.load138
  %106 = and <2 x i64> %104, <i64 562949953421311, i64 562949953421311>
  %107 = and <2 x i64> %105, <i64 562949953421311, i64 562949953421311>
  store <2 x i64> %106, ptr %102, align 8, !tbaa !11
  store <2 x i64> %107, ptr %103, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %108 = icmp eq i64 %index.next, 1000
  br i1 %108, label %.loopexit, label %vector.body, !llvm.loop !18

.preheader.split.preheader:                       ; preds = %.preheader
  %109 = trunc nuw nsw i64 %indvars.iv126 to i32
  br label %.preheader.split

.loopexit132:                                     ; preds = %.loopexit, %.loopexit.thread
  %110 = add nuw nsw i32 %.070103, 1
  %111 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.070103, %111
  br i1 %.not.not, label %.preheader88, label %._crit_edge, !llvm.loop !21

.preheader.split:                                 ; preds = %.preheader.split.preheader, %.thread
  %indvars.iv118 = phi i64 [ 1, %.preheader.split.preheader ], [ %indvars.iv.next119, %.thread ]
  %112 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %96, i64 %indvars.iv118
  %113 = load i64, ptr %112, align 8, !tbaa !11
  %114 = shl i64 %113, 7
  %115 = getelementptr inbounds [1001 x [1001 x i64]], ptr @val, i64 0, i64 %indvars.iv126, i64 %indvars.iv118
  %116 = load i64, ptr %115, align 8, !tbaa !11
  %117 = or i64 %114, %116
  %118 = and i64 %117, 562949953421311
  store i64 %118, ptr %115, align 8, !tbaa !11
  %119 = icmp ult i64 %indvars.iv118, 7
  br i1 %119, label %.thread, label %120

120:                                              ; preds = %.preheader.split
  %121 = load i32, ptr @tot, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %"struct.std::pair", ptr @seq, i64 %122
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 0, ptr %5, align 8, !tbaa !11
  %124 = call { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %125 = extractvalue { i64, i64 } %124, 0
  store i64 %125, ptr %4, align 8
  %126 = extractvalue { i64, i64 } %124, 1
  store i64 %126, ptr %15, align 8
  %127 = call noundef ptr @_ZSt11lower_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef nonnull @seq, ptr noundef nonnull %123, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %128 = ptrtoint ptr %127 to i64
  %129 = sub i64 %128, ptrtoint (ptr @seq to i64)
  %130 = lshr exact i64 %129, 4
  %131 = trunc i64 %130 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %132 = load i32, ptr @tot, align 4, !tbaa !5
  %133 = icmp sgt i32 %132, %131
  br i1 %133, label %134, label %.thread

134:                                              ; preds = %120
  %sext = shl i64 %129, 28
  %135 = ashr i64 %sext, 32
  %136 = getelementptr inbounds [1030225 x %"struct.std::pair"], ptr @seq, i64 0, i64 %135
  %137 = load i64, ptr %136, align 16, !tbaa !22
  %138 = load i64, ptr %115, align 8, !tbaa !11
  %139 = icmp eq i64 %137, %138
  br i1 %139, label %140, label %.thread

140:                                              ; preds = %134
  %141 = getelementptr inbounds i8, ptr %136, i64 8
  %142 = load i64, ptr %141, align 8, !tbaa !24
  %143 = sdiv i64 %142, 1000000
  %144 = trunc i64 %143 to i32
  %145 = sub i32 %144, %109
  %146 = add i32 %145, 7
  %147 = srem i64 %142, 1000000
  %148 = trunc nsw i64 %147 to i32
  %149 = trunc nuw nsw i64 %indvars.iv118 to i32
  %150 = sub nsw i32 %148, %149
  %151 = add nsw i32 %150, 7
  %152 = call noundef zeroext i1 @_Z4testii(i32 noundef %146, i32 noundef %151)
  br i1 %152, label %.loopexit.thread, label %.thread

.loopexit.thread:                                 ; preds = %140
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.070103, i32 noundef %146, i32 noundef %151)
  br label %.loopexit132

.thread:                                          ; preds = %140, %120, %134, %.preheader.split
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next119, 1001
  br i1 %exitcond121.not, label %.loopexit, label %.preheader.split, !llvm.loop !25

.loopexit:                                        ; preds = %.thread, %vector.body
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %154 = icmp ugt i64 %indvars.iv126, 999
  br i1 %154, label %.loopexit132, label %.preheader, !llvm.loop !26
}

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { 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 #7 = { nounwind }

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

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


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass