; 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 = 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.VmaDefragmentationInfo = type { i32, ptr, i64, i32, ptr, ptr }
%struct.VmaPool_T = type { %class.VmaBlockVector, %class.VmaDedicatedAllocationList, i32, ptr, 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 }
%class.VmaDedicatedAllocationList = type { i8, %class.VmaRWMutex, %class.VmaIntrusiveLinkedList }
%class.VmaIntrusiveLinkedList = type { ptr, ptr, i64 }
%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 }
%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 }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN27VmaDefragmentationContext_TC2EP14VmaAllocator_TRK22VmaDefragmentationInfo(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(48) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  %12 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %13, i32 0, i32 2
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = icmp eq i64 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  br label %22

18:                                               ; preds = %3
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %19, i32 0, i32 2
  %21 = load i64, ptr %20, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %18, %17
  %23 = phi i64 [ -1, %17 ], [ %21, %18 ]
  store i64 %23, ptr %12, align 8, !tbaa !13
  %24 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 1
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %25, i32 0, i32 3
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %22
  br label %34

30:                                               ; preds = %22
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 8, !tbaa !18
  br label %34

34:                                               ; preds = %30, %29
  %35 = phi i32 [ -1, %29 ], [ %33, %30 ]
  store i32 %35, ptr %24, align 8, !tbaa !19
  %36 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 2
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %37, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  store ptr %39, ptr %36, align 8, !tbaa !21
  %40 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 3
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %41, i32 0, i32 5
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  store ptr %43, ptr %40, align 8, !tbaa !23
  %44 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 4
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %45)
  call void @_ZN15VmaStlAllocatorI22VmaDefragmentationMoveEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef %46)
  %47 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 5
  %48 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 4
  call void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(8) %48)
  %49 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 6
  store i8 0, ptr %49, align 8, !tbaa !24
  %50 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 11
  store i64 0, ptr %50, align 8, !tbaa !25
  %51 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 12
  %52 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %51, i32 0, i32 0
  store i64 0, ptr %52, align 8, !tbaa !26
  %53 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %51, i32 0, i32 1
  store i64 0, ptr %53, align 8, !tbaa !27
  %54 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %51, i32 0, i32 2
  store i32 0, ptr %54, align 8, !tbaa !28
  %55 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %51, i32 0, i32 3
  store i32 0, ptr %55, align 4, !tbaa !29
  %56 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 13
  %57 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %56, i32 0, i32 0
  store i64 0, ptr %57, align 8, !tbaa !26
  %58 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %56, i32 0, i32 1
  store i64 0, ptr %58, align 8, !tbaa !27
  %59 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %56, i32 0, i32 2
  store i32 0, ptr %59, align 8, !tbaa !28
  %60 = getelementptr inbounds %struct.VmaDefragmentationStats, ptr %56, i32 0, i32 3
  store i32 0, ptr %60, align 4, !tbaa !29
  %61 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 14
  store ptr null, ptr %61, align 8, !tbaa !30
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !31
  %65 = and i32 %64, 15
  %66 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 7
  store i32 %65, ptr %66, align 4, !tbaa !32
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !33
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %90

71:                                               ; preds = %34
  %72 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  store i32 1, ptr %72, align 8, !tbaa !34
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.VmaDefragmentationInfo, ptr %73, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !33
  %76 = getelementptr inbounds %struct.VmaPool_T, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 9
  store ptr %76, ptr %77, align 8, !tbaa !35
  %78 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 9
  %79 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 10
  store ptr %78, ptr %79, align 8, !tbaa !36
  %80 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 9
  %81 = load ptr, ptr %80, align 8, !tbaa !35
  invoke void @_ZN14VmaBlockVector18SetIncrementalSortEb(ptr noundef nonnull align 8 dereferenceable(181) %81, i1 noundef zeroext false)
          to label %82 unwind label %86

82:                                               ; preds = %71
  %83 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 9
  %84 = load ptr, ptr %83, align 8, !tbaa !35
  invoke void @_ZN14VmaBlockVector14SortByFreeSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %84)
          to label %85 unwind label %86

85:                                               ; preds = %82
  br label %129

86:                                               ; preds = %154, %149, %141, %132, %90, %82, %71
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  br label %164

90:                                               ; preds = %34
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = invoke noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %91)
          to label %93 unwind label %86

93:                                               ; preds = %90
  %94 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  store i32 %92, ptr %94, align 8, !tbaa !34
  %95 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 9
  store ptr null, ptr %95, align 8, !tbaa !35
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.VmaAllocator_T, ptr %96, i32 0, i32 21
  %98 = getelementptr inbounds [32 x ptr], ptr %97, i64 0, i64 0
  %99 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 10
  store ptr %98, ptr %99, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !37
  br label %100

100:                                              ; preds = %125, %93
  %101 = load i32, ptr %9, align 4, !tbaa !37
  %102 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  %103 = load i32, ptr %102, align 8, !tbaa !34
  %104 = icmp ult i32 %101, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %128

106:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %107 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 10
  %108 = load ptr, ptr %107, align 8, !tbaa !36
  %109 = load i32, ptr %9, align 4, !tbaa !37
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  store ptr %112, ptr %10, align 8, !tbaa !5
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %124

115:                                              ; preds = %106
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN14VmaBlockVector18SetIncrementalSortEb(ptr noundef nonnull align 8 dereferenceable(181) %116, i1 noundef zeroext false)
          to label %117 unwind label %120

117:                                              ; preds = %115
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN14VmaBlockVector14SortByFreeSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %118)
          to label %119 unwind label %120

119:                                              ; preds = %117
  br label %124

120:                                              ; preds = %117, %115
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %7, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %164

124:                                              ; preds = %119, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %9, align 4, !tbaa !37
  %127 = add i32 %126, 1
  store i32 %127, ptr %9, align 4, !tbaa !37
  br label %100, !llvm.loop !38

128:                                              ; preds = %105
  br label %129

129:                                              ; preds = %128, %85
  %130 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 7
  %131 = load i32, ptr %130, align 4, !tbaa !32
  switch i32 %131, label %163 [
    i32 0, label %132
    i32 2, label %141
    i32 8, label %149
  ]

132:                                              ; preds = %129
  %133 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 7
  store i32 2, ptr %133, align 4, !tbaa !32
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  %136 = load i32, ptr %135, align 8, !tbaa !34
  %137 = zext i32 %136 to i64
  %138 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef %134, i64 noundef %137)
          to label %139 unwind label %86

139:                                              ; preds = %132
  call void @_ZN27VmaDefragmentationContext_T13StateBalancedC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %138) #4
  %140 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 14
  store ptr %138, ptr %140, align 8, !tbaa !30
  br label %163

141:                                              ; preds = %129
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  %144 = load i32, ptr %143, align 8, !tbaa !34
  %145 = zext i32 %144 to i64
  %146 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef %142, i64 noundef %145)
          to label %147 unwind label %86

147:                                              ; preds = %141
  call void @_ZN27VmaDefragmentationContext_T13StateBalancedC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %146) #4
  %148 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 14
  store ptr %146, ptr %148, align 8, !tbaa !30
  br label %163

149:                                              ; preds = %129
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = invoke noundef i64 @_ZNK14VmaAllocator_T25GetBufferImageGranularityEv(ptr noundef nonnull align 8 dereferenceable(5916) %150)
          to label %152 unwind label %86

152:                                              ; preds = %149
  %153 = icmp ugt i64 %151, 1
  br i1 %153, label %154, label %162

154:                                              ; preds = %152
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 8
  %157 = load i32, ptr %156, align 8, !tbaa !34
  %158 = zext i32 %157 to i64
  %159 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T14StateExtensiveEEPT_P14VmaAllocator_Tm(ptr noundef %155, i64 noundef %158)
          to label %160 unwind label %86

160:                                              ; preds = %154
  call void @_ZN27VmaDefragmentationContext_T14StateExtensiveC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %159) #4
  %161 = getelementptr inbounds %struct.VmaDefragmentationContext_T, ptr %11, i32 0, i32 14
  store ptr %159, ptr %161, align 8, !tbaa !30
  br label %162

162:                                              ; preds = %160, %152
  br label %163

163:                                              ; preds = %162, %147, %139, %129
  ret void

164:                                              ; preds = %120, %86
  call void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #4
  br label %165

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef, i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T14StateExtensiveEEPT_P14VmaAllocator_Tm(ptr noundef, i64 noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 16}
!10 = !{!"_ZTS22VmaDefragmentationInfo", !11, i64 0, !6, i64 8, !12, i64 16, !11, i64 24, !6, i64 32, !6, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS27VmaDefragmentationContext_T", !12, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !16, i64 40, !7, i64 72, !11, i64 76, !11, i64 80, !6, i64 88, !6, i64 96, !12, i64 104, !17, i64 112, !17, i64 136, !6, i64 160}
!15 = !{!"_ZTS15VmaStlAllocatorI22VmaDefragmentationMoveE", !6, i64 0}
!16 = !{!"_ZTS9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE", !15, i64 0, !6, i64 8, !12, i64 16, !12, i64 24}
!17 = !{!"_ZTS23VmaDefragmentationStats", !12, i64 0, !12, i64 8, !11, i64 16, !11, i64 20}
!18 = !{!10, !11, i64 24}
!19 = !{!14, !11, i64 8}
!20 = !{!10, !6, i64 32}
!21 = !{!14, !6, i64 16}
!22 = !{!10, !6, i64 40}
!23 = !{!14, !6, i64 24}
!24 = !{!14, !7, i64 72}
!25 = !{!14, !12, i64 104}
!26 = !{!17, !12, i64 0}
!27 = !{!17, !12, i64 8}
!28 = !{!17, !11, i64 16}
!29 = !{!17, !11, i64 20}
!30 = !{!14, !6, i64 160}
!31 = !{!10, !11, i64 0}
!32 = !{!14, !11, i64 76}
!33 = !{!10, !6, i64 8}
!34 = !{!14, !11, i64 80}
!35 = !{!14, !6, i64 88}
!36 = !{!14, !6, i64 96}
!37 = !{!11, !11, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


; 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"

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN27VmaDefragmentationContext_TC2EP14VmaAllocator_TRK22VmaDefragmentationInfo(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = getelementptr inbounds i8, ptr %2, i64 16
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i64 %5, 0
  %spec.select = select i1 %6, i64 -1, i64 %5
  store i64 %spec.select, ptr %0, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = getelementptr inbounds i8, ptr %2, i64 24
  %9 = load i32, ptr %8, align 8, !tbaa !17
  %10 = icmp eq i32 %9, 0
  %11 = select i1 %10, i32 -1, i32 %9
  store i32 %11, ptr %7, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %2, i64 32
  %14 = load <2 x ptr>, ptr %13, align 8, !tbaa !19
  store <2 x ptr> %14, ptr %12, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = tail call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %1)
  tail call void @_ZN15VmaStlAllocatorI22VmaDefragmentationMoveEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %16)
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  store i8 0, ptr %18, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  %20 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %19, i8 0, i64 64, i1 false)
  %21 = load i32, ptr %2, align 8, !tbaa !21
  %22 = and i32 %21, 15
  %23 = getelementptr inbounds i8, ptr %0, i64 76
  store i32 %22, ptr %23, align 4, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %2, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !23
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %33, label %26

26:                                               ; preds = %3
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 1, ptr %27, align 8, !tbaa !24
  %28 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %25, ptr %28, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %28, ptr %29, align 8, !tbaa !26
  tail call void @_ZN14VmaBlockVector18SetIncrementalSortEb(ptr noundef nonnull align 8 dereferenceable(181) %25, i1 noundef zeroext false)
  %30 = load ptr, ptr %28, align 8, !tbaa !25
  invoke void @_ZN14VmaBlockVector14SortByFreeSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %30)
          to label %.loopexit unwind label %31

31:                                               ; preds = %66, %57, %51, %26
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %73

33:                                               ; preds = %3
  %34 = tail call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %1)
  %35 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %34, ptr %35, align 8, !tbaa !24
  %36 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr null, ptr %36, align 8, !tbaa !25
  %37 = getelementptr inbounds i8, ptr %1, i64 1552
  %38 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %37, ptr %38, align 8, !tbaa !26
  %.not32 = icmp eq i32 %34, 0
  br i1 %.not32, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %33, %46
  %39 = phi i32 [ %47, %46 ], [ %34, %33 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 0, %33 ]
  %40 = load ptr, ptr %38, align 8, !tbaa !26
  %41 = getelementptr inbounds ptr, ptr %40, i64 %indvars.iv
  %42 = load ptr, ptr %41, align 8, !tbaa !19
  %.not29 = icmp eq ptr %42, null
  br i1 %.not29, label %46, label %43

43:                                               ; preds = %.lr.ph
  tail call void @_ZN14VmaBlockVector18SetIncrementalSortEb(ptr noundef nonnull align 8 dereferenceable(181) %42, i1 noundef zeroext false)
  invoke void @_ZN14VmaBlockVector14SortByFreeSizeEv(ptr noundef nonnull align 8 dereferenceable(181) %42)
          to label %._crit_edge unwind label %44

._crit_edge:                                      ; preds = %43
  %.pre = load i32, ptr %35, align 8, !tbaa !24
  br label %46

44:                                               ; preds = %43
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %73

46:                                               ; preds = %._crit_edge, %.lr.ph
  %47 = phi i32 [ %.pre, %._crit_edge ], [ %39, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = zext i32 %47 to i64
  %49 = icmp ult i64 %indvars.iv.next, %48
  br i1 %49, label %.lr.ph, label %.loopexit, !llvm.loop !27

.loopexit:                                        ; preds = %46, %33, %26
  %50 = load i32, ptr %23, align 4, !tbaa !22
  switch i32 %50, label %72 [
    i32 0, label %51
    i32 2, label %57
    i32 8, label %63
  ]

51:                                               ; preds = %.loopexit
  store i32 2, ptr %23, align 4, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %0, i64 80
  %53 = load i32, ptr %52, align 8, !tbaa !24
  %54 = zext i32 %53 to i64
  %55 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef nonnull %1, i64 noundef %54)
          to label %56 unwind label %31

56:                                               ; preds = %51
  tail call void @_ZN27VmaDefragmentationContext_T13StateBalancedC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #4
  br label %.sink.split

57:                                               ; preds = %.loopexit
  %58 = getelementptr inbounds i8, ptr %0, i64 80
  %59 = load i32, ptr %58, align 8, !tbaa !24
  %60 = zext i32 %59 to i64
  %61 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef nonnull %1, i64 noundef %60)
          to label %62 unwind label %31

62:                                               ; preds = %57
  tail call void @_ZN27VmaDefragmentationContext_T13StateBalancedC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %61) #4
  br label %.sink.split

63:                                               ; preds = %.loopexit
  %64 = tail call noundef i64 @_ZNK14VmaAllocator_T25GetBufferImageGranularityEv(ptr noundef nonnull align 8 dereferenceable(5916) %1)
  %65 = icmp ugt i64 %64, 1
  br i1 %65, label %66, label %72

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %0, i64 80
  %68 = load i32, ptr %67, align 8, !tbaa !24
  %69 = zext i32 %68 to i64
  %70 = invoke noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T14StateExtensiveEEPT_P14VmaAllocator_Tm(ptr noundef nonnull %1, i64 noundef %69)
          to label %71 unwind label %31

71:                                               ; preds = %66
  tail call void @_ZN27VmaDefragmentationContext_T14StateExtensiveC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %70) #4
  br label %.sink.split

.sink.split:                                      ; preds = %56, %62, %71
  %.sink = phi ptr [ %70, %71 ], [ %61, %62 ], [ %55, %56 ]
  store ptr %.sink, ptr %20, align 8, !tbaa !29
  br label %72

72:                                               ; preds = %.sink.split, %63, %.loopexit
  ret void

73:                                               ; preds = %44, %31
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %45, %44 ]
  tail call void @_ZN9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  resume { ptr, i32 } %.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T13StateBalancedEEPT_P14VmaAllocator_Tm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL16VmaAllocateArrayIN27VmaDefragmentationContext_T14StateExtensiveEEPT_P14VmaAllocator_Tm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 16}
!6 = !{!"_ZTS22VmaDefragmentationInfo", !7, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !10, i64 32, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTS27VmaDefragmentationContext_T", !11, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !8, i64 72, !7, i64 76, !7, i64 80, !10, i64 88, !10, i64 96, !11, i64 104, !16, i64 112, !16, i64 136, !10, i64 160}
!14 = !{!"_ZTS15VmaStlAllocatorI22VmaDefragmentationMoveE", !10, i64 0}
!15 = !{!"_ZTS9VmaVectorI22VmaDefragmentationMove15VmaStlAllocatorIS0_EE", !14, i64 0, !10, i64 8, !11, i64 16, !11, i64 24}
!16 = !{!"_ZTS23VmaDefragmentationStats", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 20}
!17 = !{!6, !7, i64 24}
!18 = !{!13, !7, i64 8}
!19 = !{!10, !10, i64 0}
!20 = !{!13, !8, i64 72}
!21 = !{!6, !7, i64 0}
!22 = !{!13, !7, i64 76}
!23 = !{!6, !10, i64 8}
!24 = !{!13, !7, i64 80}
!25 = !{!13, !10, i64 88}
!26 = !{!13, !10, i64 96}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!13, !10, i64 160}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass