; LLVM IR from ThePhysicsGuys/Physics3D :: application (extendedPart)

; 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.P3D::Application::Screen" = type { %"class.P3D::Engine::Registry", ptr, ptr, %"struct.P3D::Vector.11", %"struct.P3D::Application::Camera", %"class.P3D::Engine::LayerStack", %"class.P3D::Application::EventHandler", %"class.Util::Properties", %"class.std::shared_ptr", ptr, ptr }
%"class.P3D::Engine::Registry" = type <{ %"class.std::set", %"class.std::vector", %"class.std::unordered_map", %"class.std::queue", i32, [4 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.P3D::Vector.11" = type { %union.anon.12 }
%union.anon.12 = type { [2 x i32] }
%"struct.P3D::Application::Camera" = type { i8, double, double, %"struct.P3D::Vector", i8, double, double, %"struct.P3D::Vector", i8, i8, %"class.P3D::GlobalCFrame", double, double, i8, double, float, float, float, float, %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", ptr }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"class.P3D::Matrix.14" = type { [16 x float] }
%"class.P3D::Engine::LayerStack" = type <{ %"class.std::vector.15", i32, [4 x i8] }>
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::Application::EventHandler" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.Util::Properties" = type { %"class.std::__cxx11::basic_string", %"class.std::map" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.23 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.23 = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree.24" }
%"class.std::_Rb_tree.24" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.P3D::intrusive_ptr.29" = type { ptr }
%"class.P3D::intrusive_ptr.30" = type { ptr }
%"class.P3D::intrusive_ptr.31" = type { ptr }
%"class.P3D::intrusive_ptr.32" = type { ptr }
%"struct.P3D::Application::ExtendedPart" = type <{ %"class.P3D::Part", i32, [4 x i8] }>
%"class.P3D::Part" = type { %"class.P3D::GlobalCFrame", ptr, ptr, %"class.P3D::Shape", double, %"struct.P3D::PartProperties" }
%"class.P3D::Shape" = type { %"class.P3D::intrusive_ptr", %"class.P3D::DiagonalMatrix" }
%"class.P3D::intrusive_ptr" = type { ptr }
%"class.P3D::DiagonalMatrix" = type { [3 x double] }
%"struct.P3D::PartProperties" = type { double, double, double, %"struct.P3D::Vector" }

@_ZN3P3D6Engine8RegistryImE11null_entityE = external dso_local global i32, align 4
@_ZN3P3D11Application6screenE = external global %"class.P3D::Application::Screen", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3P3D11Application12ExtendedPartC2EONS_4PartERKNS_8Graphics4Comp4MeshERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %0, ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(29) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) unnamed_addr #0 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.P3D::intrusive_ptr.29", align 8
  %12 = alloca %"class.P3D::intrusive_ptr.30", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.P3D::intrusive_ptr.31", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.P3D::intrusive_ptr.32", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3P3D4PartC2EOS0_(ptr noundef nonnull align 8 dereferenceable(200) %17, ptr noundef nonnull align 8 dereferenceable(200) %18) #3
  %19 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  store i32 0, ptr %19, align 8, !tbaa !9
  %20 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = load i32, ptr @_ZN3P3D6Engine8RegistryImE11null_entityE, align 4, !tbaa !25
  %23 = icmp eq i32 %21, %22
  br i1 %23, label %24, label %27

24:                                               ; preds = %5
  %25 = call noundef i32 @_ZN3P3D6Engine8RegistryImE6createERKj(ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) @_ZN3P3D6Engine8RegistryImE11null_entityE) #3
  %26 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  store i32 %25, ptr %26, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %24, %5
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = load i32, ptr %28, align 4, !tbaa !25
  %30 = load i32, ptr @_ZN3P3D6Engine8RegistryImE11null_entityE, align 4, !tbaa !25
  %31 = icmp ne i32 %29, %30
  br i1 %31, label %32, label %36

32:                                               ; preds = %27
  %33 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZN3P3D6Engine8RegistryImE9setParentERKjS4_(ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34) #3
  br label %36

36:                                               ; preds = %32, %27
  %37 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp4MeshEJRKS6_EEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr.29") align 8 %11, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 8 dereferenceable(29) %38) #3
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp4MeshEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  %39 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr %17, ptr %13, align 8, !tbaa !5
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp6HitboxEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr.30") align 8 %12, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp6HitboxEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  %40 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store ptr %17, ptr %15, align 8, !tbaa !5
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp9TransformEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr.31") align 8 %14, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp9TransformEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %41) #3
  br i1 %42, label %46, label %43

43:                                               ; preds = %36
  %44 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %17, i32 0, i32 1
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp4NameEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr.32") align 8 %16, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 8 dereferenceable(32) %45) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp4NameEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  br label %46

46:                                               ; preds = %43, %36
  ret void
}

; Function Attrs: nounwind
declare void @_ZN3P3D4PartC2EOS0_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3P3D6Engine8RegistryImE6createERKj(ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3P3D6Engine8RegistryImE9setParentERKjS4_(ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp4MeshEJRKS6_EEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.29") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(29)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp6HitboxEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.30") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp9TransformEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.31") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp4NameEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.32") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

attributes #0 = { 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 #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !24, i64 200}
!10 = !{!"_ZTSN3P3D11Application12ExtendedPartE", !11, i64 0, !24, i64 200}
!11 = !{!"_ZTSN3P3D4PartE", !12, i64 0, !6, i64 96, !6, i64 104, !18, i64 112, !21, i64 144, !22, i64 152}
!12 = !{!"_ZTSN3P3D12GlobalCFrameE", !13, i64 0, !16, i64 24}
!13 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"_ZTSN3P3D3FixILl32EEE", !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN3P3D22MatrixRotationTemplateIdEE", !17, i64 0}
!17 = !{!"_ZTSN3P3D6MatrixIdLm3ELm3EEE", !7, i64 0}
!18 = !{!"_ZTSN3P3D5ShapeE", !19, i64 0, !20, i64 8}
!19 = !{!"_ZTSN3P3D13intrusive_ptrIKNS_10ShapeClassEEE", !6, i64 0}
!20 = !{!"_ZTSN3P3D14DiagonalMatrixIdLm3EEE", !7, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSN3P3D14PartPropertiesE", !21, i64 0, !21, i64 8, !21, i64 16, !23, i64 24}
!23 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !7, i64 0}
!24 = !{!"int", !7, i64 0}
!25 = !{!24, !24, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.P3D::Application::Screen" = type { %"class.P3D::Engine::Registry", ptr, ptr, %"struct.P3D::Vector.11", %"struct.P3D::Application::Camera", %"class.P3D::Engine::LayerStack", %"class.P3D::Application::EventHandler", %"class.Util::Properties", %"class.std::shared_ptr", ptr, ptr }
%"class.P3D::Engine::Registry" = type <{ %"class.std::set", %"class.std::vector", %"class.std::unordered_map", %"class.std::queue", i32, [4 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.P3D::Vector.11" = type { %union.anon.12 }
%union.anon.12 = type { [2 x i32] }
%"struct.P3D::Application::Camera" = type { i8, double, double, %"struct.P3D::Vector", i8, double, double, %"struct.P3D::Vector", i8, i8, %"class.P3D::GlobalCFrame", double, double, i8, double, float, float, float, float, %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", %"class.P3D::Matrix.14", ptr }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"class.P3D::Matrix.14" = type { [16 x float] }
%"class.P3D::Engine::LayerStack" = type <{ %"class.std::vector.15", i32, [4 x i8] }>
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::Application::EventHandler" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.Util::Properties" = type { %"class.std::__cxx11::basic_string", %"class.std::map" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.23 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.23 = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree.24" }
%"class.std::_Rb_tree.24" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.P3D::intrusive_ptr.29" = type { ptr }
%"class.P3D::intrusive_ptr.30" = type { ptr }
%"class.P3D::intrusive_ptr.31" = type { ptr }
%"class.P3D::intrusive_ptr.32" = type { ptr }

@_ZN3P3D6Engine8RegistryImE11null_entityE = external dso_local global i32, align 4
@_ZN3P3D11Application6screenE = external global %"class.P3D::Application::Screen", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3P3D11Application12ExtendedPartC2EONS_4PartERKNS_8Graphics4Comp4MeshERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %0, ptr noundef nonnull align 8 dereferenceable(200) %1, ptr noundef nonnull align 8 dereferenceable(29) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) unnamed_addr #0 align 2 {
  %6 = alloca %"class.P3D::intrusive_ptr.29", align 8
  %7 = alloca %"class.P3D::intrusive_ptr.30", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.P3D::intrusive_ptr.31", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.P3D::intrusive_ptr.32", align 8
  tail call void @_ZN3P3D4PartC2EOS0_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(200) %1) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 200
  store i32 0, ptr %12, align 8, !tbaa !5
  %13 = load i32, ptr @_ZN3P3D6Engine8RegistryImE11null_entityE, align 4, !tbaa !24
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %5
  %16 = tail call noundef i32 @_ZN3P3D6Engine8RegistryImE6createERKj(ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) @_ZN3P3D6Engine8RegistryImE11null_entityE) #3
  store i32 %16, ptr %12, align 8, !tbaa !5
  %.pre = load i32, ptr @_ZN3P3D6Engine8RegistryImE11null_entityE, align 4, !tbaa !24
  br label %17

17:                                               ; preds = %15, %5
  %18 = phi i32 [ %.pre, %15 ], [ %13, %5 ]
  %19 = load i32, ptr %4, align 4, !tbaa !24
  %.not = icmp eq i32 %19, %18
  br i1 %.not, label %22, label %20

20:                                               ; preds = %17
  %21 = tail call noundef zeroext i1 @_ZN3P3D6Engine8RegistryImE9setParentERKjS4_(ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %4) #3
  br label %22

22:                                               ; preds = %20, %17
  call void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp4MeshEJRKS6_EEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr.29") align 8 %6, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(29) %2) #3
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp4MeshEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  store ptr %0, ptr %8, align 8, !tbaa !25
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp6HitboxEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr.30") align 8 %7, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp6HitboxEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  store ptr %0, ptr %10, align 8, !tbaa !25
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp9TransformEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr.31") align 8 %9, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp9TransformEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  %23 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #3
  br i1 %23, label %25, label %24

24:                                               ; preds = %22
  call void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp4NameEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr.32") align 8 %11, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(32) %3) #3
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp4NameEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  br label %25

25:                                               ; preds = %24, %22
  ret void
}

; Function Attrs: nounwind
declare void @_ZN3P3D4PartC2EOS0_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3P3D6Engine8RegistryImE6createERKj(ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3P3D6Engine8RegistryImE9setParentERKjS4_(ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp4MeshEJRKS6_EEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.29") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(29)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp6HitboxEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.30") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; 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 nounwind uwtable
declare dso_local void @_ZN3P3D13intrusive_ptrINS_11Application4Comp6HitboxEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp9TransformEJPNS4_12ExtendedPartEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.31") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_11Application4Comp4NameEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.32") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !23, i64 200}
!6 = !{!"_ZTSN3P3D11Application12ExtendedPartE", !7, i64 0, !23, i64 200}
!7 = !{!"_ZTSN3P3D4PartE", !8, i64 0, !16, i64 96, !16, i64 104, !17, i64 112, !20, i64 144, !21, i64 152}
!8 = !{!"_ZTSN3P3D12GlobalCFrameE", !9, i64 0, !14, i64 24}
!9 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !10, i64 0, !10, i64 8, !10, i64 16}
!10 = !{!"_ZTSN3P3D3FixILl32EEE", !11, i64 0}
!11 = !{!"long", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN3P3D22MatrixRotationTemplateIdEE", !15, i64 0}
!15 = !{!"_ZTSN3P3D6MatrixIdLm3ELm3EEE", !12, i64 0}
!16 = !{!"any pointer", !12, i64 0}
!17 = !{!"_ZTSN3P3D5ShapeE", !18, i64 0, !19, i64 8}
!18 = !{!"_ZTSN3P3D13intrusive_ptrIKNS_10ShapeClassEEE", !16, i64 0}
!19 = !{!"_ZTSN3P3D14DiagonalMatrixIdLm3EEE", !12, i64 0}
!20 = !{!"double", !12, i64 0}
!21 = !{!"_ZTSN3P3D14PartPropertiesE", !20, i64 0, !20, i64 8, !20, i64 16, !22, i64 24}
!22 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !12, i64 0}
!23 = !{!"int", !12, i64 0}
!24 = !{!23, !23, i64 0}
!25 = !{!16, !16, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass