; LLVM IR from khushmmehta/Scorch-V :: src/ScorchVkEngine/Abstractions (VulkanMemoryAllocator)

; 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"

%struct.VkMemoryAllocateInfo = type { i32, ptr, i64, i32 }
%struct.VkMemoryAllocateFlagsInfo = type { i32, ptr, i32, i32 }
%struct.VkMemoryPriorityAllocateInfoEXT = type { i32, ptr, float }
%struct.VkExportMemoryAllocateInfo = type { i32, ptr, i32 }
%class.VmaBlockVector = type <{ ptr, ptr, i32, [4 x i8], i64, i64, i64, i64, i8, [3 x i8], i32, float, [4 x i8], i64, ptr, %class.VmaRWMutex, %class.VmaVector.15, i32, i8, [3 x i8] }>
%class.VmaRWMutex = type { %"class.std::shared_mutex" }
%"class.std::shared_mutex" = type { %"class.std::__shared_mutex_pthread" }
%"class.std::__shared_mutex_pthread" = type { %union.pthread_rwlock_t }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%class.VmaVector.15 = type { %struct.VmaStlAllocator.16, ptr, i64, i64 }
%struct.VmaStlAllocator.16 = type { ptr }
%struct.VmaAllocator_T = type <{ i8, [3 x i8], i32, i8, i8, i8, i8, i8, i8, [2 x i8], ptr, ptr, i8, [7 x i8], %struct.VkAllocationCallbacks, %struct.VmaDeviceMemoryCallbacks, %class.VmaAllocationObjectAllocator, i32, [4 x i8], %struct.VkPhysicalDeviceProperties, %struct.VkPhysicalDeviceMemoryProperties, [32 x ptr], [32 x %class.VmaDedicatedAllocationList], %struct.VmaCurrentBudgetData, %"struct.std::atomic", [4 x i8], i64, ptr, %"struct.std::atomic", %"struct.std::atomic", [32 x i32], %class.VmaRWMutex, %class.VmaIntrusiveLinkedList.14, i32, [4 x i8], %struct.VmaVulkanFunctions, i32, [4 x i8] }>
%struct.VkAllocationCallbacks = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.VmaDeviceMemoryCallbacks = type { ptr, ptr, ptr }
%class.VmaAllocationObjectAllocator = type { %class.VmaMutex, %class.VmaPoolAllocator.11 }
%class.VmaMutex = type { %"class.std::mutex" }
%"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.VmaPoolAllocator.11 = type { ptr, i32, %class.VmaVector.12 }
%class.VmaVector.12 = type { %struct.VmaStlAllocator.13, ptr, i64, i64 }
%struct.VmaStlAllocator.13 = type { ptr }
%struct.VkPhysicalDeviceProperties = type { i32, i32, i32, i32, i32, [256 x i8], [16 x i8], %struct.VkPhysicalDeviceLimits, %struct.VkPhysicalDeviceSparseProperties }
%struct.VkPhysicalDeviceLimits = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, [3 x i32], i32, i32, i32, i32, i32, float, float, i32, [2 x i32], [2 x float], i32, i64, i64, i64, i64, i32, i32, i32, i32, float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, [2 x float], [2 x float], float, float, i32, i32, i64, i64, i64 }
%struct.VkPhysicalDeviceSparseProperties = type { i32, i32, i32, i32, i32 }
%struct.VkPhysicalDeviceMemoryProperties = type { i32, [32 x %struct.VkMemoryType], i32, [16 x %struct.VkMemoryHeap] }
%struct.VkMemoryType = type { i32, i32 }
%struct.VkMemoryHeap = type { i64, i32 }
%class.VmaDedicatedAllocationList = type { i8, %class.VmaRWMutex, %class.VmaIntrusiveLinkedList }
%class.VmaIntrusiveLinkedList = type { ptr, ptr, i64 }
%struct.VmaCurrentBudgetData = type { [16 x %"struct.std::atomic"], [16 x %"struct.std::atomic"], [16 x %"struct.std::atomic.9"], [16 x %"struct.std::atomic.9"], %"struct.std::atomic", %class.VmaRWMutex, [16 x i64], [16 x i64], [16 x i64] }
%"struct.std::atomic.9" = type { %"struct.std::__atomic_base.10" }
%"struct.std::__atomic_base.10" = type { i64 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%class.VmaIntrusiveLinkedList.14 = type { ptr, ptr, i64 }
%struct.VmaVulkanFunctions = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__const._ZN14VmaBlockVector11CreateBlockEmPm.allocInfo = external hidden unnamed_addr constant %struct.VkMemoryAllocateInfo, align 8
@__const._ZN14VmaBlockVector11CreateBlockEmPm.allocFlagsInfo = external hidden unnamed_addr constant %struct.VkMemoryAllocateFlagsInfo, align 8
@__const._ZN14VmaBlockVector11CreateBlockEmPm.priorityInfo = external hidden unnamed_addr constant %struct.VkMemoryPriorityAllocateInfoEXT, align 8
@.str.185 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector11CreateBlockEmPm = external hidden unnamed_addr constant [61 x i8], align 1
@__const._ZN14VmaBlockVector11CreateBlockEmPm.exportMemoryAllocInfo = external hidden unnamed_addr constant %struct.VkExportMemoryAllocateInfo, align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20VmaDeviceMemoryBlock4InitEP14VmaAllocator_TP9VmaPool_TjP16VkDeviceMemory_Tmjjm(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %1, ptr noundef %2) #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.VkMemoryAllocateInfo, align 8
  %9 = alloca %struct.VkMemoryAllocateFlagsInfo, align 8
  %10 = alloca %struct.VkMemoryPriorityAllocateInfoEXT, align 8
  %11 = alloca %struct.VkExportMemoryAllocateInfo, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 @__const._ZN14VmaBlockVector11CreateBlockEmPm.allocInfo, i64 32, i1 false)
  %17 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 14
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %8, i32 0, i32 1
  store ptr %18, ptr %19, align 8, !tbaa !21
  %20 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !24
  %22 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %8, i32 0, i32 3
  store i32 %21, ptr %22, align 8, !tbaa !25
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %8, i32 0, i32 2
  store i64 %23, ptr %24, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 @__const._ZN14VmaBlockVector11CreateBlockEmPm.allocFlagsInfo, i64 24, i1 false)
  %25 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !27
  %27 = getelementptr inbounds %struct.VmaAllocator_T, ptr %26, i32 0, i32 7
  %28 = load i8, ptr %27, align 4, !tbaa !28, !range !49, !noundef !50
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %32

30:                                               ; preds = %3
  %31 = getelementptr inbounds %struct.VkMemoryAllocateFlagsInfo, ptr %9, i32 0, i32 2
  store i32 2, ptr %31, align 8, !tbaa !51
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo25VkMemoryAllocateFlagsInfoEvPT_PT0_(ptr noundef %8, ptr noundef %9)
  br label %32

32:                                               ; preds = %30, %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 @__const._ZN14VmaBlockVector11CreateBlockEmPm.priorityInfo, i64 24, i1 false)
  %33 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !27
  %35 = getelementptr inbounds %struct.VmaAllocator_T, ptr %34, i32 0, i32 8
  %36 = load i8, ptr %35, align 1, !tbaa !53, !range !49, !noundef !50
  %37 = trunc i8 %36 to i1
  br i1 %37, label %38, label %55

38:                                               ; preds = %32
  %39 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 11
  %40 = load float, ptr %39, align 8, !tbaa !54
  %41 = fcmp oge float %40, 0.000000e+00
  br i1 %41, label %42, label %46

42:                                               ; preds = %38
  %43 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 11
  %44 = load float, ptr %43, align 8, !tbaa !54
  %45 = fcmp ole float %44, 1.000000e+00
  br label %46

46:                                               ; preds = %42, %38
  %47 = phi i1 [ false, %38 ], [ %45, %42 ]
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  br label %51

49:                                               ; preds = %46
  call void @__assert_fail(ptr noundef @.str.185, ptr noundef @.str.2, i32 noundef 12934, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector11CreateBlockEmPm) #7
  unreachable

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50, %48
  %52 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 11
  %53 = load float, ptr %52, align 8, !tbaa !54
  %54 = getelementptr inbounds %struct.VkMemoryPriorityAllocateInfoEXT, ptr %10, i32 0, i32 2
  store float %53, ptr %54, align 8, !tbaa !55
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo31VkMemoryPriorityAllocateInfoEXTEvPT_PT0_(ptr noundef %8, ptr noundef %10)
  br label %55

55:                                               ; preds = %51, %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 @__const._ZN14VmaBlockVector11CreateBlockEmPm.exportMemoryAllocInfo, i64 24, i1 false)
  %56 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !27
  %58 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 2
  %59 = load i32, ptr %58, align 8, !tbaa !24
  %60 = call noundef i32 @_ZNK14VmaAllocator_T32GetExternalMemoryHandleTypeFlagsEj(ptr noundef nonnull align 8 dereferenceable(5916) %57, i32 noundef %59)
  %61 = getelementptr inbounds %struct.VkExportMemoryAllocateInfo, ptr %11, i32 0, i32 2
  store i32 %60, ptr %61, align 8, !tbaa !57
  %62 = getelementptr inbounds %struct.VkExportMemoryAllocateInfo, ptr %11, i32 0, i32 2
  %63 = load i32, ptr %62, align 8, !tbaa !57
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %55
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo26VkExportMemoryAllocateInfoEvPT_PT0_(ptr noundef %8, ptr noundef %11)
  br label %66

66:                                               ; preds = %65, %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %67 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = call noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916) %68, ptr noundef %8, ptr noundef %12)
  store i32 %69, ptr %13, align 4, !tbaa !59
  %70 = load i32, ptr %13, align 4, !tbaa !59
  %71 = icmp slt i32 %70, 0
  br i1 %71, label %72, label %74

72:                                               ; preds = %66
  %73 = load i32, ptr %13, align 4, !tbaa !59
  store i32 %73, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %106

74:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %75 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !27
  %77 = call noundef ptr @_ZL11VmaAllocateI20VmaDeviceMemoryBlockEPT_P14VmaAllocator_T(ptr noundef %76)
  %78 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  call void @_ZN20VmaDeviceMemoryBlockC1EP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %77, ptr noundef %79)
  store ptr %77, ptr %15, align 8, !tbaa !5
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !27
  %83 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !61
  %85 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !24
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %8, i32 0, i32 2
  %89 = load i64, ptr %88, align 8, !tbaa !26
  %90 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 17
  %91 = load i32, ptr %90, align 8, !tbaa !62
  %92 = add i32 %91, 1
  store i32 %92, ptr %90, align 8, !tbaa !62
  %93 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 10
  %94 = load i32, ptr %93, align 4, !tbaa !63
  %95 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 7
  %96 = load i64, ptr %95, align 8, !tbaa !64
  call void @_ZN20VmaDeviceMemoryBlock4InitEP14VmaAllocator_TP9VmaPool_TjP16VkDeviceMemory_Tmjjm(ptr noundef nonnull align 8 dereferenceable(96) %80, ptr noundef %82, ptr noundef %84, i32 noundef %86, ptr noundef %87, i64 noundef %89, i32 noundef %91, i32 noundef %94, i64 noundef %96)
  %97 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 16
  call void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %97, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %105

100:                                              ; preds = %74
  %101 = getelementptr inbounds %class.VmaBlockVector, ptr %16, i32 0, i32 16
  %102 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %101)
  %103 = sub i64 %102, 1
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %103, ptr %104, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %100, %74
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %106

106:                                              ; preds = %105, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %107 = load i32, ptr %4, align 4
  ret i32 %107
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo25VkMemoryAllocateFlagsInfoEvPT_PT0_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo31VkMemoryPriorityAllocateInfoEXTEvPT_PT0_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T32GetExternalMemoryHandleTypeFlagsEj(ptr noundef nonnull align 8 dereferenceable(5916), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo26VkExportMemoryAllocateInfoEvPT_PT0_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL11VmaAllocateI20VmaDeviceMemoryBlockEPT_P14VmaAllocator_T(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

declare void @_ZN20VmaDeviceMemoryBlockC1EP14VmaAllocator_T(ptr, ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 }
attributes #7 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 80}
!12 = !{!"_ZTS14VmaBlockVector", !6, i64 0, !6, i64 8, !13, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !14, i64 56, !13, i64 60, !15, i64 64, !10, i64 72, !6, i64 80, !16, i64 88, !19, i64 144, !13, i64 176, !14, i64 180}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS10VmaRWMutex", !17, i64 0}
!17 = !{!"_ZTSSt12shared_mutex", !18, i64 0}
!18 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!19 = !{!"_ZTS9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE", !20, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!20 = !{!"_ZTS15VmaStlAllocatorIP20VmaDeviceMemoryBlockE", !6, i64 0}
!21 = !{!22, !6, i64 8}
!22 = !{!"_ZTS20VkMemoryAllocateInfo", !23, i64 0, !6, i64 8, !10, i64 16, !13, i64 24}
!23 = !{!"_ZTS15VkStructureType", !7, i64 0}
!24 = !{!12, !13, i64 16}
!25 = !{!22, !13, i64 24}
!26 = !{!22, !10, i64 16}
!27 = !{!12, !6, i64 0}
!28 = !{!29, !14, i64 12}
!29 = !{!"_ZTS14VmaAllocator_T", !14, i64 0, !13, i64 4, !14, i64 8, !14, i64 9, !14, i64 10, !14, i64 11, !14, i64 12, !14, i64 13, !6, i64 16, !6, i64 24, !14, i64 32, !30, i64 40, !31, i64 88, !32, i64 112, !13, i64 200, !39, i64 208, !43, i64 1032, !7, i64 1552, !7, i64 1808, !44, i64 4624, !45, i64 5456, !10, i64 5464, !6, i64 5472, !45, i64 5480, !45, i64 5484, !7, i64 5488, !16, i64 5616, !47, i64 5672, !13, i64 5696, !48, i64 5704, !13, i64 5912}
!30 = !{!"_ZTS21VkAllocationCallbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!31 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTS28VmaAllocationObjectAllocator", !33, i64 0, !36, i64 40}
!33 = !{!"_ZTS8VmaMutex", !34, i64 0}
!34 = !{!"_ZTSSt5mutex", !35, i64 0}
!35 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!36 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !6, i64 0, !13, i64 8, !37, i64 16}
!37 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !38, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!38 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !6, i64 0}
!39 = !{!"_ZTS26VkPhysicalDeviceProperties", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !40, i64 16, !7, i64 20, !7, i64 276, !41, i64 296, !42, i64 800}
!40 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!41 = !{!"_ZTS22VkPhysicalDeviceLimits", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !10, i64 48, !10, i64 56, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !13, i64 172, !13, i64 176, !13, i64 180, !13, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !7, i64 220, !13, i64 232, !7, i64 236, !13, i64 248, !13, i64 252, !13, i64 256, !13, i64 260, !13, i64 264, !15, i64 268, !15, i64 272, !13, i64 276, !7, i64 280, !7, i64 288, !13, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !13, i64 336, !13, i64 340, !13, i64 344, !13, i64 348, !15, i64 352, !15, i64 356, !13, i64 360, !13, i64 364, !13, i64 368, !13, i64 372, !13, i64 376, !13, i64 380, !13, i64 384, !13, i64 388, !13, i64 392, !13, i64 396, !13, i64 400, !13, i64 404, !13, i64 408, !13, i64 412, !13, i64 416, !13, i64 420, !15, i64 424, !13, i64 428, !13, i64 432, !13, i64 436, !13, i64 440, !7, i64 444, !7, i64 452, !15, i64 460, !15, i64 464, !13, i64 468, !13, i64 472, !10, i64 480, !10, i64 488, !10, i64 496}
!42 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!43 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !13, i64 0, !7, i64 4, !13, i64 260, !7, i64 264}
!44 = !{!"_ZTS20VmaCurrentBudgetData", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 256, !45, i64 384, !16, i64 392, !7, i64 448, !7, i64 576, !7, i64 704}
!45 = !{!"_ZTSSt6atomicIjE", !46, i64 0}
!46 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!47 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !6, i64 0, !6, i64 8, !10, i64 16}
!48 = !{!"_ZTS18VmaVulkanFunctions", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!52, !13, i64 16}
!52 = !{!"_ZTS25VkMemoryAllocateFlagsInfo", !23, i64 0, !6, i64 8, !13, i64 16, !13, i64 20}
!53 = !{!29, !14, i64 13}
!54 = !{!12, !15, i64 64}
!55 = !{!56, !15, i64 16}
!56 = !{!"_ZTS31VkMemoryPriorityAllocateInfoEXT", !23, i64 0, !6, i64 8, !15, i64 16}
!57 = !{!58, !13, i64 16}
!58 = !{!"_ZTS26VkExportMemoryAllocateInfo", !23, i64 0, !6, i64 8, !13, i64 16}
!59 = !{!60, !60, i64 0}
!60 = !{!"_ZTS8VkResult", !7, i64 0}
!61 = !{!12, !6, i64 8}
!62 = !{!12, !13, i64 176}
!63 = !{!12, !13, i64 60}
!64 = !{!12, !10, i64 48}


; 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"

%struct.VkMemoryAllocateInfo = type { i32, ptr, i64, i32 }
%struct.VkMemoryAllocateFlagsInfo = type { i32, ptr, i32, i32 }
%struct.VkMemoryPriorityAllocateInfoEXT = type { i32, ptr, float }
%struct.VkExportMemoryAllocateInfo = type { i32, ptr, i32 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__const._ZN14VmaBlockVector11CreateBlockEmPm.allocInfo = external hidden unnamed_addr constant %struct.VkMemoryAllocateInfo, align 8
@__const._ZN14VmaBlockVector11CreateBlockEmPm.allocFlagsInfo = external hidden unnamed_addr constant %struct.VkMemoryAllocateFlagsInfo, align 8
@__const._ZN14VmaBlockVector11CreateBlockEmPm.priorityInfo = external hidden unnamed_addr constant %struct.VkMemoryPriorityAllocateInfoEXT, align 8
@.str.185 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector11CreateBlockEmPm = external hidden unnamed_addr constant [61 x i8], align 1
@__const._ZN14VmaBlockVector11CreateBlockEmPm.exportMemoryAllocInfo = external hidden unnamed_addr constant %struct.VkExportMemoryAllocateInfo, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20VmaDeviceMemoryBlock4InitEP14VmaAllocator_TP9VmaPool_TjP16VkDeviceMemory_Tmjjm(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -2147483648, 1) i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %struct.VkMemoryAllocateInfo, align 8
  %5 = alloca %struct.VkMemoryAllocateFlagsInfo, align 8
  %6 = alloca %struct.VkMemoryPriorityAllocateInfoEXT, align 8
  %7 = alloca %struct.VkExportMemoryAllocateInfo, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) @__const._ZN14VmaBlockVector11CreateBlockEmPm.allocInfo, i64 32, i1 false)
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %11, ptr %12, align 8, !tbaa !19
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load i32, ptr %13, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %14, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %4, i64 16
  store i64 %1, ptr %16, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) @__const._ZN14VmaBlockVector11CreateBlockEmPm.allocFlagsInfo, i64 24, i1 false)
  %17 = load ptr, ptr %0, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %17, i64 12
  %19 = load i8, ptr %18, align 4, !tbaa !26, !range !47, !noundef !48
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %21, label %23

21:                                               ; preds = %3
  %22 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 2, ptr %22, align 8, !tbaa !49
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo25VkMemoryAllocateFlagsInfoEvPT_PT0_(ptr noundef nonnull %4, ptr noundef nonnull %5)
  %.pre = load ptr, ptr %0, align 8, !tbaa !25
  br label %23

23:                                               ; preds = %21, %3
  %24 = phi ptr [ %.pre, %21 ], [ %17, %3 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) @__const._ZN14VmaBlockVector11CreateBlockEmPm.priorityInfo, i64 24, i1 false)
  %25 = getelementptr inbounds i8, ptr %24, i64 13
  %26 = load i8, ptr %25, align 1, !tbaa !51, !range !47, !noundef !48
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %35

28:                                               ; preds = %23
  %29 = getelementptr inbounds i8, ptr %0, i64 64
  %30 = load float, ptr %29, align 8, !tbaa !52
  %31 = fcmp ult float %30, 0.000000e+00
  %32 = fcmp ugt float %30, 1.000000e+00
  %or.cond = or i1 %31, %32
  br i1 %or.cond, label %.critedge, label %33

.critedge:                                        ; preds = %28
  call void @__assert_fail(ptr noundef nonnull @.str.185, ptr noundef nonnull @.str.2, i32 noundef 12934, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector11CreateBlockEmPm) #7
  unreachable

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %6, i64 16
  store float %30, ptr %34, align 8, !tbaa !53
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo31VkMemoryPriorityAllocateInfoEXTEvPT_PT0_(ptr noundef nonnull %4, ptr noundef nonnull %6)
  %.pre10 = load ptr, ptr %0, align 8, !tbaa !25
  br label %35

35:                                               ; preds = %33, %23
  %36 = phi ptr [ %.pre10, %33 ], [ %24, %23 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) @__const._ZN14VmaBlockVector11CreateBlockEmPm.exportMemoryAllocInfo, i64 24, i1 false)
  %37 = load i32, ptr %13, align 8, !tbaa !22
  %38 = call noundef i32 @_ZNK14VmaAllocator_T32GetExternalMemoryHandleTypeFlagsEj(ptr noundef nonnull align 8 dereferenceable(5916) %36, i32 noundef %37)
  %39 = getelementptr inbounds i8, ptr %7, i64 16
  store i32 %38, ptr %39, align 8, !tbaa !55
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %41, label %40

40:                                               ; preds = %35
  call void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo26VkExportMemoryAllocateInfoEvPT_PT0_(ptr noundef nonnull %4, ptr noundef nonnull %7)
  br label %41

41:                                               ; preds = %40, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr null, ptr %8, align 8, !tbaa !57
  %42 = load ptr, ptr %0, align 8, !tbaa !25
  %43 = call noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916) %42, ptr noundef nonnull %4, ptr noundef nonnull %8)
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %67, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %46 = load ptr, ptr %0, align 8, !tbaa !25
  %47 = call noundef ptr @_ZL11VmaAllocateI20VmaDeviceMemoryBlockEPT_P14VmaAllocator_T(ptr noundef %46)
  %48 = load ptr, ptr %0, align 8, !tbaa !25
  call void @_ZN20VmaDeviceMemoryBlockC1EP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %47, ptr noundef %48)
  store ptr %47, ptr %9, align 8, !tbaa !57
  %49 = load ptr, ptr %0, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !58
  %52 = load i32, ptr %13, align 8, !tbaa !22
  %53 = load ptr, ptr %8, align 8, !tbaa !57
  %54 = load i64, ptr %16, align 8, !tbaa !24
  %55 = getelementptr inbounds i8, ptr %0, i64 176
  %56 = load i32, ptr %55, align 8, !tbaa !59
  %57 = add i32 %56, 1
  store i32 %57, ptr %55, align 8, !tbaa !59
  %58 = getelementptr inbounds i8, ptr %0, i64 60
  %59 = load i32, ptr %58, align 4, !tbaa !60
  %60 = getelementptr inbounds i8, ptr %0, i64 48
  %61 = load i64, ptr %60, align 8, !tbaa !61
  call void @_ZN20VmaDeviceMemoryBlock4InitEP14VmaAllocator_TP9VmaPool_TjP16VkDeviceMemory_Tmjjm(ptr noundef nonnull align 8 dereferenceable(96) %47, ptr noundef %49, ptr noundef %51, i32 noundef %52, ptr noundef %53, i64 noundef %54, i32 noundef %56, i32 noundef %59, i64 noundef %61)
  %62 = getelementptr inbounds i8, ptr %0, i64 144
  call void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %.not9 = icmp eq ptr %2, null
  br i1 %.not9, label %66, label %63

63:                                               ; preds = %45
  %64 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %62)
  %65 = add i64 %64, -1
  store i64 %65, ptr %2, align 8, !tbaa !62
  br label %66

66:                                               ; preds = %63, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %67

67:                                               ; preds = %41, %66
  %.0 = phi i32 [ 0, %66 ], [ %43, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo25VkMemoryAllocateFlagsInfoEvPT_PT0_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo31VkMemoryPriorityAllocateInfoEXTEvPT_PT0_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14VmaAllocator_T32GetExternalMemoryHandleTypeFlagsEj(ptr noundef nonnull align 8 dereferenceable(5916), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL22VmaPnextChainPushFrontI20VkMemoryAllocateInfo26VkExportMemoryAllocateInfoEvPT_PT0_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL11VmaAllocateI20VmaDeviceMemoryBlockEPT_P14VmaAllocator_T(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

declare void @_ZN20VmaDeviceMemoryBlockC1EP14VmaAllocator_T(ptr, ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 }
attributes #7 = { noreturn 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, !7, i64 80}
!6 = !{!"_ZTS14VmaBlockVector", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !12, i64 56, !10, i64 60, !13, i64 64, !11, i64 72, !7, i64 80, !14, i64 88, !17, i64 144, !10, i64 176, !12, i64 180}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS10VmaRWMutex", !15, i64 0}
!15 = !{!"_ZTSSt12shared_mutex", !16, i64 0}
!16 = !{!"_ZTSSt22__shared_mutex_pthread", !8, i64 0}
!17 = !{!"_ZTS9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE", !18, i64 0, !7, i64 8, !11, i64 16, !11, i64 24}
!18 = !{!"_ZTS15VmaStlAllocatorIP20VmaDeviceMemoryBlockE", !7, i64 0}
!19 = !{!20, !7, i64 8}
!20 = !{!"_ZTS20VkMemoryAllocateInfo", !21, i64 0, !7, i64 8, !11, i64 16, !10, i64 24}
!21 = !{!"_ZTS15VkStructureType", !8, i64 0}
!22 = !{!6, !10, i64 16}
!23 = !{!20, !10, i64 24}
!24 = !{!20, !11, i64 16}
!25 = !{!6, !7, i64 0}
!26 = !{!27, !12, i64 12}
!27 = !{!"_ZTS14VmaAllocator_T", !12, i64 0, !10, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !7, i64 16, !7, i64 24, !12, i64 32, !28, i64 40, !29, i64 88, !30, i64 112, !10, i64 200, !37, i64 208, !41, i64 1032, !8, i64 1552, !8, i64 1808, !42, i64 4624, !43, i64 5456, !11, i64 5464, !7, i64 5472, !43, i64 5480, !43, i64 5484, !8, i64 5488, !14, i64 5616, !45, i64 5672, !10, i64 5696, !46, i64 5704, !10, i64 5912}
!28 = !{!"_ZTS21VkAllocationCallbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!29 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !7, i64 0, !7, i64 8, !7, i64 16}
!30 = !{!"_ZTS28VmaAllocationObjectAllocator", !31, i64 0, !34, i64 40}
!31 = !{!"_ZTS8VmaMutex", !32, i64 0}
!32 = !{!"_ZTSSt5mutex", !33, i64 0}
!33 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!34 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !7, i64 0, !10, i64 8, !35, i64 16}
!35 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !36, i64 0, !7, i64 8, !11, i64 16, !11, i64 24}
!36 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !7, i64 0}
!37 = !{!"_ZTS26VkPhysicalDeviceProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !38, i64 16, !8, i64 20, !8, i64 276, !39, i64 296, !40, i64 800}
!38 = !{!"_ZTS20VkPhysicalDeviceType", !8, i64 0}
!39 = !{!"_ZTS22VkPhysicalDeviceLimits", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !11, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !8, i64 220, !10, i64 232, !8, i64 236, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !13, i64 268, !13, i64 272, !10, i64 276, !8, i64 280, !8, i64 288, !10, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !13, i64 352, !13, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !10, i64 420, !13, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !8, i64 444, !8, i64 452, !13, i64 460, !13, i64 464, !10, i64 468, !10, i64 472, !11, i64 480, !11, i64 488, !11, i64 496}
!40 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!41 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !10, i64 0, !8, i64 4, !10, i64 260, !8, i64 264}
!42 = !{!"_ZTS20VmaCurrentBudgetData", !8, i64 0, !8, i64 64, !8, i64 128, !8, i64 256, !43, i64 384, !14, i64 392, !8, i64 448, !8, i64 576, !8, i64 704}
!43 = !{!"_ZTSSt6atomicIjE", !44, i64 0}
!44 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!45 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !7, i64 0, !7, i64 8, !11, i64 16}
!46 = !{!"_ZTS18VmaVulkanFunctions", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!50, !10, i64 16}
!50 = !{!"_ZTS25VkMemoryAllocateFlagsInfo", !21, i64 0, !7, i64 8, !10, i64 16, !10, i64 20}
!51 = !{!27, !12, i64 13}
!52 = !{!6, !13, i64 64}
!53 = !{!54, !13, i64 16}
!54 = !{!"_ZTS31VkMemoryPriorityAllocateInfoEXT", !21, i64 0, !7, i64 8, !13, i64 16}
!55 = !{!56, !10, i64 16}
!56 = !{!"_ZTS26VkExportMemoryAllocateInfo", !21, i64 0, !7, i64 8, !10, i64 16}
!57 = !{!7, !7, i64 0}
!58 = !{!6, !7, i64 8}
!59 = !{!6, !10, i64 176}
!60 = !{!6, !10, i64 60}
!61 = !{!6, !11, i64 48}
!62 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass