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

; 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::Color" = type { %union.anon.18 }
%union.anon.18 = type { i32 }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator" = type { %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.std::lock_guard" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%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::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] }

@_ZN3JPH13DebugRenderer9sInstanceE = external global ptr, align 8
@_ZN3JPH5TraceE = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZN3JPH5Color4sRedE = external global %"class.JPH::Color", align 4

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 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_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ContactListenerImpl9DrawStateEv(ptr noundef nonnull align 8 dereferenceable(96) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::lock_guard", align 8
  %4 = alloca ptr, 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>>::iterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %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>>::iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Color", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  %19 = load ptr, ptr @_ZN3JPH5TraceE, align 8, !tbaa !5
  call void (ptr, ...) %19(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %20 = getelementptr inbounds %class.ContactListenerImpl, ptr %18, i32 0, i32 1
  call void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(48) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %21 = getelementptr inbounds %class.ContactListenerImpl, ptr %18, i32 0, i32 2
  store ptr %21, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(28) %22)
          to label %23 unwind label %30

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

25:                                               ; preds = %23
  br label %26

26:                                               ; preds = %105, %25
  %27 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %8)
          to label %28 unwind label %34

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

29:                                               ; preds = %28
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %109

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

34:                                               ; preds = %103, %26, %23
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %6, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %7, align 4
  br label %107

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %39 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %40 unwind label %55

40:                                               ; preds = %38
  store ptr %39, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.std::pair.20", ptr %41, i32 0, i32 1
  %43 = getelementptr inbounds %"struct.std::pair", ptr %42, i32 0, i32 1
  store ptr %43, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = invoke noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE5beginEv(ptr noundef nonnull align 16 dereferenceable(1040) %44)
          to label %46 unwind label %59

46:                                               ; preds = %40
  store ptr %45, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = invoke noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE3endEv(ptr noundef nonnull align 16 dereferenceable(1040) %47)
          to label %49 unwind label %63

49:                                               ; preds = %46
  store ptr %48, ptr %13, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %93, %49
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = icmp ne ptr %51, %52
  br i1 %53, label %67, label %54

54:                                               ; preds = %50
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %102

55:                                               ; preds = %38
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %6, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %7, align 4
  br label %106

59:                                               ; preds = %40
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  br label %101

63:                                               ; preds = %46
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  br label %100

67:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %68, i64 16, i1 false), !tbaa.struct !9
  %69 = load ptr, ptr @_ZN3JPH13DebugRenderer9sInstanceE, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.std::pair.20", ptr %70, i32 0, i32 1
  %72 = getelementptr inbounds %"struct.std::pair", ptr %71, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !9
  %73 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %74 = load double, ptr %73, align 16
  %75 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %76 = load double, ptr %75, align 8
  %77 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %72, double %74, double %76)
          to label %78 unwind label %96

78:                                               ; preds = %67
  %79 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %80 = getelementptr inbounds %union.anon, ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds { double, double }, ptr %80, i32 0, i32 0
  %82 = extractvalue { double, double } %77, 0
  store double %82, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %80, i32 0, i32 1
  %84 = extractvalue { double, double } %77, 1
  store double %84, ptr %83, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 @_ZN3JPH5Color4sRedE, i64 4, i1 false), !tbaa.struct !11
  %85 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %86 = load double, ptr %85, align 16
  %87 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %88 = load double, ptr %87, align 8
  %89 = getelementptr inbounds %"class.JPH::Color", ptr %17, i32 0, i32 0
  %90 = getelementptr inbounds %union.anon.18, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 4
  invoke void @_ZN3JPH13DebugRenderer14DrawWireSphereENS_4Vec3EfNS_5ColorEi(ptr noundef nonnull align 8 dereferenceable(320) %69, double %86, double %88, float noundef 0x3FA99999A0000000, i32 %91, i32 noundef 1)
          to label %92 unwind label %96

92:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %93

93:                                               ; preds = %92
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.JPH::Vec3", ptr %94, i32 1
  store ptr %95, ptr %12, align 8, !tbaa !5
  br label %50

96:                                               ; preds = %78, %67
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %6, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %100

100:                                              ; preds = %96, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %101

101:                                              ; preds = %100, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %106

102:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %103

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %105 unwind label %34

105:                                              ; preds = %103
  br label %26

106:                                              ; preds = %101, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %107

107:                                              ; preds = %106, %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  br label %108

108:                                              ; preds = %107, %30
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %110

109:                                              ; preds = %29
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void

110:                                              ; preds = %108
  %111 = load ptr, ptr %6, align 8
  %112 = load i32, ptr %7, align 4
  %113 = insertvalue { ptr, i32 } poison, ptr %111, 0
  %114 = insertvalue { ptr, i32 } %113, i32 %112, 1
  resume { ptr, i32 } %114
}

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

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

declare void @_ZN3JPH13DebugRenderer14DrawWireSphereENS_4Vec3EfNS_5ColorEi(ptr noundef nonnull align 8 dereferenceable(320), double, double, float noundef, i32, i32 noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 16, !10}
!10 = !{!7, !7, i64 0}
!11 = !{i64 0, i64 4, !10}


; 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::Color" = type { %union.anon.18 }
%union.anon.18 = type { i32 }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator" = type { %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.std::lock_guard" = type { ptr }

@_ZN3JPH13DebugRenderer9sInstanceE = external local_unnamed_addr global ptr, align 8
@_ZN3JPH5TraceE = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZN3JPH5Color4sRedE = external local_unnamed_addr global %"class.JPH::Color", align 4

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 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_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19ContactListenerImpl9DrawStateEv(ptr noundef nonnull align 8 dereferenceable(96) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::lock_guard", align 8
  %3 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %4 = alloca %"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator", align 8
  %5 = load ptr, ptr @_ZN3JPH5TraceE, align 8, !tbaa !5
  tail call void (ptr, ...) %5(ptr noundef nonnull @.str.5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(48) %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  invoke void @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::SubShapeIDPair, std::pair<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::UnorderedMapDetail<JPH::SubShapeIDPair, std::pair<JPH::Vec3, JPH::StaticArray<JPH::Vec3, 64>>>, JPH::Hash<JPH::SubShapeIDPair>, std::equal_to<JPH::SubShapeIDPair>>::iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(28) %7)
          to label %8 unwind label %12

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

.preheader:                                       ; preds = %8, %._crit_edge
  %9 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEneERKSG_(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %4)
          to label %10 unwind label %.loopexit

10:                                               ; preds = %.preheader
  br i1 %9, label %14, label %11

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret void

12:                                               ; preds = %1
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %34

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

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

14:                                               ; preds = %10
  %15 = invoke noundef nonnull align 16 dereferenceable(1072) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
          to label %16 unwind label %22

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %15, i64 16
  %18 = getelementptr inbounds i8, ptr %15, i64 32
  %19 = call noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE5beginEv(ptr noundef nonnull align 16 dereferenceable(1040) %18)
  %20 = call noundef ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE3endEv(ptr noundef nonnull align 16 dereferenceable(1040) %18)
  %.not23 = icmp eq ptr %19, %20
  br i1 %.not23, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %29, %16
  %21 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH9HashTableINS_14SubShapeIDPairESt4pairIS1_S2_INS_4Vec3ENS_11StaticArrayIS3_Lj64EEEEENS_18UnorderedMapDetailIS1_S6_EENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseISE_NSE_8iteratorEEppEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
          to label %.preheader unwind label %.loopexit

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %33

.lr.ph:                                           ; preds = %16, %29
  %.01924 = phi ptr [ %30, %29 ], [ %19, %16 ]
  %.sroa.04.0.copyload = load double, ptr %.01924, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %.01924, i64 8
  %.sroa.5.0.copyload = load double, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !9
  %24 = load ptr, ptr @_ZN3JPH13DebugRenderer9sInstanceE, align 8, !tbaa !5
  %25 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %.sroa.04.0.copyload, double %.sroa.5.0.copyload)
          to label %26 unwind label %31

26:                                               ; preds = %.lr.ph
  %27 = extractvalue { double, double } %25, 0
  %28 = extractvalue { double, double } %25, 1
  %.sroa.0.0.copyload = load i32, ptr @_ZN3JPH5Color4sRedE, align 4, !tbaa !9
  invoke void @_ZN3JPH13DebugRenderer14DrawWireSphereENS_4Vec3EfNS_5ColorEi(ptr noundef nonnull align 8 dereferenceable(320) %24, double %27, double %28, float noundef 0x3FA99999A0000000, i32 %.sroa.0.0.copyload, i32 noundef 1)
          to label %29 unwind label %31

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %.01924, i64 16
  %.not = icmp eq ptr %30, %20
  br i1 %.not, label %._crit_edge, label %.lr.ph

31:                                               ; preds = %26, %.lr.ph
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %33

33:                                               ; preds = %.loopexit, %.loopexit.split-lp, %22, %31
  %.pn.pn = phi { ptr, i32 } [ %32, %31 ], [ %23, %22 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %34

34:                                               ; preds = %33, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %33 ], [ %13, %12 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

declare void @_ZN3JPH13DebugRenderer14DrawWireSphereENS_4Vec3EfNS_5ColorEi(ptr noundef nonnull align 8 dereferenceable(320), double, double, float noundef, i32, i32 noundef) local_unnamed_addr #4

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


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