; LLVM IR from atlantis13579/Riemann :: Src/RigidBodyDynamics/RigidBody.ll (ZN7Riemann9RigidBody20UpdateMassParametersEv)

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_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<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Riemann::MassParameters" = type { float, float, %"class.Maths::Matrix3", %"class.Maths::TVector3", %"class.Maths::TAABB3" }
%"class.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Riemann::RigidBody" = type <{ ptr, %"class.std::vector", 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] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::Quaternion" = type { float, float, float, float }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9RigidBody20UpdateMassParametersEv(ptr noundef nonnull align 8 dereferenceable(154) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca %"class.std::vector.5", align 8
  %5 = alloca %"struct.Riemann::MassParameters", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Maths::Matrix3", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  %16 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %15, i32 0, i32 2
  %17 = load i8, ptr %16, align 8, !tbaa !9
  %18 = icmp eq i8 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %1
  br label %74

20:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #6
  invoke void @_ZN7Riemann14MassParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(80) %5)
          to label %21 unwind label %32

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %15, i32 0, i32 1
  store ptr %22, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = call ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %48, %21
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %30, label %36, label %31

31:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %59

32:                                               ; preds = %60, %59, %20
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  br label %79

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  store ptr %38, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = invoke noundef ptr @_ZNK7Riemann8Geometry17GetLocalTransformEv(ptr noundef nonnull align 8 dereferenceable(204) %39)
          to label %41 unwind label %50

41:                                               ; preds = %36
  store ptr %40, ptr %12, align 8, !tbaa !5
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %43 unwind label %50

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = invoke noundef ptr @_ZN7Riemann8Geometry17GetMassParametersEv(ptr noundef nonnull align 8 dereferenceable(204) %44)
          to label %46 unwind label %54

46:                                               ; preds = %43
  store ptr %45, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %47 unwind label %54

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %48

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %29

50:                                               ; preds = %41, %36
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %58

54:                                               ; preds = %46, %43
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %58

58:                                               ; preds = %54, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %79

59:                                               ; preds = %31
  invoke void @_ZN7Riemann30ComputeCompositeMassParametersERKSt6vectorIPKN5Maths9TransformESaIS4_EERKS0_IPKNS_14MassParametersESaISB_EERS9_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(80) %5)
          to label %60 unwind label %32

60:                                               ; preds = %59
  %61 = getelementptr inbounds %"struct.Riemann::MassParameters", ptr %5, i32 0, i32 3
  %62 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %15, i32 0, i32 9
  %63 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %62, ptr noundef nonnull align 4 dereferenceable(12) %61)
          to label %64 unwind label %32

64:                                               ; preds = %60
  %65 = getelementptr inbounds %"struct.Riemann::MassParameters", ptr %5, i32 0, i32 0
  %66 = load float, ptr %65, align 4, !tbaa !22
  %67 = fdiv float 1.000000e+00, %66
  %68 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %15, i32 0, i32 10
  store float %67, ptr %68, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 36, ptr %14) #6
  %69 = getelementptr inbounds %"struct.Riemann::MassParameters", ptr %5, i32 0, i32 2
  invoke void @_ZNK5Maths7Matrix37InverseEv(ptr dead_on_unwind writable sret(%"class.Maths::Matrix3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(36) %69)
          to label %70 unwind label %75

70:                                               ; preds = %64
  %71 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %15, i32 0, i32 11
  %72 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36) %71, ptr noundef nonnull align 4 dereferenceable(36) %14)
          to label %73 unwind label %75

73:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %74

74:                                               ; preds = %73, %19
  ret void

75:                                               ; preds = %70, %64
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #6
  br label %79

79:                                               ; preds = %75, %58, %32
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %6, align 8
  %82 = load i32, ptr %7, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7Riemann8Geometry17GetLocalTransformEv(ptr noundef nonnull align 8 dereferenceable(204)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann14MassParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Riemann8Geometry17GetMassParametersEv(ptr noundef nonnull align 8 dereferenceable(204)) #3 align 2

declare void @_ZN7Riemann30ComputeCompositeMassParametersERKSt6vectorIPKN5Maths9TransformESaIS4_EERKS0_IPKNS_14MassParametersESaISB_EERS9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(80)) #5

; 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)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Maths7Matrix37InverseEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::Matrix3") align 4, ptr noundef nonnull align 4 dereferenceable(36)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync 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 = { 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 #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 = { "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, !15, i64 32}
!10 = !{!"_ZTSN7Riemann9RigidBodyE", !11, i64 8, !15, i64 32, !16, i64 40, !17, i64 48, !19, i64 60, !17, i64 76, !17, i64 88, !17, i64 100, !18, i64 112, !20, i64 116, !21, i64 152}
!11 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSN7Riemann9RigidTypeE", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN5Maths8TVector3IfEE", !18, i64 0, !18, i64 4, !18, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN5Maths10QuaternionE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!20 = !{!"_ZTSN5Maths7Matrix3E", !7, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!23, !18, i64 0}
!23 = !{!"_ZTSN7Riemann14MassParametersE", !18, i64 0, !18, i64 4, !20, i64 8, !17, i64 44, !24, i64 56}
!24 = !{!"_ZTSN5Maths6TAABB3IfEE", !17, i64 0, !17, i64 12}
!25 = !{!10, !18, i64 112}


; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Maths::Transform *, std::allocator<const Maths::Transform *>>::_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<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl" }
%"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const Riemann::MassParameters *, std::allocator<const Riemann::MassParameters *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Riemann::MassParameters" = type { float, float, %"class.Maths::Matrix3", %"class.Maths::TVector3", %"class.Maths::TAABB3" }
%"class.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9RigidBody20UpdateMassParametersEv(ptr noundef nonnull align 8 dereferenceable(154) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca %"class.std::vector.5", align 8
  %4 = alloca %"struct.Riemann::MassParameters", align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.Maths::Matrix3", align 4
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i8, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i8 %11, 0
  br i1 %12, label %46, label %13

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  invoke void @_ZN7Riemann14MassParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(80) %4)
          to label %14 unwind label %19

14:                                               ; preds = %13
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %16 = call ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %16, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %17 = call ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %17, ptr %6, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %27, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  invoke void @_ZN7Riemann30ComputeCompositeMassParametersERKSt6vectorIPKN5Maths9TransformESaIS4_EERKS0_IPKNS_14MassParametersESaISB_EERS9_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(80) %4)
          to label %35 unwind label %19

19:                                               ; preds = %._crit_edge, %13
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %49

.lr.ph:                                           ; preds = %14, %27
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %22 = load ptr, ptr %21, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %23 = call noundef ptr @_ZNK7Riemann8Geometry17GetLocalTransformEv(ptr noundef nonnull align 8 dereferenceable(204) %22)
  store ptr %23, ptr %7, align 8, !tbaa !21
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %25 unwind label %30

25:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %26 = call noundef ptr @_ZN7Riemann8Geometry17GetMassParametersEv(ptr noundef nonnull align 8 dereferenceable(204) %22)
  store ptr %26, ptr %8, align 8, !tbaa !21
  invoke void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %27 unwind label %32

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %29, label %.lr.ph, label %._crit_edge

30:                                               ; preds = %.lr.ph
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %34

32:                                               ; preds = %25
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %49

35:                                               ; preds = %._crit_edge
  %36 = getelementptr inbounds i8, ptr %4, i64 44
  %37 = getelementptr inbounds i8, ptr %0, i64 100
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %36)
  %39 = load float, ptr %4, align 4, !tbaa !22
  %40 = fdiv float 1.000000e+00, %39
  %41 = getelementptr inbounds i8, ptr %0, i64 112
  store float %40, ptr %41, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #6
  %42 = getelementptr inbounds i8, ptr %4, i64 8
  invoke void @_ZNK5Maths7Matrix37InverseEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::Matrix3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(36) %42)
          to label %43 unwind label %47

43:                                               ; preds = %35
  %44 = getelementptr inbounds i8, ptr %0, i64 116
  %45 = call noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36) %44, ptr noundef nonnull align 4 dereferenceable(36) %9)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  br label %46

46:                                               ; preds = %1, %43
  ret void

47:                                               ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #6
  br label %49

49:                                               ; preds = %47, %34, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %48, %47 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  call void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7Riemann8GeometryESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7Riemann8Geometry17GetLocalTransformEv(ptr noundef nonnull align 8 dereferenceable(204)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann14MassParametersC2Ev(ptr noundef nonnull align 4 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Riemann8Geometry17GetMassParametersEv(ptr noundef nonnull align 8 dereferenceable(204)) local_unnamed_addr #3 align 2

declare void @_ZN7Riemann30ComputeCompositeMassParametersERKSt6vectorIPKN5Maths9TransformESaIS4_EERKS0_IPKNS_14MassParametersESaISB_EERS9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(80)) local_unnamed_addr #5

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Maths7Matrix37InverseEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::Matrix3") align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN7Riemann14MassParametersESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPKN5Maths9TransformESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync 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 = { 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 #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 = { "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, !14, i64 32}
!6 = !{!"_ZTSN7Riemann9RigidBodyE", !7, i64 8, !14, i64 32, !15, i64 40, !16, i64 48, !18, i64 60, !16, i64 76, !16, i64 88, !16, i64 100, !17, i64 112, !19, i64 116, !20, i64 152}
!7 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN7Riemann9RigidTypeE", !12, i64 0}
!15 = !{!"long", !12, i64 0}
!16 = !{!"_ZTSN5Maths8TVector3IfEE", !17, i64 0, !17, i64 4, !17, i64 8}
!17 = !{!"float", !12, i64 0}
!18 = !{!"_ZTSN5Maths10QuaternionE", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12}
!19 = !{!"_ZTSN5Maths7Matrix3E", !12, i64 0}
!20 = !{!"short", !12, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !17, i64 0}
!23 = !{!"_ZTSN7Riemann14MassParametersE", !17, i64 0, !17, i64 4, !19, i64 8, !16, i64 44, !24, i64 56}
!24 = !{!"_ZTSN5Maths6TAABB3IfEE", !16, i64 0, !16, i64 12}
!25 = !{!6, !17, i64 112}


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