; LLVM IR from jrouwe/JoltPhysics :: Jolt/Core/Factory.ll (ZN3JPH7Factory8RegisterEPKNS_4RTTIE)

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

%"class.std::basic_string_view" = type { i64, ptr }
%"struct.std::pair.6" = type { %"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::iterator", i8, [7 x i8] }
%"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::iterator" = type { %"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::IteratorBase.base" = type <{ ptr, i32 }>
%"struct.std::pair.8" = type { %"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::iterator", i8, [7 x i8] }
%"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::iterator" = type { %"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::IteratorBase.base" = type <{ ptr, i32 }>
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Factory" = type { %"class.JPH::UnorderedMap", %"class.JPH::UnorderedMap.0" }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.0" = type { %"class.JPH::HashTable.base.2", [4 x i8] }
%"class.JPH::HashTable.base.2" = type <{ ptr, ptr, i32, i32, i32 }>

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1

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

; 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
declare dso_local noundef ptr @_ZN3JPH7Factory4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH7Factory8RegisterEPKNS_4RTTIE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::basic_string_view", align 8
  %7 = alloca %"struct.std::pair.6", align 8
  %8 = alloca %"struct.std::pair.8", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.JPH::AssertLastParam", align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef ptr @_ZNK3JPH4RTTI7GetNameEv(ptr noundef nonnull align 8 dereferenceable(104) %14)
  %16 = call noundef ptr @_ZN3JPH7Factory4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64) %13, ptr noundef %15)
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %56

19:                                               ; preds = %2
  %20 = getelementptr inbounds %"class.JPH::Factory", ptr %13, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef ptr @_ZNK3JPH4RTTI7GetNameEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %22) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZN3JPH12UnorderedMapISt17basic_string_viewIcSt11char_traitsIcEEPKNS_4RTTIENS_4HashIS4_EESt8equal_toIS4_EE11try_emplaceIJRS7_EEESt4pairINS_9HashTableIS4_SF_IS4_S7_ENS_18UnorderedMapDetailIS4_S7_EES9_SB_E8iteratorEbEOS4_DpOT_(ptr dead_on_unwind writable sret(%"struct.std::pair.6") align 8 %7, ptr noundef nonnull align 8 dereferenceable(28) %20, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %23 = getelementptr inbounds %"class.JPH::Factory", ptr %13, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK3JPH4RTTI7GetHashEv(ptr noundef nonnull align 8 dereferenceable(104) %24)
  store i32 %25, ptr %9, align 4, !tbaa !9
  call void @_ZN3JPH12UnorderedMapIjPKNS_4RTTIENS_4HashIjEESt8equal_toIjEE11try_emplaceIJRS3_EEESt4pairINS_9HashTableIjSB_IjS3_ENS_18UnorderedMapDetailIjS3_EES5_S7_E8iteratorEbEOjDpOT_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %8, ptr noundef nonnull align 8 dereferenceable(28) %23, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %26 = getelementptr inbounds %"struct.std::pair.8", ptr %8, i32 0, i32 1
  %27 = load i8, ptr %26, align 8, !tbaa !11, !range !16, !noundef !17
  %28 = trunc i8 %27 to i1
  %29 = xor i1 %28, true
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br i1 %29, label %30, label %36

30:                                               ; preds = %19
  br label %31

31:                                               ; preds = %30
  %32 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 43, ptr noundef @.str.2)
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !18
  br label %34

34:                                               ; preds = %33, %31
  br label %35

35:                                               ; preds = %34
  store i1 false, ptr %3, align 1
  br label %56

36:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %50, %36
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK3JPH4RTTI17GetBaseClassCountEv(ptr noundef nonnull align 8 dereferenceable(104) %39)
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  store i32 4, ptr %12, align 4
  br label %53

43:                                               ; preds = %37
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = call noundef ptr @_ZNK3JPH4RTTI12GetBaseClassEi(ptr noundef nonnull align 8 dereferenceable(104) %44, i32 noundef %45)
  %47 = call noundef zeroext i1 @_ZN3JPH7Factory8RegisterEPKNS_4RTTIE(ptr noundef nonnull align 8 dereferenceable(64) %13, ptr noundef %46)
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %53

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %11, align 4, !tbaa !9
  br label %37, !llvm.loop !19

53:                                               ; preds = %48, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %54 = load i32, ptr %12, align 4
  switch i32 %54, label %58 [
    i32 4, label %55
    i32 1, label %56
  ]

55:                                               ; preds = %53
  store i1 true, ptr %3, align 1
  br label %56

56:                                               ; preds = %55, %53, %35, %18
  %57 = load i1, ptr %3, align 1
  ret i1 %57

58:                                               ; preds = %53
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapISt17basic_string_viewIcSt11char_traitsIcEEPKNS_4RTTIENS_4HashIS4_EESt8equal_toIS4_EE11try_emplaceIJRS7_EEESt4pairINS_9HashTableIS4_SF_IS4_S7_ENS_18UnorderedMapDetailIS4_S7_EES9_SB_E8iteratorEbEOS4_DpOT_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.6") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapIjPKNS_4RTTIENS_4HashIjEESt8equal_toIjEE11try_emplaceIJRS3_EEESt4pairINS_9HashTableIjSB_IjS3_ENS_18UnorderedMapDetailIjS3_EES5_S7_E8iteratorEbEOjDpOT_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare noundef i32 @_ZNK3JPH4RTTI7GetHashEv(ptr noundef nonnull align 8 dereferenceable(104)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

declare noundef i32 @_ZNK3JPH4RTTI17GetBaseClassCountEv(ptr noundef nonnull align 8 dereferenceable(104)) #4

declare noundef ptr @_ZNK3JPH4RTTI12GetBaseClassEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #4

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !15, i64 16}
!12 = !{!"_ZTSSt4pairIN3JPH9HashTableIjS_IjPKNS0_4RTTIEENS0_18UnorderedMapDetailIjS4_EENS0_4HashIjEESt8equal_toIjEE8iteratorEbE", !13, i64 0, !15, i64 16}
!13 = !{!"_ZTSN3JPH9HashTableIjSt4pairIjPKNS_4RTTIEENS_18UnorderedMapDetailIjS4_EENS_4HashIjEESt8equal_toIjEE8iteratorE", !14, i64 0}
!14 = !{!"_ZTSN3JPH9HashTableIjSt4pairIjPKNS_4RTTIEENS_18UnorderedMapDetailIjS4_EENS_4HashIjEESt8equal_toIjEE12IteratorBaseISC_NSC_8iteratorEEE", !6, i64 0, !10, i64 8}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{i64 2157108167}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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

%"class.std::basic_string_view" = type { i64, ptr }
%"struct.std::pair.6" = type { %"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::iterator", i8, [7 x i8] }
%"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::iterator" = type { %"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<std::basic_string_view<char>, std::pair<std::basic_string_view<char>, const JPH::RTTI *>, JPH::UnorderedMapDetail<std::basic_string_view<char>, const JPH::RTTI *>, JPH::Hash<std::string_view>, std::equal_to<std::basic_string_view<char>>>::IteratorBase.base" = type <{ ptr, i32 }>
%"struct.std::pair.8" = type { %"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::iterator", i8, [7 x i8] }
%"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::iterator" = type { %"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<unsigned int, std::pair<unsigned int, const JPH::RTTI *>, JPH::UnorderedMapDetail<unsigned int, const JPH::RTTI *>, JPH::Hash<uint32>, std::equal_to<unsigned int>>::IteratorBase.base" = type <{ ptr, i32 }>

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH7Factory8RegisterEPKNS_4RTTIE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %1) local_unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::basic_string_view", align 8
  %5 = alloca %"struct.std::pair.6", align 8
  %6 = alloca %"struct.std::pair.8", align 8
  %7 = alloca i32, align 4
  store ptr %1, ptr %3, align 8, !tbaa !5
  %8 = tail call noundef ptr @_ZNK3JPH4RTTI7GetNameEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %9 = tail call noundef ptr @_ZN3JPH7Factory4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %8)
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %10, label %.loopexit

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %11 = tail call noundef ptr @_ZNK3JPH4RTTI7GetNameEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN3JPH12UnorderedMapISt17basic_string_viewIcSt11char_traitsIcEEPKNS_4RTTIENS_4HashIS4_EESt8equal_toIS4_EE11try_emplaceIJRS7_EEESt4pairINS_9HashTableIS4_SF_IS4_S7_ENS_18UnorderedMapDetailIS4_S7_EES9_SB_E8iteratorEbEOS4_DpOT_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.6") align 8 %5, ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call noundef i32 @_ZNK3JPH4RTTI7GetHashEv(ptr noundef nonnull align 8 dereferenceable(104) %13)
  store i32 %14, ptr %7, align 4, !tbaa !9
  call void @_ZN3JPH12UnorderedMapIjPKNS_4RTTIENS_4HashIjEESt8equal_toIjEE11try_emplaceIJRS3_EEESt4pairINS_9HashTableIjSB_IjS3_ENS_18UnorderedMapDetailIjS3_EES5_S7_E8iteratorEbEOjDpOT_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %6, ptr noundef nonnull align 8 dereferenceable(28) %12, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %15 = getelementptr inbounds i8, ptr %6, i64 16
  %16 = load i8, ptr %15, align 8, !tbaa !11, !range !16, !noundef !17
  %17 = trunc nuw i8 %16 to i1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br i1 %17, label %.preheader, label %21

.preheader:                                       ; preds = %10
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK3JPH4RTTI17GetBaseClassCountEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %20 = icmp slt i32 %19, 1
  br i1 %20, label %.loopexit, label %.lr.ph

21:                                               ; preds = %10
  %22 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 43, ptr noundef nonnull @.str.2)
  br i1 %22, label %23, label %.loopexit

23:                                               ; preds = %21
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !18
  br label %.loopexit

24:                                               ; preds = %.lr.ph
  %25 = add nuw nsw i32 %.057, 1
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef i32 @_ZNK3JPH4RTTI17GetBaseClassCountEv(ptr noundef nonnull align 8 dereferenceable(104) %26)
  %.not10 = icmp slt i32 %25, %27
  br i1 %.not10, label %.lr.ph, label %.loopexit, !llvm.loop !19

.lr.ph:                                           ; preds = %.preheader, %24
  %.057 = phi i32 [ %25, %24 ], [ 0, %.preheader ]
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call noundef ptr @_ZNK3JPH4RTTI12GetBaseClassEi(ptr noundef nonnull align 8 dereferenceable(104) %28, i32 noundef %.057)
  %30 = call noundef zeroext i1 @_ZN3JPH7Factory8RegisterEPKNS_4RTTIE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %29)
  br i1 %30, label %24, label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %24, %.preheader, %23, %21, %2
  %.1 = phi i1 [ true, %2 ], [ false, %21 ], [ false, %23 ], [ true, %.preheader ], [ %30, %24 ], [ %30, %.lr.ph ]
  ret i1 %.1
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapISt17basic_string_viewIcSt11char_traitsIcEEPKNS_4RTTIENS_4HashIS4_EESt8equal_toIS4_EE11try_emplaceIJRS7_EEESt4pairINS_9HashTableIS4_SF_IS4_S7_ENS_18UnorderedMapDetailIS4_S7_EES9_SB_E8iteratorEbEOS4_DpOT_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.6") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapIjPKNS_4RTTIENS_4HashIjEESt8equal_toIjEE11try_emplaceIJRS3_EEESt4pairINS_9HashTableIjSB_IjS3_ENS_18UnorderedMapDetailIjS3_EES5_S7_E8iteratorEbEOjDpOT_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZNK3JPH4RTTI7GetHashEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare noundef i32 @_ZNK3JPH4RTTI17GetBaseClassCountEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4

declare noundef ptr @_ZNK3JPH4RTTI12GetBaseClassEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #4

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !15, i64 16}
!12 = !{!"_ZTSSt4pairIN3JPH9HashTableIjS_IjPKNS0_4RTTIEENS0_18UnorderedMapDetailIjS4_EENS0_4HashIjEESt8equal_toIjEE8iteratorEbE", !13, i64 0, !15, i64 16}
!13 = !{!"_ZTSN3JPH9HashTableIjSt4pairIjPKNS_4RTTIEENS_18UnorderedMapDetailIjS4_EENS_4HashIjEESt8equal_toIjEE8iteratorE", !14, i64 0}
!14 = !{!"_ZTSN3JPH9HashTableIjSt4pairIjPKNS_4RTTIEENS_18UnorderedMapDetailIjS4_EENS_4HashIjEESt8equal_toIjEE12IteratorBaseISC_NSC_8iteratorEEE", !6, i64 0, !10, i64 8}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{i64 2157108167}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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