; 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
@__func__.MatNd_mul = external hidden unnamed_addr constant [10 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

; 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_mul(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_mul, i32 noundef 1681, 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 = %137, %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 %140

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 = %133, %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 %136

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
  store double %124, ptr %132, align 8, !tbaa !15
  br label %133

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

136:                                              ; preds = %88
  br label %137

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

140:                                              ; 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
@__func__.MatNd_mul = external hidden unnamed_addr constant [10 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

; 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_mul(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 %56

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 %56

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 %56

.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
  %26 = zext nneg i32 %5 to i64
  %27 = mul nuw nsw i64 %25, %26
  %28 = shl i64 %27, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 %28, i1 false), !tbaa !14
  br label %._crit_edge

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us
  %29 = load ptr, ptr %1, align 8, !tbaa !13
  %30 = load ptr, ptr %2, align 8, !tbaa !13
  %31 = zext nneg i32 %9 to i64
  %32 = zext nneg i32 %7 to i64
  %wide.trip.count68 = zext nneg i32 %5 to i64
  %xtraiter = and i64 %32, 3
  %33 = icmp ult i32 %7, 4
  %unroll_iter = and i64 %32, 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.iv65 = phi i64 [ %indvars.iv.next66, %._crit_edge49.split.us.us.us ], [ 0, %.lr.ph.split.us.split.us ]
  %34 = mul nuw nsw i64 %indvars.iv65, %32
  %35 = mul nuw nsw i64 %indvars.iv65, %31
  %invariant.gep = getelementptr inbounds double, ptr %29, i64 %34
  %invariant.gep72 = getelementptr inbounds double, ptr %24, i64 %35
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader.lr.ph.us.us
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %._crit_edge.us.us.us ], [ 0, %.preheader.lr.ph.us.us ]
  %invariant.gep70 = getelementptr inbounds double, ptr %30, i64 %indvars.iv60
  br i1 %33, 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.iv = phi i64 [ %indvars.iv.next.3, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %.047.us.us.us = phi double [ %51, %.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 ]
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv
  %36 = load double, ptr %gep, align 8, !tbaa !14
  %37 = mul nuw nsw i64 %indvars.iv, %31
  %gep71 = getelementptr inbounds double, ptr %invariant.gep70, i64 %37
  %38 = load double, ptr %gep71, align 8, !tbaa !14
  %39 = tail call double @llvm.fmuladd.f64(double %36, double %38, double %.047.us.us.us)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv.next
  %40 = load double, ptr %gep.1, align 8, !tbaa !14
  %41 = mul nuw nsw i64 %indvars.iv.next, %31
  %gep71.1 = getelementptr inbounds double, ptr %invariant.gep70, i64 %41
  %42 = load double, ptr %gep71.1, align 8, !tbaa !14
  %43 = tail call double @llvm.fmuladd.f64(double %40, double %42, double %39)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %gep.2 = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv.next.1
  %44 = load double, ptr %gep.2, align 8, !tbaa !14
  %45 = mul nuw nsw i64 %indvars.iv.next.1, %31
  %gep71.2 = getelementptr inbounds double, ptr %invariant.gep70, i64 %45
  %46 = load double, ptr %gep71.2, align 8, !tbaa !14
  %47 = tail call double @llvm.fmuladd.f64(double %44, double %46, double %43)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %gep.3 = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv.next.2
  %48 = load double, ptr %gep.3, align 8, !tbaa !14
  %49 = mul nuw nsw i64 %indvars.iv.next.2, %31
  %gep71.3 = getelementptr inbounds double, ptr %invariant.gep70, i64 %49
  %50 = load double, ptr %gep71.3, align 8, !tbaa !14
  %51 = tail call double @llvm.fmuladd.f64(double %48, double %50, double %47)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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 ], [ %51, %.preheader.us.us.us.new ]
  %indvars.iv.unr = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next.3, %.preheader.us.us.us.new ]
  %.047.us.us.us.unr = phi double [ 0.000000e+00, %.preheader.us.us.us ], [ %51, %.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.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %.047.us.us.us.epil = phi double [ %55, %.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 ]
  %gep.epil = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv.epil
  %52 = load double, ptr %gep.epil, align 8, !tbaa !14
  %53 = mul nuw nsw i64 %indvars.iv.epil, %31
  %gep71.epil = getelementptr inbounds double, ptr %invariant.gep70, i64 %53
  %54 = load double, ptr %gep71.epil, align 8, !tbaa !14
  %55 = tail call double @llvm.fmuladd.f64(double %52, double %54, double %.047.us.us.us.epil)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 ], [ %55, %.epil.preheader ]
  %gep73 = getelementptr inbounds double, ptr %invariant.gep72, i64 %indvars.iv60
  store double %.lcssa, ptr %gep73, align 8, !tbaa !14
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next61, %31
  br i1 %exitcond64.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.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %._crit_edge, label %.preheader.lr.ph.us.us, !llvm.loop !21

56:                                               ; preds = %17, %13, %3
  %57 = load ptr, ptr @stderr, align 8, !tbaa !22
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_mul, i32 noundef 1681, ptr noundef nonnull @.str.124) #6
  %59 = load ptr, ptr @stderr, align 8, !tbaa !22
  %60 = load i32, ptr %4, align 8, !tbaa !5
  %61 = load i32, ptr %8, align 4, !tbaa !12
  %62 = load i32, ptr %10, align 8, !tbaa !5
  %63 = load i32, ptr %6, align 4, !tbaa !12
  %64 = getelementptr inbounds i8, ptr %2, i64 8
  %65 = load i32, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %2, i64 12
  %67 = load i32, ptr %66, align 4, !tbaa !12
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.125, i32 noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63, i32 noundef %65, i32 noundef %67) #6
  %69 = load ptr, ptr @stderr, align 8, !tbaa !22
  %70 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.4) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

._crit_edge:                                      ; preds = %._crit_edge49.split.us.us.us, %.preheader.lr.ph.us.preheader, %.preheader45
  ret void
}

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!7, !7, i64 0}


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