; LLVM IR from atlantis13579/Riemann :: Src/RigidBodyDynamics/KinematicsTree.ll (ZN7Riemann14KinematicsTree8SimulateEf)

; 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.Maths::TVector3" = type { float, float, float }
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.Riemann::KinematicsTree" = type { %"class.Riemann::KinematicsDriver", float, i8, %"class.std::__cxx11::basic_string", %"class.std::vector" }
%"class.Riemann::KinematicsDriver" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::KeyframeKinematics" = type <{ %"class.Riemann::RigidBodyKinematics.base", [6 x i8], %"class.Riemann::KeyFrameAnimation", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.Riemann::RigidBodyKinematics.base" = type { %"class.Riemann::RigidBody.base" }
%"class.Riemann::RigidBody.base" = type <{ ptr, %"class.std::vector.3", i8, [7 x i8], i64, %"class.Maths::TVector3", %"class.Maths::Quaternion", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, %"class.Maths::Matrix3", i16 }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Riemann::KeyFrameAnimation" = type <{ %"struct.Riemann::Timeline", %"struct.Riemann::Timeline.8", %"class.std::vector.9", %"class.std::vector.14", i8, [7 x i8] }>
%"struct.Riemann::Timeline" = type { float, i32, i8 }
%"struct.Riemann::Timeline.8" = type { float, i32, i8 }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::RigidBody" = type <{ ptr, %"class.std::vector.3", i8, [7 x i8], i64, %"class.Maths::TVector3", %"class.Maths::Quaternion", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, %"class.Maths::Matrix3", i16, [6 x i8] }>

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann14KinematicsTree8SimulateEf(ptr noundef nonnull align 8 dereferenceable(104) %0, float noundef %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.Maths::TVector3", align 4
  %10 = alloca %"class.Maths::Quaternion", align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::Quaternion", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8
  %15 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 2
  %16 = load i8, ptr %15, align 4, !tbaa !11, !range !22, !noundef !23
  %17 = trunc i8 %16 to i1
  br i1 %17, label %21, label %18

18:                                               ; preds = %2
  %19 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 4
  %20 = call noundef zeroext i1 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br i1 %20, label %21, label %22

21:                                               ; preds = %18, %2
  br label %74

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %23 = load float, ptr %4, align 4, !tbaa !9
  %24 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 1
  %25 = load float, ptr %24, align 8, !tbaa !24
  %26 = fmul float %23, %25
  store float %26, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 1, ptr %6, align 8, !tbaa !25
  br label %27

27:                                               ; preds = %70, %22
  %28 = load i64, ptr %6, align 8, !tbaa !25
  %29 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 4
  %30 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = icmp ult i64 %28, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %73

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %34 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 4
  %35 = load i64, ptr %6, align 8, !tbaa !25
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %35) #6
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %38 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %14, i32 0, i32 4
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.Riemann::KeyframeKinematics", ptr %39, i32 0, i32 4
  %41 = load i32, ptr %40, align 8, !tbaa !26
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %42) #6
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  store ptr %44, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  call void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @_ZN5Maths10Quaternion3OneEv(ptr dead_on_unwind writable sret(%"class.Maths::Quaternion") align 4 %10)
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.Riemann::KeyframeKinematics", ptr %45, i32 0, i32 2
  %47 = load float, ptr %5, align 4, !tbaa !9
  %48 = call noundef zeroext i1 @_ZN7Riemann17KeyFrameAnimation7AdvanceEfPN5Maths8TVector3IfEEPNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(73) %46, float noundef %47, ptr noundef %9, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %49, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %51, i32 0, i32 6
  call void @_ZNK5Maths10QuaternionmlERKNS_8TVector3IfEE(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %53, i32 0, i32 5
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %56, i32 0, i32 6
  call void @_ZNK5Maths10QuaternionmlERKS0_(ptr dead_on_unwind writable sret(%"class.Maths::Quaternion") align 4 %13, ptr noundef nonnull align 4 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(16) %10)
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %58, i32 0, i32 6
  %60 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %69

63:                                               ; preds = %33
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %65, i32 0, i32 5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %67, i32 0, i32 6
  call void @_ZN7Riemann19RigidBodyKinematics12SetTransformERKN5Maths8TVector3IfEERKNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(154) %64, ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(16) %68)
  br label %69

69:                                               ; preds = %63, %33
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %70

70:                                               ; preds = %69
  %71 = load i64, ptr %6, align 8, !tbaa !25
  %72 = add i64 %71, 1
  store i64 %72, ptr %6, align 8, !tbaa !25
  br label %27, !llvm.loop !51

73:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %74

74:                                               ; preds = %73, %21
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths10Quaternion3OneEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::Quaternion") align 4) #2 align 2

declare noundef zeroext i1 @_ZN7Riemann17KeyFrameAnimation7AdvanceEfPN5Maths8TVector3IfEEPNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(73), float noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths10QuaternionmlERKNS_8TVector3IfEE(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths10QuaternionmlERKS0_(ptr dead_on_unwind noalias writable sret(%"class.Maths::Quaternion") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #5 align 2

declare void @_ZN7Riemann19RigidBodyKinematics12SetTransformERKN5Maths8TVector3IfEERKNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(154), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(16)) #3

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 = { 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 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !17, i64 44}
!12 = !{!"_ZTSN7Riemann14KinematicsTreeE", !13, i64 0, !10, i64 40, !17, i64 44, !14, i64 48, !18, i64 80}
!13 = !{!"_ZTSN7Riemann16KinematicsDriverE", !14, i64 8}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!12, !10, i64 40}
!25 = !{!16, !16, i64 0}
!26 = !{!27, !41, i64 272}
!27 = !{!"_ZTSN7Riemann18KeyframeKinematicsE", !28, i64 0, !39, i64 160, !14, i64 240, !41, i64 272}
!28 = !{!"_ZTSN7Riemann19RigidBodyKinematicsE", !29, i64 0}
!29 = !{!"_ZTSN7Riemann9RigidBodyE", !30, i64 8, !34, i64 32, !16, i64 40, !35, i64 48, !36, i64 60, !35, i64 76, !35, i64 88, !35, i64 100, !10, i64 112, !37, i64 116, !38, i64 152}
!30 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSN7Riemann9RigidTypeE", !7, i64 0}
!35 = !{!"_ZTSN5Maths8TVector3IfEE", !10, i64 0, !10, i64 4, !10, i64 8}
!36 = !{!"_ZTSN5Maths10QuaternionE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!37 = !{!"_ZTSN5Maths7Matrix3E", !7, i64 0}
!38 = !{!"short", !7, i64 0}
!39 = !{!"_ZTSN7Riemann17KeyFrameAnimationE", !40, i64 0, !42, i64 12, !43, i64 24, !47, i64 48, !17, i64 72}
!40 = !{!"_ZTSN7Riemann8TimelineIN5Maths8TVector3IfEEEE", !10, i64 0, !41, i64 4, !17, i64 8}
!41 = !{!"int", !7, i64 0}
!42 = !{!"_ZTSN7Riemann8TimelineIN5Maths10QuaternionEEE", !10, i64 0, !41, i64 4, !17, i64 8}
!43 = !{!"_ZTSSt6vectorIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"_ZTSSt6vectorIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!51 = distinct !{!51, !52}
!52 = !{!"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"

%"class.Maths::TVector3" = type { float, float, float }
%"class.Maths::Quaternion" = type { float, 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; 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 uwtable
define dso_local void @_ZN7Riemann14KinematicsTree8SimulateEf(ptr noundef nonnull align 8 dereferenceable(104) %0, float noundef %1) unnamed_addr #2 align 2 {
  %3 = alloca %"class.Maths::TVector3", align 4
  %4 = alloca %"class.Maths::Quaternion", align 4
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::Quaternion", align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 44
  %9 = load i8, ptr %8, align 4, !tbaa !5, !range !20, !noundef !21
  %10 = trunc nuw i8 %9 to i1
  br i1 %10, label %.loopexit, label %11

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  %13 = tail call noundef zeroext i1 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br i1 %13, label %.loopexit, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = load float, ptr %15, align 8, !tbaa !22
  %17 = fmul float %16, %1
  %18 = tail call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %19 = icmp ugt i64 %18, 1
  br i1 %19, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %14, %.lr.ph
  %.017 = phi i64 [ %35, %.lr.ph ], [ 1, %14 ]
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.017) #6
  %21 = load ptr, ptr %20, align 8, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %21, i64 272
  %23 = load i32, ptr %22, align 8, !tbaa !24
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %24) #6
  %26 = load ptr, ptr %25, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  call void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN5Maths10Quaternion3OneEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::Quaternion") align 4 %4)
  %27 = getelementptr inbounds i8, ptr %21, i64 160
  %28 = call noundef zeroext i1 @_ZN7Riemann17KeyFrameAnimation7AdvanceEfPN5Maths8TVector3IfEEPNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(73) %27, float noundef %17, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  %29 = getelementptr inbounds i8, ptr %26, i64 48
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  %30 = getelementptr inbounds i8, ptr %26, i64 60
  call void @_ZNK5Maths10QuaternionmlERKNS_8TVector3IfEE(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %31 = getelementptr inbounds i8, ptr %21, i64 48
  %32 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNK5Maths10QuaternionmlERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::Quaternion") align 4 %7, ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(16) %4)
  %33 = getelementptr inbounds i8, ptr %21, i64 60
  %34 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN7Riemann19RigidBodyKinematics12SetTransformERKN5Maths8TVector3IfEERKNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(154) %21, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(16) %33)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  %35 = add nuw i64 %.017, 1
  %36 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %37 = icmp ult i64 %35, %36
  br i1 %37, label %.lr.ph, label %.loopexit, !llvm.loop !49

.loopexit:                                        ; preds = %.lr.ph, %14, %2, %11
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths10Quaternion3OneEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::Quaternion") align 4) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN7Riemann17KeyFrameAnimation7AdvanceEfPN5Maths8TVector3IfEEPNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(73), float noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths10QuaternionmlERKNS_8TVector3IfEE(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths10QuaternionmlERKS0_(ptr dead_on_unwind noalias writable sret(%"class.Maths::Quaternion") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5 align 2

declare void @_ZN7Riemann19RigidBodyKinematics12SetTransformERKN5Maths8TVector3IfEERKNS1_10QuaternionE(ptr noundef nonnull align 8 dereferenceable(154), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3

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 = { "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, !15, i64 44}
!6 = !{!"_ZTSN7Riemann14KinematicsTreeE", !7, i64 0, !14, i64 40, !15, i64 44, !8, i64 48, !16, i64 80}
!7 = !{!"_ZTSN7Riemann16KinematicsDriverE", !8, i64 8}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"float", !11, i64 0}
!15 = !{!"bool", !11, i64 0}
!16 = !{!"_ZTSSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann18KeyframeKinematicsESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!6, !14, i64 40}
!23 = !{!10, !10, i64 0}
!24 = !{!25, !39, i64 272}
!25 = !{!"_ZTSN7Riemann18KeyframeKinematicsE", !26, i64 0, !37, i64 160, !8, i64 240, !39, i64 272}
!26 = !{!"_ZTSN7Riemann19RigidBodyKinematicsE", !27, i64 0}
!27 = !{!"_ZTSN7Riemann9RigidBodyE", !28, i64 8, !32, i64 32, !13, i64 40, !33, i64 48, !34, i64 60, !33, i64 76, !33, i64 88, !33, i64 100, !14, i64 112, !35, i64 116, !36, i64 152}
!28 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!32 = !{!"_ZTSN7Riemann9RigidTypeE", !11, i64 0}
!33 = !{!"_ZTSN5Maths8TVector3IfEE", !14, i64 0, !14, i64 4, !14, i64 8}
!34 = !{!"_ZTSN5Maths10QuaternionE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!35 = !{!"_ZTSN5Maths7Matrix3E", !11, i64 0}
!36 = !{!"short", !11, i64 0}
!37 = !{!"_ZTSN7Riemann17KeyFrameAnimationE", !38, i64 0, !40, i64 12, !41, i64 24, !45, i64 48, !15, i64 72}
!38 = !{!"_ZTSN7Riemann8TimelineIN5Maths8TVector3IfEEEE", !14, i64 0, !39, i64 4, !15, i64 8}
!39 = !{!"int", !11, i64 0}
!40 = !{!"_ZTSN7Riemann8TimelineIN5Maths10QuaternionEEE", !14, i64 0, !39, i64 4, !15, i64 8}
!41 = !{!"_ZTSSt6vectorIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!45 = !{!"_ZTSSt6vectorIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8KeyframeIN5Maths10QuaternionEEESaIS4_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass