; 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::Array" = type { i64, i64, ptr }
%"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>>::const_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.23", [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.23" = type <{ ptr, i32 }>
%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 }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"struct.std::pair.20" = type { %"class.JPH::SubShapeIDPair", %"struct.std::pair" }
%"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] }

; 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: mustprogress uwtable
define dso_local void @_ZNK19ContactListenerImpl9SaveStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) #1 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 ptr, align 8
  %8 = 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>>::const_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %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>>::const_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = 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>>::const_iterator", align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %21 = getelementptr inbounds %class.ContactListenerImpl, ptr %20, i32 0, i32 2
  %22 = call noundef i32 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %21)
  store i32 %22, ptr %5, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = getelementptr inbounds %class.ContactListenerImpl, ptr %20, i32 0, i32 2
  store ptr %25, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(28) %26)
          to label %27 unwind label %34

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(28) %28)
          to label %29 unwind label %38

29:                                               ; preds = %27
  br label %30

30:                                               ; preds = %50, %29
  %31 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEneERKSH_(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %32 unwind label %38

32:                                               ; preds = %30
  br i1 %31, label %42, label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %57

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

38:                                               ; preds = %48, %30, %27
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %55

42:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %43 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEdeEv(ptr noundef nonnull align 8 dereferenceable(12) %8)
          to label %44 unwind label %51

44:                                               ; preds = %42
  store ptr %43, ptr %12, align 8, !tbaa !5
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.std::pair.20", ptr %45, 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) %46)
          to label %47 unwind label %51

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %48

48:                                               ; preds = %47
  %49 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %8)
          to label %50 unwind label %38

50:                                               ; preds = %48
  br label %30

51:                                               ; preds = %44, %42
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %55

55:                                               ; preds = %51, %38
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %56

56:                                               ; preds = %55, %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %150

57:                                               ; preds = %33
  %58 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %59 unwind label %74

59:                                               ; preds = %57
  %60 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %61 unwind label %74

61:                                               ; preds = %59
  invoke void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef %58, ptr noundef %60)
          to label %62 unwind label %74

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr %6, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %63)
          to label %65 unwind label %78

65:                                               ; preds = %62
  store ptr %64, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = invoke noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %66)
          to label %68 unwind label %82

68:                                               ; preds = %65
  store ptr %67, ptr %15, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %126, %68
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = icmp ne ptr %70, %71
  br i1 %72, label %86, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %149

74:                                               ; preds = %61, %59, %57
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  br label %150

78:                                               ; preds = %62
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  br label %148

82:                                               ; preds = %65
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  br label %147

86:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %87, ptr %16, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN3JPH9StreamOut5WriteINS_14SubShapeIDPairETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS4_(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(16) %90)
          to label %91 unwind label %129

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %92 = getelementptr inbounds %class.ContactListenerImpl, ptr %20, i32 0, i32 2
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(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>>::const_iterator") align 8 %18, ptr noundef nonnull align 8 dereferenceable(28) %92, ptr noundef nonnull align 4 dereferenceable(16) %93)
          to label %94 unwind label %133

94:                                               ; preds = %91
  %95 = invoke noundef ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %18)
          to label %96 unwind label %133

96:                                               ; preds = %94
  %97 = getelementptr inbounds %"struct.std::pair.20", ptr %95, i32 0, i32 1
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  store ptr %97, ptr %17, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 0
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 16 dereferenceable(16) %101)
          to label %102 unwind label %137

102:                                              ; preds = %96
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %105 = load ptr, ptr %17, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.std::pair", ptr %105, i32 0, i32 1
  %107 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %106)
          to label %108 unwind label %141

108:                                              ; preds = %102
  store i32 %107, ptr %19, align 4, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %109 unwind label %141

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.std::pair", ptr %112, i32 0, i32 1
  %114 = invoke noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040) %113)
          to label %115 unwind label %137

115:                                              ; preds = %109
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.std::pair", ptr %116, i32 0, i32 1
  %118 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %117)
          to label %119 unwind label %137

119:                                              ; preds = %115
  %120 = zext i32 %118 to i64
  %121 = mul i64 %120, 16
  %122 = load ptr, ptr %111, align 8, !tbaa !11
  %123 = getelementptr inbounds ptr, ptr %122, i64 2
  %124 = load ptr, ptr %123, align 8
  invoke void %124(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef %114, i64 noundef %121)
          to label %125 unwind label %137

125:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds %"class.JPH::SubShapeIDPair", ptr %127, i32 1
  store ptr %128, ptr %14, align 8, !tbaa !5
  br label %69

129:                                              ; preds = %86
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %9, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %10, align 4
  br label %146

133:                                              ; preds = %94, %91
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %9, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %145

137:                                              ; preds = %119, %115, %109, %96
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %9, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %10, align 4
  br label %145

141:                                              ; preds = %108, %102
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %9, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %145

145:                                              ; preds = %141, %137, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %146

146:                                              ; preds = %145, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %147

147:                                              ; preds = %146, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %148

148:                                              ; preds = %147, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %150

149:                                              ; preds = %73
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void

150:                                              ; preds = %148, %74, %56
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %9, align 8
  %153 = load i32, ptr %10, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

; 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)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1072) ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEdeEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 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)) #3 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_EE12IteratorBaseIKSE_NSE_14const_iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040)) #2 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 #4 align 2

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


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

%"class.JPH::Array" = type { i64, i64, ptr }
%"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>>::const_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.23", [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.23" = type <{ ptr, i32 }>

; 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 uwtable
define dso_local void @_ZNK19ContactListenerImpl9SaveStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.JPH::Array", align 8
  %5 = 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>>::const_iterator", 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>>::const_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>>::const_iterator", align 8
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  %10 = 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) %9)
  store i32 %10, ptr %3, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  invoke void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(28) %9)
          to label %12 unwind label %18

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  invoke void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(28) %9)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %12, %23
  %13 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEneERKSH_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %14 unwind label %.loopexit

14:                                               ; preds = %.preheader
  br i1 %13, label %20, label %15

15:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %16 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %17 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  invoke void @_ZN3JPH9QuickSortIPNS_14SubShapeIDPairEEEvT_S3_(ptr noundef %16, ptr noundef %17)
          to label %29 unwind label %32

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

.loopexit:                                        ; preds = %.preheader, %23
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %27

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

20:                                               ; preds = %14
  %21 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEdeEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %22 unwind label %25

22:                                               ; preds = %20
  invoke void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(16) %21)
          to label %23 unwind label %25

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %.preheader unwind label %.loopexit

25:                                               ; preds = %22, %20
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %27

27:                                               ; preds = %.loopexit, %.loopexit.split-lp, %25
  %.pn30 = phi { ptr, i32 } [ %26, %25 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %28

28:                                               ; preds = %27, %18
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %27 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %60

29:                                               ; preds = %15
  %30 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %31 = call noundef ptr @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not34 = icmp eq ptr %30, %31
  br i1 %.not34, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %50, %29
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void

32:                                               ; preds = %15
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %60

.lr.ph:                                           ; preds = %29, %50
  %.02735 = phi ptr [ %51, %50 ], [ %30, %29 ]
  invoke void @_ZN3JPH9StreamOut5WriteINS_14SubShapeIDPairETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(16) %.02735)
          to label %34 unwind label %52

34:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  invoke void @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(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>>::const_iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef nonnull align 4 dereferenceable(16) %.02735)
          to label %35 unwind label %54

35:                                               ; preds = %34
  %36 = invoke noundef ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %37 unwind label %54

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %36, i64 16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 16 dereferenceable(16) %38)
          to label %39 unwind label %56

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %40 = getelementptr inbounds i8, ptr %36, i64 32
  %41 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %40)
  store i32 %41, ptr %8, align 4, !tbaa !5
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %42 unwind label %58

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %43 = call noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040) %40)
  %44 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %40)
  %45 = zext i32 %44 to i64
  %46 = shl nuw nsw i64 %45, 4
  %47 = load ptr, ptr %11, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %43, i64 noundef %46)
          to label %50 unwind label %56

50:                                               ; preds = %42
  %51 = getelementptr inbounds i8, ptr %.02735, i64 16
  %.not = icmp eq ptr %51, %31
  br i1 %.not, label %._crit_edge, label %.lr.ph

52:                                               ; preds = %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %60

54:                                               ; preds = %35, %34
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %60

56:                                               ; preds = %42, %37
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %39
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %60

60:                                               ; preds = %52, %58, %56, %54, %32, %28
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %28 ], [ %33, %32 ], [ %53, %52 ], [ %57, %56 ], [ %59, %58 ], [ %55, %54 ]
  call void @_ZN3JPH5ArrayINS_14SubShapeIDPairENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn30.pn.pn
}

; 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 #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(1072) ptr @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSE_NSE_14const_iteratorEEdeEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 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 #3 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_EE12IteratorBaseIKSE_NSE_14const_iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 align 2

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

; 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 #4 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 #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(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>>::const_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4dataEv(ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #2 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 #4 align 2

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


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