; LLVM IR from jrouwe/JoltPhysics :: Samples/Utils (ContactListenerImpl)

; 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.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator" = type { %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::SubShapeIDPair" = type { %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::BodyID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.std::pair" = type { %"class.JPH::Vec3", %"class.JPH::StaticArray.19" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::StaticArray.19" = type { i32, [12 x i8], [64 x %"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage" = type { [16 x i8] }
%class.ContactListenerImpl = type { %"class.JPH::ContactListener", %"class.JPH::Mutex", %"class.JPH::UnorderedMap", ptr }
%"class.JPH::ContactListener" = type { ptr }
%"class.JPH::Mutex" = type { %"class.std::mutex", %"class.std::thread::id" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::thread::id" = type { i64 }
%"struct.std::pair.20" = type { %"class.JPH::SubShapeIDPair", %"struct.std::pair" }

@_ZN3JPH5TraceE = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [22 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef, ptr noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ContactListenerImpl12RestoreStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.JPH::Array", align 8
  %7 = alloca %"class.JPH::UnorderedMap", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %12 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.JPH::SubShapeIDPair", align 4
  %16 = alloca %"struct.std::pair", align 16
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  %19 = load ptr, ptr @_ZN3JPH5TraceE, align 8, !tbaa !5
  call void (ptr, ...) %19(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %20)
  br i1 %21, label %22, label %25

22:                                               ; preds = %2
  %23 = getelementptr inbounds %class.ContactListenerImpl, ptr %18, i32 0, i32 2
  %24 = call noundef i32 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %23)
  store i32 %24, ptr %5, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %22, %2
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %7) #7
  %27 = getelementptr inbounds %class.ContactListenerImpl, ptr %18, i32 0, i32 2
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(28) %7, ptr noundef nonnull align 8 dereferenceable(28) %27) #7
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %28)
          to label %30 unwind label %40

30:                                               ; preds = %25
  br i1 %29, label %31, label %73

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr %7, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(28) %32)
          to label %33 unwind label %44

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %12, ptr noundef nonnull align 8 dereferenceable(28) %34)
          to label %35 unwind label %48

35:                                               ; preds = %33
  br label %36

36:                                               ; preds = %60, %35
  %37 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull align 8 dereferenceable(12) %12)
          to label %38 unwind label %48

38:                                               ; preds = %36
  br i1 %37, label %52, label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %67

40:                                               ; preds = %73, %71, %69, %67, %25
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  br label %162

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  br label %66

48:                                               ; preds = %58, %36, %33
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  br label %65

52:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %53 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %54 unwind label %61

54:                                               ; preds = %52
  store ptr %53, ptr %13, align 8, !tbaa !5
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.std::pair.20", ptr %55, i32 0, i32 0
  invoke void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(16) %56)
          to label %57 unwind label %61

57:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %58

58:                                               ; preds = %57
  %59 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %60 unwind label %48

60:                                               ; preds = %58
  br label %36

61:                                               ; preds = %54, %52
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %65

65:                                               ; preds = %61, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %66

66:                                               ; preds = %65, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %162

67:                                               ; preds = %39
  %68 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %69 unwind label %40

69:                                               ; preds = %67
  %70 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %71 unwind label %40

71:                                               ; preds = %69
  invoke void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef %68, ptr noundef %70)
          to label %72 unwind label %40

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72, %30
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  invoke void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %75)
          to label %76 unwind label %40

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %155, %76
  %78 = load i64, ptr %14, align 8, !tbaa !11
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = icmp ult i64 %78, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %161

83:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  invoke void @_ZN3JPH14SubShapeIDPairC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %15)
          to label %84 unwind label %92

84:                                               ; preds = %83
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %85)
          to label %87 unwind label %92

87:                                               ; preds = %84
  br i1 %86, label %88, label %96

88:                                               ; preds = %87
  %89 = load i64, ptr %14, align 8, !tbaa !11
  %90 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %89)
          to label %91 unwind label %92

91:                                               ; preds = %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %90, i64 16, i1 false), !tbaa.struct !13
  br label %96

92:                                               ; preds = %96, %88, %84, %83
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %8, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %9, align 4
  br label %160

96:                                               ; preds = %91, %87
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadINS_14SubShapeIDPairETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(16) %15)
          to label %98 unwind label %92

98:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1056, ptr %16) #7
  invoke void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEC2IS1_S3_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 16 dereferenceable(1056) %16)
          to label %99 unwind label %108

99:                                               ; preds = %98
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %100)
          to label %102 unwind label %112

102:                                              ; preds = %99
  br i1 %101, label %103, label %116

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %7, ptr noundef nonnull align 4 dereferenceable(16) %15)
          to label %105 unwind label %112

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056) %16, ptr noundef nonnull align 16 dereferenceable(1056) %104)
          to label %107 unwind label %112

107:                                              ; preds = %105
  br label %116

108:                                              ; preds = %98
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %8, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %9, align 4
  br label %159

112:                                              ; preds = %116, %105, %103, %99
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  br label %158

116:                                              ; preds = %107, %102
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 0
  invoke void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 16 dereferenceable(16) %118)
          to label %119 unwind label %112

119:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %120)
          to label %122 unwind label %129

122:                                              ; preds = %119
  br i1 %121, label %123, label %133

123:                                              ; preds = %122
  %124 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %7, ptr noundef nonnull align 4 dereferenceable(16) %15)
          to label %125 unwind label %129

125:                                              ; preds = %123
  %126 = getelementptr inbounds %"struct.std::pair", ptr %124, i32 0, i32 1
  %127 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %126)
          to label %128 unwind label %129

128:                                              ; preds = %125
  store i32 %127, ptr %17, align 4, !tbaa !9
  br label %133

129:                                              ; preds = %152, %149, %142, %138, %135, %133, %125, %123, %119
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %158

133:                                              ; preds = %128, %122
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %135 unwind label %129

135:                                              ; preds = %133
  %136 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %137 = load i32, ptr %17, align 4, !tbaa !9
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE6resizeEj(ptr noundef nonnull align 16 dereferenceable(1040) %136, i32 noundef %137)
          to label %138 unwind label %129

138:                                              ; preds = %135
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %141 = invoke noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040) %140)
          to label %142 unwind label %129

142:                                              ; preds = %138
  %143 = load i32, ptr %17, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = mul i64 %144, 16
  %146 = load ptr, ptr %139, align 8, !tbaa !14
  %147 = getelementptr inbounds ptr, ptr %146, i64 2
  %148 = load ptr, ptr %147, align 8
  invoke void %148(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef %141, i64 noundef %145)
          to label %149 unwind label %129

149:                                              ; preds = %142
  %150 = getelementptr inbounds %class.ContactListenerImpl, ptr %18, i32 0, i32 2
  %151 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %150, ptr noundef nonnull align 4 dereferenceable(16) %15)
          to label %152 unwind label %129

152:                                              ; preds = %149
  %153 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056) %151, ptr noundef nonnull align 16 dereferenceable(1056) %16)
          to label %154 unwind label %129

154:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056) %16) #7
  call void @llvm.lifetime.end.p0(i64 1056, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr %14, align 8, !tbaa !11
  %157 = add i64 %156, 1
  store i64 %157, ptr %14, align 8, !tbaa !11
  br label %77, !llvm.loop !16

158:                                              ; preds = %129, %112
  call void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056) %16) #7
  br label %159

159:                                              ; preds = %158, %108
  call void @llvm.lifetime.end.p0(i64 1056, ptr %16) #7
  br label %160

160:                                              ; preds = %159, %92
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %162

161:                                              ; preds = %82
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void

162:                                              ; preds = %160, %66, %40
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %8, align 8
  %165 = load i32, ptr %9, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14SubShapeIDPairC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEC2IS1_S3_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 16 dereferenceable(1056)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056), ptr noundef nonnull align 16 dereferenceable(1056)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE6resizeEj(ptr noundef nonnull align 16 dereferenceable(1040), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="128" "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 = { 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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator" = type { %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::SubShapeIDPair" = type { %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::BodyID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.std::pair" = type { %"class.JPH::Vec3", %"class.JPH::StaticArray.19" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::StaticArray.19" = type { i32, [12 x i8], [64 x %"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage" = type { [16 x i8] }

@_ZN3JPH5TraceE = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [22 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

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ContactListenerImpl12RestoreStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.JPH::Array", align 8
  %5 = alloca %"class.JPH::UnorderedMap", align 8
  %6 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %7 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %8 = alloca %"class.JPH::SubShapeIDPair", align 4
  %9 = alloca %"struct.std::pair", align 16
  %10 = alloca i32, align 4
  %11 = load ptr, ptr @_ZN3JPH5TraceE, align 8, !tbaa !5
  tail call void (ptr, ...) %11(ptr noundef nonnull @.str.4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %12 = tail call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %12, label %13, label %16

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  %15 = tail call noundef i32 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %14)
  store i32 %15, ptr %3, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %13, %2
  call void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #7
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 8 dereferenceable(28) %17) #7
  %18 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %18, label %19, label %39

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %20 unwind label %28

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %.preheader30 unwind label %.loopexit.split-lp

.preheader30:                                     ; preds = %20, %33
  %21 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %22 unwind label %.loopexit

22:                                               ; preds = %.preheader30
  br i1 %21, label %30, label %23

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %24 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %25 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef %24, ptr noundef %25)
          to label %39 unwind label %26

26:                                               ; preds = %39, %23
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %93

28:                                               ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %38

.loopexit:                                        ; preds = %.preheader30, %33
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %37

.loopexit.split-lp:                               ; preds = %20
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %37

30:                                               ; preds = %22
  %31 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %32 unwind label %35

32:                                               ; preds = %30
  invoke void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(16) %31)
          to label %33 unwind label %35

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %.preheader30 unwind label %.loopexit

35:                                               ; preds = %32, %30
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %37

37:                                               ; preds = %.loopexit, %.loopexit.split-lp, %35
  %.pn26 = phi { ptr, i32 } [ %36, %35 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %38

38:                                               ; preds = %37, %28
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %37 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %93

39:                                               ; preds = %23, %16
  %40 = load i32, ptr %3, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  invoke void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %41)
          to label %.preheader unwind label %26

.preheader:                                       ; preds = %39
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %43 = getelementptr inbounds i8, ptr %9, i64 16
  br label %44

._crit_edge:                                      ; preds = %86, %.preheader
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret void

44:                                               ; preds = %.lr.ph, %86
  %.031 = phi i64 [ 0, %.lr.ph ], [ %87, %86 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  invoke void @_ZN3JPH14SubShapeIDPairC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %45 unwind label %50

45:                                               ; preds = %44
  %46 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %46, label %47, label %52

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.031)
          to label %49 unwind label %50

49:                                               ; preds = %47
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %48, i64 16, i1 false), !tbaa.struct !11
  br label %52

50:                                               ; preds = %52, %47, %44
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %92

52:                                               ; preds = %49, %45
  invoke void @_ZN3JPH8StreamIn4ReadINS_14SubShapeIDPairETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %53 unwind label %50

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1056, ptr nonnull %9) #7
  call void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEC2IS1_S3_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 16 dereferenceable(1056) %9)
  %54 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %54, label %55, label %61

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %57 unwind label %59

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056) %9, ptr noundef nonnull align 16 dereferenceable(1056) %56)
          to label %61 unwind label %59

59:                                               ; preds = %61, %57, %55
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %91

61:                                               ; preds = %57, %53
  invoke void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %9)
          to label %62 unwind label %59

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %63 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %63, label %64, label %71

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %66 unwind label %69

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %65, i64 16
  %68 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %67)
  store i32 %68, ptr %10, align 4, !tbaa !9
  br label %71

69:                                               ; preds = %84, %82, %74, %72, %71, %64
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %91

71:                                               ; preds = %66, %62
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %72 unwind label %69

72:                                               ; preds = %71
  %73 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE6resizeEj(ptr noundef nonnull align 16 dereferenceable(1040) %43, i32 noundef %73)
          to label %74 unwind label %69

74:                                               ; preds = %72
  %75 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040) %43)
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = shl nuw nsw i64 %77, 4
  %79 = load ptr, ptr %1, align 8, !tbaa !12
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load ptr, ptr %80, align 8
  invoke void %81(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %75, i64 noundef %78)
          to label %82 unwind label %69

82:                                               ; preds = %74
  %83 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %17, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %84 unwind label %69

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056) %83, ptr noundef nonnull align 16 dereferenceable(1056) %9)
          to label %86 unwind label %69

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056) %9) #7
  call void @llvm.lifetime.end.p0(i64 1056, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  %87 = add nuw nsw i64 %.031, 1
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = icmp ult i64 %87, %89
  br i1 %90, label %44, label %._crit_edge, !llvm.loop !14

91:                                               ; preds = %69, %59
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %60, %59 ]
  call void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEED2Ev(ptr noundef nonnull align 16 dereferenceable(1056) %9) #7
  call void @llvm.lifetime.end.p0(i64 1056, ptr nonnull %9) #7
  br label %92

92:                                               ; preds = %91, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %91 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %93

93:                                               ; preds = %92, %38, %26
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %38 ], [ %.pn.pn, %92 ], [ %27, %26 ]
  call void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn26.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12UnorderedMapINS_14SubShapeIDPairESt4pairINS_4Vec3ENS_11StaticArrayIS3_Lj64EEEENS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14SubShapeIDPairC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_14SubShapeIDPairETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEC2IS1_S3_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 16 dereferenceable(1056)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1056) ptr @_ZNSt4pairIN3JPH4Vec3ENS0_11StaticArrayIS1_Lj64EEEEaSERKS4_(ptr noundef nonnull align 16 dereferenceable(1056), ptr noundef nonnull align 16 dereferenceable(1056)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE6resizeEj(ptr noundef nonnull align 16 dereferenceable(1040), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="128" "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 = { 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 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass