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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.364 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.vmaCreateImage = external hidden unnamed_addr constant [202 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916)) #3 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)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK14VmaAllocator_T26GetImageMemoryRequirementsEP9VkImage_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)) #4 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) #4 align 2

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

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

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

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

22:                                               ; preds = %6
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %34

25:                                               ; preds = %22
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %34

28:                                               ; preds = %25
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %34

31:                                               ; preds = %28
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br label %34

34:                                               ; preds = %31, %28, %25, %22, %6
  %35 = phi i1 [ false, %28 ], [ false, %25 ], [ false, %22 ], [ false, %6 ], [ %33, %31 ]
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  br label %39

37:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.364, ptr noundef @.str.2, i32 noundef 17416, ptr noundef @__PRETTY_FUNCTION__.vmaCreateImage) #5
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %40, i32 0, i32 5
  %42 = getelementptr inbounds %struct.VkExtent3D, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %67, label %45

45:                                               ; preds = %39
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %46, i32 0, i32 5
  %48 = getelementptr inbounds %struct.VkExtent3D, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !20
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %67, label %51

51:                                               ; preds = %45
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %52, i32 0, i32 5
  %54 = getelementptr inbounds %struct.VkExtent3D, ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !21
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %67, label %57

57:                                               ; preds = %51
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %59, align 8, !tbaa !22
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %67, label %62

62:                                               ; preds = %57
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %63, i32 0, i32 7
  %65 = load i32, ptr %64, align 4, !tbaa !23
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %62, %57, %51, %45, %39
  store i32 -3, ptr %7, align 4
  br label %176

68:                                               ; preds = %62
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %69, align 8, !tbaa !5
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr null, ptr %70, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %71)
  %73 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %72, i32 0, i32 16
  %74 = load ptr, ptr %73, align 8, !tbaa !24
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.VmaAllocator_T, ptr %75, i32 0, i32 10
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %79)
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = call noundef i32 %74(ptr noundef %77, ptr noundef %78, ptr noundef %80, ptr noundef %81)
  store i32 %82, ptr %14, align 4, !tbaa !52
  %83 = load i32, ptr %14, align 4, !tbaa !52
  %84 = icmp sge i32 %83, 0
  br i1 %84, label %85, label %173

85:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %86, i32 0, i32 9
  %88 = load i32, ptr %87, align 4, !tbaa !54
  %89 = icmp eq i32 %88, 0
  %90 = zext i1 %89 to i64
  %91 = select i1 %89, i32 5, i32 4
  store i32 %91, ptr %15, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 0, ptr %18, align 1, !tbaa !57
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  call void @_ZNK14VmaAllocator_T26GetImageMemoryRequirementsEP9VkImage_TR20VkMemoryRequirementsRbS4_(ptr noundef nonnull align 8 dereferenceable(5916) %92, ptr noundef %94, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load i8, ptr %17, align 1, !tbaa !57, !range !58, !noundef !59
  %97 = trunc i8 %96 to i1
  %98 = load i8, ptr %18, align 1, !tbaa !57, !range !58, !noundef !59
  %99 = trunc i8 %98 to i1
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %102, i32 0, i32 10
  %104 = load i32, ptr %103, align 8, !tbaa !60
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load i32, ptr %15, align 4, !tbaa !55
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = call noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %95, ptr noundef nonnull align 8 dereferenceable(24) %16, i1 noundef zeroext %97, i1 noundef zeroext %99, ptr noundef null, ptr noundef %101, i32 noundef %104, ptr noundef nonnull align 8 dereferenceable(48) %105, i32 noundef %106, i64 noundef 1, ptr noundef %107)
  store i32 %108, ptr %14, align 4, !tbaa !52
  %109 = load i32, ptr %14, align 4, !tbaa !52
  %110 = icmp sge i32 %109, 0
  br i1 %110, label %111, label %158

111:                                              ; preds = %85
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !61
  %115 = and i32 %114, 128
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %124

117:                                              ; preds = %111
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = call noundef i32 @_ZN14VmaAllocator_T15BindImageMemoryEP15VmaAllocation_TmP9VkImage_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %118, ptr noundef %120, i64 noundef 0, ptr noundef %122, ptr noundef null)
  store i32 %123, ptr %14, align 4, !tbaa !52
  br label %124

124:                                              ; preds = %117, %111
  %125 = load i32, ptr %14, align 4, !tbaa !52
  %126 = icmp sge i32 %125, 0
  br i1 %126, label %127, label %141

127:                                              ; preds = %124
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %130, i32 0, i32 10
  %132 = load i32, ptr %131, align 8, !tbaa !60
  call void @_ZN15VmaAllocation_T20InitBufferImageUsageEj(ptr noundef nonnull align 8 dereferenceable(84) %129, i32 noundef %132)
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %140

135:                                              ; preds = %127
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916) %136, ptr noundef %138, ptr noundef %139)
  br label %140

140:                                              ; preds = %135, %127
  store i32 0, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %172

141:                                              ; preds = %124
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %142, i64 noundef 1, ptr noundef %143)
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr null, ptr %144, align 8, !tbaa !5
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %145)
  %147 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %146, i32 0, i32 17
  %148 = load ptr, ptr %147, align 8, !tbaa !64
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.VmaAllocator_T, ptr %149, i32 0, i32 10
  %151 = load ptr, ptr %150, align 8, !tbaa !26
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %154)
  call void %148(ptr noundef %151, ptr noundef %153, ptr noundef %155)
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %156, align 8, !tbaa !5
  %157 = load i32, ptr %14, align 4, !tbaa !52
  store i32 %157, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %172

158:                                              ; preds = %85
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %159)
  %161 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %160, i32 0, i32 17
  %162 = load ptr, ptr %161, align 8, !tbaa !64
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.VmaAllocator_T, ptr %163, i32 0, i32 10
  %165 = load ptr, ptr %164, align 8, !tbaa !26
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %168)
  call void %162(ptr noundef %165, ptr noundef %167, ptr noundef %169)
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %170, align 8, !tbaa !5
  %171 = load i32, ptr %14, align 4, !tbaa !52
  store i32 %171, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %172

172:                                              ; preds = %158, %141, %140
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %175

173:                                              ; preds = %68
  %174 = load i32, ptr %14, align 4, !tbaa !52
  store i32 %174, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %175

175:                                              ; preds = %173, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %176

176:                                              ; preds = %175, %67
  %177 = load i32, ptr %7, align 4
  ret i32 %177
}

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 = { 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 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 = { noreturn nounwind }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 28}
!10 = !{!"_ZTS17VkImageCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !13, i64 20, !14, i64 24, !15, i64 28, !12, i64 40, !12, i64 44, !16, i64 48, !17, i64 52, !12, i64 56, !18, i64 60, !12, i64 64, !6, i64 72, !19, i64 80}
!11 = !{!"_ZTS15VkStructureType", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS11VkImageType", !7, i64 0}
!14 = !{!"_ZTS8VkFormat", !7, i64 0}
!15 = !{!"_ZTS10VkExtent3D", !12, i64 0, !12, i64 4, !12, i64 8}
!16 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!17 = !{!"_ZTS13VkImageTiling", !7, i64 0}
!18 = !{!"_ZTS13VkSharingMode", !7, i64 0}
!19 = !{!"_ZTS13VkImageLayout", !7, i64 0}
!20 = !{!10, !12, i64 32}
!21 = !{!10, !12, i64 36}
!22 = !{!10, !12, i64 40}
!23 = !{!10, !12, i64 44}
!24 = !{!25, !6, i64 128}
!25 = !{!"_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}
!26 = !{!27, !6, i64 16}
!27 = !{!"_ZTS14VmaAllocator_T", !28, i64 0, !12, i64 4, !28, i64 8, !28, i64 9, !28, i64 10, !28, i64 11, !28, i64 12, !28, i64 13, !6, i64 16, !6, i64 24, !28, i64 32, !29, i64 40, !30, i64 88, !31, i64 112, !12, i64 200, !39, i64 208, !44, i64 1032, !7, i64 1552, !7, i64 1808, !45, i64 4624, !46, i64 5456, !38, i64 5464, !6, i64 5472, !46, i64 5480, !46, i64 5484, !7, i64 5488, !48, i64 5616, !51, i64 5672, !12, i64 5696, !25, i64 5704, !12, i64 5912}
!28 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTS21VkAllocationCallbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!30 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTS28VmaAllocationObjectAllocator", !32, i64 0, !35, i64 40}
!32 = !{!"_ZTS8VmaMutex", !33, i64 0}
!33 = !{!"_ZTSSt5mutex", !34, i64 0}
!34 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!35 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !6, i64 0, !12, i64 8, !36, i64 16}
!36 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !37, i64 0, !6, i64 8, !38, i64 16, !38, i64 24}
!37 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !6, i64 0}
!38 = !{!"long", !7, i64 0}
!39 = !{!"_ZTS26VkPhysicalDeviceProperties", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !40, i64 16, !7, i64 20, !7, i64 276, !41, i64 296, !43, i64 800}
!40 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!41 = !{!"_ZTS22VkPhysicalDeviceLimits", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !38, i64 48, !38, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !12, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !7, i64 220, !12, i64 232, !7, i64 236, !12, i64 248, !12, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !42, i64 268, !42, i64 272, !12, i64 276, !7, i64 280, !7, i64 288, !12, i64 296, !38, i64 304, !38, i64 312, !38, i64 320, !38, i64 328, !12, i64 336, !12, i64 340, !12, i64 344, !12, i64 348, !42, i64 352, !42, i64 356, !12, i64 360, !12, i64 364, !12, i64 368, !12, i64 372, !12, i64 376, !12, i64 380, !12, i64 384, !12, i64 388, !12, i64 392, !12, i64 396, !12, i64 400, !12, i64 404, !12, i64 408, !12, i64 412, !12, i64 416, !12, i64 420, !42, i64 424, !12, i64 428, !12, i64 432, !12, i64 436, !12, i64 440, !7, i64 444, !7, i64 452, !42, i64 460, !42, i64 464, !12, i64 468, !12, i64 472, !38, i64 480, !38, i64 488, !38, i64 496}
!42 = !{!"float", !7, i64 0}
!43 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!44 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !12, i64 0, !7, i64 4, !12, i64 260, !7, i64 264}
!45 = !{!"_ZTS20VmaCurrentBudgetData", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 256, !46, i64 384, !48, i64 392, !7, i64 448, !7, i64 576, !7, i64 704}
!46 = !{!"_ZTSSt6atomicIjE", !47, i64 0}
!47 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!48 = !{!"_ZTS10VmaRWMutex", !49, i64 0}
!49 = !{!"_ZTSSt12shared_mutex", !50, i64 0}
!50 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!51 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !6, i64 0, !6, i64 8, !38, i64 16}
!52 = !{!53, !53, i64 0}
!53 = !{!"_ZTS8VkResult", !7, i64 0}
!54 = !{!10, !17, i64 52}
!55 = !{!56, !56, i64 0}
!56 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!57 = !{!28, !28, i64 0}
!58 = !{i8 0, i8 2}
!59 = !{}
!60 = !{!10, !12, i64 56}
!61 = !{!62, !12, i64 0}
!62 = !{!"_ZTS23VmaAllocationCreateInfo", !12, i64 0, !63, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !42, i64 40}
!63 = !{!"_ZTS14VmaMemoryUsage", !7, i64 0}
!64 = !{!25, !6, i64 136}


; 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.364 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.vmaCreateImage = external hidden unnamed_addr constant [202 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916)) local_unnamed_addr #3 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 #3 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK14VmaAllocator_T26GetImageMemoryRequirementsEP9VkImage_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 #4 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 #4 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 #4 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 #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -2147483648, 1) i32 @vmaCreateImage(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #4 {
  %7 = alloca %struct.VkMemoryRequirements, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %11 = insertelement <4 x ptr> %10, ptr %1, i64 1
  %12 = insertelement <4 x ptr> %11, ptr %2, i64 2
  %13 = insertelement <4 x ptr> %12, ptr %3, i64 3
  %14 = icmp ne ptr %4, null
  %15 = icmp eq <4 x ptr> %13, zeroinitializer
  %16 = bitcast <4 x i1> %15 to i4
  %17 = icmp eq i4 %16, 0
  %op.rdx = and i1 %17, %14
  br i1 %op.rdx, label %18, label %.critedge

.critedge:                                        ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.364, ptr noundef nonnull @.str.2, i32 noundef 17416, ptr noundef nonnull @__PRETTY_FUNCTION__.vmaCreateImage) #5
  unreachable

18:                                               ; preds = %6
  %19 = getelementptr inbounds i8, ptr %1, i64 28
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %90, label %22

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %1, i64 32
  %24 = load i32, ptr %23, align 4, !tbaa !19
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %90, label %26

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %1, i64 36
  %28 = load i32, ptr %27, align 4, !tbaa !20
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %90, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %1, i64 40
  %32 = load i32, ptr %31, align 8, !tbaa !21
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %90, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %1, i64 44
  %36 = load i32, ptr %35, align 4, !tbaa !22
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %90, label %38

38:                                               ; preds = %34
  store ptr null, ptr %3, align 8, !tbaa !23
  store ptr null, ptr %4, align 8, !tbaa !23
  %39 = tail call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %40 = getelementptr inbounds i8, ptr %39, i64 128
  %41 = load ptr, ptr %40, align 8, !tbaa !24
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  %43 = load ptr, ptr %42, align 8, !tbaa !26
  %44 = tail call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %45 = tail call noundef i32 %41(ptr noundef %43, ptr noundef nonnull %1, ptr noundef %44, ptr noundef nonnull %3)
  %46 = icmp sgt i32 %45, -1
  br i1 %46, label %47, label %90

47:                                               ; preds = %38
  %48 = getelementptr inbounds i8, ptr %1, i64 52
  %49 = load i32, ptr %48, align 4, !tbaa !52
  %50 = icmp eq i32 %49, 0
  %51 = select i1 %50, i32 5, i32 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  store i8 0, ptr %8, align 1, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 0, ptr %9, align 1, !tbaa !53
  %52 = load ptr, ptr %3, align 8, !tbaa !23
  call void @_ZNK14VmaAllocator_T26GetImageMemoryRequirementsEP9VkImage_TR20VkMemoryRequirementsRbS4_(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %52, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
  %53 = load i8, ptr %8, align 1, !tbaa !53, !range !54, !noundef !55
  %54 = trunc nuw i8 %53 to i1
  %55 = load i8, ptr %9, align 1, !tbaa !53, !range !54, !noundef !55
  %56 = trunc nuw i8 %55 to i1
  %57 = load ptr, ptr %3, align 8, !tbaa !23
  %58 = getelementptr inbounds i8, ptr %1, i64 56
  %59 = load i32, ptr %58, align 8, !tbaa !56
  %60 = call noundef i32 @_ZN14VmaAllocator_T14AllocateMemoryERK20VkMemoryRequirementsbbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull align 8 dereferenceable(24) %7, i1 noundef zeroext %54, i1 noundef zeroext %56, ptr noundef null, ptr noundef %57, i32 noundef %59, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef %51, i64 noundef 1, ptr noundef nonnull %4)
  %61 = icmp sgt i32 %60, -1
  br i1 %61, label %62, label %82

62:                                               ; preds = %47
  %63 = load i32, ptr %2, align 8, !tbaa !57
  %64 = and i32 %63, 128
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %.thread

66:                                               ; preds = %62
  %67 = load ptr, ptr %4, align 8, !tbaa !23
  %68 = load ptr, ptr %3, align 8, !tbaa !23
  %69 = call noundef i32 @_ZN14VmaAllocator_T15BindImageMemoryEP15VmaAllocation_TmP9VkImage_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %67, i64 noundef 0, ptr noundef %68, ptr noundef null)
  %70 = icmp sgt i32 %69, -1
  br i1 %70, label %.thread, label %75

.thread:                                          ; preds = %62, %66
  %71 = load ptr, ptr %4, align 8, !tbaa !23
  %72 = load i32, ptr %58, align 8, !tbaa !56
  call void @_ZN15VmaAllocation_T20InitBufferImageUsageEj(ptr noundef nonnull align 8 dereferenceable(84) %71, i32 noundef %72)
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %89, label %73

73:                                               ; preds = %.thread
  %74 = load ptr, ptr %4, align 8, !tbaa !23
  call void @_ZN14VmaAllocator_T17GetAllocationInfoEP15VmaAllocation_TP17VmaAllocationInfo(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %74, ptr noundef nonnull %5)
  br label %89

75:                                               ; preds = %66
  call void @_ZN14VmaAllocator_T10FreeMemoryEmPKP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, i64 noundef 1, ptr noundef nonnull %4)
  store ptr null, ptr %4, align 8, !tbaa !23
  %76 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %77 = getelementptr inbounds i8, ptr %76, i64 136
  %78 = load ptr, ptr %77, align 8, !tbaa !60
  %79 = load ptr, ptr %42, align 8, !tbaa !26
  %80 = load ptr, ptr %3, align 8, !tbaa !23
  %81 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void %78(ptr noundef %79, ptr noundef %80, ptr noundef %81)
  store ptr null, ptr %3, align 8, !tbaa !23
  br label %89

82:                                               ; preds = %47
  %83 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %84 = getelementptr inbounds i8, ptr %83, i64 136
  %85 = load ptr, ptr %84, align 8, !tbaa !60
  %86 = load ptr, ptr %42, align 8, !tbaa !26
  %87 = load ptr, ptr %3, align 8, !tbaa !23
  %88 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void %85(ptr noundef %86, ptr noundef %87, ptr noundef %88)
  store ptr null, ptr %3, align 8, !tbaa !23
  br label %89

89:                                               ; preds = %.thread, %73, %82, %75
  %.0 = phi i32 [ %69, %75 ], [ %60, %82 ], [ 0, %73 ], [ 0, %.thread ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %90

90:                                               ; preds = %89, %38, %18, %22, %26, %30, %34
  %.2 = phi i32 [ -3, %34 ], [ -3, %30 ], [ -3, %26 ], [ -3, %22 ], [ -3, %18 ], [ %.0, %89 ], [ %45, %38 ]
  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 = { 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 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 = { noreturn nounwind }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 28}
!6 = !{!"_ZTS17VkImageCreateInfo", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 20, !13, i64 24, !14, i64 28, !11, i64 40, !11, i64 44, !15, i64 48, !16, i64 52, !11, i64 56, !17, i64 60, !11, i64 64, !10, i64 72, !18, i64 80}
!7 = !{!"_ZTS15VkStructureType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTS11VkImageType", !8, i64 0}
!13 = !{!"_ZTS8VkFormat", !8, i64 0}
!14 = !{!"_ZTS10VkExtent3D", !11, i64 0, !11, i64 4, !11, i64 8}
!15 = !{!"_ZTS21VkSampleCountFlagBits", !8, i64 0}
!16 = !{!"_ZTS13VkImageTiling", !8, i64 0}
!17 = !{!"_ZTS13VkSharingMode", !8, i64 0}
!18 = !{!"_ZTS13VkImageLayout", !8, i64 0}
!19 = !{!6, !11, i64 32}
!20 = !{!6, !11, i64 36}
!21 = !{!6, !11, i64 40}
!22 = !{!6, !11, i64 44}
!23 = !{!10, !10, i64 0}
!24 = !{!25, !10, i64 128}
!25 = !{!"_ZTS18VmaVulkanFunctions", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200}
!26 = !{!27, !10, i64 16}
!27 = !{!"_ZTS14VmaAllocator_T", !28, i64 0, !11, i64 4, !28, i64 8, !28, i64 9, !28, i64 10, !28, i64 11, !28, i64 12, !28, i64 13, !10, i64 16, !10, i64 24, !28, i64 32, !29, i64 40, !30, i64 88, !31, i64 112, !11, i64 200, !39, i64 208, !44, i64 1032, !8, i64 1552, !8, i64 1808, !45, i64 4624, !46, i64 5456, !38, i64 5464, !10, i64 5472, !46, i64 5480, !46, i64 5484, !8, i64 5488, !48, i64 5616, !51, i64 5672, !11, i64 5696, !25, i64 5704, !11, i64 5912}
!28 = !{!"bool", !8, i64 0}
!29 = !{!"_ZTS21VkAllocationCallbacks", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!30 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !10, i64 0, !10, i64 8, !10, i64 16}
!31 = !{!"_ZTS28VmaAllocationObjectAllocator", !32, i64 0, !35, i64 40}
!32 = !{!"_ZTS8VmaMutex", !33, i64 0}
!33 = !{!"_ZTSSt5mutex", !34, i64 0}
!34 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!35 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !10, i64 0, !11, i64 8, !36, i64 16}
!36 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !37, i64 0, !10, i64 8, !38, i64 16, !38, i64 24}
!37 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !10, i64 0}
!38 = !{!"long", !8, i64 0}
!39 = !{!"_ZTS26VkPhysicalDeviceProperties", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !40, i64 16, !8, i64 20, !8, i64 276, !41, i64 296, !43, i64 800}
!40 = !{!"_ZTS20VkPhysicalDeviceType", !8, i64 0}
!41 = !{!"_ZTS22VkPhysicalDeviceLimits", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !38, i64 48, !38, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !8, i64 220, !11, i64 232, !8, i64 236, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !42, i64 268, !42, i64 272, !11, i64 276, !8, i64 280, !8, i64 288, !11, i64 296, !38, i64 304, !38, i64 312, !38, i64 320, !38, i64 328, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !42, i64 352, !42, i64 356, !11, i64 360, !11, i64 364, !11, i64 368, !11, i64 372, !11, i64 376, !11, i64 380, !11, i64 384, !11, i64 388, !11, i64 392, !11, i64 396, !11, i64 400, !11, i64 404, !11, i64 408, !11, i64 412, !11, i64 416, !11, i64 420, !42, i64 424, !11, i64 428, !11, i64 432, !11, i64 436, !11, i64 440, !8, i64 444, !8, i64 452, !42, i64 460, !42, i64 464, !11, i64 468, !11, i64 472, !38, i64 480, !38, i64 488, !38, i64 496}
!42 = !{!"float", !8, i64 0}
!43 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!44 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !11, i64 0, !8, i64 4, !11, i64 260, !8, i64 264}
!45 = !{!"_ZTS20VmaCurrentBudgetData", !8, i64 0, !8, i64 64, !8, i64 128, !8, i64 256, !46, i64 384, !48, i64 392, !8, i64 448, !8, i64 576, !8, i64 704}
!46 = !{!"_ZTSSt6atomicIjE", !47, i64 0}
!47 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!48 = !{!"_ZTS10VmaRWMutex", !49, i64 0}
!49 = !{!"_ZTSSt12shared_mutex", !50, i64 0}
!50 = !{!"_ZTSSt22__shared_mutex_pthread", !8, i64 0}
!51 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !10, i64 0, !10, i64 8, !38, i64 16}
!52 = !{!6, !16, i64 52}
!53 = !{!28, !28, i64 0}
!54 = !{i8 0, i8 2}
!55 = !{}
!56 = !{!6, !11, i64 56}
!57 = !{!58, !11, i64 0}
!58 = !{!"_ZTS23VmaAllocationCreateInfo", !11, i64 0, !59, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !10, i64 24, !10, i64 32, !42, i64 40}
!59 = !{!"_ZTS14VmaMemoryUsage", !8, i64 0}
!60 = !{!25, !10, i64 136}


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