; LLVM IR from jrouwe/JoltPhysics :: JoltViewer (JoltViewer)

; 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.0 }
%union.anon.0 = type { i32 }
%"class.std::lock_guard" = type { ptr }
%"struct.JPH::AssertLastParam" = type { i8 }
%"struct.JPH::DebugRendererRecorder::GeometryBlob" = type <{ %"class.JPH::Mat44", %"class.JPH::Color", i32, i32, i32, i32, [12 x i8] }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.30 }
%union.anon.30 = type { <4 x float> }
%"class.JPH::DebugRendererRecorder" = type { %"class.JPH::DebugRenderer", %"class.JPH::Mutex", ptr, i32, i32, %"class.JPH::UnorderedMap.13", %"struct.JPH::DebugRendererRecorder::Frame" }
%"class.JPH::DebugRenderer" = type { ptr, %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::Ref", %"class.JPH::UnorderedMap", %"class.JPH::UnorderedMap", %"class.JPH::UnorderedMap.1", %"class.JPH::UnorderedMap.1", %"class.JPH::UnorderedMap.5", %"class.JPH::UnorderedMap.5", %"class.JPH::UnorderedMap.9", %"class.JPH::UnorderedMap.9" }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.1" = type { %"class.JPH::HashTable.base.3", [4 x i8] }
%"class.JPH::HashTable.base.3" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.5" = type { %"class.JPH::HashTable.base.7", [4 x i8] }
%"class.JPH::HashTable.base.7" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.9" = type { %"class.JPH::HashTable.base.11", [4 x i8] }
%"class.JPH::HashTable.base.11" = type <{ ptr, ptr, i32, i32, i32 }>
%"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.13" = type { %"class.JPH::HashTable.base.15", [4 x i8] }
%"class.JPH::HashTable.base.15" = type <{ ptr, ptr, i32, i32, i32 }>
%"struct.JPH::DebugRendererRecorder::Frame" = type { %"class.JPH::Array", %"class.JPH::Array.17", %"class.JPH::Array.20", %"class.JPH::Array.23" }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.17" = type { i64, i64, ptr }
%"class.JPH::Array.20" = type { i64, i64, ptr }
%"class.JPH::Array.23" = type { i64, i64, ptr }
%"class.JPH::DebugRenderer::Geometry" = type { %"class.JPH::RefTarget", %"class.JPH::Array.27", %"class.JPH::AABox" }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Array.27" = type { i64, i64, ptr }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::DebugRenderer::LOD" = type <{ %"class.JPH::Ref.26", float, [4 x i8] }>
%"class.JPH::Ref.26" = type { ptr }
%"class.JPH::DebugRendererRecorder::BatchImpl" = type { %"class.JPH::RefTargetVirtual", %"struct.std::atomic", i32 }
%"class.JPH::RefTargetVirtual" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; 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 uwtable
define dso_local void @_ZN3JPH21DebugRendererRecorder12DrawGeometryERKNS_5Mat44ERKNS_5AABoxEfNS_5ColorERKNS_3RefINS_13DebugRenderer8GeometryEEENS9_9ECullModeENS9_11ECastShadowENS9_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(512) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, ptr noundef nonnull align 16 dereferenceable(32) %2, float noundef %3, i32 %4, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.JPH::Color", align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::lock_guard", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca %"struct.JPH::AssertLastParam", align 1
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"struct.JPH::DebugRendererRecorder::GeometryBlob", align 16
  %31 = getelementptr inbounds %"class.JPH::Color", ptr %10, i32 0, i32 0
  %32 = getelementptr inbounds %union.anon.0, ptr %31, i32 0, i32 0
  store i32 %4, ptr %32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store float %3, ptr %14, align 4, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store i32 %6, ptr %16, align 4, !tbaa !11
  store i32 %7, ptr %17, align 4, !tbaa !13
  store i32 %8, ptr %18, align 4, !tbaa !15
  %33 = load ptr, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %34 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 1
  call void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(48) %34)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %35 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 5
  %36 = load ptr, ptr %15, align 8, !tbaa !5
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEjNS_4HashIS4_EESt8equal_toIS4_EEixERKS4_(ptr noundef nonnull align 8 dereferenceable(28) %35, ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %38 unwind label %58

38:                                               ; preds = %9
  store ptr %37, ptr %20, align 8, !tbaa !5
  %39 = load ptr, ptr %20, align 8, !tbaa !5
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %156

42:                                               ; preds = %38
  %43 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i8 2, ptr %23, align 1, !tbaa !43
  invoke void @_ZN3JPH9StreamOut5WriteINS_21DebugRendererRecorder8ECommandETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS5_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %45 unwind label %62

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  %46 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 4
  %47 = load i32, ptr %46, align 4, !tbaa !45
  %48 = add i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !45
  %49 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 %47, ptr %49, align 4, !tbaa !17
  br label %50

50:                                               ; preds = %45
  %51 = load ptr, ptr %20, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !17
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %66, label %54

54:                                               ; preds = %50
  %55 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 77)
          to label %56 unwind label %58

56:                                               ; preds = %54
  br i1 %55, label %57, label %66

57:                                               ; preds = %56
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !46
  br label %66

58:                                               ; preds = %85, %80, %77, %72, %68, %54, %9
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %21, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %22, align 4
  br label %176

62:                                               ; preds = %42
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %21, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  br label %176

66:                                               ; preds = %57, %56, %50
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %72 unwind label %58

72:                                               ; preds = %68
  %73 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  %76 = invoke noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %77 unwind label %58

77:                                               ; preds = %72
  %78 = getelementptr inbounds %"class.JPH::DebugRenderer::Geometry", ptr %76, i32 0, i32 2
  %79 = getelementptr inbounds %"class.JPH::AABox", ptr %78, i32 0, i32 0
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 16 dereferenceable(16) %79)
          to label %80 unwind label %58

80:                                               ; preds = %77
  %81 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !19
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = invoke noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %85 unwind label %58

85:                                               ; preds = %80
  %86 = getelementptr inbounds %"class.JPH::DebugRenderer::Geometry", ptr %84, i32 0, i32 2
  %87 = getelementptr inbounds %"class.JPH::AABox", ptr %86, i32 0, i32 1
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 16 dereferenceable(16) %87)
          to label %88 unwind label %58

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = invoke noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %91)
          to label %93 unwind label %114

93:                                               ; preds = %88
  %94 = getelementptr inbounds %"class.JPH::DebugRenderer::Geometry", ptr %92, i32 0, i32 1
  %95 = invoke noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94)
          to label %96 unwind label %114

96:                                               ; preds = %93
  %97 = trunc i64 %95 to i32
  store i32 %97, ptr %25, align 4, !tbaa !17
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %98 unwind label %114

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = invoke noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %99)
          to label %101 unwind label %118

101:                                              ; preds = %98
  %102 = getelementptr inbounds %"class.JPH::DebugRenderer::Geometry", ptr %100, i32 0, i32 1
  store ptr %102, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %103 = load ptr, ptr %26, align 8, !tbaa !5
  %104 = invoke noundef ptr @_ZN3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %103)
          to label %105 unwind label %122

105:                                              ; preds = %101
  store ptr %104, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %106 = load ptr, ptr %26, align 8, !tbaa !5
  %107 = invoke noundef ptr @_ZN3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %106)
          to label %108 unwind label %126

108:                                              ; preds = %105
  store ptr %107, ptr %28, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %145, %108
  %110 = load ptr, ptr %27, align 8, !tbaa !5
  %111 = load ptr, ptr %28, align 8, !tbaa !5
  %112 = icmp ne ptr %110, %111
  br i1 %112, label %130, label %113

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %155

114:                                              ; preds = %96, %93, %88
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %21, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %176

118:                                              ; preds = %98
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %21, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %22, align 4
  br label %154

122:                                              ; preds = %101
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %21, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %22, align 4
  br label %153

126:                                              ; preds = %105
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %21, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %22, align 4
  br label %152

130:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %131 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %131, ptr %29, align 8, !tbaa !5
  %132 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = load ptr, ptr %29, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.JPH::DebugRenderer::LOD", ptr %134, i32 0, i32 1
  invoke void @_ZN3JPH9StreamOut5WriteIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull align 4 dereferenceable(4) %135)
          to label %136 unwind label %148

136:                                              ; preds = %130
  %137 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 2
  %138 = load ptr, ptr %137, align 8, !tbaa !19
  %139 = load ptr, ptr %29, align 8, !tbaa !5
  %140 = getelementptr inbounds %"class.JPH::DebugRenderer::LOD", ptr %139, i32 0, i32 0
  %141 = invoke noundef ptr @_ZNK3JPH3RefINS_16RefTargetVirtualEE6GetPtrEv(ptr noundef nonnull align 8 dereferenceable(8) %140)
          to label %142 unwind label %148

142:                                              ; preds = %136
  %143 = getelementptr inbounds %"class.JPH::DebugRendererRecorder::BatchImpl", ptr %141, i32 0, i32 2
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull align 4 dereferenceable(4) %143)
          to label %144 unwind label %148

144:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %27, align 8, !tbaa !5
  %147 = getelementptr inbounds %"class.JPH::DebugRenderer::LOD", ptr %146, i32 1
  store ptr %147, ptr %27, align 8, !tbaa !5
  br label %109

148:                                              ; preds = %142, %136, %130
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %21, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %152

152:                                              ; preds = %148, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %153

153:                                              ; preds = %152, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %154

154:                                              ; preds = %153, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %176

155:                                              ; preds = %113
  br label %156

156:                                              ; preds = %155, %38
  %157 = getelementptr inbounds %"class.JPH::DebugRendererRecorder", ptr %33, i32 0, i32 6
  %158 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::Frame", ptr %157, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 96, ptr %30) #6
  %159 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 0
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %159, ptr align 16 %160, i64 64, i1 false), !tbaa.struct !47
  %161 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %161, ptr align 4 %10, i64 4, i1 false), !tbaa.struct !49
  %162 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 2
  %163 = load ptr, ptr %20, align 8, !tbaa !5
  %164 = load i32, ptr %163, align 4, !tbaa !17
  store i32 %164, ptr %162, align 4, !tbaa !50
  %165 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 3
  %166 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %166, ptr %165, align 8, !tbaa !54
  %167 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 4
  %168 = load i32, ptr %17, align 4, !tbaa !13
  store i32 %168, ptr %167, align 4, !tbaa !55
  %169 = getelementptr inbounds %"struct.JPH::DebugRendererRecorder::GeometryBlob", ptr %30, i32 0, i32 5
  %170 = load i32, ptr %18, align 4, !tbaa !15
  store i32 %170, ptr %169, align 16, !tbaa !56
  invoke void @_ZN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %158, ptr noundef nonnull align 16 dereferenceable(84) %30)
          to label %171 unwind label %172

171:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 96, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  ret void

172:                                              ; preds = %156
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %21, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 96, ptr %30) #6
  br label %176

176:                                              ; preds = %172, %154, %114, %62, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr %21, align 8
  %179 = load i32, ptr %22, align 4
  %180 = insertvalue { ptr, i32 } poison, ptr %178, 0
  %181 = insertvalue { ptr, i32 } %180, i32 %179, 1
  resume { ptr, i32 } %181
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(84)) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3JPH13DebugRenderer9ECullModeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN3JPH13DebugRenderer11ECastShadowE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN3JPH13DebugRenderer9EDrawModeE", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!20, !6, i64 368}
!20 = !{!"_ZTSN3JPH21DebugRendererRecorderE", !21, i64 0, !31, i64 320, !6, i64 368, !18, i64 376, !18, i64 380, !36, i64 384, !38, i64 416}
!21 = !{!"_ZTSN3JPH13DebugRendererE", !22, i64 8, !22, i64 16, !22, i64 24, !22, i64 32, !22, i64 40, !22, i64 48, !22, i64 56, !23, i64 64, !23, i64 96, !25, i64 128, !25, i64 160, !27, i64 192, !27, i64 224, !29, i64 256, !29, i64 288}
!22 = !{!"_ZTSN3JPH3RefINS_13DebugRenderer8GeometryEEE", !6, i64 0}
!23 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15SwingConeLimitsENS_3RefINS1_8GeometryEEENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !24, i64 0}
!24 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15SwingConeLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !18, i64 16, !18, i64 20, !18, i64 24}
!25 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer18SwingPyramidLimitsENS_3RefINS1_8GeometryEEENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !26, i64 0}
!26 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer18SwingPyramidLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !18, i64 16, !18, i64 20, !18, i64 24}
!27 = !{!"_ZTSN3JPH12UnorderedMapIfNS_3RefINS_13DebugRenderer8GeometryEEENS_4HashIfEESt8equal_toIfEEE", !28, i64 0}
!28 = !{!"_ZTSN3JPH9HashTableIfSt4pairIfNS_3RefINS_13DebugRenderer8GeometryEEEENS_18UnorderedMapDetailIfS5_EENS_4HashIfEESt8equal_toIfEEE", !6, i64 0, !6, i64 8, !18, i64 16, !18, i64 20, !18, i64 24}
!29 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15TaperedCylinderENS_3RefINS1_8GeometryEEENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !30, i64 0}
!30 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15TaperedCylinderESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !18, i64 16, !18, i64 20, !18, i64 24}
!31 = !{!"_ZTSN3JPH5MutexE", !32, i64 0, !34, i64 40}
!32 = !{!"_ZTSSt5mutex", !33, i64 0}
!33 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!34 = !{!"_ZTSNSt6thread2idE", !35, i64 0}
!35 = !{!"long", !7, i64 0}
!36 = !{!"_ZTSN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEjNS_4HashIS4_EESt8equal_toIS4_EEE", !37, i64 0}
!37 = !{!"_ZTSN3JPH9HashTableINS_3RefINS_13DebugRenderer8GeometryEEESt4pairIS4_jENS_18UnorderedMapDetailIS4_jEENS_4HashIS4_EESt8equal_toIS4_EEE", !6, i64 0, !6, i64 8, !18, i64 16, !18, i64 20, !18, i64 24}
!38 = !{!"_ZTSN3JPH21DebugRendererRecorder5FrameE", !39, i64 0, !40, i64 24, !41, i64 48, !42, i64 72}
!39 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder8LineBlobENS_12STLAllocatorIS2_EEEE", !35, i64 0, !35, i64 8, !6, i64 16}
!40 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder12TriangleBlobENS_12STLAllocatorIS2_EEEE", !35, i64 0, !35, i64 8, !6, i64 16}
!41 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder8TextBlobENS_12STLAllocatorIS2_EEEE", !35, i64 0, !35, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEEE", !35, i64 0, !35, i64 8, !6, i64 16}
!43 = !{!44, !44, i64 0}
!44 = !{!"_ZTSN3JPH21DebugRendererRecorder8ECommandE", !7, i64 0}
!45 = !{!20, !18, i64 380}
!46 = !{i64 2158571324}
!47 = !{i64 0, i64 64, !48}
!48 = !{!7, !7, i64 0}
!49 = !{i64 0, i64 4, !48}
!50 = !{!51, !18, i64 68}
!51 = !{!"_ZTSN3JPH21DebugRendererRecorder12GeometryBlobE", !52, i64 0, !53, i64 64, !18, i64 68, !12, i64 72, !14, i64 76, !16, i64 80}
!52 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!53 = !{!"_ZTSN3JPH5ColorE", !7, i64 0}
!54 = !{!51, !12, i64 72}
!55 = !{!51, !14, i64 76}
!56 = !{!51, !16, i64 80}


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

%"class.std::lock_guard" = type { ptr }
%"struct.JPH::DebugRendererRecorder::GeometryBlob" = type <{ %"class.JPH::Mat44", %"class.JPH::Color", i32, i32, i32, i32, [12 x i8] }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.30 }
%union.anon.30 = type { <4 x float> }
%"class.JPH::Color" = type { %union.anon.0 }
%union.anon.0 = type { i32 }

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 @_ZN3JPH9StreamOut5WriteINS_21DebugRendererRecorder8ECommandETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

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

; 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 uwtable
define dso_local void @_ZN3JPH21DebugRendererRecorder12DrawGeometryERKNS_5Mat44ERKNS_5AABoxEfNS_5ColorERKNS_3RefINS_13DebugRenderer8GeometryEEENS9_9ECullModeENS9_11ECastShadowENS9_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(512) %0, ptr nocapture noundef nonnull readonly align 16 dereferenceable(64) %1, ptr nocapture noundef nonnull readnone align 16 dereferenceable(32) %2, float noundef %3, i32 %4, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.std::lock_guard", align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca %"struct.JPH::DebugRendererRecorder::GeometryBlob", align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 320
  call void @_ZNSt10lock_guardIN3JPH5MutexEEC2ERS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(48) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 384
  %16 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEjNS_4HashIS4_EESt8equal_toIS4_EEixERKS4_(ptr noundef nonnull align 8 dereferenceable(28) %15, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %17 unwind label %31

17:                                               ; preds = %9
  %18 = load i32, ptr %16, align 4, !tbaa !5
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %.loopexit

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 368
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 2, ptr %11, align 1, !tbaa !34
  invoke void @_ZN3JPH9StreamOut5WriteINS_21DebugRendererRecorder8ECommandETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS5_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %23 unwind label %33

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  %24 = getelementptr inbounds i8, ptr %0, i64 380
  %25 = load i32, ptr %24, align 4, !tbaa !36
  %26 = add i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !36
  store i32 %25, ptr %16, align 4, !tbaa !5
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %27, label %35

27:                                               ; preds = %23
  %28 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 77)
          to label %29 unwind label %31

29:                                               ; preds = %27
  br i1 %28, label %30, label %35

30:                                               ; preds = %29
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !37
  br label %35

31:                                               ; preds = %41, %37, %35, %27, %9
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %78

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %78

35:                                               ; preds = %30, %29, %23
  %36 = load ptr, ptr %21, align 8, !tbaa !9
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %37 unwind label %31

37:                                               ; preds = %35
  %38 = load ptr, ptr %21, align 8, !tbaa !9
  %39 = call noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 16 dereferenceable(16) %40)
          to label %41 unwind label %31

41:                                               ; preds = %37
  %42 = load ptr, ptr %21, align 8, !tbaa !9
  %43 = call noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  invoke void @_ZN3JPH9StreamOut5WriteERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 16 dereferenceable(16) %44)
          to label %45 unwind label %31

45:                                               ; preds = %41
  %46 = load ptr, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %47 = call noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = call noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = trunc i64 %49 to i32
  store i32 %50, ptr %12, align 4, !tbaa !5
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %51 unwind label %56

51:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %52 = call noundef ptr @_ZNK3JPH3RefINS_13DebugRenderer8GeometryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = call noundef ptr @_ZN3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = call noundef ptr @_ZN3JPH5ArrayINS_13DebugRenderer3LODENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %.not2628 = icmp eq ptr %54, %55
  br i1 %.not2628, label %.loopexit, label %.lr.ph

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  br label %78

.lr.ph:                                           ; preds = %51, %64
  %.02529 = phi ptr [ %65, %64 ], [ %54, %51 ]
  %58 = load ptr, ptr %21, align 8, !tbaa !9
  %59 = getelementptr inbounds i8, ptr %.02529, i64 8
  invoke void @_ZN3JPH9StreamOut5WriteIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 4 dereferenceable(4) %59)
          to label %60 unwind label %66

60:                                               ; preds = %.lr.ph
  %61 = load ptr, ptr %21, align 8, !tbaa !9
  %62 = call noundef ptr @_ZNK3JPH3RefINS_16RefTargetVirtualEE6GetPtrEv(ptr noundef nonnull align 8 dereferenceable(8) %.02529)
  %63 = getelementptr inbounds i8, ptr %62, i64 12
  invoke void @_ZN3JPH9StreamOut5WriteIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRKS3_(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(4) %63)
          to label %64 unwind label %66

64:                                               ; preds = %60
  %65 = getelementptr inbounds i8, ptr %.02529, i64 16
  %.not26 = icmp eq ptr %65, %55
  br i1 %.not26, label %.loopexit, label %.lr.ph

66:                                               ; preds = %60, %.lr.ph
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %78

.loopexit:                                        ; preds = %64, %51, %17
  %68 = getelementptr inbounds i8, ptr %0, i64 488
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 16 dereferenceable(64) %1, i64 64, i1 false), !tbaa.struct !38
  %69 = getelementptr inbounds i8, ptr %13, i64 64
  store i32 %4, ptr %69, align 16, !tbaa !39
  %70 = getelementptr inbounds i8, ptr %13, i64 68
  %71 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %71, ptr %70, align 4, !tbaa !40
  %72 = getelementptr inbounds i8, ptr %13, i64 72
  store i32 %6, ptr %72, align 8, !tbaa !47
  %73 = getelementptr inbounds i8, ptr %13, i64 76
  store i32 %7, ptr %73, align 4, !tbaa !48
  %74 = getelementptr inbounds i8, ptr %13, i64 80
  store i32 %8, ptr %74, align 16, !tbaa !49
  invoke void @_ZN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 16 dereferenceable(84) %13)
          to label %75 unwind label %76

75:                                               ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %13) #6
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  ret void

76:                                               ; preds = %.loopexit
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %13) #6
  br label %78

78:                                               ; preds = %76, %66, %56, %33, %31
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %77, %76 ], [ %57, %56 ], [ %32, %31 ], [ %34, %33 ]
  call void @_ZNSt10lock_guardIN3JPH5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9StreamOut5WriteIfTnNSt9enable_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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH3RefINS_16RefTargetVirtualEE6GetPtrEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(84)) local_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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 368}
!10 = !{!"_ZTSN3JPH21DebugRendererRecorderE", !11, i64 0, !22, i64 320, !13, i64 368, !6, i64 376, !6, i64 380, !27, i64 384, !29, i64 416}
!11 = !{!"_ZTSN3JPH13DebugRendererE", !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !14, i64 64, !14, i64 96, !16, i64 128, !16, i64 160, !18, i64 192, !18, i64 224, !20, i64 256, !20, i64 288}
!12 = !{!"_ZTSN3JPH3RefINS_13DebugRenderer8GeometryEEE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15SwingConeLimitsENS_3RefINS1_8GeometryEEENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !15, i64 0}
!15 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15SwingConeLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!16 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer18SwingPyramidLimitsENS_3RefINS1_8GeometryEEENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !17, i64 0}
!17 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer18SwingPyramidLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!18 = !{!"_ZTSN3JPH12UnorderedMapIfNS_3RefINS_13DebugRenderer8GeometryEEENS_4HashIfEESt8equal_toIfEEE", !19, i64 0}
!19 = !{!"_ZTSN3JPH9HashTableIfSt4pairIfNS_3RefINS_13DebugRenderer8GeometryEEEENS_18UnorderedMapDetailIfS5_EENS_4HashIfEESt8equal_toIfEEE", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!20 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15TaperedCylinderENS_3RefINS1_8GeometryEEENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !21, i64 0}
!21 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15TaperedCylinderESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!22 = !{!"_ZTSN3JPH5MutexE", !23, i64 0, !25, i64 40}
!23 = !{!"_ZTSSt5mutex", !24, i64 0}
!24 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!25 = !{!"_ZTSNSt6thread2idE", !26, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEjNS_4HashIS4_EESt8equal_toIS4_EEE", !28, i64 0}
!28 = !{!"_ZTSN3JPH9HashTableINS_3RefINS_13DebugRenderer8GeometryEEESt4pairIS4_jENS_18UnorderedMapDetailIS4_jEENS_4HashIS4_EESt8equal_toIS4_EEE", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!29 = !{!"_ZTSN3JPH21DebugRendererRecorder5FrameE", !30, i64 0, !31, i64 24, !32, i64 48, !33, i64 72}
!30 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder8LineBlobENS_12STLAllocatorIS2_EEEE", !26, i64 0, !26, i64 8, !13, i64 16}
!31 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder12TriangleBlobENS_12STLAllocatorIS2_EEEE", !26, i64 0, !26, i64 8, !13, i64 16}
!32 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder8TextBlobENS_12STLAllocatorIS2_EEEE", !26, i64 0, !26, i64 8, !13, i64 16}
!33 = !{!"_ZTSN3JPH5ArrayINS_21DebugRendererRecorder12GeometryBlobENS_12STLAllocatorIS2_EEEE", !26, i64 0, !26, i64 8, !13, i64 16}
!34 = !{!35, !35, i64 0}
!35 = !{!"_ZTSN3JPH21DebugRendererRecorder8ECommandE", !7, i64 0}
!36 = !{!10, !6, i64 380}
!37 = !{i64 2158571324}
!38 = !{i64 0, i64 64, !39}
!39 = !{!7, !7, i64 0}
!40 = !{!41, !6, i64 68}
!41 = !{!"_ZTSN3JPH21DebugRendererRecorder12GeometryBlobE", !42, i64 0, !43, i64 64, !6, i64 68, !44, i64 72, !45, i64 76, !46, i64 80}
!42 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!43 = !{!"_ZTSN3JPH5ColorE", !7, i64 0}
!44 = !{!"_ZTSN3JPH13DebugRenderer9ECullModeE", !7, i64 0}
!45 = !{!"_ZTSN3JPH13DebugRenderer11ECastShadowE", !7, i64 0}
!46 = !{!"_ZTSN3JPH13DebugRenderer9EDrawModeE", !7, i64 0}
!47 = !{!41, !44, i64 72}
!48 = !{!41, !45, i64 76}
!49 = !{!41, !46, i64 80}


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