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

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImEpLEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImEmIEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjEmmEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.AtomicTransactionalIncrement, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %19 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 24
  %20 = invoke noundef i32 @_ZN28AtomicTransactionalIncrementISt6atomicIjEE9IncrementEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %19)
          to label %21 unwind label %58

21:                                               ; preds = %3
  %22 = zext i32 %20 to i64
  store i64 %22, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = invoke noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %18, i32 noundef %25)
          to label %27 unwind label %62

27:                                               ; preds = %21
  store i32 %26, ptr %12, align 4, !tbaa !15
  %28 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 17
  %29 = load i32, ptr %28, align 8, !tbaa !16
  %30 = load i32, ptr %12, align 4, !tbaa !15
  %31 = shl i32 1, %30
  %32 = and i32 %29, %31
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %83

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %35 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 20
  %36 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %35, i32 0, i32 3
  %37 = load i32, ptr %12, align 4, !tbaa !15
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds [16 x %struct.VkMemoryHeap], ptr %36, i64 0, i64 %38
  %40 = getelementptr inbounds %struct.VkMemoryHeap, ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !42
  store i64 %41, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %42 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %43 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %12, align 4, !tbaa !15
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %43, i64 0, i64 %45
  %47 = call noundef i64 @_ZNKSt13__atomic_baseImEcvmEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #5
  store i64 %47, ptr %14, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %78, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %49 = load i64, ptr %14, align 8, !tbaa !9
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %50, i32 0, i32 2
  %52 = load i64, ptr %51, align 8, !tbaa !44
  %53 = add i64 %49, %52
  store i64 %53, ptr %15, align 8, !tbaa !9
  %54 = load i64, ptr %15, align 8, !tbaa !9
  %55 = load i64, ptr %13, align 8, !tbaa !9
  %56 = icmp ugt i64 %54, %55
  br i1 %56, label %57, label %66

57:                                               ; preds = %48
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %76

58:                                               ; preds = %3
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  br label %164

62:                                               ; preds = %21
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  br label %163

66:                                               ; preds = %48
  %67 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %68 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %12, align 4, !tbaa !15
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %68, i64 0, i64 %70
  %72 = load i64, ptr %15, align 8, !tbaa !9
  %73 = call noundef zeroext i1 @_ZNSt13__atomic_baseImE23compare_exchange_strongERmmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %72, i32 noundef 5) #5
  br i1 %73, label %74, label %75

74:                                               ; preds = %66
  store i32 2, ptr %16, align 4
  br label %76

75:                                               ; preds = %66
  store i32 0, ptr %16, align 4
  br label %76

76:                                               ; preds = %75, %74, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %77 = load i32, ptr %16, align 4
  switch i32 %77, label %80 [
    i32 0, label %78
    i32 2, label %79
  ]

78:                                               ; preds = %76
  br label %48, !llvm.loop !45

79:                                               ; preds = %76
  store i32 0, ptr %16, align 4
  br label %80

80:                                               ; preds = %79, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %81 = load i32, ptr %16, align 4
  switch i32 %81, label %161 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %93

83:                                               ; preds = %27
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %84, i32 0, i32 2
  %86 = load i64, ptr %85, align 8, !tbaa !44
  %87 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %88 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %12, align 4, !tbaa !15
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %88, i64 0, i64 %90
  %92 = call noundef i64 @_ZNSt13__atomic_baseImEpLEm(ptr noundef nonnull align 8 dereferenceable(8) %91, i64 noundef %86) #5
  br label %93

93:                                               ; preds = %83, %82
  %94 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %95 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %12, align 4, !tbaa !15
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [16 x %"struct.std::atomic"], ptr %95, i64 0, i64 %97
  %99 = call noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4) %98) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %100 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 35
  %101 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !47
  %103 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 10
  %104 = load ptr, ptr %103, align 8, !tbaa !48
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = invoke noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %18)
          to label %107 unwind label %137

107:                                              ; preds = %93
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = invoke noundef i32 %102(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %108)
          to label %110 unwind label %137

110:                                              ; preds = %107
  store i32 %109, ptr %17, align 4, !tbaa !49
  %111 = load i32, ptr %17, align 4, !tbaa !49
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %143

113:                                              ; preds = %110
  %114 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %115 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %114, i32 0, i32 4
  %116 = call noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4) %115) #5
  %117 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 15
  %118 = getelementptr inbounds %struct.VmaDeviceMemoryCallbacks, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !51
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %141

121:                                              ; preds = %113
  %122 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 15
  %123 = getelementptr inbounds %struct.VmaDeviceMemoryCallbacks, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !51
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 8, !tbaa !11
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %130, i32 0, i32 2
  %132 = load i64, ptr %131, align 8, !tbaa !44
  %133 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 15
  %134 = getelementptr inbounds %struct.VmaDeviceMemoryCallbacks, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !52
  invoke void %124(ptr noundef %18, i32 noundef %127, ptr noundef %129, i64 noundef %132, ptr noundef %135)
          to label %136 unwind label %137

136:                                              ; preds = %121
  br label %141

137:                                              ; preds = %141, %121, %107, %93
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %163

141:                                              ; preds = %136, %113
  invoke void @_ZN28AtomicTransactionalIncrementISt6atomicIjEE6CommitEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %142 unwind label %137

142:                                              ; preds = %141
  br label %159

143:                                              ; preds = %110
  %144 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %145 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %144, i32 0, i32 0
  %146 = load i32, ptr %12, align 4, !tbaa !15
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds [16 x %"struct.std::atomic"], ptr %145, i64 0, i64 %147
  %149 = call noundef i32 @_ZNSt13__atomic_baseIjEmmEv(ptr noundef nonnull align 4 dereferenceable(4) %148) #5
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %150, i32 0, i32 2
  %152 = load i64, ptr %151, align 8, !tbaa !44
  %153 = getelementptr inbounds %struct.VmaAllocator_T, ptr %18, i32 0, i32 23
  %154 = getelementptr inbounds %struct.VmaCurrentBudgetData, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %12, align 4, !tbaa !15
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %154, i64 0, i64 %156
  %158 = call noundef i64 @_ZNSt13__atomic_baseImEmIEm(ptr noundef nonnull align 8 dereferenceable(8) %157, i64 noundef %152) #5
  br label %159

159:                                              ; preds = %143, %142
  %160 = load i32, ptr %17, align 4, !tbaa !49
  store i32 %160, ptr %4, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %161

161:                                              ; preds = %159, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %162 = load i32, ptr %4, align 4
  ret i32 %162

163:                                              ; preds = %137, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %164

164:                                              ; preds = %163, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %10, align 8
  %167 = load i32, ptr %11, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169
}

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt13__atomic_baseImE23compare_exchange_strongERmmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #4 align 2

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

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

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


; 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.AtomicTransactionalIncrement = type { ptr }
%struct.VkMemoryHeap = type { i64, i32 }
%"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 }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImEpLEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt13__atomic_baseImEmIEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjEmmEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T20AllocateVulkanMemoryEPK20VkMemoryAllocateInfoPP16VkDeviceMemory_T(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.AtomicTransactionalIncrement, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 5456
  %7 = call noundef i32 @_ZN28AtomicTransactionalIncrementISt6atomicIjEE9IncrementEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %6)
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %0, i32 noundef %9)
  %11 = getelementptr inbounds i8, ptr %0, i64 200
  %12 = load i32, ptr %11, align 8, !tbaa !13
  %13 = shl nuw i32 1, %10
  %14 = and i32 %12, %13
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %32, label %15

15:                                               ; preds = %3
  %16 = getelementptr inbounds i8, ptr %0, i64 1296
  %17 = zext i32 %10 to i64
  %18 = getelementptr inbounds [16 x %struct.VkMemoryHeap], ptr %16, i64 0, i64 %17
  %19 = load i64, ptr %18, align 8, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 4752
  %21 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %20, i64 0, i64 %17
  %22 = call noundef i64 @_ZNKSt13__atomic_baseImEcvmEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  store i64 %22, ptr %5, align 8, !tbaa !41
  %23 = getelementptr inbounds i8, ptr %1, i64 16
  br label %24

24:                                               ; preds = %29, %15
  %25 = load i64, ptr %5, align 8, !tbaa !41
  %26 = load i64, ptr %23, align 8, !tbaa !42
  %27 = add i64 %26, %25
  %28 = icmp ugt i64 %27, %19
  br i1 %28, label %31, label %29

29:                                               ; preds = %24
  %30 = call noundef zeroext i1 @_ZNSt13__atomic_baseImE23compare_exchange_strongERmmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %27, i32 noundef 5) #5
  br i1 %30, label %.thread35, label %24

.thread35:                                        ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %39

31:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %73

32:                                               ; preds = %3
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %34 = load i64, ptr %33, align 8, !tbaa !42
  %35 = getelementptr inbounds i8, ptr %0, i64 4752
  %36 = zext i32 %10 to i64
  %37 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %35, i64 0, i64 %36
  %38 = call noundef i64 @_ZNSt13__atomic_baseImEpLEm(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %34) #5
  br label %39

39:                                               ; preds = %.thread35, %32
  %.pre-phi = phi i64 [ %17, %.thread35 ], [ %36, %32 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 4624
  %41 = getelementptr inbounds [16 x %"struct.std::atomic"], ptr %40, i64 0, i64 %.pre-phi
  %42 = call noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4) %41) #5
  %43 = getelementptr inbounds i8, ptr %0, i64 5736
  %44 = load ptr, ptr %43, align 8, !tbaa !43
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !44
  %47 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %48 = invoke noundef i32 %44(ptr noundef %46, ptr noundef nonnull %1, ptr noundef %47, ptr noundef %2)
          to label %49 unwind label %63

49:                                               ; preds = %39
  %50 = icmp eq i32 %48, 0
  br i1 %50, label %51, label %66

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %0, i64 5008
  %53 = call noundef i32 @_ZNSt13__atomic_baseIjEppEv(ptr noundef nonnull align 4 dereferenceable(4) %52) #5
  %54 = getelementptr inbounds i8, ptr %0, i64 88
  %55 = load ptr, ptr %54, align 8, !tbaa !45
  %.not31 = icmp eq ptr %55, null
  br i1 %.not31, label %65, label %56

56:                                               ; preds = %51
  %57 = load i32, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %2, align 8, !tbaa !46
  %59 = getelementptr inbounds i8, ptr %1, i64 16
  %60 = load i64, ptr %59, align 8, !tbaa !42
  %61 = getelementptr inbounds i8, ptr %0, i64 104
  %62 = load ptr, ptr %61, align 8, !tbaa !47
  invoke void %55(ptr noundef nonnull %0, i32 noundef %57, ptr noundef %58, i64 noundef %60, ptr noundef %62)
          to label %65 unwind label %63

63:                                               ; preds = %56, %39
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %64

65:                                               ; preds = %56, %51
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEE6CommitEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  br label %73

66:                                               ; preds = %49
  %67 = call noundef i32 @_ZNSt13__atomic_baseIjEmmEv(ptr noundef nonnull align 4 dereferenceable(4) %41) #5
  %68 = getelementptr inbounds i8, ptr %1, i64 16
  %69 = load i64, ptr %68, align 8, !tbaa !42
  %70 = getelementptr inbounds i8, ptr %0, i64 4752
  %71 = getelementptr inbounds [16 x %"struct.std::atomic.9"], ptr %70, i64 0, i64 %.pre-phi
  %72 = call noundef i64 @_ZNSt13__atomic_baseImEmIEm(ptr noundef nonnull align 8 dereferenceable(8) %71, i64 noundef %69) #5
  br label %73

73:                                               ; preds = %31, %65, %66
  %.2 = phi i32 [ -2, %31 ], [ %48, %66 ], [ 0, %65 ]
  call void @_ZN28AtomicTransactionalIncrementISt6atomicIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret i32 %.2
}

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt13__atomic_baseImE23compare_exchange_strongERmmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #4 align 2

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,ReassociatePass,SROAPass,SimplifyCFGPass