; LLVM IR from amritansh22/Data-Structures-and-Algorithms-in-cpp :: Strassen’s Algorithm.ll (Z8multiplyPA5_iS0_iii)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7displayPA5_iii(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8multiplyPA5_iS0_iii(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [5 x [5 x i32]], align 16
  %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 ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 100, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %40, %5
  %19 = load i32, ptr %12, align 4, !tbaa !9
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %43

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %36, %23
  %25 = load i32, ptr %14, align 4, !tbaa !9
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %24
  %30 = load i32, ptr %12, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [5 x [5 x i32]], ptr %11, i64 0, i64 %31
  %33 = load i32, ptr %14, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [5 x i32], ptr %32, i64 0, i64 %34
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %29
  %37 = load i32, ptr %14, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %14, align 4, !tbaa !9
  br label %24, !llvm.loop !11

39:                                               ; preds = %28
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %12, align 4, !tbaa !9
  br label %18, !llvm.loop !13

43:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %95, %43
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %98

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %91, %49
  %51 = load i32, ptr %16, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %94

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %87, %55
  %57 = load i32, ptr %17, align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %90

61:                                               ; preds = %56
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [5 x i32], ptr %62, i64 %64
  %66 = load i32, ptr %17, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [5 x i32], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [5 x i32], ptr %70, i64 %72
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [5 x i32], ptr %73, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = mul nsw i32 %69, %77
  %79 = load i32, ptr %15, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [5 x [5 x i32]], ptr %11, i64 0, i64 %80
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [5 x i32], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = add nsw i32 %85, %78
  store i32 %86, ptr %84, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %61
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %17, align 4, !tbaa !9
  br label %56, !llvm.loop !14

90:                                               ; preds = %60
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %16, align 4, !tbaa !9
  br label %50, !llvm.loop !15

94:                                               ; preds = %54
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %15, align 4, !tbaa !9
  br label %44, !llvm.loop !16

98:                                               ; preds = %48
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %100 = getelementptr inbounds [5 x [5 x i32]], ptr %11, i64 0, i64 0
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = call noundef i32 @_Z7displayPA5_iii(ptr noundef %100, i32 noundef %101, i32 noundef %102)
  call void @llvm.lifetime.end.p0(i64 100, ptr %11) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 = !{!"any pointer", !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}
!16 = distinct !{!16, !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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7displayPA5_iii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8multiplyPA5_iS0_iii(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = alloca [5 x [5 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %6) #5
  %7 = icmp sgt i32 %2, 0
  %8 = icmp sgt i32 %3, 0
  %or.cond = and i1 %7, %8
  br i1 %or.cond, label %.preheader33.us.preheader, label %._crit_edge

.preheader33.us.preheader:                        ; preds = %5
  %9 = zext nneg i32 %3 to i64
  %10 = shl nuw nsw i64 %9, 2
  %wide.trip.count = zext nneg i32 %2 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %11 = icmp ult i32 %2, 8
  br i1 %11, label %.preheader32.unr-lcssa, label %.preheader33.us.preheader.new

.preheader33.us.preheader.new:                    ; preds = %.preheader33.us.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  %invariant.gep = getelementptr i8, ptr %6, i64 40
  %invariant.gep72 = getelementptr i8, ptr %6, i64 60
  %invariant.gep74 = getelementptr i8, ptr %6, i64 80
  %invariant.gep76 = getelementptr i8, ptr %6, i64 100
  %invariant.gep78 = getelementptr i8, ptr %6, i64 120
  %invariant.gep80 = getelementptr i8, ptr %6, i64 140
  br label %.preheader33.us

.preheader33.us:                                  ; preds = %.preheader33.us, %.preheader33.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader33.us.preheader.new ], [ %indvar.next.7, %.preheader33.us ]
  %niter = phi i64 [ 0, %.preheader33.us.preheader.new ], [ %niter.next.7, %.preheader33.us ]
  %12 = mul nuw nsw i64 %indvar, 20
  %scevgep = getelementptr i8, ptr %6, i64 %12
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %10, i1 false), !tbaa !5
  %13 = mul nuw i64 %indvar, 20
  %14 = or disjoint i64 %13, 20
  %scevgep.1 = getelementptr i8, ptr %6, i64 %14
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.1, i8 0, i64 %10, i1 false), !tbaa !5
  %15 = mul nuw i64 %indvar, 20
  %gep = getelementptr i8, ptr %invariant.gep, i64 %15
  call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %10, i1 false), !tbaa !5
  %16 = mul nuw i64 %indvar, 20
  %gep73 = getelementptr i8, ptr %invariant.gep72, i64 %16
  call void @llvm.memset.p0.i64(ptr align 4 %gep73, i8 0, i64 %10, i1 false), !tbaa !5
  %17 = mul nuw i64 %indvar, 20
  %gep75 = getelementptr i8, ptr %invariant.gep74, i64 %17
  call void @llvm.memset.p0.i64(ptr align 16 %gep75, i8 0, i64 %10, i1 false), !tbaa !5
  %18 = mul nuw i64 %indvar, 20
  %gep77 = getelementptr i8, ptr %invariant.gep76, i64 %18
  call void @llvm.memset.p0.i64(ptr align 4 %gep77, i8 0, i64 %10, i1 false), !tbaa !5
  %19 = mul nuw i64 %indvar, 20
  %gep79 = getelementptr i8, ptr %invariant.gep78, i64 %19
  call void @llvm.memset.p0.i64(ptr align 8 %gep79, i8 0, i64 %10, i1 false), !tbaa !5
  %20 = mul nuw i64 %indvar, 20
  %gep81 = getelementptr i8, ptr %invariant.gep80, i64 %20
  call void @llvm.memset.p0.i64(ptr align 4 %gep81, i8 0, i64 %10, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader32.unr-lcssa, label %.preheader33.us, !llvm.loop !9

.preheader32.unr-lcssa:                           ; preds = %.preheader33.us, %.preheader33.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader33.us.preheader ], [ %indvar.next.7, %.preheader33.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader32, label %.preheader33.us.epil

.preheader33.us.epil:                             ; preds = %.preheader32.unr-lcssa, %.preheader33.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader33.us.epil ], [ %indvar.unr, %.preheader32.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader33.us.epil ], [ 0, %.preheader32.unr-lcssa ]
  %21 = mul nuw nsw i64 %indvar.epil, 20
  %scevgep.epil = getelementptr i8, ptr %6, i64 %21
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %10, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader32, label %.preheader33.us.epil, !llvm.loop !11

.preheader32:                                     ; preds = %.preheader33.us.epil, %.preheader32.unr-lcssa
  %22 = icmp sgt i32 %4, 0
  %or.cond65 = and i1 %7, %22
  br i1 %or.cond65, label %.preheader31.us.us.preheader, label %._crit_edge

.preheader31.us.us.preheader:                     ; preds = %.preheader32
  %wide.trip.count61 = zext nneg i32 %2 to i64
  %wide.trip.count56 = zext nneg i32 %3 to i64
  %wide.trip.count51 = zext nneg i32 %4 to i64
  %min.iters.check = icmp ult i32 %4, 9
  %n.mod.vf = and i64 %wide.trip.count51, 7
  %23 = icmp eq i64 %n.mod.vf, 0
  %24 = select i1 %23, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count51, %24
  br label %.preheader31.us.us

.preheader31.us.us:                               ; preds = %.preheader31.us.us.preheader, %._crit_edge38.split.us.us.us
  %indvars.iv58 = phi i64 [ 0, %.preheader31.us.us.preheader ], [ %indvars.iv.next59, %._crit_edge38.split.us.us.us ]
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us39.us.us, %.preheader31.us.us
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %._crit_edge.us39.us.us ], [ 0, %.preheader31.us.us ]
  %25 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv58, i64 %indvars.iv53
  %.promoted.us.us.us = load i32, ptr %25, align 4, !tbaa !5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader.us.us.us
  %26 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.promoted.us.us.us, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %26, %vector.ph ], [ %62, %vector.body ]
  %vec.phi66 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %63, %vector.body ]
  %27 = or disjoint i64 %index, 1
  %28 = or disjoint i64 %index, 2
  %29 = or disjoint i64 %index, 3
  %30 = or disjoint i64 %index, 4
  %31 = or disjoint i64 %index, 5
  %32 = or disjoint i64 %index, 6
  %33 = or disjoint i64 %index, 7
  %34 = getelementptr inbounds [5 x i32], ptr %0, i64 %indvars.iv58, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %wide.load = load <4 x i32>, ptr %34, align 4, !tbaa !5
  %wide.load67 = load <4 x i32>, ptr %35, align 4, !tbaa !5
  %36 = getelementptr inbounds [5 x i32], ptr %1, i64 %index, i64 %indvars.iv53
  %37 = getelementptr inbounds [5 x i32], ptr %1, i64 %27, i64 %indvars.iv53
  %38 = getelementptr inbounds [5 x i32], ptr %1, i64 %28, i64 %indvars.iv53
  %39 = getelementptr inbounds [5 x i32], ptr %1, i64 %29, i64 %indvars.iv53
  %40 = getelementptr inbounds [5 x i32], ptr %1, i64 %30, i64 %indvars.iv53
  %41 = getelementptr inbounds [5 x i32], ptr %1, i64 %31, i64 %indvars.iv53
  %42 = getelementptr inbounds [5 x i32], ptr %1, i64 %32, i64 %indvars.iv53
  %43 = getelementptr inbounds [5 x i32], ptr %1, i64 %33, i64 %indvars.iv53
  %44 = load i32, ptr %36, align 4, !tbaa !5
  %45 = load i32, ptr %37, align 4, !tbaa !5
  %46 = load i32, ptr %38, align 4, !tbaa !5
  %47 = load i32, ptr %39, align 4, !tbaa !5
  %48 = insertelement <4 x i32> poison, i32 %44, i64 0
  %49 = insertelement <4 x i32> %48, i32 %45, i64 1
  %50 = insertelement <4 x i32> %49, i32 %46, i64 2
  %51 = insertelement <4 x i32> %50, i32 %47, i64 3
  %52 = load i32, ptr %40, align 4, !tbaa !5
  %53 = load i32, ptr %41, align 4, !tbaa !5
  %54 = load i32, ptr %42, align 4, !tbaa !5
  %55 = load i32, ptr %43, align 4, !tbaa !5
  %56 = insertelement <4 x i32> poison, i32 %52, i64 0
  %57 = insertelement <4 x i32> %56, i32 %53, i64 1
  %58 = insertelement <4 x i32> %57, i32 %54, i64 2
  %59 = insertelement <4 x i32> %58, i32 %55, i64 3
  %60 = mul nsw <4 x i32> %51, %wide.load
  %61 = mul nsw <4 x i32> %59, %wide.load67
  %62 = add <4 x i32> %vec.phi, %60
  %63 = add <4 x i32> %vec.phi66, %61
  %index.next = add nuw i64 %index, 8
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %63, %62
  %65 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us.us.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader.us.us.us ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %.promoted.us.us.us, %.preheader.us.us.us ], [ %65, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %66 = phi i32 [ %72, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %67 = getelementptr inbounds [5 x i32], ptr %0, i64 %indvars.iv58, i64 %indvars.iv
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = getelementptr inbounds [5 x i32], ptr %1, i64 %indvars.iv, i64 %indvars.iv53
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = mul nsw i32 %70, %68
  %72 = add nsw i32 %66, %71
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond52.not = icmp eq i64 %indvars.iv.next, %wide.trip.count51
  br i1 %exitcond52.not, label %._crit_edge.us39.us.us, label %scalar.ph, !llvm.loop !16

._crit_edge.us39.us.us:                           ; preds = %scalar.ph
  store i32 %72, ptr %25, align 4, !tbaa !5
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next54, %wide.trip.count56
  br i1 %exitcond57.not, label %._crit_edge38.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !17

._crit_edge38.split.us.us.us:                     ; preds = %._crit_edge.us39.us.us
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %exitcond62.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count61
  br i1 %exitcond62.not, label %._crit_edge, label %.preheader31.us.us, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge38.split.us.us.us, %5, %.preheader32
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %74 = call noundef i32 @_Z7displayPA5_iii(ptr noundef nonnull %6, i32 noundef %2, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %6) #5
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


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