; 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.VkMemoryRequirements = type { i64, i64, i32 }
%struct.VkBufferCreateInfo = type { i32, ptr, i32, i64, i32, i32, i32, 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.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.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 }
%struct.VmaAllocationCreateInfo = type { i32, i32, i32, i32, i32, ptr, ptr, float }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.360 = external hidden unnamed_addr constant [149 x i8], align 1
@.str.361 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment = external hidden unnamed_addr constant [232 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

; 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) #1

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z9VmaIsPow2ImEbT_(i64 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext, i1 noundef zeroext, ptr noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i64 noundef, ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916), i64 noundef, ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, ptr noundef) #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @vmaCreateBufferWithAlignment(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #5 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.VkMemoryRequirements, align 8
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %38

23:                                               ; preds = %7
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %38

26:                                               ; preds = %23
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %38

29:                                               ; preds = %26
  %30 = load i64, ptr %12, align 8, !tbaa !9
  %31 = call noundef zeroext i1 @_Z9VmaIsPow2ImEbT_(i64 noundef %30)
  br i1 %31, label %32, label %38

32:                                               ; preds = %29
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br label %38

38:                                               ; preds = %35, %32, %29, %26, %23, %7
  %39 = phi i1 [ false, %32 ], [ false, %29 ], [ false, %26 ], [ false, %23 ], [ false, %7 ], [ %37, %35 ]
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  br label %43

41:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.361, ptr noundef @.str.2, i32 noundef 17238, ptr noundef @__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment) #6
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.VkBufferCreateInfo, ptr %44, i32 0, i32 3
  %46 = load i64, ptr %45, align 8, !tbaa !11
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %43
  store i32 -3, ptr %8, align 4
  br label %166

49:                                               ; preds = %43
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.VkBufferCreateInfo, ptr %50, i32 0, i32 4
  %52 = load i32, ptr %51, align 8, !tbaa !16
  %53 = and i32 %52, 131072
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %49
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.VmaAllocator_T, ptr %56, i32 0, i32 7
  %58 = load i8, ptr %57, align 4, !tbaa !17, !range !43, !noundef !44
  %59 = trunc i8 %58 to i1
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  call void @__assert_fail(ptr noundef @.str.360, ptr noundef @.str.2, i32 noundef 17247, ptr noundef @__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment) #6
  unreachable

61:                                               ; preds = %55, %49
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr null, ptr %62, align 8, !tbaa !5
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr null, ptr %63, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %64)
  %66 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %65, i32 0, i32 14
  %67 = load ptr, ptr %66, align 8, !tbaa !45
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.VmaAllocator_T, ptr %68, i32 0, i32 10
  %70 = load ptr, ptr %69, align 8, !tbaa !46
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %72)
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = call noundef i32 %67(ptr noundef %70, ptr noundef %71, ptr noundef %73, ptr noundef %74)
  store i32 %75, ptr %16, align 4, !tbaa !47
  %76 = load i32, ptr %16, align 4, !tbaa !47
  %77 = icmp sge i32 %76, 0
  br i1 %77, label %78, label %163

78:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  store i8 0, ptr %18, align 1, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  store i8 0, ptr %19, align 1, !tbaa !49
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  call void @_ZNK14VmaAllocator_T27GetBufferMemoryRequirementsEP10VkBuffer_TR20VkMemoryRequirementsRbS4_(ptr noundef nonnull align 8 dereferenceable(5916) %79, ptr noundef %81, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
  %82 = getelementptr inbounds %struct.VkMemoryRequirements, ptr %17, i32 0, i32 1
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.VkMemoryRequirements, ptr %17, i32 0, i32 1
  store i64 %84, ptr %85, align 8, !tbaa !50
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load i8, ptr %18, align 1, !tbaa !49, !range !43, !noundef !44
  %88 = trunc i8 %87 to i1
  %89 = load i8, ptr %19, align 1, !tbaa !49, !range !43, !noundef !44
  %90 = trunc i8 %89 to i1
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.VkBufferCreateInfo, ptr %93, i32 0, i32 4
  %95 = load i32, ptr %94, align 8, !tbaa !16
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = call noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %86, ptr noundef nonnull align 8 dereferenceable(24) %17, i1 noundef zeroext %88, i1 noundef zeroext %90, ptr noundef %92, ptr noundef null, i32 noundef %95, ptr noundef nonnull align 8 dereferenceable(48) %96, i32 noundef 2, i64 noundef 1, ptr noundef %97)
  store i32 %98, ptr %16, align 4, !tbaa !47
  %99 = load i32, ptr %16, align 4, !tbaa !47
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %101, label %148

101:                                              ; preds = %78
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !52
  %105 = and i32 %104, 128
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %114

107:                                              ; preds = %101
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = call noundef i32 @_ZN14VmaAllocator_T16BindBufferMemoryEP15VmaAllocation_TmP10VkBuffer_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %108, ptr noundef %110, i64 noundef 0, ptr noundef %112, ptr noundef null)
  store i32 %113, ptr %16, align 4, !tbaa !47
  br label %114

114:                                              ; preds = %107, %101
  %115 = load i32, ptr %16, align 4, !tbaa !47
  %116 = icmp sge i32 %115, 0
  br i1 %116, label %117, label %131

117:                                              ; preds = %114
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.VkBufferCreateInfo, ptr %120, i32 0, i32 4
  %122 = load i32, ptr %121, align 8, !tbaa !16
  call void @_ZN15VmaAllocation_T20InitBufferImageUsageEj(ptr noundef nonnull align 8 dereferenceable(84) %119, i32 noundef %122)
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %130

125:                                              ; preds = %117
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916) %126, ptr noundef %128, ptr noundef %129)
  br label %130

130:                                              ; preds = %125, %117
  store i32 0, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %162

131:                                              ; preds = %114
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %132, i64 noundef 1, ptr noundef %133)
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr null, ptr %134, align 8, !tbaa !5
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %135)
  %137 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %136, i32 0, i32 15
  %138 = load ptr, ptr %137, align 8, !tbaa !55
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.VmaAllocator_T, ptr %139, i32 0, i32 10
  %141 = load ptr, ptr %140, align 8, !tbaa !46
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %144)
  call void %138(ptr noundef %141, ptr noundef %143, ptr noundef %145)
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr null, ptr %146, align 8, !tbaa !5
  %147 = load i32, ptr %16, align 4, !tbaa !47
  store i32 %147, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %162

148:                                              ; preds = %78
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %149)
  %151 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %150, i32 0, i32 15
  %152 = load ptr, ptr %151, align 8, !tbaa !55
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.VmaAllocator_T, ptr %153, i32 0, i32 10
  %155 = load ptr, ptr %154, align 8, !tbaa !46
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %158)
  call void %152(ptr noundef %155, ptr noundef %157, ptr noundef %159)
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr null, ptr %160, align 8, !tbaa !5
  %161 = load i32, ptr %16, align 4, !tbaa !47
  store i32 %161, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %162

162:                                              ; preds = %148, %131, %130
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %165

163:                                              ; preds = %61
  %164 = load i32, ptr %16, align 4, !tbaa !47
  store i32 %164, ptr %8, align 4
  store i32 1, ptr %20, align 4
  br label %165

165:                                              ; preds = %163, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %166

166:                                              ; preds = %165, %48
  %167 = load i32, ptr %8, align 4
  ret i32 %167
}

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


; 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.VkMemoryRequirements = type { i64, i64, i32 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.360 = external hidden unnamed_addr constant [149 x i8], align 1
@.str.361 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment = external hidden unnamed_addr constant [232 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

; 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 #1

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z9VmaIsPow2ImEbT_(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext, i1 noundef zeroext, ptr noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916), i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, ptr noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -2147483648, 1) i32 @vmaCreateBufferWithAlignment(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #5 {
  %8 = alloca i64, align 8
  %9 = alloca %struct.VkMemoryRequirements, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  store i64 %3, ptr %8, align 8, !tbaa !5
  %12 = icmp ne ptr %0, null
  %13 = icmp ne ptr %1, null
  %or.cond = and i1 %12, %13
  %14 = icmp ne ptr %2, null
  %or.cond3 = and i1 %or.cond, %14
  br i1 %or.cond3, label %15, label %.critedge

15:                                               ; preds = %7
  %16 = tail call noundef zeroext i1 @_Z9VmaIsPow2ImEbT_(i64 noundef %3)
  %17 = icmp ne ptr %4, null
  %or.cond5 = and i1 %17, %16
  %18 = icmp ne ptr %5, null
  %or.cond7 = and i1 %18, %or.cond5
  br i1 %or.cond7, label %19, label %.critedge

.critedge:                                        ; preds = %15, %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.361, ptr noundef nonnull @.str.2, i32 noundef 17238, ptr noundef nonnull @__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment) #6
  unreachable

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %1, i64 24
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %82, label %23

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %1, i64 32
  %25 = load i32, ptr %24, align 8, !tbaa !15
  %26 = and i32 %25, 131072
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %32, label %27

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %0, i64 12
  %29 = load i8, ptr %28, align 4, !tbaa !16, !range !42, !noundef !43
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  tail call void @__assert_fail(ptr noundef nonnull @.str.360, ptr noundef nonnull @.str.2, i32 noundef 17247, ptr noundef nonnull @__PRETTY_FUNCTION__.vmaCreateBufferWithAlignment) #6
  unreachable

32:                                               ; preds = %27, %23
  store ptr null, ptr %4, align 8, !tbaa !44
  store ptr null, ptr %5, align 8, !tbaa !44
  %33 = tail call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %34 = getelementptr inbounds i8, ptr %33, i64 112
  %35 = load ptr, ptr %34, align 8, !tbaa !45
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !46
  %38 = tail call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %39 = tail call noundef i32 %35(ptr noundef %37, ptr noundef nonnull %1, ptr noundef %38, ptr noundef nonnull %4)
  %40 = icmp sgt i32 %39, -1
  br i1 %40, label %41, label %82

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  store i8 0, ptr %10, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  store i8 0, ptr %11, align 1, !tbaa !47
  %42 = load ptr, ptr %4, align 8, !tbaa !44
  call void @_ZNK14VmaAllocator_T27GetBufferMemoryRequirementsEP10VkBuffer_TR20VkMemoryRequirementsRbS4_(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %42, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
  %43 = getelementptr inbounds i8, ptr %9, i64 8
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %45 = load i64, ptr %44, align 8, !tbaa !5
  store i64 %45, ptr %43, align 8, !tbaa !48
  %46 = load i8, ptr %10, align 1, !tbaa !47, !range !42, !noundef !43
  %47 = trunc nuw i8 %46 to i1
  %48 = load i8, ptr %11, align 1, !tbaa !47, !range !42, !noundef !43
  %49 = trunc nuw i8 %48 to i1
  %50 = load ptr, ptr %4, align 8, !tbaa !44
  %51 = load i32, ptr %24, align 8, !tbaa !15
  %52 = call noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull align 8 dereferenceable(24) %9, i1 noundef zeroext %47, i1 noundef zeroext %49, ptr noundef %50, ptr noundef null, i32 noundef %51, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 2, i64 noundef 1, ptr noundef nonnull %5)
  %53 = icmp sgt i32 %52, -1
  br i1 %53, label %54, label %74

54:                                               ; preds = %41
  %55 = load i32, ptr %2, align 8, !tbaa !50
  %56 = and i32 %55, 128
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %.thread

58:                                               ; preds = %54
  %59 = load ptr, ptr %5, align 8, !tbaa !44
  %60 = load ptr, ptr %4, align 8, !tbaa !44
  %61 = call noundef i32 @_ZN14VmaAllocator_T16BindBufferMemoryEP15VmaAllocation_TmP10VkBuffer_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %59, i64 noundef 0, ptr noundef %60, ptr noundef null)
  %62 = icmp sgt i32 %61, -1
  br i1 %62, label %.thread, label %67

.thread:                                          ; preds = %54, %58
  %63 = load ptr, ptr %5, align 8, !tbaa !44
  %64 = load i32, ptr %24, align 8, !tbaa !15
  call void @_ZN15VmaAllocation_T20InitBufferImageUsageEj(ptr noundef nonnull align 8 dereferenceable(84) %63, i32 noundef %64)
  %.not68 = icmp eq ptr %6, null
  br i1 %.not68, label %81, label %65

65:                                               ; preds = %.thread
  %66 = load ptr, ptr %5, align 8, !tbaa !44
  call void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %66, ptr noundef nonnull %6)
  br label %81

67:                                               ; preds = %58
  call void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, i64 noundef 1, ptr noundef nonnull %5)
  store ptr null, ptr %5, align 8, !tbaa !44
  %68 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %69 = getelementptr inbounds i8, ptr %68, i64 120
  %70 = load ptr, ptr %69, align 8, !tbaa !53
  %71 = load ptr, ptr %36, align 8, !tbaa !46
  %72 = load ptr, ptr %4, align 8, !tbaa !44
  %73 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void %70(ptr noundef %71, ptr noundef %72, ptr noundef %73)
  store ptr null, ptr %4, align 8, !tbaa !44
  br label %81

74:                                               ; preds = %41
  %75 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %76 = getelementptr inbounds i8, ptr %75, i64 120
  %77 = load ptr, ptr %76, align 8, !tbaa !53
  %78 = load ptr, ptr %36, align 8, !tbaa !46
  %79 = load ptr, ptr %4, align 8, !tbaa !44
  %80 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void %77(ptr noundef %78, ptr noundef %79, ptr noundef %80)
  store ptr null, ptr %4, align 8, !tbaa !44
  br label %81

81:                                               ; preds = %.thread, %65, %74, %67
  %.058 = phi i32 [ %61, %67 ], [ %52, %74 ], [ 0, %65 ], [ 0, %.thread ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %82

82:                                               ; preds = %81, %32, %19
  %.2 = phi i32 [ -3, %19 ], [ %.058, %81 ], [ %39, %32 ]
  ret i32 %.2
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"_ZTS18VkBufferCreateInfo", !11, i64 0, !12, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !14, i64 36, !13, i64 40, !12, i64 48}
!11 = !{!"_ZTS15VkStructureType", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS13VkSharingMode", !7, i64 0}
!15 = !{!10, !13, i64 32}
!16 = !{!17, !18, i64 12}
!17 = !{!"_ZTS14VmaAllocator_T", !18, i64 0, !13, i64 4, !18, i64 8, !18, i64 9, !18, i64 10, !18, i64 11, !18, i64 12, !18, i64 13, !12, i64 16, !12, i64 24, !18, i64 32, !19, i64 40, !20, i64 88, !21, i64 112, !13, i64 200, !28, i64 208, !33, i64 1032, !7, i64 1552, !7, i64 1808, !34, i64 4624, !35, i64 5456, !6, i64 5464, !12, i64 5472, !35, i64 5480, !35, i64 5484, !7, i64 5488, !37, i64 5616, !40, i64 5672, !13, i64 5696, !41, i64 5704, !13, i64 5912}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTS21VkAllocationCallbacks", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!20 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !12, i64 0, !12, i64 8, !12, i64 16}
!21 = !{!"_ZTS28VmaAllocationObjectAllocator", !22, i64 0, !25, i64 40}
!22 = !{!"_ZTS8VmaMutex", !23, i64 0}
!23 = !{!"_ZTSSt5mutex", !24, i64 0}
!24 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!25 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !12, i64 0, !13, i64 8, !26, i64 16}
!26 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !27, i64 0, !12, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !12, i64 0}
!28 = !{!"_ZTS26VkPhysicalDeviceProperties", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !29, i64 16, !7, i64 20, !7, i64 276, !30, i64 296, !32, i64 800}
!29 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!30 = !{!"_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, !6, i64 48, !6, 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, !31, i64 268, !31, i64 272, !13, i64 276, !7, i64 280, !7, i64 288, !13, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !13, i64 336, !13, i64 340, !13, i64 344, !13, i64 348, !31, i64 352, !31, 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, !31, i64 424, !13, i64 428, !13, i64 432, !13, i64 436, !13, i64 440, !7, i64 444, !7, i64 452, !31, i64 460, !31, i64 464, !13, i64 468, !13, i64 472, !6, i64 480, !6, i64 488, !6, i64 496}
!31 = !{!"float", !7, i64 0}
!32 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!33 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !13, i64 0, !7, i64 4, !13, i64 260, !7, i64 264}
!34 = !{!"_ZTS20VmaCurrentBudgetData", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 256, !35, i64 384, !37, i64 392, !7, i64 448, !7, i64 576, !7, i64 704}
!35 = !{!"_ZTSSt6atomicIjE", !36, i64 0}
!36 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!37 = !{!"_ZTS10VmaRWMutex", !38, i64 0}
!38 = !{!"_ZTSSt12shared_mutex", !39, i64 0}
!39 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!40 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !12, i64 0, !12, i64 8, !6, i64 16}
!41 = !{!"_ZTS18VmaVulkanFunctions", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!12, !12, i64 0}
!45 = !{!41, !12, i64 112}
!46 = !{!17, !12, i64 16}
!47 = !{!18, !18, i64 0}
!48 = !{!49, !6, i64 8}
!49 = !{!"_ZTS20VkMemoryRequirements", !6, i64 0, !6, i64 8, !13, i64 16}
!50 = !{!51, !13, i64 0}
!51 = !{!"_ZTS23VmaAllocationCreateInfo", !13, i64 0, !52, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !12, i64 24, !12, i64 32, !31, i64 40}
!52 = !{!"_ZTS14VmaMemoryUsage", !7, i64 0}
!53 = !{!41, !12, i64 120}


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