; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/trianglemesh.ll (ZN12TriangleMesh24_getSignedTriangleVolumeEj)

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

%"class.vmath::vec3" = type { float, float, float }
%class.TriangleMesh = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.0", i32, i32, i32, double, %"class.std::vector.5", %"class.std::vector.10", %class.Array3d }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [7 x i8], %"class.std::vector.15", i32, [4 x i8] }>
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Triangle = type { [3 x 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN12TriangleMesh24_getSignedTriangleVolumeEj(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = alloca %"class.vmath::vec3", align 4
  %7 = alloca %"class.vmath::vec3", align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #4
  %15 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 0
  %16 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 3
  %17 = load i32, ptr %4, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %18) #4
  %20 = getelementptr inbounds %struct.Triangle, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds [3 x i32], ptr %20, i64 0, i64 0
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %23) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #4
  %25 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 0
  %26 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 3
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %28) #4
  %30 = getelementptr inbounds %struct.Triangle, ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds [3 x i32], ptr %30, i64 0, i64 1
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %33) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %34, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #4
  %35 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 0
  %36 = getelementptr inbounds %class.TriangleMesh, ptr %14, i32 0, i32 3
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #4
  %40 = getelementptr inbounds %struct.Triangle, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds [3 x i32], ptr %40, i64 0, i64 2
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %43) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %44, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %45 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 0
  %46 = load float, ptr %45, align 4, !tbaa !14
  %47 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 1
  %48 = load float, ptr %47, align 4, !tbaa !16
  %49 = fmul float %46, %48
  %50 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 2
  %51 = load float, ptr %50, align 4, !tbaa !17
  %52 = fmul float %49, %51
  %53 = fpext float %52 to double
  store double %53, ptr %8, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %54 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 0
  %55 = load float, ptr %54, align 4, !tbaa !14
  %56 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 1
  %57 = load float, ptr %56, align 4, !tbaa !16
  %58 = fmul float %55, %57
  %59 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 2
  %60 = load float, ptr %59, align 4, !tbaa !17
  %61 = fmul float %58, %60
  %62 = fpext float %61 to double
  store double %62, ptr %9, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %63 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 0
  %64 = load float, ptr %63, align 4, !tbaa !14
  %65 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !16
  %67 = fmul float %64, %66
  %68 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 2
  %69 = load float, ptr %68, align 4, !tbaa !17
  %70 = fmul float %67, %69
  %71 = fpext float %70 to double
  store double %71, ptr %10, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %72 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 0
  %73 = load float, ptr %72, align 4, !tbaa !14
  %74 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 1
  %75 = load float, ptr %74, align 4, !tbaa !16
  %76 = fmul float %73, %75
  %77 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 2
  %78 = load float, ptr %77, align 4, !tbaa !17
  %79 = fmul float %76, %78
  %80 = fpext float %79 to double
  store double %80, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %81 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 0
  %82 = load float, ptr %81, align 4, !tbaa !14
  %83 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 1
  %84 = load float, ptr %83, align 4, !tbaa !16
  %85 = fmul float %82, %84
  %86 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 2
  %87 = load float, ptr %86, align 4, !tbaa !17
  %88 = fmul float %85, %87
  %89 = fpext float %88 to double
  store double %89, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %90 = getelementptr inbounds %"class.vmath::vec3", ptr %5, i32 0, i32 0
  %91 = load float, ptr %90, align 4, !tbaa !14
  %92 = getelementptr inbounds %"class.vmath::vec3", ptr %6, i32 0, i32 1
  %93 = load float, ptr %92, align 4, !tbaa !16
  %94 = fmul float %91, %93
  %95 = getelementptr inbounds %"class.vmath::vec3", ptr %7, i32 0, i32 2
  %96 = load float, ptr %95, align 4, !tbaa !17
  %97 = fmul float %94, %96
  %98 = fpext float %97 to double
  store double %98, ptr %13, align 8, !tbaa !18
  %99 = load double, ptr %8, align 8, !tbaa !18
  %100 = fneg double %99
  %101 = load double, ptr %9, align 8, !tbaa !18
  %102 = fadd double %100, %101
  %103 = load double, ptr %10, align 8, !tbaa !18
  %104 = fadd double %102, %103
  %105 = load double, ptr %11, align 8, !tbaa !18
  %106 = fsub double %104, %105
  %107 = load double, ptr %12, align 8, !tbaa !18
  %108 = fsub double %106, %107
  %109 = load double, ptr %13, align 8, !tbaa !18
  %110 = fadd double %108, %109
  %111 = fmul double 0x3FC5555555555555, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #4
  ret double %111
}

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

!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 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!16 = !{!15, !13, i64 4}
!17 = !{!15, !13, i64 8}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}


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

%"class.vmath::vec3" = type { float, float, float }

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

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

; Function Attrs: mustprogress 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) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN12TriangleMesh24_getSignedTriangleVolumeEj(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %"class.vmath::vec3", align 4
  %4 = alloca %"class.vmath::vec3", align 8
  %5 = alloca %"class.vmath::vec3", align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #4
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  %7 = zext i32 %1 to i64
  %8 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %7) #4
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %10) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #4
  %12 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %7) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %15) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %16, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  %17 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %7) #4
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %20) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !9
  %22 = getelementptr inbounds i8, ptr %3, i64 8
  %23 = load float, ptr %22, align 4, !tbaa !12
  %24 = load <2 x float>, ptr %4, align 8, !tbaa !10
  %25 = load <2 x float>, ptr %5, align 8, !tbaa !10
  %26 = shufflevector <2 x float> %25, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %27 = fmul <2 x float> %26, %24
  %28 = insertelement <2 x float> poison, float %23, i64 0
  %29 = shufflevector <2 x float> %28, <2 x float> poison, <2 x i32> zeroinitializer
  %30 = fmul <2 x float> %29, %27
  %31 = fpext <2 x float> %30 to <2 x double>
  %32 = getelementptr inbounds i8, ptr %3, i64 4
  %33 = load float, ptr %32, align 4, !tbaa !14
  %34 = extractelement <2 x float> %25, i64 0
  %35 = fmul float %34, %33
  %36 = getelementptr inbounds i8, ptr %4, i64 8
  %37 = load float, ptr %36, align 8, !tbaa !12
  %38 = fmul float %35, %37
  %39 = fpext float %38 to double
  %40 = load float, ptr %3, align 4, !tbaa !15
  %41 = extractelement <2 x float> %25, i64 1
  %42 = fmul float %41, %40
  %43 = fmul float %37, %42
  %44 = fpext float %43 to double
  %45 = extractelement <2 x float> %24, i64 0
  %46 = fmul float %45, %33
  %47 = getelementptr inbounds i8, ptr %5, i64 8
  %48 = load float, ptr %47, align 8, !tbaa !12
  %49 = fmul float %46, %48
  %50 = fpext float %49 to double
  %51 = extractelement <2 x float> %24, i64 1
  %52 = fmul float %51, %40
  %53 = fmul float %52, %48
  %54 = fpext float %53 to double
  %shift = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %55 = fsub <2 x double> %31, %shift
  %56 = extractelement <2 x double> %55, i64 0
  %57 = fadd double %56, %39
  %58 = fsub double %57, %44
  %59 = fsub double %58, %50
  %60 = fadd double %59, %54
  %61 = fmul double %60, 0x3FC5555555555555
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %3) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #4
  ret double %61
}

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

!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++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !11, i64 8}
!13 = !{!"_ZTSN5vmath4vec3E", !11, i64 0, !11, i64 4, !11, i64 8}
!14 = !{!13, !11, i64 4}
!15 = !{!13, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass,VectorCombinePass