; LLVM IR from khushmmehta/Scorch-V :: src/ScorchVkEngine/Abstractions (VulkanMemoryAllocator)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector4FreeEP15VmaAllocation_T = external hidden unnamed_addr constant [47 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

declare i32 @__gxx_personality_v0(...)

; 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 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 #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN20VmaCurrentBudgetData16RemoveAllocationEjm(ptr noundef nonnull align 8 dereferenceable(832), i32 noundef, i64 noundef) #2 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10vma_deleteI20VmaDeviceMemoryBlockEvP14VmaAllocator_TPT_(ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca %struct.VmaBudget, align 8
  %9 = alloca %struct.VmaMutexLockWrite, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %18 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !21
  %22 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %19, i32 noundef %21)
  store i32 %22, ptr %7, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 40, i1 false)
  %23 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i32, ptr %7, align 4, !tbaa !22
  call void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %24, ptr noundef %8, i32 noundef %25, i32 noundef 1)
  %26 = getelementptr inbounds %struct.VmaBudget, ptr %8, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !23
  %28 = getelementptr inbounds %struct.VmaBudget, ptr %8, i32 0, i32 2
  %29 = load i64, ptr %28, align 8, !tbaa !26
  %30 = icmp uge i64 %27, %29
  %31 = zext i1 %30 to i8
  store i8 %31, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %32 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 15
  %33 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.VmaAllocator_T, ptr %34, i32 0, i32 0
  %36 = load i8, ptr %35, align 8, !tbaa !27, !range !48, !noundef !49
  %37 = trunc i8 %36 to i1
  call void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(56) %32, i1 noundef zeroext %37)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = invoke noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %38)
          to label %40 unwind label %60

40:                                               ; preds = %2
  store ptr %39, ptr %10, align 8, !tbaa !5
  %41 = call noundef zeroext i1 @_ZNK14VmaBlockVector28IsCorruptionDetectionEnabledEv(ptr noundef nonnull align 8 dereferenceable(181) %17)
  br i1 %41, label %42, label %70

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = invoke noundef i64 @_ZNK15VmaAllocation_T9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(84) %46)
          to label %48 unwind label %64

48:                                               ; preds = %42
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = invoke noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %49)
          to label %51 unwind label %64

51:                                               ; preds = %48
  %52 = call noundef i32 @_ZN20VmaDeviceMemoryBlock33ValidateMagicValueAfterAllocationEP14VmaAllocator_Tmm(ptr noundef nonnull align 8 dereferenceable(96) %43, ptr noundef %45, i64 noundef %47, i64 noundef %50)
  store i32 %52, ptr %13, align 4, !tbaa !50
  %53 = load i32, ptr %13, align 4, !tbaa !50
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  br label %56

56:                                               ; preds = %55, %51
  %57 = phi i1 [ false, %51 ], [ true, %55 ]
  br i1 %57, label %58, label %59

58:                                               ; preds = %56
  br label %69

59:                                               ; preds = %56
  call void @__assert_fail(ptr noundef @.str.182, ptr noundef @.str.2, i32 noundef 12725, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaBlockVector4FreeEP15VmaAllocation_T) #6
  unreachable

60:                                               ; preds = %74, %70, %2
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  br label %175

64:                                               ; preds = %48, %42
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %11, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %175

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %70

70:                                               ; preds = %69, %40
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = invoke noundef zeroext i1 @_ZNK15VmaAllocation_T15IsPersistentMapEv(ptr noundef nonnull align 8 dereferenceable(84) %71)
          to label %73 unwind label %60

73:                                               ; preds = %70
  br i1 %72, label %74, label %79

74:                                               ; preds = %73
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  invoke void @_ZN20VmaDeviceMemoryBlock5UnmapEP14VmaAllocator_Tj(ptr noundef nonnull align 8 dereferenceable(96) %75, ptr noundef %77, i32 noundef 1)
          to label %78 unwind label %60

78:                                               ; preds = %74
  br label %79

79:                                               ; preds = %78, %73
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %80 = invoke noundef zeroext i1 @_ZN14VmaBlockVector13HasEmptyBlockEv(ptr noundef nonnull align 8 dereferenceable(181) %17)
          to label %81 unwind label %124

81:                                               ; preds = %79
  %82 = zext i1 %80 to i8
  store i8 %82, ptr %14, align 1, !tbaa !9
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !52
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call noundef ptr @_ZNK15VmaAllocation_T14GetAllocHandleEv(ptr noundef nonnull align 8 dereferenceable(84) %86)
  %88 = load ptr, ptr %85, align 8, !tbaa !55
  %89 = getelementptr inbounds ptr, ptr %88, i64 20
  %90 = load ptr, ptr %89, align 8
  invoke void %90(ptr noundef nonnull align 8 dereferenceable(33) %85, ptr noundef %87)
          to label %91 unwind label %124

91:                                               ; preds = %81
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  invoke void @_ZN20VmaDeviceMemoryBlock8PostFreeEP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %92, ptr noundef %94)
          to label %95 unwind label %124

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %96 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 16
  %97 = invoke noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %96)
          to label %98 unwind label %128

98:                                               ; preds = %95
  %99 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 5
  %100 = load i64, ptr %99, align 8, !tbaa !57
  %101 = icmp ugt i64 %97, %100
  %102 = zext i1 %101 to i8
  store i8 %102, ptr %15, align 1, !tbaa !9
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !52
  %106 = load ptr, ptr %105, align 8, !tbaa !55
  %107 = getelementptr inbounds ptr, ptr %106, i64 7
  %108 = load ptr, ptr %107, align 8
  %109 = invoke noundef zeroext i1 %108(ptr noundef nonnull align 8 dereferenceable(33) %105)
          to label %110 unwind label %128

110:                                              ; preds = %98
  br i1 %109, label %111, label %133

111:                                              ; preds = %110
  %112 = load i8, ptr %14, align 1, !tbaa !9, !range !48, !noundef !49
  %113 = trunc i8 %112 to i1
  br i1 %113, label %117, label %114

114:                                              ; preds = %111
  %115 = load i8, ptr %6, align 1, !tbaa !9, !range !48, !noundef !49
  %116 = trunc i8 %115 to i1
  br i1 %116, label %117, label %132

117:                                              ; preds = %114, %111
  %118 = load i8, ptr %15, align 1, !tbaa !9, !range !48, !noundef !49
  %119 = trunc i8 %118 to i1
  br i1 %119, label %120, label %132

120:                                              ; preds = %117
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %121, ptr %5, align 8, !tbaa !5
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN14VmaBlockVector6RemoveEP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(181) %17, ptr noundef %122)
          to label %123 unwind label %128

123:                                              ; preds = %120
  br label %132

124:                                              ; preds = %91, %81, %79
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %11, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %12, align 4
  br label %174

128:                                              ; preds = %162, %120, %98, %95
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %11, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %12, align 4
  br label %173

132:                                              ; preds = %123, %117, %114
  br label %162

133:                                              ; preds = %110
  %134 = load i8, ptr %14, align 1, !tbaa !9, !range !48, !noundef !49
  %135 = trunc i8 %134 to i1
  br i1 %135, label %136, label %161

136:                                              ; preds = %133
  %137 = load i8, ptr %15, align 1, !tbaa !9, !range !48, !noundef !49
  %138 = trunc i8 %137 to i1
  br i1 %138, label %139, label %161

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %140 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 16
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %140)
          to label %142 unwind label %156

142:                                              ; preds = %139
  %143 = load ptr, ptr %141, align 8, !tbaa !5
  store ptr %143, ptr %16, align 8, !tbaa !5
  %144 = load ptr, ptr %16, align 8, !tbaa !5
  %145 = getelementptr inbounds %class.VmaDeviceMemoryBlock, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !52
  %147 = load ptr, ptr %146, align 8, !tbaa !55
  %148 = getelementptr inbounds ptr, ptr %147, i64 7
  %149 = load ptr, ptr %148, align 8
  %150 = invoke noundef zeroext i1 %149(ptr noundef nonnull align 8 dereferenceable(33) %146)
          to label %151 unwind label %156

151:                                              ; preds = %142
  br i1 %150, label %152, label %160

152:                                              ; preds = %151
  %153 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %153, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 16
  invoke void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %154)
          to label %155 unwind label %156

155:                                              ; preds = %152
  br label %160

156:                                              ; preds = %152, %142, %139
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %11, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %173

160:                                              ; preds = %155, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %161

161:                                              ; preds = %160, %136, %133
  br label %162

162:                                              ; preds = %161, %132
  invoke void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %17)
          to label %163 unwind label %128

163:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %176

166:                                              ; preds = %163
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !11
  call void @_ZN20VmaDeviceMemoryBlock7DestroyEP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %167, ptr noundef %169)
  %170 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZL10vma_deleteI20VmaDeviceMemoryBlockEvP14VmaAllocator_TPT_(ptr noundef %171, ptr noundef %172)
  br label %176

173:                                              ; preds = %156, %128
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %174

174:                                              ; preds = %173, %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %175

175:                                              ; preds = %174, %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %191

176:                                              ; preds = %166, %163
  %177 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  %179 = getelementptr inbounds %struct.VmaAllocator_T, ptr %178, i32 0, i32 23
  %180 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 2
  %183 = load i32, ptr %182, align 8, !tbaa !21
  %184 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %181, i32 noundef %183)
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %185)
  call void @_ZN20VmaCurrentBudgetData16RemoveAllocationEjm(ptr noundef nonnull align 8 dereferenceable(832) %179, i32 noundef %184, i64 noundef %186)
  %187 = getelementptr inbounds %class.VmaBlockVector, ptr %17, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !11
  %189 = getelementptr inbounds %struct.VmaAllocator_T, ptr %188, i32 0, i32 16
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN28VmaAllocationObjectAllocator4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(88) %189, ptr noundef %190)
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

191:                                              ; preds = %175
  %192 = load ptr, ptr %11, align 8
  %193 = load i32, ptr %12, align 4
  %194 = insertvalue { ptr, i32 } poison, ptr %192, 0
  %195 = insertvalue { ptr, i32 } %194, i32 %193, 1
  resume { ptr, i32 } %195
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32)) #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.VmaBudget = type { %struct.VmaStatistics, i64, i64 }
%struct.VmaStatistics = type { i32, i32, i64, i64 }
%struct.VmaMutexLockWrite = type { ptr }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaBlockVector4FreeEP15VmaAllocation_T = external hidden unnamed_addr constant [47 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 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 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 #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN20VmaCurrentBudgetData16RemoveAllocationEjm(ptr noundef nonnull align 8 dereferenceable(832), i32 noundef, i64 noundef) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN20VmaDeviceMemoryBlock33ValidateMagicValueAfterAllocationEP14VmaAllocator_Tmm(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i64 noundef, i64 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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10vma_deleteI20VmaDeviceMemoryBlockEvP14VmaAllocator_TPT_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14VmaBlockVector4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.VmaBudget, align 8
  %4 = alloca %struct.VmaMutexLockWrite, align 8
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load i32, ptr %6, align 8, !tbaa !19
  %8 = tail call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %5, i32 noundef %7)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, i8 0, i64 40, i1 false)
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN14VmaAllocator_T14GetHeapBudgetsEP9VmaBudgetjj(ptr noundef nonnull align 8 dereferenceable(5916) %9, ptr noundef nonnull %3, i32 noundef %8, i32 noundef 1)
  %10 = getelementptr inbounds i8, ptr %3, i64 24
  %11 = load i64, ptr %10, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %3, i64 32
  %13 = load i64, ptr %12, align 8, !tbaa !23
  %.not = icmp ult i64 %11, %13
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = load i8, ptr %15, align 8, !tbaa !24, !range !45, !noundef !46
  %17 = trunc nuw i8 %16 to i1
  call void @_ZN17VmaMutexLockWriteC2ER10VmaRWMutexb(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(56) %14, i1 noundef zeroext %17)
  %18 = call noundef ptr @_ZNK15VmaAllocation_T8GetBlockEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  %19 = call noundef zeroext i1 @_ZNK14VmaBlockVector28IsCorruptionDetectionEnabledEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
  br i1 %19, label %20, label %32

20:                                               ; preds = %2
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = invoke noundef i64 @_ZNK15VmaAllocation_T9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
          to label %23 unwind label %30

23:                                               ; preds = %20
  %24 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  %25 = call noundef i32 @_ZN20VmaDeviceMemoryBlock33ValidateMagicValueAfterAllocationEP14VmaAllocator_Tmm(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %21, i64 noundef %22, i64 noundef %24)
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %32, label %27

27:                                               ; preds = %23
  call void @__assert_fail(ptr noundef nonnull @.str.182, ptr noundef nonnull @.str.2, i32 noundef 12725, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaBlockVector4FreeEP15VmaAllocation_T) #6
  unreachable

28:                                               ; preds = %34
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %82

30:                                               ; preds = %20
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %82

32:                                               ; preds = %23, %2
  %33 = call noundef zeroext i1 @_ZNK15VmaAllocation_T15IsPersistentMapEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  br i1 %33, label %34, label %36

34:                                               ; preds = %32
  %35 = load ptr, ptr %0, align 8, !tbaa !5
  invoke void @_ZN20VmaDeviceMemoryBlock5UnmapEP14VmaAllocator_Tj(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %35, i32 noundef 1)
          to label %36 unwind label %28

36:                                               ; preds = %34, %32
  %37 = invoke noundef zeroext i1 @_ZN14VmaBlockVector13HasEmptyBlockEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
          to label %38 unwind label %60

38:                                               ; preds = %36
  %39 = load ptr, ptr %18, align 8, !tbaa !47
  %40 = call noundef ptr @_ZNK15VmaAllocation_T14GetAllocHandleEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  %41 = load ptr, ptr %39, align 8, !tbaa !50
  %42 = getelementptr inbounds i8, ptr %41, i64 160
  %43 = load ptr, ptr %42, align 8
  invoke void %43(ptr noundef nonnull align 8 dereferenceable(33) %39, ptr noundef %40)
          to label %44 unwind label %60

44:                                               ; preds = %38
  %45 = load ptr, ptr %0, align 8, !tbaa !5
  invoke void @_ZN20VmaDeviceMemoryBlock8PostFreeEP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %45)
          to label %46 unwind label %60

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %0, i64 144
  %48 = call noundef i64 @_ZNK9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %47)
  %49 = getelementptr inbounds i8, ptr %0, i64 32
  %50 = load i64, ptr %49, align 8, !tbaa !52
  %51 = icmp ule i64 %48, %50
  %52 = load ptr, ptr %18, align 8, !tbaa !47
  %53 = load ptr, ptr %52, align 8, !tbaa !50
  %54 = getelementptr inbounds i8, ptr %53, i64 56
  %55 = load ptr, ptr %54, align 8
  %56 = invoke noundef zeroext i1 %55(ptr noundef nonnull align 8 dereferenceable(33) %52)
          to label %57 unwind label %62

57:                                               ; preds = %46
  %not. = xor i1 %37, true
  br i1 %56, label %58, label %64

58:                                               ; preds = %57
  %brmerge = select i1 %not., i1 %.not, i1 false
  %brmerge38 = select i1 %brmerge, i1 true, i1 %51
  br i1 %brmerge38, label %77, label %59

59:                                               ; preds = %58
  invoke void @_ZN14VmaBlockVector6RemoveEP20VmaDeviceMemoryBlock(ptr noundef nonnull align 8 dereferenceable(181) %0, ptr noundef nonnull %18)
          to label %77 unwind label %62

60:                                               ; preds = %44, %38, %36
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %82

62:                                               ; preds = %77, %59, %46
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %82

64:                                               ; preds = %57
  %brmerge41 = select i1 %not., i1 true, i1 %51
  br i1 %brmerge41, label %77, label %65

65:                                               ; preds = %64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %47)
  %67 = load ptr, ptr %66, align 8, !tbaa !53
  %68 = load ptr, ptr %67, align 8, !tbaa !47
  %69 = load ptr, ptr %68, align 8, !tbaa !50
  %70 = getelementptr inbounds i8, ptr %69, i64 56
  %71 = load ptr, ptr %70, align 8
  %72 = invoke noundef zeroext i1 %71(ptr noundef nonnull align 8 dereferenceable(33) %68)
          to label %73 unwind label %75

73:                                               ; preds = %65
  br i1 %72, label %74, label %77

74:                                               ; preds = %73
  invoke void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %77 unwind label %75

75:                                               ; preds = %74, %65
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %82

77:                                               ; preds = %73, %74, %64, %58, %59
  %.1 = phi ptr [ %18, %59 ], [ null, %64 ], [ null, %58 ], [ %67, %74 ], [ null, %73 ]
  invoke void @_ZN14VmaBlockVector23IncrementallySortBlocksEv(ptr noundef nonnull align 8 dereferenceable(181) %0)
          to label %78 unwind label %62

78:                                               ; preds = %77
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %.not36 = icmp eq ptr %.1, null
  br i1 %.not36, label %83, label %79

79:                                               ; preds = %78
  %80 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN20VmaDeviceMemoryBlock7DestroyEP14VmaAllocator_T(ptr noundef nonnull align 8 dereferenceable(96) %.1, ptr noundef %80)
  %81 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZL10vma_deleteI20VmaDeviceMemoryBlockEvP14VmaAllocator_TPT_(ptr noundef %81, ptr noundef nonnull %.1)
  br label %83

82:                                               ; preds = %60, %75, %62, %30, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %31, %30 ], [ %61, %60 ], [ %63, %62 ], [ %76, %75 ]
  call void @_ZN17VmaMutexLockWriteD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn.pn

83:                                               ; preds = %79, %78
  %84 = load ptr, ptr %0, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 4624
  %86 = load i32, ptr %6, align 8, !tbaa !19
  %87 = call noundef i32 @_ZNK14VmaAllocator_T26MemoryTypeIndexToHeapIndexEj(ptr noundef nonnull align 8 dereferenceable(5916) %84, i32 noundef %86)
  %88 = call noundef i64 @_ZNK15VmaAllocation_T7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  call void @_ZN20VmaCurrentBudgetData16RemoveAllocationEjm(ptr noundef nonnull align 8 dereferenceable(832) %85, i32 noundef %87, i64 noundef %88)
  %89 = load ptr, ptr %0, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 112
  call void @_ZN28VmaAllocationObjectAllocator4FreeEP15VmaAllocation_T(ptr noundef nonnull align 8 dereferenceable(88) %90, ptr noundef nonnull %1)
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9VmaVectorIP20VmaDeviceMemoryBlock15VmaStlAllocatorIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32)) 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!6, !10, i64 16}
!20 = !{!21, !11, i64 24}
!21 = !{!"_ZTS9VmaBudget", !22, i64 0, !11, i64 24, !11, i64 32}
!22 = !{!"_ZTS13VmaStatistics", !10, i64 0, !10, i64 4, !11, i64 8, !11, i64 16}
!23 = !{!21, !11, i64 32}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTS14VmaAllocator_T", !12, i64 0, !10, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !7, i64 16, !7, i64 24, !12, i64 32, !26, i64 40, !27, i64 88, !28, i64 112, !10, i64 200, !35, i64 208, !39, i64 1032, !8, i64 1552, !8, i64 1808, !40, i64 4624, !41, i64 5456, !11, i64 5464, !7, i64 5472, !41, i64 5480, !41, i64 5484, !8, i64 5488, !14, i64 5616, !43, i64 5672, !10, i64 5696, !44, i64 5704, !10, i64 5912}
!26 = !{!"_ZTS21VkAllocationCallbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!27 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !7, i64 0, !7, i64 8, !7, i64 16}
!28 = !{!"_ZTS28VmaAllocationObjectAllocator", !29, i64 0, !32, i64 40}
!29 = !{!"_ZTS8VmaMutex", !30, i64 0}
!30 = !{!"_ZTSSt5mutex", !31, i64 0}
!31 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!32 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !7, i64 0, !10, i64 8, !33, i64 16}
!33 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !34, i64 0, !7, i64 8, !11, i64 16, !11, i64 24}
!34 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !7, i64 0}
!35 = !{!"_ZTS26VkPhysicalDeviceProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !36, i64 16, !8, i64 20, !8, i64 276, !37, i64 296, !38, i64 800}
!36 = !{!"_ZTS20VkPhysicalDeviceType", !8, i64 0}
!37 = !{!"_ZTS22VkPhysicalDeviceLimits", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !11, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !8, i64 220, !10, i64 232, !8, i64 236, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !13, i64 268, !13, i64 272, !10, i64 276, !8, i64 280, !8, i64 288, !10, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !13, i64 352, !13, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !10, i64 420, !13, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !8, i64 444, !8, i64 452, !13, i64 460, !13, i64 464, !10, i64 468, !10, i64 472, !11, i64 480, !11, i64 488, !11, i64 496}
!38 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!39 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !10, i64 0, !8, i64 4, !10, i64 260, !8, i64 264}
!40 = !{!"_ZTS20VmaCurrentBudgetData", !8, i64 0, !8, i64 64, !8, i64 128, !8, i64 256, !41, i64 384, !14, i64 392, !8, i64 448, !8, i64 576, !8, i64 704}
!41 = !{!"_ZTSSt6atomicIjE", !42, i64 0}
!42 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!43 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !7, i64 0, !7, i64 8, !11, i64 16}
!44 = !{!"_ZTS18VmaVulkanFunctions", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!48, !7, i64 0}
!48 = !{!"_ZTS20VmaDeviceMemoryBlock", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !29, i64 32, !49, i64 72, !10, i64 84, !7, i64 88}
!49 = !{!"_ZTS20VmaMappingHysteresis", !10, i64 0, !10, i64 4, !10, i64 8}
!50 = !{!51, !51, i64 0}
!51 = !{!"vtable pointer", !9, i64 0}
!52 = !{!6, !11, i64 32}
!53 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass