; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104068J.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 [4 x [401 x i32]], align 16
@_ZZ5solvevE1w = external hidden global [401 x [401 x i32]], align 16
@_ZZ5solvevE1p = external hidden global [401 x i32], align 16
@_ZZ5solvevE3pre = external hidden global [401 x i32], align 16
@_ZZ5solvevE1f = external hidden global [2 x [401 x i64]], align 16
@_ZZ5solvevE2dt = external hidden global [401 x i64], align 16
@_ZZ5solvevE3vis = external hidden global [401 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = 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 i64, align 8
  %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 i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %47, %0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 4
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %43, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %46

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [4 x [401 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %36
  %38 = getelementptr inbounds [401 x i32], ptr %37, i64 0, i64 0
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %41)
  br label %43

43:                                               ; preds = %34
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !9

46:                                               ; preds = %33
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !11

50:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %122, %50
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %58
  store i64 -9223372036854775808, ptr %59, align 8, !tbaa !12
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %61
  store i32 0, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds ([2 x [401 x i64]], ptr @_ZZ5solvevE1f, i64 0, i64 1), i64 0, i64 %64
  store i64 0, ptr %65, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %118, %56
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = icmp sle i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %121

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds ([4 x [401 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 3), i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = sub nsw i32 %75, %79
  store i32 %80, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sub nsw i32 0, %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds ([4 x [401 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 1), i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds ([4 x [401 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 2), i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sub nsw i32 %87, %91
  store i32 %92, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub nsw i32 %83, %94
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [401 x [401 x i32]], ptr @_ZZ5solvevE1w, i64 0, i64 %97
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [401 x i32], ptr %98, i64 0, i64 %100
  store i32 %95, ptr %101, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [401 x [401 x i32]], ptr @_ZZ5solvevE1w, i64 0, i64 %106
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [401 x i32], ptr %107, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  store i64 %112, ptr %11, align 8, !tbaa !12
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %114 = load i64, ptr %113, align 8, !tbaa !12
  %115 = load i32, ptr %5, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %116
  store i64 %114, ptr %117, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %118

118:                                              ; preds = %71
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %6, align 4, !tbaa !5
  br label %66, !llvm.loop !14

121:                                              ; preds = %70
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %5, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !15

125:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %285, %125
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = load i32, ptr %1, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %288

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %132 = load i32, ptr %1, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = mul i64 %134, 1
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE3vis, i8 0, i64 %135, i1 false)
  %136 = load i32, ptr %1, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = mul i64 %138, 8
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE2dt, i8 63, i64 %139, i1 false)
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = load i32, ptr %13, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %142
  store i32 %140, ptr %143, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %256, %131
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %146
  store i8 1, ptr %147, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  store i32 %151, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 9223372036854775807, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %212, %144
  %153 = load i32, ptr %18, align 4, !tbaa !5
  %154 = load i32, ptr %1, align 4, !tbaa !5
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %215

157:                                              ; preds = %152
  %158 = load i32, ptr %18, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !16, !range !18, !noundef !19
  %162 = trunc i8 %161 to i1
  br i1 %162, label %163, label %164

163:                                              ; preds = %157
  br label %212

164:                                              ; preds = %157
  %165 = load i32, ptr %15, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !12
  %169 = load i32, ptr %18, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds ([2 x [401 x i64]], ptr @_ZZ5solvevE1f, i64 0, i64 1), i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !12
  %173 = add nsw i64 %168, %172
  %174 = load i32, ptr %15, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [401 x [401 x i32]], ptr @_ZZ5solvevE1w, i64 0, i64 %175
  %177 = load i32, ptr %18, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [401 x i32], ptr %176, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = sub nsw i64 %173, %181
  store i64 %182, ptr %17, align 8, !tbaa !12
  %183 = load i64, ptr %17, align 8, !tbaa !12
  %184 = load i32, ptr %18, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !12
  %188 = icmp slt i64 %183, %187
  br i1 %188, label %189, label %198

189:                                              ; preds = %164
  %190 = load i64, ptr %17, align 8, !tbaa !12
  %191 = load i32, ptr %18, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %192
  store i64 %190, ptr %193, align 8, !tbaa !12
  %194 = load i32, ptr %13, align 4, !tbaa !5
  %195 = load i32, ptr %18, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE3pre, i64 0, i64 %196
  store i32 %194, ptr %197, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %189, %164
  %199 = load i32, ptr %18, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !12
  %203 = load i64, ptr %16, align 8, !tbaa !12
  %204 = icmp slt i64 %202, %203
  br i1 %204, label %205, label %211

205:                                              ; preds = %198
  %206 = load i32, ptr %18, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %207
  %209 = load i64, ptr %208, align 8, !tbaa !12
  store i64 %209, ptr %16, align 8, !tbaa !12
  %210 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %210, ptr %14, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %205, %198
  br label %212

212:                                              ; preds = %211, %163
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %18, align 4, !tbaa !5
  br label %152, !llvm.loop !20

215:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %251, %215
  %217 = load i32, ptr %19, align 4, !tbaa !5
  %218 = load i32, ptr %1, align 4, !tbaa !5
  %219 = icmp sle i32 %217, %218
  br i1 %219, label %221, label %220

220:                                              ; preds = %216
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %254

221:                                              ; preds = %216
  %222 = load i32, ptr %19, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !16, !range !18, !noundef !19
  %226 = trunc i8 %225 to i1
  br i1 %226, label %227, label %243

227:                                              ; preds = %221
  %228 = load i64, ptr %16, align 8, !tbaa !12
  %229 = load i32, ptr %19, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !12
  %236 = sub nsw i64 %235, %228
  store i64 %236, ptr %234, align 8, !tbaa !12
  %237 = load i64, ptr %16, align 8, !tbaa !12
  %238 = load i32, ptr %19, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds ([2 x [401 x i64]], ptr @_ZZ5solvevE1f, i64 0, i64 1), i64 0, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !12
  %242 = add nsw i64 %241, %237
  store i64 %242, ptr %240, align 8, !tbaa !12
  br label %250

243:                                              ; preds = %221
  %244 = load i64, ptr %16, align 8, !tbaa !12
  %245 = load i32, ptr %19, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %246
  %248 = load i64, ptr %247, align 8, !tbaa !12
  %249 = sub nsw i64 %248, %244
  store i64 %249, ptr %247, align 8, !tbaa !12
  br label %250

250:                                              ; preds = %243, %227
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %19, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %19, align 4, !tbaa !5
  br label %216, !llvm.loop !21

254:                                              ; preds = %220
  %255 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %255, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %256

256:                                              ; preds = %254
  %257 = load i32, ptr %13, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %144, label %262, !llvm.loop !22

262:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %263 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %263, ptr %20, align 4, !tbaa !5
  br label %264

264:                                              ; preds = %279, %262
  %265 = load i32, ptr %20, align 4, !tbaa !5
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %268, label %267

267:                                              ; preds = %264
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %284

268:                                              ; preds = %264
  %269 = load i32, ptr %20, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE3pre, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = load i32, ptr %20, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %277
  store i32 %275, ptr %278, align 4, !tbaa !5
  br label %279

279:                                              ; preds = %268
  %280 = load i32, ptr %20, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE3pre, i64 0, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  store i32 %283, ptr %20, align 4, !tbaa !5
  br label %264, !llvm.loop !23

284:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %12, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %12, align 4, !tbaa !5
  br label %126, !llvm.loop !24

288:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %289

289:                                              ; preds = %306, %288
  %290 = load i32, ptr %22, align 4, !tbaa !5
  %291 = load i32, ptr %1, align 4, !tbaa !5
  %292 = icmp sle i32 %290, %291
  br i1 %292, label %294, label %293

293:                                              ; preds = %289
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %309

294:                                              ; preds = %289
  %295 = load i32, ptr %22, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %296
  %298 = load i64, ptr %297, align 8, !tbaa !12
  %299 = load i32, ptr %22, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds ([2 x [401 x i64]], ptr @_ZZ5solvevE1f, i64 0, i64 1), i64 0, i64 %300
  %302 = load i64, ptr %301, align 8, !tbaa !12
  %303 = add nsw i64 %298, %302
  %304 = load i64, ptr %21, align 8, !tbaa !12
  %305 = add nsw i64 %304, %303
  store i64 %305, ptr %21, align 8, !tbaa !12
  br label %306

306:                                              ; preds = %294
  %307 = load i32, ptr %22, align 4, !tbaa !5
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %22, align 4, !tbaa !5
  br label %289, !llvm.loop !25

309:                                              ; preds = %293
  %310 = load i64, ptr %21, align 8, !tbaa !12
  %311 = sub nsw i64 0, %310
  %312 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %311)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

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

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

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

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

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


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

@_ZZ5solvevE1a = external hidden global [4 x [401 x i32]], align 16
@_ZZ5solvevE1w = external hidden local_unnamed_addr global [401 x [401 x i32]], align 16
@_ZZ5solvevE1p = external hidden local_unnamed_addr global [401 x i32], align 16
@_ZZ5solvevE3pre = external hidden local_unnamed_addr global [401 x i32], align 16
@_ZZ5solvevE1f = external hidden global [2 x [401 x i64]], align 16
@_ZZ5solvevE2dt = external hidden local_unnamed_addr global [401 x i64], align 16
@_ZZ5solvevE3vis = external hidden local_unnamed_addr global [401 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = 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 = alloca i32, align 4
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp slt i32 %8, 1
  br i1 %9, label %._crit_edge133, label %.lr.ph

.preheader96:                                     ; preds = %.lr.ph.3
  %.not106 = icmp slt i32 %20, 1
  br i1 %.not106, label %._crit_edge133, label %.lr.ph108.split

._crit_edge:                                      ; preds = %.lr.ph
  %.not9198.1 = icmp slt i32 %24, 1
  br i1 %.not9198.1, label %._crit_edge133, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge, %.lr.ph.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %.lr.ph.1 ], [ 1, %._crit_edge ]
  %10 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 1604), i64 %indvars.iv.1
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10)
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %.not91.not.1 = icmp slt i64 %indvars.iv.1, %13
  br i1 %.not91.not.1, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !9

._crit_edge.1:                                    ; preds = %.lr.ph.1
  %.not9198.2 = icmp slt i32 %12, 1
  br i1 %.not9198.2, label %._crit_edge133, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %.lr.ph.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %.lr.ph.2 ], [ 1, %._crit_edge.1 ]
  %14 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 3208), i64 %indvars.iv.2
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %14)
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not91.not.2 = icmp slt i64 %indvars.iv.2, %17
  br i1 %.not91.not.2, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !9

._crit_edge.2:                                    ; preds = %.lr.ph.2
  %.not9198.3 = icmp slt i32 %16, 1
  br i1 %.not9198.3, label %._crit_edge133, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %._crit_edge.2, %.lr.ph.3
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %.lr.ph.3 ], [ 1, %._crit_edge.2 ]
  %18 = getelementptr inbounds i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 4812), i64 %indvars.iv.3
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %18)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %.not91.not.3 = icmp slt i64 %indvars.iv.3, %21
  br i1 %.not91.not.3, label %.lr.ph.3, label %.preheader96, !llvm.loop !9

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %22 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %indvars.iv
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %22)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %.not91.not = icmp slt i64 %indvars.iv, %25
  br i1 %.not91.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader95:                                     ; preds = %._crit_edge105
  %.not84125 = icmp slt i32 %35, 1
  br i1 %.not84125, label %._crit_edge133, label %.lr.ph128

.lr.ph128:                                        ; preds = %.preheader95
  %26 = add nuw i32 %35, 1
  %27 = zext i32 %26 to i64
  %28 = shl nuw nsw i64 %27, 3
  br label %69

.lr.ph108.split:                                  ; preds = %.preheader96, %._crit_edge105
  %29 = phi i32 [ %35, %._crit_edge105 ], [ %20, %.preheader96 ]
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %._crit_edge105 ], [ 1, %.preheader96 ]
  %30 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv146
  store i64 -9223372036854775808, ptr %30, align 8, !tbaa !11
  %31 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv146
  store i32 0, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 3208), i64 0, i64 %indvars.iv146
  store i64 0, ptr %32, align 8, !tbaa !11
  %.not90101 = icmp slt i32 %29, 1
  br i1 %.not90101, label %.lr.ph108.split.._crit_edge105_crit_edge, label %.lr.ph104

.lr.ph108.split.._crit_edge105_crit_edge:         ; preds = %.lr.ph108.split
  %.pre = sext i32 %29 to i64
  br label %._crit_edge105

.lr.ph104:                                        ; preds = %.lr.ph108.split
  %33 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv146
  %34 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 1604), i64 0, i64 %indvars.iv146
  br label %36

._crit_edge105:                                   ; preds = %36, %.lr.ph108.split.._crit_edge105_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.lr.ph108.split.._crit_edge105_crit_edge ], [ %56, %36 ]
  %35 = phi i32 [ %29, %.lr.ph108.split.._crit_edge105_crit_edge ], [ %55, %36 ]
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %.not.not = icmp slt i64 %indvars.iv146, %.pre-phi
  br i1 %.not.not, label %.lr.ph108.split, label %.preheader95, !llvm.loop !13

36:                                               ; preds = %.lr.ph104, %36
  %indvars.iv143 = phi i64 [ 1, %.lr.ph104 ], [ %indvars.iv.next144, %36 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %37 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 4812), i64 0, i64 %indvars.iv143
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %33, align 4, !tbaa !5
  %40 = sub nsw i32 %38, %39
  store i32 %40, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %42 = load i32, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %43 = load i32, ptr %34, align 4, !tbaa !5
  %44 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1a, i64 3208), i64 0, i64 %indvars.iv143
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sub nsw i32 %43, %45
  store i32 %46, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  %47 = 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) %5)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add i32 %42, %48
  %50 = sub i32 0, %49
  %51 = getelementptr inbounds [401 x [401 x i32]], ptr @_ZZ5solvevE1w, i64 0, i64 %indvars.iv146, i64 %indvars.iv143
  store i32 %50, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %52 = sext i32 %50 to i64
  store i64 %52, ptr %6, align 8, !tbaa !11
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %54 = load i64, ptr %53, align 8, !tbaa !11
  store i64 %54, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not90.not = icmp slt i64 %indvars.iv143, %56
  br i1 %.not90.not, label %36, label %._crit_edge105, !llvm.loop !15

.preheader:                                       ; preds = %._crit_edge124
  br i1 %.not84125, label %._crit_edge133, label %.lr.ph132.preheader

.lr.ph132.preheader:                              ; preds = %.preheader
  %57 = add nuw i32 %35, 1
  %wide.trip.count167 = zext i32 %57 to i64
  %58 = zext nneg i32 %35 to i64
  %min.iters.check = icmp ult i32 %35, 4
  br i1 %min.iters.check, label %.lr.ph132.preheader199, label %vector.ph

.lr.ph132.preheader199:                           ; preds = %middle.block, %.lr.ph132.preheader
  %indvars.iv164.ph = phi i64 [ 1, %.lr.ph132.preheader ], [ %ind.end, %middle.block ]
  %.068130.ph = phi i64 [ 0, %.lr.ph132.preheader ], [ %68, %middle.block ]
  br label %.lr.ph132

vector.ph:                                        ; preds = %.lr.ph132.preheader
  %n.vec = and i64 %58, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %65, %vector.body ]
  %vec.phi195 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %66, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %59 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %offset.idx
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load = load <2 x i64>, ptr %59, align 8, !tbaa !11
  %wide.load196 = load <2 x i64>, ptr %60, align 8, !tbaa !11
  %61 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 3208), i64 0, i64 %offset.idx
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %wide.load197 = load <2 x i64>, ptr %61, align 16, !tbaa !11
  %wide.load198 = load <2 x i64>, ptr %62, align 16, !tbaa !11
  %63 = add <2 x i64> %wide.load, %vec.phi
  %64 = add <2 x i64> %wide.load196, %vec.phi195
  %65 = add <2 x i64> %63, %wide.load197
  %66 = add <2 x i64> %64, %wide.load198
  %index.next = add nuw i64 %index, 4
  %67 = icmp eq i64 %index.next, %n.vec
  br i1 %67, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %66, %65
  %68 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %58
  br i1 %cmp.n, label %._crit_edge133, label %.lr.ph132.preheader199

69:                                               ; preds = %.lr.ph128, %._crit_edge124
  %.074127 = phi i32 [ undef, %.lr.ph128 ], [ %.3, %._crit_edge124 ]
  %.077126 = phi i32 [ 1, %.lr.ph128 ], [ %119, %._crit_edge124 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @_ZZ5solvevE3vis, i8 0, i64 %27, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @_ZZ5solvevE2dt, i8 63, i64 %28, i1 false)
  store i32 %.077126, ptr @_ZZ5solvevE1p, align 16, !tbaa !5
  br label %.lr.ph114

.lr.ph114:                                        ; preds = %69, %._crit_edge120
  %70 = phi i32 [ %.077126, %69 ], [ %100, %._crit_edge120 ]
  %.076 = phi i32 [ 0, %69 ], [ %.3, %._crit_edge120 ]
  %.175 = phi i32 [ %.074127, %69 ], [ %.3, %._crit_edge120 ]
  %71 = sext i32 %.076 to i64
  %72 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %71
  store i8 1, ptr %72, align 1, !tbaa !19
  %73 = sext i32 %70 to i64
  %74 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %73
  br label %75

75:                                               ; preds = %.lr.ph114, %97
  %indvars.iv153 = phi i64 [ 1, %.lr.ph114 ], [ %indvars.iv.next154, %97 ]
  %.073111 = phi i64 [ 9223372036854775807, %.lr.ph114 ], [ %.1, %97 ]
  %.2110 = phi i32 [ %.175, %.lr.ph114 ], [ %.3, %97 ]
  %76 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %indvars.iv153
  %77 = load i8, ptr %76, align 1, !tbaa !19, !range !21, !noundef !22
  %78 = trunc nuw i8 %77 to i1
  br i1 %78, label %97, label %79

79:                                               ; preds = %75
  %80 = load i64, ptr %74, align 8, !tbaa !11
  %81 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 3208), i64 0, i64 %indvars.iv153
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = add nsw i64 %82, %80
  %84 = getelementptr inbounds [401 x [401 x i32]], ptr @_ZZ5solvevE1w, i64 0, i64 %73, i64 %indvars.iv153
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = sub i64 %83, %86
  %88 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %indvars.iv153
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = icmp slt i64 %87, %89
  br i1 %90, label %91, label %93

91:                                               ; preds = %79
  store i64 %87, ptr %88, align 8, !tbaa !11
  %92 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE3pre, i64 0, i64 %indvars.iv153
  store i32 %.076, ptr %92, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %91, %79
  %94 = phi i64 [ %87, %91 ], [ %89, %79 ]
  %95 = icmp slt i64 %94, %.073111
  %96 = trunc nuw nsw i64 %indvars.iv153 to i32
  %spec.select = select i1 %95, i32 %96, i32 %.2110
  %spec.select92 = call i64 @llvm.smin.i64(i64 %94, i64 %.073111)
  br label %97

97:                                               ; preds = %93, %75
  %.3 = phi i32 [ %.2110, %75 ], [ %spec.select, %93 ]
  %.1 = phi i64 [ %.073111, %75 ], [ %spec.select92, %93 ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond157.not = icmp eq i64 %indvars.iv.next154, %27
  br i1 %exitcond157.not, label %.lr.ph119, label %75, !llvm.loop !23

._crit_edge120:                                   ; preds = %118
  %98 = sext i32 %.3 to i64
  %99 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %.not88 = icmp eq i32 %100, 0
  br i1 %.not88, label %.preheader94, label %.lr.ph114, !llvm.loop !24

.preheader94:                                     ; preds = %._crit_edge120
  %.not89121 = icmp eq i32 %.3, 0
  br i1 %.not89121, label %._crit_edge124, label %.lr.ph123

.lr.ph119:                                        ; preds = %97, %118
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %118 ], [ 0, %97 ]
  %101 = getelementptr inbounds [401 x i8], ptr @_ZZ5solvevE3vis, i64 0, i64 %indvars.iv158
  %102 = load i8, ptr %101, align 1, !tbaa !19, !range !21, !noundef !22
  %103 = trunc nuw i8 %102 to i1
  br i1 %103, label %104, label %114

104:                                              ; preds = %.lr.ph119
  %105 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv158
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = sub nsw i64 %109, %.1
  store i64 %110, ptr %108, align 8, !tbaa !11
  %111 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 3208), i64 0, i64 %indvars.iv158
  %112 = load i64, ptr %111, align 8, !tbaa !11
  %113 = add nsw i64 %112, %.1
  store i64 %113, ptr %111, align 8, !tbaa !11
  br label %118

114:                                              ; preds = %.lr.ph119
  %115 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE2dt, i64 0, i64 %indvars.iv158
  %116 = load i64, ptr %115, align 8, !tbaa !11
  %117 = sub nsw i64 %116, %.1
  store i64 %117, ptr %115, align 8, !tbaa !11
  br label %118

118:                                              ; preds = %104, %114
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next159, %27
  br i1 %exitcond162.not, label %._crit_edge120, label %.lr.ph119, !llvm.loop !25

._crit_edge124:                                   ; preds = %.lr.ph123, %.preheader94
  %119 = add nuw i32 %.077126, 1
  %exitcond163.not = icmp eq i32 %.077126, %35
  br i1 %exitcond163.not, label %.preheader, label %69, !llvm.loop !26

.lr.ph123:                                        ; preds = %.preheader94, %.lr.ph123
  %.069122 = phi i32 [ %122, %.lr.ph123 ], [ %.3, %.preheader94 ]
  %120 = sext i32 %.069122 to i64
  %121 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE3pre, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = getelementptr inbounds [401 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %120
  store i32 %125, ptr %126, align 4, !tbaa !5
  %.not89 = icmp eq i32 %122, 0
  br i1 %.not89, label %._crit_edge124, label %.lr.ph123, !llvm.loop !27

._crit_edge133:                                   ; preds = %.lr.ph132, %middle.block, %.preheader95, %._crit_edge, %._crit_edge.1, %0, %._crit_edge.2, %.preheader96, %.preheader
  %.068.lcssa = phi i64 [ 0, %.preheader ], [ 0, %.preheader96 ], [ 0, %._crit_edge.2 ], [ 0, %0 ], [ 0, %._crit_edge.1 ], [ 0, %._crit_edge ], [ 0, %.preheader95 ], [ %68, %middle.block ], [ %134, %.lr.ph132 ]
  %127 = sub nsw i64 0, %.068.lcssa
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %127)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph132:                                        ; preds = %.lr.ph132.preheader199, %.lr.ph132
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %.lr.ph132 ], [ %indvars.iv164.ph, %.lr.ph132.preheader199 ]
  %.068130 = phi i64 [ %134, %.lr.ph132 ], [ %.068130.ph, %.lr.ph132.preheader199 ]
  %129 = getelementptr inbounds [401 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv164
  %130 = load i64, ptr %129, align 8, !tbaa !11
  %131 = getelementptr inbounds [401 x i64], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1f, i64 3208), i64 0, i64 %indvars.iv164
  %132 = load i64, ptr %131, align 8, !tbaa !11
  %133 = add i64 %130, %.068130
  %134 = add i64 %133, %132
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %exitcond168.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count167
  br i1 %exitcond168.not, label %._crit_edge133, label %.lr.ph132, !llvm.loop !28
}

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


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