; LLVM IR from tangjz/acm-icpc :: codechef/SNCKQL21/SSTRPREF2.ll (Z5solvev)

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

@_ZZ5solvevE1A = external hidden global [1000001 x i8], align 16
@_ZZ5solvevE1B = external hidden global [1000001 x i8], align 16
@_ZZ5solvevE1C = external hidden global [1000001 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ5solvevE1f = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1g = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1h = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1z = external hidden global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @_ZZ5solvevE1A, ptr noundef @_ZZ5solvevE1B, ptr noundef @_ZZ5solvevE1C)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %19 = call i64 @strlen(ptr noundef @_ZZ5solvevE1A) #7
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %21 = call i64 @strlen(ptr noundef @_ZZ5solvevE1B) #7
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %23 = call i64 @strlen(ptr noundef @_ZZ5solvevE1C) #7
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %27 = getelementptr inbounds i32, ptr %26, i64 0
  store i32 %25, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %28 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  br label %29

29:                                               ; preds = %101, %0
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %104

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

38:                                               ; preds = %34
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = sub nsw i32 %41, %42
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %40, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %39, %46
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %62

50:                                               ; preds = %38
  %51 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sub nsw i32 %52, %53
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %51, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %58, i64 %60
  store i32 %57, ptr %61, align 4, !tbaa !5
  br label %101

62:                                               ; preds = %38, %34
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %7, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %80, %62
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = sext i8 %69 to i32
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sub nsw i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !11
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %70, %77
  br i1 %78, label %79, label %83

79:                                               ; preds = %65
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !5
  br label %65, !llvm.loop !12

83:                                               ; preds = %65
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = sub nsw i32 %84, %85
  %87 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  store i32 %86, ptr %90, align 4, !tbaa !5
  %91 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %83
  %98 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %98, ptr %5, align 4, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %99, ptr %6, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %97, %83
  br label %101

101:                                              ; preds = %100, %50
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !14

104:                                              ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %105 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %105, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  br label %106

106:                                              ; preds = %183, %104
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %186

111:                                              ; preds = %106
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %138

115:                                              ; preds = %111
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sub nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %117, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %116, %123
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %138

127:                                              ; preds = %115
  %128 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !9
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = sub nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %128, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %8, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %136
  store i32 %134, ptr %137, align 4, !tbaa !5
  br label %183

138:                                              ; preds = %115, %111
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %11, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %164, %138
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !11
  %146 = icmp ne i8 %145, 0
  br i1 %146, label %147, label %161

147:                                              ; preds = %141
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !11
  %152 = sext i8 %151 to i32
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = load i32, ptr %8, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %156
  %158 = load i8, ptr %157, align 1, !tbaa !11
  %159 = sext i8 %158 to i32
  %160 = icmp eq i32 %152, %159
  br label %161

161:                                              ; preds = %147, %141
  %162 = phi i1 [ false, %141 ], [ %160, %147 ]
  br i1 %162, label %163, label %167

163:                                              ; preds = %161
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %11, align 4, !tbaa !5
  br label %141, !llvm.loop !15

167:                                              ; preds = %161
  %168 = load i32, ptr %11, align 4, !tbaa !5
  %169 = load i32, ptr %8, align 4, !tbaa !5
  %170 = sub nsw i32 %168, %169
  %171 = load i32, ptr %8, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %172
  store i32 %170, ptr %173, align 4, !tbaa !5
  %174 = load i32, ptr %8, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = icmp sgt i32 %177, 0
  br i1 %178, label %179, label %182

179:                                              ; preds = %167
  %180 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %180, ptr %9, align 4, !tbaa !5
  %181 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %181, ptr %10, align 4, !tbaa !5
  br label %182

182:                                              ; preds = %179, %167
  br label %183

183:                                              ; preds = %182, %127
  %184 = load i32, ptr %8, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %8, align 4, !tbaa !5
  br label %106, !llvm.loop !16

186:                                              ; preds = %110
  %187 = load i32, ptr %3, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %188
  store i32 0, ptr %189, align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds ([1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 1), align 4, !tbaa !5
  store i32 0, ptr @_ZZ5solvevE1f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %241, %186
  %191 = load i32, ptr %12, align 4, !tbaa !5
  %192 = load i32, ptr %1, align 4, !tbaa !5
  %193 = icmp slt i32 %191, %192
  br i1 %193, label %195, label %194

194:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %244

195:                                              ; preds = %190
  br label %196

196:                                              ; preds = %214, %195
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %199, label %211

199:                                              ; preds = %196
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %201
  %203 = load i8, ptr %202, align 1, !tbaa !11
  %204 = sext i8 %203 to i32
  %205 = load i32, ptr %13, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %206
  %208 = load i8, ptr %207, align 1, !tbaa !11
  %209 = sext i8 %208 to i32
  %210 = icmp ne i32 %204, %209
  br label %211

211:                                              ; preds = %199, %196
  %212 = phi i1 [ false, %196 ], [ %210, %199 ]
  br i1 %212, label %213, label %219

213:                                              ; preds = %211
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !5
  store i32 %218, ptr %13, align 4, !tbaa !5
  br label %196, !llvm.loop !17

219:                                              ; preds = %211
  %220 = load i32, ptr %12, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %221
  %223 = load i8, ptr %222, align 1, !tbaa !11
  %224 = sext i8 %223 to i32
  %225 = load i32, ptr %13, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !11
  %229 = sext i8 %228 to i32
  %230 = icmp eq i32 %224, %229
  br i1 %230, label %231, label %234

231:                                              ; preds = %219
  %232 = load i32, ptr %13, align 4, !tbaa !5
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %13, align 4, !tbaa !5
  br label %235

234:                                              ; preds = %219
  br label %235

235:                                              ; preds = %234, %231
  %236 = phi i32 [ %233, %231 ], [ 0, %234 ]
  %237 = load i32, ptr %12, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %239
  store i32 %236, ptr %240, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %235
  %242 = load i32, ptr %12, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %12, align 4, !tbaa !5
  br label %190, !llvm.loop !18

244:                                              ; preds = %194
  %245 = load i32, ptr %1, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  %247 = sext i32 %246 to i64
  %248 = mul i64 %247, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE1g, i8 -1, i64 %248, i1 false)
  %249 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ5solvevE1g, ptr noundef nonnull align 4 dereferenceable(4) @_ZZ5solvevE1h)
  %250 = load i32, ptr %249, align 4, !tbaa !5
  store i32 %250, ptr @_ZZ5solvevE1g, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %251

251:                                              ; preds = %318, %244
  %252 = load i32, ptr %14, align 4, !tbaa !5
  %253 = load i32, ptr %3, align 4, !tbaa !5
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %321

256:                                              ; preds = %251
  br label %257

257:                                              ; preds = %275, %256
  %258 = load i32, ptr %15, align 4, !tbaa !5
  %259 = icmp ne i32 %258, 0
  br i1 %259, label %260, label %272

260:                                              ; preds = %257
  %261 = load i32, ptr %14, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %262
  %264 = load i8, ptr %263, align 1, !tbaa !11
  %265 = sext i8 %264 to i32
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %267
  %269 = load i8, ptr %268, align 1, !tbaa !11
  %270 = sext i8 %269 to i32
  %271 = icmp ne i32 %265, %270
  br label %272

272:                                              ; preds = %260, %257
  %273 = phi i1 [ false, %257 ], [ %271, %260 ]
  br i1 %273, label %274, label %280

274:                                              ; preds = %272
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %15, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %277
  %279 = load i32, ptr %278, align 4, !tbaa !5
  store i32 %279, ptr %15, align 4, !tbaa !5
  br label %257, !llvm.loop !19

280:                                              ; preds = %272
  %281 = load i32, ptr %14, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %282
  %284 = load i8, ptr %283, align 1, !tbaa !11
  %285 = sext i8 %284 to i32
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %287
  %289 = load i8, ptr %288, align 1, !tbaa !11
  %290 = sext i8 %289 to i32
  %291 = icmp eq i32 %285, %290
  %292 = zext i1 %291 to i32
  %293 = load i32, ptr %15, align 4, !tbaa !5
  %294 = add nsw i32 %293, %292
  store i32 %294, ptr %15, align 4, !tbaa !5
  %295 = load i32, ptr %15, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %296
  %298 = load i32, ptr %14, align 4, !tbaa !5
  %299 = add nsw i32 %298, 1
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %300
  %302 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %297, ptr noundef nonnull align 4 dereferenceable(4) %301)
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = load i32, ptr %15, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %305
  store i32 %303, ptr %306, align 4, !tbaa !5
  %307 = load i32, ptr %15, align 4, !tbaa !5
  %308 = load i32, ptr %1, align 4, !tbaa !5
  %309 = icmp eq i32 %307, %308
  br i1 %309, label %310, label %316

310:                                              ; preds = %280
  %311 = load i32, ptr %15, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %312
  %314 = load i32, ptr %313, align 4, !tbaa !5
  store i32 %314, ptr %15, align 4, !tbaa !5
  %315 = icmp ne i32 %314, 0
  br label %316

316:                                              ; preds = %310, %280
  %317 = phi i1 [ false, %280 ], [ %315, %310 ]
  br label %318

318:                                              ; preds = %316
  %319 = load i32, ptr %14, align 4, !tbaa !5
  %320 = add nsw i32 %319, 1
  store i32 %320, ptr %14, align 4, !tbaa !5
  br label %251, !llvm.loop !20

321:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %322 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %322, ptr %17, align 4, !tbaa !5
  br label %323

323:                                              ; preds = %353, %321
  %324 = load i32, ptr %17, align 4, !tbaa !5
  %325 = icmp sge i32 %324, 0
  br i1 %325, label %327, label %326

326:                                              ; preds = %323
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %356

327:                                              ; preds = %323
  %328 = load i32, ptr %17, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %329
  %331 = load i32, ptr %330, align 4, !tbaa !5
  %332 = add nsw i32 %331, 1
  %333 = sext i32 %332 to i64
  %334 = load i64, ptr %16, align 8, !tbaa !21
  %335 = add nsw i64 %334, %333
  store i64 %335, ptr %16, align 8, !tbaa !21
  %336 = load i32, ptr %17, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %337
  %339 = load i32, ptr %338, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %340
  %342 = load i32, ptr %17, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %343
  %345 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %341, ptr noundef nonnull align 4 dereferenceable(4) %344)
  %346 = load i32, ptr %345, align 4, !tbaa !5
  %347 = load i32, ptr %17, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %351
  store i32 %346, ptr %352, align 4, !tbaa !5
  br label %353

353:                                              ; preds = %327
  %354 = load i32, ptr %17, align 4, !tbaa !5
  %355 = add nsw i32 %354, -1
  store i32 %355, ptr %17, align 4, !tbaa !5
  br label %323, !llvm.loop !23

356:                                              ; preds = %326
  %357 = load i64, ptr %16, align 8, !tbaa !21
  %358 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %357)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

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


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

@_ZZ5solvevE1A = external hidden global [1000001 x i8], align 16
@_ZZ5solvevE1B = external hidden global [1000001 x i8], align 16
@_ZZ5solvevE1C = external hidden global [1000001 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ5solvevE1f = external hidden local_unnamed_addr global [1000001 x i32], align 16
@_ZZ5solvevE1g = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1h = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1z = external hidden local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @_ZZ5solvevE1A, ptr noundef nonnull @_ZZ5solvevE1B, ptr noundef nonnull @_ZZ5solvevE1C)
  %6 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ5solvevE1A) #6
  %7 = trunc i64 %6 to i32
  %8 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ5solvevE1B) #6
  %9 = trunc i64 %8 to i32
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ5solvevE1C) #6
  %11 = trunc i64 %10 to i32
  %12 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !5
  store i32 %7, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 1, ptr %1, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1, ptr %2, align 4, !tbaa !9
  %13 = icmp sgt i32 %9, 1
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %53, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  %14 = icmp sgt i32 %11, 0
  br i1 %14, label %.lr.ph99, label %._crit_edge100

.lr.ph:                                           ; preds = %0, %53
  %15 = phi ptr [ %55, %53 ], [ %12, %0 ]
  %16 = phi i32 [ %56, %53 ], [ 1, %0 ]
  %.07190 = phi i32 [ %.172, %53 ], [ undef, %0 ]
  %17 = load i32, ptr %2, align 4, !tbaa !9
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %29

19:                                               ; preds = %.lr.ph
  %20 = sub nsw i32 %16, %.07190
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr %15, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = add nsw i32 %23, %16
  %25 = icmp slt i32 %24, %17
  br i1 %25, label %26, label %29

26:                                               ; preds = %19
  %27 = sext i32 %16 to i64
  %28 = getelementptr inbounds i32, ptr %15, i64 %27
  store i32 %23, ptr %28, align 4, !tbaa !9
  %.pre = load i32, ptr %1, align 4, !tbaa !9
  br label %53

29:                                               ; preds = %19, %.lr.ph
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = load i32, ptr %1, align 4, !tbaa !9
  %33 = sext i32 %31 to i64
  %34 = sext i32 %32 to i64
  br label %35

35:                                               ; preds = %35, %29
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ %33, %29 ]
  %36 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %indvars.iv
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sub nsw i64 %indvars.iv, %34
  %39 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !11
  %41 = icmp eq i8 %37, %40
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  br i1 %41, label %35, label %42, !llvm.loop !12

42:                                               ; preds = %35
  %43 = trunc nsw i64 %38 to i32
  %44 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !5
  %45 = getelementptr inbounds i32, ptr %44, i64 %34
  store i32 %43, ptr %45, align 4, !tbaa !9
  %46 = load i32, ptr %1, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %44, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %42
  %52 = trunc nsw i64 %indvars.iv to i32
  store i32 %52, ptr %2, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %42, %51, %26
  %54 = phi i32 [ %.pre, %26 ], [ %46, %51 ], [ %46, %42 ]
  %55 = phi ptr [ %15, %26 ], [ %44, %51 ], [ %44, %42 ]
  %.172 = phi i32 [ %.07190, %26 ], [ %46, %51 ], [ %.07190, %42 ]
  %56 = add nsw i32 %54, 1
  store i32 %56, ptr %1, align 4, !tbaa !9
  %57 = icmp slt i32 %56, %9
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge100:                                   ; preds = %95, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %sext = shl i64 %10, 32
  %58 = ashr exact i64 %sext, 32
  %59 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %58
  store i32 0, ptr %59, align 4, !tbaa !9
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 4), align 4, !tbaa !9
  store i32 0, ptr @_ZZ5solvevE1f, align 16, !tbaa !9
  %60 = icmp sgt i32 %7, 1
  br i1 %60, label %.preheader88.preheader, label %._crit_edge109

.preheader88.preheader:                           ; preds = %._crit_edge100
  %wide.trip.count = and i64 %6, 2147483647
  br label %.preheader88

.lr.ph99:                                         ; preds = %._crit_edge, %95
  %61 = phi i32 [ %97, %95 ], [ 0, %._crit_edge ]
  %.06897 = phi i32 [ %.169, %95 ], [ undef, %._crit_edge ]
  %62 = load i32, ptr %4, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %75

64:                                               ; preds = %.lr.ph99
  %65 = load ptr, ptr @_ZZ5solvevE1z, align 8, !tbaa !5
  %66 = sub nsw i32 %61, %.06897
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = add nsw i32 %69, %61
  %71 = icmp slt i32 %70, %62
  br i1 %71, label %72, label %75

72:                                               ; preds = %64
  %73 = sext i32 %61 to i64
  %74 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %73
  store i32 %69, ptr %74, align 4, !tbaa !9
  br label %95

75:                                               ; preds = %64, %.lr.ph99
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %.not8591 = icmp eq i8 %80, 0
  %.pre138 = load i32, ptr %3, align 4, !tbaa !9
  %.pre142 = sext i32 %.pre138 to i64
  br i1 %.not8591, label %.critedge, label %.lr.ph94

.lr.ph94:                                         ; preds = %75, %86
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %86 ], [ %78, %75 ]
  %81 = phi i8 [ %89, %86 ], [ %80, %75 ]
  %.06792 = phi i32 [ %87, %86 ], [ %77, %75 ]
  %82 = sub nsw i64 %indvars.iv125, %.pre142
  %83 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1B, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = icmp eq i8 %81, %84
  br i1 %85, label %86, label %.critedge.loopexit.split.loop.exit144

86:                                               ; preds = %.lr.ph94
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, 1
  %87 = add nsw i32 %.06792, 1
  %88 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %indvars.iv.next126
  %89 = load i8, ptr %88, align 1, !tbaa !11
  %.not85 = icmp eq i8 %89, 0
  br i1 %.not85, label %.critedge, label %.lr.ph94, !llvm.loop !15

.critedge.loopexit.split.loop.exit144:            ; preds = %.lr.ph94
  %90 = trunc nsw i64 %indvars.iv125 to i32
  br label %.critedge

.critedge:                                        ; preds = %86, %.critedge.loopexit.split.loop.exit144, %75
  %.067.lcssa = phi i32 [ %77, %75 ], [ %90, %.critedge.loopexit.split.loop.exit144 ], [ %87, %86 ]
  %91 = sub nsw i32 %.067.lcssa, %.pre138
  %92 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %.pre142
  store i32 %91, ptr %92, align 4, !tbaa !9
  %93 = icmp sgt i32 %91, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %.critedge
  store i32 %.067.lcssa, ptr %4, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %.critedge, %94, %72
  %96 = phi i32 [ %61, %72 ], [ %.pre138, %94 ], [ %.pre138, %.critedge ]
  %.169 = phi i32 [ %.06897, %72 ], [ %.pre138, %94 ], [ %.06897, %.critedge ]
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %3, align 4, !tbaa !9
  %98 = icmp slt i32 %97, %11
  br i1 %98, label %.lr.ph99, label %._crit_edge100, !llvm.loop !16

.preheader88:                                     ; preds = %.preheader88.preheader, %.critedge2
  %indvars.iv127 = phi i64 [ 1, %.preheader88.preheader ], [ %indvars.iv.next128, %.critedge2 ]
  %.063108 = phi i32 [ 0, %.preheader88.preheader ], [ %spec.select, %.critedge2 ]
  %.not83101 = icmp eq i32 %.063108, 0
  %.phi.trans.insert = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %indvars.iv127
  %.pre139 = load i8, ptr %.phi.trans.insert, align 1, !tbaa !11
  br i1 %.not83101, label %.critedge2, label %.lr.ph103

._crit_edge109:                                   ; preds = %.critedge2, %._crit_edge100
  %99 = shl i64 %6, 32
  %sext81 = add i64 %99, 4294967296
  %100 = ashr exact i64 %sext81, 30
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ5solvevE1g, i8 -1, i64 %100, i1 false)
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ5solvevE1g, ptr noundef nonnull align 4 dereferenceable(4) @_ZZ5solvevE1h)
  %102 = load i32, ptr %101, align 4, !tbaa !9
  store i32 %102, ptr @_ZZ5solvevE1g, align 16, !tbaa !9
  br i1 %14, label %.preheader87.preheader, label %.preheader

.preheader87.preheader:                           ; preds = %._crit_edge109
  %wide.trip.count133 = and i64 %10, 2147483647
  br label %.preheader87

.lr.ph103:                                        ; preds = %.preheader88, %106
  %.164102 = phi i32 [ %108, %106 ], [ %.063108, %.preheader88 ]
  %103 = sext i32 %.164102 to i64
  %104 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !11
  %.not84 = icmp eq i8 %.pre139, %105
  br i1 %.not84, label %.critedge2, label %106

106:                                              ; preds = %.lr.ph103
  %107 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %103
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %.not83 = icmp eq i32 %108, 0
  br i1 %.not83, label %.critedge2, label %.lr.ph103, !llvm.loop !17

.critedge2:                                       ; preds = %.lr.ph103, %106, %.preheader88
  %.164.lcssa = phi i32 [ 0, %.preheader88 ], [ 0, %106 ], [ %.164102, %.lr.ph103 ]
  %109 = sext i32 %.164.lcssa to i64
  %110 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !11
  %112 = icmp eq i8 %.pre139, %111
  %113 = add nsw i32 %.164.lcssa, 1
  %spec.select = select i1 %112, i32 %113, i32 %.164.lcssa
  %spec.select86 = select i1 %112, i32 %113, i32 0
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %114 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv.next128
  store i32 %spec.select86, ptr %114, align 4, !tbaa !9
  %exitcond.not = icmp eq i64 %indvars.iv.next128, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge109, label %.preheader88, !llvm.loop !18

.preheader87:                                     ; preds = %.preheader87.preheader, %138
  %indvars.iv130 = phi i64 [ 0, %.preheader87.preheader ], [ %indvars.iv.next131, %138 ]
  %.061117 = phi i32 [ 0, %.preheader87.preheader ], [ %.2, %138 ]
  %.not110 = icmp eq i32 %.061117, 0
  %.phi.trans.insert140 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1C, i64 0, i64 %indvars.iv130
  %.pre141 = load i8, ptr %.phi.trans.insert140, align 1, !tbaa !11
  br i1 %.not110, label %.critedge4, label %.lr.ph112

.preheader:                                       ; preds = %138, %._crit_edge109
  %115 = icmp sgt i32 %7, -1
  br i1 %115, label %.lr.ph120.preheader, label %._crit_edge121

.lr.ph120.preheader:                              ; preds = %.preheader
  %116 = and i64 %6, 2147483647
  br label %.lr.ph120

.lr.ph112:                                        ; preds = %.preheader87, %120
  %.1111 = phi i32 [ %122, %120 ], [ %.061117, %.preheader87 ]
  %117 = sext i32 %.1111 to i64
  %118 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %.not82 = icmp eq i8 %.pre141, %119
  br i1 %.not82, label %.critedge4, label %120

120:                                              ; preds = %.lr.ph112
  %121 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %117
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %.not = icmp eq i32 %122, 0
  br i1 %.not, label %.critedge4, label %.lr.ph112, !llvm.loop !19

.critedge4:                                       ; preds = %.lr.ph112, %120, %.preheader87
  %.1.lcssa = phi i32 [ 0, %.preheader87 ], [ 0, %120 ], [ %.1111, %.lr.ph112 ]
  %123 = sext i32 %.1.lcssa to i64
  %124 = getelementptr inbounds [1000001 x i8], ptr @_ZZ5solvevE1A, i64 0, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !11
  %126 = icmp eq i8 %.pre141, %125
  %127 = zext i1 %126 to i32
  %128 = add nsw i32 %.1.lcssa, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %129
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %131 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1h, i64 0, i64 %indvars.iv.next131
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %130, ptr noundef nonnull align 4 dereferenceable(4) %131)
  %133 = load i32, ptr %132, align 4, !tbaa !9
  store i32 %133, ptr %130, align 4, !tbaa !9
  %134 = icmp eq i32 %128, %7
  br i1 %134, label %135, label %138

135:                                              ; preds = %.critedge4
  %136 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %129
  %137 = load i32, ptr %136, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %.critedge4, %135
  %.2 = phi i32 [ %137, %135 ], [ %128, %.critedge4 ]
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133
  br i1 %exitcond134.not, label %.preheader, label %.preheader87, !llvm.loop !20

._crit_edge121:                                   ; preds = %.lr.ph120, %.preheader
  %.060.lcssa = phi i64 [ 0, %.preheader ], [ %144, %.lr.ph120 ]
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.060.lcssa)
  ret void

.lr.ph120:                                        ; preds = %.lr.ph120.preheader, %.lr.ph120
  %indvars.iv135 = phi i64 [ %116, %.lr.ph120.preheader ], [ %indvars.iv.next136, %.lr.ph120 ]
  %.060118 = phi i64 [ 0, %.lr.ph120.preheader ], [ %144, %.lr.ph120 ]
  %140 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %indvars.iv135
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = add nsw i64 %.060118, %143
  %145 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv135
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %147
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %148, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = load i32, ptr %145, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %152
  store i32 %150, ptr %153, align 4, !tbaa !9
  %indvars.iv.next136 = add nsw i64 %indvars.iv135, -1
  %.not146 = icmp eq i64 %indvars.iv135, 0
  br i1 %.not146, label %._crit_edge121, label %.lr.ph120, !llvm.loop !21
}

; 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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

attributes #0 = { 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 #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 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(read) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}


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