; 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.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_preMulDiagSelf = external hidden unnamed_addr constant [21 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [12 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: noreturn nounwind
declare void @abort() #2

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_preMulDiagSelf(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct._MatNd, ptr %10, i32 0, i32 1
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._MatNd, ptr %13, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = icmp eq i32 %12, %15
  br i1 %16, label %41, label %17

17:                                               ; preds = %9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._MatNd, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %41, label %22

22:                                               ; preds = %17
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_preMulDiagSelf, i32 noundef 3618, ptr noundef @.str.218) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = load ptr, ptr %3, 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 %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._MatNd, ptr %29, i32 0, i32 2
  %31 = load i32, ptr %30, align 4, !tbaa !13
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._MatNd, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._MatNd, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.219, i32 noundef %28, i32 noundef %31, i32 noundef %34, i32 noundef %37) #5
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

41:                                               ; preds = %17, %9
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._MatNd, ptr %45, i32 0, i32 2
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %52, label %49

49:                                               ; preds = %44
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_preMulDiagSelf, i32 noundef 3619, ptr noundef @.str.220) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

52:                                               ; preds = %44
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._MatNd, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !9
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %59, label %66

59:                                               ; preds = %54
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._MatNd, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = getelementptr inbounds double, ptr %63, i64 0
  %65 = load double, ptr %64, align 8, !tbaa !15
  call void @MatNd_constMulSelf(ptr noundef %60, double noundef %65)
  store i32 1, ptr %7, align 4
  br label %105

66:                                               ; preds = %54
  store i32 0, ptr %5, align 4, !tbaa !17
  br label %67

67:                                               ; preds = %101, %66
  %68 = load i32, ptr %5, align 4, !tbaa !17
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._MatNd, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !9
  %72 = icmp ult i32 %68, %71
  br i1 %72, label %73, label %104

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = load i32, ptr %5, align 4, !tbaa !17
  %76 = call ptr @MatNd_getRowPtr(ptr noundef %74, i32 noundef %75)
  store ptr %76, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %77

77:                                               ; preds = %97, %73
  %78 = load i32, ptr %6, align 4, !tbaa !17
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._MatNd, ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 4, !tbaa !13
  %82 = icmp ult i32 %78, %81
  br i1 %82, label %83, label %100

83:                                               ; preds = %77
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._MatNd, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %87 = load i32, ptr %5, align 4, !tbaa !17
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %86, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !15
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !17
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !15
  %96 = fmul double %95, %90
  store double %96, ptr %94, align 8, !tbaa !15
  br label %97

97:                                               ; preds = %83
  %98 = load i32, ptr %6, align 4, !tbaa !17
  %99 = add i32 %98, 1
  store i32 %99, ptr %6, align 4, !tbaa !17
  br label %77, !llvm.loop !18

100:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %5, align 4, !tbaa !17
  %103 = add i32 %102, 1
  store i32 %103, ptr %5, align 4, !tbaa !17
  br label %67, !llvm.loop !20

104:                                              ; preds = %67
  store i32 0, ptr %7, align 4
  br label %105

105:                                              ; preds = %104, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %106 = load i32, ptr %7, align 4
  switch i32 %106, label %108 [
    i32 0, label %107
    i32 1, label %107
  ]

107:                                              ; preds = %105, %105
  ret void

108:                                              ; preds = %105
  unreachable
}

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

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 = { 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 = { 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 = !{!10, !11, i64 12}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !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.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_preMulDiagSelf = external hidden unnamed_addr constant [21 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [12 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: noreturn nounwind
declare void @abort() local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_preMulDiagSelf(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %4, %6
  %8 = icmp eq i32 %6, 1
  %or.cond = or i1 %7, %8
  br i1 %or.cond, label %22, label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr @stderr, align 8, !tbaa !12
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_preMulDiagSelf, i32 noundef 3618, ptr noundef nonnull @.str.218) #4
  %12 = load ptr, ptr @stderr, align 8, !tbaa !12
  %13 = load i32, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !13
  %16 = load i32, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !13
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.219, i32 noundef %13, i32 noundef %15, i32 noundef %16, i32 noundef %18) #4
  %20 = load ptr, ptr @stderr, align 8, !tbaa !12
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %1, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %29, label %26

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !12
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_preMulDiagSelf, i32 noundef 3619, ptr noundef nonnull @.str.220) #4
  tail call void @print_trace() #5
  tail call void @abort() #6
  unreachable

29:                                               ; preds = %22
  br i1 %8, label %31, label %.preheader

.preheader:                                       ; preds = %29
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.loopexit, label %.lr.ph26

.lr.ph26:                                         ; preds = %.preheader
  %30 = getelementptr inbounds i8, ptr %0, i64 12
  br label %34

31:                                               ; preds = %29
  %32 = load ptr, ptr %1, align 8, !tbaa !14
  %33 = load double, ptr %32, align 8, !tbaa !15
  tail call void @MatNd_constMulSelf(ptr noundef nonnull %0, double noundef %33)
  br label %.loopexit

34:                                               ; preds = %.lr.ph26, %._crit_edge
  %indvars.iv29 = phi i64 [ 0, %.lr.ph26 ], [ %indvars.iv.next30, %._crit_edge ]
  %35 = shl nuw nsw i64 %indvars.iv29, 3
  %36 = trunc nuw i64 %indvars.iv29 to i32
  %37 = tail call ptr @MatNd_getRowPtr(ptr noundef nonnull %0, i32 noundef %36)
  %38 = load i32, ptr %30, align 4, !tbaa !13
  %.not27 = icmp eq i32 %38, 0
  br i1 %.not27, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %34
  %39 = load ptr, ptr %1, align 8, !tbaa !14
  %40 = getelementptr inbounds double, ptr %39, i64 %indvars.iv29
  %wide.trip.count = zext i32 %38 to i64
  %min.iters.check = icmp ult i32 %38, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %41 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %37, i64 %41
  %42 = getelementptr i8, ptr %39, i64 %35
  %scevgep32 = getelementptr i8, ptr %42, i64 8
  %bound0 = icmp ult ptr %37, %scevgep32
  %bound1 = icmp ult ptr %40, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967292
  %43 = load double, ptr %40, align 8, !tbaa !15, !alias.scope !17
  %broadcast.splatinsert34 = insertelement <2 x double> poison, double %43, i64 0
  %broadcast.splat35 = shufflevector <2 x double> %broadcast.splatinsert34, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %44 = getelementptr inbounds double, ptr %37, i64 %index
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load = load <2 x double>, ptr %44, align 8, !tbaa !15, !alias.scope !20, !noalias !17
  %wide.load33 = load <2 x double>, ptr %45, align 8, !tbaa !15, !alias.scope !20, !noalias !17
  %46 = fmul <2 x double> %broadcast.splat35, %wide.load
  %47 = fmul <2 x double> %broadcast.splat35, %wide.load33
  store <2 x double> %46, ptr %44, align 8, !tbaa !15, !alias.scope !20, !noalias !17
  store <2 x double> %47, ptr %45, align 8, !tbaa !15, !alias.scope !20, !noalias !17
  %index.next = add nuw i64 %index, 4
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  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 ]
  %49 = load double, ptr %40, align 8, !tbaa !15
  %50 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.prol
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = fmul double %49, %51
  store double %52, ptr %50, align 8, !tbaa !15
  %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 !26

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 ]
  %53 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %54 = icmp ugt i64 %53, -4
  br i1 %54, label %._crit_edge, label %scalar.ph.preheader.new

scalar.ph.preheader.new:                          ; preds = %scalar.ph.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %37, i64 8
  %invariant.gep36 = getelementptr i8, ptr %37, i64 16
  %invariant.gep38 = getelementptr i8, ptr %37, i64 24
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader.new
  %indvars.iv = phi i64 [ %indvars.iv.unr, %scalar.ph.preheader.new ], [ %indvars.iv.next.3, %scalar.ph ]
  %55 = load double, ptr %40, align 8, !tbaa !15
  %56 = getelementptr inbounds double, ptr %37, i64 %indvars.iv
  %57 = load double, ptr %56, align 8, !tbaa !15
  %58 = fmul double %55, %57
  store double %58, ptr %56, align 8, !tbaa !15
  %59 = load double, ptr %40, align 8, !tbaa !15
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv
  %60 = load double, ptr %gep, align 8, !tbaa !15
  %61 = fmul double %59, %60
  store double %61, ptr %gep, align 8, !tbaa !15
  %62 = load double, ptr %40, align 8, !tbaa !15
  %gep37 = getelementptr double, ptr %invariant.gep36, i64 %indvars.iv
  %63 = load double, ptr %gep37, align 8, !tbaa !15
  %64 = fmul double %62, %63
  store double %64, ptr %gep37, align 8, !tbaa !15
  %65 = load double, ptr %40, align 8, !tbaa !15
  %gep39 = getelementptr double, ptr %invariant.gep38, i64 %indvars.iv
  %66 = load double, ptr %gep39, align 8, !tbaa !15
  %67 = fmul double %65, %66
  store double %67, ptr %gep39, align 8, !tbaa !15
  %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_edge, label %scalar.ph, !llvm.loop !28

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %34
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %68 = load i32, ptr %3, align 8, !tbaa !5
  %69 = zext i32 %68 to i64
  %70 = icmp ult i64 %indvars.iv.next30, %69
  br i1 %70, label %34, label %.loopexit, !llvm.loop !29

.loopexit:                                        ; preds = %._crit_edge, %.preheader, %31
  ret void
}

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

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 = { 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 = { cold nounwind }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 12}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{!18}
!18 = distinct !{!18, !19}
!19 = distinct !{!19, !"LVerDomain"}
!20 = !{!21}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.unroll.disable"}
!28 = distinct !{!28, !23, !24}
!29 = distinct !{!29, !23}


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