; LLVM IR from tangjz/acm-icpc :: leetcode/extra (meituan_010-小团的默契游戏)

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

@_ZZ4mainE1a = external hidden global [100001 x %"struct.std::pair"], align 16
@_ZZ4mainE3suf = external hidden global [100001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 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 %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %32, %0
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %35

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 -1, ptr %6, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %29
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %4, align 4, !tbaa !5
  br label %22, !llvm.loop !9

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

36:                                               ; preds = %57, %35
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %60

41:                                               ; preds = %36
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %44
  %46 = getelementptr inbounds %"struct.std::pair", ptr %45, i32 0, i32 0
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %49
  %51 = getelementptr inbounds %"struct.std::pair", ptr %50, i32 0, i32 1
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %54
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %55, ptr noundef nonnull align 4 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %57

57:                                               ; preds = %41
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %7, align 4, !tbaa !5
  br label %36, !llvm.loop !11

60:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %61, ptr %10, align 4, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %63
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %66
  %68 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(8) %64)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  store i32 %70, ptr %11, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %120, %60
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %123

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %78
  %80 = getelementptr inbounds %"struct.std::pair", ptr %79, i32 0, i32 0
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %82
  %84 = getelementptr inbounds %"struct.std::pair", ptr %83, i32 0, i32 0
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %80, ptr noundef nonnull align 4 dereferenceable(4) %84)
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %88
  %90 = getelementptr inbounds %"struct.std::pair", ptr %89, i32 0, i32 1
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %92
  %94 = getelementptr inbounds %"struct.std::pair", ptr %93, i32 0, i32 1
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %90, ptr noundef nonnull align 4 dereferenceable(4) %94)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %95)
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %97
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %98, ptr noundef nonnull align 4 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  %103 = icmp eq i32 %100, %102
  br i1 %103, label %104, label %119

104:                                              ; preds = %75
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %106
  %108 = getelementptr inbounds %"struct.std::pair", ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !12
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %112
  %114 = getelementptr inbounds %"struct.std::pair", ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 8, !tbaa !14
  %116 = icmp slt i32 %109, %115
  br i1 %116, label %117, label %119

117:                                              ; preds = %104
  %118 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %118, ptr %10, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %117, %104, %75
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = add nsw i32 %121, -1
  store i32 %122, ptr %11, align 4, !tbaa !5
  br label %71, !llvm.loop !15

123:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 -1, ptr %15, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  store i32 %125, ptr %18, align 4, !tbaa !5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %127 = load i32, ptr %126, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  store i32 %127, ptr %17, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %198, %123
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = load i32, ptr %3, align 4, !tbaa !5
  %131 = icmp sle i32 %129, %130
  br i1 %131, label %132, label %136

132:                                              ; preds = %128
  %133 = load i32, ptr %17, align 4, !tbaa !5
  %134 = load i32, ptr %3, align 4, !tbaa !5
  %135 = icmp sle i32 %133, %134
  br label %136

136:                                              ; preds = %132, %128
  %137 = phi i1 [ false, %128 ], [ %135, %132 ]
  br i1 %137, label %139, label %138

138:                                              ; preds = %136
  store i32 11, ptr %19, align 4
  br label %201

139:                                              ; preds = %136
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = load i32, ptr %17, align 4, !tbaa !5
  %142 = sub nsw i32 %140, %141
  %143 = add nsw i32 %142, 1
  %144 = sext i32 %143 to i64
  %145 = load i64, ptr %13, align 8, !tbaa !16
  %146 = add nsw i64 %145, %144
  store i64 %146, ptr %13, align 8, !tbaa !16
  %147 = load i32, ptr %16, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %148
  %150 = getelementptr inbounds %"struct.std::pair", ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !14
  %152 = getelementptr inbounds %"struct.std::pair", ptr %14, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !12
  %154 = icmp sle i32 %151, %153
  br i1 %154, label %155, label %156

155:                                              ; preds = %139
  store i32 11, ptr %19, align 4
  br label %201

156:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %157 = getelementptr inbounds %"struct.std::pair", ptr %14, i32 0, i32 0
  %158 = load i32, ptr %16, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %159
  %161 = getelementptr inbounds %"struct.std::pair", ptr %160, i32 0, i32 0
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %157, ptr noundef nonnull align 4 dereferenceable(4) %161)
  %163 = getelementptr inbounds %"struct.std::pair", ptr %14, i32 0, i32 1
  %164 = load i32, ptr %16, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %165
  %167 = getelementptr inbounds %"struct.std::pair", ptr %166, i32 0, i32 1
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %163, ptr noundef nonnull align 4 dereferenceable(4) %167)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %162, ptr noundef nonnull align 4 dereferenceable(4) %168)
  %169 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %170 = load i32, ptr %16, align 4, !tbaa !5
  %171 = load i32, ptr %17, align 4, !tbaa !5
  %172 = icmp eq i32 %170, %171
  br i1 %172, label %173, label %176

173:                                              ; preds = %156
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %17, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %173, %156
  br label %177

177:                                              ; preds = %194, %176
  %178 = load i32, ptr %17, align 4, !tbaa !5
  %179 = load i32, ptr %3, align 4, !tbaa !5
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %181, label %191

181:                                              ; preds = %177
  %182 = load i32, ptr %17, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %184
  %186 = getelementptr inbounds %"struct.std::pair", ptr %185, i32 0, i32 0
  %187 = load i32, ptr %186, align 8, !tbaa !14
  %188 = getelementptr inbounds %"struct.std::pair", ptr %14, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !12
  %190 = icmp sle i32 %187, %189
  br label %191

191:                                              ; preds = %181, %177
  %192 = phi i1 [ false, %177 ], [ %190, %181 ]
  br i1 %192, label %193, label %197

193:                                              ; preds = %191
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %17, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %17, align 4, !tbaa !5
  br label %177, !llvm.loop !18

197:                                              ; preds = %191
  br label %198

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

201:                                              ; preds = %155, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %202

202:                                              ; preds = %201
  %203 = load i64, ptr %13, align 8, !tbaa !16
  %204 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %203)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %205 = load i32, ptr %1, align 4
  ret i32 %205
}

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

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

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

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

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

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

; Function Attrs: 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)) #4

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { 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 4}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = !{!13, !6, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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

%"struct.std::pair" = type { i32, i32 }

@_ZZ4mainE1a = external hidden global [100001 x %"struct.std::pair"], align 16
@_ZZ4mainE3suf = external hidden global [100001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind 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 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %1)
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %.not37 = icmp slt i32 %15, 1
  br i1 %.not37, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %16 = phi i32 [ %15, %0 ], [ %21, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph40, label %._crit_edge41

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 -1, ptr %4, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %19 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %indvars.iv
  %20 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %.not.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge41.loopexit:                           ; preds = %.lr.ph40
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit, %._crit_edge
  %23 = phi i32 [ %.pre, %._crit_edge41.loopexit ], [ %16, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %24
  %26 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %24
  %27 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %25)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 1
  br i1 %29, label %.lr.ph47.preheader, label %._crit_edge48

.lr.ph47.preheader:                               ; preds = %._crit_edge41
  %30 = zext nneg i32 %28 to i64
  br label %.lr.ph47

.lr.ph40:                                         ; preds = %._crit_edge, %.lr.ph40
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %33
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %37, i32 1
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 4 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %.lr.ph40, label %._crit_edge41.loopexit, !llvm.loop !11

._crit_edge48:                                    ; preds = %72, %._crit_edge41
  %.029.lcssa = phi i32 [ %23, %._crit_edge41 ], [ %.130, %72 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %48 = add nsw i32 %.029.lcssa, -1
  store i32 %48, ptr %12, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %51 = load i32, ptr %11, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4
  %53 = icmp sle i32 %51, %52
  %54 = icmp sle i32 %50, %52
  %55 = select i1 %53, i1 %54, i1 false
  br i1 %55, label %.lr.ph52, label %._crit_edge53

.lr.ph52:                                         ; preds = %._crit_edge48
  %56 = getelementptr inbounds i8, ptr %9, i64 4
  %.pre64 = load i32, ptr %56, align 4, !tbaa !12
  br label %74

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %72
  %indvars.iv58 = phi i64 [ %30, %.lr.ph47.preheader ], [ %indvars.iv.next59, %72 ]
  %.02943 = phi i32 [ %23, %.lr.ph47.preheader ], [ %.130, %72 ]
  %indvars.iv.next59 = add nsw i64 %indvars.iv58, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %57 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %indvars.iv58
  %58 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %indvars.iv.next59
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %57, ptr noundef nonnull align 4 dereferenceable(4) %58)
  %60 = getelementptr inbounds i8, ptr %57, i64 4
  %61 = getelementptr inbounds i8, ptr %58, i64 4
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %61)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %59, ptr noundef nonnull align 4 dereferenceable(4) %62)
  %63 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %indvars.iv.next59
  %64 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %65 = zext i32 %.02943 to i64
  %66 = icmp eq i64 %indvars.iv58, %65
  br i1 %66, label %67, label %72

67:                                               ; preds = %.lr.ph47
  %68 = load i32, ptr %61, align 4, !tbaa !12
  %69 = load i32, ptr %57, align 8, !tbaa !14
  %70 = icmp slt i32 %68, %69
  %71 = trunc nuw nsw i64 %indvars.iv.next59 to i32
  %spec.select = select i1 %70, i32 %71, i32 %.02943
  br label %72

72:                                               ; preds = %67, %.lr.ph47
  %.130 = phi i32 [ %.02943, %.lr.ph47 ], [ %spec.select, %67 ]
  %73 = icmp ugt i64 %indvars.iv58, 2
  br i1 %73, label %.lr.ph47, label %._crit_edge48, !llvm.loop !15

74:                                               ; preds = %.lr.ph52, %.critedge
  %75 = phi i32 [ %.pre64, %.lr.ph52 ], [ %95, %.critedge ]
  %76 = phi i32 [ %52, %.lr.ph52 ], [ %94, %.critedge ]
  %77 = phi i32 [ %51, %.lr.ph52 ], [ %104, %.critedge ]
  %.050 = phi i32 [ %50, %.lr.ph52 ], [ %.2.lcssa, %.critedge ]
  %.02649 = phi i64 [ 0, %.lr.ph52 ], [ %80, %.critedge ]
  %reass.sub = sub i32 %76, %.050
  %78 = add i32 %reass.sub, 1
  %79 = sext i32 %78 to i64
  %80 = add nsw i64 %.02649, %79
  %81 = sext i32 %77 to i64
  %82 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %81
  %83 = load i32, ptr %82, align 8, !tbaa !14
  %.not34 = icmp sgt i32 %83, %75
  br i1 %.not34, label %84, label %._crit_edge53

84:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %82)
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE1a, i64 0, i64 %87, i32 1
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %88)
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %89)
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = icmp eq i32 %91, %.050
  %93 = zext i1 %92 to i32
  %spec.select36 = add i32 %.050, %93
  %94 = load i32, ptr %2, align 4
  %95 = load i32, ptr %56, align 4
  %96 = sext i32 %spec.select36 to i64
  %97 = sext i32 %94 to i64
  %smax = call i32 @llvm.smax.i32(i32 %94, i32 %spec.select36)
  br label %98

98:                                               ; preds = %100, %84
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %100 ], [ %96, %84 ]
  %99 = icmp slt i64 %indvars.iv61, %97
  br i1 %99, label %100, label %.critedge

100:                                              ; preds = %98
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, 1
  %101 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ4mainE3suf, i64 0, i64 %indvars.iv.next62
  %102 = load i32, ptr %101, align 8, !tbaa !14
  %.not35 = icmp sgt i32 %102, %95
  br i1 %.not35, label %.critedge.split.loop.exit, label %98, !llvm.loop !16

.critedge.split.loop.exit:                        ; preds = %100
  %103 = trunc nsw i64 %indvars.iv61 to i32
  br label %.critedge

.critedge:                                        ; preds = %98, %.critedge.split.loop.exit
  %.2.lcssa = phi i32 [ %103, %.critedge.split.loop.exit ], [ %smax, %98 ]
  %104 = add nsw i32 %91, 1
  store i32 %104, ptr %11, align 4, !tbaa !5
  %105 = icmp slt i32 %91, %94
  %106 = icmp sle i32 %.2.lcssa, %94
  %107 = and i1 %105, %106
  br i1 %107, label %74, label %._crit_edge53, !llvm.loop !17

._crit_edge53:                                    ; preds = %.critedge, %74, %._crit_edge48
  %.127 = phi i64 [ 0, %._crit_edge48 ], [ %80, %74 ], [ %80, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.127)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; 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 #3 align 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: 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 #4

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { mustprogress norecurse 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 4}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = !{!13, !6, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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