; LLVM IR from Thre4dripper/DSA-Programs :: 02. Matrix/03_Multiplication.ll (Z8MultiplyPA5_iiiPA4_iiiS2_)

; 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 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8MultiplyPA5_iiiPA4_iiiS2_(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = load i32, ptr %12, align 4, !tbaa !9
  %21 = icmp eq i32 %19, %20
  br i1 %21, label %22, label %86

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

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

27:                                               ; preds = %23
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %85

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

29:                                               ; preds = %78, %28
  %30 = load i32, ptr %17, align 4, !tbaa !9
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %81

34:                                               ; preds = %29
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [4 x i32], ptr %35, i64 %37
  %39 = load i32, ptr %17, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [4 x i32], ptr %38, i64 0, i64 %40
  store i32 0, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %74, %34
  %43 = load i32, ptr %18, align 4, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %77

47:                                               ; preds = %42
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load i32, ptr %15, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [5 x i32], ptr %48, i64 %50
  %52 = load i32, ptr %18, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [5 x i32], ptr %51, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load i32, ptr %18, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [4 x i32], ptr %56, i64 %58
  %60 = load i32, ptr %17, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [4 x i32], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = mul nsw i32 %55, %63
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [4 x i32], ptr %65, i64 %67
  %69 = load i32, ptr %17, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [4 x i32], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = add nsw i32 %72, %64
  store i32 %73, ptr %71, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %47
  %75 = load i32, ptr %18, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %18, align 4, !tbaa !9
  br label %42, !llvm.loop !11

77:                                               ; preds = %46
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %17, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %17, align 4, !tbaa !9
  br label %29, !llvm.loop !13

81:                                               ; preds = %33
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %15, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %15, align 4, !tbaa !9
  br label %23, !llvm.loop !14

85:                                               ; preds = %27
  br label %89

86:                                               ; preds = %7
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %89

89:                                               ; preds = %86, %85
  ret void
}

; 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: 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) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { 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 #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}


; 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 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8MultiplyPA5_iiiPA4_iiiS2_(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, i32 noundef %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = icmp eq i32 %2, %4
  br i1 %8, label %.preheader25, label %96

.preheader25:                                     ; preds = %7
  %9 = icmp sgt i32 %1, 0
  %10 = icmp sgt i32 %5, 0
  %or.cond = and i1 %9, %10
  br i1 %or.cond, label %.preheader.lr.ph.split.us, label %.loopexit

.preheader.lr.ph.split.us:                        ; preds = %.preheader25
  %11 = icmp sgt i32 %2, 0
  br i1 %11, label %.preheader.us.us.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph.split.us
  %12 = zext nneg i32 %5 to i64
  %13 = shl nuw nsw i64 %12, 2
  %wide.trip.count = zext nneg i32 %1 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %14 = icmp ult i32 %1, 8
  br i1 %14, label %.loopexit.loopexit67.unr-lcssa, label %.preheader.us.preheader.new

.preheader.us.preheader.new:                      ; preds = %.preheader.us.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  br label %.preheader.us

.preheader.us.us.preheader:                       ; preds = %.preheader.lr.ph.split.us
  %wide.trip.count52 = zext nneg i32 %1 to i64
  %wide.trip.count47 = zext nneg i32 %5 to i64
  %wide.trip.count39 = zext nneg i32 %2 to i64
  %15 = shl nuw nsw i64 %wide.trip.count47, 2
  %16 = shl nuw nsw i64 %wide.trip.count39, 2
  %17 = shl nuw nsw i64 %wide.trip.count39, 4
  %18 = getelementptr i8, ptr %3, i64 %17
  %19 = getelementptr i8, ptr %18, i64 %15
  %scevgep60 = getelementptr i8, ptr %19, i64 -16
  %20 = getelementptr i8, ptr %6, i64 %15
  %21 = getelementptr i8, ptr %0, i64 %16
  %min.iters.check = icmp ult i32 %2, 9
  %n.mod.vf = and i64 %wide.trip.count39, 7
  %22 = icmp eq i64 %n.mod.vf, 0
  %23 = select i1 %22, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count39, %23
  %24 = add nsw i64 %wide.trip.count39, -1
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge29.split.us.us.us
  %indvars.iv49 = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next50, %._crit_edge29.split.us.us.us ]
  %25 = shl nuw nsw i64 %indvars.iv49, 4
  %scevgep56 = getelementptr i8, ptr %6, i64 %25
  %scevgep57 = getelementptr i8, ptr %20, i64 %25
  %26 = mul nuw nsw i64 %indvars.iv49, 20
  %scevgep58 = getelementptr i8, ptr %0, i64 %26
  %scevgep59 = getelementptr i8, ptr %21, i64 %26
  %bound0 = icmp ult ptr %scevgep56, %scevgep59
  %bound1 = icmp ult ptr %scevgep58, %scevgep57
  %found.conflict = and i1 %bound0, %bound1
  %bound061 = icmp ult ptr %scevgep56, %scevgep60
  %bound162 = icmp ugt ptr %scevgep57, %3
  %found.conflict63 = and i1 %bound061, %bound162
  %conflict.rdx = or i1 %found.conflict, %found.conflict63
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %._crit_edge.us.us.us, %.preheader.us.us
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %._crit_edge.us.us.us ], [ 0, %.preheader.us.us ]
  %27 = getelementptr inbounds [4 x i32], ptr %6, i64 %indvars.iv49, i64 %indvars.iv44
  store i32 0, ptr %27, align 4, !tbaa !5
  %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

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

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %64, %63
  %66 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  store i32 %66, ptr %27, align 4, !tbaa !5
  br label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.lr.ph.us.us.us, %middle.block
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.us.us.us ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ 0, %.lr.ph.us.us.us ], [ %66, %middle.block ]
  %67 = sub nsw i64 %wide.trip.count39, %indvars.iv.ph
  %xtraiter68 = and i64 %67, 1
  %lcmp.mod69.not = icmp eq i64 %xtraiter68, 0
  br i1 %lcmp.mod69.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %68 = getelementptr inbounds [5 x i32], ptr %0, i64 %indvars.iv49, i64 %indvars.iv.ph
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = getelementptr inbounds [4 x i32], ptr %3, i64 %indvars.iv.ph, i64 %indvars.iv44
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = mul nsw i32 %71, %69
  %73 = add nsw i32 %.ph, %72
  store i32 %73, ptr %27, align 4, !tbaa !5
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %.unr = phi i32 [ %.ph, %scalar.ph.preheader ], [ %73, %scalar.ph.prol ]
  %74 = icmp eq i64 %indvars.iv.ph, %24
  br i1 %74, label %._crit_edge.us.us.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %75 = phi i32 [ %87, %scalar.ph ], [ %.unr, %scalar.ph.prol.loopexit ]
  %76 = getelementptr inbounds [5 x i32], ptr %0, i64 %indvars.iv49, i64 %indvars.iv
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = getelementptr inbounds [4 x i32], ptr %3, i64 %indvars.iv, i64 %indvars.iv44
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = mul nsw i32 %79, %77
  %81 = add nsw i32 %75, %80
  store i32 %81, ptr %27, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %82 = getelementptr inbounds [5 x i32], ptr %0, i64 %indvars.iv49, i64 %indvars.iv.next
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds [4 x i32], ptr %3, i64 %indvars.iv.next, i64 %indvars.iv44
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = mul nsw i32 %85, %83
  %87 = add nsw i32 %81, %86
  store i32 %87, ptr %27, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond40.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count39
  br i1 %exitcond40.not.1, label %._crit_edge.us.us.us, label %scalar.ph, !llvm.loop !18

._crit_edge.us.us.us:                             ; preds = %scalar.ph, %scalar.ph.prol.loopexit
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %._crit_edge29.split.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !19

._crit_edge29.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count52
  br i1 %exitcond53.not, label %.loopexit, label %.preheader.us.us, !llvm.loop !20

.preheader.us:                                    ; preds = %.preheader.us, %.preheader.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader.us.preheader.new ], [ %indvar.next.7, %.preheader.us ]
  %niter = phi i64 [ 0, %.preheader.us.preheader.new ], [ %niter.next.7, %.preheader.us ]
  %88 = shl nuw nsw i64 %indvar, 4
  %scevgep = getelementptr i8, ptr %6, i64 %88
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next = shl i64 %indvar, 4
  %89 = or disjoint i64 %indvar.next, 16
  %scevgep.1 = getelementptr i8, ptr %6, i64 %89
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.1, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.1 = shl i64 %indvar, 4
  %90 = or disjoint i64 %indvar.next.1, 32
  %scevgep.2 = getelementptr i8, ptr %6, i64 %90
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.2, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.2 = shl i64 %indvar, 4
  %91 = or disjoint i64 %indvar.next.2, 48
  %scevgep.3 = getelementptr i8, ptr %6, i64 %91
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.3, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.3 = shl i64 %indvar, 4
  %92 = or disjoint i64 %indvar.next.3, 64
  %scevgep.4 = getelementptr i8, ptr %6, i64 %92
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.4, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.4 = shl i64 %indvar, 4
  %93 = or disjoint i64 %indvar.next.4, 80
  %scevgep.5 = getelementptr i8, ptr %6, i64 %93
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.5, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.5 = shl i64 %indvar, 4
  %94 = or disjoint i64 %indvar.next.5, 96
  %scevgep.6 = getelementptr i8, ptr %6, i64 %94
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.6, i8 0, i64 %13, i1 false), !tbaa !5
  %indvar.next.6 = shl i64 %indvar, 4
  %95 = or disjoint i64 %indvar.next.6, 112
  %scevgep.7 = getelementptr i8, ptr %6, i64 %95
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.7, i8 0, i64 %13, 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 %.loopexit.loopexit67.unr-lcssa, label %.preheader.us, !llvm.loop !20

96:                                               ; preds = %7
  %97 = 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)
  %98 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

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

.preheader.us.epil:                               ; preds = %.loopexit.loopexit67.unr-lcssa, %.preheader.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader.us.epil ], [ %indvar.unr, %.loopexit.loopexit67.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.us.epil ], [ 0, %.loopexit.loopexit67.unr-lcssa ]
  %99 = shl nuw nsw i64 %indvar.epil, 4
  %scevgep.epil = getelementptr i8, ptr %6, i64 %99
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %13, 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 %.loopexit, label %.preheader.us.epil, !llvm.loop !21

.loopexit:                                        ; preds = %.loopexit.loopexit67.unr-lcssa, %.preheader.us.epil, %._crit_edge29.split.us.us.us, %.preheader25, %96
  ret void
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = distinct !{!10, !11}
!11 = distinct !{!11, !"LVerDomain"}
!12 = !{!13}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15, !16}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}


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