; LLVM IR from Mohammed-Shoaib/Coding-Problems :: Codeforces/Solutions/1373E.ll (Z13sum_of_digitsii)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z9constructi(i32 noundef) #0

; 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: mustprogress uwtable
define dso_local noundef i64 @_Z13sum_of_digitsii(i32 noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %18 = call noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #4
  store i64 %18, ptr %7, align 8, !tbaa !9
  store i64 %18, ptr %5, align 8, !tbaa !9
  store i64 10, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %95, %2
  %20 = load i32, ptr %9, align 4, !tbaa !5
  %21 = mul nsw i32 9, %20
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %100

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

26:                                               ; preds = %91, %25
  %27 = load i32, ptr %11, align 4, !tbaa !5
  %28 = icmp sle i32 %27, 9
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %94

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %31 = load i32, ptr %11, align 4, !tbaa !5
  %32 = sub nsw i32 10, %31
  store i32 %32, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %16, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %49, %30
  %38 = load i32, ptr %17, align 4, !tbaa !5
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %52

42:                                               ; preds = %37
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = load i32, ptr %17, align 4, !tbaa !5
  %45 = add nsw i32 %43, %44
  %46 = srem i32 %45, 10
  %47 = load i32, ptr %12, align 4, !tbaa !5
  %48 = add nsw i32 %47, %46
  store i32 %48, ptr %12, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %42
  %50 = load i32, ptr %17, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %17, align 4, !tbaa !5
  br label %37, !llvm.loop !11

52:                                               ; preds = %41
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = mul nsw i32 9, %56
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = sub nsw i32 %55, %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  %63 = load i32, ptr %13, align 4, !tbaa !5
  %64 = sub nsw i32 %62, %63
  %65 = sub nsw i32 %60, %64
  store i32 %65, ptr %14, align 4, !tbaa !5
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = icmp sge i32 %66, 0
  br i1 %67, label %68, label %90

68:                                               ; preds = %52
  %69 = load i32, ptr %14, align 4, !tbaa !5
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = srem i32 %69, %71
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %90

74:                                               ; preds = %68
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  %77 = load i32, ptr %14, align 4, !tbaa !5
  %78 = sdiv i32 %77, %76
  store i32 %78, ptr %14, align 4, !tbaa !5
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = call noundef i64 @_Z9constructi(i32 noundef %80)
  %82 = add nsw i64 %81, 1
  %83 = mul nsw i64 %79, %82
  %84 = sub nsw i64 %83, 10
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = add nsw i64 %84, %86
  store i64 %87, ptr %6, align 8, !tbaa !9
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %89 = load i64, ptr %88, align 8, !tbaa !9
  store i64 %89, ptr %5, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %74, %68, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %91

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

94:                                               ; preds = %29
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %9, align 4, !tbaa !5
  %98 = load i64, ptr %8, align 8, !tbaa !9
  %99 = mul nsw i64 %98, 10
  store i64 %99, ptr %8, align 8, !tbaa !9
  br label %19, !llvm.loop !14

100:                                              ; preds = %24
  %101 = load i64, ptr %5, align 8, !tbaa !9
  %102 = load i64, ptr %7, align 8, !tbaa !9
  %103 = icmp eq i64 %101, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %100
  br label %107

105:                                              ; preds = %100
  %106 = load i64, ptr %5, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %105, %104
  %108 = phi i64 [ -1, %104 ], [ %106, %105 ]
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret i64 %108
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #0 align 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 @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z9constructi(i32 noundef) local_unnamed_addr #0

; 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: mustprogress nounwind uwtable
define dso_local noundef i64 @_Z13sum_of_digitsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %7 = tail call noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #4
  store i64 %7, ptr %3, align 8, !tbaa !5
  %.not43 = icmp slt i32 %0, 0
  br i1 %.not43, label %._crit_edge46, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %2
  %8 = add i32 %1, 1
  %.not3639 = icmp slt i32 %1, 0
  br i1 %.not3639, label %.preheader.us, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %9 = add nuw i32 %1, 1
  %min.iters.check = icmp ult i32 %1, 7
  %n.vec = and i32 %9, -8
  %cmp.n = icmp eq i32 %9, %n.vec
  br label %.preheader

.preheader.us:                                    ; preds = %.preheader.lr.ph, %.split.us.us
  %10 = phi i32 [ %36, %.split.us.us ], [ 0, %.preheader.lr.ph ]
  %.02945.us = phi i64 [ %35, %.split.us.us ], [ 10, %.preheader.lr.ph ]
  %.03244.us = phi i32 [ %34, %.split.us.us ], [ 0, %.preheader.lr.ph ]
  br label %11

11:                                               ; preds = %33, %.preheader.us
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %33 ], [ 0, %.preheader.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %12 = trunc i64 %indvars.iv50 to i32
  %13 = sub i32 10, %12
  store i32 %13, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 %8, ptr %6, align 4, !tbaa !9
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %15 = load i32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %16 = mul i32 %10, %15
  %17 = add i32 %15, %0
  %18 = add i32 %8, %16
  %19 = sub i32 %17, %18
  %20 = icmp sgt i32 %19, -1
  br i1 %20, label %21, label %33

21:                                               ; preds = %11
  %22 = srem i32 %19, %8
  %23 = sdiv i32 %19, %8
  %24 = icmp eq i32 %22, 0
  br i1 %24, label %25, label %33

25:                                               ; preds = %21
  %26 = call noundef i64 @_Z9constructi(i32 noundef %23)
  %27 = add nsw i64 %26, 1
  %28 = mul nsw i64 %27, %.02945.us
  %29 = add nuw nsw i64 %indvars.iv50, -10
  %30 = add i64 %29, %28
  store i64 %30, ptr %4, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %32 = load i64, ptr %31, align 8, !tbaa !5
  store i64 %32, ptr %3, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %25, %21, %11
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next51, 10
  br i1 %exitcond53.not, label %.split.us.us, label %11, !llvm.loop !11

.split.us.us:                                     ; preds = %33
  %34 = add nuw nsw i32 %.03244.us, 1
  %35 = mul nuw nsw i64 %.02945.us, 10
  %36 = mul nuw nsw i32 %34, 9
  %.not.us = icmp sgt i32 %36, %0
  br i1 %.not.us, label %._crit_edge46, label %.preheader.us, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %.split
  %37 = phi i32 [ %43, %.split ], [ 0, %.preheader.preheader ]
  %.02945 = phi i64 [ %42, %.split ], [ 10, %.preheader.preheader ]
  %.03244 = phi i32 [ %41, %.split ], [ 0, %.preheader.preheader ]
  br label %.lr.ph

._crit_edge46:                                    ; preds = %.split, %.split.us.us, %2
  %38 = load i64, ptr %3, align 8
  %39 = icmp eq i64 %38, %7
  %40 = select i1 %39, i64 -1, i64 %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i64 %40

.split:                                           ; preds = %79
  %41 = add nuw nsw i32 %.03244, 1
  %42 = mul nuw nsw i64 %.02945, 10
  %43 = mul nuw nsw i32 %41, 9
  %.not = icmp sgt i32 %43, %0
  br i1 %.not, label %._crit_edge46, label %.preheader, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader, %79
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %79 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %44 = trunc i64 %indvars.iv to i32
  %45 = sub i32 10, %44
  store i32 %45, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 %8, ptr %6, align 4, !tbaa !9
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %47 = load i32, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %48 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %.041.ph = phi i32 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.03040.ph = phi i32 [ 0, %.lr.ph ], [ %56, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %48, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %53, %vector.body ]
  %vec.phi57 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %54, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %49 = add nuw nsw <4 x i32> %vec.ind, %broadcast.splat
  %50 = add nuw nsw <4 x i32> %step.add, %broadcast.splat
  %51 = urem <4 x i32> %49, <i32 10, i32 10, i32 10, i32 10>
  %52 = urem <4 x i32> %50, <i32 10, i32 10, i32 10, i32 10>
  %53 = add <4 x i32> %51, %vec.phi
  %54 = add <4 x i32> %52, %vec.phi57
  %index.next = add nuw i32 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %55 = icmp eq i32 %index.next, %n.vec
  br i1 %55, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %54, %53
  %56 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %56, %middle.block ], [ %65, %scalar.ph ]
  %57 = mul i32 %37, %47
  %58 = add i32 %47, %0
  %59 = add i32 %8, %57
  %60 = add i32 %59, %.lcssa
  %61 = sub i32 %58, %60
  %62 = icmp sgt i32 %61, -1
  br i1 %62, label %67, label %79

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.041 = phi i32 [ %66, %scalar.ph ], [ %.041.ph, %scalar.ph.preheader ]
  %.03040 = phi i32 [ %65, %scalar.ph ], [ %.03040.ph, %scalar.ph.preheader ]
  %63 = add nuw nsw i32 %.041, %48
  %64 = urem i32 %63, 10
  %65 = add nuw nsw i32 %64, %.03040
  %66 = add nuw i32 %.041, 1
  %exitcond.not = icmp eq i32 %.041, %1
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !17

67:                                               ; preds = %._crit_edge
  %68 = urem i32 %61, %8
  %69 = udiv i32 %61, %8
  %70 = icmp eq i32 %68, 0
  br i1 %70, label %71, label %79

71:                                               ; preds = %67
  %72 = call noundef i64 @_Z9constructi(i32 noundef %69)
  %73 = add nsw i64 %72, 1
  %74 = mul nsw i64 %73, %.02945
  %75 = add nuw nsw i64 %indvars.iv, -10
  %76 = add i64 %75, %74
  store i64 %76, ptr %4, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %78 = load i64, ptr %77, align 8, !tbaa !5
  store i64 %78, ptr %3, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %71, %67, %._crit_edge
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next, 10
  br i1 %exitcond49.not, label %.split, label %.lr.ph, !llvm.loop !11
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() local_unnamed_addr #0 align 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 #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

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 = { 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 #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 = !{!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, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12, !16, !15}


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