; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_MatNd)

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

%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_mulAndAddSelf = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

declare void @print_trace() #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_mulAndAddSelf(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %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 double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._MatNd, ptr %16, i32 0, i32 1
  %18 = load i32, ptr %17, align 8, !tbaa !9
  store i32 %18, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._MatNd, ptr %19, i32 0, i32 2
  %21 = load i32, ptr %20, align 4, !tbaa !14
  store i32 %21, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._MatNd, ptr %22, i32 0, i32 2
  %24 = load i32, ptr %23, align 4, !tbaa !14
  store i32 %24, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  br label %25

25:                                               ; preds = %3
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._MatNd, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._MatNd, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !9
  %32 = icmp eq i32 %28, %31
  br i1 %32, label %33, label %49

33:                                               ; preds = %25
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._MatNd, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._MatNd, ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 4, !tbaa !14
  %40 = icmp eq i32 %36, %39
  br i1 %40, label %41, label %49

41:                                               ; preds = %33
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._MatNd, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._MatNd, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = icmp eq i32 %44, %47
  br i1 %48, label %74, label %49

49:                                               ; preds = %41, %33, %25
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_mulAndAddSelf, i32 noundef 1725, ptr noundef @.str.124) #6
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !9
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._MatNd, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !14
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._MatNd, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._MatNd, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !14
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 8, !tbaa !9
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._MatNd, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 4, !tbaa !14
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.125, i32 noundef %55, i32 noundef %58, i32 noundef %61, i32 noundef %64, i32 noundef %67, i32 noundef %70) #6
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

74:                                               ; preds = %41
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %77

77:                                               ; preds = %139, %76
  %78 = load i32, ptr %10, align 4, !tbaa !13
  %79 = load i32, ptr %7, align 4, !tbaa !13
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %142

81:                                               ; preds = %77
  %82 = load i32, ptr %10, align 4, !tbaa !13
  %83 = load i32, ptr %8, align 4, !tbaa !13
  %84 = mul nsw i32 %82, %83
  store i32 %84, ptr %13, align 4, !tbaa !13
  %85 = load i32, ptr %10, align 4, !tbaa !13
  %86 = load i32, ptr %9, align 4, !tbaa !13
  %87 = mul nsw i32 %85, %86
  store i32 %87, ptr %14, align 4, !tbaa !13
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %88

88:                                               ; preds = %135, %81
  %89 = load i32, ptr %11, align 4, !tbaa !13
  %90 = load i32, ptr %9, align 4, !tbaa !13
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %92, label %138

92:                                               ; preds = %88
  store double 0.000000e+00, ptr %15, align 8, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %93

93:                                               ; preds = %120, %92
  %94 = load i32, ptr %12, align 4, !tbaa !13
  %95 = load i32, ptr %8, align 4, !tbaa !13
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %123

97:                                               ; preds = %93
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._MatNd, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !17
  %101 = load i32, ptr %13, align 4, !tbaa !13
  %102 = load i32, ptr %12, align 4, !tbaa !13
  %103 = add nsw i32 %101, %102
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %100, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !15
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._MatNd, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load i32, ptr %12, align 4, !tbaa !13
  %111 = load i32, ptr %9, align 4, !tbaa !13
  %112 = mul nsw i32 %110, %111
  %113 = load i32, ptr %11, align 4, !tbaa !13
  %114 = add nsw i32 %112, %113
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %109, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !15
  %118 = load double, ptr %15, align 8, !tbaa !15
  %119 = call double @llvm.fmuladd.f64(double %106, double %117, double %118)
  store double %119, ptr %15, align 8, !tbaa !15
  br label %120

120:                                              ; preds = %97
  %121 = load i32, ptr %12, align 4, !tbaa !13
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %12, align 4, !tbaa !13
  br label %93, !llvm.loop !18

123:                                              ; preds = %93
  %124 = load double, ptr %15, align 8, !tbaa !15
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._MatNd, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  %128 = load i32, ptr %14, align 4, !tbaa !13
  %129 = load i32, ptr %11, align 4, !tbaa !13
  %130 = add nsw i32 %128, %129
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds double, ptr %127, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !15
  %134 = fadd double %133, %124
  store double %134, ptr %132, align 8, !tbaa !15
  br label %135

135:                                              ; preds = %123
  %136 = load i32, ptr %11, align 4, !tbaa !13
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %11, align 4, !tbaa !13
  br label %88, !llvm.loop !20

138:                                              ; preds = %88
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %10, align 4, !tbaa !13
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %10, align 4, !tbaa !13
  br label %77, !llvm.loop !21

142:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

attributes #0 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 12}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!10, !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_mulAndAddSelf = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

declare void @print_trace() local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_mulAndAddSelf(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #4 {
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i32 %5, %11
  br i1 %12, label %13, label %63

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %2, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !12
  %16 = icmp eq i32 %9, %15
  br i1 %16, label %17, label %63

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %2, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = icmp eq i32 %7, %19
  br i1 %20, label %.preheader45, label %63

.preheader45:                                     ; preds = %17
  %21 = icmp sgt i32 %5, 0
  %22 = icmp sgt i32 %9, 0
  %or.cond = select i1 %21, i1 %22, i1 false
  br i1 %or.cond, label %.lr.ph.split.us, label %._crit_edge

.lr.ph.split.us:                                  ; preds = %.preheader45
  %23 = icmp sgt i32 %7, 0
  %24 = load ptr, ptr %0, align 8, !tbaa !13
  br i1 %23, label %.lr.ph.split.us.split.us, label %.preheader.lr.ph.us.preheader

.preheader.lr.ph.us.preheader:                    ; preds = %.lr.ph.split.us
  %25 = zext nneg i32 %9 to i64
  %wide.trip.count61 = zext nneg i32 %5 to i64
  %min.iters.check = icmp ult i32 %9, 4
  %n.vec = and i64 %25, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %25
  br label %.preheader.lr.ph.us

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us
  %26 = load ptr, ptr %1, align 8, !tbaa !13
  %27 = load ptr, ptr %2, align 8, !tbaa !13
  %28 = zext nneg i32 %9 to i64
  %29 = zext nneg i32 %7 to i64
  %wide.trip.count76 = zext nneg i32 %5 to i64
  %xtraiter = and i64 %29, 3
  %30 = icmp ult i32 %7, 4
  %unroll_iter = and i64 %29, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.lr.ph.us.us

.preheader.lr.ph.us.us:                           ; preds = %._crit_edge49.split.us.us.us, %.lr.ph.split.us.split.us
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %._crit_edge49.split.us.us.us ], [ 0, %.lr.ph.split.us.split.us ]
  %31 = mul nuw nsw i64 %indvars.iv73, %29
  %32 = mul nuw nsw i64 %indvars.iv73, %28
  %invariant.gep79 = getelementptr inbounds double, ptr %26, i64 %31
  %invariant.gep83 = getelementptr inbounds double, ptr %24, i64 %32
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader.lr.ph.us.us
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %._crit_edge.us.us.us ], [ 0, %.preheader.lr.ph.us.us ]
  %invariant.gep81 = getelementptr inbounds double, ptr %27, i64 %indvars.iv68
  br i1 %30, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new

.preheader.us.us.us.new:                          ; preds = %.preheader.us.us.us, %.preheader.us.us.us.new
  %indvars.iv63 = phi i64 [ %indvars.iv.next64.3, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %.047.us.us.us = phi double [ %48, %.preheader.us.us.us.new ], [ 0.000000e+00, %.preheader.us.us.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %gep80 = getelementptr inbounds double, ptr %invariant.gep79, i64 %indvars.iv63
  %33 = load double, ptr %gep80, align 8, !tbaa !14
  %34 = mul nuw nsw i64 %indvars.iv63, %28
  %gep82 = getelementptr inbounds double, ptr %invariant.gep81, i64 %34
  %35 = load double, ptr %gep82, align 8, !tbaa !14
  %36 = tail call double @llvm.fmuladd.f64(double %33, double %35, double %.047.us.us.us)
  %indvars.iv.next64 = or disjoint i64 %indvars.iv63, 1
  %gep80.1 = getelementptr inbounds double, ptr %invariant.gep79, i64 %indvars.iv.next64
  %37 = load double, ptr %gep80.1, align 8, !tbaa !14
  %38 = mul nuw nsw i64 %indvars.iv.next64, %28
  %gep82.1 = getelementptr inbounds double, ptr %invariant.gep81, i64 %38
  %39 = load double, ptr %gep82.1, align 8, !tbaa !14
  %40 = tail call double @llvm.fmuladd.f64(double %37, double %39, double %36)
  %indvars.iv.next64.1 = or disjoint i64 %indvars.iv63, 2
  %gep80.2 = getelementptr inbounds double, ptr %invariant.gep79, i64 %indvars.iv.next64.1
  %41 = load double, ptr %gep80.2, align 8, !tbaa !14
  %42 = mul nuw nsw i64 %indvars.iv.next64.1, %28
  %gep82.2 = getelementptr inbounds double, ptr %invariant.gep81, i64 %42
  %43 = load double, ptr %gep82.2, align 8, !tbaa !14
  %44 = tail call double @llvm.fmuladd.f64(double %41, double %43, double %40)
  %indvars.iv.next64.2 = or disjoint i64 %indvars.iv63, 3
  %gep80.3 = getelementptr inbounds double, ptr %invariant.gep79, i64 %indvars.iv.next64.2
  %45 = load double, ptr %gep80.3, align 8, !tbaa !14
  %46 = mul nuw nsw i64 %indvars.iv.next64.2, %28
  %gep82.3 = getelementptr inbounds double, ptr %invariant.gep81, i64 %46
  %47 = load double, ptr %gep82.3, align 8, !tbaa !14
  %48 = tail call double @llvm.fmuladd.f64(double %45, double %47, double %44)
  %indvars.iv.next64.3 = add nuw nsw i64 %indvars.iv63, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new, !llvm.loop !16

._crit_edge.us.us.us.unr-lcssa:                   ; preds = %.preheader.us.us.us.new, %.preheader.us.us.us
  %.lcssa.ph = phi double [ poison, %.preheader.us.us.us ], [ %48, %.preheader.us.us.us.new ]
  %indvars.iv63.unr = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next64.3, %.preheader.us.us.us.new ]
  %.047.us.us.us.unr = phi double [ 0.000000e+00, %.preheader.us.us.us ], [ %48, %.preheader.us.us.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv63.epil = phi i64 [ %indvars.iv.next64.epil, %.epil.preheader ], [ %indvars.iv63.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %.047.us.us.us.epil = phi double [ %52, %.epil.preheader ], [ %.047.us.us.us.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.us.us.unr-lcssa ]
  %gep80.epil = getelementptr inbounds double, ptr %invariant.gep79, i64 %indvars.iv63.epil
  %49 = load double, ptr %gep80.epil, align 8, !tbaa !14
  %50 = mul nuw nsw i64 %indvars.iv63.epil, %28
  %gep82.epil = getelementptr inbounds double, ptr %invariant.gep81, i64 %50
  %51 = load double, ptr %gep82.epil, align 8, !tbaa !14
  %52 = tail call double @llvm.fmuladd.f64(double %49, double %51, double %.047.us.us.us.epil)
  %indvars.iv.next64.epil = add nuw nsw i64 %indvars.iv63.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 %._crit_edge.us.us.us, label %.epil.preheader, !llvm.loop !18

._crit_edge.us.us.us:                             ; preds = %.epil.preheader, %._crit_edge.us.us.us.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.us.us.unr-lcssa ], [ %52, %.epil.preheader ]
  %gep84 = getelementptr inbounds double, ptr %invariant.gep83, i64 %indvars.iv68
  %53 = load double, ptr %gep84, align 8, !tbaa !14
  %54 = fadd double %.lcssa, %53
  store double %54, ptr %gep84, align 8, !tbaa !14
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next69, %28
  br i1 %exitcond72.not, label %._crit_edge49.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !20

._crit_edge49.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count76
  br i1 %exitcond77.not, label %._crit_edge, label %.preheader.lr.ph.us.us, !llvm.loop !21

.preheader.lr.ph.us:                              ; preds = %.preheader.lr.ph.us.preheader, %._crit_edge49.split.us53
  %indvars.iv58 = phi i64 [ 0, %.preheader.lr.ph.us.preheader ], [ %indvars.iv.next59, %._crit_edge49.split.us53 ]
  %55 = mul nuw nsw i64 %indvars.iv58, %25
  %invariant.gep = getelementptr inbounds double, ptr %24, i64 %55
  br i1 %min.iters.check, label %.preheader.us51.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.lr.ph.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.lr.ph.us ]
  %56 = getelementptr inbounds double, ptr %invariant.gep, i64 %index
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load = load <2 x double>, ptr %56, align 8, !tbaa !14
  %wide.load86 = load <2 x double>, ptr %57, align 8, !tbaa !14
  %58 = fadd <2 x double> %wide.load, zeroinitializer
  %59 = fadd <2 x double> %wide.load86, zeroinitializer
  store <2 x double> %58, ptr %56, align 8, !tbaa !14
  store <2 x double> %59, ptr %57, align 8, !tbaa !14
  %index.next = add nuw i64 %index, 4
  %60 = icmp eq i64 %index.next, %n.vec
  br i1 %60, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge49.split.us53, label %.preheader.us51.preheader

.preheader.us51.preheader:                        ; preds = %middle.block, %.preheader.lr.ph.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader.lr.ph.us ], [ %n.vec, %middle.block ]
  br label %.preheader.us51

.preheader.us51:                                  ; preds = %.preheader.us51.preheader, %.preheader.us51
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader.us51 ], [ %indvars.iv.ph, %.preheader.us51.preheader ]
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv
  %61 = load double, ptr %gep, align 8, !tbaa !14
  %62 = fadd double %61, 0.000000e+00
  store double %62, ptr %gep, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %25
  br i1 %exitcond.not, label %._crit_edge49.split.us53, label %.preheader.us51, !llvm.loop !25

._crit_edge49.split.us53:                         ; preds = %.preheader.us51, %middle.block
  %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 %.preheader.lr.ph.us, !llvm.loop !21

63:                                               ; preds = %17, %13, %3
  %64 = load ptr, ptr @stderr, align 8, !tbaa !26
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_mulAndAddSelf, i32 noundef 1725, ptr noundef nonnull @.str.124) #5
  %66 = load ptr, ptr @stderr, align 8, !tbaa !26
  %67 = load i32, ptr %4, align 8, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !12
  %69 = load i32, ptr %10, align 8, !tbaa !5
  %70 = load i32, ptr %6, align 4, !tbaa !12
  %71 = getelementptr inbounds i8, ptr %2, i64 8
  %72 = load i32, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %2, i64 12
  %74 = load i32, ptr %73, align 4, !tbaa !12
  %75 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.125, i32 noundef %67, i32 noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %72, i32 noundef %74) #5
  %76 = load ptr, ptr @stderr, align 8, !tbaa !26
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.4) #5
  tail call void @print_trace() #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

._crit_edge:                                      ; preds = %._crit_edge49.split.us53, %._crit_edge49.split.us.us.us, %.preheader45
  ret void
}

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { cold nounwind }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !10, i64 8}
!6 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17, !23, !24}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !17, !24, !23}
!26 = !{!7, !7, i64 0}


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