; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Renderer/DebugRendererImp.ll (ZN16DebugRendererImp17FinalizePrimitiveEv)

; 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.JPH::Ref" = type { ptr }
%"class.JPH::Ref.17" = type { ptr }
%"struct.DebugRendererImp::InstanceWithLODInfo" = type <{ %"struct.DebugRendererImp::Instance.base", [12 x i8], %"class.JPH::AABox", float, [12 x i8] }>
%"struct.DebugRendererImp::Instance.base" = type <{ %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Color" }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.DebugRendererImp = type { %"class.JPH::DebugRenderer", ptr, %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.JPH::Mutex", %"class.JPH::Ref.17", %"class.JPH::UnorderedMap.37", %"class.JPH::UnorderedMap.37", %"class.JPH::UnorderedMap.37", %"class.JPH::UnorderedMap.37", i32, [2 x %"class.JPH::Ref.41"], %"class.JPH::Ref.42", ptr, ptr, ptr, %"class.JPH::AABox", %"class.JPH::Array.43", %"class.JPH::Mutex", %"class.JPH::RefConst", %"class.JPH::Array.46", %"class.JPH::Mutex", %"class.std::unique_ptr" }
%"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::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::UnorderedMap.37" = type { %"class.JPH::HashTable.base.39", [4 x i8] }
%"class.JPH::HashTable.base.39" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::Ref.41" = type { ptr }
%"class.JPH::Ref.42" = type { ptr }
%"class.JPH::Array.43" = type { i64, i64, ptr }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Array.46" = type { i64, i64, 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.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.36" }
%"struct.std::_Head_base.36" = type { ptr }
%"struct.DebugRendererImp::Instances" = type { %"class.JPH::Array.52", %"class.JPH::Array.55", %"class.JPH::Array.55" }
%"class.JPH::Array.52" = type { i64, i64, ptr }
%"class.JPH::Array.55" = type { i64, i64, ptr }

@_ZN3JPH5Color6sWhiteE = 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef) #3 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef) #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16DebugRendererImp19InstanceWithLODInfoC2ERKN3JPH5Mat44ES4_NS1_5ColorERKNS1_5AABoxEf(ptr noundef nonnull align 16 dereferenceable(180), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), i32, ptr noundef nonnull align 16 dereferenceable(32), float noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16DebugRendererImp17FinalizePrimitiveEv(ptr noundef nonnull align 16 dereferenceable(816) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.JPH::Ref", align 8
  %4 = alloca %"class.JPH::Ref.17", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca %"struct.DebugRendererImp::InstanceWithLODInfo", align 16
  %9 = alloca %"class.JPH::Mat44", align 16
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca %"class.JPH::Color", align 4
  %12 = alloca %"class.JPH::AABox", align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  %14 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 16
  %15 = call noundef zeroext i1 @_ZNK3JPH3RefI15RenderPrimitiveEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
  br i1 %15, label %16, label %89

16:                                               ; preds = %1
  %17 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 16
  %18 = call noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 7
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %22 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 16
  %23 = call noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  %24 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 18
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 17
  %27 = load ptr, ptr %26, align 16, !tbaa !44
  %28 = ptrtoint ptr %25 to i64
  %29 = ptrtoint ptr %27 to i64
  %30 = sub i64 %28, %29
  %31 = sdiv exact i64 %30, 36
  %32 = trunc i64 %31 to i32
  call void @_ZN15RenderPrimitive15SetNumVtxToDrawEi(ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef %32)
  %33 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 12
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %34 = call noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef 64)
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %35 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 16
  %36 = invoke noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveE6GetPtrEv(ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %37 unwind label %62

37:                                               ; preds = %16
  invoke void @_ZN3JPH3RefINS_16RefTargetVirtualEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %36)
          to label %38 unwind label %62

38:                                               ; preds = %37
  %39 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 20
  invoke void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64) %34, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 16 dereferenceable(32) %39)
          to label %40 unwind label %66

40:                                               ; preds = %38
  store i1 false, ptr %7, align 1
  invoke void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %34)
          to label %41 unwind label %66

41:                                               ; preds = %40
  %42 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEN16DebugRendererImp9InstancesENS_4HashIS4_EESt8equal_toIS4_EEixERKS4_(ptr noundef nonnull align 8 dereferenceable(28) %33, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %43 unwind label %70

43:                                               ; preds = %41
  %44 = getelementptr inbounds %"struct.DebugRendererImp::Instances", ptr %42, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 192, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #8
  invoke void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %9)
          to label %45 unwind label %74

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #8
  invoke void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %10)
          to label %46 unwind label %78

46:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 @_ZN3JPH5Color6sWhiteE, i64 4, i1 false), !tbaa.struct !45
  %47 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 20
  %48 = getelementptr inbounds %"class.JPH::Color", ptr %11, i32 0, i32 0
  %49 = getelementptr inbounds %union.anon.0, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 4
  invoke void @_ZN16DebugRendererImp19InstanceWithLODInfoC2ERKN3JPH5Mat44ES4_NS1_5ColorERKNS1_5AABoxEf(ptr noundef nonnull align 16 dereferenceable(180) %8, ptr noundef nonnull align 16 dereferenceable(64) %9, ptr noundef nonnull align 16 dereferenceable(64) %10, i32 %50, ptr noundef nonnull align 16 dereferenceable(32) %47, float noundef 1.000000e+00)
          to label %51 unwind label %78

51:                                               ; preds = %46
  invoke void @_ZN3JPH5ArrayIN16DebugRendererImp19InstanceWithLODInfoENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 16 dereferenceable(180) %8)
          to label %52 unwind label %78

52:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %8) #8
  call void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  %53 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 14
  %54 = load i32, ptr %53, align 16, !tbaa !47
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %53, align 16, !tbaa !47
  %56 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 16
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH3RefI15RenderPrimitiveEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef null)
  %58 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 17
  store ptr null, ptr %58, align 16, !tbaa !44
  %59 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 18
  store ptr null, ptr %59, align 8, !tbaa !11
  %60 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 19
  store ptr null, ptr %60, align 16, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
  %61 = getelementptr inbounds %class.DebugRendererImp, ptr %13, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %61, ptr align 16 %12, i64 32, i1 false), !tbaa.struct !49
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %89

62:                                               ; preds = %37, %16
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %5, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %6, align 4
  br label %85

66:                                               ; preds = %40, %38
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %5, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %6, align 4
  br label %84

70:                                               ; preds = %41
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %5, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %6, align 4
  br label %83

74:                                               ; preds = %43
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %5, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %6, align 4
  br label %82

78:                                               ; preds = %51, %46, %45
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %5, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #8
  br label %82

82:                                               ; preds = %78, %74
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %8) #8
  br label %83

83:                                               ; preds = %82, %70
  call void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br label %84

84:                                               ; preds = %83, %66
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br label %85

85:                                               ; preds = %84, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  %86 = load i1, ptr %7, align 1
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef %34) #8
  br label %88

88:                                               ; preds = %87, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %90

89:                                               ; preds = %52, %1
  ret void

90:                                               ; preds = %88
  %91 = load ptr, ptr %5, align 8
  %92 = load i32, ptr %6, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15RenderPrimitive15SetNumVtxToDrawEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #7 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { alwaysinline 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 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 = { alwaysinline 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 = { 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 #7 = { 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 #8 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 600}
!12 = !{!"_ZTS16DebugRendererImp", !13, i64 0, !6, i64 320, !24, i64 328, !24, i64 336, !24, i64 344, !24, i64 352, !24, i64 360, !24, i64 368, !30, i64 376, !35, i64 424, !36, i64 432, !36, i64 464, !36, i64 496, !36, i64 528, !17, i64 560, !7, i64 568, !38, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !39, i64 624, !41, i64 656, !30, i64 680, !42, i64 728, !43, i64 736, !30, i64 760, !24, i64 808}
!13 = !{!"_ZTSN3JPH13DebugRendererE", !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !15, i64 64, !15, i64 96, !18, i64 128, !18, i64 160, !20, i64 192, !20, i64 224, !22, i64 256, !22, i64 288}
!14 = !{!"_ZTSN3JPH3RefINS_13DebugRenderer8GeometryEEE", !6, i64 0}
!15 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15SwingConeLimitsENS_3RefINS1_8GeometryEEENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !16, i64 0}
!16 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15SwingConeLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21SwingConeLimitsHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer18SwingPyramidLimitsENS_3RefINS1_8GeometryEEENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !19, i64 0}
!19 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer18SwingPyramidLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!20 = !{!"_ZTSN3JPH12UnorderedMapIfNS_3RefINS_13DebugRenderer8GeometryEEENS_4HashIfEESt8equal_toIfEEE", !21, i64 0}
!21 = !{!"_ZTSN3JPH9HashTableIfSt4pairIfNS_3RefINS_13DebugRenderer8GeometryEEEENS_18UnorderedMapDetailIfS5_EENS_4HashIfEESt8equal_toIfEEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!22 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15TaperedCylinderENS_3RefINS1_8GeometryEEENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !23, i64 0}
!23 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15TaperedCylinderESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!24 = !{!"_ZTSSt10unique_ptrI13PipelineStateSt14default_deleteIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt15__uniq_ptr_dataI13PipelineStateSt14default_deleteIS0_ELb1ELb1EE", !26, i64 0}
!26 = !{!"_ZTSSt15__uniq_ptr_implI13PipelineStateSt14default_deleteIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt5tupleIJP13PipelineStateSt14default_deleteIS0_EEE", !28, i64 0}
!28 = !{!"_ZTSSt11_Tuple_implILm0EJP13PipelineStateSt14default_deleteIS0_EEE", !29, i64 0}
!29 = !{!"_ZTSSt10_Head_baseILm0EP13PipelineStateLb0EE", !6, i64 0}
!30 = !{!"_ZTSN3JPH5MutexE", !31, i64 0, !33, i64 40}
!31 = !{!"_ZTSSt5mutex", !32, i64 0}
!32 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!33 = !{!"_ZTSNSt6thread2idE", !34, i64 0}
!34 = !{!"long", !7, i64 0}
!35 = !{!"_ZTSN3JPH3RefINS_16RefTargetVirtualEEE", !6, i64 0}
!36 = !{!"_ZTSN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEN16DebugRendererImp9InstancesENS_4HashIS4_EESt8equal_toIS4_EEE", !37, i64 0}
!37 = !{!"_ZTSN3JPH9HashTableINS_3RefINS_13DebugRenderer8GeometryEEESt4pairIS4_N16DebugRendererImp9InstancesEENS_18UnorderedMapDetailIS4_S7_EENS_4HashIS4_EESt8equal_toIS4_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!38 = !{!"_ZTSN3JPH3RefI15RenderPrimitiveEE", !6, i64 0}
!39 = !{!"_ZTSN3JPH5AABoxE", !40, i64 0, !40, i64 16}
!40 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!41 = !{!"_ZTSN3JPH5ArrayIN16DebugRendererImp4TextENS_12STLAllocatorIS2_EEEE", !34, i64 0, !34, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH8RefConstI4FontEE", !6, i64 0}
!43 = !{!"_ZTSN3JPH5ArrayIN16DebugRendererImp4LineENS_12STLAllocatorIS2_EEEE", !34, i64 0, !34, i64 8, !6, i64 16}
!44 = !{!12, !6, i64 592}
!45 = !{i64 0, i64 4, !46}
!46 = !{!7, !7, i64 0}
!47 = !{!12, !17, i64 560}
!48 = !{!12, !6, i64 608}
!49 = !{i64 0, i64 16, !46, i64 16, i64 16, !46}


; 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.0 }
%union.anon.0 = type { i32 }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Ref.17" = type { ptr }
%"struct.DebugRendererImp::InstanceWithLODInfo" = type <{ %"struct.DebugRendererImp::Instance.base", [12 x i8], %"class.JPH::AABox", float, [12 x i8] }>
%"struct.DebugRendererImp::Instance.base" = type <{ %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Color" }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16DebugRendererImp19InstanceWithLODInfoC2ERKN3JPH5Mat44ES4_NS1_5ColorERKNS1_5AABoxEf(ptr noundef nonnull align 16 dereferenceable(180), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), i32, ptr noundef nonnull align 16 dereferenceable(32), float noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16DebugRendererImp17FinalizePrimitiveEv(ptr noundef nonnull align 16 dereferenceable(816) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::Ref", align 8
  %3 = alloca %"class.JPH::Ref.17", align 8
  %4 = alloca %"struct.DebugRendererImp::InstanceWithLODInfo", align 16
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Mat44", align 16
  %7 = alloca %"class.JPH::AABox", align 16
  %8 = getelementptr inbounds i8, ptr %0, i64 584
  %9 = tail call noundef zeroext i1 @_ZNK3JPH3RefI15RenderPrimitiveEneEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef null)
  br i1 %9, label %10, label %55

10:                                               ; preds = %1
  %11 = tail call noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 56
  %14 = load ptr, ptr %13, align 8
  tail call void %14(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %15 = tail call noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %16 = getelementptr inbounds i8, ptr %0, i64 600
  %17 = load ptr, ptr %16, align 8, !tbaa !8
  %18 = getelementptr inbounds i8, ptr %0, i64 592
  %19 = load ptr, ptr %18, align 16, !tbaa !43
  %20 = ptrtoint ptr %17 to i64
  %21 = ptrtoint ptr %19 to i64
  %22 = sub i64 %20, %21
  %23 = sdiv exact i64 %22, 36
  %24 = trunc i64 %23 to i32
  tail call void @_ZN15RenderPrimitive15SetNumVtxToDrawEi(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %24)
  %25 = getelementptr inbounds i8, ptr %0, i64 496
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %26 = tail call noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef 64)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %27 = tail call noundef ptr @_ZNK3JPH3RefI15RenderPrimitiveE6GetPtrEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZN3JPH3RefINS_16RefTargetVirtualEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %27)
          to label %28 unwind label %.thread

28:                                               ; preds = %10
  %29 = getelementptr inbounds i8, ptr %0, i64 624
  invoke void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64) %26, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 16 dereferenceable(32) %29)
          to label %31 unwind label %.thread21

.thread21:                                        ; preds = %28
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %53

31:                                               ; preds = %28
  invoke void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %26)
          to label %32 unwind label %51

32:                                               ; preds = %31
  %33 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEN16DebugRendererImp9InstancesENS_4HashIS4_EESt8equal_toIS4_EEixERKS4_(ptr noundef nonnull align 8 dereferenceable(28) %25, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %34 unwind label %44

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #9
  invoke void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5)
          to label %35 unwind label %46

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #9
  invoke void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6)
          to label %36 unwind label %48

36:                                               ; preds = %35
  %.sroa.0.0.copyload = load i32, ptr @_ZN3JPH5Color6sWhiteE, align 4, !tbaa !44
  invoke void @_ZN16DebugRendererImp19InstanceWithLODInfoC2ERKN3JPH5Mat44ES4_NS1_5ColorERKNS1_5AABoxEf(ptr noundef nonnull align 16 dereferenceable(180) %4, ptr noundef nonnull align 16 dereferenceable(64) %5, ptr noundef nonnull align 16 dereferenceable(64) %6, i32 %.sroa.0.0.copyload, ptr noundef nonnull align 16 dereferenceable(32) %29, float noundef 1.000000e+00)
          to label %37 unwind label %48

37:                                               ; preds = %36
  invoke void @_ZN3JPH5ArrayIN16DebugRendererImp19InstanceWithLODInfoENS_12STLAllocatorIS2_EEE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 16 dereferenceable(180) %4)
          to label %38 unwind label %48

38:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #9
  call void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %39 = getelementptr inbounds i8, ptr %0, i64 560
  %40 = load i32, ptr %39, align 16, !tbaa !45
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %39, align 16, !tbaa !45
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH3RefI15RenderPrimitiveEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef null)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %18, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %7)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %29, ptr noundef nonnull align 16 dereferenceable(32) %7, i64 32, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %55

.thread:                                          ; preds = %10
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %53

44:                                               ; preds = %32
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %.thread18

46:                                               ; preds = %34
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %37, %36, %35
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #9
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #9
  br label %.thread18

.thread18:                                        ; preds = %44, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %45, %44 ]
  call void @_ZN3JPH3RefINS_13DebugRenderer8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %54

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %54

53:                                               ; preds = %.thread21, %.thread
  %.pn.pn.pn.pn17 = phi { ptr, i32 } [ %43, %.thread ], [ %30, %.thread21 ]
  call void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef %26) #9
  br label %54

54:                                               ; preds = %51, %.thread18, %53
  %.pn.pn.pn.pn16 = phi { ptr, i32 } [ %.pn.pn.pn.pn17, %53 ], [ %52, %51 ], [ %.pn.pn, %.thread18 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn.pn.pn.pn16

55:                                               ; preds = %38, %1
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15RenderPrimitive15SetNumVtxToDrawEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #7 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sIdentityEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { alwaysinline 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 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 = { alwaysinline 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 = { 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 600}
!9 = !{!"_ZTS16DebugRendererImp", !10, i64 0, !12, i64 320, !23, i64 328, !23, i64 336, !23, i64 344, !23, i64 352, !23, i64 360, !23, i64 368, !29, i64 376, !34, i64 424, !35, i64 432, !35, i64 464, !35, i64 496, !35, i64 528, !16, i64 560, !13, i64 568, !37, i64 584, !12, i64 592, !12, i64 600, !12, i64 608, !38, i64 624, !40, i64 656, !29, i64 680, !41, i64 728, !42, i64 736, !29, i64 760, !23, i64 808}
!10 = !{!"_ZTSN3JPH13DebugRendererE", !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !14, i64 64, !14, i64 96, !17, i64 128, !17, i64 160, !19, i64 192, !19, i64 224, !21, i64 256, !21, i64 288}
!11 = !{!"_ZTSN3JPH3RefINS_13DebugRenderer8GeometryEEE", !12, i64 0}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !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", !12, i64 0, !12, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!16 = !{!"int", !13, i64 0}
!17 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer18SwingPyramidLimitsENS_3RefINS1_8GeometryEEENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !18, i64 0}
!18 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer18SwingPyramidLimitsESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_24SwingPyramidLimitsHasherESt8equal_toIS2_EEE", !12, i64 0, !12, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!19 = !{!"_ZTSN3JPH12UnorderedMapIfNS_3RefINS_13DebugRenderer8GeometryEEENS_4HashIfEESt8equal_toIfEEE", !20, i64 0}
!20 = !{!"_ZTSN3JPH9HashTableIfSt4pairIfNS_3RefINS_13DebugRenderer8GeometryEEEENS_18UnorderedMapDetailIfS5_EENS_4HashIfEESt8equal_toIfEEE", !12, i64 0, !12, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!21 = !{!"_ZTSN3JPH12UnorderedMapINS_13DebugRenderer15TaperedCylinderENS_3RefINS1_8GeometryEEENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !22, i64 0}
!22 = !{!"_ZTSN3JPH9HashTableINS_13DebugRenderer15TaperedCylinderESt4pairIS2_NS_3RefINS1_8GeometryEEEENS_18UnorderedMapDetailIS2_S6_EENS1_21TaperedCylinderHasherESt8equal_toIS2_EEE", !12, i64 0, !12, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!23 = !{!"_ZTSSt10unique_ptrI13PipelineStateSt14default_deleteIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt15__uniq_ptr_dataI13PipelineStateSt14default_deleteIS0_ELb1ELb1EE", !25, i64 0}
!25 = !{!"_ZTSSt15__uniq_ptr_implI13PipelineStateSt14default_deleteIS0_EE", !26, i64 0}
!26 = !{!"_ZTSSt5tupleIJP13PipelineStateSt14default_deleteIS0_EEE", !27, i64 0}
!27 = !{!"_ZTSSt11_Tuple_implILm0EJP13PipelineStateSt14default_deleteIS0_EEE", !28, i64 0}
!28 = !{!"_ZTSSt10_Head_baseILm0EP13PipelineStateLb0EE", !12, i64 0}
!29 = !{!"_ZTSN3JPH5MutexE", !30, i64 0, !32, i64 40}
!30 = !{!"_ZTSSt5mutex", !31, i64 0}
!31 = !{!"_ZTSSt12__mutex_base", !13, i64 0}
!32 = !{!"_ZTSNSt6thread2idE", !33, i64 0}
!33 = !{!"long", !13, i64 0}
!34 = !{!"_ZTSN3JPH3RefINS_16RefTargetVirtualEEE", !12, i64 0}
!35 = !{!"_ZTSN3JPH12UnorderedMapINS_3RefINS_13DebugRenderer8GeometryEEEN16DebugRendererImp9InstancesENS_4HashIS4_EESt8equal_toIS4_EEE", !36, i64 0}
!36 = !{!"_ZTSN3JPH9HashTableINS_3RefINS_13DebugRenderer8GeometryEEESt4pairIS4_N16DebugRendererImp9InstancesEENS_18UnorderedMapDetailIS4_S7_EENS_4HashIS4_EESt8equal_toIS4_EEE", !12, i64 0, !12, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!37 = !{!"_ZTSN3JPH3RefI15RenderPrimitiveEE", !12, i64 0}
!38 = !{!"_ZTSN3JPH5AABoxE", !39, i64 0, !39, i64 16}
!39 = !{!"_ZTSN3JPH4Vec3E", !13, i64 0}
!40 = !{!"_ZTSN3JPH5ArrayIN16DebugRendererImp4TextENS_12STLAllocatorIS2_EEEE", !33, i64 0, !33, i64 8, !12, i64 16}
!41 = !{!"_ZTSN3JPH8RefConstI4FontEE", !12, i64 0}
!42 = !{!"_ZTSN3JPH5ArrayIN16DebugRendererImp4LineENS_12STLAllocatorIS2_EEEE", !33, i64 0, !33, i64 8, !12, i64 16}
!43 = !{!9, !12, i64 592}
!44 = !{!13, !13, i64 0}
!45 = !{!9, !16, i64 560}
!46 = !{i64 0, i64 16, !44, i64 16, i64 16, !44}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass