; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @r8mat_copy(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @r8mat_mm(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #4 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %0, ptr %7, align 4, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !5
  %19 = mul nsw i32 %17, %18
  %20 = sext i32 %19 to i64
  %21 = mul i64 %20, 8
  %22 = call noalias ptr @malloc(i64 noundef %21) #6
  store ptr %22, ptr %13, align 8, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %90, %6
  %24 = load i32, ptr %14, align 4, !tbaa !5
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %27, label %93

27:                                               ; preds = %23
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %86, %27
  %29 = load i32, ptr %15, align 4, !tbaa !5
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %89

32:                                               ; preds = %28
  %33 = load ptr, ptr %13, align 8, !tbaa !9
  %34 = load i32, ptr %14, align 4, !tbaa !5
  %35 = load i32, ptr %15, align 4, !tbaa !5
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = mul nsw i32 %35, %36
  %38 = add nsw i32 %34, %37
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %33, i64 %39
  store double 0.000000e+00, ptr %40, align 8, !tbaa !11
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %82, %32
  %42 = load i32, ptr %16, align 4, !tbaa !5
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %85

45:                                               ; preds = %41
  %46 = load ptr, ptr %13, align 8, !tbaa !9
  %47 = load i32, ptr %14, align 4, !tbaa !5
  %48 = load i32, ptr %15, align 4, !tbaa !5
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = mul nsw i32 %48, %49
  %51 = add nsw i32 %47, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %46, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = load ptr, ptr %10, align 8, !tbaa !9
  %56 = load i32, ptr %14, align 4, !tbaa !5
  %57 = load i32, ptr %16, align 4, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = add nsw i32 %56, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds double, ptr %55, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !11
  %64 = load ptr, ptr %11, align 8, !tbaa !9
  %65 = load i32, ptr %16, align 4, !tbaa !5
  %66 = load i32, ptr %15, align 4, !tbaa !5
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = mul nsw i32 %66, %67
  %69 = add nsw i32 %65, %68
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %64, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = call double @llvm.fmuladd.f64(double %63, double %72, double %54)
  %74 = load ptr, ptr %13, align 8, !tbaa !9
  %75 = load i32, ptr %14, align 4, !tbaa !5
  %76 = load i32, ptr %15, align 4, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = mul nsw i32 %76, %77
  %79 = add nsw i32 %75, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %74, i64 %80
  store double %73, ptr %81, align 8, !tbaa !11
  br label %82

82:                                               ; preds = %45
  %83 = load i32, ptr %16, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %16, align 4, !tbaa !5
  br label %41, !llvm.loop !13

85:                                               ; preds = %41
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %15, align 4, !tbaa !5
  br label %28, !llvm.loop !15

89:                                               ; preds = %28
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %14, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %14, align 4, !tbaa !5
  br label %23, !llvm.loop !16

93:                                               ; preds = %23
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = load ptr, ptr %13, align 8, !tbaa !9
  %97 = load ptr, ptr %12, align 8, !tbaa !9
  call void @r8mat_copy(i32 noundef %94, i32 noundef %95, ptr noundef %96, ptr noundef %97)
  %98 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %98) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind allocsize(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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @r8mat_copy(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @r8mat_mm(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = mul nsw i32 %2, %0
  %8 = sext i32 %7 to i64
  %9 = shl nsw i64 %8, 3
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #4
  %11 = icmp sgt i32 %0, 0
  %12 = icmp sgt i32 %2, 0
  %or.cond = and i1 %11, %12
  br i1 %or.cond, label %.preheader.lr.ph.split.us, label %._crit_edge

.preheader.lr.ph.split.us:                        ; preds = %6
  %13 = icmp sgt i32 %1, 0
  %14 = zext nneg i32 %0 to i64
  br i1 %13, label %.preheader.us.us.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph.split.us
  %wide.trip.count = zext nneg i32 %2 to i64
  %min.iters.check = icmp ugt i32 %2, 3
  %ident.check.not = icmp eq i32 %0, 1
  %or.cond79 = and i1 %min.iters.check, %ident.check.not
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us.us.preheader:                       ; preds = %.preheader.lr.ph.split.us
  %15 = zext nneg i32 %1 to i64
  %wide.trip.count64 = zext nneg i32 %2 to i64
  %xtraiter81 = and i64 %15, 3
  %16 = icmp ult i32 %1, 4
  %unroll_iter = and i64 %15, 2147483644
  %lcmp.mod82.not = icmp eq i64 %xtraiter81, 0
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge42.split.us.us.us
  %indvars.iv66 = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next67, %._crit_edge42.split.us.us.us ]
  %invariant.gep76 = getelementptr inbounds double, ptr %10, i64 %indvars.iv66
  %invariant.gep72 = getelementptr inbounds double, ptr %3, i64 %indvars.iv66
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %._crit_edge.us.us.us, %.preheader.us.us
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %._crit_edge.us.us.us ], [ 0, %.preheader.us.us ]
  %17 = mul nuw nsw i64 %indvars.iv61, %14
  %gep77 = getelementptr inbounds double, ptr %invariant.gep76, i64 %17
  %18 = mul nuw nsw i64 %indvars.iv61, %15
  %invariant.gep74 = getelementptr inbounds double, ptr %4, i64 %18
  br i1 %16, label %._crit_edge.us.us.us.unr-lcssa, label %.lr.ph.us.us.us.new

.lr.ph.us.us.us.new:                              ; preds = %.lr.ph.us.us.us, %.lr.ph.us.us.us.new
  %indvars.iv56 = phi i64 [ %indvars.iv.next57.3, %.lr.ph.us.us.us.new ], [ 0, %.lr.ph.us.us.us ]
  %19 = phi double [ %35, %.lr.ph.us.us.us.new ], [ 0.000000e+00, %.lr.ph.us.us.us ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph.us.us.us.new ], [ 0, %.lr.ph.us.us.us ]
  %20 = mul nuw nsw i64 %indvars.iv56, %14
  %gep73 = getelementptr inbounds double, ptr %invariant.gep72, i64 %20
  %21 = load double, ptr %gep73, align 8, !tbaa !5
  %gep75 = getelementptr inbounds double, ptr %invariant.gep74, i64 %indvars.iv56
  %22 = load double, ptr %gep75, align 8, !tbaa !5
  %23 = tail call double @llvm.fmuladd.f64(double %21, double %22, double %19)
  %indvars.iv.next57 = or disjoint i64 %indvars.iv56, 1
  %24 = mul nuw nsw i64 %indvars.iv.next57, %14
  %gep73.1 = getelementptr inbounds double, ptr %invariant.gep72, i64 %24
  %25 = load double, ptr %gep73.1, align 8, !tbaa !5
  %gep75.1 = getelementptr inbounds double, ptr %invariant.gep74, i64 %indvars.iv.next57
  %26 = load double, ptr %gep75.1, align 8, !tbaa !5
  %27 = tail call double @llvm.fmuladd.f64(double %25, double %26, double %23)
  %indvars.iv.next57.1 = or disjoint i64 %indvars.iv56, 2
  %28 = mul nuw nsw i64 %indvars.iv.next57.1, %14
  %gep73.2 = getelementptr inbounds double, ptr %invariant.gep72, i64 %28
  %29 = load double, ptr %gep73.2, align 8, !tbaa !5
  %gep75.2 = getelementptr inbounds double, ptr %invariant.gep74, i64 %indvars.iv.next57.1
  %30 = load double, ptr %gep75.2, align 8, !tbaa !5
  %31 = tail call double @llvm.fmuladd.f64(double %29, double %30, double %27)
  %indvars.iv.next57.2 = or disjoint i64 %indvars.iv56, 3
  %32 = mul nuw nsw i64 %indvars.iv.next57.2, %14
  %gep73.3 = getelementptr inbounds double, ptr %invariant.gep72, i64 %32
  %33 = load double, ptr %gep73.3, align 8, !tbaa !5
  %gep75.3 = getelementptr inbounds double, ptr %invariant.gep74, i64 %indvars.iv.next57.2
  %34 = load double, ptr %gep75.3, align 8, !tbaa !5
  %35 = tail call double @llvm.fmuladd.f64(double %33, double %34, double %31)
  %indvars.iv.next57.3 = add nuw nsw i64 %indvars.iv56, 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 %.lr.ph.us.us.us.new, !llvm.loop !9

._crit_edge.us.us.us.unr-lcssa:                   ; preds = %.lr.ph.us.us.us.new, %.lr.ph.us.us.us
  %.lcssa.ph = phi double [ poison, %.lr.ph.us.us.us ], [ %35, %.lr.ph.us.us.us.new ]
  %indvars.iv56.unr = phi i64 [ 0, %.lr.ph.us.us.us ], [ %indvars.iv.next57.3, %.lr.ph.us.us.us.new ]
  %.unr = phi double [ 0.000000e+00, %.lr.ph.us.us.us ], [ %35, %.lr.ph.us.us.us.new ]
  br i1 %lcmp.mod82.not, label %._crit_edge.us.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv56.epil = phi i64 [ %indvars.iv.next57.epil, %.epil.preheader ], [ %indvars.iv56.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %36 = phi double [ %40, %.epil.preheader ], [ %.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 ]
  %37 = mul nuw nsw i64 %indvars.iv56.epil, %14
  %gep73.epil = getelementptr inbounds double, ptr %invariant.gep72, i64 %37
  %38 = load double, ptr %gep73.epil, align 8, !tbaa !5
  %gep75.epil = getelementptr inbounds double, ptr %invariant.gep74, i64 %indvars.iv56.epil
  %39 = load double, ptr %gep75.epil, align 8, !tbaa !5
  %40 = tail call double @llvm.fmuladd.f64(double %38, double %39, double %36)
  %indvars.iv.next57.epil = add nuw nsw i64 %indvars.iv56.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter81
  br i1 %epil.iter.cmp.not, label %._crit_edge.us.us.us, label %.epil.preheader, !llvm.loop !11

._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 ], [ %40, %.epil.preheader ]
  store double %.lcssa, ptr %gep77, align 8, !tbaa !5
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %._crit_edge42.split.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !13

._crit_edge42.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %14
  br i1 %exitcond70.not, label %._crit_edge, label %.preheader.us.us, !llvm.loop !14

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge42.split.us46
  %indvars.iv51 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next52, %._crit_edge42.split.us46 ]
  %invariant.gep = getelementptr inbounds double, ptr %10, i64 %indvars.iv51
  br i1 %or.cond79, label %vector.body, label %scalar.ph.preheader

vector.body:                                      ; preds = %.preheader.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us ]
  %41 = getelementptr inbounds double, ptr %invariant.gep, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <2 x double> zeroinitializer, ptr %41, align 8, !tbaa !5
  store <2 x double> zeroinitializer, ptr %42, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge42.split.us46, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %44 = mul nuw nsw i64 %indvars.iv.prol, %14
  %gep.prol = getelementptr inbounds double, ptr %invariant.gep, i64 %44
  store double 0.000000e+00, ptr %gep.prol, align 8, !tbaa !5
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !18

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 ]
  %45 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %46 = icmp ugt i64 %45, -4
  br i1 %46, label %._crit_edge42.split.us46, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %47 = mul nuw nsw i64 %indvars.iv, %14
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %47
  store double 0.000000e+00, ptr %gep, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = mul nuw nsw i64 %indvars.iv.next, %14
  %gep.1 = getelementptr inbounds double, ptr %invariant.gep, i64 %48
  store double 0.000000e+00, ptr %gep.1, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %49 = mul nuw nsw i64 %indvars.iv.next.1, %14
  %gep.2 = getelementptr inbounds double, ptr %invariant.gep, i64 %49
  store double 0.000000e+00, ptr %gep.2, align 8, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %50 = mul nuw nsw i64 %indvars.iv.next.2, %14
  %gep.3 = getelementptr inbounds double, ptr %invariant.gep, i64 %50
  store double 0.000000e+00, ptr %gep.3, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge42.split.us46, label %scalar.ph, !llvm.loop !19

._crit_edge42.split.us46:                         ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %14
  br i1 %exitcond55.not, label %._crit_edge, label %.preheader.us, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge42.split.us46, %._crit_edge42.split.us.us.us, %6
  tail call void @r8mat_copy(i32 noundef %0, i32 noundef %2, ptr noundef %10, ptr noundef %5)
  tail call void @free(ptr noundef %10) #5
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(0) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !10, !16}


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