; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape (Shape)

; 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<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator" = type { %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator" = type { %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base.6", [4 x i8] }
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base.6" = type <{ ptr, i32 }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.13" = type { i64, i64, ptr }
%"class.JPH::RefConst" = type { ptr }
%"struct.std::pair" = type <{ ptr, i32, [4 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 @_ZNK3JPH5Shape16SaveWithChildrenERNS_9StreamOutERNS_12UnorderedMapIPKS0_jNS_4HashIS5_EESt8equal_toIS5_EEERNS3_IPKNS_15PhysicsMaterialEjNS6_ISE_EES8_ISE_EEE(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(28) %2, ptr noundef nonnull align 8 dereferenceable(28) %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator", align 8
  %10 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator", align 8
  %13 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Array", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.JPH::Array.13", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr %26, ptr %11, align 8, !tbaa !5
  call void @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EE4findERKS3_(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(28) %27, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE14const_iteratorC2ERKNSC_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE3endEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8 %13, ptr noundef nonnull align 8 dereferenceable(28) %28)
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE14const_iteratorC2ERKNSC_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(12) %13)
  %29 = call noundef zeroext i1 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEeqERKSF_(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br i1 %29, label %30, label %120

30:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %31)
  store i32 %32, ptr %14, align 4, !tbaa !9
  %33 = load i32, ptr %14, align 4, !tbaa !9
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr %26, ptr %15, align 8, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EEixERKS3_(ptr noundef nonnull align 8 dereferenceable(28) %34, ptr noundef nonnull align 8 dereferenceable(8) %15)
  store i32 %33, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %26, align 8, !tbaa !11
  %39 = getelementptr inbounds ptr, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(26) %26, ptr noundef nonnull align 8 dereferenceable(8) %37)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  %41 = load ptr, ptr %26, align 8, !tbaa !11
  %42 = getelementptr inbounds ptr, ptr %41, i64 27
  %43 = load ptr, ptr %42, align 8
  invoke void %43(ptr noundef nonnull align 8 dereferenceable(26) %26, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %44 unwind label %61

44:                                               ; preds = %30
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %46 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %47 unwind label %65

47:                                               ; preds = %44
  %48 = trunc i64 %46 to i32
  store i32 %48, ptr %19, align 4, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %49 unwind label %65

49:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store ptr %16, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %50 = load ptr, ptr %20, align 8, !tbaa !5
  %51 = invoke noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
          to label %52 unwind label %69

52:                                               ; preds = %49
  store ptr %51, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %53 = load ptr, ptr %20, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
          to label %55 unwind label %73

55:                                               ; preds = %52
  store ptr %54, ptr %22, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %101, %55
  %57 = load ptr, ptr %21, align 8, !tbaa !5
  %58 = load ptr, ptr %22, align 8, !tbaa !5
  %59 = icmp ne ptr %57, %58
  br i1 %59, label %77, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %107

61:                                               ; preds = %30
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %17, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %18, align 4
  br label %119

65:                                               ; preds = %47, %44
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %17, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %119

69:                                               ; preds = %49
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %17, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %18, align 4
  br label %106

73:                                               ; preds = %52
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %17, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %18, align 4
  br label %105

77:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %78 = load ptr, ptr %21, align 8, !tbaa !5
  %79 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %80 unwind label %86

80:                                               ; preds = %77
  store ptr %79, ptr %23, align 8, !tbaa !5
  %81 = load ptr, ptr %23, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %94

83:                                               ; preds = %80
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 -1, ptr %24, align 4, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %85 unwind label %90

85:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %100

86:                                               ; preds = %94, %77
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %17, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %18, align 4
  br label %104

90:                                               ; preds = %83
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %17, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %104

94:                                               ; preds = %80
  %95 = load ptr, ptr %23, align 8, !tbaa !5
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3JPH5Shape16SaveWithChildrenERNS_9StreamOutERNS_12UnorderedMapIPKS0_jNS_4HashIS5_EESt8equal_toIS5_EEERNS3_IPKNS_15PhysicsMaterialEjNS6_ISE_EES8_ISE_EEE(ptr noundef nonnull align 8 dereferenceable(26) %95, ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull align 8 dereferenceable(28) %97, ptr noundef nonnull align 8 dereferenceable(28) %98)
          to label %99 unwind label %86

99:                                               ; preds = %94
  br label %100

100:                                              ; preds = %99, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %21, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.JPH::RefConst", ptr %102, i32 1
  store ptr %103, ptr %21, align 8, !tbaa !5
  br label %56

104:                                              ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %105

105:                                              ; preds = %104, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %106

106:                                              ; preds = %105, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %119

107:                                              ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %108 = load ptr, ptr %26, align 8, !tbaa !11
  %109 = getelementptr inbounds ptr, ptr %108, i64 25
  %110 = load ptr, ptr %109, align 8
  invoke void %110(ptr noundef nonnull align 8 dereferenceable(26) %26, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %111 unwind label %115

111:                                              ; preds = %107
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3JPH11StreamUtils15SaveObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EEvRNS_9StreamOutERKT_PNS_12UnorderedMapIPKT0_jNS_4HashISH_EESt8equal_toISH_EEE(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef %113)
          to label %114 unwind label %115

114:                                              ; preds = %111
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %124

115:                                              ; preds = %111, %107
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %17, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %18, align 4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  br label %119

119:                                              ; preds = %115, %106, %65, %61
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %125

120:                                              ; preds = %4
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = call noundef ptr @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %9)
  %123 = getelementptr inbounds %"struct.std::pair", ptr %122, i32 0, i32 1
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull align 4 dereferenceable(4) %123)
  br label %124

124:                                              ; preds = %120, %114
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  ret void

125:                                              ; preds = %119
  %126 = load ptr, ptr %17, align 8
  %127 = load i32, ptr %18, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EE4findERKS3_(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEeqERKSF_(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 @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EEixERKS3_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) #1 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_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 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 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 = { 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::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator" = type { %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator" = type { %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base.6", [4 x i8] }
%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::IteratorBase.base.6" = type <{ ptr, i32 }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.13" = type { i64, i64, ptr }

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress 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 @_ZNK3JPH5Shape16SaveWithChildrenERNS_9StreamOutERNS_12UnorderedMapIPKS0_jNS_4HashIS5_EESt8equal_toIS5_EEERNS3_IPKNS_15PhysicsMaterialEjNS6_ISE_EES8_ISE_EEE(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(28) %2, ptr noundef nonnull align 8 dereferenceable(28) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator", align 8
  %6 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::const_iterator", align 8
  %9 = alloca %"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::Array", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.JPH::Array.13", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store ptr %0, ptr %7, align 8, !tbaa !5
  call void @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EE4findERKS3_(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(28) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE14const_iteratorC2ERKNSC_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(28) %2)
  call void @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE14const_iteratorC2ERKNSC_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %9)
  %16 = call noundef zeroext i1 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEeqERKSF_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br i1 %16, label %17, label %55

17:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %18 = call noundef i32 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %2)
  store i32 %18, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  store ptr %0, ptr %11, align 8, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EEixERKS3_(ptr noundef nonnull align 8 dereferenceable(28) %2, ptr noundef nonnull align 8 dereferenceable(8) %11)
  store i32 %18, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %20 = load ptr, ptr %0, align 8, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %20, i64 192
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %23 = load ptr, ptr %0, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %23, i64 216
  %25 = load ptr, ptr %24, align 8
  invoke void %25(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %26 unwind label %35

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %27 = call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %13, align 4, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %29 unwind label %37

29:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  %30 = call noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %31 = call noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.not30 = icmp eq ptr %30, %31
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %48, %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %32 = load ptr, ptr %0, align 8, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %32, i64 200
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %50 unwind label %52

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %54

37:                                               ; preds = %26
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  br label %54

.lr.ph:                                           ; preds = %29, %48
  %.02631 = phi ptr [ %49, %48 ], [ %30, %29 ]
  %39 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %.02631)
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %47

41:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 -1, ptr %14, align 4, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %42 unwind label %45

42:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  br label %48

43:                                               ; preds = %47
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %54

45:                                               ; preds = %41
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  br label %54

47:                                               ; preds = %.lr.ph
  invoke void @_ZNK3JPH5Shape16SaveWithChildrenERNS_9StreamOutERNS_12UnorderedMapIPKS0_jNS_4HashIS5_EESt8equal_toIS5_EEERNS3_IPKNS_15PhysicsMaterialEjNS6_ISE_EES8_ISE_EEE(ptr noundef nonnull align 8 dereferenceable(26) %39, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(28) %2, ptr noundef nonnull align 8 dereferenceable(28) %3)
          to label %48 unwind label %43

48:                                               ; preds = %47, %42
  %49 = getelementptr inbounds i8, ptr %.02631, i64 8
  %.not = icmp eq ptr %49, %31
  br i1 %.not, label %._crit_edge, label %.lr.ph

50:                                               ; preds = %._crit_edge
  invoke void @_ZN3JPH11StreamUtils15SaveObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EEvRNS_9StreamOutERKT_PNS_12UnorderedMapIPKT0_jNS_4HashISH_EESt8equal_toISH_EEE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull %3)
          to label %51 unwind label %52

51:                                               ; preds = %50
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br label %58

52:                                               ; preds = %50, %._crit_edge
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  br label %54

54:                                               ; preds = %43, %45, %52, %37, %35
  %.pn.pn = phi { ptr, i32 } [ %53, %52 ], [ %38, %37 ], [ %36, %35 ], [ %46, %45 ], [ %44, %43 ]
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn.pn

55:                                               ; preds = %4
  %56 = call noundef ptr @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  call void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %57)
  br label %58

58:                                               ; preds = %55, %51
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EE4findERKS3_(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEeqERKSF_(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 @_ZN3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<const JPH::Shape *, std::pair<const JPH::Shape *, unsigned int>, JPH::UnorderedMapDetail<const JPH::Shape *, unsigned int>, JPH::Hash<const JPH::Shape *>, std::equal_to<const JPH::Shape *>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapIPKNS_5ShapeEjNS_4HashIS3_EESt8equal_toIS3_EEixERKS3_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(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_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_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_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH9HashTableIPKNS_5ShapeESt4pairIS3_jENS_18UnorderedMapDetailIS3_jEENS_4HashIS3_EESt8equal_toIS3_EE12IteratorBaseIKSC_NSC_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 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 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 = { 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}


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