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

%class.VmaSmallVector = type { i64, [16 x %struct.VkMappedMemoryRange], %class.VmaVector.21 }
%struct.VkMappedMemoryRange = type { i32, ptr, ptr, i64, i64 }
%class.VmaVector.21 = type { %struct.VmaStlAllocator.22, ptr, i64, i64 }
%struct.VmaStlAllocator.22 = type { ptr }
%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 }
%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.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.VmaIntrusiveLinkedList.14 = type { ptr, ptr, i64 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION = external hidden unnamed_addr constant [152 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 ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION(ptr noundef nonnull align 8 dereferenceable(5916) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.VmaSmallVector, align 8
  %14 = alloca %struct.VmaStlAllocator.22, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %struct.VkMappedMemoryRange, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !11
  %23 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 680, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %24 = call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %23)
  call void @_ZN15VmaStlAllocatorI19VkMappedMemoryRangeEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %24)
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(680) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %70, %6
  %26 = load i32, ptr %15, align 4, !tbaa !9
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = icmp ult i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %73

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = load i32, ptr %15, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds ptr, ptr %31, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %35, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %44

38:                                               ; preds = %30
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load i32, ptr %15, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i64, ptr %39, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !13
  br label %45

44:                                               ; preds = %30
  br label %45

45:                                               ; preds = %44, %38
  %46 = phi i64 [ %43, %38 ], [ 0, %44 ]
  store i64 %46, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %55

49:                                               ; preds = %45
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = load i32, ptr %15, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds i64, ptr %50, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !13
  br label %56

55:                                               ; preds = %45
  br label %56

56:                                               ; preds = %55, %49
  %57 = phi i64 [ %54, %49 ], [ -1, %55 ]
  store i64 %57, ptr %18, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = load i64, ptr %17, align 8, !tbaa !13
  %60 = load i64, ptr %18, align 8, !tbaa !13
  %61 = invoke noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916) %23, ptr noundef %58, i64 noundef %59, i64 noundef %60, ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %62 unwind label %65

62:                                               ; preds = %56
  br i1 %61, label %63, label %69

63:                                               ; preds = %62
  invoke void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(680) %13, ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %64 unwind label %65

64:                                               ; preds = %63
  br label %69

65:                                               ; preds = %63, %56
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %20, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %114

69:                                               ; preds = %64, %62
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %15, align 4, !tbaa !9
  %72 = add i32 %71, 1
  store i32 %72, ptr %15, align 4, !tbaa !9
  br label %25, !llvm.loop !15

73:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !17
  %74 = invoke noundef zeroext i1 @_ZNK14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %75 unwind label %78

75:                                               ; preds = %73
  br i1 %74, label %112, label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %12, align 4, !tbaa !11
  switch i32 %77, label %110 [
    i32 0, label %82
    i32 1, label %96
  ]

78:                                               ; preds = %107, %104, %98, %96, %93, %90, %84, %82, %73
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %20, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %114

82:                                               ; preds = %76
  %83 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %23)
          to label %84 unwind label %78

84:                                               ; preds = %82
  %85 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %83, i32 0, i32 8
  %86 = load ptr, ptr %85, align 8, !tbaa !19
  %87 = getelementptr inbounds %struct.VmaAllocator_T, ptr %23, i32 0, i32 10
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = invoke noundef i64 @_ZNK14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %90 unwind label %78

90:                                               ; preds = %84
  %91 = trunc i64 %89 to i32
  %92 = invoke noundef ptr @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %93 unwind label %78

93:                                               ; preds = %90
  %94 = invoke noundef i32 %86(ptr noundef %88, i32 noundef %91, ptr noundef %92)
          to label %95 unwind label %78

95:                                               ; preds = %93
  store i32 %94, ptr %22, align 4, !tbaa !17
  br label %111

96:                                               ; preds = %76
  %97 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %23)
          to label %98 unwind label %78

98:                                               ; preds = %96
  %99 = getelementptr inbounds %struct.VmaVulkanFunctions, ptr %97, i32 0, i32 9
  %100 = load ptr, ptr %99, align 8, !tbaa !46
  %101 = getelementptr inbounds %struct.VmaAllocator_T, ptr %23, i32 0, i32 10
  %102 = load ptr, ptr %101, align 8, !tbaa !21
  %103 = invoke noundef i64 @_ZNK14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %104 unwind label %78

104:                                              ; preds = %98
  %105 = trunc i64 %103 to i32
  %106 = invoke noundef ptr @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(680) %13)
          to label %107 unwind label %78

107:                                              ; preds = %104
  %108 = invoke noundef i32 %100(ptr noundef %102, i32 noundef %105, ptr noundef %106)
          to label %109 unwind label %78

109:                                              ; preds = %107
  store i32 %108, ptr %22, align 4, !tbaa !17
  br label %111

110:                                              ; preds = %76
  call void @__assert_fail(ptr noundef @.str.57, ptr noundef @.str.2, i32 noundef 15819, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION) #5
  unreachable

111:                                              ; preds = %109, %95
  br label %112

112:                                              ; preds = %111, %75
  %113 = load i32, ptr %22, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680) %13) #4
  call void @llvm.lifetime.end.p0(i64 680, ptr %13) #4
  ret i32 %113

114:                                              ; preds = %78, %65
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680) %13) #4
  call void @llvm.lifetime.end.p0(i64 680, ptr %13) #4
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %20, align 8
  %117 = load i32, ptr %21, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680)) unnamed_addr #2 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 = { nounwind }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS19VMA_CACHE_OPERATION", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTS8VkResult", !7, i64 0}
!19 = !{!20, !6, i64 64}
!20 = !{!"_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}
!21 = !{!22, !6, i64 16}
!22 = !{!"_ZTS14VmaAllocator_T", !23, i64 0, !10, i64 4, !23, i64 8, !23, i64 9, !23, i64 10, !23, i64 11, !23, i64 12, !23, i64 13, !6, i64 16, !6, i64 24, !23, i64 32, !24, i64 40, !25, i64 88, !26, i64 112, !10, i64 200, !33, i64 208, !38, i64 1032, !7, i64 1552, !7, i64 1808, !39, i64 4624, !40, i64 5456, !14, i64 5464, !6, i64 5472, !40, i64 5480, !40, i64 5484, !7, i64 5488, !42, i64 5616, !45, i64 5672, !10, i64 5696, !20, i64 5704, !10, i64 5912}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTS21VkAllocationCallbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!25 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTS28VmaAllocationObjectAllocator", !27, i64 0, !30, i64 40}
!27 = !{!"_ZTS8VmaMutex", !28, i64 0}
!28 = !{!"_ZTSSt5mutex", !29, i64 0}
!29 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!30 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !6, i64 0, !10, i64 8, !31, i64 16}
!31 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !32, i64 0, !6, i64 8, !14, i64 16, !14, i64 24}
!32 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !6, i64 0}
!33 = !{!"_ZTS26VkPhysicalDeviceProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !34, i64 16, !7, i64 20, !7, i64 276, !35, i64 296, !37, i64 800}
!34 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!35 = !{!"_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, !14, i64 48, !14, 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, !7, i64 220, !10, i64 232, !7, i64 236, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !36, i64 268, !36, i64 272, !10, i64 276, !7, i64 280, !7, i64 288, !10, i64 296, !14, i64 304, !14, i64 312, !14, i64 320, !14, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !36, i64 352, !36, 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, !36, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !7, i64 444, !7, i64 452, !36, i64 460, !36, i64 464, !10, i64 468, !10, i64 472, !14, i64 480, !14, i64 488, !14, i64 496}
!36 = !{!"float", !7, i64 0}
!37 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!38 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !10, i64 0, !7, i64 4, !10, i64 260, !7, i64 264}
!39 = !{!"_ZTS20VmaCurrentBudgetData", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 256, !40, i64 384, !42, i64 392, !7, i64 448, !7, i64 576, !7, i64 704}
!40 = !{!"_ZTSSt6atomicIjE", !41, i64 0}
!41 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!42 = !{!"_ZTS10VmaRWMutex", !43, i64 0}
!43 = !{!"_ZTSSt12shared_mutex", !44, i64 0}
!44 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!45 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !6, i64 0, !6, i64 8, !14, i64 16}
!46 = !{!20, !6, i64 72}


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

%class.VmaSmallVector = type { i64, [16 x %struct.VkMappedMemoryRange], %class.VmaVector.21 }
%struct.VkMappedMemoryRange = type { i32, ptr, ptr, i64, i64 }
%class.VmaVector.21 = type { %struct.VmaStlAllocator.22, ptr, i64, i64 }
%struct.VmaStlAllocator.22 = type { ptr }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION = external hidden unnamed_addr constant [152 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 ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916), ptr noundef, i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION(ptr noundef nonnull align 8 dereferenceable(5916) %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr noundef readonly %3, ptr noundef readonly %4, i32 noundef %5) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %class.VmaSmallVector, align 8
  %8 = alloca %struct.VmaStlAllocator.22, align 8
  %9 = alloca %struct.VkMappedMemoryRange, align 8
  call void @llvm.lifetime.start.p0(i64 680, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %10 = tail call noundef ptr @_ZNK14VmaAllocator_T22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  call void @_ZN15VmaStlAllocatorI19VkMappedMemoryRangeEC2EPK21VkAllocationCallbacks(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %10)
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(680) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %.not29 = icmp eq i32 %1, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %.not = icmp eq ptr %3, null
  %.not23 = icmp eq ptr %4, null
  %wide.trip.count47 = zext i32 %1 to i64
  br i1 %.not, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  br i1 %.not23, label %.lr.ph.split.us.split.us, label %.lr.ph.split.us.split

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us, %16
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %16 ], [ 0, %.lr.ph.split.us ]
  %11 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv44
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  %13 = invoke noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %12, i64 noundef 0, i64 noundef -1, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %14 unwind label %.split.us.split.us

14:                                               ; preds = %.lr.ph.split.us.split.us
  br i1 %13, label %15, label %16

15:                                               ; preds = %14
  invoke void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(680) %7, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %16 unwind label %.split.us.split.us

16:                                               ; preds = %15, %14
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %._crit_edge, label %.lr.ph.split.us.split.us, !llvm.loop !9

.split.us.split.us:                               ; preds = %15, %.lr.ph.split.us.split.us
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.lr.ph.split.us.split:                            ; preds = %.lr.ph.split.us, %25
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %25 ], [ 0, %.lr.ph.split.us ]
  %18 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv39
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i64, ptr %4, i64 %indvars.iv39
  %21 = load i64, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  %22 = invoke noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %19, i64 noundef 0, i64 noundef %21, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %23 unwind label %.split.us.split

23:                                               ; preds = %.lr.ph.split.us.split
  br i1 %22, label %24, label %25

24:                                               ; preds = %23
  invoke void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(680) %7, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %25 unwind label %.split.us.split

25:                                               ; preds = %24, %23
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %exitcond43.not = icmp eq i64 %indvars.iv.next40, %wide.trip.count47
  br i1 %exitcond43.not, label %._crit_edge, label %.lr.ph.split.us.split, !llvm.loop !9

.split.us.split:                                  ; preds = %24, %.lr.ph.split.us.split
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %.not23, label %.lr.ph.split.split.us, label %.lr.ph.split.split

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split, %34
  %indvars.iv34 = phi i64 [ %indvars.iv.next35, %34 ], [ 0, %.lr.ph.split ]
  %27 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv34
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv34
  %30 = load i64, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  %31 = invoke noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %28, i64 noundef %30, i64 noundef -1, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %32 unwind label %.split.split.us

32:                                               ; preds = %.lr.ph.split.split.us
  br i1 %31, label %33, label %34

33:                                               ; preds = %32
  invoke void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(680) %7, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %34 unwind label %.split.split.us

34:                                               ; preds = %33, %32
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %exitcond38.not = icmp eq i64 %indvars.iv.next35, %wide.trip.count47
  br i1 %exitcond38.not, label %._crit_edge, label %.lr.ph.split.split.us, !llvm.loop !9

.split.split.us:                                  ; preds = %33, %.lr.ph.split.split.us
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

._crit_edge:                                      ; preds = %47, %34, %25, %16, %6
  %36 = call noundef zeroext i1 @_ZNK14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(680) %7)
  br i1 %36, label %62, label %48

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %47
  %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 0, %.lr.ph.split ]
  %37 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv
  %40 = load i64, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds i64, ptr %4, i64 %indvars.iv
  %42 = load i64, ptr %41, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  %43 = invoke noundef zeroext i1 @_ZNK14VmaAllocator_T25GetFlushOrInvalidateRangeEP15VmaAllocation_TmmR19VkMappedMemoryRange(ptr noundef nonnull align 8 dereferenceable(5916) %0, ptr noundef %38, i64 noundef %40, i64 noundef %42, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %44 unwind label %.split.split

44:                                               ; preds = %.lr.ph.split.split
  br i1 %43, label %45, label %47

45:                                               ; preds = %44
  invoke void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(680) %7, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %47 unwind label %.split.split

.split.split:                                     ; preds = %45, %.lr.ph.split.split
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.split.us:                                        ; preds = %.split.split, %.split.split.us, %.split.us.split, %.split.us.split.us
  %.us-phi = phi { ptr, i32 } [ %26, %.split.us.split ], [ %17, %.split.us.split.us ], [ %46, %.split.split ], [ %35, %.split.split.us ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  br label %63

47:                                               ; preds = %45, %44
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count47
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.split, !llvm.loop !9

48:                                               ; preds = %._crit_edge
  switch i32 %5, label %61 [
    i32 0, label %.invoke
    i32 1, label %51
  ]

49:                                               ; preds = %.invoke
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %63

51:                                               ; preds = %48
  br label %.invoke

.invoke:                                          ; preds = %48, %51
  %.sink53 = phi i64 [ 72, %51 ], [ 64, %48 ]
  %52 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK14VmaAllocator_T18GetVulkanFunctionsEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %53 = getelementptr inbounds i8, ptr %52, i64 %.sink53
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  %57 = call noundef i64 @_ZNK14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(680) %7)
  %58 = trunc i64 %57 to i32
  %59 = call noundef ptr @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(680) %7)
  %60 = invoke noundef i32 %54(ptr noundef %56, i32 noundef %58, ptr noundef %59)
          to label %62 unwind label %49

61:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.2, i32 noundef 15819, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaAllocator_T28FlushOrInvalidateAllocationsEjPKP15VmaAllocation_TPKmS5_19VMA_CACHE_OPERATION) #5
  unreachable

62:                                               ; preds = %.invoke, %._crit_edge
  %.0 = phi i32 [ 0, %._crit_edge ], [ %60, %.invoke ]
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680) %7) #4
  call void @llvm.lifetime.end.p0(i64 680, ptr nonnull %7) #4
  ret i32 %.0

63:                                               ; preds = %49, %.split.us
  %.pn = phi { ptr, i32 } [ %.us-phi, %.split.us ], [ %50, %49 ]
  call void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680) %7) #4
  call void @llvm.lifetime.end.p0(i64 680, ptr nonnull %7) #4
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14VmaSmallVectorI19VkMappedMemoryRange15VmaStlAllocatorIS0_ELm16EED2Ev(ptr noundef nonnull align 8 dereferenceable(680)) unnamed_addr #2 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 = { nounwind }
attributes #5 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS14VmaAllocator_T", !15, i64 0, !16, i64 4, !15, i64 8, !15, i64 9, !15, i64 10, !15, i64 11, !15, i64 12, !15, i64 13, !6, i64 16, !6, i64 24, !15, i64 32, !17, i64 40, !18, i64 88, !19, i64 112, !16, i64 200, !26, i64 208, !31, i64 1032, !7, i64 1552, !7, i64 1808, !32, i64 4624, !33, i64 5456, !12, i64 5464, !6, i64 5472, !33, i64 5480, !33, i64 5484, !7, i64 5488, !35, i64 5616, !38, i64 5672, !16, i64 5696, !39, i64 5704, !16, i64 5912}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS21VkAllocationCallbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"_ZTS24VmaDeviceMemoryCallbacks", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTS28VmaAllocationObjectAllocator", !20, i64 0, !23, i64 40}
!20 = !{!"_ZTS8VmaMutex", !21, i64 0}
!21 = !{!"_ZTSSt5mutex", !22, i64 0}
!22 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!23 = !{!"_ZTS16VmaPoolAllocatorI15VmaAllocation_TE", !6, i64 0, !16, i64 8, !24, i64 16}
!24 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockE15VmaStlAllocatorIS3_EE", !25, i64 0, !6, i64 8, !12, i64 16, !12, i64 24}
!25 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorI15VmaAllocation_TE9ItemBlockEE", !6, i64 0}
!26 = !{!"_ZTS26VkPhysicalDeviceProperties", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !27, i64 16, !7, i64 20, !7, i64 276, !28, i64 296, !30, i64 800}
!27 = !{!"_ZTS20VkPhysicalDeviceType", !7, i64 0}
!28 = !{!"_ZTS22VkPhysicalDeviceLimits", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !12, i64 48, !12, i64 56, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !16, i64 80, !16, i64 84, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112, !16, i64 116, !16, i64 120, !16, i64 124, !16, i64 128, !16, i64 132, !16, i64 136, !16, i64 140, !16, i64 144, !16, i64 148, !16, i64 152, !16, i64 156, !16, i64 160, !16, i64 164, !16, i64 168, !16, i64 172, !16, i64 176, !16, i64 180, !16, i64 184, !16, i64 188, !16, i64 192, !16, i64 196, !16, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !7, i64 220, !16, i64 232, !7, i64 236, !16, i64 248, !16, i64 252, !16, i64 256, !16, i64 260, !16, i64 264, !29, i64 268, !29, i64 272, !16, i64 276, !7, i64 280, !7, i64 288, !16, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !16, i64 336, !16, i64 340, !16, i64 344, !16, i64 348, !29, i64 352, !29, i64 356, !16, i64 360, !16, i64 364, !16, i64 368, !16, i64 372, !16, i64 376, !16, i64 380, !16, i64 384, !16, i64 388, !16, i64 392, !16, i64 396, !16, i64 400, !16, i64 404, !16, i64 408, !16, i64 412, !16, i64 416, !16, i64 420, !29, i64 424, !16, i64 428, !16, i64 432, !16, i64 436, !16, i64 440, !7, i64 444, !7, i64 452, !29, i64 460, !29, i64 464, !16, i64 468, !16, i64 472, !12, i64 480, !12, i64 488, !12, i64 496}
!29 = !{!"float", !7, i64 0}
!30 = !{!"_ZTS32VkPhysicalDeviceSparseProperties", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16}
!31 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !16, i64 0, !7, i64 4, !16, i64 260, !7, i64 264}
!32 = !{!"_ZTS20VmaCurrentBudgetData", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 256, !33, i64 384, !35, i64 392, !7, i64 448, !7, i64 576, !7, i64 704}
!33 = !{!"_ZTSSt6atomicIjE", !34, i64 0}
!34 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!35 = !{!"_ZTS10VmaRWMutex", !36, i64 0}
!36 = !{!"_ZTSSt12shared_mutex", !37, i64 0}
!37 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!38 = !{!"_ZTS22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE", !6, i64 0, !6, i64 8, !12, i64 16}
!39 = !{!"_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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass