; LLVM IR from aap/librw :: src/base.ll (ZN2rw3V3d15transformPointsEPS0_PKS0_iPKNS_6MatrixE)

; 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.rw::V3d" = type { float, float, float }
%"struct.rw::Matrix" = type { %"struct.rw::V3d", i32, %"struct.rw::V3d", i32, %"struct.rw::V3d", i32, %"struct.rw::V3d", i32 }

; 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 float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN2rw3V3d15transformPointsEPS0_PKS0_iPKNS_6MatrixE(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.rw::V3d", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %137, %4
  %12 = load i32, ptr %9, align 4, !tbaa !9
  %13 = load i32, ptr %7, align 4, !tbaa !9
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %140

15:                                               ; preds = %11
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds %"struct.rw::V3d", ptr %16, i64 %18
  %20 = getelementptr inbounds %"struct.rw::V3d", ptr %19, i32 0, i32 0
  %21 = load float, ptr %20, align 4, !tbaa !11
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.rw::Matrix", ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %"struct.rw::V3d", ptr %23, i32 0, i32 0
  %25 = load float, ptr %24, align 4, !tbaa !14
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %"struct.rw::V3d", ptr %26, i64 %28
  %30 = getelementptr inbounds %"struct.rw::V3d", ptr %29, i32 0, i32 1
  %31 = load float, ptr %30, align 4, !tbaa !16
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.rw::Matrix", ptr %32, i32 0, i32 2
  %34 = getelementptr inbounds %"struct.rw::V3d", ptr %33, i32 0, i32 0
  %35 = load float, ptr %34, align 4, !tbaa !17
  %36 = fmul float %31, %35
  %37 = call float @llvm.fmuladd.f32(float %21, float %25, float %36)
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %"struct.rw::V3d", ptr %38, i64 %40
  %42 = getelementptr inbounds %"struct.rw::V3d", ptr %41, i32 0, i32 2
  %43 = load float, ptr %42, align 4, !tbaa !18
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.rw::Matrix", ptr %44, i32 0, i32 4
  %46 = getelementptr inbounds %"struct.rw::V3d", ptr %45, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !19
  %48 = call float @llvm.fmuladd.f32(float %43, float %47, float %37)
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.rw::Matrix", ptr %49, i32 0, i32 6
  %51 = getelementptr inbounds %"struct.rw::V3d", ptr %50, i32 0, i32 0
  %52 = load float, ptr %51, align 4, !tbaa !20
  %53 = fadd float %48, %52
  %54 = getelementptr inbounds %"struct.rw::V3d", ptr %10, i32 0, i32 0
  store float %53, ptr %54, align 4, !tbaa !11
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %"struct.rw::V3d", ptr %55, i64 %57
  %59 = getelementptr inbounds %"struct.rw::V3d", ptr %58, i32 0, i32 0
  %60 = load float, ptr %59, align 4, !tbaa !11
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.rw::Matrix", ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %"struct.rw::V3d", ptr %62, i32 0, i32 1
  %64 = load float, ptr %63, align 4, !tbaa !21
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %"struct.rw::V3d", ptr %65, i64 %67
  %69 = getelementptr inbounds %"struct.rw::V3d", ptr %68, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !16
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.rw::Matrix", ptr %71, i32 0, i32 2
  %73 = getelementptr inbounds %"struct.rw::V3d", ptr %72, i32 0, i32 1
  %74 = load float, ptr %73, align 4, !tbaa !22
  %75 = fmul float %70, %74
  %76 = call float @llvm.fmuladd.f32(float %60, float %64, float %75)
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %"struct.rw::V3d", ptr %77, i64 %79
  %81 = getelementptr inbounds %"struct.rw::V3d", ptr %80, i32 0, i32 2
  %82 = load float, ptr %81, align 4, !tbaa !18
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.rw::Matrix", ptr %83, i32 0, i32 4
  %85 = getelementptr inbounds %"struct.rw::V3d", ptr %84, i32 0, i32 1
  %86 = load float, ptr %85, align 4, !tbaa !23
  %87 = call float @llvm.fmuladd.f32(float %82, float %86, float %76)
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.rw::Matrix", ptr %88, i32 0, i32 6
  %90 = getelementptr inbounds %"struct.rw::V3d", ptr %89, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !24
  %92 = fadd float %87, %91
  %93 = getelementptr inbounds %"struct.rw::V3d", ptr %10, i32 0, i32 1
  store float %92, ptr %93, align 4, !tbaa !16
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %"struct.rw::V3d", ptr %94, i64 %96
  %98 = getelementptr inbounds %"struct.rw::V3d", ptr %97, i32 0, i32 0
  %99 = load float, ptr %98, align 4, !tbaa !11
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.rw::Matrix", ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds %"struct.rw::V3d", ptr %101, i32 0, i32 2
  %103 = load float, ptr %102, align 4, !tbaa !25
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds %"struct.rw::V3d", ptr %104, i64 %106
  %108 = getelementptr inbounds %"struct.rw::V3d", ptr %107, i32 0, i32 1
  %109 = load float, ptr %108, align 4, !tbaa !16
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.rw::Matrix", ptr %110, i32 0, i32 2
  %112 = getelementptr inbounds %"struct.rw::V3d", ptr %111, i32 0, i32 2
  %113 = load float, ptr %112, align 4, !tbaa !26
  %114 = fmul float %109, %113
  %115 = call float @llvm.fmuladd.f32(float %99, float %103, float %114)
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load i32, ptr %9, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %"struct.rw::V3d", ptr %116, i64 %118
  %120 = getelementptr inbounds %"struct.rw::V3d", ptr %119, i32 0, i32 2
  %121 = load float, ptr %120, align 4, !tbaa !18
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.rw::Matrix", ptr %122, i32 0, i32 4
  %124 = getelementptr inbounds %"struct.rw::V3d", ptr %123, i32 0, i32 2
  %125 = load float, ptr %124, align 4, !tbaa !27
  %126 = call float @llvm.fmuladd.f32(float %121, float %125, float %115)
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.rw::Matrix", ptr %127, i32 0, i32 6
  %129 = getelementptr inbounds %"struct.rw::V3d", ptr %128, i32 0, i32 2
  %130 = load float, ptr %129, align 4, !tbaa !28
  %131 = fadd float %126, %130
  %132 = getelementptr inbounds %"struct.rw::V3d", ptr %10, i32 0, i32 2
  store float %131, ptr %132, align 4, !tbaa !18
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds %"struct.rw::V3d", ptr %133, i64 %135
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %136, ptr align 4 %10, i64 12, i1 false), !tbaa.struct !29
  br label %137

137:                                              ; preds = %15
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %9, align 4, !tbaa !9
  br label %11, !llvm.loop !31

140:                                              ; preds = %11
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN2rw3V3dE", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTSN2rw6MatrixE", !12, i64 0, !10, i64 12, !12, i64 16, !10, i64 28, !12, i64 32, !10, i64 44, !12, i64 48, !10, i64 60}
!16 = !{!12, !13, i64 4}
!17 = !{!15, !13, i64 16}
!18 = !{!12, !13, i64 8}
!19 = !{!15, !13, i64 32}
!20 = !{!15, !13, i64 48}
!21 = !{!15, !13, i64 4}
!22 = !{!15, !13, i64 20}
!23 = !{!15, !13, i64 36}
!24 = !{!15, !13, i64 52}
!25 = !{!15, !13, i64 8}
!26 = !{!15, !13, i64 24}
!27 = !{!15, !13, i64 40}
!28 = !{!15, !13, i64 56}
!29 = !{i64 0, i64 4, !30, i64 4, i64 4, !30, i64 8, i64 4, !30}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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

%"struct.rw::V3d" = type { float, float, float }

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

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @_ZN2rw3V3d15transformPointsEPS0_PKS0_iPKNS_6MatrixE(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #1 align 2 {
  %5 = icmp sgt i32 %2, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %6 = getelementptr inbounds i8, ptr %3, i64 16
  %7 = getelementptr inbounds i8, ptr %3, i64 32
  %8 = getelementptr inbounds i8, ptr %3, i64 48
  %9 = getelementptr inbounds i8, ptr %3, i64 4
  %10 = getelementptr inbounds i8, ptr %3, i64 20
  %11 = getelementptr inbounds i8, ptr %3, i64 36
  %12 = getelementptr inbounds i8, ptr %3, i64 52
  %13 = getelementptr inbounds i8, ptr %3, i64 8
  %14 = getelementptr inbounds i8, ptr %3, i64 24
  %15 = getelementptr inbounds i8, ptr %3, i64 40
  %16 = getelementptr inbounds i8, ptr %3, i64 56
  %wide.trip.count = zext nneg i32 %2 to i64
  %min.iters.check = icmp ult i32 %2, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %17 = mul nuw nsw i64 %wide.trip.count, 12
  %scevgep = getelementptr i8, ptr %0, i64 %17
  %scevgep36 = getelementptr i8, ptr %1, i64 %17
  %scevgep37 = getelementptr i8, ptr %3, i64 60
  %bound0 = icmp ugt ptr %scevgep36, %0
  %bound1 = icmp ugt ptr %scevgep, %1
  %found.conflict = and i1 %bound0, %bound1
  %bound038 = icmp ugt ptr %scevgep37, %0
  %bound139 = icmp ugt ptr %scevgep, %3
  %found.conflict40 = and i1 %bound038, %bound139
  %conflict.rdx = or i1 %found.conflict, %found.conflict40
  br i1 %conflict.rdx, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %18 = or disjoint i64 %index, 1
  %19 = or disjoint i64 %index, 2
  %20 = or disjoint i64 %index, 3
  %21 = getelementptr inbounds %"struct.rw::V3d", ptr %1, i64 %index
  %22 = getelementptr inbounds %"struct.rw::V3d", ptr %1, i64 %18
  %23 = getelementptr inbounds %"struct.rw::V3d", ptr %1, i64 %19
  %24 = getelementptr inbounds %"struct.rw::V3d", ptr %1, i64 %20
  %25 = load float, ptr %21, align 4, !tbaa !5, !alias.scope !10
  %26 = load float, ptr %22, align 4, !tbaa !5, !alias.scope !10
  %27 = load float, ptr %23, align 4, !tbaa !5, !alias.scope !10
  %28 = load float, ptr %24, align 4, !tbaa !5, !alias.scope !10
  %29 = insertelement <4 x float> poison, float %25, i64 0
  %30 = insertelement <4 x float> %29, float %26, i64 1
  %31 = insertelement <4 x float> %30, float %27, i64 2
  %32 = insertelement <4 x float> %31, float %28, i64 3
  %33 = load float, ptr %3, align 4, !tbaa !13, !alias.scope !16
  %broadcast.splatinsert41 = insertelement <4 x float> poison, float %33, i64 0
  %broadcast.splat42 = shufflevector <4 x float> %broadcast.splatinsert41, <4 x float> poison, <4 x i32> zeroinitializer
  %34 = getelementptr inbounds i8, ptr %21, i64 4
  %35 = getelementptr inbounds i8, ptr %22, i64 4
  %36 = getelementptr inbounds i8, ptr %23, i64 4
  %37 = getelementptr inbounds i8, ptr %24, i64 4
  %38 = load float, ptr %34, align 4, !tbaa !18, !alias.scope !10
  %39 = load float, ptr %35, align 4, !tbaa !18, !alias.scope !10
  %40 = load float, ptr %36, align 4, !tbaa !18, !alias.scope !10
  %41 = load float, ptr %37, align 4, !tbaa !18, !alias.scope !10
  %42 = insertelement <4 x float> poison, float %38, i64 0
  %43 = insertelement <4 x float> %42, float %39, i64 1
  %44 = insertelement <4 x float> %43, float %40, i64 2
  %45 = insertelement <4 x float> %44, float %41, i64 3
  %46 = load float, ptr %6, align 4, !tbaa !19, !alias.scope !16
  %broadcast.splatinsert = insertelement <4 x float> poison, float %46, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %47 = fmul <4 x float> %45, %broadcast.splat
  %48 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %32, <4 x float> %broadcast.splat42, <4 x float> %47)
  %49 = getelementptr inbounds i8, ptr %21, i64 8
  %50 = getelementptr inbounds i8, ptr %22, i64 8
  %51 = getelementptr inbounds i8, ptr %23, i64 8
  %52 = getelementptr inbounds i8, ptr %24, i64 8
  %53 = load float, ptr %49, align 4, !tbaa !20, !alias.scope !10
  %54 = load float, ptr %50, align 4, !tbaa !20, !alias.scope !10
  %55 = load float, ptr %51, align 4, !tbaa !20, !alias.scope !10
  %56 = load float, ptr %52, align 4, !tbaa !20, !alias.scope !10
  %57 = insertelement <4 x float> poison, float %53, i64 0
  %58 = insertelement <4 x float> %57, float %54, i64 1
  %59 = insertelement <4 x float> %58, float %55, i64 2
  %60 = insertelement <4 x float> %59, float %56, i64 3
  %61 = load float, ptr %7, align 4, !tbaa !21, !alias.scope !16
  %broadcast.splatinsert43 = insertelement <4 x float> poison, float %61, i64 0
  %broadcast.splat44 = shufflevector <4 x float> %broadcast.splatinsert43, <4 x float> poison, <4 x i32> zeroinitializer
  %62 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %60, <4 x float> %broadcast.splat44, <4 x float> %48)
  %63 = load float, ptr %8, align 4, !tbaa !22, !alias.scope !16
  %broadcast.splatinsert45 = insertelement <4 x float> poison, float %63, i64 0
  %broadcast.splat46 = shufflevector <4 x float> %broadcast.splatinsert45, <4 x float> poison, <4 x i32> zeroinitializer
  %64 = fadd <4 x float> %62, %broadcast.splat46
  %65 = load float, ptr %9, align 4, !tbaa !23, !alias.scope !16
  %broadcast.splatinsert49 = insertelement <4 x float> poison, float %65, i64 0
  %broadcast.splat50 = shufflevector <4 x float> %broadcast.splatinsert49, <4 x float> poison, <4 x i32> zeroinitializer
  %66 = load float, ptr %10, align 4, !tbaa !24, !alias.scope !16
  %broadcast.splatinsert47 = insertelement <4 x float> poison, float %66, i64 0
  %broadcast.splat48 = shufflevector <4 x float> %broadcast.splatinsert47, <4 x float> poison, <4 x i32> zeroinitializer
  %67 = fmul <4 x float> %45, %broadcast.splat48
  %68 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %32, <4 x float> %broadcast.splat50, <4 x float> %67)
  %69 = load float, ptr %11, align 4, !tbaa !25, !alias.scope !16
  %broadcast.splatinsert51 = insertelement <4 x float> poison, float %69, i64 0
  %broadcast.splat52 = shufflevector <4 x float> %broadcast.splatinsert51, <4 x float> poison, <4 x i32> zeroinitializer
  %70 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %60, <4 x float> %broadcast.splat52, <4 x float> %68)
  %71 = load float, ptr %12, align 4, !tbaa !26, !alias.scope !16
  %broadcast.splatinsert53 = insertelement <4 x float> poison, float %71, i64 0
  %broadcast.splat54 = shufflevector <4 x float> %broadcast.splatinsert53, <4 x float> poison, <4 x i32> zeroinitializer
  %72 = fadd <4 x float> %broadcast.splat54, %70
  %73 = load float, ptr %13, align 4, !tbaa !27, !alias.scope !16
  %broadcast.splatinsert57 = insertelement <4 x float> poison, float %73, i64 0
  %broadcast.splat58 = shufflevector <4 x float> %broadcast.splatinsert57, <4 x float> poison, <4 x i32> zeroinitializer
  %74 = load float, ptr %14, align 4, !tbaa !28, !alias.scope !16
  %broadcast.splatinsert55 = insertelement <4 x float> poison, float %74, i64 0
  %broadcast.splat56 = shufflevector <4 x float> %broadcast.splatinsert55, <4 x float> poison, <4 x i32> zeroinitializer
  %75 = fmul <4 x float> %45, %broadcast.splat56
  %76 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %32, <4 x float> %broadcast.splat58, <4 x float> %75)
  %77 = load float, ptr %15, align 4, !tbaa !29, !alias.scope !16
  %broadcast.splatinsert59 = insertelement <4 x float> poison, float %77, i64 0
  %broadcast.splat60 = shufflevector <4 x float> %broadcast.splatinsert59, <4 x float> poison, <4 x i32> zeroinitializer
  %78 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %60, <4 x float> %broadcast.splat60, <4 x float> %76)
  %79 = load float, ptr %16, align 4, !tbaa !30, !alias.scope !16
  %broadcast.splatinsert61 = insertelement <4 x float> poison, float %79, i64 0
  %broadcast.splat62 = shufflevector <4 x float> %broadcast.splatinsert61, <4 x float> poison, <4 x i32> zeroinitializer
  %80 = fadd <4 x float> %broadcast.splat62, %78
  %81 = getelementptr inbounds %"struct.rw::V3d", ptr %0, i64 %index
  %82 = shufflevector <4 x float> %64, <4 x float> %72, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %83 = shufflevector <4 x float> %80, <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>
  %interleaved.vec = shufflevector <8 x float> %82, <8 x float> %83, <12 x i32> <i32 0, i32 4, i32 8, i32 1, i32 5, i32 9, i32 2, i32 6, i32 10, i32 3, i32 7, i32 11>
  store <12 x float> %interleaved.vec, ptr %81, align 4, !tbaa !31
  %index.next = add nuw i64 %index, 4
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !32

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 ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %85 = getelementptr inbounds %"struct.rw::V3d", ptr %1, i64 %indvars.iv
  %86 = load float, ptr %85, align 4, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %85, i64 4
  %88 = load float, ptr %87, align 4, !tbaa !18
  %89 = getelementptr inbounds i8, ptr %85, i64 8
  %90 = load float, ptr %89, align 4, !tbaa !20
  %91 = load float, ptr %13, align 4, !tbaa !27
  %92 = load float, ptr %14, align 4, !tbaa !28
  %93 = fmul float %88, %92
  %94 = tail call float @llvm.fmuladd.f32(float %86, float %91, float %93)
  %95 = load float, ptr %15, align 4, !tbaa !29
  %96 = tail call float @llvm.fmuladd.f32(float %90, float %95, float %94)
  %97 = load float, ptr %16, align 4, !tbaa !30
  %98 = fadd float %97, %96
  %99 = getelementptr inbounds %"struct.rw::V3d", ptr %0, i64 %indvars.iv
  %100 = load <2 x float>, ptr %3, align 4, !tbaa !31
  %101 = load <2 x float>, ptr %6, align 4, !tbaa !31
  %102 = insertelement <2 x float> poison, float %88, i64 0
  %103 = shufflevector <2 x float> %102, <2 x float> poison, <2 x i32> zeroinitializer
  %104 = fmul <2 x float> %103, %101
  %105 = insertelement <2 x float> poison, float %86, i64 0
  %106 = shufflevector <2 x float> %105, <2 x float> poison, <2 x i32> zeroinitializer
  %107 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %106, <2 x float> %100, <2 x float> %104)
  %108 = load <2 x float>, ptr %7, align 4, !tbaa !31
  %109 = insertelement <2 x float> poison, float %90, i64 0
  %110 = shufflevector <2 x float> %109, <2 x float> poison, <2 x i32> zeroinitializer
  %111 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %110, <2 x float> %108, <2 x float> %107)
  %112 = load <2 x float>, ptr %8, align 4, !tbaa !31
  %113 = fadd <2 x float> %111, %112
  store <2 x float> %113, ptr %99, align 4, !tbaa !31
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %99, i64 8
  store float %98, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !31
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !36

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN2rw3V3dE", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11}
!11 = distinct !{!11, !12}
!12 = distinct !{!12, !"LVerDomain"}
!13 = !{!14, !7, i64 0}
!14 = !{!"_ZTSN2rw6MatrixE", !6, i64 0, !15, i64 12, !6, i64 16, !15, i64 28, !6, i64 32, !15, i64 44, !6, i64 48, !15, i64 60}
!15 = !{!"int", !8, i64 0}
!16 = !{!17}
!17 = distinct !{!17, !12}
!18 = !{!6, !7, i64 4}
!19 = !{!14, !7, i64 16}
!20 = !{!6, !7, i64 8}
!21 = !{!14, !7, i64 32}
!22 = !{!14, !7, i64 48}
!23 = !{!14, !7, i64 4}
!24 = !{!14, !7, i64 20}
!25 = !{!14, !7, i64 36}
!26 = !{!14, !7, i64 52}
!27 = !{!14, !7, i64 8}
!28 = !{!14, !7, i64 24}
!29 = !{!14, !7, i64 40}
!30 = !{!14, !7, i64 56}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33, !34, !35}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = distinct !{!36, !33, !34}


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