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

; 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.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 }
%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 }

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_TD2Ev = external hidden unnamed_addr constant [34 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: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN14VmaAllocator_TD2Ev(ptr noundef nonnull align 8 dereferenceable(5916) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %4 = load ptr, ptr %2, align 8
  %5 = getelementptr inbounds %struct.VmaAllocator_T, ptr %4, i32 0, i32 32
  %6 = invoke noundef zeroext i1 @_ZNK22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %7 unwind label %37

7:                                                ; preds = %1
  br i1 %6, label %8, label %9

8:                                                ; preds = %7
  br label %11

9:                                                ; preds = %7
  call void @__assert_fail(ptr noundef @.str.198, ptr noundef @.str.2, i32 noundef 14253, ptr noundef @__PRETTY_FUNCTION__._ZN14VmaAllocator_TD2Ev) #6
  unreachable

10:                                               ; No predecessors!
  br label %11

11:                                               ; preds = %10, %8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %12 = invoke noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %4)
          to label %13 unwind label %37

13:                                               ; preds = %11
  %14 = zext i32 %12 to i64
  store i64 %14, ptr %3, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %25, %13
  %16 = load i64, ptr %3, align 8, !tbaa !9
  %17 = add i64 %16, -1
  store i64 %17, ptr %3, align 8, !tbaa !9
  %18 = icmp ne i64 %16, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %26

20:                                               ; preds = %15
  %21 = getelementptr inbounds %struct.VmaAllocator_T, ptr %4, i32 0, i32 21
  %22 = load i64, ptr %3, align 8, !tbaa !9
  %23 = getelementptr inbounds [32 x ptr], ptr %21, i64 0, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  invoke void @_ZL10vma_deleteI14VmaBlockVectorEvP14VmaAllocator_TPT_(ptr noundef %4, ptr noundef %24)
          to label %25 unwind label %37

25:                                               ; preds = %20
  br label %15, !llvm.loop !11

26:                                               ; preds = %19
  %27 = getelementptr inbounds %struct.VmaAllocator_T, ptr %4, i32 0, i32 32
  call void @_ZN22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  %28 = getelementptr inbounds %struct.VmaAllocator_T, ptr %4, i32 0, i32 22
  %29 = getelementptr inbounds [32 x %class.VmaDedicatedAllocationList], ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds %class.VmaDedicatedAllocationList, ptr %29, i64 32
  br label %31

31:                                               ; preds = %31, %26
  %32 = phi ptr [ %30, %26 ], [ %33, %31 ]
  %33 = getelementptr inbounds %class.VmaDedicatedAllocationList, ptr %32, i64 -1
  call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %33) #7
  %34 = icmp eq ptr %33, %29
  br i1 %34, label %35, label %31

35:                                               ; preds = %31
  %36 = getelementptr inbounds %struct.VmaAllocator_T, ptr %4, i32 0, i32 16
  call void @_ZN28VmaAllocationObjectAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %36) #7
  ret void

37:                                               ; preds = %20, %11, %1
  %38 = landingpad { ptr, i32 }
          catch ptr null
  %39 = extractvalue { ptr, i32 } %38, 0
  call void @__clang_call_terminate(ptr %39) #6
  unreachable
}

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

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

declare void @_ZN26VmaDedicatedAllocationListD1Ev(ptr)

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 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN14VmaAllocator_TD2Ev = external hidden unnamed_addr constant [34 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN14VmaAllocator_TD2Ev(ptr noundef nonnull align 8 dereferenceable(5916) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 5672
  %3 = tail call noundef zeroext i1 @_ZNK22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %3, label %5, label %4

4:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.198, ptr noundef nonnull @.str.2, i32 noundef 14253, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14VmaAllocator_TD2Ev) #5
  unreachable

5:                                                ; preds = %1
  %6 = tail call noundef i32 @_ZNK14VmaAllocator_T18GetMemoryTypeCountEv(ptr noundef nonnull align 8 dereferenceable(5916) %0)
  %7 = zext i32 %6 to i64
  %8 = getelementptr inbounds i8, ptr %0, i64 1552
  br label %9

9:                                                ; preds = %12, %5
  %.0 = phi i64 [ %7, %5 ], [ %13, %12 ]
  %.not = icmp eq i64 %.0, 0
  br i1 %.not, label %10, label %12

10:                                               ; preds = %9
  tail call void @_ZN22VmaIntrusiveLinkedListI21VmaPoolListItemTraitsED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %.ptr2 = getelementptr inbounds i8, ptr %0, i64 4536
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2) #6
  %.ptr2.1 = getelementptr inbounds i8, ptr %0, i64 4448
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.1) #6
  %.ptr2.2 = getelementptr inbounds i8, ptr %0, i64 4360
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.2) #6
  %.ptr2.3 = getelementptr inbounds i8, ptr %0, i64 4272
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.3) #6
  %.ptr2.4 = getelementptr inbounds i8, ptr %0, i64 4184
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.4) #6
  %.ptr2.5 = getelementptr inbounds i8, ptr %0, i64 4096
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.5) #6
  %.ptr2.6 = getelementptr inbounds i8, ptr %0, i64 4008
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.6) #6
  %.ptr2.7 = getelementptr inbounds i8, ptr %0, i64 3920
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.7) #6
  %.ptr2.8 = getelementptr inbounds i8, ptr %0, i64 3832
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.8) #6
  %.ptr2.9 = getelementptr inbounds i8, ptr %0, i64 3744
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.9) #6
  %.ptr2.10 = getelementptr inbounds i8, ptr %0, i64 3656
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.10) #6
  %.ptr2.11 = getelementptr inbounds i8, ptr %0, i64 3568
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.11) #6
  %.ptr2.12 = getelementptr inbounds i8, ptr %0, i64 3480
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.12) #6
  %.ptr2.13 = getelementptr inbounds i8, ptr %0, i64 3392
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.13) #6
  %.ptr2.14 = getelementptr inbounds i8, ptr %0, i64 3304
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.14) #6
  %.ptr2.15 = getelementptr inbounds i8, ptr %0, i64 3216
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.15) #6
  %.ptr2.16 = getelementptr inbounds i8, ptr %0, i64 3128
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.16) #6
  %.ptr2.17 = getelementptr inbounds i8, ptr %0, i64 3040
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.17) #6
  %.ptr2.18 = getelementptr inbounds i8, ptr %0, i64 2952
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.18) #6
  %.ptr2.19 = getelementptr inbounds i8, ptr %0, i64 2864
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.19) #6
  %.ptr2.20 = getelementptr inbounds i8, ptr %0, i64 2776
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.20) #6
  %.ptr2.21 = getelementptr inbounds i8, ptr %0, i64 2688
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.21) #6
  %.ptr2.22 = getelementptr inbounds i8, ptr %0, i64 2600
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.22) #6
  %.ptr2.23 = getelementptr inbounds i8, ptr %0, i64 2512
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.23) #6
  %.ptr2.24 = getelementptr inbounds i8, ptr %0, i64 2424
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.24) #6
  %.ptr2.25 = getelementptr inbounds i8, ptr %0, i64 2336
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.25) #6
  %.ptr2.26 = getelementptr inbounds i8, ptr %0, i64 2248
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.26) #6
  %.ptr2.27 = getelementptr inbounds i8, ptr %0, i64 2160
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.27) #6
  %.ptr2.28 = getelementptr inbounds i8, ptr %0, i64 2072
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.28) #6
  %.ptr2.29 = getelementptr inbounds i8, ptr %0, i64 1984
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.29) #6
  %.ptr2.30 = getelementptr inbounds i8, ptr %0, i64 1896
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.30) #6
  %.ptr2.31 = getelementptr inbounds i8, ptr %0, i64 1808
  tail call void @_ZN26VmaDedicatedAllocationListD1Ev(ptr noundef nonnull align 8 dereferenceable(88) %.ptr2.31) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @_ZN28VmaAllocationObjectAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #6
  ret void

12:                                               ; preds = %9
  %13 = add nsw i64 %.0, -1
  %14 = getelementptr inbounds [32 x ptr], ptr %8, i64 0, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZL10vma_deleteI14VmaBlockVectorEvP14VmaAllocator_TPT_(ptr noundef nonnull %0, ptr noundef %15)
          to label %9 unwind label %16, !llvm.loop !9

16:                                               ; preds = %12
  %17 = landingpad { ptr, i32 }
          catch ptr null
  %18 = extractvalue { ptr, i32 } %17, 0
  tail call void @__clang_call_terminate(ptr %18) #5
  unreachable
}

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

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

declare void @_ZN26VmaDedicatedAllocationListD1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { noinline noreturn nounwind uwtable "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 = { 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 = { 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 #5 = { noreturn nounwind }
attributes #6 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,SROAPass,SimplifyCFGPass,TailCallElimPass