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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T = external hidden unnamed_addr constant [255 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaBlockVector8AllocateEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181), i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i64 noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i1 noundef zeroext %4, ptr noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef nonnull align 8 dereferenceable(48) %8, i32 noundef %9, i32 noundef %10, ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(181) %12, i64 noundef %13, ptr noundef %14) #3 align 2 {
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i8, align 1
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %struct.VmaAllocationCreateInfo, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i8, align 1
  store ptr %0, ptr %17, align 8, !tbaa !5
  store ptr %1, ptr %18, align 8, !tbaa !5
  store i64 %2, ptr %19, align 8, !tbaa !9
  store i64 %3, ptr %20, align 8, !tbaa !9
  %36 = zext i1 %4 to i8
  store i8 %36, ptr %21, align 1, !tbaa !11
  store ptr %5, ptr %22, align 8, !tbaa !5
  store ptr %6, ptr %23, align 8, !tbaa !5
  store i32 %7, ptr %24, align 4, !tbaa !13
  store ptr %8, ptr %25, align 8, !tbaa !5
  store i32 %9, ptr %26, align 4, !tbaa !13
  store i32 %10, ptr %27, align 4, !tbaa !15
  store ptr %11, ptr %28, align 8, !tbaa !5
  store ptr %12, ptr %29, align 8, !tbaa !5
  store i64 %13, ptr %30, align 8, !tbaa !9
  store ptr %14, ptr %31, align 8, !tbaa !5
  %37 = load ptr, ptr %17, align 8
  %38 = load ptr, ptr %31, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %15
  br label %43

41:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.255, ptr noundef @.str.2, i32 noundef 14556, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T) #6
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  call void @llvm.lifetime.start.p0(i64 48, ptr %32) #7
  %44 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %44, i64 48, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %45 = load i32, ptr %26, align 4, !tbaa !13
  %46 = load i64, ptr %19, align 8, !tbaa !9
  %47 = load i64, ptr %30, align 8, !tbaa !9
  %48 = call noundef i32 @_ZN14VmaAllocator_T17CalcMemTypeParamsER23VmaAllocationCreateInfojmm(ptr noundef nonnull align 8 dereferenceable(5916) %37, ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %45, i64 noundef %46, i64 noundef %47)
  store i32 %48, ptr %33, align 4, !tbaa !22
  %49 = load i32, ptr %33, align 4, !tbaa !22
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %43
  %52 = load i32, ptr %33, align 4, !tbaa !22
  store i32 %52, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %235

53:                                               ; preds = %43
  %54 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !24
  %56 = and i32 %55, 1
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %92

58:                                               ; preds = %53
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = load i64, ptr %19, align 8, !tbaa !9
  %61 = load i32, ptr %27, align 4, !tbaa !15
  %62 = load ptr, ptr %28, align 8, !tbaa !5
  %63 = load i32, ptr %26, align 4, !tbaa !13
  %64 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !24
  %66 = and i32 %65, 4
  %67 = icmp ne i32 %66, 0
  %68 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !24
  %70 = and i32 %69, 32
  %71 = icmp ne i32 %70, 0
  %72 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !24
  %74 = and i32 %73, 3072
  %75 = icmp ne i32 %74, 0
  %76 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !24
  %78 = and i32 %77, 512
  %79 = icmp ne i32 %78, 0
  %80 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 6
  %81 = load ptr, ptr %80, align 8, !tbaa !26
  %82 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 7
  %83 = load float, ptr %82, align 8, !tbaa !27
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = load ptr, ptr %23, align 8, !tbaa !5
  %86 = load i32, ptr %24, align 4, !tbaa !13
  %87 = load i64, ptr %30, align 8, !tbaa !9
  %88 = load ptr, ptr %31, align 8, !tbaa !5
  %89 = load ptr, ptr %29, align 8, !tbaa !5
  %90 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %89)
  %91 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %37, ptr noundef %59, i64 noundef %60, i32 noundef %61, ptr noundef nonnull align 8 dereferenceable(88) %62, i32 noundef %63, i1 noundef zeroext %67, i1 noundef zeroext %71, i1 noundef zeroext %75, i1 noundef zeroext %79, ptr noundef %81, float noundef %83, ptr noundef %84, ptr noundef %85, i32 noundef %86, i64 noundef %87, ptr noundef %88, ptr noundef %90)
  store i32 %91, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %235

92:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #7
  %93 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !24
  %95 = and i32 %94, 2
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %106

97:                                               ; preds = %92
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %104, label %100

100:                                              ; preds = %97
  %101 = load ptr, ptr %29, align 8, !tbaa !5
  %102 = call noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %101)
  %103 = xor i1 %102, true
  br label %104

104:                                              ; preds = %100, %97
  %105 = phi i1 [ true, %97 ], [ %103, %100 ]
  br label %106

106:                                              ; preds = %104, %92
  %107 = phi i1 [ false, %92 ], [ %105, %104 ]
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %35, align 1, !tbaa !11
  %109 = load i8, ptr %35, align 1, !tbaa !11, !range !28, !noundef !29
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %177

111:                                              ; preds = %106
  %112 = load i64, ptr %19, align 8, !tbaa !9
  %113 = load ptr, ptr %29, align 8, !tbaa !5
  %114 = call noundef i64 @_ZNK14VmaBlockVector21GetPreferredBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %113)
  %115 = udiv i64 %114, 2
  %116 = icmp ugt i64 %112, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %111
  store i8 1, ptr %21, align 1, !tbaa !11
  br label %118

118:                                              ; preds = %117, %111
  %119 = getelementptr inbounds %struct.VmaAllocator_T, ptr %37, i32 0, i32 19
  %120 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %119, i32 0, i32 7
  %121 = getelementptr inbounds %struct.VkPhysicalDeviceLimits, ptr %120, i32 0, i32 9
  %122 = load i32, ptr %121, align 4, !tbaa !30
  %123 = icmp ult i32 %122, 1073741823
  br i1 %123, label %124, label %135

124:                                              ; preds = %118
  %125 = getelementptr inbounds %struct.VmaAllocator_T, ptr %37, i32 0, i32 24
  %126 = call noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %125, i32 noundef 5) #7
  %127 = getelementptr inbounds %struct.VmaAllocator_T, ptr %37, i32 0, i32 19
  %128 = getelementptr inbounds %struct.VkPhysicalDeviceProperties, ptr %127, i32 0, i32 7
  %129 = getelementptr inbounds %struct.VkPhysicalDeviceLimits, ptr %128, i32 0, i32 9
  %130 = load i32, ptr %129, align 4, !tbaa !30
  %131 = mul i32 %130, 3
  %132 = udiv i32 %131, 4
  %133 = icmp ugt i32 %126, %132
  br i1 %133, label %134, label %135

134:                                              ; preds = %124
  store i8 0, ptr %21, align 1, !tbaa !11
  br label %135

135:                                              ; preds = %134, %124, %118
  %136 = load i8, ptr %21, align 1, !tbaa !11, !range !28, !noundef !29
  %137 = trunc i8 %136 to i1
  br i1 %137, label %138, label %176

138:                                              ; preds = %135
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  %140 = load i64, ptr %19, align 8, !tbaa !9
  %141 = load i32, ptr %27, align 4, !tbaa !15
  %142 = load ptr, ptr %28, align 8, !tbaa !5
  %143 = load i32, ptr %26, align 4, !tbaa !13
  %144 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %145 = load i32, ptr %144, align 8, !tbaa !24
  %146 = and i32 %145, 4
  %147 = icmp ne i32 %146, 0
  %148 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %149 = load i32, ptr %148, align 8, !tbaa !24
  %150 = and i32 %149, 32
  %151 = icmp ne i32 %150, 0
  %152 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %153 = load i32, ptr %152, align 8, !tbaa !24
  %154 = and i32 %153, 3072
  %155 = icmp ne i32 %154, 0
  %156 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %157 = load i32, ptr %156, align 8, !tbaa !24
  %158 = and i32 %157, 512
  %159 = icmp ne i32 %158, 0
  %160 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 6
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  %162 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 7
  %163 = load float, ptr %162, align 8, !tbaa !27
  %164 = load ptr, ptr %22, align 8, !tbaa !5
  %165 = load ptr, ptr %23, align 8, !tbaa !5
  %166 = load i32, ptr %24, align 4, !tbaa !13
  %167 = load i64, ptr %30, align 8, !tbaa !9
  %168 = load ptr, ptr %31, align 8, !tbaa !5
  %169 = load ptr, ptr %29, align 8, !tbaa !5
  %170 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %169)
  %171 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %37, ptr noundef %139, i64 noundef %140, i32 noundef %141, ptr noundef nonnull align 8 dereferenceable(88) %142, i32 noundef %143, i1 noundef zeroext %147, i1 noundef zeroext %151, i1 noundef zeroext %155, i1 noundef zeroext %159, ptr noundef %161, float noundef %163, ptr noundef %164, ptr noundef %165, i32 noundef %166, i64 noundef %167, ptr noundef %168, ptr noundef %170)
  store i32 %171, ptr %33, align 4, !tbaa !22
  %172 = load i32, ptr %33, align 4, !tbaa !22
  %173 = icmp eq i32 %172, 0
  br i1 %173, label %174, label %175

174:                                              ; preds = %138
  store i32 0, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %234

175:                                              ; preds = %138
  br label %176

176:                                              ; preds = %175, %135
  br label %177

177:                                              ; preds = %176, %106
  %178 = load ptr, ptr %29, align 8, !tbaa !5
  %179 = load i64, ptr %19, align 8, !tbaa !9
  %180 = load i64, ptr %20, align 8, !tbaa !9
  %181 = load i32, ptr %27, align 4, !tbaa !15
  %182 = load i64, ptr %30, align 8, !tbaa !9
  %183 = load ptr, ptr %31, align 8, !tbaa !5
  %184 = call noundef i32 @_ZN14VmaBlockVector8AllocateEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %178, i64 noundef %179, i64 noundef %180, ptr noundef nonnull align 8 dereferenceable(48) %32, i32 noundef %181, i64 noundef %182, ptr noundef %183)
  store i32 %184, ptr %33, align 4, !tbaa !22
  %185 = load i32, ptr %33, align 4, !tbaa !22
  %186 = icmp eq i32 %185, 0
  br i1 %186, label %187, label %188

187:                                              ; preds = %177
  store i32 0, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %234

188:                                              ; preds = %177
  %189 = load i8, ptr %35, align 1, !tbaa !11, !range !28, !noundef !29
  %190 = trunc i8 %189 to i1
  br i1 %190, label %191, label %232

191:                                              ; preds = %188
  %192 = load i8, ptr %21, align 1, !tbaa !11, !range !28, !noundef !29
  %193 = trunc i8 %192 to i1
  br i1 %193, label %232, label %194

194:                                              ; preds = %191
  %195 = load ptr, ptr %18, align 8, !tbaa !5
  %196 = load i64, ptr %19, align 8, !tbaa !9
  %197 = load i32, ptr %27, align 4, !tbaa !15
  %198 = load ptr, ptr %28, align 8, !tbaa !5
  %199 = load i32, ptr %26, align 4, !tbaa !13
  %200 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %201 = load i32, ptr %200, align 8, !tbaa !24
  %202 = and i32 %201, 4
  %203 = icmp ne i32 %202, 0
  %204 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %205 = load i32, ptr %204, align 8, !tbaa !24
  %206 = and i32 %205, 32
  %207 = icmp ne i32 %206, 0
  %208 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %209 = load i32, ptr %208, align 8, !tbaa !24
  %210 = and i32 %209, 3072
  %211 = icmp ne i32 %210, 0
  %212 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 0
  %213 = load i32, ptr %212, align 8, !tbaa !24
  %214 = and i32 %213, 512
  %215 = icmp ne i32 %214, 0
  %216 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 6
  %217 = load ptr, ptr %216, align 8, !tbaa !26
  %218 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %32, i32 0, i32 7
  %219 = load float, ptr %218, align 8, !tbaa !27
  %220 = load ptr, ptr %22, align 8, !tbaa !5
  %221 = load ptr, ptr %23, align 8, !tbaa !5
  %222 = load i32, ptr %24, align 4, !tbaa !13
  %223 = load i64, ptr %30, align 8, !tbaa !9
  %224 = load ptr, ptr %31, align 8, !tbaa !5
  %225 = load ptr, ptr %29, align 8, !tbaa !5
  %226 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %225)
  %227 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %37, ptr noundef %195, i64 noundef %196, i32 noundef %197, ptr noundef nonnull align 8 dereferenceable(88) %198, i32 noundef %199, i1 noundef zeroext %203, i1 noundef zeroext %207, i1 noundef zeroext %211, i1 noundef zeroext %215, ptr noundef %217, float noundef %219, ptr noundef %220, ptr noundef %221, i32 noundef %222, i64 noundef %223, ptr noundef %224, ptr noundef %226)
  store i32 %227, ptr %33, align 4, !tbaa !22
  %228 = load i32, ptr %33, align 4, !tbaa !22
  %229 = icmp eq i32 %228, 0
  br i1 %229, label %230, label %231

230:                                              ; preds = %194
  store i32 0, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %234

231:                                              ; preds = %194
  br label %232

232:                                              ; preds = %231, %191, %188
  %233 = load i32, ptr %33, align 4, !tbaa !22
  store i32 %233, ptr %16, align 4
  store i32 1, ptr %34, align 4
  br label %234

234:                                              ; preds = %232, %230, %187, %174
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  br label %235

235:                                              ; preds = %234, %58, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #7
  %236 = load i32, ptr %16, align 4
  ret i32 %236
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i64 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, float noundef, ptr noundef, ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) #3 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #5 align 2

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


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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T = external hidden unnamed_addr constant [255 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i1 noundef zeroext %4, ptr noundef %5, ptr noundef %6, i32 noundef %7, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %8, i32 noundef %9, i32 noundef %10, ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(181) %12, i64 noundef %13, ptr noundef %14) local_unnamed_addr #3 align 2 {
  %16 = alloca %struct.VmaAllocationCreateInfo, align 16
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %17, label %18

17:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.255, ptr noundef nonnull @.str.2, i32 noundef 14556, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaAllocator_T20AllocateMemoryOfTypeEP9VmaPool_TmmbP10VkBuffer_TP9VkImage_TjRK23VmaAllocationCreateInfoj20VmaSuballocationTypeR26VmaDedicatedAllocationListR14VmaBlockVectormPP15VmaAllocation_T) #6
  unreachable

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %16, ptr noundef nonnull align 8 dereferenceable(48) %8, i64 48, i1 false), !tbaa.struct !5
  %19 = call noundef i32 @_ZN14VmaAllocator_T17CalcMemTypeParamsER23VmaAllocationCreateInfojmm(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef nonnull align 8 dereferenceable(48) %16, i32 noundef %9, i64 noundef %2, i64 noundef %13)
  %.not66 = icmp eq i32 %19, 0
  br i1 %.not66, label %20, label %94

20:                                               ; preds = %18
  %21 = load i32, ptr %16, align 16, !tbaa !16
  %22 = and i32 %21, 1
  %.not67 = icmp eq i32 %22, 0
  br i1 %.not67, label %38, label %23

23:                                               ; preds = %20
  %24 = insertelement <4 x i32> poison, i32 %21, i64 0
  %25 = shufflevector <4 x i32> %24, <4 x i32> poison, <4 x i32> zeroinitializer
  %26 = and <4 x i32> %25, <i32 512, i32 3072, i32 32, i32 4>
  %27 = icmp ne <4 x i32> %26, zeroinitializer
  %28 = getelementptr inbounds i8, ptr %16, i64 32
  %29 = load ptr, ptr %28, align 16, !tbaa !18
  %30 = getelementptr inbounds i8, ptr %16, i64 40
  %31 = load float, ptr %30, align 8, !tbaa !19
  %32 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %12)
  %33 = extractelement <4 x i1> %27, i64 0
  %34 = extractelement <4 x i1> %27, i64 1
  %35 = extractelement <4 x i1> %27, i64 2
  %36 = extractelement <4 x i1> %27, i64 3
  %37 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, i64 noundef %2, i32 noundef %10, ptr noundef nonnull align 8 dereferenceable(88) %11, i32 noundef %9, i1 noundef zeroext %36, i1 noundef zeroext %35, i1 noundef zeroext %34, i1 noundef zeroext %33, ptr noundef %29, float noundef %31, ptr noundef %5, ptr noundef %6, i32 noundef %7, i64 noundef %13, ptr noundef nonnull %14, ptr noundef %32)
  br label %94

38:                                               ; preds = %20
  %39 = and i32 %21, 2
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %.thread71.thread

41:                                               ; preds = %38
  %42 = icmp eq ptr %1, null
  br i1 %42, label %.thread, label %43

43:                                               ; preds = %41
  %44 = call noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %12)
  br i1 %44, label %.thread71.thread, label %.thread

.thread:                                          ; preds = %41, %43
  %45 = call noundef i64 @_ZNK14VmaBlockVector21GetPreferredBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %12)
  %46 = lshr i64 %45, 1
  %47 = icmp ult i64 %46, %2
  %narrow = or i1 %47, %4
  %48 = getelementptr inbounds i8, ptr %0, i64 540
  %49 = load i32, ptr %48, align 4, !tbaa !20
  %50 = icmp ult i32 %49, 1073741823
  br i1 %50, label %51, label %59

51:                                               ; preds = %.thread
  %52 = getelementptr inbounds i8, ptr %0, i64 5456
  %53 = call noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %52, i32 noundef 5) #7
  %54 = load i32, ptr %48, align 4, !tbaa !20
  %55 = mul i32 %54, 3
  %56 = lshr i32 %55, 2
  %57 = icmp ule i32 %53, %56
  %58 = and i1 %57, %narrow
  br label %59

59:                                               ; preds = %51, %.thread
  %.161 = phi i1 [ %narrow, %.thread ], [ %58, %51 ]
  br i1 %.161, label %60, label %.thread71

60:                                               ; preds = %59
  %61 = load <4 x i32>, ptr %16, align 16
  %62 = shufflevector <4 x i32> %61, <4 x i32> poison, <4 x i32> zeroinitializer
  %63 = and <4 x i32> %62, <i32 512, i32 3072, i32 32, i32 4>
  %64 = icmp ne <4 x i32> %63, zeroinitializer
  %65 = getelementptr inbounds i8, ptr %16, i64 32
  %66 = load ptr, ptr %65, align 16, !tbaa !18
  %67 = getelementptr inbounds i8, ptr %16, i64 40
  %68 = load float, ptr %67, align 8, !tbaa !19
  %69 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %12)
  %70 = extractelement <4 x i1> %64, i64 0
  %71 = extractelement <4 x i1> %64, i64 1
  %72 = extractelement <4 x i1> %64, i64 2
  %73 = extractelement <4 x i1> %64, i64 3
  %74 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, i64 noundef %2, i32 noundef %10, ptr noundef nonnull align 8 dereferenceable(88) %11, i32 noundef %9, i1 noundef zeroext %73, i1 noundef zeroext %72, i1 noundef zeroext %71, i1 noundef zeroext %70, ptr noundef %66, float noundef %68, ptr noundef %5, ptr noundef %6, i32 noundef %7, i64 noundef %13, ptr noundef nonnull %14, ptr noundef %69)
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %94, label %.thread71

.thread71.thread:                                 ; preds = %43, %38
  %76 = call noundef i32 @_ZN14VmaBlockVector8AllocateEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %12, i64 noundef %2, i64 noundef %3, ptr noundef nonnull align 8 dereferenceable(48) %16, i32 noundef %10, i64 noundef %13, ptr noundef nonnull %14)
  br label %94

.thread71:                                        ; preds = %59, %60
  %77 = call noundef i32 @_ZN14VmaBlockVector8AllocateEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypemPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %12, i64 noundef %2, i64 noundef %3, ptr noundef nonnull align 8 dereferenceable(48) %16, i32 noundef %10, i64 noundef %13, ptr noundef nonnull %14)
  %78 = icmp eq i32 %77, 0
  %brmerge = or i1 %78, %.161
  br i1 %brmerge, label %94, label %79

79:                                               ; preds = %.thread71
  %80 = load <4 x i32>, ptr %16, align 16
  %81 = shufflevector <4 x i32> %80, <4 x i32> poison, <4 x i32> zeroinitializer
  %82 = and <4 x i32> %81, <i32 512, i32 3072, i32 32, i32 4>
  %83 = icmp ne <4 x i32> %82, zeroinitializer
  %84 = getelementptr inbounds i8, ptr %16, i64 32
  %85 = load ptr, ptr %84, align 16, !tbaa !18
  %86 = getelementptr inbounds i8, ptr %16, i64 40
  %87 = load float, ptr %86, align 8, !tbaa !19
  %88 = call noundef ptr @_ZNK14VmaBlockVector20GetAllocationNextPtrEv(ptr noundef nonnull align 8 dereferenceable(181) %12)
  %89 = extractelement <4 x i1> %83, i64 0
  %90 = extractelement <4 x i1> %83, i64 1
  %91 = extractelement <4 x i1> %83, i64 2
  %92 = extractelement <4 x i1> %83, i64 3
  %93 = call noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, i64 noundef %2, i32 noundef %10, ptr noundef nonnull align 8 dereferenceable(88) %11, i32 noundef %9, i1 noundef zeroext %92, i1 noundef zeroext %91, i1 noundef zeroext %90, i1 noundef zeroext %89, ptr noundef %85, float noundef %87, ptr noundef %5, ptr noundef %6, i32 noundef %7, i64 noundef %13, ptr noundef nonnull %14, ptr noundef %88)
  br label %94

94:                                               ; preds = %.thread71, %.thread71.thread, %79, %60, %18, %23
  %.1 = phi i32 [ %37, %23 ], [ %19, %18 ], [ 0, %60 ], [ %77, %.thread71 ], [ %93, %79 ], [ %76, %.thread71.thread ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %16) #7
  ret i32 %.1
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14VmaAllocator_T23AllocateDedicatedMemoryEP9VmaPool_Tm20VmaSuballocationTypeR26VmaDedicatedAllocationListjbbbbPvfP10VkBuffer_TP9VkImage_TjmPP15VmaAllocation_TPKv(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i64 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, float noundef, ptr noundef, ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #5 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass