; LLVM IR from tangjz/acm-icpc :: zoj/3962.ll (Z5solvex)

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

@pw = external dso_local global [9 x i64], align 16
@f = external dso_local global [9 x i64], align 16
@g = external dso_local global [17 x i64], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL2EC = external hidden constant [17 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvex(i64 noundef %0) #0 {
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca [9 x i8], align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store i64 %0, ptr %3, align 8, !tbaa !5
  %11 = load i64, ptr %3, align 8, !tbaa !5
  %12 = icmp slt i64 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %1
  store i64 0, ptr %2, align 8
  br label %158

14:                                               ; preds = %1
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = load i64, ptr getelementptr inbounds ([9 x i64], ptr @pw, i64 0, i64 8), align 16, !tbaa !5
  %17 = icmp sge i64 %15, %16
  br i1 %17, label %18, label %28

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = load i64, ptr getelementptr inbounds ([9 x i64], ptr @pw, i64 0, i64 8), align 16, !tbaa !5
  %21 = sub nsw i64 %19, %20
  %22 = call noundef i64 @_Z5solvex(i64 noundef %21)
  %23 = load i64, ptr getelementptr inbounds ([9 x i64], ptr @f, i64 0, i64 8), align 16, !tbaa !5
  %24 = load i64, ptr getelementptr inbounds ([17 x i64], ptr @g, i64 0, i64 15), align 8, !tbaa !5
  %25 = mul nsw i64 %23, %24
  %26 = add nsw i64 %22, %25
  store i64 %26, ptr %4, align 8, !tbaa !5
  %27 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %27, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %158

28:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 9, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %29 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 0
  %30 = load i64, ptr %3, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %29, ptr noundef @.str, i64 noundef %30) #3
  store i32 %31, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %72, %28
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %75

37:                                               ; preds = %32
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = sext i8 %41 to i32
  %43 = icmp sge i32 %42, 48
  br i1 %43, label %44, label %58

44:                                               ; preds = %37
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp sle i32 %49, 57
  br i1 %50, label %51, label %58

51:                                               ; preds = %44
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = sext i8 %55 to i32
  %57 = sub nsw i32 %56, 48
  br label %66

58:                                               ; preds = %44, %37
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = sub nsw i32 %63, 65
  %65 = add nsw i32 %64, 10
  br label %66

66:                                               ; preds = %58, %51
  %67 = phi i32 [ %57, %51 ], [ %65, %58 ]
  %68 = trunc i32 %67 to i8
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %70
  store i8 %68, ptr %71, align 1, !tbaa !11
  br label %72

72:                                               ; preds = %66
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %7, align 4, !tbaa !9
  br label %32, !llvm.loop !12

75:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %144, %75
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %156

81:                                               ; preds = %76
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = sext i8 %85 to i32
  %87 = icmp sgt i32 %86, 0
  br i1 %87, label %88, label %133

88:                                               ; preds = %81
  %89 = load i64, ptr %9, align 8, !tbaa !5
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !11
  %94 = sext i8 %93 to i64
  %95 = mul nsw i64 %89, %94
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !11
  %100 = sext i8 %99 to i32
  %101 = sub nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [17 x i64], ptr @g, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = add nsw i64 %95, %104
  %106 = load i32, ptr %6, align 4, !tbaa !9
  %107 = sub nsw i32 %106, 1
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = sub nsw i32 %107, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [9 x i64], ptr @pw, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = mul nsw i64 %105, %112
  %114 = load i64, ptr %8, align 8, !tbaa !5
  %115 = add nsw i64 %114, %113
  store i64 %115, ptr %8, align 8, !tbaa !5
  %116 = load i32, ptr %10, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = sext i8 %119 to i64
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = sub nsw i32 %121, 1
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = sub nsw i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [9 x i64], ptr @f, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !5
  %128 = mul nsw i64 %120, %127
  %129 = load i64, ptr getelementptr inbounds ([17 x i64], ptr @g, i64 0, i64 15), align 8, !tbaa !5
  %130 = mul nsw i64 %128, %129
  %131 = load i64, ptr %8, align 8, !tbaa !5
  %132 = add nsw i64 %131, %130
  store i64 %132, ptr %8, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %88, %81
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !11
  %138 = sext i8 %137 to i64
  %139 = getelementptr inbounds [17 x i32], ptr @_ZL2EC, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = load i64, ptr %8, align 8, !tbaa !5
  %143 = add nsw i64 %142, %141
  store i64 %143, ptr %8, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %133
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !9
  %147 = sext i32 %145 to i64
  %148 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %147
  %149 = load i8, ptr %148, align 1, !tbaa !11
  %150 = sext i8 %149 to i64
  %151 = getelementptr inbounds [17 x i32], ptr @_ZL2EC, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = load i64, ptr %9, align 8, !tbaa !5
  %155 = add nsw i64 %154, %153
  store i64 %155, ptr %9, align 8, !tbaa !5
  br label %76, !llvm.loop !14

156:                                              ; preds = %80
  %157 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %157, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 9, ptr %5) #3
  br label %158

158:                                              ; preds = %156, %18, %13
  %159 = load i64, ptr %2, align 8
  ret i64 %159
}

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, 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 = { 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 = { 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !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"

@pw = external dso_local local_unnamed_addr global [9 x i64], align 16
@f = external dso_local local_unnamed_addr global [9 x i64], align 16
@g = external dso_local local_unnamed_addr global [17 x i64], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL2EC = external hidden local_unnamed_addr constant [17 x i32], align 16

; Function Attrs: mustprogress nofree nounwind uwtable
define dso_local noundef i64 @_Z5solvex(i64 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [9 x i8], align 1
  %3 = icmp slt i64 %0, 0
  br i1 %3, label %common.ret60, label %4

4:                                                ; preds = %1
  %5 = load i64, ptr getelementptr inbounds (i8, ptr @pw, i64 64), align 16, !tbaa !5
  %.not = icmp sgt i64 %5, %0
  br i1 %.not, label %13, label %6

common.ret60:                                     ; preds = %1, %._crit_edge, %6
  %common.ret60.op = phi i64 [ %12, %6 ], [ %.033.lcssa, %._crit_edge ], [ 0, %1 ]
  ret i64 %common.ret60.op

6:                                                ; preds = %4
  %7 = sub nsw i64 %0, %5
  %8 = tail call noundef i64 @_Z5solvex(i64 noundef %7)
  %9 = load i64, ptr getelementptr inbounds (i8, ptr @f, i64 64), align 16, !tbaa !5
  %10 = load i64, ptr getelementptr inbounds (i8, ptr @g, i64 120), align 8, !tbaa !5
  %11 = mul nsw i64 %10, %9
  %12 = add nsw i64 %11, %8
  br label %common.ret60

13:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %2) #3
  %14 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %0) #3
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %iter.check, label %._crit_edge

iter.check:                                       ; preds = %13
  %wide.trip.count = zext nneg i32 %14 to i64
  %min.iters.check = icmp ult i32 %14, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check52 = icmp ult i32 %14, 32
  br i1 %min.iters.check52, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 2147483616
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %16 = getelementptr inbounds [9 x i8], ptr %2, i64 0, i64 %index
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %wide.load = load <16 x i8>, ptr %16, align 1, !tbaa !9
  %wide.load53 = load <16 x i8>, ptr %17, align 1, !tbaa !9
  %18 = add <16 x i8> %wide.load, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %19 = add <16 x i8> %wide.load53, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %20 = icmp ult <16 x i8> %18, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %21 = icmp ult <16 x i8> %19, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %22 = select <16 x i1> %20, <16 x i8> <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>, <16 x i8> <i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55>
  %23 = select <16 x i1> %21, <16 x i8> <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>, <16 x i8> <i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55>
  %24 = add <16 x i8> %22, %wide.load
  %25 = add <16 x i8> %23, %wide.load53
  store <16 x i8> %24, ptr %16, align 1, !tbaa !9
  store <16 x i8> %25, ptr %17, align 1, !tbaa !9
  %index.next = add nuw i64 %index, 32
  %26 = icmp eq i64 %index.next, %n.vec
  br i1 %26, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec55, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec55 = and i64 %wide.trip.count, 2147483640
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index56 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next58, %vec.epilog.vector.body ]
  %27 = getelementptr inbounds [9 x i8], ptr %2, i64 0, i64 %index56
  %wide.load57 = load <8 x i8>, ptr %27, align 1, !tbaa !9
  %28 = add <8 x i8> %wide.load57, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %29 = icmp ult <8 x i8> %28, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %30 = select <8 x i1> %29, <8 x i8> <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>, <8 x i8> <i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55, i8 -55>
  %31 = add <8 x i8> %30, %wide.load57
  store <8 x i8> %31, ptr %27, align 1, !tbaa !9
  %index.next58 = add nuw i64 %index56, 8
  %32 = icmp eq i64 %index.next58, %n.vec55
  br i1 %32, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !14

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n59 = icmp eq i64 %n.vec55, %wide.trip.count
  br i1 %cmp.n59, label %.preheader, label %.lr.ph.preheader

.preheader:                                       ; preds = %.lr.ph, %vec.epilog.middle.block, %middle.block
  br i1 %15, label %.lr.ph45, label %._crit_edge

.lr.ph45:                                         ; preds = %.preheader
  %33 = load i64, ptr getelementptr inbounds (i8, ptr @g, i64 120), align 8
  %34 = zext nneg i32 %14 to i64
  %wide.trip.count50 = zext nneg i32 %14 to i64
  br label %39

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %35 = getelementptr inbounds [9 x i8], ptr %2, i64 0, i64 %indvars.iv
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = add i8 %36, -48
  %or.cond = icmp ult i8 %37, 10
  %.v = select i1 %or.cond, i8 -48, i8 -55
  %38 = add i8 %.v, %36
  store i8 %38, ptr %35, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %62, %13, %.preheader
  %.033.lcssa = phi i64 [ 0, %.preheader ], [ 0, %13 ], [ %67, %62 ]
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %2) #3
  br label %common.ret60

39:                                               ; preds = %.lr.ph45, %62
  %indvars.iv47 = phi i64 [ 0, %.lr.ph45 ], [ %indvars.iv.next48, %62 ]
  %.03243 = phi i64 [ 0, %.lr.ph45 ], [ %68, %62 ]
  %.03342 = phi i64 [ 0, %.lr.ph45 ], [ %67, %62 ]
  %40 = getelementptr inbounds [9 x i8], ptr %2, i64 0, i64 %indvars.iv47
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = icmp sgt i8 %41, 0
  br i1 %42, label %43, label %62

43:                                               ; preds = %39
  %44 = zext nneg i8 %41 to i64
  %45 = mul nsw i64 %.03243, %44
  %46 = add nuw nsw i64 %44, 4294967295
  %47 = and i64 %46, 4294967295
  %48 = getelementptr inbounds [17 x i64], ptr @g, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = add nsw i64 %49, %45
  %51 = xor i64 %indvars.iv47, -1
  %52 = add nsw i64 %34, %51
  %53 = getelementptr inbounds [9 x i64], ptr @pw, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = mul nsw i64 %50, %54
  %56 = add nsw i64 %55, %.03342
  %57 = getelementptr inbounds [9 x i64], ptr @f, i64 0, i64 %52
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = mul nsw i64 %58, %44
  %60 = mul nsw i64 %59, %33
  %61 = add nsw i64 %56, %60
  br label %62

62:                                               ; preds = %43, %39
  %.1 = phi i64 [ %61, %43 ], [ %.03342, %39 ]
  %63 = sext i8 %41 to i64
  %64 = getelementptr inbounds [17 x i32], ptr @_ZL2EC, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !16
  %66 = sext i32 %65 to i64
  %67 = add nsw i64 %.1, %66
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %68 = add nsw i64 %.03243, %66
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  br i1 %exitcond51.not, label %._crit_edge, label %39, !llvm.loop !18
}

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

; 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 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

attributes #0 = { mustprogress nofree 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 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !12, !13}
!15 = distinct !{!15, !11, !13, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = distinct !{!18, !11}


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