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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T = external hidden unnamed_addr constant [138 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [39 x i8], align 1

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %1, i64 noundef %2, ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef %4, ptr noundef %5) #4 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.VmaBudget, align 8
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i64, align 8
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca i64, align 8
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i64, align 8
  %41 = alloca i32, align 4
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca i32, align 4
  %45 = alloca i64, align 8
  %46 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  %47 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !13
  %51 = and i32 %50, 64
  %52 = icmp ne i32 %51, 0
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %14, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %54 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  %56 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 2
  %57 = load i32, ptr %56, align 8, !tbaa !27
  %58 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %55, i32 noundef %57)
  store i32 %58, ptr %16, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #5
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 40, i1 false)
  %59 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = load i32, ptr %16, align 4, !tbaa !28
  call void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %60, ptr noundef %17, i32 noundef %61, i32 noundef 1)
  %62 = getelementptr inbounds %struct.VmaBudget, ptr %17, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !29
  %64 = getelementptr inbounds %struct.VmaBudget, ptr %17, i32 0, i32 2
  %65 = load i64, ptr %64, align 8, !tbaa !32
  %66 = icmp ult i64 %63, %65
  br i1 %66, label %67, label %73

67:                                               ; preds = %6
  %68 = getelementptr inbounds %struct.VmaBudget, ptr %17, i32 0, i32 2
  %69 = load i64, ptr %68, align 8, !tbaa !32
  %70 = getelementptr inbounds %struct.VmaBudget, ptr %17, i32 0, i32 1
  %71 = load i64, ptr %70, align 8, !tbaa !29
  %72 = sub i64 %69, %71
  br label %74

73:                                               ; preds = %6
  br label %74

74:                                               ; preds = %73, %67
  %75 = phi i64 [ %72, %67 ], [ 0, %73 ]
  store i64 %75, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %76 = call noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  br i1 %76, label %83, label %77

77:                                               ; preds = %74
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !13
  %81 = and i32 %80, 2
  %82 = icmp eq i32 %81, 0
  br label %83

83:                                               ; preds = %77, %74
  %84 = phi i1 [ false, %74 ], [ %82, %77 ]
  %85 = zext i1 %84 to i8
  store i8 %85, ptr %18, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !13
  %89 = and i32 %88, 2
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %107

91:                                               ; preds = %83
  %92 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %93 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %92)
  %94 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 6
  %95 = load i64, ptr %94, align 8, !tbaa !33
  %96 = icmp ult i64 %93, %95
  br i1 %96, label %97, label %107

97:                                               ; preds = %91
  %98 = load i64, ptr %15, align 8, !tbaa !9
  %99 = load i64, ptr %9, align 8, !tbaa !9
  %100 = icmp uge i64 %98, %99
  br i1 %100, label %105, label %101

101:                                              ; preds = %97
  %102 = load i8, ptr %18, align 1, !tbaa !18, !range !34, !noundef !35
  %103 = trunc i8 %102 to i1
  %104 = xor i1 %103, true
  br label %105

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

107:                                              ; preds = %105, %91, %83
  %108 = phi i1 [ false, %91 ], [ false, %83 ], [ %106, %105 ]
  %109 = zext i1 %108 to i8
  store i8 %109, ptr %19, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !13
  %113 = and i32 %112, 458752
  store i32 %113, ptr %20, align 4, !tbaa !28
  %114 = load i8, ptr %14, align 1, !tbaa !18, !range !34, !noundef !35
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %125

116:                                              ; preds = %107
  %117 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 10
  %118 = load i32, ptr %117, align 4, !tbaa !36
  %119 = icmp ne i32 %118, 4
  br i1 %119, label %124, label %120

120:                                              ; preds = %116
  %121 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 6
  %122 = load i64, ptr %121, align 8, !tbaa !33
  %123 = icmp ugt i64 %122, 1
  br i1 %123, label %124, label %125

124:                                              ; preds = %120, %116
  store i32 -8, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %499

125:                                              ; preds = %120, %107
  %126 = load i64, ptr %9, align 8, !tbaa !9
  %127 = add i64 %126, 0
  %128 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 4
  %129 = load i64, ptr %128, align 8, !tbaa !37
  %130 = icmp ugt i64 %127, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %125
  store i32 -2, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %499

132:                                              ; preds = %125
  %133 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 10
  %134 = load i32, ptr %133, align 4, !tbaa !36
  %135 = icmp eq i32 %134, 4
  br i1 %135, label %136, label %170

136:                                              ; preds = %132
  %137 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %138 = call noundef zeroext i1 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %137)
  br i1 %138, label %169, label %139

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %140 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %140)
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  store ptr %142, ptr %22, align 8, !tbaa !5
  %143 = load ptr, ptr %22, align 8, !tbaa !5
  %144 = icmp ne ptr %143, null
  br i1 %144, label %145, label %146

145:                                              ; preds = %139
  br label %148

146:                                              ; preds = %139
  call void @__assert_fail(ptr noundef @.str.179, ptr noundef @.str.2, i32 noundef 12545, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #6
  unreachable

147:                                              ; No predecessors!
  br label %148

148:                                              ; preds = %147, %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  %150 = load i64, ptr %9, align 8, !tbaa !9
  %151 = load i64, ptr %10, align 8, !tbaa !9
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 8, !tbaa !13
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %155, i32 0, i32 6
  %157 = load ptr, ptr %156, align 8, !tbaa !38
  %158 = load i32, ptr %12, align 4, !tbaa !11
  %159 = load i32, ptr %20, align 4, !tbaa !28
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %47, ptr noundef %149, i64 noundef %150, i64 noundef %151, i32 noundef %154, ptr noundef %157, i32 noundef %158, i32 noundef %159, ptr noundef %160)
  store i32 %161, ptr %23, align 4, !tbaa !39
  %162 = load i32, ptr %23, align 4, !tbaa !39
  %163 = icmp eq i32 %162, 0
  br i1 %163, label %164, label %165

164:                                              ; preds = %148
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %166

165:                                              ; preds = %148
  store i32 0, ptr %21, align 4
  br label %166

166:                                              ; preds = %165, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %167 = load i32, ptr %21, align 4
  switch i32 %167, label %499 [
    i32 0, label %168
  ]

168:                                              ; preds = %166
  br label %169

169:                                              ; preds = %168, %136
  br label %365

170:                                              ; preds = %132
  %171 = load i32, ptr %20, align 4, !tbaa !28
  %172 = icmp ne i32 %171, 131072
  br i1 %172, label %173, label %322

173:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  %174 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !20
  %176 = getelementptr inbounds %struct.VmaAllocator_T, ptr %175, i32 0, i32 20
  %177 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %176, i32 0, i32 1
  %178 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 2
  %179 = load i32, ptr %178, align 8, !tbaa !27
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %177, i64 0, i64 %180
  %182 = getelementptr inbounds %struct.VkMemoryType, ptr %181, i32 0, i32 0
  %183 = load i32, ptr %182, align 4, !tbaa !41
  %184 = and i32 %183, 2
  %185 = icmp ne i32 %184, 0
  %186 = zext i1 %185 to i8
  store i8 %186, ptr %24, align 1, !tbaa !18
  %187 = load i8, ptr %24, align 1, !tbaa !18, !range !34, !noundef !35
  %188 = trunc i8 %187 to i1
  br i1 %188, label %189, label %274

189:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #5
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !13
  %193 = and i32 %192, 3072
  %194 = icmp ne i32 %193, 0
  %195 = zext i1 %194 to i8
  store i8 %195, ptr %25, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %196

196:                                              ; preds = %265, %189
  %197 = load i64, ptr %26, align 8, !tbaa !9
  %198 = icmp ult i64 %197, 2
  br i1 %198, label %200, label %199

199:                                              ; preds = %196
  store i32 2, ptr %21, align 4
  br label %268

200:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %201

201:                                              ; preds = %259, %200
  %202 = load i64, ptr %27, align 8, !tbaa !9
  %203 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %204 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %203)
  %205 = icmp ult i64 %202, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %201
  store i32 5, ptr %21, align 4
  br label %262

207:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %208 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %209 = load i64, ptr %27, align 8, !tbaa !9
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %208, i64 noundef %209)
  %211 = load ptr, ptr %210, align 8, !tbaa !5
  store ptr %211, ptr %28, align 8, !tbaa !5
  %212 = load ptr, ptr %28, align 8, !tbaa !5
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %215

214:                                              ; preds = %207
  br label %217

215:                                              ; preds = %207
  call void @__assert_fail(ptr noundef @.str.179, ptr noundef @.str.2, i32 noundef 12578, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #6
  unreachable

216:                                              ; No predecessors!
  br label %217

217:                                              ; preds = %216, %214
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #5
  %218 = load ptr, ptr %28, align 8, !tbaa !5
  %219 = call noundef ptr @_ZNK20VmaDeviceMemoryBlock13GetMappedDataEv(ptr noundef nonnull align 8 dereferenceable(96) %218)
  %220 = icmp ne ptr %219, null
  %221 = zext i1 %220 to i8
  store i8 %221, ptr %29, align 1, !tbaa !18
  %222 = load i64, ptr %26, align 8, !tbaa !9
  %223 = icmp eq i64 %222, 0
  %224 = zext i1 %223 to i32
  %225 = load i8, ptr %25, align 1, !tbaa !18, !range !34, !noundef !35
  %226 = trunc i8 %225 to i1
  %227 = zext i1 %226 to i32
  %228 = load i8, ptr %29, align 1, !tbaa !18, !range !34, !noundef !35
  %229 = trunc i8 %228 to i1
  %230 = zext i1 %229 to i32
  %231 = icmp eq i32 %227, %230
  %232 = zext i1 %231 to i32
  %233 = icmp eq i32 %224, %232
  br i1 %233, label %234, label %255

234:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %235 = load ptr, ptr %28, align 8, !tbaa !5
  %236 = load i64, ptr %9, align 8, !tbaa !9
  %237 = load i64, ptr %10, align 8, !tbaa !9
  %238 = load ptr, ptr %11, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %238, i32 0, i32 0
  %240 = load i32, ptr %239, align 8, !tbaa !13
  %241 = load ptr, ptr %11, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %241, i32 0, i32 6
  %243 = load ptr, ptr %242, align 8, !tbaa !38
  %244 = load i32, ptr %12, align 4, !tbaa !11
  %245 = load i32, ptr %20, align 4, !tbaa !28
  %246 = load ptr, ptr %13, align 8, !tbaa !5
  %247 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %47, ptr noundef %235, i64 noundef %236, i64 noundef %237, i32 noundef %240, ptr noundef %243, i32 noundef %244, i32 noundef %245, ptr noundef %246)
  store i32 %247, ptr %30, align 4, !tbaa !39
  %248 = load i32, ptr %30, align 4, !tbaa !39
  %249 = icmp eq i32 %248, 0
  br i1 %249, label %250, label %251

250:                                              ; preds = %234
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %252

251:                                              ; preds = %234
  store i32 0, ptr %21, align 4
  br label %252

252:                                              ; preds = %251, %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  %253 = load i32, ptr %21, align 4
  switch i32 %253, label %256 [
    i32 0, label %254
  ]

254:                                              ; preds = %252
  br label %255

255:                                              ; preds = %254, %217
  store i32 0, ptr %21, align 4
  br label %256

256:                                              ; preds = %255, %252
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  %257 = load i32, ptr %21, align 4
  switch i32 %257, label %262 [
    i32 0, label %258
  ]

258:                                              ; preds = %256
  br label %259

259:                                              ; preds = %258
  %260 = load i64, ptr %27, align 8, !tbaa !9
  %261 = add i64 %260, 1
  store i64 %261, ptr %27, align 8, !tbaa !9
  br label %201, !llvm.loop !43

262:                                              ; preds = %256, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  %263 = load i32, ptr %21, align 4
  switch i32 %263, label %268 [
    i32 5, label %264
  ]

264:                                              ; preds = %262
  br label %265

265:                                              ; preds = %264
  %266 = load i64, ptr %26, align 8, !tbaa !9
  %267 = add i64 %266, 1
  store i64 %267, ptr %26, align 8, !tbaa !9
  br label %196, !llvm.loop !45

268:                                              ; preds = %262, %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  %269 = load i32, ptr %21, align 4
  switch i32 %269, label %271 [
    i32 2, label %270
  ]

270:                                              ; preds = %268
  store i32 0, ptr %21, align 4
  br label %271

271:                                              ; preds = %270, %268
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  %272 = load i32, ptr %21, align 4
  switch i32 %272, label %319 [
    i32 0, label %273
  ]

273:                                              ; preds = %271
  br label %318

274:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %275

275:                                              ; preds = %312, %274
  %276 = load i64, ptr %31, align 8, !tbaa !9
  %277 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %278 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %277)
  %279 = icmp ult i64 %276, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %275
  store i32 8, ptr %21, align 4
  br label %315

281:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %282 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %283 = load i64, ptr %31, align 8, !tbaa !9
  %284 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %282, i64 noundef %283)
  %285 = load ptr, ptr %284, align 8, !tbaa !5
  store ptr %285, ptr %32, align 8, !tbaa !5
  %286 = load ptr, ptr %32, align 8, !tbaa !5
  %287 = icmp ne ptr %286, null
  br i1 %287, label %288, label %289

288:                                              ; preds = %281
  br label %291

289:                                              ; preds = %281
  call void @__assert_fail(ptr noundef @.str.179, ptr noundef @.str.2, i32 noundef 12600, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #6
  unreachable

290:                                              ; No predecessors!
  br label %291

291:                                              ; preds = %290, %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %292 = load ptr, ptr %32, align 8, !tbaa !5
  %293 = load i64, ptr %9, align 8, !tbaa !9
  %294 = load i64, ptr %10, align 8, !tbaa !9
  %295 = load ptr, ptr %11, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %295, i32 0, i32 0
  %297 = load i32, ptr %296, align 8, !tbaa !13
  %298 = load ptr, ptr %11, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %298, i32 0, i32 6
  %300 = load ptr, ptr %299, align 8, !tbaa !38
  %301 = load i32, ptr %12, align 4, !tbaa !11
  %302 = load i32, ptr %20, align 4, !tbaa !28
  %303 = load ptr, ptr %13, align 8, !tbaa !5
  %304 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %47, ptr noundef %292, i64 noundef %293, i64 noundef %294, i32 noundef %297, ptr noundef %300, i32 noundef %301, i32 noundef %302, ptr noundef %303)
  store i32 %304, ptr %33, align 4, !tbaa !39
  %305 = load i32, ptr %33, align 4, !tbaa !39
  %306 = icmp eq i32 %305, 0
  br i1 %306, label %307, label %308

307:                                              ; preds = %291
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %309

308:                                              ; preds = %291
  store i32 0, ptr %21, align 4
  br label %309

309:                                              ; preds = %308, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  %310 = load i32, ptr %21, align 4
  switch i32 %310, label %315 [
    i32 0, label %311
  ]

311:                                              ; preds = %309
  br label %312

312:                                              ; preds = %311
  %313 = load i64, ptr %31, align 8, !tbaa !9
  %314 = add i64 %313, 1
  store i64 %314, ptr %31, align 8, !tbaa !9
  br label %275, !llvm.loop !46

315:                                              ; preds = %309, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  %316 = load i32, ptr %21, align 4
  switch i32 %316, label %319 [
    i32 8, label %317
  ]

317:                                              ; preds = %315
  br label %318

318:                                              ; preds = %317, %273
  store i32 0, ptr %21, align 4
  br label %319

319:                                              ; preds = %318, %315, %271
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  %320 = load i32, ptr %21, align 4
  switch i32 %320, label %499 [
    i32 0, label %321
  ]

321:                                              ; preds = %319
  br label %364

322:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %323 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %324 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %323)
  store i64 %324, ptr %34, align 8, !tbaa !9
  br label %325

325:                                              ; preds = %360, %322
  %326 = load i64, ptr %34, align 8, !tbaa !9
  %327 = add i64 %326, -1
  store i64 %327, ptr %34, align 8, !tbaa !9
  %328 = icmp ne i64 %326, 0
  br i1 %328, label %330, label %329

329:                                              ; preds = %325
  store i32 11, ptr %21, align 4
  br label %361

330:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %331 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %332 = load i64, ptr %34, align 8, !tbaa !9
  %333 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %331, i64 noundef %332)
  %334 = load ptr, ptr %333, align 8, !tbaa !5
  store ptr %334, ptr %35, align 8, !tbaa !5
  %335 = load ptr, ptr %35, align 8, !tbaa !5
  %336 = icmp ne ptr %335, null
  br i1 %336, label %337, label %338

337:                                              ; preds = %330
  br label %340

338:                                              ; preds = %330
  call void @__assert_fail(ptr noundef @.str.179, ptr noundef @.str.2, i32 noundef 12618, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #6
  unreachable

339:                                              ; No predecessors!
  br label %340

340:                                              ; preds = %339, %337
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %341 = load ptr, ptr %35, align 8, !tbaa !5
  %342 = load i64, ptr %9, align 8, !tbaa !9
  %343 = load i64, ptr %10, align 8, !tbaa !9
  %344 = load ptr, ptr %11, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %344, i32 0, i32 0
  %346 = load i32, ptr %345, align 8, !tbaa !13
  %347 = load ptr, ptr %11, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %347, i32 0, i32 6
  %349 = load ptr, ptr %348, align 8, !tbaa !38
  %350 = load i32, ptr %12, align 4, !tbaa !11
  %351 = load i32, ptr %20, align 4, !tbaa !28
  %352 = load ptr, ptr %13, align 8, !tbaa !5
  %353 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %47, ptr noundef %341, i64 noundef %342, i64 noundef %343, i32 noundef %346, ptr noundef %349, i32 noundef %350, i32 noundef %351, ptr noundef %352)
  store i32 %353, ptr %36, align 4, !tbaa !39
  %354 = load i32, ptr %36, align 4, !tbaa !39
  %355 = icmp eq i32 %354, 0
  br i1 %355, label %356, label %357

356:                                              ; preds = %340
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %358

357:                                              ; preds = %340
  store i32 0, ptr %21, align 4
  br label %358

358:                                              ; preds = %357, %356
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  %359 = load i32, ptr %21, align 4
  switch i32 %359, label %361 [
    i32 0, label %360
  ]

360:                                              ; preds = %358
  br label %325, !llvm.loop !47

361:                                              ; preds = %358, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  %362 = load i32, ptr %21, align 4
  switch i32 %362, label %499 [
    i32 11, label %363
  ]

363:                                              ; preds = %361
  br label %364

364:                                              ; preds = %363, %321
  br label %365

365:                                              ; preds = %364, %169
  %366 = load i8, ptr %19, align 1, !tbaa !18, !range !34, !noundef !35
  %367 = trunc i8 %366 to i1
  br i1 %367, label %368, label %498

368:                                              ; preds = %365
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %369 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 4
  %370 = load i64, ptr %369, align 8, !tbaa !37
  store i64 %370, ptr %37, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 0, ptr %38, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  store i32 3, ptr %39, align 4, !tbaa !28
  %371 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 8
  %372 = load i8, ptr %371, align 8, !tbaa !48, !range !34, !noundef !35
  %373 = trunc i8 %372 to i1
  br i1 %373, label %405, label %374

374:                                              ; preds = %368
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %375 = call noundef i64 @_ZNK14VmaBlockVector16CalcMaxBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i64 %375, ptr %40, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  store i32 0, ptr %41, align 4, !tbaa !28
  br label %376

376:                                              ; preds = %400, %374
  %377 = load i32, ptr %41, align 4, !tbaa !28
  %378 = icmp ult i32 %377, 3
  br i1 %378, label %380, label %379

379:                                              ; preds = %376
  store i32 13, ptr %21, align 4
  br label %403

380:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %381 = load i64, ptr %37, align 8, !tbaa !9
  %382 = udiv i64 %381, 2
  store i64 %382, ptr %42, align 8, !tbaa !9
  %383 = load i64, ptr %42, align 8, !tbaa !9
  %384 = load i64, ptr %40, align 8, !tbaa !9
  %385 = icmp ugt i64 %383, %384
  br i1 %385, label %386, label %395

386:                                              ; preds = %380
  %387 = load i64, ptr %42, align 8, !tbaa !9
  %388 = load i64, ptr %9, align 8, !tbaa !9
  %389 = mul i64 %388, 2
  %390 = icmp uge i64 %387, %389
  br i1 %390, label %391, label %395

391:                                              ; preds = %386
  %392 = load i64, ptr %42, align 8, !tbaa !9
  store i64 %392, ptr %37, align 8, !tbaa !9
  %393 = load i32, ptr %38, align 4, !tbaa !28
  %394 = add i32 %393, 1
  store i32 %394, ptr %38, align 4, !tbaa !28
  br label %396

395:                                              ; preds = %386, %380
  store i32 13, ptr %21, align 4
  br label %397

396:                                              ; preds = %391
  store i32 0, ptr %21, align 4
  br label %397

397:                                              ; preds = %396, %395
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  %398 = load i32, ptr %21, align 4
  switch i32 %398, label %403 [
    i32 0, label %399
  ]

399:                                              ; preds = %397
  br label %400

400:                                              ; preds = %399
  %401 = load i32, ptr %41, align 4, !tbaa !28
  %402 = add i32 %401, 1
  store i32 %402, ptr %41, align 4, !tbaa !28
  br label %376, !llvm.loop !49

403:                                              ; preds = %397, %379
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  br label %404

404:                                              ; preds = %403
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  br label %405

405:                                              ; preds = %404, %368
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  store i64 0, ptr %43, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #5
  %406 = load i64, ptr %37, align 8, !tbaa !9
  %407 = load i64, ptr %15, align 8, !tbaa !9
  %408 = icmp ule i64 %406, %407
  br i1 %408, label %412, label %409

409:                                              ; preds = %405
  %410 = load i8, ptr %18, align 1, !tbaa !18, !range !34, !noundef !35
  %411 = trunc i8 %410 to i1
  br i1 %411, label %415, label %412

412:                                              ; preds = %409, %405
  %413 = load i64, ptr %37, align 8, !tbaa !9
  %414 = call noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %47, i64 noundef %413, ptr noundef %43)
  br label %416

415:                                              ; preds = %409
  br label %416

416:                                              ; preds = %415, %412
  %417 = phi i32 [ %414, %412 ], [ -2, %415 ]
  store i32 %417, ptr %44, align 4, !tbaa !39
  %418 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 8
  %419 = load i8, ptr %418, align 8, !tbaa !48, !range !34, !noundef !35
  %420 = trunc i8 %419 to i1
  br i1 %420, label %458, label %421

421:                                              ; preds = %416
  br label %422

422:                                              ; preds = %456, %421
  %423 = load i32, ptr %44, align 4, !tbaa !39
  %424 = icmp slt i32 %423, 0
  br i1 %424, label %425, label %428

425:                                              ; preds = %422
  %426 = load i32, ptr %38, align 4, !tbaa !28
  %427 = icmp ult i32 %426, 3
  br label %428

428:                                              ; preds = %425, %422
  %429 = phi i1 [ false, %422 ], [ %427, %425 ]
  br i1 %429, label %430, label %457

430:                                              ; preds = %428
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #5
  %431 = load i64, ptr %37, align 8, !tbaa !9
  %432 = udiv i64 %431, 2
  store i64 %432, ptr %45, align 8, !tbaa !9
  %433 = load i64, ptr %45, align 8, !tbaa !9
  %434 = load i64, ptr %9, align 8, !tbaa !9
  %435 = icmp uge i64 %433, %434
  br i1 %435, label %436, label %452

436:                                              ; preds = %430
  %437 = load i64, ptr %45, align 8, !tbaa !9
  store i64 %437, ptr %37, align 8, !tbaa !9
  %438 = load i32, ptr %38, align 4, !tbaa !28
  %439 = add i32 %438, 1
  store i32 %439, ptr %38, align 4, !tbaa !28
  %440 = load i64, ptr %37, align 8, !tbaa !9
  %441 = load i64, ptr %15, align 8, !tbaa !9
  %442 = icmp ule i64 %440, %441
  br i1 %442, label %446, label %443

443:                                              ; preds = %436
  %444 = load i8, ptr %18, align 1, !tbaa !18, !range !34, !noundef !35
  %445 = trunc i8 %444 to i1
  br i1 %445, label %449, label %446

446:                                              ; preds = %443, %436
  %447 = load i64, ptr %37, align 8, !tbaa !9
  %448 = call noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %47, i64 noundef %447, ptr noundef %43)
  br label %450

449:                                              ; preds = %443
  br label %450

450:                                              ; preds = %449, %446
  %451 = phi i32 [ %448, %446 ], [ -2, %449 ]
  store i32 %451, ptr %44, align 4, !tbaa !39
  br label %453

452:                                              ; preds = %430
  store i32 17, ptr %21, align 4
  br label %454

453:                                              ; preds = %450
  store i32 0, ptr %21, align 4
  br label %454

454:                                              ; preds = %453, %452
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  %455 = load i32, ptr %21, align 4
  switch i32 %455, label %501 [
    i32 0, label %456
    i32 17, label %457
  ]

456:                                              ; preds = %454
  br label %422, !llvm.loop !50

457:                                              ; preds = %454, %428
  br label %458

458:                                              ; preds = %457, %416
  %459 = load i32, ptr %44, align 4, !tbaa !39
  %460 = icmp eq i32 %459, 0
  br i1 %460, label %461, label %494

461:                                              ; preds = %458
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  %462 = getelementptr inbounds %class.VmaBlockVector, ptr %47, i32 0, i32 16
  %463 = load i64, ptr %43, align 8, !tbaa !9
  %464 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %462, i64 noundef %463)
  %465 = load ptr, ptr %464, align 8, !tbaa !5
  store ptr %465, ptr %46, align 8, !tbaa !5
  %466 = load ptr, ptr %46, align 8, !tbaa !5
  %467 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %466, i32 0, i32 0
  %468 = load ptr, ptr %467, align 8, !tbaa !51
  %469 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %468)
  %470 = load i64, ptr %9, align 8, !tbaa !9
  %471 = icmp uge i64 %469, %470
  br i1 %471, label %472, label %473

472:                                              ; preds = %461
  br label %475

473:                                              ; preds = %461
  call void @__assert_fail(ptr noundef @.str.180, ptr noundef @.str.2, i32 noundef 12683, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #6
  unreachable

474:                                              ; No predecessors!
  br label %475

475:                                              ; preds = %474, %472
  %476 = load ptr, ptr %46, align 8, !tbaa !5
  %477 = load i64, ptr %9, align 8, !tbaa !9
  %478 = load i64, ptr %10, align 8, !tbaa !9
  %479 = load ptr, ptr %11, align 8, !tbaa !5
  %480 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %479, i32 0, i32 0
  %481 = load i32, ptr %480, align 8, !tbaa !13
  %482 = load ptr, ptr %11, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct.VmaAllocationCreateInfo, ptr %482, i32 0, i32 6
  %484 = load ptr, ptr %483, align 8, !tbaa !38
  %485 = load i32, ptr %12, align 4, !tbaa !11
  %486 = load i32, ptr %20, align 4, !tbaa !28
  %487 = load ptr, ptr %13, align 8, !tbaa !5
  %488 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %47, ptr noundef %476, i64 noundef %477, i64 noundef %478, i32 noundef %481, ptr noundef %484, i32 noundef %485, i32 noundef %486, ptr noundef %487)
  store i32 %488, ptr %44, align 4, !tbaa !39
  %489 = load i32, ptr %44, align 4, !tbaa !39
  %490 = icmp eq i32 %489, 0
  br i1 %490, label %491, label %492

491:                                              ; preds = %475
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %47)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %493

492:                                              ; preds = %475
  store i32 -2, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %493

493:                                              ; preds = %492, %491
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  br label %495

494:                                              ; preds = %458
  store i32 0, ptr %21, align 4
  br label %495

495:                                              ; preds = %494, %493
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  %496 = load i32, ptr %21, align 4
  switch i32 %496, label %499 [
    i32 0, label %497
  ]

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497, %365
  store i32 -2, ptr %7, align 4
  store i32 1, ptr %21, align 4
  br label %499

499:                                              ; preds = %498, %495, %361, %319, %166, %131, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %500 = load i32, ptr %7, align 4
  ret i32 %500

501:                                              ; preds = %454
  unreachable
}

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS20VmaSuballocationType", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS23VmaAllocationCreateInfo", !15, i64 0, !16, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !6, i64 24, !6, i64 32, !17, i64 40}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS14VmaMemoryUsage", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTS14VmaBlockVector", !6, i64 0, !6, i64 8, !15, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !19, i64 56, !15, i64 60, !17, i64 64, !10, i64 72, !6, i64 80, !22, i64 88, !25, i64 144, !15, i64 176, !19, i64 180}
!22 = !{!"_ZTS10VmaRWMutex", !23, i64 0}
!23 = !{!"_ZTSSt12shared_mutex", !24, i64 0}
!24 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!25 = !{!"_ZTS9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE", !26, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!26 = !{!"_ZTS15VmaStlAllocatorIP20VmaDeviceMemoryBlockE", !6, i64 0}
!27 = !{!21, !15, i64 16}
!28 = !{!15, !15, i64 0}
!29 = !{!30, !10, i64 24}
!30 = !{!"_ZTS9VmaBudget", !31, i64 0, !10, i64 24, !10, i64 32}
!31 = !{!"_ZTS13VmaStatistics", !15, i64 0, !15, i64 4, !10, i64 8, !10, i64 16}
!32 = !{!30, !10, i64 32}
!33 = !{!21, !10, i64 40}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!21, !15, i64 60}
!37 = !{!21, !10, i64 24}
!38 = !{!14, !6, i64 32}
!39 = !{!40, !40, i64 0}
!40 = !{!"_ZTS8VkResult", !7, i64 0}
!41 = !{!42, !15, i64 0}
!42 = !{!"_ZTS12VkMemoryType", !15, i64 0, !15, i64 4}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}
!46 = distinct !{!46, !44}
!47 = distinct !{!47, !44}
!48 = !{!21, !19, i64 56}
!49 = distinct !{!49, !44}
!50 = distinct !{!50, !44}
!51 = !{!52, !6, i64 0}
!52 = !{!"_ZTS20VmaDeviceMemoryBlock", !6, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !6, i64 24, !53, i64 32, !56, i64 72, !15, i64 84, !6, i64 88}
!53 = !{!"_ZTS8VmaMutex", !54, i64 0}
!54 = !{!"_ZTSSt5mutex", !55, i64 0}
!55 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!56 = !{!"_ZTS20VmaMappingHysteresis", !15, i64 0, !15, i64 4, !15, i64 8}


; 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.VmaBudget = type { %struct.VmaStatistics, i64, i64 }
%struct.VmaStatistics = type { i32, i32, i64, i64 }
%struct.VkMemoryType = type { i32, i32 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T = external hidden unnamed_addr constant [138 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [39 x i8], align 1

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %1, i64 noundef %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #4 align 2 {
  %7 = alloca %struct.VmaBudget, align 8
  %8 = alloca i64, align 8
  %9 = load i32, ptr %3, align 8, !tbaa !5
  %10 = and i32 %9, 64
  %.not = icmp eq i32 %10, 0
  %11 = load ptr, ptr %0, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !22
  %14 = tail call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %11, i32 noundef %13)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %7, i8 0, i64 40, i1 false)
  %15 = load ptr, ptr %0, align 8, !tbaa !13
  call void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %15, ptr noundef nonnull %7, i32 noundef %14, i32 noundef 1)
  %16 = getelementptr inbounds i8, ptr %7, i64 24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %7, i64 32
  %19 = load i64, ptr %18, align 8
  %20 = call i64 @llvm.usub.sat.i64(i64 %19, i64 %17)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  %21 = call noundef zeroext i1 @_ZNK14VmaBlockVector20HasExplicitBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  %22 = load i32, ptr %3, align 8
  %23 = and i32 %22, 2
  %24 = icmp ne i32 %23, 0
  %.not240 = or i1 %21, %24
  br i1 %24, label %34, label %25

25:                                               ; preds = %6
  %26 = getelementptr inbounds i8, ptr %0, i64 144
  %27 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %26)
  %28 = getelementptr inbounds i8, ptr %0, i64 40
  %29 = load i64, ptr %28, align 8, !tbaa !23
  %30 = icmp ult i64 %27, %29
  br i1 %30, label %31, label %34

31:                                               ; preds = %25
  %32 = icmp uge i64 %20, %1
  %33 = or i1 %32, %.not240
  br label %34

34:                                               ; preds = %31, %25, %6
  %35 = phi i1 [ false, %25 ], [ false, %6 ], [ %33, %31 ]
  %36 = load i32, ptr %3, align 8, !tbaa !5
  %37 = and i32 %36, 458752
  br i1 %.not, label %44, label %38

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %0, i64 60
  %40 = load i32, ptr %39, align 4, !tbaa !24
  %.not173 = icmp ne i32 %40, 4
  %41 = getelementptr inbounds i8, ptr %0, i64 40
  %42 = load i64, ptr %41, align 8
  %43 = icmp ugt i64 %42, 1
  %or.cond = select i1 %.not173, i1 true, i1 %43
  br i1 %or.cond, label %.critedge210, label %44

44:                                               ; preds = %38, %34
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load i64, ptr %45, align 8, !tbaa !25
  %47 = icmp ult i64 %46, %1
  br i1 %47, label %.critedge210, label %48

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %0, i64 60
  %50 = load i32, ptr %49, align 4, !tbaa !24
  %51 = icmp eq i32 %50, 4
  br i1 %51, label %52, label %65

52:                                               ; preds = %48
  %53 = getelementptr inbounds i8, ptr %0, i64 144
  %54 = call noundef zeroext i1 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %53)
  br i1 %54, label %.critedge, label %55

55:                                               ; preds = %52
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %53)
  %57 = load ptr, ptr %56, align 8, !tbaa !26
  %.not185 = icmp eq ptr %57, null
  br i1 %.not185, label %58, label %59

58:                                               ; preds = %55
  call void @__assert_fail(ptr noundef nonnull @.str.179, ptr noundef nonnull @.str.2, i32 noundef 12545, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #7
  unreachable

59:                                               ; preds = %55
  %60 = load i32, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %3, i64 32
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %57, i64 noundef %1, i64 noundef %2, i32 noundef %60, ptr noundef %62, i32 noundef %4, i32 noundef %37, ptr noundef %5)
  %.not186 = icmp eq i32 %63, 0
  br i1 %.not186, label %64, label %.critedge

64:                                               ; preds = %59
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br label %.critedge210

65:                                               ; preds = %48
  %.not174 = icmp eq i32 %37, 131072
  br i1 %.not174, label %118, label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %0, align 8, !tbaa !13
  %68 = getelementptr inbounds i8, ptr %67, i64 1036
  %69 = load i32, ptr %12, align 8, !tbaa !22
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !28
  %73 = and i32 %72, 2
  %.not178 = icmp eq i32 %73, 0
  br i1 %.not178, label %.preheader244, label %.preheader246

.preheader244:                                    ; preds = %66
  %74 = getelementptr inbounds i8, ptr %0, i64 144
  %75 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %74)
  %.not181252.not = icmp eq i64 %75, 0
  br i1 %.not181252.not, label %.critedge, label %.lr.ph254

.lr.ph254:                                        ; preds = %.preheader244
  %76 = getelementptr inbounds i8, ptr %3, i64 32
  br label %110

.preheader246:                                    ; preds = %66
  %77 = and i32 %36, 3072
  %78 = icmp ne i32 %77, 0
  %79 = getelementptr inbounds i8, ptr %0, i64 144
  %80 = getelementptr inbounds i8, ptr %3, i64 32
  %81 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %79)
  %.not184249.not = icmp eq i64 %81, 0
  br i1 %.not184249.not, label %.critedge200, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader246, %.critedge198
  %.0150250 = phi i64 [ %92, %.critedge198 ], [ 0, %.preheader246 ]
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %79, i64 noundef %.0150250)
  %83 = load ptr, ptr %82, align 8, !tbaa !26
  %.not182 = icmp eq ptr %83, null
  br i1 %.not182, label %.loopexit266, label %84

.loopexit266:                                     ; preds = %.lr.ph, %.lr.ph.1
  call void @__assert_fail(ptr noundef nonnull @.str.179, ptr noundef nonnull @.str.2, i32 noundef 12578, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #7
  unreachable

84:                                               ; preds = %.lr.ph
  %85 = call noundef ptr @_ZNK20VmaDeviceMemoryBlock13GetMappedDataEv(ptr noundef nonnull align 8 dereferenceable(96) %83)
  %86 = icmp eq ptr %85, null
  %87 = xor i1 %78, %86
  br i1 %87, label %88, label %.critedge198

88:                                               ; preds = %84
  %89 = load i32, ptr %3, align 8, !tbaa !5
  %90 = load ptr, ptr %80, align 8, !tbaa !27
  %91 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %83, i64 noundef %1, i64 noundef %2, i32 noundef %89, ptr noundef %90, i32 noundef %4, i32 noundef %37, ptr noundef %5)
  %.not183 = icmp eq i32 %91, 0
  br i1 %.not183, label %.loopexit267, label %.critedge198

.critedge198:                                     ; preds = %88, %84
  %92 = add nuw i64 %.0150250, 1
  %93 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %79)
  %.not184 = icmp ult i64 %92, %93
  br i1 %.not184, label %.lr.ph, label %.critedge200, !llvm.loop !30

.critedge200:                                     ; preds = %.critedge198, %.preheader246
  %94 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %79)
  %.not184249.not.1 = icmp eq i64 %94, 0
  br i1 %.not184249.not.1, label %.critedge, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.critedge200, %.critedge198.1
  %.0150250.1 = phi i64 [ %105, %.critedge198.1 ], [ 0, %.critedge200 ]
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %79, i64 noundef %.0150250.1)
  %96 = load ptr, ptr %95, align 8, !tbaa !26
  %.not182.1 = icmp eq ptr %96, null
  br i1 %.not182.1, label %.loopexit266, label %97

97:                                               ; preds = %.lr.ph.1
  %98 = call noundef ptr @_ZNK20VmaDeviceMemoryBlock13GetMappedDataEv(ptr noundef nonnull align 8 dereferenceable(96) %96)
  %99 = icmp ne ptr %98, null
  %100 = xor i1 %78, %99
  br i1 %100, label %101, label %.critedge198.1

101:                                              ; preds = %97
  %102 = load i32, ptr %3, align 8, !tbaa !5
  %103 = load ptr, ptr %80, align 8, !tbaa !27
  %104 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %96, i64 noundef %1, i64 noundef %2, i32 noundef %102, ptr noundef %103, i32 noundef %4, i32 noundef %37, ptr noundef %5)
  %.not183.1 = icmp eq i32 %104, 0
  br i1 %.not183.1, label %.loopexit267, label %.critedge198.1

.critedge198.1:                                   ; preds = %101, %97
  %105 = add nuw i64 %.0150250.1, 1
  %106 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %79)
  %.not184.1 = icmp ult i64 %105, %106
  br i1 %.not184.1, label %.lr.ph.1, label %.critedge, !llvm.loop !30

.loopexit267:                                     ; preds = %88, %101
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br label %.critedge210

107:                                              ; preds = %.critedge204
  %108 = add nuw i64 %.0151253, 1
  %109 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %74)
  %.not181 = icmp ult i64 %108, %109
  br i1 %.not181, label %110, label %.critedge, !llvm.loop !32

110:                                              ; preds = %.lr.ph254, %107
  %.0151253 = phi i64 [ 0, %.lr.ph254 ], [ %108, %107 ]
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %74, i64 noundef %.0151253)
  %112 = load ptr, ptr %111, align 8, !tbaa !26
  %.not179 = icmp eq ptr %112, null
  br i1 %.not179, label %113, label %.critedge204

113:                                              ; preds = %110
  call void @__assert_fail(ptr noundef nonnull @.str.179, ptr noundef nonnull @.str.2, i32 noundef 12600, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #7
  unreachable

.critedge204:                                     ; preds = %110
  %114 = load i32, ptr %3, align 8, !tbaa !5
  %115 = load ptr, ptr %76, align 8, !tbaa !27
  %116 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %112, i64 noundef %1, i64 noundef %2, i32 noundef %114, ptr noundef %115, i32 noundef %4, i32 noundef %37, ptr noundef %5)
  %.not180 = icmp eq i32 %116, 0
  br i1 %.not180, label %117, label %107

117:                                              ; preds = %.critedge204
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br label %.critedge210

118:                                              ; preds = %65
  %119 = getelementptr inbounds i8, ptr %0, i64 144
  %120 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %119)
  %121 = getelementptr inbounds i8, ptr %3, i64 32
  br label %.critedge214

.critedge214:                                     ; preds = %127, %118
  %.0164 = phi i64 [ %120, %118 ], [ %122, %127 ]
  %122 = add i64 %.0164, -1
  %.not175 = icmp eq i64 %.0164, 0
  br i1 %.not175, label %.critedge, label %123

123:                                              ; preds = %.critedge214
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %119, i64 noundef %122)
  %125 = load ptr, ptr %124, align 8, !tbaa !26
  %.not176 = icmp eq ptr %125, null
  br i1 %.not176, label %126, label %127

126:                                              ; preds = %123
  call void @__assert_fail(ptr noundef nonnull @.str.179, ptr noundef nonnull @.str.2, i32 noundef 12618, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #7
  unreachable

127:                                              ; preds = %123
  %128 = load i32, ptr %3, align 8, !tbaa !5
  %129 = load ptr, ptr %121, align 8, !tbaa !27
  %130 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %125, i64 noundef %1, i64 noundef %2, i32 noundef %128, ptr noundef %129, i32 noundef %4, i32 noundef 131072, ptr noundef %5)
  %.not177 = icmp eq i32 %130, 0
  br i1 %.not177, label %131, label %.critedge214

131:                                              ; preds = %127
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br label %.critedge210

.critedge:                                        ; preds = %.critedge198.1, %107, %.critedge214, %.critedge200, %.preheader244, %59, %52
  br i1 %35, label %132, label %.critedge210

132:                                              ; preds = %.critedge
  %133 = load i64, ptr %45, align 8, !tbaa !25
  %134 = getelementptr inbounds i8, ptr %0, i64 56
  %135 = load i8, ptr %134, align 8, !tbaa !33, !range !34, !noundef !35
  %136 = trunc nuw i8 %135 to i1
  br i1 %136, label %.loopexit243, label %137

137:                                              ; preds = %132
  %138 = call noundef i64 @_ZNK14VmaBlockVector16CalcMaxBlockSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  %139 = shl i64 %1, 1
  %140 = lshr i64 %133, 1
  %141 = icmp ugt i64 %140, %138
  %.not187 = icmp uge i64 %140, %139
  %or.cond217.not = and i1 %141, %.not187
  br i1 %or.cond217.not, label %142, label %.loopexit243

142:                                              ; preds = %137
  %143 = zext i1 %or.cond217.not to i32
  %144 = lshr i64 %133, 2
  %145 = icmp ugt i64 %144, %138
  %.not187.1 = icmp uge i64 %144, %139
  %or.cond217.not.1 = and i1 %145, %.not187.1
  %146 = zext i1 %or.cond217.not.1 to i32
  %.1153.1 = add nuw nsw i32 %143, %146
  br i1 %or.cond217.not.1, label %147, label %.loopexit243

147:                                              ; preds = %142
  %148 = lshr i64 %133, 3
  %149 = icmp ugt i64 %148, %138
  %.not187.2 = icmp uge i64 %148, %139
  %or.cond217.not.2 = and i1 %149, %.not187.2
  %.1159.2 = select i1 %or.cond217.not.2, i64 %148, i64 %144
  %150 = zext i1 %or.cond217.not.2 to i32
  %.1153.2 = add nuw nsw i32 %.1153.1, %150
  br label %.loopexit243

.loopexit243:                                     ; preds = %147, %137, %142, %132
  %.3161 = phi i64 [ %133, %132 ], [ %133, %137 ], [ %140, %142 ], [ %.1159.2, %147 ]
  %.3155 = phi i32 [ 0, %132 ], [ 0, %137 ], [ %.1153.1, %142 ], [ %.1153.2, %147 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store i64 0, ptr %8, align 8, !tbaa !36
  %.not188 = icmp ule i64 %.3161, %20
  %brmerge = or i1 %.not240, %.not188
  br i1 %brmerge, label %151, label %153

151:                                              ; preds = %.loopexit243
  %152 = call noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %.3161, ptr noundef nonnull %8)
  br label %153

153:                                              ; preds = %.loopexit243, %151
  %154 = phi i32 [ %152, %151 ], [ -2, %.loopexit243 ]
  %155 = load i8, ptr %134, align 8, !tbaa !33, !range !34, !noundef !35
  %156 = trunc nuw i8 %155 to i1
  br i1 %156, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %153
  %157 = icmp slt i32 %154, 0
  %158 = icmp ult i32 %.3155, 3
  %159 = select i1 %157, i1 %158, i1 false
  br i1 %159, label %.lr.ph260, label %.loopexit

.lr.ph260:                                        ; preds = %.preheader
  br i1 %.not240, label %.lr.ph260.split.us, label %.lr.ph260.split

.lr.ph260.split.us:                               ; preds = %.lr.ph260, %161
  %.4156259.us = phi i32 [ %162, %161 ], [ %.3155, %.lr.ph260 ]
  %.4162258.us = phi i64 [ %160, %161 ], [ %.3161, %.lr.ph260 ]
  %160 = lshr i64 %.4162258.us, 1
  %.not189.us = icmp ult i64 %160, %1
  br i1 %.not189.us, label %.split.us, label %161

161:                                              ; preds = %.lr.ph260.split.us
  %162 = add nuw nsw i32 %.4156259.us, 1
  %163 = call noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %160, ptr noundef nonnull %8)
  %164 = icmp slt i32 %163, 0
  %165 = icmp ult i32 %.4156259.us, 2
  %166 = select i1 %164, i1 %165, i1 false
  br i1 %166, label %.lr.ph260.split.us, label %.loopexit

.lr.ph260.split:                                  ; preds = %.lr.ph260, %172
  %.4156259 = phi i32 [ %169, %172 ], [ %.3155, %.lr.ph260 ]
  %.4162258 = phi i64 [ %167, %172 ], [ %.3161, %.lr.ph260 ]
  %167 = lshr i64 %.4162258, 1
  %.not189 = icmp ult i64 %167, %1
  br i1 %.not189, label %.split.us, label %168

168:                                              ; preds = %.lr.ph260.split
  %169 = add nuw nsw i32 %.4156259, 1
  %.not190.not = icmp ugt i64 %167, %20
  br i1 %.not190.not, label %172, label %170

170:                                              ; preds = %168
  %171 = call noundef i32 @_ZN14VmaBlockVector11CreateBlockEmPm(ptr noundef nonnull align 8 dereferenceable(181) %0, i64 noundef %167, ptr noundef nonnull %8)
  br label %172

172:                                              ; preds = %170, %168
  %.1146 = phi i32 [ %171, %170 ], [ -2, %168 ]
  %173 = icmp slt i32 %.1146, 0
  %174 = icmp ult i32 %.4156259, 2
  %175 = select i1 %173, i1 %174, i1 false
  br i1 %175, label %.lr.ph260.split, label %.loopexit

.loopexit:                                        ; preds = %172, %161, %.preheader, %153
  %.2147 = phi i32 [ %154, %153 ], [ %154, %.preheader ], [ %163, %161 ], [ %.1146, %172 ]
  %.not192 = icmp eq i32 %.2147, 0
  br i1 %.not192, label %176, label %.thread233

.thread233:                                       ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %.critedge210

176:                                              ; preds = %.loopexit
  %177 = getelementptr inbounds i8, ptr %0, i64 144
  %178 = load i64, ptr %8, align 8, !tbaa !36
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %177, i64 noundef %178)
  %180 = load ptr, ptr %179, align 8, !tbaa !26
  %181 = load ptr, ptr %180, align 8, !tbaa !37
  %182 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %181)
  %.not191 = icmp ult i64 %182, %1
  br i1 %.not191, label %183, label %184

183:                                              ; preds = %176
  call void @__assert_fail(ptr noundef nonnull @.str.180, ptr noundef nonnull @.str.2, i32 noundef 12683, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector12AllocatePageEmmRK23VmaAllocationCreateInfo20VmaSuballocationTypePP15VmaAllocation_T) #7
  unreachable

184:                                              ; preds = %176
  %185 = load i32, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds i8, ptr %3, i64 32
  %187 = load ptr, ptr %186, align 8, !tbaa !27
  %188 = call noundef i32 @_ZN14VmaBlockVector17AllocateFromBlockEP20VmaDeviceMemoryBlockmmjPv20VmaSuballocationTypejPP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %180, i64 noundef %1, i64 noundef %2, i32 noundef %185, ptr noundef %187, i32 noundef %4, i32 noundef %37, ptr noundef %5)
  %189 = icmp eq i32 %188, 0
  br i1 %189, label %190, label %.thread230

190:                                              ; preds = %184
  call void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br label %.thread230

.thread230:                                       ; preds = %190, %184
  %.18.ph = phi i32 [ -2, %184 ], [ 0, %190 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %.critedge210

.split.us:                                        ; preds = %.lr.ph260.split, %.lr.ph260.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %.critedge210

.critedge210:                                     ; preds = %.loopexit267, %.critedge, %.thread233, %.split.us, %.thread230, %131, %117, %64, %44, %38
  %.19 = phi i32 [ 0, %64 ], [ 0, %131 ], [ -8, %38 ], [ -2, %44 ], [ 0, %117 ], [ 0, %.loopexit267 ], [ %.18.ph, %.thread230 ], [ -2, %.split.us ], [ -2, %.thread233 ], [ -2, %.critedge ]
  ret i32 %.19
}

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.usub.sat.i64(i64, i64) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS23VmaAllocationCreateInfo", !7, i64 0, !10, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !11, i64 24, !11, i64 32, !12, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS14VmaMemoryUsage", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"_ZTS14VmaBlockVector", !11, i64 0, !11, i64 8, !7, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !16, i64 56, !7, i64 60, !12, i64 64, !15, i64 72, !11, i64 80, !17, i64 88, !20, i64 144, !7, i64 176, !16, i64 180}
!15 = !{!"long", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTS10VmaRWMutex", !18, i64 0}
!18 = !{!"_ZTSSt12shared_mutex", !19, i64 0}
!19 = !{!"_ZTSSt22__shared_mutex_pthread", !8, i64 0}
!20 = !{!"_ZTS9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE", !21, i64 0, !11, i64 8, !15, i64 16, !15, i64 24}
!21 = !{!"_ZTS15VmaStlAllocatorIP20VmaDeviceMemoryBlockE", !11, i64 0}
!22 = !{!14, !7, i64 16}
!23 = !{!14, !15, i64 40}
!24 = !{!14, !7, i64 60}
!25 = !{!14, !15, i64 24}
!26 = !{!11, !11, i64 0}
!27 = !{!6, !11, i64 32}
!28 = !{!29, !7, i64 0}
!29 = !{!"_ZTS12VkMemoryType", !7, i64 0, !7, i64 4}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!14, !16, i64 56}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!15, !15, i64 0}
!37 = !{!38, !11, i64 0}
!38 = !{!"_ZTS20VmaDeviceMemoryBlock", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 20, !11, i64 24, !39, i64 32, !42, i64 72, !7, i64 84, !11, i64 88}
!39 = !{!"_ZTS8VmaMutex", !40, i64 0}
!40 = !{!"_ZTSSt5mutex", !41, i64 0}
!41 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!42 = !{!"_ZTS20VmaMappingHysteresis", !7, i64 0, !7, i64 4, !7, i64 8}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass