; LLVM IR from geefr/vulkan-physics :: vulkanutils/util (deviceinstance)

; 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.vk::MemoryRequirements" = type <{ i64, i64, i32, [4 x i8] }>
%"class.vk::UniqueHandle.57" = type { %"class.vk::ObjectFree", %"class.vk::DeviceMemory" }
%"class.vk::ObjectFree" = type { %"class.vk::Device", %"class.vk::Optional", ptr }
%"class.vk::Device" = type { ptr }
%"class.vk::Optional" = type { ptr }
%"class.vk::DeviceMemory" = type { ptr }
%"class.vk::Flags.53" = type { i32 }
%"class.vk::Buffer" = type { ptr }
%"struct.vk::MemoryAllocateInfo" = type <{ i32, [4 x i8], ptr, i64, i32, [4 x i8] }>
%class.DeviceInstance = type { %"class.std::vector.0", %"class.vk::UniqueHandle", %"class.vk::UniqueHandle.5", %"class.std::vector.6" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice>>::_Vector_impl" }
%"struct.std::_Vector_base<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice>>::_Vector_impl" = type { %"struct.std::_Vector_base<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.vk::UniqueHandle" = type { %"class.vk::ObjectDestroy", %"class.vk::Instance" }
%"class.vk::ObjectDestroy" = type { %"class.vk::Optional", ptr }
%"class.vk::Instance" = type { ptr }
%"class.vk::UniqueHandle.5" = type { %"class.vk::ObjectDestroy", %"class.vk::Device" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<DeviceInstance::QueueRef, std::allocator<DeviceInstance::QueueRef>>::_Vector_impl" }
%"struct.std::_Vector_base<DeviceInstance::QueueRef, std::allocator<DeviceInstance::QueueRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<DeviceInstance::QueueRef, std::allocator<DeviceInstance::QueueRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DeviceInstance::QueueRef, std::allocator<DeviceInstance::QueueRef>>::_Vector_impl_data" = type { 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv() #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14DeviceInstance22selectDeviceMemoryHeapEN2vk18MemoryRequirementsENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef byval(%"struct.vk::MemoryRequirements") align 8, i32) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14DeviceInstance29allocateDeviceMemoryForBufferERN2vk6BufferENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr dead_on_unwind noalias writable sret(%"class.vk::UniqueHandle.57") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, i32 %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca %"class.vk::Flags.53", align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.vk::MemoryRequirements", align 8
  %10 = alloca %"class.vk::Buffer", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.vk::MemoryRequirements", align 8
  %13 = alloca %"class.vk::Flags.53", align 4
  %14 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %15 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %16 = alloca %"class.vk::Optional", align 8
  store ptr %0, ptr %5, align 8
  %17 = getelementptr inbounds %"class.vk::Flags.53", ptr %6, i32 0, i32 0
  store i32 %3, ptr %17, align 4
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %19 = getelementptr inbounds %class.DeviceInstance, ptr %18, i32 0, i32 2
  %20 = call noundef ptr @_ZN2vk12UniqueHandleINS_6DeviceENS_20DispatchLoaderStaticEEptEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %21, i64 8, i1 false), !tbaa.struct !9
  %22 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  %23 = getelementptr inbounds %"class.vk::Buffer", ptr %10, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8
  call void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind writable sret(%"struct.vk::MemoryRequirements") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr %24, ptr noundef nonnull align 8 dereferenceable(9) %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %9, i64 24, i1 false), !tbaa.struct !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !15
  %25 = getelementptr inbounds %"class.vk::Flags.53", ptr %13, i32 0, i32 0
  %26 = load i32, ptr %25, align 4
  %27 = call noundef i32 @_ZN14DeviceInstance22selectDeviceMemoryHeapEN2vk18MemoryRequirementsENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef byval(%"struct.vk::MemoryRequirements") align 8 %12, i32 %26)
  store i32 %27, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @_ZN2vk18MemoryAllocateInfoC2Emj(ptr noundef nonnull align 8 dereferenceable(28) %15, i64 noundef 0, i32 noundef 0) #7
  %28 = getelementptr inbounds %"struct.vk::MemoryRequirements", ptr %9, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !16
  %30 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo17setAllocationSizeEm(ptr noundef nonnull align 8 dereferenceable(28) %15, i64 noundef %29) #7
  %31 = load i32, ptr %11, align 4, !tbaa !13
  %32 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo18setMemoryTypeIndexEj(ptr noundef nonnull align 8 dereferenceable(28) %30, i32 noundef %31) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %32, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %33 = getelementptr inbounds %class.DeviceInstance, ptr %18, i32 0, i32 2
  %34 = call noundef ptr @_ZN2vk12UniqueHandleINS_6DeviceENS_20DispatchLoaderStaticEEptEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr null) #7
  %35 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  %36 = getelementptr inbounds %"class.vk::Optional", ptr %16, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8
  call void @_ZNK2vk6Device20allocateMemoryUniqueINS_20DispatchLoaderStaticEEENS_15ResultValueTypeINS_12UniqueHandleINS_12DeviceMemoryET_EEE4typeERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKS6_(ptr dead_on_unwind writable sret(%"class.vk::UniqueHandle.57") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(28) %14, ptr %37, ptr noundef nonnull align 8 dereferenceable(9) %35)
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind noalias writable sret(%"struct.vk::MemoryRequirements") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr noundef nonnull align 8 dereferenceable(9)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo17setAllocationSizeEm(ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) #3 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK2vk6Device20allocateMemoryUniqueINS_20DispatchLoaderStaticEEENS_15ResultValueTypeINS_12UniqueHandleINS_12DeviceMemoryET_EEE4typeERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKS6_(ptr dead_on_unwind noalias writable sret(%"class.vk::UniqueHandle.57") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(28), ptr, ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { alwaysinline 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 #6 = { alwaysinline 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 #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 = !{i64 0, i64 8, !5}
!10 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 4, !13}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i64 0, i64 4, !13}
!16 = !{!17, !12, i64 0}
!17 = !{!"_ZTSN2vk18MemoryRequirementsE", !12, i64 0, !12, i64 8, !14, i64 16}
!18 = !{i64 0, i64 4, !19, i64 8, i64 8, !5, i64 16, i64 8, !11, i64 24, i64 4, !13}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTSN2vk13StructureTypeE", !7, i64 0}


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

%"struct.vk::MemoryRequirements" = type <{ i64, i64, i32, [4 x i8] }>
%"class.vk::UniqueHandle.57" = type { %"class.vk::ObjectFree", %"class.vk::DeviceMemory" }
%"class.vk::ObjectFree" = type { %"class.vk::Device", %"class.vk::Optional", ptr }
%"class.vk::Device" = type { ptr }
%"class.vk::Optional" = type { ptr }
%"class.vk::DeviceMemory" = type { ptr }
%"struct.vk::MemoryAllocateInfo" = type <{ i32, [4 x i8], ptr, i64, i32, [4 x i8] }>

; 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: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv() local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14DeviceInstance22selectDeviceMemoryHeapEN2vk18MemoryRequirementsENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef byval(%"struct.vk::MemoryRequirements") align 8, i32) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14DeviceInstance29allocateDeviceMemoryForBufferERN2vk6BufferENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr dead_on_unwind noalias writable sret(%"class.vk::UniqueHandle.57") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %2, i32 %3) local_unnamed_addr #4 align 2 {
  %5 = alloca %"struct.vk::MemoryRequirements", align 8
  %6 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %7 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %8 = alloca %"class.vk::Optional", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %9 = getelementptr inbounds i8, ptr %1, i64 48
  %10 = tail call noundef ptr @_ZN2vk12UniqueHandleINS_6DeviceENS_20DispatchLoaderStaticEEptEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %.sroa.01.0.copyload = load ptr, ptr %2, align 8, !tbaa !5
  %11 = tail call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  call void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind nonnull writable sret(%"struct.vk::MemoryRequirements") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr %.sroa.01.0.copyload, ptr noundef nonnull align 8 dereferenceable(9) %11) #7
  %12 = call noundef i32 @_ZN14DeviceInstance22selectDeviceMemoryHeapEN2vk18MemoryRequirementsENS0_5FlagsINS0_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull byval(%"struct.vk::MemoryRequirements") align 8 %5, i32 %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZN2vk18MemoryAllocateInfoC2Emj(ptr noundef nonnull align 8 dereferenceable(28) %7, i64 noundef 0, i32 noundef 0) #7
  %13 = load i64, ptr %5, align 8, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo17setAllocationSizeEm(ptr noundef nonnull align 8 dereferenceable(28) %7, i64 noundef %13) #7
  %15 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo18setMemoryTypeIndexEj(ptr noundef nonnull align 8 dereferenceable(28) %14, i32 noundef %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %16 = call noundef ptr @_ZN2vk12UniqueHandleINS_6DeviceENS_20DispatchLoaderStaticEEptEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr null) #7
  %17 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  %18 = load ptr, ptr %8, align 8
  call void @_ZNK2vk6Device20allocateMemoryUniqueINS_20DispatchLoaderStaticEEENS_15ResultValueTypeINS_12UniqueHandleINS_12DeviceMemoryET_EEE4typeERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKS6_(ptr dead_on_unwind writable sret(%"class.vk::UniqueHandle.57") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(28) %6, ptr %18, ptr noundef nonnull align 8 dereferenceable(9) %17)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind noalias writable sret(%"struct.vk::MemoryRequirements") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(28) ptr @_ZN2vk18MemoryAllocateInfo17setAllocationSizeEm(ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK2vk6Device20allocateMemoryUniqueINS_20DispatchLoaderStaticEEENS_15ResultValueTypeINS_12UniqueHandleINS_12DeviceMemoryET_EEE4typeERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKS6_(ptr dead_on_unwind noalias writable sret(%"class.vk::UniqueHandle.57") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(28), ptr, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { alwaysinline 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 #6 = { alwaysinline 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 #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, !11, i64 0}
!10 = !{!"_ZTSN2vk18MemoryRequirementsE", !11, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !14, i64 8, i64 8, !5, i64 16, i64 8, !16, i64 24, i64 4, !17}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN2vk13StructureTypeE", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!12, !12, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass