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

; 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::Matrix3" = type { [3 x [3 x float]] }
%"class.Riemann::RigidBodyDynamic" = type { %"class.Riemann::RigidBody.base", %"class.Maths::TVector3", %"class.Maths::TVector3", i8, float, float, float, float, float, i8, i8, i8, %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Riemann::RigidBody.base" = 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 }>
%"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 }
%"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] }>
%"struct.Riemann::RigidBodyParam" = type <{ float, %"class.Maths::Matrix3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, float, float, float, float, float, i8, i8, i8, i8 }>
%"struct.Maths::Transform" = type { %"class.Maths::TVector3", %"class.Maths::Quaternion" }

@_ZTVN7Riemann16RigidBodyDynamicE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9RigidBodyC2Ev(ptr noundef nonnull align 8 dereferenceable(154)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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)) #1 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)) #1 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)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann16RigidBodyDynamicC2ERKNS_14RigidBodyParamERKN5Maths9TransformE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 4 dereferenceable(91) %1, ptr noundef nonnull align 4 dereferenceable(28) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Maths::Matrix3", align 4
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @_ZN7Riemann9RigidBodyC2Ev(ptr noundef nonnull align 8 dereferenceable(154) %14)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN7Riemann16RigidBodyDynamicE, i32 0, i32 0, i32 2), ptr %14, align 8, !tbaa !9
  %15 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 1
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %16 unwind label %97

16:                                               ; preds = %3
  %17 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 2
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %18 unwind label %97

18:                                               ; preds = %16
  %19 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 12
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %20 unwind label %97

20:                                               ; preds = %18
  %21 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 13
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %22 unwind label %97

22:                                               ; preds = %20
  %23 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 2
  store i8 1, ptr %23, align 8, !tbaa !11
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %24, i32 0, i32 12
  %26 = load i8, ptr %25, align 2, !tbaa !24
  %27 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 3
  store i8 %26, ptr %27, align 4, !tbaa !28
  %28 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 10
  store float 1.000000e+00, ptr %28, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 36, ptr %9) #4
  invoke void @_ZN5Maths7Matrix3C2Efff(ptr noundef nonnull align 4 dereferenceable(36) %9, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %29 unwind label %101

29:                                               ; preds = %22
  %30 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 11
  %31 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36) %30, ptr noundef nonnull align 4 dereferenceable(36) %9)
          to label %32 unwind label %101

32:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 36, ptr %9) #4
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.Maths::Transform", ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 5
  %36 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %34)
          to label %37 unwind label %97

37:                                               ; preds = %32
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.Maths::Transform", ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 6
  %41 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(16) %39)
          to label %42 unwind label %97

42:                                               ; preds = %37
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 7
  %46 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %44)
          to label %47 unwind label %97

47:                                               ; preds = %42
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %48, i32 0, i32 3
  %50 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %14, i32 0, i32 8
  %51 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %49)
          to label %52 unwind label %97

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #4
  invoke void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %10)
          to label %53 unwind label %105

53:                                               ; preds = %52
  %54 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 1
  %55 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %56 unwind label %105

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #4
  invoke void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %11)
          to label %57 unwind label %109

57:                                               ; preds = %56
  %58 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 2
  %59 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %60 unwind label %109

60:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #4
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %61, i32 0, i32 4
  %63 = load float, ptr %62, align 4, !tbaa !31
  %64 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 4
  store float %63, ptr %64, align 8, !tbaa !32
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %65, i32 0, i32 5
  %67 = load float, ptr %66, align 4, !tbaa !33
  %68 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 5
  store float %67, ptr %68, align 4, !tbaa !34
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %69, i32 0, i32 7
  %71 = load float, ptr %70, align 4, !tbaa !35
  %72 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 6
  store float %71, ptr %72, align 8, !tbaa !36
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %73, i32 0, i32 8
  %75 = load float, ptr %74, align 4, !tbaa !37
  %76 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 7
  store float %75, ptr %76, align 4, !tbaa !38
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %77, i32 0, i32 9
  %79 = load float, ptr %78, align 4, !tbaa !39
  %80 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 8
  store float %79, ptr %80, align 8, !tbaa !40
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.Riemann::RigidBodyParam", ptr %81, i32 0, i32 10
  %83 = load i8, ptr %82, align 4, !tbaa !41, !range !42, !noundef !43
  %84 = trunc i8 %83 to i1
  %85 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 9
  %86 = zext i1 %84 to i8
  store i8 %86, ptr %85, align 4, !tbaa !44
  %87 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 10
  store i8 0, ptr %87, align 1, !tbaa !45
  %88 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 11
  store i8 0, ptr %88, align 2, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #4
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000)
          to label %89 unwind label %113

89:                                               ; preds = %60
  %90 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 12
  %91 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %90, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %92 unwind label %113

92:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #4
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000)
          to label %93 unwind label %117

93:                                               ; preds = %92
  %94 = getelementptr inbounds %"class.Riemann::RigidBodyDynamic", ptr %14, i32 0, i32 13
  %95 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %94, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %96 unwind label %117

96:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #4
  ret void

97:                                               ; preds = %47, %42, %37, %32, %20, %18, %16, %3
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  br label %121

101:                                              ; preds = %29, %22
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 36, ptr %9) #4
  br label %121

105:                                              ; preds = %53, %52
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %7, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #4
  br label %121

109:                                              ; preds = %57, %56
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %7, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #4
  br label %121

113:                                              ; preds = %89, %60
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  br label %121

117:                                              ; preds = %93, %92
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #4
  br label %121

121:                                              ; preds = %117, %113, %109, %105, %101, %97
  call void @_ZN7Riemann9RigidBodyD2Ev(ptr noundef nonnull align 8 dereferenceable(154) %14) #4
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %7, align 8
  %124 = load i32, ptr %8, align 4
  %125 = insertvalue { ptr, i32 } poison, ptr %123, 0
  %126 = insertvalue { ptr, i32 } %125, i32 %124, 1
  resume { ptr, i32 } %126
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7Matrix3C2Efff(ptr noundef nonnull align 4 dereferenceable(36), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann9RigidBodyD2Ev(ptr noundef nonnull align 8 dereferenceable(154)) unnamed_addr #3 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !17, i64 32}
!12 = !{!"_ZTSN7Riemann9RigidBodyE", !13, i64 8, !17, i64 32, !18, i64 40, !19, i64 48, !21, i64 60, !19, i64 76, !19, i64 88, !19, i64 100, !20, i64 112, !22, i64 116, !23, i64 152}
!13 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSN7Riemann9RigidTypeE", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN5Maths8TVector3IfEE", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSN5Maths10QuaternionE", !20, i64 0, !20, i64 4, !20, i64 8, !20, i64 12}
!22 = !{!"_ZTSN5Maths7Matrix3E", !7, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = !{!25, !27, i64 90}
!25 = !{!"_ZTSN7Riemann14RigidBodyParamE", !20, i64 0, !22, i64 4, !19, i64 40, !19, i64 52, !20, i64 64, !20, i64 68, !20, i64 72, !20, i64 76, !20, i64 80, !20, i64 84, !26, i64 88, !17, i64 89, !27, i64 90}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSN7Riemann10MorionTypeE", !7, i64 0}
!28 = !{!29, !27, i64 180}
!29 = !{!"_ZTSN7Riemann16RigidBodyDynamicE", !12, i64 0, !19, i64 156, !19, i64 168, !27, i64 180, !20, i64 184, !20, i64 188, !20, i64 192, !20, i64 196, !20, i64 200, !26, i64 204, !26, i64 205, !26, i64 206, !19, i64 208, !19, i64 220}
!30 = !{!12, !20, i64 112}
!31 = !{!25, !20, i64 64}
!32 = !{!29, !20, i64 184}
!33 = !{!25, !20, i64 68}
!34 = !{!29, !20, i64 188}
!35 = !{!25, !20, i64 76}
!36 = !{!29, !20, i64 192}
!37 = !{!25, !20, i64 80}
!38 = !{!29, !20, i64 196}
!39 = !{!25, !20, i64 84}
!40 = !{!29, !20, i64 200}
!41 = !{!25, !26, i64 88}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!29, !26, i64 204}
!45 = !{!29, !26, i64 205}
!46 = !{!29, !26, i64 206}


; 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::Matrix3" = type { [3 x [3 x float]] }

@_ZTVN7Riemann16RigidBodyDynamicE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9RigidBodyC2Ev(ptr noundef nonnull align 8 dereferenceable(154)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #1 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 #1 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 #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 #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann16RigidBodyDynamicC2ERKNS_14RigidBodyParamERKN5Maths9TransformE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 4 dereferenceable(91) %1, ptr noundef nonnull align 4 dereferenceable(28) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.Maths::Matrix3", align 4
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  tail call void @_ZN7Riemann9RigidBodyC2Ev(ptr noundef nonnull align 8 dereferenceable(154) %0)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN7Riemann16RigidBodyDynamicE, i64 16), ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 156
  tail call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 168
  tail call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 220
  tail call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 1, ptr %13, align 8, !tbaa !8
  %14 = getelementptr inbounds i8, ptr %1, i64 90
  %15 = load i8, ptr %14, align 2, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 180
  store i8 %15, ptr %16, align 4, !tbaa !27
  %17 = getelementptr inbounds i8, ptr %0, i64 112
  store float 1.000000e+00, ptr %17, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #4
  call void @_ZN5Maths7Matrix3C2Efff(ptr noundef nonnull align 4 dereferenceable(36) %4, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %18 = getelementptr inbounds i8, ptr %0, i64 116
  %19 = call noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix3aSERKS0_(ptr noundef nonnull align 4 dereferenceable(36) %18, ptr noundef nonnull align 4 dereferenceable(36) %4)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #4
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %22 = getelementptr inbounds i8, ptr %2, i64 12
  %23 = getelementptr inbounds i8, ptr %0, i64 60
  %24 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN5Maths10QuaternionaSERKS0_(ptr noundef nonnull align 4 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(16) %22)
  %25 = getelementptr inbounds i8, ptr %1, i64 40
  %26 = getelementptr inbounds i8, ptr %0, i64 76
  %27 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %28 = getelementptr inbounds i8, ptr %1, i64 52
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  invoke void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %5)
          to label %31 unwind label %52

31:                                               ; preds = %3
  %32 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #4
  invoke void @_ZN5Maths8TVector3IfE4ZeroEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6)
          to label %33 unwind label %54

33:                                               ; preds = %31
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  %35 = getelementptr inbounds i8, ptr %1, i64 64
  %36 = getelementptr inbounds i8, ptr %0, i64 184
  %37 = load <4 x float>, ptr %35, align 4
  %38 = getelementptr inbounds i8, ptr %1, i64 76
  %39 = load <2 x float>, ptr %38, align 4, !tbaa !30
  %40 = shufflevector <2 x float> %39, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %41 = shufflevector <4 x float> %37, <4 x float> %40, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  store <4 x float> %41, ptr %36, align 8, !tbaa !30
  %42 = getelementptr inbounds i8, ptr %1, i64 84
  %43 = load float, ptr %42, align 4, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %0, i64 200
  store float %43, ptr %44, align 8, !tbaa !32
  %45 = getelementptr inbounds i8, ptr %1, i64 88
  %46 = load i8, ptr %45, align 4, !tbaa !33, !range !34, !noundef !35
  %47 = getelementptr inbounds i8, ptr %0, i64 204
  store i8 %46, ptr %47, align 4, !tbaa !36
  %48 = getelementptr inbounds i8, ptr %0, i64 205
  store i8 0, ptr %48, align 1, !tbaa !37
  %49 = getelementptr inbounds i8, ptr %0, i64 206
  store i8 0, ptr %49, align 2, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #4
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000)
  %50 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #4
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000, float noundef 0x7FF0000000000000)
  %51 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #4
  ret void

52:                                               ; preds = %3
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  br label %56

54:                                               ; preds = %31
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZN7Riemann9RigidBodyD2Ev(ptr noundef nonnull align 8 dereferenceable(154) %0) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7Matrix3C2Efff(ptr noundef nonnull align 4 dereferenceable(36), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann9RigidBodyD2Ev(ptr noundef nonnull align 8 dereferenceable(154)) unnamed_addr #3 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !16, i64 32}
!9 = !{!"_ZTSN7Riemann9RigidBodyE", !10, i64 8, !16, i64 32, !17, i64 40, !18, i64 48, !20, i64 60, !18, i64 76, !18, i64 88, !18, i64 100, !19, i64 112, !21, i64 116, !22, i64 152}
!10 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"_ZTSN7Riemann9RigidTypeE", !15, i64 0}
!17 = !{!"long", !15, i64 0}
!18 = !{!"_ZTSN5Maths8TVector3IfEE", !19, i64 0, !19, i64 4, !19, i64 8}
!19 = !{!"float", !15, i64 0}
!20 = !{!"_ZTSN5Maths10QuaternionE", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12}
!21 = !{!"_ZTSN5Maths7Matrix3E", !15, i64 0}
!22 = !{!"short", !15, i64 0}
!23 = !{!24, !26, i64 90}
!24 = !{!"_ZTSN7Riemann14RigidBodyParamE", !19, i64 0, !21, i64 4, !18, i64 40, !18, i64 52, !19, i64 64, !19, i64 68, !19, i64 72, !19, i64 76, !19, i64 80, !19, i64 84, !25, i64 88, !16, i64 89, !26, i64 90}
!25 = !{!"bool", !15, i64 0}
!26 = !{!"_ZTSN7Riemann10MorionTypeE", !15, i64 0}
!27 = !{!28, !26, i64 180}
!28 = !{!"_ZTSN7Riemann16RigidBodyDynamicE", !9, i64 0, !18, i64 156, !18, i64 168, !26, i64 180, !19, i64 184, !19, i64 188, !19, i64 192, !19, i64 196, !19, i64 200, !25, i64 204, !25, i64 205, !25, i64 206, !18, i64 208, !18, i64 220}
!29 = !{!9, !19, i64 112}
!30 = !{!19, !19, i64 0}
!31 = !{!24, !19, i64 84}
!32 = !{!28, !19, i64 200}
!33 = !{!24, !25, i64 88}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!28, !25, i64 204}
!37 = !{!28, !25, i64 205}
!38 = !{!28, !25, i64 206}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass