; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Medium Hard/FNCS/A.ll (Z6updateiy)

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

@n = external dso_local global i64, align 8
@BLOCK = external dso_local global i64, align 8
@a = external dso_local global [100100 x i64], align 16
@freq = external dso_local global [333 x [100100 x i64]], align 16
@sum1 = external dso_local global [333 x [333 x i64]], align 16
@sum2 = external dso_local global [333 x i64], align 16
@qsum1 = external dso_local global [333 x i64], align 16

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6updateiy(i32 noundef %0, i64 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %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
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %17 = add i64 %15, %16
  %18 = sub i64 %17, 1
  %19 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %20 = udiv i64 %18, %19
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %22 = load i64, ptr @n, align 8, !tbaa !9
  %23 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %24 = add i64 %22, %23
  %25 = sub i64 %24, 1
  %26 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %27 = udiv i64 %25, %26
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %29 = load i64, ptr %4, align 8, !tbaa !9
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = sub i64 %29, %33
  store i64 %34, ptr %7, align 8, !tbaa !9
  %35 = load i64, ptr %4, align 8, !tbaa !9
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %37
  store i64 %35, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %39 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %39, ptr %8, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %52, %2
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %40
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [333 x i64], ptr @sum2, i64 0, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = add i64 %50, %46
  store i64 %51, ptr %49, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %45
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %8, align 4, !tbaa !5
  br label %40, !llvm.loop !11

55:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = mul i64 %58, %61
  %63 = add i64 %62, 1
  %64 = sub i64 %57, %63
  %65 = add i64 %64, 1
  %66 = trunc i64 %65 to i32
  store i32 %66, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %67 = load i64, ptr @BLOCK, align 8, !tbaa !9
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = mul i64 %67, %69
  store i64 %70, ptr %11, align 8, !tbaa !9
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIyERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = trunc i64 %72 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  store i32 %73, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %74 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %74, ptr %12, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %90, %55
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %80, label %79

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

80:                                               ; preds = %75
  %81 = load i64, ptr %7, align 8, !tbaa !9
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [333 x [333 x i64]], ptr @sum1, i64 0, i64 %83
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [333 x i64], ptr %84, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = add i64 %88, %81
  store i64 %89, ptr %87, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %80
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %12, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %9, align 4, !tbaa !5
  br label %75, !llvm.loop !13

95:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %116, %95
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = icmp sle i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %119

101:                                              ; preds = %96
  %102 = load i64, ptr %7, align 8, !tbaa !9
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [333 x [100100 x i64]], ptr @freq, i64 0, i64 %104
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100100 x i64], ptr %105, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = mul i64 %102, %109
  %111 = load i32, ptr %13, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [333 x i64], ptr @qsum1, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = add i64 %114, %110
  store i64 %115, ptr %113, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %101
  %117 = load i32, ptr %13, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %13, align 4, !tbaa !5
  br label %96, !llvm.loop !14

119:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !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"

@n = external dso_local global i64, align 8
@BLOCK = external dso_local local_unnamed_addr global i64, align 8
@a = external dso_local local_unnamed_addr global [100100 x i64], align 16
@freq = external dso_local local_unnamed_addr global [333 x [100100 x i64]], align 16
@sum1 = external dso_local local_unnamed_addr global [333 x [333 x i64]], align 16
@sum2 = external dso_local local_unnamed_addr global [333 x i64], align 16
@qsum1 = external dso_local local_unnamed_addr global [333 x i64], align 16

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z6updateiy(i32 noundef %0, i64 noundef %1) local_unnamed_addr #2 {
  %3 = alloca i64, align 8
  %4 = sext i32 %0 to i64
  %5 = load i64, ptr @BLOCK, align 8, !tbaa !5
  %6 = add i64 %5, -1
  %7 = add i64 %6, %4
  %8 = udiv i64 %7, %5
  %9 = trunc i64 %8 to i32
  %10 = load i64, ptr @n, align 8, !tbaa !5
  %11 = add i64 %6, %10
  %12 = udiv i64 %11, %5
  %13 = trunc i64 %12 to i32
  %14 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %4
  %15 = load i64, ptr %14, align 8, !tbaa !5
  %16 = sub i64 %1, %15
  store i64 %1, ptr %14, align 8, !tbaa !5
  %.not35 = icmp sgt i32 %9, %13
  br i1 %.not35, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2
  %sext53 = shl i64 %8, 32
  %17 = ashr exact i64 %sext53, 32
  %sext54 = shl i64 %12, 32
  %18 = ashr exact i64 %sext54, 32
  %smax = tail call i64 @llvm.smax.i64(i64 %18, i64 %17)
  %19 = add i64 %smax, 1
  %20 = sub i64 %19, %17
  %min.iters.check = icmp ult i64 %20, 4
  br i1 %min.iters.check, label %.lr.ph.preheader76, label %vector.ph

.lr.ph.preheader76:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ %17, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %20, -4
  %ind.end = add i64 %17, %n.vec
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %16, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %17, %index
  %21 = getelementptr inbounds [333 x i64], ptr @sum2, i64 0, i64 %offset.idx
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load = load <2 x i64>, ptr %21, align 8, !tbaa !5
  %wide.load55 = load <2 x i64>, ptr %22, align 8, !tbaa !5
  %23 = add <2 x i64> %wide.load, %broadcast.splat
  %24 = add <2 x i64> %wide.load55, %broadcast.splat
  store <2 x i64> %23, ptr %21, align 8, !tbaa !5
  store <2 x i64> %24, ptr %22, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %25 = icmp eq i64 %index.next, %n.vec
  br i1 %25, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %20, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader76

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %sext = shl i64 %8, 32
  %26 = ashr exact i64 %sext, 32
  %27 = mul i64 %26, %5
  store i64 %27, ptr %3, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIyERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = trunc i64 %29 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %.not3337 = icmp slt i32 %30, %0
  br i1 %.not3337, label %.preheader, label %.lr.ph41.preheader

.lr.ph41.preheader:                               ; preds = %._crit_edge
  %31 = add i64 %8, 4294967295
  %32 = mul i64 %31, %5
  %33 = trunc i64 %32 to i32
  %34 = sub i32 %0, %33
  %35 = sext i32 %34 to i64
  %36 = sub i32 %30, %0
  %37 = zext i32 %36 to i64
  %38 = add nuw nsw i64 %37, 1
  %min.iters.check58 = icmp ult i32 %36, 3
  br i1 %min.iters.check58, label %.lr.ph41.preheader75, label %vector.ph59

.lr.ph41.preheader75:                             ; preds = %middle.block56, %.lr.ph41.preheader
  %indvars.iv47.ph = phi i64 [ %35, %.lr.ph41.preheader ], [ %ind.end62, %middle.block56 ]
  %.02939.ph = phi i32 [ %0, %.lr.ph41.preheader ], [ %ind.end64, %middle.block56 ]
  br label %.lr.ph41

vector.ph59:                                      ; preds = %.lr.ph41.preheader
  %n.vec61 = and i64 %38, 8589934588
  %ind.end62 = add nsw i64 %n.vec61, %35
  %.cast = trunc i64 %n.vec61 to i32
  %ind.end64 = add i32 %.cast, %0
  %broadcast.splatinsert71 = insertelement <2 x i64> poison, i64 %16, i64 0
  %broadcast.splat72 = shufflevector <2 x i64> %broadcast.splatinsert71, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body66

vector.body66:                                    ; preds = %vector.body66, %vector.ph59
  %index67 = phi i64 [ 0, %vector.ph59 ], [ %index.next73, %vector.body66 ]
  %offset.idx68 = add i64 %index67, %35
  %39 = getelementptr inbounds [333 x [333 x i64]], ptr @sum1, i64 0, i64 %26, i64 %offset.idx68
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %wide.load69 = load <2 x i64>, ptr %39, align 8, !tbaa !5
  %wide.load70 = load <2 x i64>, ptr %40, align 8, !tbaa !5
  %41 = add <2 x i64> %wide.load69, %broadcast.splat72
  %42 = add <2 x i64> %wide.load70, %broadcast.splat72
  store <2 x i64> %41, ptr %39, align 8, !tbaa !5
  store <2 x i64> %42, ptr %40, align 8, !tbaa !5
  %index.next73 = add nuw i64 %index67, 4
  %43 = icmp eq i64 %index.next73, %n.vec61
  br i1 %43, label %middle.block56, label %vector.body66, !llvm.loop !13

middle.block56:                                   ; preds = %vector.body66
  %cmp.n74 = icmp eq i64 %38, %n.vec61
  br i1 %cmp.n74, label %.preheader, label %.lr.ph41.preheader75

.lr.ph:                                           ; preds = %.lr.ph.preheader76, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader76 ]
  %44 = getelementptr inbounds [333 x i64], ptr @sum2, i64 0, i64 %indvars.iv
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = add i64 %45, %16
  store i64 %46, ptr %44, align 8, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %.not.not = icmp slt i64 %indvars.iv, %18
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph41, %middle.block56, %._crit_edge
  %.not3442 = icmp slt i32 %13, 1
  br i1 %.not3442, label %._crit_edge45, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %.preheader
  %47 = and i64 %12, 2147483647
  %umax = call i64 @llvm.umax.i64(i64 %47, i64 1)
  %xtraiter = and i64 %umax, 1
  %48 = icmp ult i64 %47, 2
  br i1 %48, label %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44.preheader.new

.lr.ph44.preheader.new:                           ; preds = %.lr.ph44.preheader
  %unroll_iter = and i64 %umax, 2147483646
  br label %.lr.ph44

.lr.ph41:                                         ; preds = %.lr.ph41.preheader75, %.lr.ph41
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph41 ], [ %indvars.iv47.ph, %.lr.ph41.preheader75 ]
  %.02939 = phi i32 [ %52, %.lr.ph41 ], [ %.02939.ph, %.lr.ph41.preheader75 ]
  %49 = getelementptr inbounds [333 x [333 x i64]], ptr @sum1, i64 0, i64 %26, i64 %indvars.iv47
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = add i64 %50, %16
  store i64 %51, ptr %49, align 8, !tbaa !5
  %52 = add i32 %.02939, 1
  %indvars.iv.next48 = add nsw i64 %indvars.iv47, 1
  %exitcond.not = icmp eq i32 %.02939, %30
  br i1 %exitcond.not, label %.preheader, label %.lr.ph41, !llvm.loop !15

._crit_edge45.loopexit.unr-lcssa:                 ; preds = %.lr.ph44, %.lr.ph44.preheader
  %indvars.iv50.unr = phi i64 [ 1, %.lr.ph44.preheader ], [ %indvars.iv.next51.1, %.lr.ph44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge45, label %.lr.ph44.epil

.lr.ph44.epil:                                    ; preds = %._crit_edge45.loopexit.unr-lcssa
  %53 = getelementptr inbounds [333 x [100100 x i64]], ptr @freq, i64 0, i64 %indvars.iv50.unr, i64 %4
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = mul i64 %54, %16
  %56 = getelementptr inbounds [333 x i64], ptr @qsum1, i64 0, i64 %indvars.iv50.unr
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add i64 %57, %55
  store i64 %58, ptr %56, align 8, !tbaa !5
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %.lr.ph44.epil, %._crit_edge45.loopexit.unr-lcssa, %.preheader
  ret void

.lr.ph44:                                         ; preds = %.lr.ph44, %.lr.ph44.preheader.new
  %indvars.iv50 = phi i64 [ 1, %.lr.ph44.preheader.new ], [ %indvars.iv.next51.1, %.lr.ph44 ]
  %niter = phi i64 [ 0, %.lr.ph44.preheader.new ], [ %niter.next.1, %.lr.ph44 ]
  %59 = getelementptr inbounds [333 x [100100 x i64]], ptr @freq, i64 0, i64 %indvars.iv50, i64 %4
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = mul i64 %60, %16
  %62 = getelementptr inbounds [333 x i64], ptr @qsum1, i64 0, i64 %indvars.iv50
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = add i64 %63, %61
  store i64 %64, ptr %62, align 8, !tbaa !5
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %65 = getelementptr inbounds [333 x [100100 x i64]], ptr @freq, i64 0, i64 %indvars.iv.next51, i64 %4
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = mul i64 %66, %16
  %68 = getelementptr inbounds [333 x i64], ptr @qsum1, i64 0, i64 %indvars.iv.next51
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = add i64 %69, %67
  store i64 %70, ptr %68, align 8, !tbaa !5
  %indvars.iv.next51.1 = add nuw nsw i64 %indvars.iv50, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44, !llvm.loop !16
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10}


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