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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.VkCommandBufferAllocateInfo = type { i32, ptr, ptr, i32, i32 }
%struct.VkCommandBufferBeginInfo = type { i32, ptr, i32, ptr }
%struct.VkBufferCopy = type { i64, i64, i64 }
%struct.VkSubmitInfo = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, ptr }
%class.VulkanMemoryAllocator = type { ptr, ptr }
%class.PresentationManager = type { ptr, ptr, ptr, ptr, %struct.QueueFamilyIndices, ptr, i32, %struct.VkExtent2D, %"class.std::vector.23", i8, %"class.std::vector.28", %"class.std::vector.33", %struct.SwapChainSupportDetails }
%struct.QueueFamilyIndices = type { %"class.std::optional", %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<unsigned int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<unsigned int>::_Storage" = type { i32 }
%struct.VkExtent2D = type { i32, i32 }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.SwapChainSupportDetails = type { %struct.VkSurfaceCapabilitiesKHR, %"class.std::vector.38", %"class.std::vector.43" }
%struct.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl" }
%"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = type { %"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl" }
%"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare void @vkCmdCopyBuffer(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VulkanMemoryAllocator10copyBufferEP15VkCommandPool_TP9VkQueue_TP10VkBuffer_TS5_m(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5) #3 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.VkCommandBufferAllocateInfo, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.VkCommandBufferBeginInfo, align 8
  %16 = alloca %struct.VkBufferCopy, align 8
  %17 = alloca %struct.VkSubmitInfo, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  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 i64 %5, ptr %12, align 8, !tbaa !9
  %18 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 32, i1 false)
  %19 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %13, i32 0, i32 0
  store i32 40, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %13, i32 0, i32 3
  store i32 0, ptr %20, align 8, !tbaa !16
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %13, i32 0, i32 2
  store ptr %21, ptr %22, align 8, !tbaa !17
  %23 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %13, i32 0, i32 4
  store i32 1, ptr %23, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %24 = getelementptr inbounds %class.VulkanMemoryAllocator, ptr %18, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !19
  %26 = getelementptr inbounds %class.PresentationManager, ptr %25, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !21
  %28 = call i32 @vkAllocateCommandBuffers(ptr noundef %27, ptr noundef %13, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 32, i1 false)
  %29 = getelementptr inbounds %struct.VkCommandBufferBeginInfo, ptr %15, i32 0, i32 0
  store i32 42, ptr %29, align 8, !tbaa !54
  %30 = getelementptr inbounds %struct.VkCommandBufferBeginInfo, ptr %15, i32 0, i32 2
  store i32 1, ptr %30, align 8, !tbaa !56
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = call i32 @vkBeginCommandBuffer(ptr noundef %31, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 24, i1 false)
  %33 = getelementptr inbounds %struct.VkBufferCopy, ptr %16, i32 0, i32 0
  store i64 0, ptr %33, align 8, !tbaa !57
  %34 = getelementptr inbounds %struct.VkBufferCopy, ptr %16, i32 0, i32 1
  store i64 0, ptr %34, align 8, !tbaa !59
  %35 = load i64, ptr %12, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.VkBufferCopy, ptr %16, i32 0, i32 2
  store i64 %35, ptr %36, align 8, !tbaa !60
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vkCmdCopyBuffer(ptr noundef %37, ptr noundef %38, ptr noundef %39, i32 noundef 1, ptr noundef %16)
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = call i32 @vkEndCommandBuffer(ptr noundef %40)
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #4
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 72, i1 false)
  %42 = getelementptr inbounds %struct.VkSubmitInfo, ptr %17, i32 0, i32 0
  store i32 4, ptr %42, align 8, !tbaa !61
  %43 = getelementptr inbounds %struct.VkSubmitInfo, ptr %17, i32 0, i32 5
  store i32 1, ptr %43, align 8, !tbaa !63
  %44 = getelementptr inbounds %struct.VkSubmitInfo, ptr %17, i32 0, i32 6
  store ptr %14, ptr %44, align 8, !tbaa !64
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = call i32 @vkQueueSubmit(ptr noundef %45, i32 noundef 1, ptr noundef %17, ptr noundef null)
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call i32 @vkQueueWaitIdle(ptr noundef %47)
  %49 = getelementptr inbounds %class.VulkanMemoryAllocator, ptr %18, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds %class.PresentationManager, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  call void @vkFreeCommandBuffers(ptr noundef %52, ptr noundef %53, i32 noundef 1, ptr noundef %14)
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  ret void
}

declare i32 @vkAllocateCommandBuffers(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @vkBeginCommandBuffer(ptr noundef, ptr noundef) #2

declare i32 @vkEndCommandBuffer(ptr noundef) #2

declare i32 @vkQueueSubmit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i32 @vkQueueWaitIdle(ptr noundef) #2

declare void @vkFreeCommandBuffers(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 }

!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, !13, i64 0}
!12 = !{!"_ZTS27VkCommandBufferAllocateInfo", !13, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !15, i64 28}
!13 = !{!"_ZTS15VkStructureType", !7, i64 0}
!14 = !{!"_ZTS20VkCommandBufferLevel", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!12, !14, i64 24}
!17 = !{!12, !6, i64 16}
!18 = !{!12, !15, i64 28}
!19 = !{!20, !6, i64 8}
!20 = !{!"_ZTS21VulkanMemoryAllocator", !6, i64 0, !6, i64 8}
!21 = !{!22, !6, i64 24}
!22 = !{!"_ZTS19PresentationManager", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !23, i64 32, !6, i64 48, !29, i64 56, !30, i64 60, !31, i64 72, !28, i64 96, !35, i64 104, !39, i64 128, !43, i64 152}
!23 = !{!"_ZTS18QueueFamilyIndices", !24, i64 0, !24, i64 8}
!24 = !{!"_ZTSSt8optionalIjE", !25, i64 0}
!25 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !26, i64 0}
!26 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !27, i64 0}
!27 = !{!"_ZTSSt22_Optional_payload_baseIjE", !7, i64 0, !28, i64 4}
!28 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTS8VkFormat", !7, i64 0}
!30 = !{!"_ZTS10VkExtent2D", !15, i64 0, !15, i64 4}
!31 = !{!"_ZTSSt6vectorIP15VkFramebuffer_TSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorIP9VkImage_TSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIP9VkImage_TSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"_ZTSSt6vectorIP13VkImageView_TSaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIP13VkImageView_TSaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTS23SwapChainSupportDetails", !44, i64 0, !46, i64 56, !50, i64 80}
!44 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !15, i64 0, !15, i64 4, !30, i64 8, !30, i64 16, !30, i64 24, !15, i64 32, !15, i64 36, !45, i64 40, !15, i64 44, !15, i64 48}
!45 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !7, i64 0}
!46 = !{!"_ZTSSt6vectorI18VkSurfaceFormatKHRSaIS0_EE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!50 = !{!"_ZTSSt6vectorI16VkPresentModeKHRSaIS0_EE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!55, !13, i64 0}
!55 = !{!"_ZTS24VkCommandBufferBeginInfo", !13, i64 0, !6, i64 8, !15, i64 16, !6, i64 24}
!56 = !{!55, !15, i64 16}
!57 = !{!58, !10, i64 0}
!58 = !{!"_ZTS12VkBufferCopy", !10, i64 0, !10, i64 8, !10, i64 16}
!59 = !{!58, !10, i64 8}
!60 = !{!58, !10, i64 16}
!61 = !{!62, !13, i64 0}
!62 = !{!"_ZTS12VkSubmitInfo", !13, i64 0, !6, i64 8, !15, i64 16, !6, i64 24, !6, i64 32, !15, i64 40, !6, i64 48, !15, i64 56, !6, i64 64}
!63 = !{!62, !15, i64 40}
!64 = !{!62, !6, i64 48}


; 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.VkCommandBufferAllocateInfo = type { i32, ptr, ptr, i32, i32 }
%struct.VkCommandBufferBeginInfo = type { i32, ptr, i32, ptr }
%struct.VkBufferCopy = type { i64, i64, i64 }
%struct.VkSubmitInfo = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, ptr }

; 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare void @vkCmdCopyBuffer(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VulkanMemoryAllocator10copyBufferEP15VkCommandPool_TP9VkQueue_TP10VkBuffer_TS5_m(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5) local_unnamed_addr #3 align 2 {
  %7 = alloca %struct.VkCommandBufferAllocateInfo, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.VkCommandBufferBeginInfo, align 8
  %10 = alloca %struct.VkBufferCopy, align 8
  %11 = alloca %struct.VkSubmitInfo, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, i8 0, i64 16, i1 false)
  store i32 40, ptr %7, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %7, i64 24
  store i32 0, ptr %12, align 8, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %1, ptr %13, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %7, i64 28
  store i32 1, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = call i32 @vkAllocateCommandBuffers(ptr noundef %18, ptr noundef nonnull %7, ptr noundef nonnull %8)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, i8 0, i64 32, i1 false)
  store i32 42, ptr %9, align 8, !tbaa !51
  %20 = getelementptr inbounds i8, ptr %9, i64 16
  store i32 1, ptr %20, align 8, !tbaa !53
  %21 = load ptr, ptr %8, align 8, !tbaa !54
  %22 = call i32 @vkBeginCommandBuffer(ptr noundef %21, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  %23 = getelementptr inbounds i8, ptr %10, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  store i64 %5, ptr %23, align 8, !tbaa !55
  %24 = load ptr, ptr %8, align 8, !tbaa !54
  call void @vkCmdCopyBuffer(ptr noundef %24, ptr noundef %3, ptr noundef %4, i32 noundef 1, ptr noundef nonnull %10)
  %25 = load ptr, ptr %8, align 8, !tbaa !54
  %26 = call i32 @vkEndCommandBuffer(ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %11, i8 0, i64 72, i1 false)
  store i32 4, ptr %11, align 8, !tbaa !58
  %27 = getelementptr inbounds i8, ptr %11, i64 40
  store i32 1, ptr %27, align 8, !tbaa !60
  %28 = getelementptr inbounds i8, ptr %11, i64 48
  store ptr %8, ptr %28, align 8, !tbaa !61
  %29 = call i32 @vkQueueSubmit(ptr noundef %2, i32 noundef 1, ptr noundef nonnull %11, ptr noundef null)
  %30 = call i32 @vkQueueWaitIdle(ptr noundef %2)
  %31 = load ptr, ptr %15, align 8, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %31, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  call void @vkFreeCommandBuffers(ptr noundef %33, ptr noundef %1, i32 noundef 1, ptr noundef nonnull %8)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  ret void
}

declare i32 @vkAllocateCommandBuffers(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vkBeginCommandBuffer(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vkEndCommandBuffer(ptr noundef) local_unnamed_addr #2

declare i32 @vkQueueSubmit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vkQueueWaitIdle(ptr noundef) local_unnamed_addr #2

declare void @vkFreeCommandBuffers(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 }

!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, !7, i64 0}
!6 = !{!"_ZTS27VkCommandBufferAllocateInfo", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 28}
!7 = !{!"_ZTS15VkStructureType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS20VkCommandBufferLevel", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !11, i64 24}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !12, i64 28}
!16 = !{!17, !10, i64 8}
!17 = !{!"_ZTS21VulkanMemoryAllocator", !10, i64 0, !10, i64 8}
!18 = !{!19, !10, i64 24}
!19 = !{!"_ZTS19PresentationManager", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !20, i64 32, !10, i64 48, !26, i64 56, !27, i64 60, !28, i64 72, !25, i64 96, !32, i64 104, !36, i64 128, !40, i64 152}
!20 = !{!"_ZTS18QueueFamilyIndices", !21, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt8optionalIjE", !22, i64 0}
!22 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !23, i64 0}
!23 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !24, i64 0}
!24 = !{!"_ZTSSt22_Optional_payload_baseIjE", !8, i64 0, !25, i64 4}
!25 = !{!"bool", !8, i64 0}
!26 = !{!"_ZTS8VkFormat", !8, i64 0}
!27 = !{!"_ZTS10VkExtent2D", !12, i64 0, !12, i64 4}
!28 = !{!"_ZTSSt6vectorIP15VkFramebuffer_TSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!32 = !{!"_ZTSSt6vectorIP9VkImage_TSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIP9VkImage_TSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!36 = !{!"_ZTSSt6vectorIP13VkImageView_TSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP13VkImageView_TSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!40 = !{!"_ZTS23SwapChainSupportDetails", !41, i64 0, !43, i64 56, !47, i64 80}
!41 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !12, i64 0, !12, i64 4, !27, i64 8, !27, i64 16, !27, i64 24, !12, i64 32, !12, i64 36, !42, i64 40, !12, i64 44, !12, i64 48}
!42 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !8, i64 0}
!43 = !{!"_ZTSSt6vectorI18VkSurfaceFormatKHRSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!47 = !{!"_ZTSSt6vectorI16VkPresentModeKHRSaIS0_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!51 = !{!52, !7, i64 0}
!52 = !{!"_ZTS24VkCommandBufferBeginInfo", !7, i64 0, !10, i64 8, !12, i64 16, !10, i64 24}
!53 = !{!52, !12, i64 16}
!54 = !{!10, !10, i64 0}
!55 = !{!56, !57, i64 16}
!56 = !{!"_ZTS12VkBufferCopy", !57, i64 0, !57, i64 8, !57, i64 16}
!57 = !{!"long", !8, i64 0}
!58 = !{!59, !7, i64 0}
!59 = !{!"_ZTS12VkSubmitInfo", !7, i64 0, !10, i64 8, !12, i64 16, !10, i64 24, !10, i64 32, !12, i64 40, !10, i64 48, !12, i64 56, !10, i64 64}
!60 = !{!59, !12, i64 40}
!61 = !{!59, !10, i64 48}


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