; LLVM IR from tangjz/acm-icpc :: codeforces/complete (906E)

; 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
@m = external dso_local global i32, align 4
@sta = external dso_local global [25 x i32], align 16
@dif = external dso_local global [25 x i32], align 16
@cnt = external dso_local global [25 x i32], align 16
@f = external dso_local global [1000001 x %"struct.std::pair"], align 16
@g = external dso_local global [1000001 x %"struct.std::pair"], align 16
@buf = external dso_local global [1000001 x i8], align 16
@str = external dso_local global [1000001 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ4mainE4tsta = external hidden global [25 x i32], align 16
@_ZZ4mainE4tdif = external hidden global [25 x i32], align 16
@_ZZ4mainE4tcnt = external hidden global [25 x i32], align 16
@_ZL4maxn = external hidden constant i32, align 4
@.str.1 = external hidden unnamed_addr constant [4 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 i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @buf, i64 1), ptr noundef getelementptr inbounds (i8, ptr @str, i64 1))
  %20 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @buf, i64 1)) #8
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  %22 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %22, ptr %2, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %45, %0
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp sge i32 %24, 1
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %23
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !9
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = shl i32 %32, 1
  %34 = sub nsw i32 %33, 1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %35
  store i8 %31, ptr %36, align 1, !tbaa !9
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1000001 x i8], ptr @buf, i64 0, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !9
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = shl i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %43
  store i8 %40, ptr %44, align 1, !tbaa !9
  br label %45

45:                                               ; preds = %27
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = add nsw i32 %46, -1
  store i32 %47, ptr %2, align 4, !tbaa !5
  br label %23, !llvm.loop !10

48:                                               ; preds = %26
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = shl i32 %49, 1
  store i32 %50, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %388, %48
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %391

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %57 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %57, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 -1000001, ptr %6, align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = mul i64 %59, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @_ZZ4mainE4tsta, i64 1), ptr align 4 getelementptr inbounds (i32, ptr @sta, i64 1), i64 %60, i1 false)
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = mul i64 %62, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @_ZZ4mainE4tdif, i64 1), ptr align 4 getelementptr inbounds (i32, ptr @dif, i64 1), i64 %63, i1 false)
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = mul i64 %65, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @_ZZ4mainE4tcnt, i64 1), ptr align 4 getelementptr inbounds (i32, ptr @cnt, i64 1), i64 %66, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %245, %56
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %72, label %71

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

72:                                               ; preds = %67
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %77
  %79 = load i8, ptr %78, align 1, !tbaa !9
  %80 = sext i8 %79 to i32
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %80, %85
  br i1 %86, label %87, label %137

87:                                               ; preds = %72
  %88 = load i32, ptr @m, align 4, !tbaa !5
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %109

90:                                               ; preds = %87
  %91 = load i32, ptr @m, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sub nsw i32 %98, 1
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sub nsw i32 %99, %100
  %102 = icmp eq i32 %94, %101
  br i1 %102, label %103, label %109

103:                                              ; preds = %90
  %104 = load i32, ptr @m, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %106, align 4, !tbaa !5
  br label %131

109:                                              ; preds = %90, %87
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sub nsw i32 %113, 1
  %115 = load i32, ptr @m, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr @m, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %117
  store i32 %114, ptr %118, align 4, !tbaa !5
  %119 = load i32, ptr @m, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = sub nsw i32 %122, %123
  %125 = load i32, ptr @m, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %126
  store i32 %124, ptr %127, align 4, !tbaa !5
  %128 = load i32, ptr @m, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %129
  store i32 1, ptr %130, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %109, %103
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = sub nsw i32 %135, 1
  store i32 %136, ptr %6, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %131, %72
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tcnt, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = icmp sgt i32 %141, 1
  br i1 %142, label %143, label %244

143:                                              ; preds = %137
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tdif, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = add nsw i32 %147, %151
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !9
  %156 = sext i8 %155 to i32
  %157 = load i32, ptr %3, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %158
  %160 = load i8, ptr %159, align 1, !tbaa !9
  %161 = sext i8 %160 to i32
  %162 = icmp eq i32 %156, %161
  br i1 %162, label %163, label %244

163:                                              ; preds = %143
  %164 = load i32, ptr @m, align 4, !tbaa !5
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %195

166:                                              ; preds = %163
  %167 = load i32, ptr @m, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr %7, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %7, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tdif, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %174, %178
  %180 = sub nsw i32 %179, 1
  %181 = load i32, ptr %6, align 4, !tbaa !5
  %182 = sub nsw i32 %180, %181
  %183 = icmp eq i32 %170, %182
  br i1 %183, label %184, label %195

184:                                              ; preds = %166
  %185 = load i32, ptr %7, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tcnt, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sub nsw i32 %188, 1
  %190 = load i32, ptr @m, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = add nsw i32 %193, %189
  store i32 %194, ptr %192, align 4, !tbaa !5
  br label %227

195:                                              ; preds = %166, %163
  %196 = load i32, ptr %7, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = load i32, ptr %7, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tdif, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = add nsw i32 %199, %203
  %205 = sub nsw i32 %204, 1
  %206 = load i32, ptr @m, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr @m, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %208
  store i32 %205, ptr %209, align 4, !tbaa !5
  %210 = load i32, ptr @m, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = load i32, ptr %6, align 4, !tbaa !5
  %215 = sub nsw i32 %213, %214
  %216 = load i32, ptr @m, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %217
  store i32 %215, ptr %218, align 4, !tbaa !5
  %219 = load i32, ptr %7, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tcnt, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = sub nsw i32 %222, 1
  %224 = load i32, ptr @m, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %225
  store i32 %223, ptr %226, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %195, %184
  %228 = load i32, ptr %7, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = load i32, ptr %7, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tdif, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !5
  %236 = load i32, ptr %7, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tcnt, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sub nsw i32 %239, 1
  %241 = mul nsw i32 %235, %240
  %242 = add nsw i32 %231, %241
  %243 = sub nsw i32 %242, 1
  store i32 %243, ptr %6, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %227, %143, %137
  br label %245

245:                                              ; preds = %244
  %246 = load i32, ptr %7, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %7, align 4, !tbaa !5
  br label %67, !llvm.loop !12

248:                                              ; preds = %71
  %249 = load i32, ptr %3, align 4, !tbaa !5
  %250 = sub nsw i32 %249, 1
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %251
  %253 = load i8, ptr %252, align 1, !tbaa !9
  %254 = sext i8 %253 to i32
  %255 = load i32, ptr %3, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %256
  %258 = load i8, ptr %257, align 1, !tbaa !9
  %259 = sext i8 %258 to i32
  %260 = icmp eq i32 %254, %259
  br i1 %260, label %261, label %314

261:                                              ; preds = %248
  %262 = load i32, ptr @m, align 4, !tbaa !5
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %264, label %280

264:                                              ; preds = %261
  %265 = load i32, ptr %3, align 4, !tbaa !5
  %266 = sub nsw i32 %265, 2
  %267 = load i32, ptr %6, align 4, !tbaa !5
  %268 = sub nsw i32 %266, %267
  %269 = load i32, ptr @m, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = icmp eq i32 %268, %272
  br i1 %273, label %274, label %280

274:                                              ; preds = %264
  %275 = load i32, ptr @m, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %277, align 4, !tbaa !5
  br label %299

280:                                              ; preds = %264, %261
  %281 = load i32, ptr %3, align 4, !tbaa !5
  %282 = sub nsw i32 %281, 2
  %283 = load i32, ptr @m, align 4, !tbaa !5
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr @m, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %285
  store i32 %282, ptr %286, align 4, !tbaa !5
  %287 = load i32, ptr @m, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %288
  %290 = load i32, ptr %289, align 4, !tbaa !5
  %291 = load i32, ptr %6, align 4, !tbaa !5
  %292 = sub nsw i32 %290, %291
  %293 = load i32, ptr @m, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %294
  store i32 %292, ptr %295, align 4, !tbaa !5
  %296 = load i32, ptr @m, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %297
  store i32 1, ptr %298, align 4, !tbaa !5
  br label %299

299:                                              ; preds = %280, %274
  %300 = load i32, ptr %3, align 4, !tbaa !5
  %301 = sub nsw i32 %300, 2
  store i32 %301, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %302 = load i32, ptr %3, align 4, !tbaa !5
  %303 = sub nsw i32 %302, 2
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %304
  %306 = getelementptr inbounds %"struct.std::pair", ptr %305, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %307 = load i32, ptr %3, align 4, !tbaa !5
  %308 = sub nsw i32 %307, 2
  store i32 %308, ptr %9, align 4, !tbaa !5
  %309 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %306, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %309, ptr %8, align 4
  %310 = load i32, ptr %3, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %311
  %313 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %312, ptr noundef nonnull align 4 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %320

314:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %315 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %315, ptr %10, align 4
  %316 = load i32, ptr %3, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %317
  %319 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %318, ptr noundef nonnull align 4 dereferenceable(8) %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %320

320:                                              ; preds = %314, %299
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %321

321:                                              ; preds = %384, %320
  %322 = load i32, ptr %11, align 4, !tbaa !5
  %323 = load i32, ptr @m, align 4, !tbaa !5
  %324 = icmp sle i32 %322, %323
  br i1 %324, label %326, label %325

325:                                              ; preds = %321
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %387

326:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %327 = load i32, ptr %11, align 4, !tbaa !5
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %328
  %330 = load i32, ptr %329, align 4, !tbaa !5
  store i32 %330, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %331 = load i32, ptr %11, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %332
  %334 = load i32, ptr %333, align 4, !tbaa !5
  store i32 %334, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %335 = load i32, ptr %11, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !5
  store i32 %338, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %339 = load i32, ptr %12, align 4, !tbaa !5
  %340 = load i32, ptr %14, align 4, !tbaa !5
  %341 = sub nsw i32 %340, 1
  %342 = load i32, ptr %13, align 4, !tbaa !5
  %343 = mul nsw i32 %341, %342
  %344 = add nsw i32 %339, %343
  store i32 %344, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %345 = load i32, ptr %15, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %346
  %348 = getelementptr inbounds %"struct.std::pair", ptr %347, i32 0, i32 0
  %349 = load i32, ptr %348, align 8, !tbaa !13
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %17, align 4, !tbaa !5
  %351 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %351, ptr %16, align 4
  %352 = load i32, ptr %15, align 4, !tbaa !5
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %353
  %355 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %354, ptr noundef nonnull align 4 dereferenceable(8) %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  %356 = load i32, ptr %14, align 4, !tbaa !5
  %357 = icmp sgt i32 %356, 1
  br i1 %357, label %358, label %372

358:                                              ; preds = %326
  %359 = load i32, ptr %15, align 4, !tbaa !5
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %360
  %362 = load i32, ptr %15, align 4, !tbaa !5
  %363 = load i32, ptr %13, align 4, !tbaa !5
  %364 = sub nsw i32 %362, %363
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %365
  %367 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %361, ptr noundef nonnull align 4 dereferenceable(8) %366)
  %368 = load i32, ptr %15, align 4, !tbaa !5
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %369
  %371 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %370, ptr noundef nonnull align 4 dereferenceable(8) %367)
  br label %372

372:                                              ; preds = %358, %326
  %373 = load i32, ptr %3, align 4, !tbaa !5
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %374
  %376 = load i32, ptr %15, align 4, !tbaa !5
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %377
  %379 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %375, ptr noundef nonnull align 4 dereferenceable(8) %378)
  %380 = load i32, ptr %3, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %381
  %383 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %382, ptr noundef nonnull align 4 dereferenceable(8) %379)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %384

384:                                              ; preds = %372
  %385 = load i32, ptr %11, align 4, !tbaa !5
  %386 = add nsw i32 %385, 1
  store i32 %386, ptr %11, align 4, !tbaa !5
  br label %321, !llvm.loop !15

387:                                              ; preds = %325
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %388

388:                                              ; preds = %387
  %389 = load i32, ptr %3, align 4, !tbaa !5
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %3, align 4, !tbaa !5
  br label %51, !llvm.loop !16

391:                                              ; preds = %55
  %392 = load i32, ptr @n, align 4, !tbaa !5
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %393
  %395 = getelementptr inbounds %"struct.std::pair", ptr %394, i32 0, i32 0
  %396 = load i32, ptr %395, align 8, !tbaa !13
  %397 = icmp slt i32 %396, 1000001
  br i1 %397, label %398, label %438

398:                                              ; preds = %391
  %399 = load i32, ptr @n, align 4, !tbaa !5
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %400
  %402 = getelementptr inbounds %"struct.std::pair", ptr %401, i32 0, i32 0
  %403 = load i32, ptr %402, align 8, !tbaa !13
  %404 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %403)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %405 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %405, ptr %18, align 4, !tbaa !5
  br label %406

406:                                              ; preds = %431, %398
  %407 = load i32, ptr %18, align 4, !tbaa !5
  %408 = icmp sgt i32 %407, 0
  br i1 %408, label %410, label %409

409:                                              ; preds = %406
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %437

410:                                              ; preds = %406
  %411 = load i32, ptr %18, align 4, !tbaa !5
  %412 = load i32, ptr %18, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %413
  %415 = getelementptr inbounds %"struct.std::pair", ptr %414, i32 0, i32 1
  %416 = load i32, ptr %415, align 4, !tbaa !17
  %417 = sub nsw i32 %411, %416
  %418 = icmp sgt i32 %417, 2
  br i1 %418, label %419, label %430

419:                                              ; preds = %410
  %420 = load i32, ptr %18, align 4, !tbaa !5
  %421 = sext i32 %420 to i64
  %422 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %421
  %423 = getelementptr inbounds %"struct.std::pair", ptr %422, i32 0, i32 1
  %424 = load i32, ptr %423, align 4, !tbaa !17
  %425 = ashr i32 %424, 1
  %426 = add nsw i32 %425, 1
  %427 = load i32, ptr %18, align 4, !tbaa !5
  %428 = ashr i32 %427, 1
  %429 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %426, i32 noundef %428)
  br label %430

430:                                              ; preds = %419, %410
  br label %431

431:                                              ; preds = %430
  %432 = load i32, ptr %18, align 4, !tbaa !5
  %433 = sext i32 %432 to i64
  %434 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %433
  %435 = getelementptr inbounds %"struct.std::pair", ptr %434, i32 0, i32 1
  %436 = load i32, ptr %435, align 4, !tbaa !17
  store i32 %436, ptr %18, align 4, !tbaa !5
  br label %406, !llvm.loop !18

437:                                              ; preds = %409
  br label %440

438:                                              ; preds = %391
  %439 = call i32 @puts(ptr noundef @.str.3)
  br label %440

440:                                              ; preds = %438, %437
  ret i32 0
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

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

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

declare i32 @puts(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 = { nounwind willreturn memory(read) "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { 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 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = !{!14, !6, i64 4}
!18 = distinct !{!18, !11}


; 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 local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@sta = external dso_local local_unnamed_addr global [25 x i32], align 16
@dif = external dso_local local_unnamed_addr global [25 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [25 x i32], align 16
@f = external dso_local global [1000001 x %"struct.std::pair"], align 16
@g = external dso_local global [1000001 x %"struct.std::pair"], align 16
@buf = external dso_local global [1000001 x i8], align 16
@str = external dso_local global [1000001 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ4mainE4tsta = external hidden local_unnamed_addr global [25 x i32], align 16
@_ZZ4mainE4tdif = external hidden local_unnamed_addr global [25 x i32], align 16
@_ZZ4mainE4tcnt = external hidden local_unnamed_addr global [25 x i32], align 16
@_ZL4maxn = external hidden constant i32, align 4
@.str.1 = external hidden unnamed_addr constant [4 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 %"struct.std::pair", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 1), ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 1))
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @buf, i64 1)) #8
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %12 = and i64 %9, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %13 = shl i32 %10, 1
  store i32 %13, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 1, ptr %1, align 4, !tbaa !5
  %.not76 = icmp slt i32 %13, 1
  br i1 %.not76, label %._crit_edge80, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %._crit_edge
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %.lr.ph79

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %12, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %14 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv
  %15 = load i8, ptr %14, align 1, !tbaa !9
  %indvars.iv.tr = trunc i64 %indvars.iv to i32
  %16 = shl i32 %indvars.iv.tr, 1
  %17 = add nsw i32 %16, -1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %18
  store i8 %15, ptr %19, align 1, !tbaa !9
  %20 = getelementptr inbounds [1000001 x i8], ptr @buf, i64 0, i64 %indvars.iv
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = sext i32 %16 to i64
  %23 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %22
  store i8 %21, ptr %23, align 2, !tbaa !9
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %24 = icmp ugt i64 %indvars.iv, 1
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge80:                                    ; preds = %._crit_edge75, %._crit_edge
  %.lcssa = phi i32 [ %13, %._crit_edge ], [ %151, %._crit_edge75 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  %25 = sext i32 %.lcssa to i64
  %26 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %25
  %27 = load i32, ptr %26, align 8, !tbaa !12
  %28 = icmp slt i32 %27, 1000001
  br i1 %28, label %197, label %212

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %._crit_edge75
  %29 = phi i32 [ %148, %._crit_edge75 ], [ %.pre, %.lr.ph79.preheader ]
  %storemerge77 = phi i32 [ %150, %._crit_edge75 ], [ 1, %.lr.ph79.preheader ]
  store i32 0, ptr @m, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = shl nsw i64 %30, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ4mainE4tsta, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @sta, i64 4), i64 %31, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ4mainE4tdif, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @dif, i64 4), i64 %31, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ4mainE4tcnt, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @cnt, i64 4), i64 %31, i1 false)
  %.not5965 = icmp slt i32 %29, 1
  %.phi.trans.insert = sext i32 %storemerge77 to i64
  %.phi.trans.insert94 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %.phi.trans.insert
  %.pre95 = load i8, ptr %.phi.trans.insert94, align 1, !tbaa !9
  br i1 %.not5965, label %._crit_edge70.thread, label %.lr.ph69

.lr.ph69:                                         ; preds = %.lr.ph79
  %32 = add nuw i32 %29, 1
  %wide.trip.count = zext i32 %32 to i64
  br label %43

._crit_edge70:                                    ; preds = %111
  %33 = add nsw i32 %storemerge77, -1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = icmp eq i8 %36, %.pre95
  br i1 %37, label %113, label %140

._crit_edge70.thread:                             ; preds = %.lr.ph79
  %38 = add nsw i32 %storemerge77, -1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = icmp eq i8 %41, %.pre95
  br i1 %42, label %._crit_edge101, label %140

43:                                               ; preds = %.lr.ph69, %111
  %indvars.iv88 = phi i64 [ 1, %.lr.ph69 ], [ %indvars.iv.next89, %111 ]
  %.05167 = phi i32 [ -1000001, %.lr.ph69 ], [ %.2, %111 ]
  %44 = phi i32 [ 0, %.lr.ph69 ], [ %112, %111 ]
  %45 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tsta, i64 0, i64 %indvars.iv88
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = icmp eq i8 %49, %.pre95
  br i1 %50, label %51, label %71

51:                                               ; preds = %43
  %.not62 = icmp eq i32 %44, 0
  br i1 %.not62, label %63, label %52

52:                                               ; preds = %51
  %53 = sext i32 %44 to i64
  %54 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = xor i32 %.05167, -1
  %57 = add i32 %46, %56
  %58 = icmp eq i32 %55, %57
  br i1 %58, label %59, label %63

59:                                               ; preds = %52
  %60 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %53
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !5
  %.pre98 = add nsw i32 %46, -1
  br label %71

63:                                               ; preds = %52, %51
  %64 = add nsw i32 %46, -1
  %65 = add nsw i32 %44, 1
  store i32 %65, ptr @m, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !5
  %68 = sub nsw i32 %64, %.05167
  %69 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %66
  store i32 %68, ptr %69, align 4, !tbaa !5
  %70 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %66
  store i32 1, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %59, %63, %43
  %72 = phi i32 [ %44, %43 ], [ %65, %63 ], [ %44, %59 ]
  %.1 = phi i32 [ %.05167, %43 ], [ %64, %63 ], [ %.pre98, %59 ]
  %73 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tcnt, i64 0, i64 %indvars.iv88
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 1
  br i1 %75, label %76, label %111

76:                                               ; preds = %71
  %77 = getelementptr inbounds [25 x i32], ptr @_ZZ4mainE4tdif, i64 0, i64 %indvars.iv88
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = add nsw i32 %78, %46
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %83 = icmp eq i8 %82, %.pre95
  br i1 %83, label %84, label %111

84:                                               ; preds = %76
  %.not63 = icmp eq i32 %72, 0
  br i1 %.not63, label %97, label %85

85:                                               ; preds = %84
  %86 = sext i32 %72 to i64
  %87 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = xor i32 %.1, -1
  %90 = add i32 %79, %89
  %91 = icmp eq i32 %88, %90
  br i1 %91, label %92, label %97

92:                                               ; preds = %85
  %93 = add nsw i32 %74, -1
  %94 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %86
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %93, %95
  store i32 %96, ptr %94, align 4, !tbaa !5
  br label %106

97:                                               ; preds = %85, %84
  %98 = add nsw i32 %79, -1
  %99 = add nsw i32 %72, 1
  store i32 %99, ptr @m, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %100
  store i32 %98, ptr %101, align 4, !tbaa !5
  %102 = sub nsw i32 %98, %.1
  %103 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %100
  store i32 %102, ptr %103, align 4, !tbaa !5
  %104 = add nsw i32 %74, -1
  %105 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %100
  store i32 %104, ptr %105, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %97, %92
  %.pre-phi100 = phi i32 [ %104, %97 ], [ %93, %92 ]
  %107 = phi i32 [ %99, %97 ], [ %72, %92 ]
  %108 = mul nsw i32 %78, %.pre-phi100
  %109 = add i32 %46, -1
  %110 = add i32 %109, %108
  br label %111

111:                                              ; preds = %71, %76, %106
  %112 = phi i32 [ %107, %106 ], [ %72, %76 ], [ %72, %71 ]
  %.2 = phi i32 [ %110, %106 ], [ %.1, %76 ], [ %.1, %71 ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge70, label %43, !llvm.loop !14

113:                                              ; preds = %._crit_edge70
  %.not60 = icmp eq i32 %112, 0
  br i1 %.not60, label %._crit_edge101, label %114

._crit_edge101:                                   ; preds = %._crit_edge70.thread, %113
  %.051.lcssa107110 = phi i32 [ %.2, %113 ], [ -1000001, %._crit_edge70.thread ]
  %.pre102 = add nsw i32 %storemerge77, -2
  %.pre104 = sub nsw i32 %.pre102, %.051.lcssa107110
  br label %125

114:                                              ; preds = %113
  %115 = add nsw i32 %storemerge77, -2
  %116 = sub i32 %115, %.2
  %117 = sext i32 %112 to i64
  %118 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = icmp eq i32 %116, %119
  br i1 %120, label %121, label %125

121:                                              ; preds = %114
  %122 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %117
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %122, align 4, !tbaa !5
  br label %132

125:                                              ; preds = %._crit_edge101, %114
  %126 = phi i32 [ 0, %._crit_edge101 ], [ %112, %114 ]
  %.pre-phi105 = phi i32 [ %.pre104, %._crit_edge101 ], [ %116, %114 ]
  %.pre-phi103 = phi i32 [ %.pre102, %._crit_edge101 ], [ %115, %114 ]
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr @m, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %128
  store i32 %.pre-phi103, ptr %129, align 4, !tbaa !5
  %130 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %128
  store i32 %.pre-phi105, ptr %130, align 4, !tbaa !5
  %131 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %128
  store i32 1, ptr %131, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %125, %121
  %.pre-phi97 = phi i32 [ %.pre-phi103, %125 ], [ %115, %121 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %133 = sext i32 %.pre-phi97 to i64
  %134 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %133
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 %.pre-phi97, ptr %3, align 4, !tbaa !5
  %135 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %134, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %135, ptr %2, align 8
  %136 = load i32, ptr %1, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %137
  %139 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %138, ptr noundef nonnull align 4 dereferenceable(8) %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  br label %146

140:                                              ; preds = %._crit_edge70.thread, %._crit_edge70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %141 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %141, ptr %4, align 8
  %142 = load i32, ptr %1, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %143
  %145 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %144, ptr noundef nonnull align 4 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  br label %146

146:                                              ; preds = %140, %132
  %147 = load i32, ptr @m, align 4, !tbaa !5
  %.not6171 = icmp slt i32 %147, 1
  br i1 %.not6171, label %._crit_edge75, label %.lr.ph74

._crit_edge75:                                    ; preds = %183, %146
  %148 = phi i32 [ %147, %146 ], [ %195, %183 ]
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %1, align 4, !tbaa !5
  %151 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %149, %151
  br i1 %.not.not, label %.lr.ph79, label %._crit_edge80, !llvm.loop !15

.lr.ph74:                                         ; preds = %146, %183
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %183 ], [ 1, %146 ]
  %152 = getelementptr inbounds [25 x i32], ptr @sta, i64 0, i64 %indvars.iv91
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = getelementptr inbounds [25 x i32], ptr @dif, i64 0, i64 %indvars.iv91
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = getelementptr inbounds [25 x i32], ptr @cnt, i64 0, i64 %indvars.iv91
  %157 = load i32, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %158 = add nsw i32 %157, -1
  %159 = mul nsw i32 %158, %155
  %160 = add nsw i32 %159, %153
  store i32 %160, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %161
  %163 = load i32, ptr %162, align 8, !tbaa !12
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %7, align 4, !tbaa !5
  %165 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %165, ptr %6, align 8
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %167
  %169 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %168, ptr noundef nonnull align 4 dereferenceable(8) %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %170 = icmp sgt i32 %157, 1
  br i1 %170, label %171, label %183

171:                                              ; preds = %.lr.ph74
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %173
  %175 = sub nsw i32 %172, %155
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %176
  %178 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %174, ptr noundef nonnull align 4 dereferenceable(8) %177)
  %179 = load i32, ptr %5, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %180
  %182 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %181, ptr noundef nonnull align 4 dereferenceable(8) %178)
  br label %183

183:                                              ; preds = %171, %.lr.ph74
  %184 = load i32, ptr %1, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %185
  %187 = load i32, ptr %5, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @g, i64 0, i64 %188
  %190 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %186, ptr noundef nonnull align 4 dereferenceable(8) %189)
  %191 = load i32, ptr %1, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %192
  %194 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %193, ptr noundef nonnull align 4 dereferenceable(8) %190)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %195 = load i32, ptr @m, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %.not61.not = icmp slt i64 %indvars.iv91, %196
  br i1 %.not61.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !16

197:                                              ; preds = %._crit_edge80
  %198 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %27)
  %.082 = load i32, ptr @n, align 4, !tbaa !5
  %199 = icmp sgt i32 %.082, 0
  br i1 %199, label %.lr.ph85, label %.loopexit

.lr.ph85:                                         ; preds = %197, %210
  %.083 = phi i32 [ %.0, %210 ], [ %.082, %197 ]
  %200 = zext nneg i32 %.083 to i64
  %201 = getelementptr inbounds [1000001 x %"struct.std::pair"], ptr @f, i64 0, i64 %200, i32 1
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = sub nsw i32 %.083, %202
  %204 = icmp sgt i32 %203, 2
  br i1 %204, label %205, label %210

205:                                              ; preds = %.lr.ph85
  %206 = ashr i32 %202, 1
  %207 = add nsw i32 %206, 1
  %208 = lshr i32 %.083, 1
  %209 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %207, i32 noundef %208)
  %.0.pre = load i32, ptr %201, align 4, !tbaa !5
  br label %210

210:                                              ; preds = %.lr.ph85, %205
  %.0 = phi i32 [ %202, %.lr.ph85 ], [ %.0.pre, %205 ]
  %211 = icmp sgt i32 %.0, 0
  br i1 %211, label %.lr.ph85, label %.loopexit, !llvm.loop !17

212:                                              ; preds = %._crit_edge80
  %213 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.loopexit

.loopexit:                                        ; preds = %210, %197, %212
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3minISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 nofree nounwind willreturn memory(argmem: read) "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { 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 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}


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