; LLVM IR from tangjz/acm-icpc :: codeforces/complete (314D)

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

@n = external dso_local global i32, align 4
@pre = external dso_local global [100003 x [2 x i32]], align 16
@suf = external dso_local global [100003 x [2 x i32]], align 16
@a = external dso_local global [100003 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

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

19:                                               ; preds = %37, %0
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = add nsw i32 %26, %27
  store i32 %28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sub nsw i32 %29, %30
  store i32 %31, ptr %7, align 4, !tbaa !5
  %32 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %32, ptr %5, align 4
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %34
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %37

37:                                               ; preds = %24
  %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 %19, !llvm.loop !9

40:                                               ; preds = %23
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %"struct.std::pair", ptr @a, i64 %42
  %44 = getelementptr inbounds %"struct.std::pair", ptr %43, i64 1
  call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef getelementptr inbounds (%"struct.std::pair", ptr @a, i64 1), ptr noundef %44)
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %47
  %49 = getelementptr inbounds [2 x i32], ptr %48, i64 0, i64 0
  store i32 1061109567, ptr %49, align 8, !tbaa !5
  store i32 1061109567, ptr @pre, align 16, !tbaa !5
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %52
  %54 = getelementptr inbounds [2 x i32], ptr %53, i64 0, i64 1
  store i32 -1061109567, ptr %54, align 4, !tbaa !5
  store i32 -1061109567, ptr getelementptr inbounds ([2 x i32], ptr @pre, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %91, %40
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %94

60:                                               ; preds = %55
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %63
  %65 = getelementptr inbounds [2 x i32], ptr %64, i64 0, i64 0
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %67
  %69 = getelementptr inbounds %"struct.std::pair", ptr %68, i32 0, i32 1
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %65, ptr noundef nonnull align 4 dereferenceable(4) %69)
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %73
  %75 = getelementptr inbounds [2 x i32], ptr %74, i64 0, i64 0
  store i32 %71, ptr %75, align 8, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %78
  %80 = getelementptr inbounds [2 x i32], ptr %79, i64 0, i64 1
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %82
  %84 = getelementptr inbounds %"struct.std::pair", ptr %83, i32 0, i32 1
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %80, ptr noundef nonnull align 4 dereferenceable(4) %84)
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %88
  %90 = getelementptr inbounds [2 x i32], ptr %89, i64 0, i64 1
  store i32 %86, ptr %90, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %60
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %8, align 4, !tbaa !5
  br label %55, !llvm.loop !11

94:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %95 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %95, ptr %9, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %131, %94
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = icmp sge i32 %97, 1
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %134

100:                                              ; preds = %96
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %103
  %105 = getelementptr inbounds [2 x i32], ptr %104, i64 0, i64 0
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %107
  %109 = getelementptr inbounds %"struct.std::pair", ptr %108, i32 0, i32 1
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull align 4 dereferenceable(4) %109)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %113
  %115 = getelementptr inbounds [2 x i32], ptr %114, i64 0, i64 0
  store i32 %111, ptr %115, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %118
  %120 = getelementptr inbounds [2 x i32], ptr %119, i64 0, i64 1
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %122
  %124 = getelementptr inbounds %"struct.std::pair", ptr %123, i32 0, i32 1
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %120, ptr noundef nonnull align 4 dereferenceable(4) %124)
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %128
  %130 = getelementptr inbounds [2 x i32], ptr %129, i64 0, i64 1
  store i32 %126, ptr %130, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %100
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = add nsw i32 %132, -1
  store i32 %133, ptr %9, align 4, !tbaa !5
  br label %96, !llvm.loop !12

134:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %135 = load i32, ptr @n, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %136
  %138 = getelementptr inbounds %"struct.std::pair", ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !13
  %140 = load i32, ptr getelementptr inbounds ([100003 x %"struct.std::pair"], ptr @a, i64 0, i64 1), align 8, !tbaa !13
  %141 = sub nsw i32 %139, %140
  store i32 %141, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %142 = load i32, ptr @n, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %143
  %145 = getelementptr inbounds [2 x i32], ptr %144, i64 0, i64 1
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr @n, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %148
  %150 = getelementptr inbounds [2 x i32], ptr %149, i64 0, i64 0
  %151 = load i32, ptr %150, align 8, !tbaa !5
  %152 = sub nsw i32 %146, %151
  store i32 %152, ptr %13, align 4, !tbaa !5
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %154 = load i32, ptr %153, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  store i32 %154, ptr %11, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %245, %134
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = load i32, ptr %11, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %246

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sub nsw i32 %161, %162
  %164 = sdiv i32 %163, 2
  %165 = add nsw i32 %160, %164
  store i32 %165, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %234, %159
  %167 = load i8, ptr %15, align 1, !tbaa !15, !range !17, !noundef !18
  %168 = trunc i8 %167 to i1
  br i1 %168, label %173, label %169

169:                                              ; preds = %166
  %170 = load i32, ptr %16, align 4, !tbaa !5
  %171 = load i32, ptr @n, align 4, !tbaa !5
  %172 = icmp sle i32 %170, %171
  br label %173

173:                                              ; preds = %169, %166
  %174 = phi i1 [ false, %166 ], [ %172, %169 ]
  br i1 %174, label %176, label %175

175:                                              ; preds = %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %237

176:                                              ; preds = %173
  br label %177

177:                                              ; preds = %198, %176
  %178 = load i32, ptr %17, align 4, !tbaa !5
  %179 = load i32, ptr @n, align 4, !tbaa !5
  %180 = icmp sle i32 %178, %179
  br i1 %180, label %181, label %195

181:                                              ; preds = %177
  %182 = load i32, ptr %17, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %183
  %185 = getelementptr inbounds %"struct.std::pair", ptr %184, i32 0, i32 0
  %186 = load i32, ptr %185, align 8, !tbaa !13
  %187 = load i32, ptr %16, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %188
  %190 = getelementptr inbounds %"struct.std::pair", ptr %189, i32 0, i32 0
  %191 = load i32, ptr %190, align 8, !tbaa !13
  %192 = sub nsw i32 %186, %191
  %193 = load i32, ptr %14, align 4, !tbaa !5
  %194 = icmp sle i32 %192, %193
  br label %195

195:                                              ; preds = %181, %177
  %196 = phi i1 [ false, %177 ], [ %194, %181 ]
  br i1 %196, label %197, label %201

197:                                              ; preds = %195
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %17, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %17, align 4, !tbaa !5
  br label %177, !llvm.loop !19

201:                                              ; preds = %195
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = sub nsw i32 %202, 1
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %204
  %206 = getelementptr inbounds [2 x i32], ptr %205, i64 0, i64 1
  %207 = load i32, ptr %17, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %208
  %210 = getelementptr inbounds [2 x i32], ptr %209, i64 0, i64 1
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %206, ptr noundef nonnull align 4 dereferenceable(4) %210)
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = load i32, ptr %16, align 4, !tbaa !5
  %214 = sub nsw i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %215
  %217 = getelementptr inbounds [2 x i32], ptr %216, i64 0, i64 0
  %218 = load i32, ptr %17, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %219
  %221 = getelementptr inbounds [2 x i32], ptr %220, i64 0, i64 0
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %217, ptr noundef nonnull align 4 dereferenceable(4) %221)
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sub nsw i32 %212, %223
  %225 = load i32, ptr %14, align 4, !tbaa !5
  %226 = icmp sle i32 %224, %225
  %227 = zext i1 %226 to i32
  %228 = load i8, ptr %15, align 1, !tbaa !15, !range !17, !noundef !18
  %229 = trunc i8 %228 to i1
  %230 = zext i1 %229 to i32
  %231 = or i32 %230, %227
  %232 = icmp ne i32 %231, 0
  %233 = zext i1 %232 to i8
  store i8 %233, ptr %15, align 1, !tbaa !15
  br label %234

234:                                              ; preds = %201
  %235 = load i32, ptr %16, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %16, align 4, !tbaa !5
  br label %166, !llvm.loop !20

237:                                              ; preds = %175
  %238 = load i8, ptr %15, align 1, !tbaa !15, !range !17, !noundef !18
  %239 = trunc i8 %238 to i1
  br i1 %239, label %243, label %240

240:                                              ; preds = %237
  %241 = load i32, ptr %14, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %10, align 4, !tbaa !5
  br label %245

243:                                              ; preds = %237
  %244 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %244, ptr %11, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %243, %240
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %155, !llvm.loop !21

246:                                              ; preds = %155
  %247 = load i32, ptr %10, align 4, !tbaa !5
  %248 = ashr i32 %247, 1
  %249 = load i32, ptr %10, align 4, !tbaa !5
  %250 = and i32 %249, 1
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %251
  %253 = load i8, ptr %252, align 1, !tbaa !22
  %254 = sext i8 %253 to i32
  %255 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %248, i32 noundef %254)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  ret i32 0
}

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 i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #4 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) #5

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

declare i32 @printf(ptr 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = !{!7, !7, i64 0}


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

@n = external dso_local global i32, align 4
@pre = external dso_local global [100003 x [2 x i32]], align 16
@suf = external dso_local global [100003 x [2 x i32]], align 16
@a = external dso_local global [100003 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not61 = icmp slt i32 %9, 1
  br i1 %.not61, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre105 = sext i32 %9 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre105, %.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %10 = getelementptr inbounds %"struct.std::pair", ptr @a, i64 %.pre-phi
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 8), ptr noundef nonnull %11)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %14
  store i32 1061109567, ptr %15, align 8, !tbaa !5
  store i32 1061109567, ptr @pre, align 16, !tbaa !5
  %16 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %14, i64 1
  store i32 -1061109567, ptr %16, align 4, !tbaa !5
  store i32 -1061109567, ptr getelementptr inbounds (i8, ptr @pre, i64 4), align 4, !tbaa !5
  %.not5463 = icmp slt i32 %12, 1
  br i1 %.not5463, label %._crit_edge70, label %.lr.ph66

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = add nsw i32 %19, %18
  store i32 %20, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %21 = sub nsw i32 %18, %19
  store i32 %21, ptr %5, align 4, !tbaa !5
  %22 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %22, ptr %3, align 8
  %23 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv
  %24 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %.not.not = icmp slt i64 %indvars.iv, %26
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader59:                                     ; preds = %.lr.ph66
  %27 = icmp sgt i32 %39, 0
  br i1 %27, label %.lr.ph69.preheader, label %._crit_edge70

.lr.ph69.preheader:                               ; preds = %.preheader59
  %28 = zext nneg i32 %39 to i64
  br label %.lr.ph69

.lr.ph66:                                         ; preds = %._crit_edge, %.lr.ph66
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph66 ], [ 1, %._crit_edge ]
  %29 = add nsw i64 %indvars.iv94, -1
  %30 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %29
  %31 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv94, i32 1
  %32 = call 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) %31)
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %indvars.iv94
  store i32 %33, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %30, i64 4
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %34, i64 4
  store i32 %37, ptr %38, align 4, !tbaa !5
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %.not54.not = icmp slt i64 %indvars.iv94, %40
  br i1 %.not54.not, label %.lr.ph66, label %.preheader59, !llvm.loop !11

._crit_edge70.loopexit:                           ; preds = %.lr.ph69
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge70

._crit_edge70:                                    ; preds = %._crit_edge, %._crit_edge70.loopexit, %.preheader59
  %41 = phi i32 [ %.pre, %._crit_edge70.loopexit ], [ %39, %.preheader59 ], [ %12, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %42
  %44 = load i32, ptr %43, align 8, !tbaa !12
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !12
  %46 = sub nsw i32 %44, %45
  store i32 %46, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %47 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %42
  %48 = getelementptr inbounds i8, ptr %47, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %47, align 8, !tbaa !5
  %51 = sub nsw i32 %49, %50
  store i32 %51, ptr %7, align 4, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %53 = load i32, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %._crit_edge70
  %55 = load i32, ptr @n, align 4
  %56 = icmp slt i32 %55, 1
  br i1 %56, label %.lr.ph85.split.us, label %.lr.ph85.split

.lr.ph85.split.us:                                ; preds = %.lr.ph85, %.lr.ph85.split.us
  %.04882.us = phi i32 [ %60, %.lr.ph85.split.us ], [ 0, %.lr.ph85 ]
  %57 = sub nsw i32 %53, %.04882.us
  %58 = sdiv i32 %57, 2
  %59 = add nsw i32 %58, %.04882.us
  %60 = add nsw i32 %59, 1
  %61 = icmp slt i32 %60, %53
  br i1 %61, label %.lr.ph85.split.us, label %._crit_edge86, !llvm.loop !14

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %.lr.ph69
  %indvars.iv97 = phi i64 [ %28, %.lr.ph69.preheader ], [ %indvars.iv.next98, %.lr.ph69 ]
  %62 = add nuw nsw i64 %indvars.iv97, 1
  %63 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %62
  %64 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv97, i32 1
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %64)
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %indvars.iv97
  store i32 %66, ptr %67, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %63, i64 4
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %68, ptr noundef nonnull align 4 dereferenceable(4) %64)
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %67, i64 4
  store i32 %70, ptr %71, align 4, !tbaa !5
  %indvars.iv.next98 = add nsw i64 %indvars.iv97, -1
  %72 = icmp ugt i64 %indvars.iv97, 1
  br i1 %72, label %.lr.ph69, label %._crit_edge70.loopexit, !llvm.loop !15

.lr.ph85.split:                                   ; preds = %.lr.ph85, %86
  %73 = phi i32 [ %88, %86 ], [ %55, %.lr.ph85 ]
  %.04683 = phi i32 [ %89, %86 ], [ %53, %.lr.ph85 ]
  %.04882 = phi i32 [ %87, %86 ], [ 0, %.lr.ph85 ]
  %74 = sub nsw i32 %.04683, %.04882
  %75 = sdiv i32 %74, 2
  %76 = add nsw i32 %75, %.04882
  %77 = icmp slt i32 %73, 1
  br i1 %77, label %.thread, label %.preheader

.thread:                                          ; preds = %.lr.ph85.split
  %78 = add nsw i32 %76, 1
  br label %86

.preheader:                                       ; preds = %.lr.ph85.split, %.critedge
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.critedge ], [ 1, %.lr.ph85.split ]
  %79 = phi i32 [ %109, %.critedge ], [ %73, %.lr.ph85.split ]
  %.079 = phi i32 [ %.1.lcssa, %.critedge ], [ 1, %.lr.ph85.split ]
  %.not5771 = icmp sgt i32 %.079, %79
  br i1 %.not5771, label %.critedge, label %.lr.ph73

.lr.ph73:                                         ; preds = %.preheader
  %80 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv103
  %81 = load i32, ptr %80, align 8, !tbaa !12
  %82 = sext i32 %.079 to i64
  %83 = sext i32 %79 to i64
  %84 = add i32 %79, 1
  br label %91

._crit_edge80:                                    ; preds = %.critedge
  %85 = add nsw i32 %76, 1
  %spec.select = select i1 %cond.fr, i32 %.04882, i32 %85
  %spec.select128 = select i1 %cond.fr, i32 %76, i32 %.04683
  br label %86

86:                                               ; preds = %._crit_edge80, %.thread
  %87 = phi i32 [ %78, %.thread ], [ %spec.select, %._crit_edge80 ]
  %88 = phi i32 [ %73, %.thread ], [ %109, %._crit_edge80 ]
  %89 = phi i32 [ %.04683, %.thread ], [ %spec.select128, %._crit_edge80 ]
  %90 = icmp slt i32 %87, %89
  br i1 %90, label %.lr.ph85.split, label %._crit_edge86, !llvm.loop !16

91:                                               ; preds = %.lr.ph73, %95
  %indvars.iv100 = phi i64 [ %82, %.lr.ph73 ], [ %indvars.iv.next101, %95 ]
  %92 = getelementptr inbounds [100003 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv100
  %93 = load i32, ptr %92, align 8, !tbaa !12
  %94 = sub nsw i32 %93, %81
  %.not58 = icmp sgt i32 %94, %76
  br i1 %.not58, label %.critedge.loopexit.split.loop.exit120, label %95

95:                                               ; preds = %91
  %indvars.iv.next101 = add nsw i64 %indvars.iv100, 1
  %.not57.not = icmp slt i64 %indvars.iv100, %83
  br i1 %.not57.not, label %91, label %.critedge, !llvm.loop !18

.critedge.loopexit.split.loop.exit120:            ; preds = %91
  %96 = trunc nsw i64 %indvars.iv100 to i32
  br label %.critedge

.critedge:                                        ; preds = %95, %.critedge.loopexit.split.loop.exit120, %.preheader
  %.1.lcssa = phi i32 [ %.079, %.preheader ], [ %96, %.critedge.loopexit.split.loop.exit120 ], [ %84, %95 ]
  %97 = add nsw i64 %indvars.iv103, -1
  %98 = getelementptr inbounds [100003 x [2 x i32]], ptr @pre, i64 0, i64 %97
  %99 = getelementptr inbounds i8, ptr %98, i64 4
  %100 = sext i32 %.1.lcssa to i64
  %101 = getelementptr inbounds [100003 x [2 x i32]], ptr @suf, i64 0, i64 %100
  %102 = getelementptr inbounds i8, ptr %101, i64 4
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %102)
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %98, ptr noundef nonnull align 4 dereferenceable(4) %101)
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sub nsw i32 %104, %106
  %108 = icmp sle i32 %107, %76
  %cond.fr = freeze i1 %108
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %109 = load i32, ptr @n, align 4
  %110 = sext i32 %109 to i64
  %111 = icmp sge i64 %indvars.iv103, %110
  %.not56 = select i1 %cond.fr, i1 true, i1 %111
  br i1 %.not56, label %._crit_edge80, label %.preheader, !llvm.loop !19

._crit_edge86:                                    ; preds = %86, %.lr.ph85.split.us, %._crit_edge70
  %.048.lcssa = phi i32 [ 0, %._crit_edge70 ], [ %60, %.lr.ph85.split.us ], [ %87, %86 ]
  %112 = ashr i32 %.048.lcssa, 1
  %113 = and i32 %.048.lcssa, 1
  %114 = zext nneg i32 %113 to i64
  %115 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !20
  %117 = sext i8 %116 to i32
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %112, i32 noundef %117)
  ret i32 0
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !17}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{!7, !7, i64 0}


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