; LLVM IR from tangjz/acm-icpc :: lydsy (2795)

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

@buf = external dso_local global [500001 x i8], align 16
@n = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@pr = external dso_local global [62501 x i32], align 16
@d = external dso_local global [500001 x i32], align 16
@hh = external dso_local global [500001 x %"struct.std::pair"], align 16
@pw = external dso_local global [500001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL4seed = external hidden constant [2 x i32], align 4
@_ZL3mod = external hidden constant [2 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 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 i32, align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %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 i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @buf)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %82, %0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %47, label %38

38:                                               ; preds = %32
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %41
  store i32 %39, ptr %42, align 4, !tbaa !5
  %43 = load i32, ptr @tot, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr @tot, align 4, !tbaa !5
  %45 = sext i32 %43 to i64
  %46 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %45
  store i32 %39, ptr %46, align 4, !tbaa !5
  br label %47

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

48:                                               ; preds = %77, %47
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = mul nsw i32 %49, %53
  store i32 %54, ptr %5, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %48
  store i32 5, ptr %3, align 4
  br label %80

58:                                               ; preds = %48
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !5
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp eq i32 %69, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %58
  store i32 5, ptr %3, align 4
  br label %80

76:                                               ; preds = %58
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %4, align 4, !tbaa !5
  br label %48, !llvm.loop !9

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

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !11

85:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  %86 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %86, ptr %6, align 4
  %87 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @pw, ptr noundef nonnull align 4 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %171, %85
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %174

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [500001 x i8], ptr @buf, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !12
  %98 = sext i8 %97 to i32
  %99 = sub nsw i32 %98, 97
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @hh, i64 0, i64 %102
  %104 = getelementptr inbounds %"struct.std::pair", ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !13
  %106 = sext i32 %105 to i64
  %107 = load i32, ptr @_ZL4seed, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %106, %108
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = add nsw i64 %109, %111
  %113 = load i32, ptr @_ZL3mod, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = srem i64 %112, %114
  %116 = trunc i64 %115 to i32
  store i32 %116, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @hh, i64 0, i64 %118
  %120 = getelementptr inbounds %"struct.std::pair", ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !15
  %122 = sext i32 %121 to i64
  %123 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZL4seed, i64 0, i64 1), align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = mul nsw i64 %122, %124
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = add nsw i64 %125, %127
  %129 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZL3mod, i64 0, i64 1), align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = srem i64 %128, %130
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %13, align 4, !tbaa !5
  %133 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %133, ptr %11, align 4
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @hh, i64 0, i64 %136
  %138 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %137, ptr noundef nonnull align 4 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @pw, i64 0, i64 %140
  %142 = getelementptr inbounds %"struct.std::pair", ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !13
  %144 = sext i32 %143 to i64
  %145 = load i32, ptr @_ZL4seed, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = mul nsw i64 %144, %146
  %148 = load i32, ptr @_ZL3mod, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = srem i64 %147, %149
  %151 = trunc i64 %150 to i32
  store i32 %151, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @pw, i64 0, i64 %153
  %155 = getelementptr inbounds %"struct.std::pair", ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = sext i32 %156 to i64
  %158 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZL4seed, i64 0, i64 1), align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = mul nsw i64 %157, %159
  %161 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZL3mod, i64 0, i64 1), align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = srem i64 %160, %162
  %164 = trunc i64 %163 to i32
  store i32 %164, ptr %16, align 4, !tbaa !5
  %165 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %165, ptr %14, align 4
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @pw, i64 0, i64 %168
  %170 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %169, ptr noundef nonnull align 4 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %171

171:                                              ; preds = %93
  %172 = load i32, ptr %9, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %9, align 4, !tbaa !5
  br label %88, !llvm.loop !16

174:                                              ; preds = %92
  %175 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n)
  br label %176

176:                                              ; preds = %245, %174
  %177 = load i32, ptr @n, align 4, !tbaa !5
  %178 = add nsw i32 %177, -1
  store i32 %178, ptr @n, align 4, !tbaa !5
  %179 = icmp ne i32 %177, 0
  br i1 %179, label %180, label %248

180:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %181 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %17, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %182 = load i32, ptr %18, align 4, !tbaa !5
  %183 = load i32, ptr %17, align 4, !tbaa !5
  %184 = sub nsw i32 %182, %183
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %186 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %186, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %187 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %187, ptr %21, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %244, %180
  %189 = load i32, ptr %21, align 4, !tbaa !5
  %190 = icmp sgt i32 %189, 1
  br i1 %190, label %192, label %191

191:                                              ; preds = %188
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %245

192:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %193 = load i32, ptr %21, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  store i32 %196, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %205, %192
  %198 = load i32, ptr %21, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = load i32, ptr %22, align 4, !tbaa !5
  %203 = icmp eq i32 %201, %202
  br i1 %203, label %204, label %211

204:                                              ; preds = %197
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %23, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %23, align 4, !tbaa !5
  %208 = load i32, ptr %22, align 4, !tbaa !5
  %209 = load i32, ptr %21, align 4, !tbaa !5
  %210 = sdiv i32 %209, %208
  store i32 %210, ptr %21, align 4, !tbaa !5
  br label %197, !llvm.loop !17

211:                                              ; preds = %197
  br label %212

212:                                              ; preds = %238, %211
  %213 = load i32, ptr %23, align 4, !tbaa !5
  %214 = icmp sgt i32 %213, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  br i1 %214, label %215, label %235

215:                                              ; preds = %212
  %216 = load i32, ptr %18, align 4, !tbaa !5
  %217 = load i32, ptr %19, align 4, !tbaa !5
  %218 = load i32, ptr %20, align 4, !tbaa !5
  %219 = load i32, ptr %22, align 4, !tbaa !5
  %220 = sdiv i32 %218, %219
  %221 = sub nsw i32 %217, %220
  %222 = call i64 @_Z4calcii(i32 noundef %216, i32 noundef %221)
  store i64 %222, ptr %24, align 4
  %223 = load i32, ptr %18, align 4, !tbaa !5
  %224 = load i32, ptr %20, align 4, !tbaa !5
  %225 = load i32, ptr %22, align 4, !tbaa !5
  %226 = sdiv i32 %224, %225
  %227 = sub nsw i32 %223, %226
  %228 = load i32, ptr %19, align 4, !tbaa !5
  %229 = load i32, ptr %20, align 4, !tbaa !5
  %230 = load i32, ptr %22, align 4, !tbaa !5
  %231 = sdiv i32 %229, %230
  %232 = sub nsw i32 %228, %231
  %233 = call i64 @_Z4calcii(i32 noundef %227, i32 noundef %232)
  store i64 %233, ptr %25, align 4
  %234 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %25)
  br label %235

235:                                              ; preds = %215, %212
  %236 = phi i1 [ false, %212 ], [ %234, %215 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br i1 %236, label %237, label %244

237:                                              ; preds = %235
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %23, align 4, !tbaa !5
  %240 = add nsw i32 %239, -1
  store i32 %240, ptr %23, align 4, !tbaa !5
  %241 = load i32, ptr %22, align 4, !tbaa !5
  %242 = load i32, ptr %20, align 4, !tbaa !5
  %243 = sdiv i32 %242, %241
  store i32 %243, ptr %20, align 4, !tbaa !5
  br label %212, !llvm.loop !18

244:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %188, !llvm.loop !19

245:                                              ; preds = %191
  %246 = load i32, ptr %20, align 4, !tbaa !5
  %247 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %246)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %176, !llvm.loop !20

248:                                              ; preds = %176
  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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z4calcii(i32 noundef, i32 noundef) #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!14, !6, i64 4}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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 }

@buf = external dso_local global [500001 x i8], align 16
@n = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@pr = external dso_local local_unnamed_addr global [62501 x i32], align 16
@d = external dso_local local_unnamed_addr global [500001 x i32], align 16
@hh = external dso_local global [500001 x %"struct.std::pair"], align 16
@pw = external dso_local global [500001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL4seed = external hidden local_unnamed_addr constant [2 x i32], align 4
@_ZL3mod = external hidden local_unnamed_addr constant [2 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @buf)
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %.not62 = icmp slt i32 %15, 2
  br i1 %.not62, label %._crit_edge66, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %0
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  %16 = add nuw i32 %15, 1
  %wide.trip.count = zext i32 %16 to i64
  br label %.lr.ph65

._crit_edge66:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  %17 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %17, ptr %1, align 8
  %18 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @pw, ptr noundef nonnull align 4 dereferenceable(8) %1) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %._crit_edge66
  %21 = load i32, ptr @_ZL4seed, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = load i32, ptr @_ZL3mod, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL4seed, i64 4), align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3mod, i64 4), align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  br label %53

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %._crit_edge
  %indvars.iv95 = phi i64 [ 2, %.lr.ph65.preheader ], [ %indvars.iv.next96, %._crit_edge ]
  %29 = phi i32 [ %tot.promoted, %.lr.ph65.preheader ], [ %37, %._crit_edge ]
  %30 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %indvars.iv95
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %.not55 = icmp eq i32 %31, 0
  %32 = trunc nuw nsw i64 %indvars.iv95 to i32
  br i1 %.not55, label %33, label %.lr.ph65._crit_edge

33:                                               ; preds = %.lr.ph65
  store i32 %32, ptr %30, align 4, !tbaa !5
  %34 = add nsw i32 %29, 1
  store i32 %34, ptr @tot, align 4, !tbaa !5
  %35 = sext i32 %29 to i64
  %36 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %35
  store i32 %32, ptr %36, align 4, !tbaa !5
  br label %.lr.ph65._crit_edge

.lr.ph65._crit_edge:                              ; preds = %.lr.ph65, %33
  %37 = phi i32 [ %34, %33 ], [ %29, %.lr.ph65 ]
  %38 = load i32, ptr @pr, align 16, !tbaa !5
  %39 = mul nsw i32 %38, %32
  %.not5659 = icmp sgt i32 %39, %15
  br i1 %.not5659, label %._crit_edge, label %.lr.ph

40:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = getelementptr inbounds [62501 x i32], ptr @pr, i64 0, i64 %indvars.iv.next
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = mul nsw i32 %42, %32
  %.not56 = icmp sgt i32 %43, %15
  br i1 %.not56, label %._crit_edge, label %.lr.ph, !llvm.loop !9

.lr.ph:                                           ; preds = %.lr.ph65._crit_edge, %40
  %indvars.iv = phi i64 [ %indvars.iv.next, %40 ], [ 0, %.lr.ph65._crit_edge ]
  %44 = phi i32 [ %43, %40 ], [ %39, %.lr.ph65._crit_edge ]
  %45 = phi i32 [ %42, %40 ], [ %38, %.lr.ph65._crit_edge ]
  %46 = sext i32 %44 to i64
  %47 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %46
  store i32 %45, ptr %47, align 4, !tbaa !5
  %48 = load i32, ptr %30, align 4, !tbaa !5
  %49 = icmp eq i32 %48, %45
  br i1 %49, label %._crit_edge, label %40

._crit_edge:                                      ; preds = %40, %.lr.ph, %.lr.ph65._crit_edge
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge66, label %.lr.ph65, !llvm.loop !11

._crit_edge70:                                    ; preds = %53, %._crit_edge66
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n)
  %51 = load i32, ptr @n, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr @n, align 4, !tbaa !5
  %.not5486 = icmp eq i32 %51, 0
  br i1 %.not5486, label %._crit_edge89, label %.lr.ph88

53:                                               ; preds = %.lr.ph69, %53
  %indvars.iv98 = phi i64 [ 0, %.lr.ph69 ], [ %indvars.iv.next99, %53 ]
  %54 = getelementptr inbounds [500001 x i8], ptr @buf, i64 0, i64 %indvars.iv98
  %55 = load i8, ptr %54, align 1, !tbaa !12
  %56 = sext i8 %55 to i64
  %57 = add nsw i64 %56, -96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %58 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @hh, i64 0, i64 %indvars.iv98
  %59 = load i32, ptr %58, align 8, !tbaa !13
  %60 = sext i32 %59 to i64
  %61 = mul nsw i64 %22, %60
  %62 = add nsw i64 %61, %57
  %63 = srem i64 %62, %24
  %64 = trunc nsw i64 %63 to i32
  store i32 %64, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %65 = getelementptr inbounds i8, ptr %58, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !15
  %67 = sext i32 %66 to i64
  %68 = mul nsw i64 %26, %67
  %69 = add nsw i64 %68, %57
  %70 = srem i64 %69, %28
  %71 = trunc nsw i64 %70 to i32
  store i32 %71, ptr %6, align 4, !tbaa !5
  %72 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %72, ptr %4, align 8
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %73 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @hh, i64 0, i64 %indvars.iv.next99
  %74 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %73, ptr noundef nonnull align 4 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %75 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @pw, i64 0, i64 %indvars.iv98
  %76 = load i32, ptr %75, align 8, !tbaa !13
  %77 = sext i32 %76 to i64
  %78 = mul nsw i64 %77, %22
  %79 = srem i64 %78, %24
  %80 = trunc nsw i64 %79 to i32
  store i32 %80, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %81 = getelementptr inbounds i8, ptr %75, i64 4
  %82 = load i32, ptr %81, align 4, !tbaa !15
  %83 = sext i32 %82 to i64
  %84 = mul nsw i64 %83, %26
  %85 = srem i64 %84, %28
  %86 = trunc nsw i64 %85 to i32
  store i32 %86, ptr %9, align 4, !tbaa !5
  %87 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %87, ptr %7, align 8
  %88 = getelementptr inbounds [500001 x %"struct.std::pair"], ptr @pw, i64 0, i64 %indvars.iv.next99
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next99, %91
  br i1 %92, label %53, label %._crit_edge70, !llvm.loop !16

.lr.ph88:                                         ; preds = %._crit_edge70, %._crit_edge84
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %93 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = sub nsw i32 %94, %95
  %97 = add nsw i32 %96, 1
  %98 = icmp sgt i32 %96, 0
  br i1 %98, label %.lr.ph74.preheader, label %._crit_edge84

._crit_edge84:                                    ; preds = %.loopexit, %.lr.ph88
  %.048.lcssa = phi i32 [ %97, %.lr.ph88 ], [ %.14958, %.loopexit ]
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.048.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr @n, align 4, !tbaa !5
  %.not54 = icmp eq i32 %100, 0
  br i1 %.not54, label %._crit_edge89, label %.lr.ph88, !llvm.loop !17

.lr.ph74.preheader:                               ; preds = %.lr.ph88, %.loopexit
  %.04681 = phi i32 [ %106, %.loopexit ], [ %97, %.lr.ph88 ]
  %.04880 = phi i32 [ %.14958, %.loopexit ], [ %97, %.lr.ph88 ]
  %102 = zext nneg i32 %.04681 to i64
  %103 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  br label %.lr.ph74

.lr.ph78.preheader:                               ; preds = %.lr.ph74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  br label %.lr.ph78

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %.lr.ph74
  %.072 = phi i32 [ %105, %.lr.ph74 ], [ 0, %.lr.ph74.preheader ]
  %.14771 = phi i32 [ %106, %.lr.ph74 ], [ %.04681, %.lr.ph74.preheader ]
  %105 = add nuw nsw i32 %.072, 1
  %106 = sdiv i32 %.14771, %104
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [500001 x i32], ptr @d, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp eq i32 %109, %104
  br i1 %110, label %.lr.ph74, label %.lr.ph78.preheader, !llvm.loop !18

111:                                              ; preds = %.lr.ph78
  %112 = add nsw i32 %.177, -1
  %113 = icmp sgt i32 %.177, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  br i1 %113, label %.lr.ph78, label %.critedge, !llvm.loop !19

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %111
  %.177 = phi i32 [ %112, %111 ], [ %105, %.lr.ph78.preheader ]
  %.14976 = phi i32 [ %115, %111 ], [ %.04880, %.lr.ph78.preheader ]
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = sdiv i32 %.14976, %104
  %116 = sub nsw i32 %97, %115
  %117 = call i64 @_Z4calcii(i32 noundef %114, i32 noundef %116)
  store i64 %117, ptr %12, align 8
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sub nsw i32 %118, %115
  %120 = call i64 @_Z4calcii(i32 noundef %119, i32 noundef %116)
  store i64 %120, ptr %13, align 8
  %121 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br i1 %121, label %111, label %.loopexit

.critedge:                                        ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph78, %.critedge
  %.14958 = phi i32 [ %115, %.critedge ], [ %.14976, %.lr.ph78 ]
  %122 = icmp sgt i32 %106, 1
  br i1 %122, label %.lr.ph74.preheader, label %._crit_edge84, !llvm.loop !20

._crit_edge89:                                    ; preds = %._crit_edge84, %._crit_edge70
  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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z4calcii(i32 noundef, i32 noundef) 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!14, !6, i64 4}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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