; 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.VmaDefragmentationContext_T::MoveAllocationData" = type { i64, i64, i32, i32, %struct.VmaDefragmentationMove }
%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.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.VmaDefragmentationStats = type { i64, i64, i32, i32 }
%"struct.VmaDefragmentationContext_T::StateExtensive" = type { i8, i64 }
%class.VmaDeviceMemoryBlock = type { ptr, ptr, i32, i32, ptr, %class.VmaMutex, %class.VmaMappingHysteresis, i32, ptr }
%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.VmaMappingHysteresis = type { i32, i32, i32 }

@.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.192 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm = external hidden unnamed_addr constant [93 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84)) #2 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 zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181), ptr noundef) #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 nounwind uwtable
declare dso_local noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FullER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2) #3 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.VmaDefragmentationContext_T::MoveAllocationData", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  %21 = load ptr, ptr %5, align 8
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.VmaBlockVector, ptr %22, i32 0, i32 7
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = icmp eq i64 %24, 1
  br i1 %25, label %26, label %29

26:                                               ; preds = %3
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FullER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %27)
  store i1 %28, ptr %4, align 1
  br label %309

29:                                               ; preds = %3
  %30 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 14
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %34

33:                                               ; preds = %29
  br label %36

34:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.192, ptr noundef @.str.2, i32 noundef 13769, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %37 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 14
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %38, i64 %39
  store ptr %40, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 0, ptr %9, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  store i8 0, ptr %10, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  store i8 0, ptr %11, align 1, !tbaa !26
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %41, i32 0, i32 0
  %43 = load i8, ptr %42, align 8, !tbaa !27
  switch i8 %43, label %268 [
    i8 7, label %44
    i8 0, label %45
    i8 1, label %45
    i8 2, label %45
    i8 4, label %194
    i8 3, label %223
    i8 5, label %249
    i8 6, label %268
  ]

44:                                               ; preds = %36
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

45:                                               ; preds = %36, %36, %36
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %46, i32 0, i32 1
  %48 = load i64, ptr %47, align 8, !tbaa !30
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %50, label %55

50:                                               ; preds = %45
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %51, i32 0, i32 0
  store i8 6, ptr %52, align 8, !tbaa !27
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %53)
  store i1 %54, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

55:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %56, i32 0, i32 1
  %58 = load i64, ptr %57, align 8, !tbaa !30
  %59 = icmp eq i64 %58, -1
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = call noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %61)
  br label %67

63:                                               ; preds = %55
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %64, i32 0, i32 1
  %66 = load i64, ptr %65, align 8, !tbaa !30
  br label %67

67:                                               ; preds = %63, %60
  %68 = phi i64 [ %62, %60 ], [ %66, %63 ]
  %69 = sub i64 %68, 1
  store i64 %69, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i64, ptr %13, align 8, !tbaa !9
  %72 = call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %70, i64 noundef %71)
  %73 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !31
  store ptr %74, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %75 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %76 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %75)
  store i64 %76, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = load ptr, ptr %77, align 8, !tbaa !37
  %79 = getelementptr inbounds ptr, ptr %78, i64 11
  %80 = load ptr, ptr %79, align 8
  %81 = call noundef ptr %80(ptr noundef nonnull align 8 dereferenceable(33) %77)
  store ptr %81, ptr %16, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %123, %67
  %83 = load ptr, ptr %16, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 3, ptr %12, align 4
  br label %130

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN27VmaDefragmentationContext_T11GetMoveDataEP16VmaAllocHandle_TP16VmaBlockMetadata(ptr dead_on_unwind writable sret(%"struct.VmaDefragmentationContext_T::MoveAllocationData") align 8 %17, ptr noundef %87, ptr noundef %88)
  %89 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::MoveAllocationData", ptr %17, i32 0, i32 4
  %90 = getelementptr inbounds %struct.VmaDefragmentationMove, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !39
  %92 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %91)
  %93 = call noundef i32 @_ZN27VmaDefragmentationContext_T13CheckCountersEm(ptr noundef nonnull align 8 dereferenceable(168) %21, i64 noundef %92)
  switch i32 %93, label %96 [
    i32 1, label %94
    i32 2, label %95
    i32 0, label %97
  ]

94:                                               ; preds = %86
  store i32 5, ptr %12, align 4
  br label %120

95:                                               ; preds = %86
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %120

96:                                               ; preds = %86
  call void @__assert_fail(ptr noundef @.str.57, ptr noundef @.str.2, i32 noundef 13808, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

97:                                               ; preds = %86
  %98 = load i64, ptr %13, align 8, !tbaa !9
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T17AllocInOtherBlockEmmRNS_18MoveAllocationDataER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %21, i64 noundef 0, i64 noundef %98, ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(181) %99)
  br i1 %100, label %101, label %119

101:                                              ; preds = %97
  %102 = load i64, ptr %15, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %104 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %103)
  %105 = icmp ne i64 %102, %104
  br i1 %105, label %106, label %118

106:                                              ; preds = %101
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = load ptr, ptr %16, align 8, !tbaa !5
  %109 = load ptr, ptr %107, align 8, !tbaa !37
  %110 = getelementptr inbounds ptr, ptr %109, i64 12
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef ptr %111(ptr noundef nonnull align 8 dereferenceable(33) %107, ptr noundef %108)
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %118

114:                                              ; preds = %106
  %115 = load i64, ptr %13, align 8, !tbaa !9
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %116, i32 0, i32 1
  store i64 %115, ptr %117, align 8, !tbaa !30
  br label %118

118:                                              ; preds = %114, %106, %101
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %120

119:                                              ; preds = %97
  store i32 0, ptr %12, align 4
  br label %120

120:                                              ; preds = %119, %118, %95, %94
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #5
  %121 = load i32, ptr %12, align 4
  switch i32 %121, label %130 [
    i32 0, label %122
    i32 5, label %123
  ]

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122, %120
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = load ptr, ptr %124, align 8, !tbaa !37
  %127 = getelementptr inbounds ptr, ptr %126, i64 12
  %128 = load ptr, ptr %127, align 8
  %129 = call noundef ptr %128(ptr noundef nonnull align 8 dereferenceable(33) %124, ptr noundef %125)
  store ptr %129, ptr %16, align 8, !tbaa !5
  br label %82, !llvm.loop !44

130:                                              ; preds = %120, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %131 = load i32, ptr %12, align 4
  switch i32 %131, label %192 [
    i32 3, label %132
  ]

132:                                              ; preds = %130
  %133 = load i64, ptr %15, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %135 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %134)
  %136 = icmp eq i64 %133, %135
  br i1 %136, label %137, label %170

137:                                              ; preds = %132
  %138 = load i64, ptr %13, align 8, !tbaa !9
  %139 = icmp ne i64 %138, 0
  br i1 %139, label %140, label %161

140:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %141 = load i64, ptr %13, align 8, !tbaa !9
  %142 = sub i64 %141, 1
  store i64 %142, ptr %18, align 8, !tbaa !9
  br label %143

143:                                              ; preds = %155, %140
  %144 = load i64, ptr %18, align 8, !tbaa !9
  %145 = icmp ne i64 %144, 0
  br i1 %145, label %147, label %146

146:                                              ; preds = %143
  store i32 7, ptr %12, align 4
  br label %158

147:                                              ; preds = %143
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i64, ptr %18, align 8, !tbaa !9
  %151 = call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %149, i64 noundef %150)
  %152 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %148, ptr noundef %151)
  br i1 %152, label %153, label %154

153:                                              ; preds = %147
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %158

154:                                              ; preds = %147
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr %18, align 8, !tbaa !9
  %157 = add i64 %156, -1
  store i64 %157, ptr %18, align 8, !tbaa !9
  br label %143, !llvm.loop !46

158:                                              ; preds = %153, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %159 = load i32, ptr %12, align 4
  switch i32 %159, label %192 [
    i32 7, label %160
  ]

160:                                              ; preds = %158
  br label %161

161:                                              ; preds = %160, %137
  %162 = load i64, ptr %15, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %164 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %163)
  %165 = icmp eq i64 %162, %164
  br i1 %165, label %166, label %169

166:                                              ; preds = %161
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %167)
  store i1 %168, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %192

169:                                              ; preds = %161
  br label %191

170:                                              ; preds = %132
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %171, i32 0, i32 0
  %173 = load i8, ptr %172, align 8, !tbaa !27
  switch i8 %173, label %183 [
    i8 0, label %174
    i8 1, label %177
    i8 2, label %180
  ]

174:                                              ; preds = %170
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %175, i32 0, i32 0
  store i8 3, ptr %176, align 8, !tbaa !27
  br label %184

177:                                              ; preds = %170
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %178, i32 0, i32 0
  store i8 4, ptr %179, align 8, !tbaa !27
  br label %184

180:                                              ; preds = %170
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %181, i32 0, i32 0
  store i8 5, ptr %182, align 8, !tbaa !27
  br label %184

183:                                              ; preds = %170
  call void @__assert_fail(ptr noundef @.str.57, ptr noundef @.str.2, i32 noundef 13853, ptr noundef @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

184:                                              ; preds = %180, %177, %174
  %185 = load i64, ptr %13, align 8, !tbaa !9
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %186, i32 0, i32 1
  store i64 %185, ptr %187, align 8, !tbaa !30
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = load i64, ptr %7, align 8, !tbaa !9
  %190 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %188, i64 noundef %189)
  store i1 %190, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %192

191:                                              ; preds = %169
  store i32 2, ptr %12, align 4
  br label %192

192:                                              ; preds = %191, %184, %166, %158, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %193 = load i32, ptr %12, align 4
  switch i32 %193, label %308 [
    i32 2, label %268
  ]

194:                                              ; preds = %36
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %196, i32 0, i32 1
  %198 = load i64, ptr %197, align 8, !tbaa !30
  %199 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %21, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(181) %195, i64 noundef %198, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
  br i1 %199, label %200, label %221

200:                                              ; preds = %194
  %201 = load i8, ptr %9, align 1, !tbaa !26, !range !47, !noundef !48
  %202 = trunc i8 %201 to i1
  br i1 %202, label %203, label %209

203:                                              ; preds = %200
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %204, i32 0, i32 0
  store i8 1, ptr %205, align 8, !tbaa !27
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = load i64, ptr %7, align 8, !tbaa !9
  %208 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %206, i64 noundef %207)
  store i1 %208, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

209:                                              ; preds = %200
  %210 = load i8, ptr %10, align 1, !tbaa !26, !range !47, !noundef !48
  %211 = trunc i8 %210 to i1
  br i1 %211, label %218, label %212

212:                                              ; preds = %209
  %213 = load i8, ptr %11, align 1, !tbaa !26, !range !47, !noundef !48
  %214 = trunc i8 %213 to i1
  br i1 %214, label %218, label %215

215:                                              ; preds = %212
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %216, i32 0, i32 0
  store i8 6, ptr %217, align 8, !tbaa !27
  br label %268

218:                                              ; preds = %212, %209
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %219, i32 0, i32 0
  store i8 3, ptr %220, align 8, !tbaa !27
  store i8 0, ptr %10, align 1, !tbaa !26
  store i8 0, ptr %11, align 1, !tbaa !26
  br label %222

221:                                              ; preds = %194
  br label %268

222:                                              ; preds = %218
  br label %223

223:                                              ; preds = %222, %36
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = load ptr, ptr %8, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %225, i32 0, i32 1
  %227 = load i64, ptr %226, align 8, !tbaa !30
  %228 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %21, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(181) %224, i64 noundef %227, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
  br i1 %228, label %229, label %247

229:                                              ; preds = %223
  %230 = load i8, ptr %10, align 1, !tbaa !26, !range !47, !noundef !48
  %231 = trunc i8 %230 to i1
  br i1 %231, label %232, label %238

232:                                              ; preds = %229
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %233, i32 0, i32 0
  store i8 0, ptr %234, align 8, !tbaa !27
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = load i64, ptr %7, align 8, !tbaa !9
  %237 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %235, i64 noundef %236)
  store i1 %237, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

238:                                              ; preds = %229
  %239 = load i8, ptr %11, align 1, !tbaa !26, !range !47, !noundef !48
  %240 = trunc i8 %239 to i1
  br i1 %240, label %244, label %241

241:                                              ; preds = %238
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %242, i32 0, i32 0
  store i8 6, ptr %243, align 8, !tbaa !27
  br label %268

244:                                              ; preds = %238
  %245 = load ptr, ptr %8, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %245, i32 0, i32 0
  store i8 5, ptr %246, align 8, !tbaa !27
  store i8 0, ptr %11, align 1, !tbaa !26
  br label %248

247:                                              ; preds = %223
  br label %268

248:                                              ; preds = %244
  br label %249

249:                                              ; preds = %248, %36
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = load ptr, ptr %8, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %251, i32 0, i32 1
  %253 = load i64, ptr %252, align 8, !tbaa !30
  %254 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %21, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(181) %250, i64 noundef %253, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
  br i1 %254, label %255, label %267

255:                                              ; preds = %249
  %256 = load i8, ptr %11, align 1, !tbaa !26, !range !47, !noundef !48
  %257 = trunc i8 %256 to i1
  br i1 %257, label %258, label %264

258:                                              ; preds = %255
  %259 = load ptr, ptr %8, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %259, i32 0, i32 0
  store i8 0, ptr %260, align 8, !tbaa !27
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = load i64, ptr %7, align 8, !tbaa !9
  %263 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %261, i64 noundef %262)
  store i1 %263, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

264:                                              ; preds = %255
  %265 = load ptr, ptr %8, align 8, !tbaa !5
  %266 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %265, i32 0, i32 0
  store i8 6, ptr %266, align 8, !tbaa !27
  br label %267

267:                                              ; preds = %264, %249
  br label %268

268:                                              ; preds = %267, %247, %241, %221, %215, %192, %36, %36
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %269, i32 0, i32 0
  %271 = load i8, ptr %270, align 8, !tbaa !27
  %272 = icmp eq i8 %271, 6
  br i1 %272, label %273, label %307

273:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %274 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %275 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %274)
  store i64 %275, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %276

276:                                              ; preds = %290, %273
  %277 = load i64, ptr %20, align 8, !tbaa !9
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = call noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %278)
  %280 = icmp ult i64 %277, %279
  br i1 %280, label %282, label %281

281:                                              ; preds = %276
  store i32 11, ptr %12, align 4
  br label %293

282:                                              ; preds = %276
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = load i64, ptr %20, align 8, !tbaa !9
  %286 = call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %284, i64 noundef %285)
  %287 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168) %21, ptr noundef nonnull align 8 dereferenceable(181) %283, ptr noundef %286)
  br i1 %287, label %288, label %289

288:                                              ; preds = %282
  store i1 true, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %293

289:                                              ; preds = %282
  br label %290

290:                                              ; preds = %289
  %291 = load i64, ptr %20, align 8, !tbaa !9
  %292 = add i64 %291, 1
  store i64 %292, ptr %20, align 8, !tbaa !9
  br label %276, !llvm.loop !49

293:                                              ; preds = %288, %281
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %294 = load i32, ptr %12, align 4
  switch i32 %294, label %304 [
    i32 11, label %295
  ]

295:                                              ; preds = %293
  %296 = load i64, ptr %19, align 8, !tbaa !9
  %297 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %21, i32 0, i32 5
  %298 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %297)
  %299 = icmp eq i64 %296, %298
  br i1 %299, label %300, label %303

300:                                              ; preds = %295
  %301 = load ptr, ptr %8, align 8, !tbaa !5
  %302 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %301, i32 0, i32 0
  store i8 7, ptr %302, align 8, !tbaa !27
  br label %303

303:                                              ; preds = %300, %295
  store i32 0, ptr %12, align 4
  br label %304

304:                                              ; preds = %303, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %305 = load i32, ptr %12, align 4
  switch i32 %305, label %308 [
    i32 0, label %306
  ]

306:                                              ; preds = %304
  br label %307

307:                                              ; preds = %306, %268
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %308

308:                                              ; preds = %307, %304, %258, %232, %203, %192, %50, %44
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %309

309:                                              ; preds = %308, %26
  %310 = load i1, ptr %4, align 1
  ret i1 %310
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN27VmaDefragmentationContext_T11GetMoveDataEP16VmaAllocHandle_TP16VmaBlockMetadata(ptr dead_on_unwind noalias writable sret(%"struct.VmaDefragmentationContext_T::MoveAllocationData") align 8, ptr noundef, ptr noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, ptr noundef nonnull align 8 dereferenceable(181), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

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

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

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


; 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.VmaDefragmentationContext_T::MoveAllocationData" = type { i64, i64, i32, i32, %struct.VmaDefragmentationMove }
%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.192 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm = external hidden unnamed_addr constant [93 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181), ptr noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FullER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(181)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2) local_unnamed_addr #3 align 2 {
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %"struct.VmaDefragmentationContext_T::MoveAllocationData", align 8
  %8 = getelementptr inbounds i8, ptr %1, i64 48
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i64 %9, 1
  br i1 %10, label %11, label %13

11:                                               ; preds = %3
  %12 = tail call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FullER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1)
  br label %129

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %16, label %17

16:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.192, ptr noundef nonnull @.str.2, i32 noundef 13769, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

17:                                               ; preds = %13
  %18 = getelementptr inbounds %"struct.VmaDefragmentationContext_T::StateExtensive", ptr %15, i64 %2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  store i8 0, ptr %4, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  store i8 0, ptr %5, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  store i8 0, ptr %6, align 1, !tbaa !24
  %19 = load i8, ptr %18, align 8, !tbaa !25
  switch i8 %19, label %115 [
    i8 7, label %.critedge104
    i8 0, label %20
    i8 1, label %20
    i8 2, label %20
    i8 4, label %77
    i8 3, label %93
    i8 5, label %106
  ]

20:                                               ; preds = %17, %17, %17
  %21 = getelementptr inbounds i8, ptr %18, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !28
  switch i64 %22, label %27 [
    i64 0, label %23
    i64 -1, label %25
  ]

23:                                               ; preds = %20
  store i8 6, ptr %18, align 8, !tbaa !25
  %24 = tail call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1)
  br label %.critedge104

25:                                               ; preds = %20
  %26 = tail call noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %1)
  br label %27

27:                                               ; preds = %20, %25
  %28 = phi i64 [ %26, %25 ], [ %22, %20 ]
  %29 = add i64 %28, -1
  %30 = tail call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %29)
  %31 = load ptr, ptr %30, align 8, !tbaa !29
  %32 = getelementptr inbounds i8, ptr %0, i64 40
  %33 = tail call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
  %34 = load ptr, ptr %31, align 8, !tbaa !35
  %35 = getelementptr inbounds i8, ptr %34, i64 88
  %36 = load ptr, ptr %35, align 8
  %37 = tail call noundef ptr %36(ptr noundef nonnull align 8 dereferenceable(33) %31)
  %.not96120 = icmp eq ptr %37, null
  br i1 %.not96120, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %27
  %38 = getelementptr inbounds i8, ptr %7, i64 32
  br label %39

39:                                               ; preds = %.lr.ph, %55
  %.085121 = phi ptr [ %37, %.lr.ph ], [ %59, %55 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #5
  call void @_ZN27VmaDefragmentationContext_T11GetMoveDataEP16VmaAllocHandle_TP16VmaBlockMetadata(ptr dead_on_unwind nonnull writable sret(%"struct.VmaDefragmentationContext_T::MoveAllocationData") align 8 %7, ptr noundef nonnull %.085121, ptr noundef nonnull %31)
  %40 = load ptr, ptr %38, align 8, !tbaa !37
  %41 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %40)
  %42 = call noundef i32 @_ZN27VmaDefragmentationContext_T13CheckCountersEm(ptr noundef nonnull align 8 dereferenceable(168) %0, i64 noundef %41)
  switch i32 %42, label %43 [
    i32 1, label %55
    i32 2, label %.loopexit
    i32 0, label %44
  ]

43:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.2, i32 noundef 13808, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

44:                                               ; preds = %39
  %45 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T17AllocInOtherBlockEmmRNS_18MoveAllocationDataER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %0, i64 noundef 0, i64 noundef %29, ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(181) %1)
  br i1 %45, label %46, label %55

46:                                               ; preds = %44
  %47 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
  %.not97 = icmp eq i64 %33, %47
  br i1 %.not97, label %.loopexit, label %48

48:                                               ; preds = %46
  %49 = load ptr, ptr %31, align 8, !tbaa !35
  %50 = getelementptr inbounds i8, ptr %49, i64 96
  %51 = load ptr, ptr %50, align 8
  %52 = call noundef ptr %51(ptr noundef nonnull align 8 dereferenceable(33) %31, ptr noundef nonnull %.085121)
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %.loopexit

54:                                               ; preds = %48
  store i64 %29, ptr %21, align 8, !tbaa !28
  br label %.loopexit

55:                                               ; preds = %39, %44
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  %56 = load ptr, ptr %31, align 8, !tbaa !35
  %57 = getelementptr inbounds i8, ptr %56, i64 96
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef ptr %58(ptr noundef nonnull align 8 dereferenceable(33) %31, ptr noundef nonnull %.085121)
  %.not96 = icmp eq ptr %59, null
  br i1 %.not96, label %.critedge, label %39, !llvm.loop !42

.loopexit:                                        ; preds = %39, %54, %48, %46
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  br label %.critedge104

.critedge:                                        ; preds = %55, %27
  %60 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
  %61 = icmp eq i64 %33, %60
  br i1 %61, label %62, label %72

62:                                               ; preds = %.critedge
  %or.cond = icmp ult i64 %29, 2
  br i1 %or.cond, label %.critedge102, label %.lr.ph124.preheader

.lr.ph124.preheader:                              ; preds = %62
  %63 = add i64 %28, -2
  br label %.lr.ph124

64:                                               ; preds = %.lr.ph124
  %65 = add i64 %.084123, -1
  %.not99 = icmp eq i64 %65, 0
  br i1 %.not99, label %.critedge102, label %.lr.ph124, !llvm.loop !44

.lr.ph124:                                        ; preds = %.lr.ph124.preheader, %64
  %.084123 = phi i64 [ %65, %64 ], [ %63, %.lr.ph124.preheader ]
  %66 = call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %.084123)
  %67 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, ptr noundef %66)
  br i1 %67, label %.critedge104, label %64

.critedge102:                                     ; preds = %64, %62
  %68 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
  %69 = icmp eq i64 %33, %68
  br i1 %69, label %70, label %thread-pre-split

70:                                               ; preds = %.critedge102
  %71 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T27ComputeDefragmentation_FastER14VmaBlockVector(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1)
  br label %.critedge104

72:                                               ; preds = %.critedge
  %73 = load i8, ptr %18, align 8, !tbaa !25
  %74 = icmp ult i8 %73, 3
  br i1 %74, label %switch.lookup, label %75

75:                                               ; preds = %72
  call void @__assert_fail(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.2, i32 noundef 13853, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm) #4
  unreachable

switch.lookup:                                    ; preds = %72
  %switch.offset = add nuw nsw i8 %73, 3
  store i8 %switch.offset, ptr %18, align 8, !tbaa !25
  store i64 %29, ptr %21, align 8, !tbaa !28
  %76 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2)
  br label %.critedge104

77:                                               ; preds = %17
  %78 = getelementptr inbounds i8, ptr %18, i64 8
  %79 = load i64, ptr %78, align 8, !tbaa !28
  %80 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %79, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br i1 %80, label %81, label %thread-pre-split

81:                                               ; preds = %77
  %82 = load i8, ptr %4, align 1, !tbaa !24, !range !45, !noundef !46
  %83 = trunc nuw i8 %82 to i1
  br i1 %83, label %84, label %86

84:                                               ; preds = %81
  store i8 1, ptr %18, align 8, !tbaa !25
  %85 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2)
  br label %.critedge104

86:                                               ; preds = %81
  %87 = load i8, ptr %5, align 1, !tbaa !24, !range !45, !noundef !46
  %88 = trunc nuw i8 %87 to i1
  br i1 %88, label %92, label %89

89:                                               ; preds = %86
  %90 = load i8, ptr %6, align 1, !tbaa !24, !range !45, !noundef !46
  %91 = trunc nuw i8 %90 to i1
  br i1 %91, label %92, label %.thread111.sink.split

92:                                               ; preds = %89, %86
  store i8 3, ptr %18, align 8, !tbaa !25
  store i8 0, ptr %5, align 1, !tbaa !24
  store i8 0, ptr %6, align 1, !tbaa !24
  br label %93

93:                                               ; preds = %92, %17
  %94 = getelementptr inbounds i8, ptr %18, i64 8
  %95 = load i64, ptr %94, align 8, !tbaa !28
  %96 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %95, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br i1 %96, label %97, label %thread-pre-split

97:                                               ; preds = %93
  %98 = load i8, ptr %5, align 1, !tbaa !24, !range !45, !noundef !46
  %99 = trunc nuw i8 %98 to i1
  br i1 %99, label %100, label %102

100:                                              ; preds = %97
  store i8 0, ptr %18, align 8, !tbaa !25
  %101 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2)
  br label %.critedge104

102:                                              ; preds = %97
  %103 = load i8, ptr %6, align 1, !tbaa !24, !range !45, !noundef !46
  %104 = trunc nuw i8 %103 to i1
  br i1 %104, label %105, label %.thread111.sink.split

105:                                              ; preds = %102
  store i8 5, ptr %18, align 8, !tbaa !25
  store i8 0, ptr %6, align 1, !tbaa !24
  br label %106

106:                                              ; preds = %105, %17
  %107 = getelementptr inbounds i8, ptr %18, i64 8
  %108 = load i64, ptr %107, align 8, !tbaa !28
  %109 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %108, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br i1 %109, label %110, label %thread-pre-split

110:                                              ; preds = %106
  %111 = load i8, ptr %6, align 1, !tbaa !24, !range !45, !noundef !46
  %112 = trunc nuw i8 %111 to i1
  br i1 %112, label %113, label %.thread111.sink.split

113:                                              ; preds = %110
  store i8 0, ptr %18, align 8, !tbaa !25
  %114 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T32ComputeDefragmentation_ExtensiveER14VmaBlockVectorm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %2)
  br label %.critedge104

thread-pre-split:                                 ; preds = %77, %93, %106, %.critedge102
  %.pr = load i8, ptr %18, align 8, !tbaa !25
  br label %115

115:                                              ; preds = %thread-pre-split, %17
  %116 = phi i8 [ %.pr, %thread-pre-split ], [ %19, %17 ]
  %117 = icmp eq i8 %116, 6
  br i1 %117, label %.thread111, label %.critedge104

.thread111.sink.split:                            ; preds = %110, %102, %89
  store i8 6, ptr %18, align 8, !tbaa !25
  br label %.thread111

.thread111:                                       ; preds = %.thread111.sink.split, %115
  %118 = getelementptr inbounds i8, ptr %0, i64 40
  %119 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %118)
  %120 = call noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %1)
  %.not100.not125.not = icmp eq i64 %120, 0
  br i1 %.not100.not125.not, label %._crit_edge, label %.lr.ph127

121:                                              ; preds = %.lr.ph127
  %122 = add nuw i64 %.0126, 1
  %123 = call noundef i64 @_ZNK14VmaBlockVector13GetBlockCountEv(ptr noundef nonnull align 8 dereferenceable(181) %1)
  %.not100.not = icmp ult i64 %122, %123
  br i1 %.not100.not, label %.lr.ph127, label %._crit_edge, !llvm.loop !47

.lr.ph127:                                        ; preds = %.thread111, %121
  %.0126 = phi i64 [ %122, %121 ], [ 0, %.thread111 ]
  %124 = call noundef ptr @_ZNK14VmaBlockVector8GetBlockEm(ptr noundef nonnull align 8 dereferenceable(181) %1, i64 noundef %.0126)
  %125 = call noundef zeroext i1 @_ZN27VmaDefragmentationContext_T18ReallocWithinBlockER14VmaBlockVectorP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(181) %1, ptr noundef %124)
  br i1 %125, label %.critedge104, label %121

._crit_edge:                                      ; preds = %121, %.thread111
  %126 = call noundef i64 @_ZNK9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %118)
  %127 = icmp eq i64 %119, %126
  br i1 %127, label %128, label %.critedge104

128:                                              ; preds = %._crit_edge
  store i8 7, ptr %18, align 8, !tbaa !25
  br label %.critedge104

.critedge104:                                     ; preds = %.lr.ph124, %.lr.ph127, %.loopexit, %switch.lookup, %70, %115, %._crit_edge, %128, %17, %113, %100, %84, %23
  %.8 = phi i1 [ %114, %113 ], [ %101, %100 ], [ %85, %84 ], [ %24, %23 ], [ false, %17 ], [ false, %128 ], [ false, %._crit_edge ], [ false, %115 ], [ true, %.loopexit ], [ %76, %switch.lookup ], [ %71, %70 ], [ true, %.lr.ph127 ], [ true, %.lr.ph124 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %129

129:                                              ; preds = %.critedge104, %11
  %.9 = phi i1 [ %12, %11 ], [ %.8, %.critedge104 ]
  ret i1 %.9
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN27VmaDefragmentationContext_T11GetMoveDataEP16VmaAllocHandle_TP16VmaBlockMetadata(ptr dead_on_unwind noalias writable sret(%"struct.VmaDefragmentationContext_T::MoveAllocationData") align 8, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN27VmaDefragmentationContext_T20MoveDataToFreeBlocksE20VmaSuballocationTypeR14VmaBlockVectormRbS3_S3_(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, ptr noundef nonnull align 8 dereferenceable(181), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { noreturn nounwind }
attributes #5 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass