; LLVM IR from tangjz/acm-icpc :: codeforces/complete/1554A.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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE1a = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1p = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1v = external hidden global [200009 x i32], align 16
@.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 i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %111, %0
  %9 = load i32, ptr %3, align 4, !tbaa !9
  %10 = load i32, ptr %1, align 4, !tbaa !9
  %11 = icmp slt i32 %9, %10
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %114

13:                                               ; preds = %8
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %15
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %16)
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = sub nsw i32 %18, 1
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %21
  store i32 %19, ptr %22, align 4, !tbaa !9
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %28
  store i32 %26, ptr %29, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %52, %13
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = icmp sge i32 %34, 0
  br i1 %35, label %36, label %49

36:                                               ; preds = %30
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = icmp sgt i32 %40, %47
  br label %49

49:                                               ; preds = %36, %30
  %50 = phi i1 [ false, %30 ], [ %48, %36 ]
  br i1 %50, label %51, label %77

51:                                               ; preds = %49
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %3, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %54
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %60
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %55, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %65
  store i32 %63, ptr %66, align 4, !tbaa !9
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = load i32, ptr %3, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %75
  store i32 %73, ptr %76, align 4, !tbaa !9
  br label %30, !llvm.loop !11

77:                                               ; preds = %49
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %83, label %110

83:                                               ; preds = %77
  %84 = load i32, ptr %3, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = icmp eq i32 %87, %91
  br i1 %92, label %93, label %110

93:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %94 = load i32, ptr %3, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = load i32, ptr %3, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = mul nsw i64 %98, %106
  store i64 %107, ptr %4, align 8, !tbaa !5
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %109 = load i64, ptr %108, align 8, !tbaa !5
  store i64 %109, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %110

110:                                              ; preds = %93, %83, %77
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %3, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %3, align 4, !tbaa !9
  br label %8, !llvm.loop !13

114:                                              ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %115 = load i32, ptr %1, align 4, !tbaa !9
  %116 = sub nsw i32 %115, 1
  store i32 %116, ptr %5, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %217, %114
  %118 = load i32, ptr %5, align 4, !tbaa !9
  %119 = icmp sge i32 %118, 0
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %220

121:                                              ; preds = %117
  %122 = load i32, ptr %5, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %125
  store i32 %123, ptr %126, align 4, !tbaa !9
  %127 = load i32, ptr %5, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %132
  store i32 %130, ptr %133, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %157, %121
  %135 = load i32, ptr %5, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = load i32, ptr %1, align 4, !tbaa !9
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %141, label %154

141:                                              ; preds = %134
  %142 = load i32, ptr %5, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = load i32, ptr %5, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = icmp sgt i32 %145, %152
  br label %154

154:                                              ; preds = %141, %134
  %155 = phi i1 [ false, %134 ], [ %153, %141 ]
  br i1 %155, label %156, label %182

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %5, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %159
  %161 = load i32, ptr %5, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %165
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %160, ptr noundef nonnull align 4 dereferenceable(4) %166)
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = load i32, ptr %5, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %170
  store i32 %168, ptr %171, align 4, !tbaa !9
  %172 = load i32, ptr %5, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = load i32, ptr %5, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %180
  store i32 %178, ptr %181, align 4, !tbaa !9
  br label %134, !llvm.loop !14

182:                                              ; preds = %154
  %183 = load i32, ptr %5, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = load i32, ptr %1, align 4, !tbaa !9
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %189, label %216

189:                                              ; preds = %182
  %190 = load i32, ptr %5, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = load i32, ptr %5, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !9
  %198 = icmp eq i32 %193, %197
  br i1 %198, label %199, label %216

199:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %200 = load i32, ptr %5, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = load i32, ptr %5, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = mul nsw i64 %204, %212
  store i64 %213, ptr %6, align 8, !tbaa !5
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %215 = load i64, ptr %214, align 8, !tbaa !5
  store i64 %215, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %216

216:                                              ; preds = %199, %189, %182
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %5, align 4, !tbaa !9
  %219 = add nsw i32 %218, -1
  store i32 %219, ptr %5, align 4, !tbaa !9
  br label %117, !llvm.loop !15

220:                                              ; preds = %120
  %221 = load i64, ptr %2, align 8, !tbaa !5
  %222 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %221)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE1a = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1p = external hidden local_unnamed_addr global [200009 x i32], align 16
@_ZZ5solvevE1v = external hidden global [200009 x i32], align 16
@.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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store i64 0, ptr %2, align 8, !tbaa !5
  %6 = load i32, ptr %1, align 4, !tbaa !9
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph48, label %._crit_edge

.preheader:                                       ; preds = %.critedge
  %8 = icmp sgt i32 %43, 0
  br i1 %8, label %.lr.ph53.preheader, label %._crit_edge

.lr.ph53.preheader:                               ; preds = %.preheader
  %9 = zext nneg i32 %43 to i64
  br label %.lr.ph53

.lr.ph48:                                         ; preds = %0, %.critedge
  %indvars.iv = phi i64 [ %indvars.iv.next, %.critedge ], [ 0, %0 ]
  %10 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %indvars.iv
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10)
  %12 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv
  %13 = trunc i64 %indvars.iv to i32
  %14 = add i32 %13, -1
  store i32 %14, ptr %12, align 4, !tbaa !9
  %15 = load i32, ptr %10, align 4, !tbaa !9
  %16 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %indvars.iv
  store i32 %15, ptr %16, align 4, !tbaa !9
  %.not = icmp eq i64 %indvars.iv, 0
  br i1 %.not, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph48
  %17 = load i32, ptr %10, align 4, !tbaa !9
  %18 = zext nneg i32 %14 to i64
  %19 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = icmp sgt i32 %17, %20
  br i1 %21, label %.lr.ph88, label %.lr.ph._crit_edge

.lr.ph:                                           ; preds = %.lr.ph88
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = zext nneg i32 %34 to i64
  %24 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = icmp sgt i32 %22, %25
  br i1 %26, label %.lr.ph88, label %.lr.ph._crit_edge, !llvm.loop !11

.lr.ph88:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %27 = phi i64 [ %23, %.lr.ph ], [ %18, %.lr.ph.preheader ]
  %28 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %27
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %30, ptr %16, align 4, !tbaa !9
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = icmp sgt i32 %34, -1
  br i1 %35, label %.lr.ph, label %.critedge, !llvm.loop !11

.lr.ph._crit_edge:                                ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa85 = phi i32 [ %15, %.lr.ph.preheader ], [ %30, %.lr.ph ]
  %.lcssa83 = phi i32 [ %17, %.lr.ph.preheader ], [ %22, %.lr.ph ]
  %.lcssa81 = phi i32 [ %20, %.lr.ph.preheader ], [ %25, %.lr.ph ]
  %36 = icmp eq i32 %.lcssa85, %.lcssa83
  br i1 %36, label %37, label %.critedge

37:                                               ; preds = %.lr.ph._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %38 = sext i32 %.lcssa85 to i64
  %39 = sext i32 %.lcssa81 to i64
  %40 = mul nsw i64 %39, %38
  store i64 %40, ptr %3, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %42 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %42, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph88, %.lr.ph48, %.lr.ph._crit_edge, %37
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = load i32, ptr %1, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph48, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %.critedge2, %0, %.preheader
  %46 = load i64, ptr %2, align 8, !tbaa !5
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %46)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.critedge2
  %indvars.iv60 = phi i64 [ %9, %.lr.ph53.preheader ], [ %indvars.iv.next61, %.critedge2 ]
  %indvars.iv.next61 = add nsw i64 %indvars.iv60, -1
  %48 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv.next61
  %49 = trunc nuw nsw i64 %indvars.iv60 to i32
  store i32 %49, ptr %48, align 4, !tbaa !9
  %50 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv.next61
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %indvars.iv.next61
  store i32 %51, ptr %52, align 4, !tbaa !9
  %53 = load i32, ptr %1, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv60, %54
  br i1 %55, label %.lr.ph49.preheader, label %.critedge2

.lr.ph49.preheader:                               ; preds = %.lr.ph53
  %56 = load i32, ptr %50, align 4, !tbaa !9
  %sext = shl i64 %indvars.iv60, 32
  %57 = ashr exact i64 %sext, 32
  %58 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = icmp sgt i32 %56, %59
  br i1 %60, label %.lr.ph91, label %.lr.ph49._crit_edge

.lr.ph49:                                         ; preds = %.lr.ph91
  %61 = load i32, ptr %50, align 4, !tbaa !9
  %62 = sext i32 %73 to i64
  %63 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = icmp sgt i32 %61, %64
  br i1 %65, label %.lr.ph91, label %.lr.ph49._crit_edge, !llvm.loop !14

.lr.ph91:                                         ; preds = %.lr.ph49.preheader, %.lr.ph49
  %66 = phi i64 [ %62, %.lr.ph49 ], [ %57, %.lr.ph49.preheader ]
  %67 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1v, i64 0, i64 %66
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %69 = load i32, ptr %68, align 4, !tbaa !9
  store i32 %69, ptr %52, align 4, !tbaa !9
  %70 = load i32, ptr %48, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  store i32 %73, ptr %48, align 4, !tbaa !9
  %74 = load i32, ptr %1, align 4, !tbaa !9
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %.lr.ph49, label %.critedge2, !llvm.loop !14

.lr.ph49._crit_edge:                              ; preds = %.lr.ph49, %.lr.ph49.preheader
  %.lcssa79 = phi i32 [ %51, %.lr.ph49.preheader ], [ %69, %.lr.ph49 ]
  %.lcssa77 = phi i32 [ %56, %.lr.ph49.preheader ], [ %61, %.lr.ph49 ]
  %.lcssa = phi i32 [ %59, %.lr.ph49.preheader ], [ %64, %.lr.ph49 ]
  %76 = icmp eq i32 %.lcssa79, %.lcssa77
  br i1 %76, label %77, label %.critedge2

77:                                               ; preds = %.lr.ph49._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %78 = sext i32 %.lcssa79 to i64
  %79 = sext i32 %.lcssa to i64
  %80 = mul nsw i64 %79, %78
  store i64 %80, ptr %4, align 8, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %82 = load i64, ptr %81, align 8, !tbaa !5
  store i64 %82, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %.critedge2

.critedge2:                                       ; preds = %.lr.ph91, %.lr.ph53, %.lr.ph49._crit_edge, %77
  %83 = icmp sgt i64 %indvars.iv60, 1
  br i1 %83, label %.lr.ph53, label %._crit_edge, !llvm.loop !15
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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