; LLVM IR from ThePhysicsGuys/Physics3D :: tests/ecsTests.ll (ZN3P3D11getChildrenEv)

; 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::Engine::Registry" = type <{ %"class.std::set", %"class.std::vector", %"class.std::unordered_map", %"class.std::queue", i8, [7 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, P3D::Engine::Registry<unsigned short>::entity_compare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, P3D::Engine::Registry<unsigned short>::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 char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, 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 char, std::allocator<unsigned char>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.P3D::Engine::Registry<unsigned short>::basic_view.22" = type <{ ptr, %class.filter_transform_iterator.23, [8 x i8] }>
%class.filter_transform_iterator.23 = type <{ %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator", %class.anon.24, [8 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.anon.24 = type <{ ptr, i8, [7 x i8] }>
%struct.iterator_end = type { i8 }
%class.TestInterface = type <{ i64, i8, [7 x i8] }>

@_ZN3P3D6Engine8RegistryItE11null_entityE = external dso_local global i8, align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() #3

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) #5 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 nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11getChildrenEv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::Engine::Registry", align 8
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.P3D::Engine::Registry<unsigned short>::basic_view.22", align 8
  %8 = alloca %class.filter_transform_iterator.23, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.iterator_end, align 1
  %12 = alloca %struct.iterator_end, align 1
  %13 = alloca %struct.iterator_end, align 1
  %14 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 216, ptr %1) #6
  call void @_ZN3P3D6Engine8RegistryItEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  %15 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %15, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  %16 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %16, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  %17 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %17, ptr %4, align 1, !tbaa !5
  %18 = call noundef zeroext i1 @_ZN3P3D6Engine8RegistryItE9setParentERKhS4_(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  %19 = zext i1 %18 to i8
  store i8 %19, ptr %2, align 1, !tbaa !5
  %20 = call noundef zeroext i1 @_ZN3P3D6Engine8RegistryItE9setParentERKhS4_(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  %21 = zext i1 %20 to i8
  store i8 %21, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #6
  call void @_ZN3P3D6Engine8RegistryItE11getChildrenERKh(ptr dead_on_unwind writable sret(%"class.P3D::Engine::Registry<unsigned short>::basic_view.22") align 8 %7, ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  store ptr %7, ptr %6, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #6
  %22 = load ptr, ptr %6, align 8, !tbaa !10
  invoke void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E5beginEv(ptr dead_on_unwind writable sret(%class.filter_transform_iterator.23) align 8 %8, ptr noundef nonnull align 8 dereferenceable(49) %22)
          to label %23 unwind label %30

23:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  %24 = load ptr, ptr %6, align 8, !tbaa !10
  invoke void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E3endEv(ptr noundef nonnull align 8 dereferenceable(49) %24)
          to label %25 unwind label %34

25:                                               ; preds = %23
  br label %26

26:                                               ; preds = %45, %25
  %27 = invoke noundef zeroext i1 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EneES2_(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %28 unwind label %34

28:                                               ; preds = %26
  br i1 %27, label %38, label %29

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %52

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %9, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %10, align 4
  br label %51

34:                                               ; preds = %43, %26, %23
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %9, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %10, align 4
  br label %50

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %39 = invoke noundef zeroext i8 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EdeEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %40 unwind label %46

40:                                               ; preds = %38
  store i8 %39, ptr %14, align 1, !tbaa !5
  %41 = load i64, ptr %5, align 8, !tbaa !8
  %42 = add i64 %41, 1
  store i64 %42, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %43

43:                                               ; preds = %40
  %44 = invoke noundef nonnull align 8 dereferenceable(33) ptr @_ZN25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EppEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %45 unwind label %34

45:                                               ; preds = %43
  br label %26

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %50

50:                                               ; preds = %46, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  br label %51

51:                                               ; preds = %50, %30
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %78

52:                                               ; preds = %29
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %5, align 8, !tbaa !8
  %55 = icmp eq i64 %54, 2
  br i1 %55, label %73, label %56

56:                                               ; preds = %53
  %57 = call ptr @_ZTW15__testInterface()
  %58 = getelementptr inbounds %class.TestInterface, ptr %57, i32 0, i32 1
  %59 = load i8, ptr %58, align 8, !tbaa !12, !range !15, !noundef !16
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  br label %62

62:                                               ; preds = %61, %56
  %63 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %63, i32 noundef 117, ptr noundef @.str.3)
          to label %64 unwind label %65

64:                                               ; preds = %62
  invoke void @__cxa_throw(ptr %63, ptr @_ZTI14AssertionError, ptr null) #7
          to label %84 unwind label %69

65:                                               ; preds = %62
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  call void @__cxa_free_exception(ptr %63) #6
  br label %78

69:                                               ; preds = %73, %64
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %9, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %10, align 4
  br label %78

73:                                               ; preds = %53
  %74 = call ptr @_ZTW15__testInterface()
  invoke void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %74)
          to label %75 unwind label %69

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  call void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1) #6
  call void @llvm.lifetime.end.p0(i64 216, ptr %1) #6
  ret void

78:                                               ; preds = %69, %65, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  call void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1) #6
  call void @llvm.lifetime.end.p0(i64 216, ptr %1) #6
  br label %79

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

84:                                               ; preds = %64
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryItE11getChildrenERKh(ptr dead_on_unwind noalias writable sret(%"class.P3D::Engine::Registry<unsigned short>::basic_view.22") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E5beginEv(ptr dead_on_unwind noalias writable sret(%class.filter_transform_iterator.23) align 8, ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EdeEv(ptr noundef nonnull align 8 dereferenceable(33)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"_ZTS13TestInterface", !9, i64 0, !14, i64 8}
!14 = !{!"bool", !6, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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::Engine::Registry" = type <{ %"class.std::set", %"class.std::vector", %"class.std::unordered_map", %"class.std::queue", i8, [7 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, P3D::Engine::Registry<unsigned short>::entity_compare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, P3D::Engine::Registry<unsigned short>::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 char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned char, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned char, 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 char, std::allocator<unsigned char>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned char, std::allocator<unsigned char>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.P3D::Engine::Registry<unsigned short>::basic_view.22" = type <{ ptr, %class.filter_transform_iterator.23, [8 x i8] }>
%class.filter_transform_iterator.23 = type <{ %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator", %class.anon.24, [8 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.anon.24 = type <{ ptr, i8, [7 x i8] }>

@_ZN3P3D6Engine8RegistryItE11null_entityE = external dso_local global i8, align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() local_unnamed_addr #3

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 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 nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11getChildrenEv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::Engine::Registry", align 8
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca %"class.P3D::Engine::Registry<unsigned short>::basic_view.22", align 8
  %6 = alloca %class.filter_transform_iterator.23, align 8
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %1) #6
  call void @_ZN3P3D6Engine8RegistryItEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  %7 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %7, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  %8 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %8, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  %9 = call noundef zeroext i8 @_ZN3P3D6Engine8RegistryItE6createERKh(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) @_ZN3P3D6Engine8RegistryItE11null_entityE) #6
  store i8 %9, ptr %4, align 1, !tbaa !5
  %10 = call noundef zeroext i1 @_ZN3P3D6Engine8RegistryItE9setParentERKhS4_(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  %11 = zext i1 %10 to i8
  store i8 %11, ptr %2, align 1, !tbaa !5
  %12 = call noundef zeroext i1 @_ZN3P3D6Engine8RegistryItE9setParentERKhS4_(ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  %13 = zext i1 %12 to i8
  store i8 %13, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #6
  call void @_ZN3P3D6Engine8RegistryItE11getChildrenERKh(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Engine::Registry<unsigned short>::basic_view.22") align 8 %5, ptr noundef nonnull align 8 dereferenceable(209) %1, ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  call void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E5beginEv(ptr dead_on_unwind nonnull writable sret(%class.filter_transform_iterator.23) align 8 %6, ptr noundef nonnull align 8 dereferenceable(49) %5)
  call void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E3endEv(ptr noundef nonnull align 8 dereferenceable(49) %5)
  %14 = call noundef zeroext i1 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EneES2_(ptr noundef nonnull align 8 dereferenceable(33) %6)
  br i1 %14, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  br label %23

._crit_edge:                                      ; preds = %17
  %15 = icmp eq i64 %18, 2
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  br i1 %15, label %31, label %23

.lr.ph:                                           ; preds = %0, %17
  %.09 = phi i64 [ %18, %17 ], [ 0, %0 ]
  %16 = invoke noundef zeroext i8 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EdeEv(ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %17 unwind label %21

17:                                               ; preds = %.lr.ph
  %18 = add i64 %.09, 1
  %19 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZN25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EppEv(ptr noundef nonnull align 8 dereferenceable(33) %6)
  %20 = call noundef zeroext i1 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EneES2_(ptr noundef nonnull align 8 dereferenceable(33) %6)
  br i1 %20, label %.lr.ph, label %._crit_edge

21:                                               ; preds = %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  br label %33

23:                                               ; preds = %._crit_edge.thread, %._crit_edge
  %24 = call ptr @_ZTW15__testInterface()
  %25 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %25, i32 noundef 117, ptr noundef nonnull @.str.3)
          to label %26 unwind label %27

26:                                               ; preds = %23
  invoke void @__cxa_throw(ptr nonnull %25, ptr nonnull @_ZTI14AssertionError, ptr null) #7
          to label %34 unwind label %29

27:                                               ; preds = %23
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %25) #6
  br label %33

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %._crit_edge
  %32 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %32)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1) #6
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %1) #6
  ret void

33:                                               ; preds = %29, %27, %21
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @_ZN3P3D6Engine8RegistryItED2Ev(ptr noundef nonnull align 8 dereferenceable(209) %1) #6
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn

34:                                               ; preds = %26
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryItE11getChildrenERKh(ptr dead_on_unwind noalias writable sret(%"class.P3D::Engine::Registry<unsigned short>::basic_view.22") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6Engine8RegistryItE10basic_viewINS2_7no_typeE25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZNS2_11getChildrenERKhEUlRKS7_E_ZNS2_11getChildrenESA_EUlSC_E0_ES8_E5beginEv(ptr dead_on_unwind noalias writable sret(%class.filter_transform_iterator.23) align 8, ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK25filter_transform_iteratorISt23_Rb_tree_const_iteratorItE12iterator_endZN3P3D6Engine8RegistryItE11getChildrenERKhEUlRKS1_E_ZNS6_11getChildrenES8_EUlSA_E0_EdeEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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