; 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.VmaStlAllocator.19 = type { ptr }
%class.VmaVector.20 = type { %struct.VmaStlAllocator.19, ptr, i64, i64 }
%"struct.VmaDefragmentationContext_T::FragmentedBlock" = type { i32, ptr }
%struct.VmaMutexLockRead = type { ptr }
%struct.VmaDefragmentationStats = type { i64, i64, i32, i32 }
%struct.VmaMutexLockWrite = type { ptr }
%struct.VmaDefragmentationPassMoveInfo = type { i32, ptr }
%struct.VmaDefragmentationContext_T = type { i64, i32, ptr, ptr, %struct.VmaStlAllocator.17, %class.VmaVector.18, i8, i32, i32, ptr, ptr, i64, %struct.VmaDefragmentationStats, %struct.VmaDefragmentationStats, ptr }
%struct.VmaStlAllocator.17 = type { ptr }
%class.VmaVector.18 = type { %struct.VmaStlAllocator.17, ptr, i64, i64 }
%struct.VmaDefragmentationMove = type { i32, ptr, ptr }
%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 }
%"struct.VmaDefragmentationContext_T::StateExtensive" = type { i8, i64 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [59 x i8], align 1
@__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo = external hidden unnamed_addr constant [90 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [18 x i8], align 1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), i1 noundef zeroext) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), i1 noundef zeroext) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN20VmaDeviceMemoryBlock3MapEP14VmaAllocator_TjPPv(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef, ptr noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN15VmaAllocation_T19SwapBlockAllocationEP14VmaAllocator_TPS_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef, ptr noundef) #3 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) #4 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.VmaStlAllocator.19, align 8
  %7 = alloca %class.VmaVector.20, align 8
  %8 = alloca %class.VmaVector.20, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca ptr, align 8
  %22 = alloca i8, align 1
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"struct.VmaDefragmentationContext_T::FragmentedBlock", align 8
  %28 = alloca %struct.VmaMutexLockRead, align 8
  %29 = alloca %struct.VmaMutexLockRead, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i8, align 1
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"struct.VmaDefragmentationContext_T::FragmentedBlock", align 8
  %37 = alloca %struct.VmaMutexLockRead, align 8
  %38 = alloca %struct.VmaMutexLockRead, align 8
  %39 = alloca i64, align 8
  %40 = alloca %struct.VmaMutexLockRead, align 8
  %41 = alloca %struct.VmaMutexLockRead, align 8
  %42 = alloca i64, align 8
  %43 = alloca ptr, align 8
  %44 = alloca i64, align 8
  %45 = alloca %struct.VmaDefragmentationStats, align 8
  %46 = alloca i8, align 1
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  %52 = alloca ptr, align 8
  %53 = alloca %struct.VmaMutexLockWrite, align 8
  %54 = alloca i64, align 8
  %55 = alloca i64, align 8
  %56 = alloca ptr, align 8
  %57 = alloca ptr, align 8
  %58 = alloca ptr, align 8
  %59 = alloca ptr, align 8
  %60 = alloca ptr, align 8
  %61 = alloca %struct.VmaMutexLockWrite, align 8
  %62 = alloca i64, align 8
  %63 = alloca ptr, align 8
  %64 = alloca ptr, align 8
  %65 = alloca ptr, align 8
  %66 = alloca ptr, align 8
  %67 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %68 = load ptr, ptr %3, align 8
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !9
  %72 = icmp ugt i32 %71, 0
  br i1 %72, label %73, label %78

73:                                               ; preds = %2
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !12
  %77 = icmp ne ptr %76, null
  br label %79

78:                                               ; preds = %2
  br label %79

79:                                               ; preds = %78, %73
  %80 = phi i1 [ %77, %73 ], [ true, %78 ]
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  br label %84

82:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str.187, ptr noundef @.str.2, i32 noundef 13173, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #7
  unreachable

83:                                               ; No predecessors!
  br label %84

84:                                               ; preds = %83, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %85 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 4
  %86 = getelementptr inbounds %struct.VmaStlAllocator.17, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  call void @_ZN15VmaStlAllocatorIN27VmaDefragmentationContext_T15FragmentedBlockEEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %87)
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #8
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  invoke void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %88 unwind label %96

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !21
  br label %89

89:                                               ; preds = %604, %88
  %90 = load i32, ptr %12, align 4, !tbaa !21
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 8, !tbaa !9
  %94 = icmp ult i32 %90, %93
  br i1 %94, label %100, label %95

95:                                               ; preds = %89
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %608

96:                                               ; preds = %84
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %961

100:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !12
  %104 = load i32, ptr %12, align 4, !tbaa !21
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %103, i64 %105
  store ptr %106, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %107 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 9
  %108 = load ptr, ptr %107, align 8, !tbaa !23
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %113

110:                                              ; preds = %100
  store i32 0, ptr %18, align 4, !tbaa !21
  %111 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 9
  %112 = load ptr, ptr %111, align 8, !tbaa !23
  store ptr %112, ptr %19, align 8, !tbaa !5
  br label %135

113:                                              ; preds = %100
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !24
  %117 = invoke noundef i32 @_ZNK15VmaAllocation_T18GetMemoryTypeIndexEv(ptr noundef nonnull align 8 dereferenceable(84) %116)
          to label %118 unwind label %129

118:                                              ; preds = %113
  store i32 %117, ptr %18, align 4, !tbaa !21
  %119 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 10
  %120 = load ptr, ptr %119, align 8, !tbaa !27
  %121 = load i32, ptr %18, align 4, !tbaa !21
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  store ptr %124, ptr %19, align 8, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %128

127:                                              ; preds = %118
  br label %134

128:                                              ; preds = %118
  call void @__assert_fail(ptr noundef @.str.188, ptr noundef @.str.2, i32 noundef 13198, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #7
  unreachable

129:                                              ; preds = %405, %370, %295, %290, %113
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %9, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %10, align 4
  br label %607

133:                                              ; No predecessors!
  br label %134

134:                                              ; preds = %133, %127
  br label %135

135:                                              ; preds = %134, %110
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 8, !tbaa !28
  switch i32 %138, label %516 [
    i32 0, label %139
    i32 1, label %290
    i32 2, label %370
  ]

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !24
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  %144 = getelementptr inbounds %class.VmaBlockVector, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !29
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %146, i32 0, i32 2
  %148 = load ptr, ptr %147, align 8, !tbaa !38
  %149 = invoke noundef zeroext i8 @_ZN15VmaAllocation_T19SwapBlockAllocationEP14VmaAllocator_TPS_(ptr noundef nonnull align 8 dereferenceable(84) %142, ptr noundef %145, ptr noundef %148)
          to label %150 unwind label %174

150:                                              ; preds = %139
  store i8 %149, ptr %20, align 1, !tbaa !39
  %151 = load i8, ptr %20, align 1, !tbaa !39
  %152 = zext i8 %151 to i32
  %153 = icmp sgt i32 %152, 0
  br i1 %153, label %154, label %230

154:                                              ; preds = %150
  %155 = load ptr, ptr %19, align 8, !tbaa !5
  %156 = getelementptr inbounds %class.VmaBlockVector, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !29
  store ptr %157, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %158, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !24
  %161 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %160)
          to label %162 unwind label %178

162:                                              ; preds = %154
  store ptr %161, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #8
  store i8 1, ptr %22, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store ptr %8, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %163 = load ptr, ptr %23, align 8, !tbaa !5
  %164 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %163)
          to label %165 unwind label %182

165:                                              ; preds = %162
  store ptr %164, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %166 = load ptr, ptr %23, align 8, !tbaa !5
  %167 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %166)
          to label %168 unwind label %186

168:                                              ; preds = %165
  store ptr %167, ptr %25, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %208, %168
  %170 = load ptr, ptr %24, align 8, !tbaa !5
  %171 = load ptr, ptr %25, align 8, !tbaa !5
  %172 = icmp ne ptr %170, %171
  br i1 %172, label %190, label %173

173:                                              ; preds = %169
  store i32 6, ptr %13, align 4
  br label %211

174:                                              ; preds = %252, %139
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %9, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %10, align 4
  br label %289

178:                                              ; preds = %154
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %9, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %10, align 4
  br label %229

182:                                              ; preds = %162
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %9, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %10, align 4
  br label %212

186:                                              ; preds = %165
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %9, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %212

190:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %191 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %191, ptr %26, align 8, !tbaa !5
  %192 = load ptr, ptr %26, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %192, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !41
  %195 = load ptr, ptr %21, align 8, !tbaa !5
  %196 = icmp eq ptr %194, %195
  br i1 %196, label %197, label %204

197:                                              ; preds = %190
  store i8 0, ptr %22, align 1, !tbaa !40
  %198 = load i8, ptr %20, align 1, !tbaa !39
  %199 = zext i8 %198 to i32
  %200 = load ptr, ptr %26, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %200, i32 0, i32 0
  %202 = load i32, ptr %201, align 8, !tbaa !43
  %203 = add i32 %202, %199
  store i32 %203, ptr %201, align 8, !tbaa !43
  store i32 6, ptr %13, align 4
  br label %205

204:                                              ; preds = %190
  store i32 0, ptr %13, align 4
  br label %205

205:                                              ; preds = %204, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  %206 = load i32, ptr %13, align 4
  switch i32 %206, label %211 [
    i32 0, label %207
  ]

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %24, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %209, i32 1
  store ptr %210, ptr %24, align 8, !tbaa !5
  br label %169

211:                                              ; preds = %205, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %213

212:                                              ; preds = %186, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %228

213:                                              ; preds = %211
  %214 = load i8, ptr %22, align 1, !tbaa !40, !range !44, !noundef !45
  %215 = trunc i8 %214 to i1
  br i1 %215, label %216, label %227

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %217 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %27, i32 0, i32 0
  %218 = load i8, ptr %20, align 1, !tbaa !39
  %219 = zext i8 %218 to i32
  store i32 %219, ptr %217, align 8, !tbaa !43
  %220 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %27, i32 0, i32 1
  %221 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %221, ptr %220, align 8, !tbaa !41
  invoke void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %222 unwind label %223

222:                                              ; preds = %216
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %227

223:                                              ; preds = %216
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %9, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %228

227:                                              ; preds = %222, %213
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %230

228:                                              ; preds = %223, %212
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  br label %229

229:                                              ; preds = %228, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %289

230:                                              ; preds = %227, %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %231 = load ptr, ptr %19, align 8, !tbaa !5
  %232 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %231)
          to label %233 unwind label %271

233:                                              ; preds = %230
  %234 = load ptr, ptr %19, align 8, !tbaa !5
  %235 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %234)
          to label %236 unwind label %271

236:                                              ; preds = %233
  %237 = getelementptr inbounds %struct.VmaAllocator_T, ptr %235, i32 0, i32 0
  %238 = load i8, ptr %237, align 8, !tbaa !46, !range !44, !noundef !45
  %239 = trunc i8 %238 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(56) %232, i1 noundef zeroext %239)
          to label %240 unwind label %271

240:                                              ; preds = %236
  %241 = load ptr, ptr %19, align 8, !tbaa !5
  %242 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %241)
          to label %243 unwind label %275

243:                                              ; preds = %240
  store i64 %242, ptr %15, align 8, !tbaa !22
  %244 = load ptr, ptr %14, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %244, i32 0, i32 2
  %246 = load ptr, ptr %245, align 8, !tbaa !38
  %247 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %246)
          to label %248 unwind label %275

248:                                              ; preds = %243
  %249 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %247, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8, !tbaa !67
  %251 = invoke noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %250)
          to label %252 unwind label %275

252:                                              ; preds = %248
  store i64 %251, ptr %17, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  %253 = load ptr, ptr %19, align 8, !tbaa !5
  %254 = load ptr, ptr %14, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %254, i32 0, i32 2
  %256 = load ptr, ptr %255, align 8, !tbaa !38
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %253, ptr noundef %256)
          to label %257 unwind label %174

257:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %258 = load ptr, ptr %19, align 8, !tbaa !5
  %259 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %258)
          to label %260 unwind label %280

260:                                              ; preds = %257
  %261 = load ptr, ptr %19, align 8, !tbaa !5
  %262 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %261)
          to label %263 unwind label %280

263:                                              ; preds = %260
  %264 = getelementptr inbounds %struct.VmaAllocator_T, ptr %262, i32 0, i32 0
  %265 = load i8, ptr %264, align 8, !tbaa !46, !range !44, !noundef !45
  %266 = trunc i8 %265 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(56) %259, i1 noundef zeroext %266)
          to label %267 unwind label %280

267:                                              ; preds = %263
  %268 = load ptr, ptr %19, align 8, !tbaa !5
  %269 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %268)
          to label %270 unwind label %284

270:                                              ; preds = %267
  store i64 %269, ptr %16, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  store i32 5, ptr %5, align 4, !tbaa !13
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  br label %517

271:                                              ; preds = %236, %233, %230
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %9, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %10, align 4
  br label %279

275:                                              ; preds = %248, %243, %240
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %9, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  br label %279

279:                                              ; preds = %275, %271
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %289

280:                                              ; preds = %263, %260, %257
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %9, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %10, align 4
  br label %288

284:                                              ; preds = %267
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %9, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  br label %288

288:                                              ; preds = %284, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %289

289:                                              ; preds = %288, %279, %229, %174
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  br label %607

290:                                              ; preds = %135
  %291 = load ptr, ptr %14, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %291, i32 0, i32 1
  %293 = load ptr, ptr %292, align 8, !tbaa !24
  %294 = invoke noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %293)
          to label %295 unwind label %129

295:                                              ; preds = %290
  %296 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %297 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %296, i32 0, i32 0
  %298 = load i64, ptr %297, align 8, !tbaa !70
  %299 = sub i64 %298, %294
  store i64 %299, ptr %297, align 8, !tbaa !70
  %300 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %301 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %300, i32 0, i32 2
  %302 = load i32, ptr %301, align 8, !tbaa !71
  %303 = add i32 %302, -1
  store i32 %303, ptr %301, align 8, !tbaa !71
  %304 = load ptr, ptr %19, align 8, !tbaa !5
  %305 = load ptr, ptr %14, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %305, i32 0, i32 2
  %307 = load ptr, ptr %306, align 8, !tbaa !38
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %304, ptr noundef %307)
          to label %308 unwind label %129

308:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %309 = load ptr, ptr %14, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %309, i32 0, i32 1
  %311 = load ptr, ptr %310, align 8, !tbaa !24
  %312 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %311)
          to label %313 unwind label %325

313:                                              ; preds = %308
  store ptr %312, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  store i8 1, ptr %31, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  store ptr %7, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %314 = load ptr, ptr %32, align 8, !tbaa !5
  %315 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %314)
          to label %316 unwind label %329

316:                                              ; preds = %313
  store ptr %315, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %317 = load ptr, ptr %32, align 8, !tbaa !5
  %318 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %317)
          to label %319 unwind label %333

319:                                              ; preds = %316
  store ptr %318, ptr %34, align 8, !tbaa !5
  br label %320

320:                                              ; preds = %349, %319
  %321 = load ptr, ptr %33, align 8, !tbaa !5
  %322 = load ptr, ptr %34, align 8, !tbaa !5
  %323 = icmp ne ptr %321, %322
  br i1 %323, label %337, label %324

324:                                              ; preds = %320
  store i32 8, ptr %13, align 4
  br label %352

325:                                              ; preds = %308
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %9, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %10, align 4
  br label %369

329:                                              ; preds = %313
  %330 = landingpad { ptr, i32 }
          cleanup
  %331 = extractvalue { ptr, i32 } %330, 0
  store ptr %331, ptr %9, align 8
  %332 = extractvalue { ptr, i32 } %330, 1
  store i32 %332, ptr %10, align 4
  br label %353

333:                                              ; preds = %316
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %9, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %353

337:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %338 = load ptr, ptr %33, align 8, !tbaa !5
  store ptr %338, ptr %35, align 8, !tbaa !5
  %339 = load ptr, ptr %35, align 8, !tbaa !5
  %340 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %339, i32 0, i32 1
  %341 = load ptr, ptr %340, align 8, !tbaa !41
  %342 = load ptr, ptr %30, align 8, !tbaa !5
  %343 = icmp eq ptr %341, %342
  br i1 %343, label %344, label %345

344:                                              ; preds = %337
  store i8 0, ptr %31, align 1, !tbaa !40
  store i32 8, ptr %13, align 4
  br label %346

345:                                              ; preds = %337
  store i32 0, ptr %13, align 4
  br label %346

346:                                              ; preds = %345, %344
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  %347 = load i32, ptr %13, align 4
  switch i32 %347, label %352 [
    i32 0, label %348
  ]

348:                                              ; preds = %346
  br label %349

349:                                              ; preds = %348
  %350 = load ptr, ptr %33, align 8, !tbaa !5
  %351 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %350, i32 1
  store ptr %351, ptr %33, align 8, !tbaa !5
  br label %320

352:                                              ; preds = %346, %324
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %354

353:                                              ; preds = %333, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %368

354:                                              ; preds = %352
  %355 = load i8, ptr %31, align 1, !tbaa !40, !range !44, !noundef !45
  %356 = trunc i8 %355 to i1
  br i1 %356, label %357, label %367

357:                                              ; preds = %354
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %358 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %36, i32 0, i32 0
  %359 = load i32, ptr %18, align 4, !tbaa !21
  store i32 %359, ptr %358, align 8, !tbaa !43
  %360 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %36, i32 0, i32 1
  %361 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %361, ptr %360, align 8, !tbaa !41
  invoke void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %362 unwind label %363

362:                                              ; preds = %357
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %367

363:                                              ; preds = %357
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %9, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %368

367:                                              ; preds = %362, %354
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %517

368:                                              ; preds = %363, %353
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  br label %369

369:                                              ; preds = %368, %325
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %607

370:                                              ; preds = %135
  %371 = load ptr, ptr %14, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %371, i32 0, i32 1
  %373 = load ptr, ptr %372, align 8, !tbaa !24
  %374 = invoke noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %373)
          to label %375 unwind label %129

375:                                              ; preds = %370
  %376 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %377 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %376, i32 0, i32 0
  %378 = load i64, ptr %377, align 8, !tbaa !70
  %379 = sub i64 %378, %374
  store i64 %379, ptr %377, align 8, !tbaa !70
  %380 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %381 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %380, i32 0, i32 2
  %382 = load i32, ptr %381, align 8, !tbaa !71
  %383 = add i32 %382, -1
  store i32 %383, ptr %381, align 8, !tbaa !71
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %384 = load ptr, ptr %19, align 8, !tbaa !5
  %385 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %384)
          to label %386 unwind label %475

386:                                              ; preds = %375
  %387 = load ptr, ptr %19, align 8, !tbaa !5
  %388 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %387)
          to label %389 unwind label %475

389:                                              ; preds = %386
  %390 = getelementptr inbounds %struct.VmaAllocator_T, ptr %388, i32 0, i32 0
  %391 = load i8, ptr %390, align 8, !tbaa !46, !range !44, !noundef !45
  %392 = trunc i8 %391 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(56) %385, i1 noundef zeroext %392)
          to label %393 unwind label %475

393:                                              ; preds = %389
  %394 = load ptr, ptr %19, align 8, !tbaa !5
  %395 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %394)
          to label %396 unwind label %479

396:                                              ; preds = %393
  store i64 %395, ptr %15, align 8, !tbaa !22
  %397 = load ptr, ptr %14, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %397, i32 0, i32 1
  %399 = load ptr, ptr %398, align 8, !tbaa !24
  %400 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %399)
          to label %401 unwind label %479

401:                                              ; preds = %396
  %402 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %400, i32 0, i32 0
  %403 = load ptr, ptr %402, align 8, !tbaa !67
  %404 = invoke noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %403)
          to label %405 unwind label %479

405:                                              ; preds = %401
  store i64 %404, ptr %17, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  %406 = load ptr, ptr %19, align 8, !tbaa !5
  %407 = load ptr, ptr %14, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %407, i32 0, i32 1
  %409 = load ptr, ptr %408, align 8, !tbaa !24
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %406, ptr noundef %409)
          to label %410 unwind label %129

410:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %411 = load ptr, ptr %19, align 8, !tbaa !5
  %412 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %411)
          to label %413 unwind label %484

413:                                              ; preds = %410
  %414 = load ptr, ptr %19, align 8, !tbaa !5
  %415 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %414)
          to label %416 unwind label %484

416:                                              ; preds = %413
  %417 = getelementptr inbounds %struct.VmaAllocator_T, ptr %415, i32 0, i32 0
  %418 = load i8, ptr %417, align 8, !tbaa !46, !range !44, !noundef !45
  %419 = trunc i8 %418 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(56) %412, i1 noundef zeroext %419)
          to label %420 unwind label %484

420:                                              ; preds = %416
  %421 = load ptr, ptr %19, align 8, !tbaa !5
  %422 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %421)
          to label %423 unwind label %488

423:                                              ; preds = %420
  store i64 %422, ptr %16, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  %424 = load i64, ptr %15, align 8, !tbaa !22
  %425 = load i64, ptr %16, align 8, !tbaa !22
  %426 = sub i64 %424, %425
  %427 = load i64, ptr %17, align 8, !tbaa !22
  %428 = mul i64 %427, %426
  store i64 %428, ptr %17, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %429 = load ptr, ptr %19, align 8, !tbaa !5
  %430 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %429)
          to label %431 unwind label %493

431:                                              ; preds = %423
  %432 = load ptr, ptr %19, align 8, !tbaa !5
  %433 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %432)
          to label %434 unwind label %493

434:                                              ; preds = %431
  %435 = getelementptr inbounds %struct.VmaAllocator_T, ptr %433, i32 0, i32 0
  %436 = load i8, ptr %435, align 8, !tbaa !46, !range !44, !noundef !45
  %437 = trunc i8 %436 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(56) %430, i1 noundef zeroext %437)
          to label %438 unwind label %493

438:                                              ; preds = %434
  %439 = load ptr, ptr %14, align 8, !tbaa !5
  %440 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %439, i32 0, i32 2
  %441 = load ptr, ptr %440, align 8, !tbaa !38
  %442 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %441)
          to label %443 unwind label %497

443:                                              ; preds = %438
  %444 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %442, i32 0, i32 0
  %445 = load ptr, ptr %444, align 8, !tbaa !67
  %446 = invoke noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %445)
          to label %447 unwind label %497

447:                                              ; preds = %443
  store i64 %446, ptr %39, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  %448 = load ptr, ptr %19, align 8, !tbaa !5
  %449 = load ptr, ptr %14, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %449, i32 0, i32 2
  %451 = load ptr, ptr %450, align 8, !tbaa !38
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %448, ptr noundef %451)
          to label %452 unwind label %502

452:                                              ; preds = %447
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %453 = load ptr, ptr %19, align 8, !tbaa !5
  %454 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %453)
          to label %455 unwind label %506

455:                                              ; preds = %452
  %456 = load ptr, ptr %19, align 8, !tbaa !5
  %457 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %456)
          to label %458 unwind label %506

458:                                              ; preds = %455
  %459 = getelementptr inbounds %struct.VmaAllocator_T, ptr %457, i32 0, i32 0
  %460 = load i8, ptr %459, align 8, !tbaa !46, !range !44, !noundef !45
  %461 = trunc i8 %460 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(56) %454, i1 noundef zeroext %461)
          to label %462 unwind label %506

462:                                              ; preds = %458
  %463 = load i64, ptr %39, align 8, !tbaa !22
  %464 = load i64, ptr %16, align 8, !tbaa !22
  %465 = load ptr, ptr %19, align 8, !tbaa !5
  %466 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %465)
          to label %467 unwind label %510

467:                                              ; preds = %462
  %468 = sub i64 %464, %466
  %469 = mul i64 %463, %468
  %470 = load i64, ptr %17, align 8, !tbaa !22
  %471 = add i64 %470, %469
  store i64 %471, ptr %17, align 8, !tbaa !22
  %472 = load ptr, ptr %19, align 8, !tbaa !5
  %473 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %472)
          to label %474 unwind label %510

474:                                              ; preds = %467
  store i64 %473, ptr %16, align 8, !tbaa !22
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  store i32 5, ptr %5, align 4, !tbaa !13
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %517

475:                                              ; preds = %389, %386, %375
  %476 = landingpad { ptr, i32 }
          cleanup
  %477 = extractvalue { ptr, i32 } %476, 0
  store ptr %477, ptr %9, align 8
  %478 = extractvalue { ptr, i32 } %476, 1
  store i32 %478, ptr %10, align 4
  br label %483

479:                                              ; preds = %401, %396, %393
  %480 = landingpad { ptr, i32 }
          cleanup
  %481 = extractvalue { ptr, i32 } %480, 0
  store ptr %481, ptr %9, align 8
  %482 = extractvalue { ptr, i32 } %480, 1
  store i32 %482, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  br label %483

483:                                              ; preds = %479, %475
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %607

484:                                              ; preds = %416, %413, %410
  %485 = landingpad { ptr, i32 }
          cleanup
  %486 = extractvalue { ptr, i32 } %485, 0
  store ptr %486, ptr %9, align 8
  %487 = extractvalue { ptr, i32 } %485, 1
  store i32 %487, ptr %10, align 4
  br label %492

488:                                              ; preds = %420
  %489 = landingpad { ptr, i32 }
          cleanup
  %490 = extractvalue { ptr, i32 } %489, 0
  store ptr %490, ptr %9, align 8
  %491 = extractvalue { ptr, i32 } %489, 1
  store i32 %491, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  br label %492

492:                                              ; preds = %488, %484
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %607

493:                                              ; preds = %434, %431, %423
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %9, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %10, align 4
  br label %501

497:                                              ; preds = %443, %438
  %498 = landingpad { ptr, i32 }
          cleanup
  %499 = extractvalue { ptr, i32 } %498, 0
  store ptr %499, ptr %9, align 8
  %500 = extractvalue { ptr, i32 } %498, 1
  store i32 %500, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  br label %501

501:                                              ; preds = %497, %493
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %515

502:                                              ; preds = %447
  %503 = landingpad { ptr, i32 }
          cleanup
  %504 = extractvalue { ptr, i32 } %503, 0
  store ptr %504, ptr %9, align 8
  %505 = extractvalue { ptr, i32 } %503, 1
  store i32 %505, ptr %10, align 4
  br label %515

506:                                              ; preds = %458, %455, %452
  %507 = landingpad { ptr, i32 }
          cleanup
  %508 = extractvalue { ptr, i32 } %507, 0
  store ptr %508, ptr %9, align 8
  %509 = extractvalue { ptr, i32 } %507, 1
  store i32 %509, ptr %10, align 4
  br label %514

510:                                              ; preds = %467, %462
  %511 = landingpad { ptr, i32 }
          cleanup
  %512 = extractvalue { ptr, i32 } %511, 0
  store ptr %512, ptr %9, align 8
  %513 = extractvalue { ptr, i32 } %511, 1
  store i32 %513, ptr %10, align 4
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  br label %514

514:                                              ; preds = %510, %506
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %515

515:                                              ; preds = %514, %502, %501
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %607

516:                                              ; preds = %135
  call void @__assert_fail(ptr noundef @.str.57, ptr noundef @.str.2, i32 noundef 13292, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #7
  unreachable

517:                                              ; preds = %474, %367, %270
  %518 = load i64, ptr %15, align 8, !tbaa !22
  %519 = load i64, ptr %16, align 8, !tbaa !22
  %520 = icmp ugt i64 %518, %519
  br i1 %520, label %521, label %536

521:                                              ; preds = %517
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %522 = load i64, ptr %15, align 8, !tbaa !22
  %523 = load i64, ptr %16, align 8, !tbaa !22
  %524 = sub i64 %522, %523
  store i64 %524, ptr %42, align 8, !tbaa !22
  %525 = load i64, ptr %42, align 8, !tbaa !22
  %526 = trunc i64 %525 to i32
  %527 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %528 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %527, i32 0, i32 3
  %529 = load i32, ptr %528, align 4, !tbaa !72
  %530 = add i32 %529, %526
  store i32 %530, ptr %528, align 4, !tbaa !72
  %531 = load i64, ptr %17, align 8, !tbaa !22
  %532 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %533 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %532, i32 0, i32 1
  %534 = load i64, ptr %533, align 8, !tbaa !73
  %535 = add i64 %534, %531
  store i64 %535, ptr %533, align 8, !tbaa !73
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %536

536:                                              ; preds = %521, %517
  %537 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 7
  %538 = load i32, ptr %537, align 4, !tbaa !74
  %539 = icmp eq i32 %538, 8
  br i1 %539, label %540, label %603

540:                                              ; preds = %536
  %541 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 14
  %542 = load ptr, ptr %541, align 8, !tbaa !75
  %543 = icmp ne ptr %542, null
  br i1 %543, label %544, label %603

544:                                              ; preds = %540
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %545 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 14
  %546 = load ptr, ptr %545, align 8, !tbaa !75
  %547 = load i32, ptr %18, align 4, !tbaa !21
  %548 = zext i32 %547 to i64
  %549 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %546, i64 %548
  store ptr %549, ptr %43, align 8, !tbaa !5
  %550 = load ptr, ptr %43, align 8, !tbaa !5
  %551 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %550, i32 0, i32 1
  %552 = load i64, ptr %551, align 8, !tbaa !76
  %553 = icmp ne i64 %552, -1
  br i1 %553, label %554, label %602

554:                                              ; preds = %544
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %555 = load i64, ptr %15, align 8, !tbaa !22
  %556 = load i64, ptr %16, align 8, !tbaa !22
  %557 = sub i64 %555, %556
  store i64 %557, ptr %44, align 8, !tbaa !22
  %558 = load ptr, ptr %43, align 8, !tbaa !5
  %559 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %558, i32 0, i32 1
  %560 = load i64, ptr %559, align 8, !tbaa !76
  %561 = load i64, ptr %44, align 8, !tbaa !22
  %562 = icmp uge i64 %560, %561
  br i1 %562, label %563, label %598

563:                                              ; preds = %554
  %564 = load i64, ptr %44, align 8, !tbaa !22
  %565 = load ptr, ptr %43, align 8, !tbaa !5
  %566 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %565, i32 0, i32 1
  %567 = load i64, ptr %566, align 8, !tbaa !76
  %568 = sub i64 %567, %564
  store i64 %568, ptr %566, align 8, !tbaa !76
  %569 = load ptr, ptr %43, align 8, !tbaa !5
  %570 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %569, i32 0, i32 1
  %571 = load i64, ptr %570, align 8, !tbaa !76
  %572 = icmp ne i64 %571, 0
  br i1 %572, label %573, label %597

573:                                              ; preds = %563
  %574 = load ptr, ptr %19, align 8, !tbaa !5
  %575 = load ptr, ptr %43, align 8, !tbaa !5
  %576 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %575, i32 0, i32 1
  %577 = load i64, ptr %576, align 8, !tbaa !76
  %578 = sub i64 %577, 1
  %579 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %574, i64 noundef %578)
          to label %580 unwind label %593

580:                                              ; preds = %573
  %581 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %579, i32 0, i32 0
  %582 = load ptr, ptr %581, align 8, !tbaa !67
  %583 = load ptr, ptr %582, align 8, !tbaa !79
  %584 = getelementptr inbounds ptr, ptr %583, i64 7
  %585 = load ptr, ptr %584, align 8
  %586 = invoke noundef zeroext i1 %585(ptr noundef nonnull align 8 dereferenceable(33) %582)
          to label %587 unwind label %593

587:                                              ; preds = %580
  %588 = zext i1 %586 to i64
  %589 = load ptr, ptr %43, align 8, !tbaa !5
  %590 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %589, i32 0, i32 1
  %591 = load i64, ptr %590, align 8, !tbaa !76
  %592 = sub i64 %591, %588
  store i64 %592, ptr %590, align 8, !tbaa !76
  br label %597

593:                                              ; preds = %580, %573
  %594 = landingpad { ptr, i32 }
          cleanup
  %595 = extractvalue { ptr, i32 } %594, 0
  store ptr %595, ptr %9, align 8
  %596 = extractvalue { ptr, i32 } %594, 1
  store i32 %596, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %607

597:                                              ; preds = %587, %563
  br label %601

598:                                              ; preds = %554
  %599 = load ptr, ptr %43, align 8, !tbaa !5
  %600 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %599, i32 0, i32 1
  store i64 0, ptr %600, align 8, !tbaa !76
  br label %601

601:                                              ; preds = %598, %597
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %602

602:                                              ; preds = %601, %544
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %603

603:                                              ; preds = %602, %540, %536
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %604

604:                                              ; preds = %603
  %605 = load i32, ptr %12, align 4, !tbaa !21
  %606 = add i32 %605, 1
  store i32 %606, ptr %12, align 4, !tbaa !21
  br label %89, !llvm.loop !81

607:                                              ; preds = %593, %515, %492, %483, %369, %289, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %960

608:                                              ; preds = %95
  %609 = load ptr, ptr %4, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %609, i32 0, i32 0
  store i32 0, ptr %610, align 8, !tbaa !9
  %611 = load ptr, ptr %4, align 8, !tbaa !5
  %612 = getelementptr inbounds %struct.VmaDefragmentationPassMoveInfo, ptr %611, i32 0, i32 1
  store ptr null, ptr %612, align 8, !tbaa !12
  %613 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 5
  invoke void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %613)
          to label %614 unwind label %672

614:                                              ; preds = %608
  %615 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %616 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %615, i32 0, i32 2
  %617 = load i32, ptr %616, align 8, !tbaa !71
  %618 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 12
  %619 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %618, i32 0, i32 2
  %620 = load i32, ptr %619, align 8, !tbaa !83
  %621 = add i32 %620, %617
  store i32 %621, ptr %619, align 8, !tbaa !83
  %622 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %623 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %622, i32 0, i32 1
  %624 = load i64, ptr %623, align 8, !tbaa !73
  %625 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 12
  %626 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %625, i32 0, i32 1
  %627 = load i64, ptr %626, align 8, !tbaa !84
  %628 = add i64 %627, %624
  store i64 %628, ptr %626, align 8, !tbaa !84
  %629 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %630 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %629, i32 0, i32 0
  %631 = load i64, ptr %630, align 8, !tbaa !70
  %632 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 12
  %633 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %632, i32 0, i32 0
  %634 = load i64, ptr %633, align 8, !tbaa !85
  %635 = add i64 %634, %631
  store i64 %635, ptr %633, align 8, !tbaa !85
  %636 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  %637 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %636, i32 0, i32 3
  %638 = load i32, ptr %637, align 4, !tbaa !72
  %639 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 12
  %640 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %639, i32 0, i32 3
  %641 = load i32, ptr %640, align 4, !tbaa !86
  %642 = add i32 %641, %638
  store i32 %642, ptr %640, align 4, !tbaa !86
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #8
  call void @llvm.memset.p0.i64(ptr align 8 %45, i8 0, i64 24, i1 false)
  %643 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %45, i32 0, i32 0
  %644 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %45, i32 0, i32 1
  %645 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %45, i32 0, i32 2
  %646 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %45, i32 0, i32 3
  %647 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %647, ptr align 8 %45, i64 24, i1 false), !tbaa.struct !87
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  %648 = invoke noundef i64 @_ZNK9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %649 unwind label %672

649:                                              ; preds = %614
  %650 = icmp ugt i64 %648, 0
  br i1 %650, label %651, label %912

651:                                              ; preds = %649
  br label %652

652:                                              ; preds = %651
  %653 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 7
  %654 = load i32, ptr %653, align 4, !tbaa !74
  %655 = icmp eq i32 %654, 8
  br i1 %655, label %656, label %818

656:                                              ; preds = %652
  %657 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 14
  %658 = load ptr, ptr %657, align 8, !tbaa !75
  %659 = icmp ne ptr %658, null
  br i1 %659, label %660, label %817

660:                                              ; preds = %656
  call void @llvm.lifetime.start.p0(i64 1, ptr %46) #8
  store i8 0, ptr %46, align 1, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  store ptr %7, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %661 = load ptr, ptr %47, align 8, !tbaa !5
  %662 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %661)
          to label %663 unwind label %676

663:                                              ; preds = %660
  store ptr %662, ptr %48, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %664 = load ptr, ptr %47, align 8, !tbaa !5
  %665 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %664)
          to label %666 unwind label %680

666:                                              ; preds = %663
  store ptr %665, ptr %49, align 8, !tbaa !5
  br label %667

667:                                              ; preds = %807, %666
  %668 = load ptr, ptr %48, align 8, !tbaa !5
  %669 = load ptr, ptr %49, align 8, !tbaa !5
  %670 = icmp ne ptr %668, %669
  br i1 %670, label %684, label %671

671:                                              ; preds = %667
  store i32 12, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  br label %812

672:                                              ; preds = %614, %608
  %673 = landingpad { ptr, i32 }
          cleanup
  %674 = extractvalue { ptr, i32 } %673, 0
  store ptr %674, ptr %9, align 8
  %675 = extractvalue { ptr, i32 } %673, 1
  store i32 %675, ptr %10, align 4
  br label %960

676:                                              ; preds = %660
  %677 = landingpad { ptr, i32 }
          cleanup
  %678 = extractvalue { ptr, i32 } %677, 0
  store ptr %678, ptr %9, align 8
  %679 = extractvalue { ptr, i32 } %677, 1
  store i32 %679, ptr %10, align 4
  br label %811

680:                                              ; preds = %663
  %681 = landingpad { ptr, i32 }
          cleanup
  %682 = extractvalue { ptr, i32 } %681, 0
  store ptr %682, ptr %9, align 8
  %683 = extractvalue { ptr, i32 } %681, 1
  store i32 %683, ptr %10, align 4
  br label %810

684:                                              ; preds = %667
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %685 = load ptr, ptr %48, align 8, !tbaa !5
  store ptr %685, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %686 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 14
  %687 = load ptr, ptr %686, align 8, !tbaa !75
  %688 = load ptr, ptr %50, align 8, !tbaa !5
  %689 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %688, i32 0, i32 0
  %690 = load i32, ptr %689, align 8, !tbaa !43
  %691 = zext i32 %690 to i64
  %692 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %687, i64 %691
  store ptr %692, ptr %51, align 8, !tbaa !5
  %693 = load ptr, ptr %51, align 8, !tbaa !5
  %694 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %693, i32 0, i32 0
  %695 = load i8, ptr %694, align 8, !tbaa !88
  %696 = icmp ne i8 %695, 6
  br i1 %696, label %697, label %806

697:                                              ; preds = %684
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %698 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 10
  %699 = load ptr, ptr %698, align 8, !tbaa !27
  %700 = load ptr, ptr %50, align 8, !tbaa !5
  %701 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %700, i32 0, i32 0
  %702 = load i32, ptr %701, align 8, !tbaa !43
  %703 = zext i32 %702 to i64
  %704 = getelementptr inbounds ptr, ptr %699, i64 %703
  %705 = load ptr, ptr %704, align 8, !tbaa !5
  store ptr %705, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %706 = load ptr, ptr %52, align 8, !tbaa !5
  %707 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %706)
          to label %708 unwind label %727

708:                                              ; preds = %697
  %709 = load ptr, ptr %52, align 8, !tbaa !5
  %710 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %709)
          to label %711 unwind label %727

711:                                              ; preds = %708
  %712 = getelementptr inbounds %struct.VmaAllocator_T, ptr %710, i32 0, i32 0
  %713 = load i8, ptr %712, align 8, !tbaa !46, !range !44, !noundef !45
  %714 = trunc i8 %713 to i1
  invoke void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(56) %707, i1 noundef zeroext %714)
          to label %715 unwind label %727

715:                                              ; preds = %711
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  store i64 0, ptr %54, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #8
  %716 = load ptr, ptr %52, align 8, !tbaa !5
  %717 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %716)
          to label %718 unwind label %731

718:                                              ; preds = %715
  %719 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 11
  %720 = load i64, ptr %719, align 8, !tbaa !89
  %721 = sub i64 %717, %720
  store i64 %721, ptr %55, align 8, !tbaa !22
  br label %722

722:                                              ; preds = %800, %718
  %723 = load i64, ptr %54, align 8, !tbaa !22
  %724 = load i64, ptr %55, align 8, !tbaa !22
  %725 = icmp ult i64 %723, %724
  br i1 %725, label %735, label %726

726:                                              ; preds = %722
  store i32 14, ptr %13, align 4
  br label %803

727:                                              ; preds = %711, %708, %697
  %728 = landingpad { ptr, i32 }
          cleanup
  %729 = extractvalue { ptr, i32 } %728, 0
  store ptr %729, ptr %9, align 8
  %730 = extractvalue { ptr, i32 } %728, 1
  store i32 %730, ptr %10, align 4
  br label %805

731:                                              ; preds = %782, %777, %754, %749, %744, %735, %715
  %732 = landingpad { ptr, i32 }
          cleanup
  %733 = extractvalue { ptr, i32 } %732, 0
  store ptr %733, ptr %9, align 8
  %734 = extractvalue { ptr, i32 } %732, 1
  store i32 %734, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #8
  br label %805

735:                                              ; preds = %722
  %736 = load ptr, ptr %52, align 8, !tbaa !5
  %737 = load i64, ptr %54, align 8, !tbaa !22
  %738 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %736, i64 noundef %737)
          to label %739 unwind label %731

739:                                              ; preds = %735
  %740 = load ptr, ptr %50, align 8, !tbaa !5
  %741 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %740, i32 0, i32 1
  %742 = load ptr, ptr %741, align 8, !tbaa !41
  %743 = icmp eq ptr %738, %742
  br i1 %743, label %744, label %799

744:                                              ; preds = %739
  %745 = load ptr, ptr %52, align 8, !tbaa !5
  %746 = getelementptr inbounds %class.VmaBlockVector, ptr %745, i32 0, i32 16
  %747 = load i64, ptr %54, align 8, !tbaa !22
  %748 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %746, i64 noundef %747)
          to label %749 unwind label %731

749:                                              ; preds = %744
  %750 = load ptr, ptr %52, align 8, !tbaa !5
  %751 = getelementptr inbounds %class.VmaBlockVector, ptr %750, i32 0, i32 16
  %752 = load ptr, ptr %52, align 8, !tbaa !5
  %753 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %752)
          to label %754 unwind label %731

754:                                              ; preds = %749
  %755 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 11
  %756 = load i64, ptr %755, align 8, !tbaa !89
  %757 = add i64 %756, 1
  store i64 %757, ptr %755, align 8, !tbaa !89
  %758 = sub i64 %753, %757
  %759 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %751, i64 noundef %758)
          to label %760 unwind label %731

760:                                              ; preds = %754
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %748, ptr noundef nonnull align 8 dereferenceable(8) %759) #8
  %761 = load ptr, ptr %51, align 8, !tbaa !5
  %762 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %761, i32 0, i32 1
  %763 = load i64, ptr %762, align 8, !tbaa !76
  %764 = icmp ne i64 %763, -1
  br i1 %764, label %765, label %798

765:                                              ; preds = %760
  %766 = load i64, ptr %54, align 8, !tbaa !22
  %767 = add i64 %766, 1
  %768 = load ptr, ptr %51, align 8, !tbaa !5
  %769 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %768, i32 0, i32 1
  %770 = load i64, ptr %769, align 8, !tbaa !76
  %771 = icmp ult i64 %767, %770
  br i1 %771, label %772, label %797

772:                                              ; preds = %765
  %773 = load ptr, ptr %51, align 8, !tbaa !5
  %774 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %773, i32 0, i32 1
  %775 = load i64, ptr %774, align 8, !tbaa !76
  %776 = icmp ugt i64 %775, 1
  br i1 %776, label %777, label %791

777:                                              ; preds = %772
  %778 = load ptr, ptr %52, align 8, !tbaa !5
  %779 = getelementptr inbounds %class.VmaBlockVector, ptr %778, i32 0, i32 16
  %780 = load i64, ptr %54, align 8, !tbaa !22
  %781 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %779, i64 noundef %780)
          to label %782 unwind label %731

782:                                              ; preds = %777
  %783 = load ptr, ptr %52, align 8, !tbaa !5
  %784 = getelementptr inbounds %class.VmaBlockVector, ptr %783, i32 0, i32 16
  %785 = load ptr, ptr %51, align 8, !tbaa !5
  %786 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %785, i32 0, i32 1
  %787 = load i64, ptr %786, align 8, !tbaa !76
  %788 = add i64 %787, -1
  store i64 %788, ptr %786, align 8, !tbaa !76
  %789 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %784, i64 noundef %788)
          to label %790 unwind label %731

790:                                              ; preds = %782
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %781, ptr noundef nonnull align 8 dereferenceable(8) %789) #8
  br label %796

791:                                              ; preds = %772
  %792 = load ptr, ptr %51, align 8, !tbaa !5
  %793 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %792, i32 0, i32 1
  %794 = load i64, ptr %793, align 8, !tbaa !76
  %795 = add i64 %794, -1
  store i64 %795, ptr %793, align 8, !tbaa !76
  br label %796

796:                                              ; preds = %791, %790
  br label %797

797:                                              ; preds = %796, %765
  br label %798

798:                                              ; preds = %797, %760
  store i8 1, ptr %46, align 1, !tbaa !40
  store i32 14, ptr %13, align 4
  br label %803

799:                                              ; preds = %739
  br label %800

800:                                              ; preds = %799
  %801 = load i64, ptr %54, align 8, !tbaa !22
  %802 = add i64 %801, 1
  store i64 %802, ptr %54, align 8, !tbaa !22
  br label %722, !llvm.loop !90

803:                                              ; preds = %798, %726
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  br label %804

804:                                              ; preds = %803
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %806

805:                                              ; preds = %731, %727
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %810

806:                                              ; preds = %804, %684
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %807

807:                                              ; preds = %806
  %808 = load ptr, ptr %48, align 8, !tbaa !5
  %809 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %808, i32 1
  store ptr %809, ptr %48, align 8, !tbaa !5
  br label %667

810:                                              ; preds = %805, %680
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %811

811:                                              ; preds = %810, %676
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #8
  br label %960

812:                                              ; preds = %671
  %813 = load i8, ptr %46, align 1, !tbaa !40, !range !44, !noundef !45
  %814 = trunc i8 %813 to i1
  br i1 %814, label %815, label %816

815:                                              ; preds = %812
  store i32 5, ptr %5, align 4, !tbaa !13
  br label %816

816:                                              ; preds = %815, %812
  store i32 10, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #8
  br label %911

817:                                              ; preds = %656
  br label %818

818:                                              ; preds = %817, %652
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  store ptr %7, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  %819 = load ptr, ptr %56, align 8, !tbaa !5
  %820 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %819)
          to label %821 unwind label %830

821:                                              ; preds = %818
  store ptr %820, ptr %57, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  %822 = load ptr, ptr %56, align 8, !tbaa !5
  %823 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %822)
          to label %824 unwind label %834

824:                                              ; preds = %821
  store ptr %823, ptr %58, align 8, !tbaa !5
  br label %825

825:                                              ; preds = %903, %824
  %826 = load ptr, ptr %57, align 8, !tbaa !5
  %827 = load ptr, ptr %58, align 8, !tbaa !5
  %828 = icmp ne ptr %826, %827
  br i1 %828, label %838, label %829

829:                                              ; preds = %825
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  br label %909

830:                                              ; preds = %818
  %831 = landingpad { ptr, i32 }
          cleanup
  %832 = extractvalue { ptr, i32 } %831, 0
  store ptr %832, ptr %9, align 8
  %833 = extractvalue { ptr, i32 } %831, 1
  store i32 %833, ptr %10, align 4
  br label %908

834:                                              ; preds = %821
  %835 = landingpad { ptr, i32 }
          cleanup
  %836 = extractvalue { ptr, i32 } %835, 0
  store ptr %836, ptr %9, align 8
  %837 = extractvalue { ptr, i32 } %835, 1
  store i32 %837, ptr %10, align 4
  br label %907

838:                                              ; preds = %825
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  %839 = load ptr, ptr %57, align 8, !tbaa !5
  store ptr %839, ptr %59, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  %840 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 10
  %841 = load ptr, ptr %840, align 8, !tbaa !27
  %842 = load ptr, ptr %59, align 8, !tbaa !5
  %843 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %842, i32 0, i32 0
  %844 = load i32, ptr %843, align 8, !tbaa !43
  %845 = zext i32 %844 to i64
  %846 = getelementptr inbounds ptr, ptr %841, i64 %845
  %847 = load ptr, ptr %846, align 8, !tbaa !5
  store ptr %847, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #8
  %848 = load ptr, ptr %60, align 8, !tbaa !5
  %849 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %848)
          to label %850 unwind label %867

850:                                              ; preds = %838
  %851 = load ptr, ptr %60, align 8, !tbaa !5
  %852 = invoke noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %851)
          to label %853 unwind label %867

853:                                              ; preds = %850
  %854 = getelementptr inbounds %struct.VmaAllocator_T, ptr %852, i32 0, i32 0
  %855 = load i8, ptr %854, align 8, !tbaa !46, !range !44, !noundef !45
  %856 = trunc i8 %855 to i1
  invoke void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(56) %849, i1 noundef zeroext %856)
          to label %857 unwind label %867

857:                                              ; preds = %853
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #8
  %858 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 11
  %859 = load i64, ptr %858, align 8, !tbaa !89
  store i64 %859, ptr %62, align 8, !tbaa !22
  br label %860

860:                                              ; preds = %898, %857
  %861 = load i64, ptr %62, align 8, !tbaa !22
  %862 = load ptr, ptr %60, align 8, !tbaa !5
  %863 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %862)
          to label %864 unwind label %871

864:                                              ; preds = %860
  %865 = icmp ult i64 %861, %863
  br i1 %865, label %875, label %866

866:                                              ; preds = %864
  store i32 19, ptr %13, align 4
  br label %901

867:                                              ; preds = %853, %850, %838
  %868 = landingpad { ptr, i32 }
          cleanup
  %869 = extractvalue { ptr, i32 } %868, 0
  store ptr %869, ptr %9, align 8
  %870 = extractvalue { ptr, i32 } %868, 1
  store i32 %870, ptr %10, align 4
  br label %906

871:                                              ; preds = %889, %884, %875, %860
  %872 = landingpad { ptr, i32 }
          cleanup
  %873 = extractvalue { ptr, i32 } %872, 0
  store ptr %873, ptr %9, align 8
  %874 = extractvalue { ptr, i32 } %872, 1
  store i32 %874, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #8
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  br label %906

875:                                              ; preds = %864
  %876 = load ptr, ptr %60, align 8, !tbaa !5
  %877 = load i64, ptr %62, align 8, !tbaa !22
  %878 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %876, i64 noundef %877)
          to label %879 unwind label %871

879:                                              ; preds = %875
  %880 = load ptr, ptr %59, align 8, !tbaa !5
  %881 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %880, i32 0, i32 1
  %882 = load ptr, ptr %881, align 8, !tbaa !41
  %883 = icmp eq ptr %878, %882
  br i1 %883, label %884, label %897

884:                                              ; preds = %879
  %885 = load ptr, ptr %60, align 8, !tbaa !5
  %886 = getelementptr inbounds %class.VmaBlockVector, ptr %885, i32 0, i32 16
  %887 = load i64, ptr %62, align 8, !tbaa !22
  %888 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %886, i64 noundef %887)
          to label %889 unwind label %871

889:                                              ; preds = %884
  %890 = load ptr, ptr %60, align 8, !tbaa !5
  %891 = getelementptr inbounds %class.VmaBlockVector, ptr %890, i32 0, i32 16
  %892 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %68, i32 0, i32 11
  %893 = load i64, ptr %892, align 8, !tbaa !89
  %894 = add i64 %893, 1
  store i64 %894, ptr %892, align 8, !tbaa !89
  %895 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %891, i64 noundef %893)
          to label %896 unwind label %871

896:                                              ; preds = %889
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %888, ptr noundef nonnull align 8 dereferenceable(8) %895) #8
  store i32 19, ptr %13, align 4
  br label %901

897:                                              ; preds = %879
  br label %898

898:                                              ; preds = %897
  %899 = load i64, ptr %62, align 8, !tbaa !22
  %900 = add i64 %899, 1
  store i64 %900, ptr %62, align 8, !tbaa !22
  br label %860, !llvm.loop !91

901:                                              ; preds = %896, %866
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #8
  br label %902

902:                                              ; preds = %901
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %903

903:                                              ; preds = %902
  %904 = load ptr, ptr %57, align 8, !tbaa !5
  %905 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %904, i32 1
  store ptr %905, ptr %57, align 8, !tbaa !5
  br label %825

906:                                              ; preds = %871, %867
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %907

907:                                              ; preds = %906, %834
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  br label %908

908:                                              ; preds = %907, %830
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  br label %960

909:                                              ; preds = %829
  br label %910

910:                                              ; preds = %909
  br label %911

911:                                              ; preds = %910, %816
  br label %912

912:                                              ; preds = %911, %649
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #8
  store ptr %8, ptr %63, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  %913 = load ptr, ptr %63, align 8, !tbaa !5
  %914 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %913)
          to label %915 unwind label %924

915:                                              ; preds = %912
  store ptr %914, ptr %64, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #8
  %916 = load ptr, ptr %63, align 8, !tbaa !5
  %917 = invoke noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %916)
          to label %918 unwind label %928

918:                                              ; preds = %915
  store ptr %917, ptr %65, align 8, !tbaa !5
  br label %919

919:                                              ; preds = %953, %918
  %920 = load ptr, ptr %64, align 8, !tbaa !5
  %921 = load ptr, ptr %65, align 8, !tbaa !5
  %922 = icmp ne ptr %920, %921
  br i1 %922, label %932, label %923

923:                                              ; preds = %919
  store i32 22, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #8
  br label %958

924:                                              ; preds = %912
  %925 = landingpad { ptr, i32 }
          cleanup
  %926 = extractvalue { ptr, i32 } %925, 0
  store ptr %926, ptr %9, align 8
  %927 = extractvalue { ptr, i32 } %925, 1
  store i32 %927, ptr %10, align 4
  br label %957

928:                                              ; preds = %915
  %929 = landingpad { ptr, i32 }
          cleanup
  %930 = extractvalue { ptr, i32 } %929, 0
  store ptr %930, ptr %9, align 8
  %931 = extractvalue { ptr, i32 } %929, 1
  store i32 %931, ptr %10, align 4
  br label %956

932:                                              ; preds = %919
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #8
  %933 = load ptr, ptr %64, align 8, !tbaa !5
  store ptr %933, ptr %66, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #8
  %934 = load ptr, ptr %66, align 8, !tbaa !5
  %935 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %934, i32 0, i32 1
  %936 = load ptr, ptr %935, align 8, !tbaa !41
  %937 = load ptr, ptr %11, align 8, !tbaa !5
  %938 = load ptr, ptr %66, align 8, !tbaa !5
  %939 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %938, i32 0, i32 0
  %940 = load i32, ptr %939, align 8, !tbaa !43
  %941 = invoke noundef i32 @_ZN20VmaDeviceMemoryBlock3MapEP14VmaAllocator_TjPPv(ptr noundef nonnull align 8 dereferenceable(96) %936, ptr noundef %937, i32 noundef %940, ptr noundef null)
          to label %942 unwind label %947

942:                                              ; preds = %932
  store i32 %941, ptr %67, align 4, !tbaa !13
  %943 = load i32, ptr %67, align 4, !tbaa !13
  %944 = icmp eq i32 %943, 0
  br i1 %944, label %945, label %946

945:                                              ; preds = %942
  br label %952

946:                                              ; preds = %942
  call void @__assert_fail(ptr noundef @.str.189, ptr noundef @.str.2, i32 noundef 13400, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #7
  unreachable

947:                                              ; preds = %932
  %948 = landingpad { ptr, i32 }
          cleanup
  %949 = extractvalue { ptr, i32 } %948, 0
  store ptr %949, ptr %9, align 8
  %950 = extractvalue { ptr, i32 } %948, 1
  store i32 %950, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  br label %956

951:                                              ; No predecessors!
  br label %952

952:                                              ; preds = %951, %945
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  br label %953

953:                                              ; preds = %952
  %954 = load ptr, ptr %64, align 8, !tbaa !5
  %955 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::FragmentedBlock", ptr %954, i32 1
  store ptr %955, ptr %64, align 8, !tbaa !5
  br label %919

956:                                              ; preds = %947, %928
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  br label %957

957:                                              ; preds = %956, %924
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #8
  br label %960

958:                                              ; preds = %923
  %959 = load i32, ptr %5, align 4, !tbaa !13
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret i32 %959

960:                                              ; preds = %957, %908, %811, %672, %607
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %961

961:                                              ; preds = %960, %96
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %962

962:                                              ; preds = %961
  %963 = load ptr, ptr %9, align 8
  %964 = load i32, ptr %10, align 4
  %965 = insertvalue { ptr, i32 } poison, ptr %963, 0
  %966 = insertvalue { ptr, i32 } %965, i32 %964, 1
  resume { ptr, i32 } %966
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

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

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


; 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.VmaStlAllocator.19 = type { ptr }
%class.VmaVector.20 = type { %struct.VmaStlAllocator.19, ptr, i64, i64 }
%"struct.VmaDefragmentationContext_T::FragmentedBlock" = type { i32, ptr }
%struct.VmaMutexLockRead = type { ptr }
%struct.VmaMutexLockWrite = type { ptr }
%struct.VmaDefragmentationMove = type { i32, ptr, ptr }
%"struct.VmaDefragmentationContext_T::StateExtensive" = type { i8, i64 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [59 x i8], align 1
@__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo = external hidden unnamed_addr constant [90 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [18 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), i1 noundef zeroext) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), i1 noundef zeroext) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #3 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) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN15VmaAllocation_T19SwapBlockAllocationEP14VmaAllocator_TPS_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef, ptr noundef) 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 #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 6) i32 @_ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr nocapture noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.VmaStlAllocator.19, align 8
  %4 = alloca %class.VmaVector.20, align 8
  %5 = alloca %class.VmaVector.20, align 8
  %6 = alloca %"struct.VmaDefragmentationContext_T::FragmentedBlock", align 8
  %7 = alloca %struct.VmaMutexLockRead, align 8
  %8 = alloca %struct.VmaMutexLockRead, align 8
  %9 = alloca %"struct.VmaDefragmentationContext_T::FragmentedBlock", align 8
  %10 = alloca %struct.VmaMutexLockRead, align 8
  %11 = alloca %struct.VmaMutexLockRead, align 8
  %12 = alloca %struct.VmaMutexLockRead, align 8
  %13 = alloca %struct.VmaMutexLockRead, align 8
  %14 = alloca %struct.VmaMutexLockWrite, align 8
  %15 = alloca %struct.VmaMutexLockWrite, align 8
  %16 = load i32, ptr %1, align 8, !tbaa !5
  %.not = icmp ne i32 %16, 0
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = load ptr, ptr %17, align 8
  %.not216 = icmp eq ptr %18, null
  %or.cond = select i1 %.not, i1 %.not216, i1 false
  br i1 %or.cond, label %19, label %.critedge

19:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.187, ptr noundef nonnull @.str.2, i32 noundef 13173, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #6
  unreachable

.critedge:                                        ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  call void @_ZN15VmaStlAllocatorIN27VmaDefragmentationContext_T15FragmentedBlockEEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %22 = load i32, ptr %1, align 8, !tbaa !5
  %.not354 = icmp eq i32 %22, 0
  br i1 %.not354, label %._crit_edge333, label %.lr.ph332

.lr.ph332:                                        ; preds = %.critedge
  %23 = getelementptr inbounds i8, ptr %0, i64 88
  %24 = getelementptr inbounds i8, ptr %0, i64 96
  %25 = getelementptr inbounds i8, ptr %0, i64 136
  %26 = getelementptr inbounds i8, ptr %0, i64 152
  %27 = getelementptr inbounds i8, ptr %9, i64 8
  %28 = getelementptr inbounds i8, ptr %6, i64 8
  %29 = getelementptr inbounds i8, ptr %0, i64 156
  %30 = getelementptr inbounds i8, ptr %0, i64 144
  %31 = getelementptr inbounds i8, ptr %0, i64 76
  %32 = getelementptr inbounds i8, ptr %0, i64 160
  br label %34

._crit_edge333:                                   ; preds = %239, %.critedge
  %.0182.lcssa = phi ptr [ null, %.critedge ], [ %.2184267, %239 ]
  %.0.lcssa = phi i32 [ 0, %.critedge ], [ %.1268, %239 ]
  store i32 0, ptr %1, align 8, !tbaa !5
  store ptr null, ptr %17, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  invoke void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %243 unwind label %268

34:                                               ; preds = %.lr.ph332, %239
  %indvars.iv = phi i64 [ 0, %.lr.ph332 ], [ %indvars.iv.next, %239 ]
  %.0330 = phi i32 [ 0, %.lr.ph332 ], [ %.1268, %239 ]
  %.0182328 = phi ptr [ null, %.lr.ph332 ], [ %.2184267, %239 ]
  %35 = load ptr, ptr %17, align 8, !tbaa !17
  %36 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %35, i64 %indvars.iv
  %37 = load ptr, ptr %23, align 8, !tbaa !18
  %.not227 = icmp eq ptr %37, null
  br i1 %.not227, label %38, label %49

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %36, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = call noundef i32 @_ZNK15VmaAllocation_T18GetMemoryTypeIndexEv(ptr noundef nonnull align 8 dereferenceable(84) %40)
  %42 = load ptr, ptr %24, align 8, !tbaa !22
  %43 = zext i32 %41 to i64
  %44 = getelementptr inbounds ptr, ptr %42, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %.not228 = icmp eq ptr %45, null
  br i1 %.not228, label %46, label %49

46:                                               ; preds = %38
  call void @__assert_fail(ptr noundef nonnull @.str.188, ptr noundef nonnull @.str.2, i32 noundef 13198, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #6
  unreachable

47:                                               ; preds = %144, %108
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %375

49:                                               ; preds = %34, %38
  %.0195 = phi ptr [ %45, %38 ], [ %37, %34 ]
  %.0194 = phi i32 [ %41, %38 ], [ 0, %34 ]
  %50 = load i32, ptr %36, align 8, !tbaa !24
  switch i32 %50, label %203 [
    i32 0, label %51
    i32 1, label %108
    i32 2, label %130
  ]

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %36, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %.0195, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %36, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !34
  %57 = invoke noundef zeroext i8 @_ZN15VmaAllocation_T19SwapBlockAllocationEP14VmaAllocator_TPS_(ptr noundef nonnull align 8 dereferenceable(84) %53, ptr noundef %54, ptr noundef %56)
          to label %58 unwind label %66

58:                                               ; preds = %51
  %59 = zext i8 %57 to i32
  %.not238 = icmp eq i8 %57, 0
  br i1 %.not238, label %77, label %60

60:                                               ; preds = %58
  %61 = load ptr, ptr %.0195, align 8, !tbaa !25
  %62 = load ptr, ptr %52, align 8, !tbaa !19
  %63 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %62)
  %64 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %65 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %.not239324 = icmp eq ptr %64, %65
  br i1 %.not239324, label %._crit_edge, label %.lr.ph326

66:                                               ; preds = %84, %51
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %375

.lr.ph326:                                        ; preds = %60, %72
  %.0199325 = phi ptr [ %73, %72 ], [ %64, %60 ]
  %68 = getelementptr inbounds i8, ptr %.0199325, i64 8
  %69 = load ptr, ptr %68, align 8, !tbaa !35
  %.not240 = icmp eq ptr %69, %63
  br i1 %.not240, label %.thread257, label %72

.thread257:                                       ; preds = %.lr.ph326
  %70 = load i32, ptr %.0199325, align 8, !tbaa !37
  %71 = add i32 %70, %59
  store i32 %71, ptr %.0199325, align 8, !tbaa !37
  br label %77

72:                                               ; preds = %.lr.ph326
  %73 = getelementptr inbounds i8, ptr %.0199325, i64 16
  %.not239 = icmp eq ptr %73, %65
  br i1 %.not239, label %._crit_edge, label %.lr.ph326

._crit_edge:                                      ; preds = %72, %60
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  store i32 %59, ptr %6, align 8, !tbaa !37
  store ptr %63, ptr %28, align 8, !tbaa !35
  invoke void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %74 unwind label %75

74:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %77

75:                                               ; preds = %._crit_edge
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %375

77:                                               ; preds = %.thread257, %74, %58
  %.1183 = phi ptr [ %.0182328, %58 ], [ %61, %74 ], [ %61, %.thread257 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %78 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %79 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %80 = load i8, ptr %79, align 8, !tbaa !38, !range !59, !noundef !60
  %81 = trunc nuw i8 %80 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(56) %78, i1 noundef zeroext %81)
          to label %82 unwind label %98

82:                                               ; preds = %77
  %83 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %84 unwind label %100

84:                                               ; preds = %82
  %85 = load ptr, ptr %55, align 8, !tbaa !34
  %86 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %85)
  %87 = load ptr, ptr %86, align 8, !tbaa !61
  %88 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %87)
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %89 = load ptr, ptr %55, align 8, !tbaa !34
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %.0195, ptr noundef %89)
          to label %90 unwind label %66

90:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %91 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %92 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %93 = load i8, ptr %92, align 8, !tbaa !38, !range !59, !noundef !60
  %94 = trunc nuw i8 %93 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(56) %91, i1 noundef zeroext %94)
          to label %95 unwind label %103

95:                                               ; preds = %90
  %96 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %97 unwind label %105

97:                                               ; preds = %95
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %204

98:                                               ; preds = %77
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %102

100:                                              ; preds = %82
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %102

102:                                              ; preds = %100, %98
  %.pn241 = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %375

103:                                              ; preds = %90
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %95
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %107

107:                                              ; preds = %105, %103
  %.pn243 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %375

108:                                              ; preds = %49
  %109 = getelementptr inbounds i8, ptr %36, i64 8
  %110 = load ptr, ptr %109, align 8, !tbaa !19
  %111 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %110)
  %112 = load i64, ptr %25, align 8, !tbaa !64
  %113 = sub i64 %112, %111
  store i64 %113, ptr %25, align 8, !tbaa !64
  %114 = load i32, ptr %26, align 8, !tbaa !65
  %115 = add i32 %114, -1
  store i32 %115, ptr %26, align 8, !tbaa !65
  %116 = getelementptr inbounds i8, ptr %36, i64 16
  %117 = load ptr, ptr %116, align 8, !tbaa !34
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %.0195, ptr noundef %117)
          to label %118 unwind label %47

118:                                              ; preds = %108
  %119 = load ptr, ptr %109, align 8, !tbaa !19
  %120 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %119)
  %121 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %122 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %.not236321 = icmp eq ptr %121, %122
  br i1 %.not236321, label %.critedge270, label %.lr.ph

123:                                              ; preds = %.lr.ph
  %124 = getelementptr inbounds i8, ptr %.0207322, i64 16
  %.not236 = icmp eq ptr %124, %122
  br i1 %.not236, label %.critedge270, label %.lr.ph

.lr.ph:                                           ; preds = %118, %123
  %.0207322 = phi ptr [ %124, %123 ], [ %121, %118 ]
  %125 = getelementptr inbounds i8, ptr %.0207322, i64 8
  %126 = load ptr, ptr %125, align 8, !tbaa !35
  %.not237 = icmp eq ptr %126, %120
  br i1 %.not237, label %.thread259, label %123

.critedge270:                                     ; preds = %123, %118
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  store i32 %.0194, ptr %9, align 8, !tbaa !37
  store ptr %120, ptr %27, align 8, !tbaa !35
  invoke void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %127 unwind label %128

127:                                              ; preds = %.critedge270
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %.thread259

128:                                              ; preds = %.critedge270
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %375

130:                                              ; preds = %49
  %131 = getelementptr inbounds i8, ptr %36, i64 8
  %132 = load ptr, ptr %131, align 8, !tbaa !19
  %133 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %132)
  %134 = load i64, ptr %25, align 8, !tbaa !64
  %135 = sub i64 %134, %133
  store i64 %135, ptr %25, align 8, !tbaa !64
  %136 = load i32, ptr %26, align 8, !tbaa !65
  %137 = add i32 %136, -1
  store i32 %137, ptr %26, align 8, !tbaa !65
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %138 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %139 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %140 = load i8, ptr %139, align 8, !tbaa !38, !range !59, !noundef !60
  %141 = trunc nuw i8 %140 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(56) %138, i1 noundef zeroext %141)
          to label %142 unwind label %184

142:                                              ; preds = %130
  %143 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %144 unwind label %186

144:                                              ; preds = %142
  %145 = load ptr, ptr %131, align 8, !tbaa !19
  %146 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %145)
  %147 = load ptr, ptr %146, align 8, !tbaa !61
  %148 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %147)
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %149 = load ptr, ptr %131, align 8, !tbaa !19
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %.0195, ptr noundef %149)
          to label %150 unwind label %47

150:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %151 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %152 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %153 = load i8, ptr %152, align 8, !tbaa !38, !range !59, !noundef !60
  %154 = trunc nuw i8 %153 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(56) %151, i1 noundef zeroext %154)
          to label %155 unwind label %189

155:                                              ; preds = %150
  %156 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %157 unwind label %191

157:                                              ; preds = %155
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %158 = sub i64 %143, %156
  %159 = mul i64 %158, %148
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %160 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %161 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %162 = load i8, ptr %161, align 8, !tbaa !38, !range !59, !noundef !60
  %163 = trunc nuw i8 %162 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(56) %160, i1 noundef zeroext %163)
          to label %164 unwind label %194

164:                                              ; preds = %157
  %165 = getelementptr inbounds i8, ptr %36, i64 16
  %166 = load ptr, ptr %165, align 8, !tbaa !34
  %167 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %166)
  %168 = load ptr, ptr %167, align 8, !tbaa !61
  %169 = call noundef i64 @_ZNK16VmaBlockMetadata7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(33) %168)
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %170 = load ptr, ptr %165, align 8, !tbaa !34
  invoke void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %.0195, ptr noundef %170)
          to label %171 unwind label %196

171:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %172 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %173 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
  %174 = load i8, ptr %173, align 8, !tbaa !38, !range !59, !noundef !60
  %175 = trunc nuw i8 %174 to i1
  invoke void @_ZN16VmaMutexLockReadC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(56) %172, i1 noundef zeroext %175)
          to label %176 unwind label %198

176:                                              ; preds = %171
  %177 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %178 unwind label %200

178:                                              ; preds = %176
  %179 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %.0195)
          to label %180 unwind label %200

180:                                              ; preds = %178
  %181 = sub i64 %156, %177
  %182 = mul i64 %181, %169
  %183 = add i64 %182, %159
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %204

184:                                              ; preds = %130
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %188

186:                                              ; preds = %142
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %188

188:                                              ; preds = %186, %184
  %.pn229 = phi { ptr, i32 } [ %187, %186 ], [ %185, %184 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %375

189:                                              ; preds = %150
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %193

191:                                              ; preds = %155
  %192 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %193

193:                                              ; preds = %191, %189
  %.pn231 = phi { ptr, i32 } [ %192, %191 ], [ %190, %189 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %375

194:                                              ; preds = %157
  %195 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %375

196:                                              ; preds = %164
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %375

198:                                              ; preds = %171
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %202

200:                                              ; preds = %178, %176
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16VmaMutexLockReadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %202

202:                                              ; preds = %200, %198
  %.pn233 = phi { ptr, i32 } [ %201, %200 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %375

203:                                              ; preds = %49
  call void @__assert_fail(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.2, i32 noundef 13292, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #6
  unreachable

204:                                              ; preds = %180, %97
  %.0192 = phi i64 [ %183, %180 ], [ %88, %97 ]
  %.0191 = phi i64 [ %179, %180 ], [ %96, %97 ]
  %.0189 = phi i64 [ %143, %180 ], [ %83, %97 ]
  %.2184 = phi ptr [ %.0182328, %180 ], [ %.1183, %97 ]
  %205 = icmp ugt i64 %.0189, %.0191
  br i1 %205, label %206, label %.thread259

206:                                              ; preds = %204
  %207 = sub i64 %.0189, %.0191
  %208 = trunc i64 %207 to i32
  %209 = load i32, ptr %29, align 4, !tbaa !66
  %210 = add i32 %209, %208
  store i32 %210, ptr %29, align 4, !tbaa !66
  %211 = load i64, ptr %30, align 8, !tbaa !67
  %212 = add i64 %211, %.0192
  store i64 %212, ptr %30, align 8, !tbaa !67
  br label %.thread259

.thread259:                                       ; preds = %.lr.ph, %127, %206, %204
  %.1268 = phi i32 [ 5, %206 ], [ 5, %204 ], [ %.0330, %127 ], [ %.0330, %.lr.ph ]
  %.2184267 = phi ptr [ %.2184, %206 ], [ %.2184, %204 ], [ %.0182328, %127 ], [ %.0182328, %.lr.ph ]
  %.0189266 = phi i64 [ %.0189, %206 ], [ %.0189, %204 ], [ 0, %127 ], [ 0, %.lr.ph ]
  %.0191265 = phi i64 [ %.0191, %206 ], [ %.0191, %204 ], [ 0, %127 ], [ 0, %.lr.ph ]
  %213 = load i32, ptr %31, align 4, !tbaa !68
  %214 = icmp eq i32 %213, 8
  br i1 %214, label %215, label %239

215:                                              ; preds = %.thread259
  %216 = load ptr, ptr %32, align 8, !tbaa !69
  %.not246 = icmp eq ptr %216, null
  br i1 %.not246, label %239, label %217

217:                                              ; preds = %215
  %218 = zext i32 %.0194 to i64
  %219 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %216, i64 %218, i32 1
  %220 = load i64, ptr %219, align 8, !tbaa !70
  %.not247 = icmp eq i64 %220, -1
  br i1 %.not247, label %239, label %221

221:                                              ; preds = %217
  %222 = sub i64 %.0189266, %.0191265
  %.not248 = icmp ult i64 %220, %222
  br i1 %.not248, label %.sink.split, label %223

223:                                              ; preds = %221
  %224 = sub i64 %220, %222
  store i64 %224, ptr %219, align 8, !tbaa !70
  %.not249 = icmp eq i64 %220, %222
  br i1 %.not249, label %239, label %225

225:                                              ; preds = %223
  %226 = add i64 %224, -1
  %227 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %.0195, i64 noundef %226)
          to label %228 unwind label %237

228:                                              ; preds = %225
  %229 = load ptr, ptr %227, align 8, !tbaa !61
  %230 = load ptr, ptr %229, align 8, !tbaa !73
  %231 = getelementptr inbounds i8, ptr %230, i64 56
  %232 = load ptr, ptr %231, align 8
  %233 = invoke noundef zeroext i1 %232(ptr noundef nonnull align 8 dereferenceable(33) %229)
          to label %234 unwind label %237

234:                                              ; preds = %228
  %.neg = sext i1 %233 to i64
  %235 = load i64, ptr %219, align 8, !tbaa !70
  %236 = add i64 %235, %.neg
  br label %.sink.split

237:                                              ; preds = %228, %225
  %238 = landingpad { ptr, i32 }
          cleanup
  br label %375

.sink.split:                                      ; preds = %221, %234
  %.sink = phi i64 [ %236, %234 ], [ 0, %221 ]
  store i64 %.sink, ptr %219, align 8, !tbaa !70
  br label %239

239:                                              ; preds = %.sink.split, %217, %223, %215, %.thread259
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %240 = load i32, ptr %1, align 8, !tbaa !5
  %241 = zext i32 %240 to i64
  %242 = icmp ult i64 %indvars.iv.next, %241
  br i1 %242, label %34, label %._crit_edge333, !llvm.loop !75

243:                                              ; preds = %._crit_edge333
  %244 = getelementptr inbounds i8, ptr %0, i64 136
  %245 = getelementptr inbounds i8, ptr %0, i64 152
  %246 = getelementptr inbounds i8, ptr %0, i64 112
  %247 = getelementptr inbounds i8, ptr %0, i64 128
  %248 = load <2 x i64>, ptr %244, align 8, !tbaa !77
  %249 = load <2 x i64>, ptr %246, align 8, !tbaa !77
  %250 = add <2 x i64> %249, %248
  store <2 x i64> %250, ptr %246, align 8, !tbaa !77
  %251 = load <2 x i32>, ptr %245, align 8, !tbaa !78
  %252 = load <2 x i32>, ptr %247, align 8, !tbaa !78
  %253 = add <2 x i32> %252, %251
  store <2 x i32> %253, ptr %247, align 8, !tbaa !78
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %244, i8 0, i64 24, i1 false)
  %254 = call noundef i64 @_ZNK9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %.not217 = icmp eq i64 %254, 0
  br i1 %.not217, label %.loopexit271, label %255

255:                                              ; preds = %243
  %256 = getelementptr inbounds i8, ptr %0, i64 76
  %257 = load i32, ptr %256, align 4, !tbaa !68
  %258 = icmp eq i32 %257, 8
  br i1 %258, label %259, label %321

259:                                              ; preds = %255
  %260 = getelementptr inbounds i8, ptr %0, i64 160
  %261 = load ptr, ptr %260, align 8, !tbaa !69
  %.not218 = icmp eq ptr %261, null
  br i1 %.not218, label %321, label %262

262:                                              ; preds = %259
  %263 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %264 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %.not221338 = icmp eq ptr %263, %264
  br i1 %.not221338, label %.loopexit271, label %.lr.ph342

.lr.ph342:                                        ; preds = %262
  %265 = getelementptr inbounds i8, ptr %0, i64 96
  %266 = getelementptr inbounds i8, ptr %0, i64 104
  br label %270

._crit_edge343.loopexit:                          ; preds = %319
  %267 = select i1 %.2206, i32 5, i32 %.0.lcssa
  br label %.loopexit271

268:                                              ; preds = %._crit_edge333
  %269 = landingpad { ptr, i32 }
          cleanup
  br label %375

270:                                              ; preds = %.lr.ph342, %319
  %.0200340 = phi ptr [ %263, %.lr.ph342 ], [ %320, %319 ]
  %.0204339 = phi i1 [ false, %.lr.ph342 ], [ %.2206, %319 ]
  %271 = load ptr, ptr %260, align 8, !tbaa !69
  %272 = load i32, ptr %.0200340, align 8, !tbaa !37
  %273 = zext i32 %272 to i64
  %274 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %271, i64 %273
  %275 = load i8, ptr %274, align 8, !tbaa !79
  %.not223 = icmp eq i8 %275, 6
  br i1 %.not223, label %319, label %276

276:                                              ; preds = %270
  %277 = load ptr, ptr %265, align 8, !tbaa !22
  %278 = getelementptr inbounds ptr, ptr %277, i64 %273
  %279 = load ptr, ptr %278, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %280 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %279)
  %281 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %279)
  %282 = load i8, ptr %281, align 8, !tbaa !38, !range !59, !noundef !60
  %283 = trunc nuw i8 %282 to i1
  invoke void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(56) %280, i1 noundef zeroext %283)
          to label %284 unwind label %290

284:                                              ; preds = %276
  %285 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %279)
          to label %286 unwind label %.loopexit.split-lp

286:                                              ; preds = %284
  %287 = load i64, ptr %266, align 8, !tbaa !80
  %288 = sub i64 %285, %287
  %.not355 = icmp eq i64 %285, %287
  br i1 %.not355, label %.loopexit272, label %.lr.ph337

.lr.ph337:                                        ; preds = %286
  %289 = getelementptr inbounds i8, ptr %.0200340, i64 8
  br label %293

290:                                              ; preds = %276
  %291 = landingpad { ptr, i32 }
          cleanup
  br label %318

.loopexit273:                                     ; preds = %293
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %292

.loopexit.split-lp:                               ; preds = %284, %298
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %292

292:                                              ; preds = %.loopexit.split-lp, %.loopexit273
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit273 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %318

293:                                              ; preds = %.lr.ph337, %316
  %.0193335 = phi i64 [ 0, %.lr.ph337 ], [ %317, %316 ]
  %294 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %279, i64 noundef %.0193335)
          to label %295 unwind label %.loopexit273

295:                                              ; preds = %293
  %296 = load ptr, ptr %289, align 8, !tbaa !35
  %297 = icmp eq ptr %294, %296
  br i1 %297, label %298, label %316

298:                                              ; preds = %295
  %299 = getelementptr inbounds i8, ptr %279, i64 144
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %299, i64 noundef %.0193335)
  %301 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %279)
          to label %302 unwind label %.loopexit.split-lp

302:                                              ; preds = %298
  %303 = load i64, ptr %266, align 8, !tbaa !80
  %304 = add i64 %303, 1
  store i64 %304, ptr %266, align 8, !tbaa !80
  %305 = sub i64 %301, %304
  %306 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %299, i64 noundef %305)
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %300, ptr noundef nonnull align 8 dereferenceable(8) %306) #7
  %307 = getelementptr inbounds i8, ptr %274, i64 8
  %308 = load i64, ptr %307, align 8, !tbaa !70
  %.not226 = icmp ne i64 %308, -1
  %309 = add nuw i64 %.0193335, 1
  %310 = icmp ult i64 %309, %308
  %or.cond255 = and i1 %.not226, %310
  br i1 %or.cond255, label %311, label %.loopexit272

311:                                              ; preds = %302
  %312 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %299, i64 noundef %.0193335)
  %313 = load i64, ptr %307, align 8, !tbaa !70
  %314 = add i64 %313, -1
  store i64 %314, ptr %307, align 8, !tbaa !70
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %299, i64 noundef %314)
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %312, ptr noundef nonnull align 8 dereferenceable(8) %315) #7
  br label %.loopexit272

316:                                              ; preds = %295
  %317 = add nuw i64 %.0193335, 1
  %exitcond.not = icmp eq i64 %317, %288
  br i1 %exitcond.not, label %.loopexit272, label %293, !llvm.loop !81

.loopexit272:                                     ; preds = %316, %286, %302, %311
  %.1205 = phi i1 [ true, %311 ], [ true, %302 ], [ %.0204339, %286 ], [ %.0204339, %316 ]
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %319

318:                                              ; preds = %292, %290
  %.pn224 = phi { ptr, i32 } [ %lpad.phi, %292 ], [ %291, %290 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %375

319:                                              ; preds = %.loopexit272, %270
  %.2206 = phi i1 [ %.1205, %.loopexit272 ], [ %.0204339, %270 ]
  %320 = getelementptr inbounds i8, ptr %.0200340, i64 16
  %.not221 = icmp eq ptr %320, %264
  br i1 %.not221, label %._crit_edge343.loopexit, label %270

321:                                              ; preds = %259, %255
  %322 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %323 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %.not219345 = icmp eq ptr %322, %323
  br i1 %.not219345, label %.loopexit271, label %.lr.ph348

.lr.ph348:                                        ; preds = %321
  %324 = getelementptr inbounds i8, ptr %0, i64 96
  %325 = getelementptr inbounds i8, ptr %0, i64 104
  br label %326

326:                                              ; preds = %.lr.ph348, %.loopexit
  %.0190346 = phi ptr [ %322, %.lr.ph348 ], [ %360, %.loopexit ]
  %327 = load ptr, ptr %324, align 8, !tbaa !22
  %328 = load i32, ptr %.0190346, align 8, !tbaa !37
  %329 = zext i32 %328 to i64
  %330 = getelementptr inbounds ptr, ptr %327, i64 %329
  %331 = load ptr, ptr %330, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %332 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN14VmaBlockVector8GetMutexEv(ptr noundef nonnull align 8 dereferenceable(181) %331)
  %333 = call noundef ptr @_ZNK14VmaBlockVector12GetAllocatorEv(ptr noundef nonnull align 8 dereferenceable(181) %331)
  %334 = load i8, ptr %333, align 8, !tbaa !38, !range !59, !noundef !60
  %335 = trunc nuw i8 %334 to i1
  invoke void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(56) %332, i1 noundef zeroext %335)
          to label %336 unwind label %343

336:                                              ; preds = %326
  %337 = load i64, ptr %325, align 8, !tbaa !80
  %338 = getelementptr inbounds i8, ptr %.0190346, i64 8
  br label %339

339:                                              ; preds = %358, %336
  %.0185 = phi i64 [ %337, %336 ], [ %359, %358 ]
  %340 = invoke noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %331)
          to label %341 unwind label %345

341:                                              ; preds = %339
  %342 = icmp ult i64 %.0185, %340
  br i1 %342, label %347, label %.loopexit

343:                                              ; preds = %326
  %344 = landingpad { ptr, i32 }
          cleanup
  br label %361

345:                                              ; preds = %347, %339
  %346 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %361

347:                                              ; preds = %341
  %348 = invoke noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %331, i64 noundef %.0185)
          to label %349 unwind label %345

349:                                              ; preds = %347
  %350 = load ptr, ptr %338, align 8, !tbaa !35
  %351 = icmp eq ptr %348, %350
  br i1 %351, label %352, label %358

352:                                              ; preds = %349
  %353 = getelementptr inbounds i8, ptr %331, i64 144
  %354 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %353, i64 noundef %.0185)
  %355 = load i64, ptr %325, align 8, !tbaa !80
  %356 = add i64 %355, 1
  store i64 %356, ptr %325, align 8, !tbaa !80
  %357 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(32) %353, i64 noundef %355)
  call void @_ZSt4swapIP20VmaDeviceMemoryBlockENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(8) %354, ptr noundef nonnull align 8 dereferenceable(8) %357) #7
  br label %.loopexit

358:                                              ; preds = %349
  %359 = add nuw i64 %.0185, 1
  br label %339, !llvm.loop !82

.loopexit:                                        ; preds = %341, %352
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %360 = getelementptr inbounds i8, ptr %.0190346, i64 16
  %.not219 = icmp eq ptr %360, %323
  br i1 %.not219, label %.loopexit271, label %326

361:                                              ; preds = %345, %343
  %.pn = phi { ptr, i32 } [ %346, %345 ], [ %344, %343 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %375

.loopexit271:                                     ; preds = %.loopexit, %262, %._crit_edge343.loopexit, %321, %243
  %.3 = phi i32 [ %.0.lcssa, %243 ], [ %.0.lcssa, %321 ], [ %.0.lcssa, %262 ], [ %267, %._crit_edge343.loopexit ], [ %.0.lcssa, %.loopexit ]
  %362 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %363 = call noundef ptr @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %.not222349 = icmp eq ptr %362, %363
  br i1 %.not222349, label %._crit_edge353, label %.lr.ph352

364:                                              ; preds = %370
  %365 = getelementptr inbounds i8, ptr %.0181350, i64 16
  %.not222 = icmp eq ptr %365, %363
  br i1 %.not222, label %._crit_edge353, label %.lr.ph352

._crit_edge353:                                   ; preds = %364, %.loopexit271
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 %.3

.lr.ph352:                                        ; preds = %.loopexit271, %364
  %.0181350 = phi ptr [ %365, %364 ], [ %362, %.loopexit271 ]
  %366 = getelementptr inbounds i8, ptr %.0181350, i64 8
  %367 = load ptr, ptr %366, align 8, !tbaa !35
  %368 = load i32, ptr %.0181350, align 8, !tbaa !37
  %369 = invoke noundef i32 @_ZN20VmaDeviceMemoryBlock3MapEP14VmaAllocator_TjPPv(ptr noundef nonnull align 8 dereferenceable(96) %367, ptr noundef %.0182.lcssa, i32 noundef %368, ptr noundef null)
          to label %370 unwind label %373

370:                                              ; preds = %.lr.ph352
  %371 = icmp eq i32 %369, 0
  br i1 %371, label %364, label %372

372:                                              ; preds = %370
  call void @__assert_fail(ptr noundef nonnull @.str.189, ptr noundef nonnull @.str.2, i32 noundef 13400, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T17DefragmentPassEndER30VmaDefragmentationPassMoveInfo) #6
  unreachable

373:                                              ; preds = %.lr.ph352
  %374 = landingpad { ptr, i32 }
          cleanup
  br label %375

375:                                              ; preds = %47, %128, %188, %193, %237, %107, %102, %75, %66, %202, %196, %194, %373, %361, %318, %268
  %.pn250.pn = phi { ptr, i32 } [ %.pn224, %318 ], [ %374, %373 ], [ %.pn, %361 ], [ %269, %268 ], [ %238, %237 ], [ %.pn231, %193 ], [ %48, %47 ], [ %.pn229, %188 ], [ %129, %128 ], [ %.pn243, %107 ], [ %67, %66 ], [ %.pn241, %102 ], [ %76, %75 ], [ %.pn233, %202 ], [ %197, %196 ], [ %195, %194 ]
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn250.pn
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIN27VmaDefragmentationContext_T15FragmentedBlockE15VmaStlAllocatorIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

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

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

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

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


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