; LLVM IR from ThePhysicsGuys/Physics3D :: application/picker/tools (fixedConstraintTool)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.P3D::Application::Selection" = type { %"class.std::optional", %"class.std::vector" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [7 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<P3D::BoundingBoxTemplate<double>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<P3D::BoundingBoxTemplate<double>>::_Storage" = type { %"struct.P3D::BoundingBoxTemplate" }
%"struct.P3D::BoundingBoxTemplate" = type { %"struct.P3D::Vector", %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon.0 }
%union.anon.0 = type { [3 x double] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::Application::Screen" = type { %"class.P3D::Engine::Registry", ptr, ptr, %"struct.P3D::Vector.17", %"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.7", %"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.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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.17" = type { %union.anon.18 }
%union.anon.18 = 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.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", ptr }
%"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.20" = type { [16 x float] }
%"class.P3D::Engine::LayerStack" = type <{ %"class.std::vector.21", i32, [4 x i8] }>
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = 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 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = 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" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.std::allocator" = type { i8 }
%"struct.P3D::Application::Comp::Collider" = type { %"struct.P3D::RC", ptr }
%"struct.P3D::RC" = type { ptr, i64 }

@_ZN3P3D11Application13SelectionTool9selectionE = external global %"struct.P3D::Application::Selection", align 8
@_ZN3P3D11Application6screenE = external global %"class.P3D::Application::Screen", align 8
@_ZTISt16invalid_argument = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application19FixedConstraintTool12fixSelectionEv() #2 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::intrusive_ptr", align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.P3D::intrusive_ptr", align 8
  %10 = alloca %"struct.P3D::CFrameTemplate", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.P3D::CFrameTemplate", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = call noundef i64 @_ZNK3P3D11Application9Selection4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
  %17 = icmp ult i64 %16, 2
  br i1 %17, label %18, label %19

18:                                               ; preds = %0
  br label %140

19:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #10
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D11Application9SelectionixEi(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE, i32 noundef 0)
  call void @_ZN3P3D6Engine8RegistryImE3getINS_11Application4Comp8ColliderEEENS_13intrusive_ptrIT_EERKj(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr") align 8 %1, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %20) #10
  %21 = call noundef zeroext i1 @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEE7invalidEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  br i1 %21, label %22, label %23

22:                                               ; preds = %19
  store i32 1, ptr %2, align 4
  br label %138

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #10
  store ptr @_ZN3P3D11Application13SelectionTool9selectionE, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %24 = invoke ptr @_ZN3P3D11Application9Selection5beginEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
          to label %25 unwind label %33

25:                                               ; preds = %23
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %24, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %27 = invoke ptr @_ZN3P3D11Application9Selection3endEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
          to label %28 unwind label %37

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %27, ptr %29, align 8
  br label %30

30:                                               ; preds = %116, %28
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  br i1 %31, label %41, label %32

32:                                               ; preds = %30
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  br label %137

33:                                               ; preds = %23
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %6, align 4
  br label %136

37:                                               ; preds = %25
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  br label %135

41:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  store ptr %42, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3P3D6Engine8RegistryImE3getINS_11Application4Comp8ColliderEEENS_13intrusive_ptrIT_EERKj(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr") align 8 %9, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %43) #10
  %44 = call noundef zeroext i1 @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEE7invalidEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  store i32 3, ptr %2, align 4
  br label %110

46:                                               ; preds = %41
  %47 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  %48 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %51 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = icmp eq ptr %49, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %46
  store i32 3, ptr %2, align 4
  br label %110

55:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 96, ptr %10) #10
  %56 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %57 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = invoke noundef nonnull align 8 dereferenceable(96) ptr @_ZNK3P3D4Part9getCFrameEv(ptr noundef nonnull align 8 dereferenceable(200) %58)
          to label %60 unwind label %80

60:                                               ; preds = %55
  %61 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  %62 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = invoke noundef nonnull align 8 dereferenceable(96) ptr @_ZNK3P3D4Part9getCFrameEv(ptr noundef nonnull align 8 dereferenceable(200) %63)
          to label %65 unwind label %80

65:                                               ; preds = %60
  invoke void @_ZNK3P3D12GlobalCFrame13globalToLocalERKS0_(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %10, ptr noundef nonnull align 8 dereferenceable(96) %59, ptr noundef nonnull align 8 dereferenceable(96) %64)
          to label %66 unwind label %80

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %67 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #11
          to label %68 unwind label %84

68:                                               ; preds = %66
  call void @llvm.memset.p0.i64(ptr align 16 %67, i8 0, i64 16, i1 false)
  call void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9) %67) #10
  store ptr %67, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr getelementptr inbounds (%"class.P3D::Application::Screen", ptr @_ZN3P3D11Application6screenE, i32 0, i32 2), align 8, !tbaa !13
  invoke void @_ZN3P3D16UpgradeableMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(96) %69)
          to label %70 unwind label %84

70:                                               ; preds = %68
  %71 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %72 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  %75 = getelementptr inbounds %"struct.P3D::Application::Comp::Collider", ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %12) #10
  invoke void @_ZN3P3D14CFrameTemplateIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %12)
          to label %78 unwind label %88

78:                                               ; preds = %70
  invoke void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200) %73, ptr noundef %76, ptr noundef %77, ptr noundef nonnull align 8 dereferenceable(96) %10, ptr noundef nonnull align 8 dereferenceable(96) %12)
          to label %79 unwind label %88

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #10
  br label %107

80:                                               ; preds = %65, %60, %55
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %5, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %6, align 4
  br label %134

84:                                               ; preds = %107, %68, %66
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  br label %133

88:                                               ; preds = %78, %70
  %89 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt16invalid_argument
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %5, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #10
  br label %92

92:                                               ; preds = %88
  %93 = load i32, ptr %6, align 4
  %94 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt16invalid_argument) #10
  %95 = icmp eq i32 %93, %94
  br i1 %95, label %96, label %133

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %97 = load ptr, ptr %5, align 8
  %98 = call ptr @__cxa_begin_catch(ptr %97) #10
  store ptr %98, ptr %13, align 8
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = load ptr, ptr %99, align 8, !tbaa !68
  %101 = getelementptr inbounds ptr, ptr %100, i64 2
  %102 = load ptr, ptr %101, align 8
  %103 = call noundef ptr %102(ptr noundef nonnull align 8 dereferenceable(16) %99) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %103, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %104 unwind label %118

104:                                              ; preds = %96
  invoke void (ptr, ...) @_ZN3Log5debugENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEz(ptr noundef %14)
          to label %105 unwind label %122

105:                                              ; preds = %104
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  invoke void @__cxa_end_catch()
          to label %106 unwind label %127

106:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %107

107:                                              ; preds = %106, %79
  %108 = load ptr, ptr getelementptr inbounds (%"class.P3D::Application::Screen", ptr @_ZN3P3D11Application6screenE, i32 0, i32 2), align 8, !tbaa !13
  invoke void @_ZN3P3D16UpgradeableMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(96) %108)
          to label %109 unwind label %84

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr %10) #10
  store i32 0, ptr %2, align 4
  br label %110

110:                                              ; preds = %109, %54, %45
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  %111 = load i32, ptr %2, align 4
  switch i32 %111, label %113 [
    i32 0, label %112
  ]

112:                                              ; preds = %110
  store i32 0, ptr %2, align 4
  br label %113

113:                                              ; preds = %112, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  %114 = load i32, ptr %2, align 4
  switch i32 %114, label %149 [
    i32 0, label %115
    i32 3, label %116
  ]

115:                                              ; preds = %113
  br label %116

116:                                              ; preds = %115, %113
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  br label %30

118:                                              ; preds = %96
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %5, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %6, align 4
  br label %126

122:                                              ; preds = %104
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %5, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %126

126:                                              ; preds = %122, %118
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  invoke void @__cxa_end_catch()
          to label %131 unwind label %146

127:                                              ; preds = %105
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %5, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %6, align 4
  br label %132

131:                                              ; preds = %126
  br label %132

132:                                              ; preds = %131, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %133

133:                                              ; preds = %132, %92, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %134

134:                                              ; preds = %133, %80
  call void @llvm.lifetime.end.p0(i64 96, ptr %10) #10
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %135

135:                                              ; preds = %134, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %136

136:                                              ; preds = %135, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #10
  br label %141

137:                                              ; preds = %32
  store i32 0, ptr %2, align 4
  br label %138

138:                                              ; preds = %137, %22
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #10
  %139 = load i32, ptr %2, align 4
  switch i32 %139, label %149 [
    i32 0, label %140
    i32 1, label %140
  ]

140:                                              ; preds = %138, %138, %18
  ret void

141:                                              ; preds = %136
  %142 = load ptr, ptr %5, align 8
  %143 = load i32, ptr %6, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145

146:                                              ; preds = %126
  %147 = landingpad { ptr, i32 }
          catch ptr null
  %148 = extractvalue { ptr, i32 } %147, 0
  call void @__clang_call_terminate(ptr %148) #12
  unreachable

149:                                              ; preds = %138, %113
  unreachable
}

declare noundef i64 @_ZNK3P3D11Application9Selection4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) #3

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

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D11Application9SelectionixEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #3

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

declare ptr @_ZN3P3D11Application9Selection5beginEv(ptr noundef nonnull align 8 dereferenceable(80)) #3

declare ptr @_ZN3P3D11Application9Selection3endEv(ptr noundef nonnull align 8 dereferenceable(80)) #3

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #4 align 2

declare void @_ZN3P3D16UpgradeableMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(96)) #3

declare void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) #3

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

declare ptr @__cxa_begin_catch(ptr)

declare void @_ZN3Log5debugENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEz(ptr noundef, ...) #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #9

declare void @_ZN3P3D16UpgradeableMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(96)) #3

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nobuiltin allocsize(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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind memory(none) }
attributes #9 = { noinline noreturn nounwind uwtable "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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { noreturn 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, !6, i64 16}
!10 = !{!"_ZTSN3P3D11Application4Comp8ColliderE", !11, i64 0, !6, i64 16}
!11 = !{!"_ZTSN3P3D2RCE", !12, i64 8}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 224}
!14 = !{!"_ZTSN3P3D11Application6ScreenE", !15, i64 0, !6, i64 216, !6, i64 224, !40, i64 232, !41, i64 240, !51, i64 816, !56, i64 848, !57, i64 912, !65, i64 992, !6, i64 1008, !6, i64 1016}
!15 = !{!"_ZTSN3P3D6Engine8RegistryImEE", !16, i64 0, !24, i64 48, !28, i64 72, !33, i64 128, !39, i64 208}
!16 = !{!"_ZTSSt3setImN3P3D6Engine8RegistryImE14entity_compareESaImEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeImmSt9_IdentityImEN3P3D6Engine8RegistryImE14entity_compareESaImEE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeImmSt9_IdentityImEN3P3D6Engine8RegistryImE14entity_compareESaImEE13_Rb_tree_implIS6_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareIN3P3D6Engine8RegistryImE14entity_compareEE", !20, i64 0}
!20 = !{!"_ZTSN3P3D6Engine8RegistryImE14entity_compareE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !12, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt13unordered_mapItNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashItESt8equal_toItESaISt4pairIKtS5_EEE", !29, i64 0}
!29 = !{!"_ZTSSt10_HashtableItSt4pairIKtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS8_ENSt8__detail10_Select1stESt8equal_toItESt4hashItENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !12, i64 8, !30, i64 16, !12, i64 24, !31, i64 32, !6, i64 48}
!30 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!31 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !32, i64 0, !12, i64 8}
!32 = !{!"float", !7, i64 0}
!33 = !{!"_ZTSSt5queueIjSt5dequeIjSaIjEEE", !34, i64 0}
!34 = !{!"_ZTSSt5dequeIjSaIjEE", !35, i64 0}
!35 = !{!"_ZTSSt11_Deque_baseIjSaIjEE", !36, i64 0}
!36 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE11_Deque_implE", !37, i64 0}
!37 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE16_Deque_impl_dataE", !6, i64 0, !12, i64 8, !38, i64 16, !38, i64 48}
!38 = !{!"_ZTSSt15_Deque_iteratorIjRjPjE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!39 = !{!"int", !7, i64 0}
!40 = !{!"_ZTSN3P3D6VectorIiLm2EEE", !7, i64 0}
!41 = !{!"_ZTSN3P3D11Application6CameraE", !7, i64 0, !42, i64 8, !42, i64 16, !43, i64 24, !44, i64 48, !42, i64 56, !42, i64 64, !43, i64 72, !44, i64 96, !44, i64 97, !45, i64 104, !42, i64 200, !42, i64 208, !44, i64 216, !42, i64 224, !32, i64 232, !32, i64 236, !32, i64 240, !32, i64 244, !50, i64 248, !50, i64 312, !50, i64 376, !50, i64 440, !50, i64 504, !6, i64 568}
!42 = !{!"double", !7, i64 0}
!43 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !7, i64 0}
!44 = !{!"bool", !7, i64 0}
!45 = !{!"_ZTSN3P3D12GlobalCFrameE", !46, i64 0, !48, i64 24}
!46 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !47, i64 0, !47, i64 8, !47, i64 16}
!47 = !{!"_ZTSN3P3D3FixILl32EEE", !12, i64 0}
!48 = !{!"_ZTSN3P3D22MatrixRotationTemplateIdEE", !49, i64 0}
!49 = !{!"_ZTSN3P3D6MatrixIdLm3ELm3EEE", !7, i64 0}
!50 = !{!"_ZTSN3P3D6MatrixIfLm4ELm4EEE", !7, i64 0}
!51 = !{!"_ZTSN3P3D6Engine10LayerStackE", !52, i64 0, !39, i64 24}
!52 = !{!"_ZTSSt6vectorIPN3P3D6Engine5LayerESaIS3_EE", !53, i64 0}
!53 = !{!"_ZTSSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE12_Vector_implE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!56 = !{!"_ZTSN3P3D11Application12EventHandlerE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!57 = !{!"_ZTSN4Util10PropertiesE", !58, i64 0, !60, i64 32}
!58 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !59, i64 0, !12, i64 8, !7, i64 16}
!59 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!60 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE", !61, i64 0}
!61 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !62, i64 0}
!62 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !63, i64 0, !21, i64 8}
!63 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !64, i64 0}
!64 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!65 = !{!"_ZTSSt10shared_ptrIN3P3D8Graphics11FrameBufferEE", !66, i64 0}
!66 = !{!"_ZTSSt12__shared_ptrIN3P3D8Graphics11FrameBufferELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !67, i64 8}
!67 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!68 = !{!69, !69, i64 0}
!69 = !{!"vtable pointer", !8, i64 0}


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

%"struct.P3D::Application::Selection" = type { %"class.std::optional", %"class.std::vector" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [7 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<P3D::BoundingBoxTemplate<double>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<P3D::BoundingBoxTemplate<double>>::_Storage" = type { %"struct.P3D::BoundingBoxTemplate" }
%"struct.P3D::BoundingBoxTemplate" = type { %"struct.P3D::Vector", %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon.0 }
%union.anon.0 = type { [3 x double] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::Application::Screen" = type { %"class.P3D::Engine::Registry", ptr, ptr, %"struct.P3D::Vector.17", %"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.7", %"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.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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.17" = type { %union.anon.18 }
%union.anon.18 = 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.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", %"class.P3D::Matrix.20", ptr }
%"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.20" = type { [16 x float] }
%"class.P3D::Engine::LayerStack" = type <{ %"class.std::vector.21", i32, [4 x i8] }>
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = 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 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = 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" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.std::allocator" = type { i8 }

@_ZN3P3D11Application13SelectionTool9selectionE = external global %"struct.P3D::Application::Selection", align 8
@_ZN3P3D11Application6screenE = external global %"class.P3D::Application::Screen", align 8
@_ZTISt16invalid_argument = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application19FixedConstraintTool12fixSelectionEv() local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::intrusive_ptr", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.P3D::intrusive_ptr", align 8
  %5 = alloca %"struct.P3D::CFrameTemplate", align 8
  %6 = alloca %"struct.P3D::CFrameTemplate", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = tail call noundef i64 @_ZNK3P3D11Application9Selection4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
  %10 = icmp ult i64 %9, 2
  br i1 %10, label %101, label %11

11:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #10
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D11Application9SelectionixEi(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE, i32 noundef 0)
  call void @_ZN3P3D6Engine8RegistryImE3getINS_11Application4Comp8ColliderEEENS_13intrusive_ptrIT_EERKj(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr") align 8 %1, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %12) #10
  %13 = call noundef zeroext i1 @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEE7invalidEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  br i1 %13, label %100, label %14

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  %15 = invoke ptr @_ZN3P3D11Application9Selection5beginEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
          to label %16 unwind label %20

16:                                               ; preds = %14
  store ptr %15, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %17 = invoke ptr @_ZN3P3D11Application9Selection3endEv(ptr noundef nonnull align 8 dereferenceable(80) @_ZN3P3D11Application13SelectionTool9selectionE)
          to label %18 unwind label %24

18:                                               ; preds = %16
  store ptr %17, ptr %3, align 8
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %85, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  br label %100

20:                                               ; preds = %14
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  %23 = extractvalue { ptr, i32 } %21, 1
  br label %97

24:                                               ; preds = %16
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  %27 = extractvalue { ptr, i32 } %25, 1
  br label %96

.lr.ph:                                           ; preds = %18, %85
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  call void @_ZN3P3D6Engine8RegistryImE3getINS_11Application4Comp8ColliderEEENS_13intrusive_ptrIT_EERKj(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(212) @_ZN3P3D11Application6screenE, ptr noundef nonnull align 4 dereferenceable(4) %28) #10
  %29 = call noundef zeroext i1 @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEE7invalidEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  br i1 %29, label %85, label %30

30:                                               ; preds = %.lr.ph
  %31 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = icmp eq ptr %33, %36
  br i1 %37, label %85, label %38

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #10
  %39 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK3P3D4Part9getCFrameEv(ptr noundef nonnull align 8 dereferenceable(200) %41)
  %43 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK3P3D4Part9getCFrameEv(ptr noundef nonnull align 8 dereferenceable(200) %45)
  invoke void @_ZNK3P3D12GlobalCFrame13globalToLocalERKS0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %5, ptr noundef nonnull align 8 dereferenceable(96) %42, ptr noundef nonnull align 8 dereferenceable(96) %46)
          to label %47 unwind label %60

47:                                               ; preds = %38
  %48 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #11
          to label %49 unwind label %64

49:                                               ; preds = %47
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %48, i8 0, i64 16, i1 false)
  call void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9) %48) #10
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN3P3D11Application6screenE, i64 224), align 8, !tbaa !12
  invoke void @_ZN3P3D16UpgradeableMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(96) %50)
          to label %51 unwind label %64

51:                                               ; preds = %49
  %52 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_11Application4Comp8ColliderEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #10
  invoke void @_ZN3P3D14CFrameTemplateIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %58 unwind label %68

58:                                               ; preds = %51
  invoke void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200) %54, ptr noundef %57, ptr noundef nonnull %48, ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %59 unwind label %68

59:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #10
  br label %82

60:                                               ; preds = %38
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  %63 = extractvalue { ptr, i32 } %61, 1
  br label %.loopexit

64:                                               ; preds = %82, %49, %47
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  %67 = extractvalue { ptr, i32 } %65, 1
  br label %.loopexit

68:                                               ; preds = %58, %51
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt16invalid_argument
  %70 = extractvalue { ptr, i32 } %69, 0
  %71 = extractvalue { ptr, i32 } %69, 1
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #10
  %72 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt16invalid_argument) #10
  %73 = icmp eq i32 %71, %72
  br i1 %73, label %74, label %.loopexit

74:                                               ; preds = %68
  %75 = call ptr @__cxa_begin_catch(ptr %70) #10
  %76 = load ptr, ptr %75, align 8, !tbaa !67
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  %78 = load ptr, ptr %77, align 8
  %79 = call noundef ptr %78(ptr noundef nonnull align 8 dereferenceable(16) %75) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %79, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %80 unwind label %88

80:                                               ; preds = %74
  invoke void (ptr, ...) @_ZN3Log5debugENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEz(ptr noundef nonnull %7)
          to label %81 unwind label %90

81:                                               ; preds = %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  invoke void @__cxa_end_catch()
          to label %82 unwind label %93

82:                                               ; preds = %81, %59
  %83 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN3P3D11Application6screenE, i64 224), align 8, !tbaa !12
  invoke void @_ZN3P3D16UpgradeableMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(96) %83)
          to label %84 unwind label %64

84:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #10
  br label %85

85:                                               ; preds = %30, %.lr.ph, %84
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  br i1 %87, label %.lr.ph, label %._crit_edge

88:                                               ; preds = %74
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %80
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  invoke void @__cxa_end_catch()
          to label %95 unwind label %102

93:                                               ; preds = %81
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %95

95:                                               ; preds = %92, %93
  %.pn16 = phi { ptr, i32 } [ %94, %93 ], [ %.pn, %92 ]
  %.1 = extractvalue { ptr, i32 } %.pn16, 0
  %.19 = extractvalue { ptr, i32 } %.pn16, 1
  br label %.loopexit

.loopexit:                                        ; preds = %68, %64, %95, %60
  %.311 = phi i32 [ %63, %60 ], [ %67, %64 ], [ %.19, %95 ], [ %71, %68 ]
  %.3 = phi ptr [ %62, %60 ], [ %66, %64 ], [ %.1, %95 ], [ %70, %68 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #10
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %96

96:                                               ; preds = %.loopexit, %24
  %.412 = phi i32 [ %.311, %.loopexit ], [ %27, %24 ]
  %.4 = phi ptr [ %.3, %.loopexit ], [ %26, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br label %97

97:                                               ; preds = %96, %20
  %.513 = phi i32 [ %.412, %96 ], [ %23, %20 ]
  %.5 = phi ptr [ %.4, %96 ], [ %22, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #10
  %98 = insertvalue { ptr, i32 } poison, ptr %.5, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %.513, 1
  resume { ptr, i32 } %99

100:                                              ; preds = %11, %._crit_edge
  call void @_ZN3P3D13intrusive_ptrINS_11Application4Comp8ColliderEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #10
  br label %101

101:                                              ; preds = %0, %100
  ret void

102:                                              ; preds = %92
  %103 = landingpad { ptr, i32 }
          catch ptr null
  %104 = extractvalue { ptr, i32 } %103, 0
  call void @__clang_call_terminate(ptr %104) #12
  unreachable
}

declare noundef i64 @_ZNK3P3D11Application9Selection4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3

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

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D11Application9SelectionixEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #3

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

declare ptr @_ZN3P3D11Application9Selection5beginEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3

declare ptr @_ZN3P3D11Application9Selection3endEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #4 align 2

declare void @_ZN3P3D16UpgradeableMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

declare void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @_ZN3Log5debugENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEz(ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #9

declare void @_ZN3P3D16UpgradeableMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nobuiltin allocsize(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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nofree nosync nounwind memory(none) }
attributes #9 = { noinline noreturn nounwind uwtable "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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { noreturn 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, !11, i64 16}
!6 = !{!"_ZTSN3P3D11Application4Comp8ColliderE", !7, i64 0, !11, i64 16}
!7 = !{!"_ZTSN3P3D2RCE", !8, i64 8}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!13, !11, i64 224}
!13 = !{!"_ZTSN3P3D11Application6ScreenE", !14, i64 0, !11, i64 216, !11, i64 224, !39, i64 232, !40, i64 240, !50, i64 816, !55, i64 848, !56, i64 912, !64, i64 992, !11, i64 1008, !11, i64 1016}
!14 = !{!"_ZTSN3P3D6Engine8RegistryImEE", !15, i64 0, !23, i64 48, !27, i64 72, !32, i64 128, !38, i64 208}
!15 = !{!"_ZTSSt3setImN3P3D6Engine8RegistryImE14entity_compareESaImEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeImmSt9_IdentityImEN3P3D6Engine8RegistryImE14entity_compareESaImEE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeImmSt9_IdentityImEN3P3D6Engine8RegistryImE14entity_compareESaImEE13_Rb_tree_implIS6_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareIN3P3D6Engine8RegistryImE14entity_compareEE", !19, i64 0}
!19 = !{!"_ZTSN3P3D6Engine8RegistryImE14entity_compareE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !8, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!23 = !{!"_ZTSSt6vectorIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPSt18unordered_multimapIjN3P3D13intrusive_ptrINS1_2RCEEESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEESaISE_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!27 = !{!"_ZTSSt13unordered_mapItNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashItESt8equal_toItESaISt4pairIKtS5_EEE", !28, i64 0}
!28 = !{!"_ZTSSt10_HashtableItSt4pairIKtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS8_ENSt8__detail10_Select1stESt8equal_toItESt4hashItENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE", !11, i64 0, !8, i64 8, !29, i64 16, !8, i64 24, !30, i64 32, !11, i64 48}
!29 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !11, i64 0}
!30 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !31, i64 0, !8, i64 8}
!31 = !{!"float", !9, i64 0}
!32 = !{!"_ZTSSt5queueIjSt5dequeIjSaIjEEE", !33, i64 0}
!33 = !{!"_ZTSSt5dequeIjSaIjEE", !34, i64 0}
!34 = !{!"_ZTSSt11_Deque_baseIjSaIjEE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE11_Deque_implE", !36, i64 0}
!36 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE16_Deque_impl_dataE", !11, i64 0, !8, i64 8, !37, i64 16, !37, i64 48}
!37 = !{!"_ZTSSt15_Deque_iteratorIjRjPjE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!38 = !{!"int", !9, i64 0}
!39 = !{!"_ZTSN3P3D6VectorIiLm2EEE", !9, i64 0}
!40 = !{!"_ZTSN3P3D11Application6CameraE", !9, i64 0, !41, i64 8, !41, i64 16, !42, i64 24, !43, i64 48, !41, i64 56, !41, i64 64, !42, i64 72, !43, i64 96, !43, i64 97, !44, i64 104, !41, i64 200, !41, i64 208, !43, i64 216, !41, i64 224, !31, i64 232, !31, i64 236, !31, i64 240, !31, i64 244, !49, i64 248, !49, i64 312, !49, i64 376, !49, i64 440, !49, i64 504, !11, i64 568}
!41 = !{!"double", !9, i64 0}
!42 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !9, i64 0}
!43 = !{!"bool", !9, i64 0}
!44 = !{!"_ZTSN3P3D12GlobalCFrameE", !45, i64 0, !47, i64 24}
!45 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !46, i64 0, !46, i64 8, !46, i64 16}
!46 = !{!"_ZTSN3P3D3FixILl32EEE", !8, i64 0}
!47 = !{!"_ZTSN3P3D22MatrixRotationTemplateIdEE", !48, i64 0}
!48 = !{!"_ZTSN3P3D6MatrixIdLm3ELm3EEE", !9, i64 0}
!49 = !{!"_ZTSN3P3D6MatrixIfLm4ELm4EEE", !9, i64 0}
!50 = !{!"_ZTSN3P3D6Engine10LayerStackE", !51, i64 0, !38, i64 24}
!51 = !{!"_ZTSSt6vectorIPN3P3D6Engine5LayerESaIS3_EE", !52, i64 0}
!52 = !{!"_ZTSSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE12_Vector_implE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIPN3P3D6Engine5LayerESaIS3_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!55 = !{!"_ZTSN3P3D11Application12EventHandlerE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!56 = !{!"_ZTSN4Util10PropertiesE", !57, i64 0, !59, i64 32}
!57 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !58, i64 0, !8, i64 8, !9, i64 16}
!58 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!59 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE", !60, i64 0}
!60 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !61, i64 0}
!61 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !62, i64 0, !20, i64 8}
!62 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !63, i64 0}
!63 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!64 = !{!"_ZTSSt10shared_ptrIN3P3D8Graphics11FrameBufferEE", !65, i64 0}
!65 = !{!"_ZTSSt12__shared_ptrIN3P3D8Graphics11FrameBufferELN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0, !66, i64 8}
!66 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0}
!67 = !{!68, !68, i64 0}
!68 = !{!"vtable pointer", !10, i64 0}


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