; 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.VmaBlockMetadata_TLSF = type { %class.VmaBlockMetadata.base, i64, i64, i64, i32, i8, [58 x i32], i32, ptr, %class.VmaPoolAllocator, ptr, %class.VmaBlockBufferImageGranularity }
%class.VmaBlockMetadata.base = type <{ ptr, i64, ptr, i64, i8 }>
%class.VmaPoolAllocator = type { ptr, i32, %class.VmaVector.4 }
%class.VmaVector.4 = type { %struct.VmaStlAllocator.5, ptr, i64, i64 }
%struct.VmaStlAllocator.5 = type { ptr }
%class.VmaBlockBufferImageGranularity = type { i64, i32, ptr }
%"class.VmaBlockMetadata_TLSF::Block" = type { i64, i64, ptr, ptr, ptr, %union.anon.6 }
%union.anon.6 = type { 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN30VmaBlockBufferImageGranularity4InitEPK21VkAllocationCallbacksm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VmaBlockMetadata_TLSF4InitEm(ptr noundef nonnull align 8 dereferenceable(400) %0, i64 noundef %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i8, align 1
  %6 = alloca i16, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %7 = load ptr, ptr %3, align 8
  %8 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN16VmaBlockMetadata4InitEm(ptr noundef nonnull align 8 dereferenceable(33) %7, i64 noundef %8)
  %9 = call noundef zeroext i1 @_ZNK16VmaBlockMetadata9IsVirtualEv(ptr noundef nonnull align 8 dereferenceable(33) %7)
  br i1 %9, label %14, label %10

10:                                               ; preds = %2
  %11 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 11
  %12 = call noundef ptr @_ZNK16VmaBlockMetadata22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(33) %7)
  %13 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN30VmaBlockBufferImageGranularity4InitEPK21VkAllocationCallbacksm(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %12, i64 noundef %13)
  br label %14

14:                                               ; preds = %10, %2
  %15 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 9
  %16 = call noundef ptr @_ZN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE5AllocIJEEEPS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(48) %15)
  %17 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  store ptr %16, ptr %17, align 8, !tbaa !11
  %18 = load i64, ptr %4, align 8, !tbaa !9
  %19 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %"class.VmaBlockMetadata_TLSF::Block", ptr %20, i32 0, i32 1
  store i64 %18, ptr %21, align 8, !tbaa !20
  %22 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds %"class.VmaBlockMetadata_TLSF::Block", ptr %23, i32 0, i32 0
  store i64 0, ptr %24, align 8, !tbaa !22
  %25 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds %"class.VmaBlockMetadata_TLSF::Block", ptr %26, i32 0, i32 2
  store ptr null, ptr %27, align 8, !tbaa !23
  %28 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %"class.VmaBlockMetadata_TLSF::Block", ptr %29, i32 0, i32 3
  store ptr null, ptr %30, align 8, !tbaa !24
  %31 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  call void @_ZN21VmaBlockMetadata_TLSF5Block8MarkFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  %33 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN21VmaBlockMetadata_TLSF5Block8NextFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %34)
  store ptr null, ptr %35, align 8, !tbaa !5
  %36 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 10
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN21VmaBlockMetadata_TLSF5Block8PrevFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %37)
  store ptr null, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  %39 = load i64, ptr %4, align 8, !tbaa !9
  %40 = call noundef zeroext i8 @_ZNK21VmaBlockMetadata_TLSF17SizeToMemoryClassEm(ptr noundef nonnull align 8 dereferenceable(400) %7, i64 noundef %39)
  store i8 %40, ptr %5, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #4
  %41 = load i64, ptr %4, align 8, !tbaa !9
  %42 = load i8, ptr %5, align 1, !tbaa !25
  %43 = call noundef zeroext i16 @_ZNK21VmaBlockMetadata_TLSF17SizeToSecondIndexEmh(ptr noundef nonnull align 8 dereferenceable(400) %7, i64 noundef %41, i8 noundef zeroext %42)
  store i16 %43, ptr %6, align 2, !tbaa !26
  %44 = load i8, ptr %5, align 1, !tbaa !25
  %45 = zext i8 %44 to i32
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %14
  br label %57

48:                                               ; preds = %14
  %49 = load i8, ptr %5, align 1, !tbaa !25
  %50 = zext i8 %49 to i32
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = mul i64 %52, 32
  %54 = load i16, ptr %6, align 2, !tbaa !26
  %55 = zext i16 %54 to i64
  %56 = add i64 %53, %55
  br label %57

57:                                               ; preds = %48, %47
  %58 = phi i64 [ 0, %47 ], [ %56, %48 ]
  %59 = add i64 %58, 1
  %60 = trunc i64 %59 to i32
  %61 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 7
  store i32 %60, ptr %61, align 8, !tbaa !28
  %62 = call noundef zeroext i1 @_ZNK16VmaBlockMetadata9IsVirtualEv(ptr noundef nonnull align 8 dereferenceable(33) %7)
  br i1 %62, label %63, label %69

63:                                               ; preds = %57
  %64 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 7
  %65 = load i32, ptr %64, align 8, !tbaa !28
  %66 = zext i32 %65 to i64
  %67 = add i64 %66, 32
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %64, align 8, !tbaa !28
  br label %73

69:                                               ; preds = %57
  %70 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 7
  %71 = load i32, ptr %70, align 8, !tbaa !28
  %72 = add i32 %71, 4
  store i32 %72, ptr %70, align 8, !tbaa !28
  br label %73

73:                                               ; preds = %69, %63
  %74 = load i8, ptr %5, align 1, !tbaa !25
  %75 = zext i8 %74 to i32
  %76 = add nsw i32 %75, 2
  %77 = trunc i32 %76 to i8
  %78 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 5
  store i8 %77, ptr %78, align 4, !tbaa !29
  %79 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 6
  %80 = getelementptr inbounds [58 x i32], ptr %79, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %80, i8 0, i64 232, i1 false)
  %81 = call noundef ptr @_ZNK16VmaBlockMetadata22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(33) %7)
  %82 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 7
  %83 = load i32, ptr %82, align 8, !tbaa !28
  %84 = zext i32 %83 to i64
  %85 = call noundef ptr @_ZL16VmaAllocateArrayIPN21VmaBlockMetadata_TLSF5BlockEEPT_PK21VkAllocationCallbacksm(ptr noundef %81, i64 noundef %84)
  %86 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 8
  store ptr %85, ptr %86, align 8, !tbaa !30
  %87 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 8
  %88 = load ptr, ptr %87, align 8, !tbaa !30
  %89 = getelementptr inbounds %class.VmaBlockMetadata_TLSF, ptr %7, i32 0, i32 7
  %90 = load i32, ptr %89, align 8, !tbaa !28
  %91 = zext i32 %90 to i64
  %92 = mul i64 %91, 8
  call void @llvm.memset.p0.i64(ptr align 8 %88, i8 0, i64 %92, i1 false)
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE5AllocIJEEEPS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK21VmaBlockMetadata_TLSF17SizeToMemoryClassEm(ptr noundef nonnull align 8 dereferenceable(400), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK21VmaBlockMetadata_TLSF17SizeToSecondIndexEmh(ptr noundef nonnull align 8 dereferenceable(400), i64 noundef, i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL16VmaAllocateArrayIPN21VmaBlockMetadata_TLSF5BlockEEPT_PK21VkAllocationCallbacksm(ptr noundef, i64 noundef) #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 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 368}
!12 = !{!"_ZTS21VmaBlockMetadata_TLSF", !13, i64 0, !10, i64 40, !10, i64 48, !10, i64 56, !15, i64 64, !7, i64 68, !7, i64 72, !15, i64 304, !6, i64 312, !16, i64 320, !6, i64 368, !19, i64 376}
!13 = !{!"_ZTS16VmaBlockMetadata", !10, i64 8, !6, i64 16, !10, i64 24, !14, i64 32}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE", !6, i64 0, !15, i64 8, !17, i64 16}
!17 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE9ItemBlockE15VmaStlAllocatorIS4_EE", !18, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!18 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE9ItemBlockEE", !6, i64 0}
!19 = !{!"_ZTS30VmaBlockBufferImageGranularity", !10, i64 0, !15, i64 8, !6, i64 16}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTSN21VmaBlockMetadata_TLSF5BlockE", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40}
!22 = !{!21, !10, i64 0}
!23 = !{!21, !6, i64 16}
!24 = !{!21, !6, i64 24}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"short", !7, i64 0}
!28 = !{!12, !15, i64 304}
!29 = !{!12, !7, i64 68}
!30 = !{!12, !6, i64 312}


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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN30VmaBlockBufferImageGranularity4InitEPK21VkAllocationCallbacksm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VmaBlockMetadata_TLSF4InitEm(ptr noundef nonnull align 8 dereferenceable(400) %0, i64 noundef %1) unnamed_addr #1 align 2 {
  tail call void @_ZN16VmaBlockMetadata4InitEm(ptr noundef nonnull align 8 dereferenceable(33) %0, i64 noundef %1)
  %3 = tail call noundef zeroext i1 @_ZNK16VmaBlockMetadata9IsVirtualEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  br i1 %3, label %7, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 376
  %6 = tail call noundef ptr @_ZNK16VmaBlockMetadata22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  tail call void @_ZN30VmaBlockBufferImageGranularity4InitEPK21VkAllocationCallbacksm(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %6, i64 noundef %1)
  br label %7

7:                                                ; preds = %4, %2
  %8 = getelementptr inbounds i8, ptr %0, i64 320
  %9 = tail call noundef ptr @_ZN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE5AllocIJEEEPS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(48) %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 368
  store ptr %9, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 %1, ptr %11, align 8, !tbaa !18
  store i64 0, ptr %9, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %9, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false)
  tail call void @_ZN21VmaBlockMetadata_TLSF5Block8MarkFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %9)
  %13 = load ptr, ptr %10, align 8, !tbaa !5
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN21VmaBlockMetadata_TLSF5Block8NextFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %13)
  store ptr null, ptr %14, align 8, !tbaa !21
  %15 = load ptr, ptr %10, align 8, !tbaa !5
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN21VmaBlockMetadata_TLSF5Block8PrevFreeEv(ptr noundef nonnull align 8 dereferenceable(48) %15)
  store ptr null, ptr %16, align 8, !tbaa !21
  %17 = tail call noundef zeroext i8 @_ZNK21VmaBlockMetadata_TLSF17SizeToMemoryClassEm(ptr noundef nonnull align 8 dereferenceable(400) %0, i64 noundef %1)
  %18 = tail call noundef zeroext i16 @_ZNK21VmaBlockMetadata_TLSF17SizeToSecondIndexEmh(ptr noundef nonnull align 8 dereferenceable(400) %0, i64 noundef %1, i8 noundef zeroext %17)
  %19 = icmp eq i8 %17, 0
  br i1 %19, label %26, label %20

20:                                               ; preds = %7
  %21 = zext i8 %17 to i32
  %22 = shl nuw nsw i32 %21, 5
  %23 = zext i16 %18 to i32
  %24 = add nsw i32 %22, -31
  %25 = add nuw nsw i32 %24, %23
  br label %26

26:                                               ; preds = %7, %20
  %27 = phi i32 [ %25, %20 ], [ 1, %7 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 304
  store i32 %27, ptr %28, align 8, !tbaa !22
  %29 = tail call noundef zeroext i1 @_ZNK16VmaBlockMetadata9IsVirtualEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %30 = load i32, ptr %28, align 8
  %storemerge.v = select i1 %29, i32 32, i32 4
  %storemerge = add i32 %30, %storemerge.v
  store i32 %storemerge, ptr %28, align 8, !tbaa !22
  %31 = add i8 %17, 2
  %32 = getelementptr inbounds i8, ptr %0, i64 68
  store i8 %31, ptr %32, align 4, !tbaa !23
  %33 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(232) %33, i8 0, i64 232, i1 false)
  %34 = tail call noundef ptr @_ZNK16VmaBlockMetadata22GetAllocationCallbacksEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %35 = load i32, ptr %28, align 8, !tbaa !22
  %36 = zext i32 %35 to i64
  %37 = tail call noundef ptr @_ZL16VmaAllocateArrayIPN21VmaBlockMetadata_TLSF5BlockEEPT_PK21VkAllocationCallbacksm(ptr noundef %34, i64 noundef %36)
  %38 = getelementptr inbounds i8, ptr %0, i64 312
  store ptr %37, ptr %38, align 8, !tbaa !24
  %39 = load i32, ptr %28, align 8, !tbaa !22
  %40 = zext i32 %39 to i64
  %41 = shl nuw nsw i64 %40, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %37, i8 0, i64 %41, i1 false)
  ret void
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK21VmaBlockMetadata_TLSF17SizeToMemoryClassEm(ptr noundef nonnull align 8 dereferenceable(400), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK21VmaBlockMetadata_TLSF17SizeToSecondIndexEmh(ptr noundef nonnull align 8 dereferenceable(400), i64 noundef, i8 noundef zeroext) local_unnamed_addr #1 align 2

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

!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 368}
!6 = !{!"_ZTS21VmaBlockMetadata_TLSF", !7, i64 0, !8, i64 40, !8, i64 48, !8, i64 56, !13, i64 64, !9, i64 68, !9, i64 72, !13, i64 304, !11, i64 312, !14, i64 320, !11, i64 368, !17, i64 376}
!7 = !{!"_ZTS16VmaBlockMetadata", !8, i64 8, !11, i64 16, !8, i64 24, !12, i64 32}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTS16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE", !11, i64 0, !13, i64 8, !15, i64 16}
!15 = !{!"_ZTS9VmaVectorIN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE9ItemBlockE15VmaStlAllocatorIS4_EE", !16, i64 0, !11, i64 8, !8, i64 16, !8, i64 24}
!16 = !{!"_ZTS15VmaStlAllocatorIN16VmaPoolAllocatorIN21VmaBlockMetadata_TLSF5BlockEE9ItemBlockEE", !11, i64 0}
!17 = !{!"_ZTS30VmaBlockBufferImageGranularity", !8, i64 0, !13, i64 8, !11, i64 16}
!18 = !{!19, !8, i64 8}
!19 = !{!"_ZTSN21VmaBlockMetadata_TLSF5BlockE", !8, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !9, i64 40}
!20 = !{!19, !8, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!6, !13, i64 304}
!23 = !{!6, !9, i64 68}
!24 = !{!6, !11, i64 312}


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