; LLVM IR from ThePhysicsGuys/Physics3D :: tests/estimateMotion.ll (ZN3P3D14estimateMotionERKNS_12GlobalCFrameES2_S2_d)

; 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.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x %"struct.P3D::Fix"] }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Motion" = type { %"struct.P3D::TranslationalMotion", %"struct.P3D::RotationalMotion" }
%"struct.P3D::TranslationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::TaylorExpansion" = type { %"struct.P3D::Derivatives" }
%"struct.P3D::Derivatives" = type { [2 x %"struct.P3D::Vector"] }
%"struct.P3D::RotationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #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
declare dso_local void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72), double noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D6MotionC2ENS_6VectorIdLm3EEES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D14estimateMotionERKNS_12GlobalCFrameES2_S2_d(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(96) %3, double noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca %"struct.P3D::Vector", align 8
  %11 = alloca %"struct.P3D::Vector", align 8
  %12 = alloca %"struct.P3D::Vector.0", align 8
  %13 = alloca %"struct.P3D::PositionTemplate", align 8
  %14 = alloca %"struct.P3D::PositionTemplate", align 8
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = alloca %"struct.P3D::Vector", align 8
  %17 = alloca %"struct.P3D::Vector.0", align 8
  %18 = alloca %"struct.P3D::PositionTemplate", align 8
  %19 = alloca %"struct.P3D::PositionTemplate", align 8
  %20 = alloca %"struct.P3D::Vector", align 8
  %21 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %22 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %23 = alloca %"struct.P3D::Vector", align 8
  %24 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %25 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %26 = alloca %"struct.P3D::Vector", align 8
  %27 = alloca %"struct.P3D::Vector", align 8
  %28 = alloca %"struct.P3D::Vector", align 8
  %29 = alloca %"struct.P3D::Vector", align 8
  %30 = alloca %"struct.P3D::Vector", align 8
  %31 = alloca %"struct.P3D::Vector", align 8
  %32 = alloca %"struct.P3D::Vector", align 8
  %33 = alloca %"struct.P3D::Vector", align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store double %4, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind writable sret(%"struct.P3D::PositionTemplate") align 8 %13, ptr noundef nonnull align 8 dereferenceable(96) %34)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind writable sret(%"struct.P3D::PositionTemplate") align 8 %14, ptr noundef nonnull align 8 dereferenceable(96) %35)
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector.0") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind writable sret(%"struct.P3D::PositionTemplate") align 8 %18, ptr noundef nonnull align 8 dereferenceable(96) %36)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind writable sret(%"struct.P3D::PositionTemplate") align 8 %19, ptr noundef nonnull align 8 dereferenceable(96) %37)
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector.0") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr %21) #6
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %21, ptr noundef nonnull align 8 dereferenceable(96) %38)
  call void @llvm.lifetime.start.p0(i64 72, ptr %22) #6
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %22, ptr noundef nonnull align 8 dereferenceable(96) %39)
  %40 = load double, ptr %9, align 8, !tbaa !9
  call void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %20, ptr noundef nonnull align 8 dereferenceable(72) %21, ptr noundef nonnull align 8 dereferenceable(72) %22, double noundef %40)
  call void @llvm.lifetime.end.p0(i64 72, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr %24) #6
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %24, ptr noundef nonnull align 8 dereferenceable(96) %41)
  call void @llvm.lifetime.start.p0(i64 72, ptr %25) #6
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %25, ptr noundef nonnull align 8 dereferenceable(96) %42)
  %43 = load double, ptr %9, align 8, !tbaa !9
  call void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(72) %24, ptr noundef nonnull align 8 dereferenceable(72) %25, double noundef %43)
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #6
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %27, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #6
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %29, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %28, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %10, i64 24, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %20, i64 24, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %26, i64 24, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %28, i64 24, i1 false), !tbaa.struct !11
  call void @_ZN3P3D6MotionC2ENS_6VectorIdLm3EEES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef byval(%"struct.P3D::Vector") align 8 %30, ptr noundef byval(%"struct.P3D::Vector") align 8 %31, ptr noundef byval(%"struct.P3D::Vector") align 8 %32, ptr noundef byval(%"struct.P3D::Vector") align 8 %33)
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::PositionTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { inlinehint mustprogress 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 = { inlinehint 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 #6 = { 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 = !{!"double", !7, i64 0}
!11 = !{i64 0, i64 24, !12}
!12 = !{!7, !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"

%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x %"struct.P3D::Fix"] }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Motion" = type { %"struct.P3D::TranslationalMotion", %"struct.P3D::RotationalMotion" }
%"struct.P3D::TranslationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::TaylorExpansion" = type { %"struct.P3D::Derivatives" }
%"struct.P3D::Derivatives" = type { [2 x %"struct.P3D::Vector"] }
%"struct.P3D::RotationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }

; 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 nounwind uwtable
declare dso_local void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72), double noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D6MotionC2ENS_6VectorIdLm3EEES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D14estimateMotionERKNS_12GlobalCFrameES2_S2_d(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(96) %3, double noundef %4) local_unnamed_addr #2 {
  %6 = alloca double, align 8
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::Vector.0", align 8
  %10 = alloca %"struct.P3D::PositionTemplate", align 8
  %11 = alloca %"struct.P3D::PositionTemplate", align 8
  %12 = alloca %"struct.P3D::Vector", align 8
  %13 = alloca %"struct.P3D::Vector", align 8
  %14 = alloca %"struct.P3D::Vector.0", align 8
  %15 = alloca %"struct.P3D::PositionTemplate", align 8
  %16 = alloca %"struct.P3D::PositionTemplate", align 8
  %17 = alloca %"struct.P3D::Vector", align 8
  %18 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %19 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %20 = alloca %"struct.P3D::Vector", align 8
  %21 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %22 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %23 = alloca %"struct.P3D::Vector", align 8
  %24 = alloca %"struct.P3D::Vector", align 8
  %25 = alloca %"struct.P3D::Vector", align 8
  %26 = alloca %"struct.P3D::Vector", align 8
  store double %4, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %11, ptr noundef nonnull align 8 dereferenceable(96) %1)
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %15, ptr noundef nonnull align 8 dereferenceable(96) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #5
  call void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %16, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %18) #5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %18, ptr noundef nonnull align 8 dereferenceable(96) %1)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %19) #5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %19, ptr noundef nonnull align 8 dereferenceable(96) %2)
  %27 = load double, ptr %6, align 8, !tbaa !5
  call void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(72) %18, ptr noundef nonnull align 8 dereferenceable(72) %19, double noundef %27)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %21) #5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %21, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %22) #5
  call void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %22, ptr noundef nonnull align 8 dereferenceable(96) %3)
  %28 = load double, ptr %6, align 8, !tbaa !5
  call void @_ZN3P3D17getRotationVelForERKNS_22MatrixRotationTemplateIdEES3_d(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %20, ptr noundef nonnull align 8 dereferenceable(72) %21, ptr noundef nonnull align 8 dereferenceable(72) %22, double noundef %28)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #5
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %24, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #5
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @_ZN3P3DdvIddLm3EEENS_6VectorIDTdvixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %25, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #5
  call void @_ZN3P3D6MotionC2ENS_6VectorIdLm3EEES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %17, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %23, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %25)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame11getPositionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::PositionTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame11getRotationEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #4 align 2

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


; Effective O3 passes: DSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass