	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vulkan_readback
_vulkan_readback:                       ## @vulkan_readback
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$0, -48(%rbp)
	leaq	-112(%rbp), %rsi
	callq	_vulkan_viewport_info
	leaq	-88(%rbp), %r14
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	callq	_memset
	movq	_VK_IMAGE_ASPECT_COLOR_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	$1, -68(%rbp)
	movaps	-112(%rbp), %xmm0
	movups	%xmm0, -84(%rbp)
	movl	$1, -88(%rbp)
	movq	32(%r12), %r15
	movq	24(%r12), %rax
	movq	(%rax), %rbx
	shlq	$4, %rbx
	leaq	(%r15,%rbx), %rsi
	movq	(%r15,%rbx), %rax
	movq	_VK_NULL_HANDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r13, %rsi
	movl	16(%r12), %ecx
	movl	20(%r12), %edx
	movq	_VK_FORMAT_B8G8R8A8_UNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_VULKAN_TEXTURE_READBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r12, %rdi
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	$0
	callq	_vulkan_create_texture
	addq	$16, %rsp
	movl	%edx, %ecx
	movq	%rax, (%r15,%rbx)
	movl	%edx, 8(%r15,%rbx)
	movl	(%r12), %edi
	movq	8(%r12), %rax
	movl	(%rax), %esi
	movq	_VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %r8d
	movq	%r14, %r9
	callq	_vkCmdCopyImageToBuffer
	movq	_VK_ACCESS_TRANSFER_WRITE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_VK_ACCESS_HOST_READ_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	(%r12), %edi
	movq	_VK_PIPELINE_STAGE_TRANSFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VK_PIPELINE_STAGE_HOST_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %r9
	xorl	%ecx, %ecx
	movl	$1, %r8d
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_vkCmdPipelineBarrier
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VK_STRUCTURE_TYPE_MEMORY_BARRIER,4,2 ## @VK_STRUCTURE_TYPE_MEMORY_BARRIER
	.comm	_VK_IMAGE_ASPECT_COLOR_BIT,4,2  ## @VK_IMAGE_ASPECT_COLOR_BIT
	.comm	_VK_NULL_HANDLE,8,3             ## @VK_NULL_HANDLE
	.comm	_VK_FORMAT_B8G8R8A8_UNORM,4,2   ## @VK_FORMAT_B8G8R8A8_UNORM
	.comm	_VULKAN_TEXTURE_READBACK,4,2    ## @VULKAN_TEXTURE_READBACK
	.comm	_VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,4,2 ## @VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
	.comm	_VK_ACCESS_TRANSFER_WRITE_BIT,4,2 ## @VK_ACCESS_TRANSFER_WRITE_BIT
	.comm	_VK_ACCESS_HOST_READ_BIT,4,2    ## @VK_ACCESS_HOST_READ_BIT
	.comm	_VK_PIPELINE_STAGE_TRANSFER_BIT,4,2 ## @VK_PIPELINE_STAGE_TRANSFER_BIT
	.comm	_VK_PIPELINE_STAGE_HOST_BIT,4,2 ## @VK_PIPELINE_STAGE_HOST_BIT
	.no_dead_strip	_vulkan_readback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vulkan_readback
_vulkan_readback:                       ; @vulkan_readback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #24]
	add	x1, sp, #32
	bl	_vulkan_viewport_info
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #28
	bl	_memset
Lloh0:
	adrp	x8, _VK_IMAGE_ASPECT_COLOR_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VK_IMAGE_ASPECT_COLOR_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [sp, #68]
	ldr	q0, [sp, #32]
	stur	q0, [sp, #52]
	str	w9, [sp, #48]
	ldp	x9, x8, [x19, #24]
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #4
Lloh3:
	adrp	x8, _VK_NULL_HANDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VK_NULL_HANDLE@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x8
	csel	x1, xzr, x20, eq
	ldp	w3, w2, [x19, #16]
Lloh6:
	adrp	x8, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x8, _VULKAN_TEXTURE_READBACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VULKAN_TEXTURE_READBACK@GOTPAGEOFF]
Lloh11:
	ldr	w7, [x8]
	mov	x0, x19
	mov	x5, #0
	mov	x6, #0
	bl	_vulkan_create_texture
	mov	x3, x1
	stp	x0, x1, [x20]
	ldr	w0, [x19]
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x5, sp, #48
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #1
	bl	_vkCmdCopyImageToBuffer
Lloh15:
	adrp	x8, _VK_ACCESS_TRANSFER_WRITE_BIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VK_ACCESS_TRANSFER_WRITE_BIT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _VK_ACCESS_HOST_READ_BIT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VK_ACCESS_HOST_READ_BIT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _VK_PIPELINE_STAGE_TRANSFER_BIT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VK_PIPELINE_STAGE_TRANSFER_BIT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _VK_PIPELINE_STAGE_HOST_BIT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VK_PIPELINE_STAGE_HOST_BIT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	str	xzr, [sp, #8]
	str	wzr, [sp]
	add	x5, sp, #16
	mov	w3, #0
	mov	w4, #1
	mov	w6, #0
	mov	x7, #0
	bl	_vkCmdPipelineBarrier
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VK_STRUCTURE_TYPE_MEMORY_BARRIER,4,2 ; @VK_STRUCTURE_TYPE_MEMORY_BARRIER
	.comm	_VK_IMAGE_ASPECT_COLOR_BIT,4,2  ; @VK_IMAGE_ASPECT_COLOR_BIT
	.comm	_VK_NULL_HANDLE,8,3             ; @VK_NULL_HANDLE
	.comm	_VK_FORMAT_B8G8R8A8_UNORM,4,2   ; @VK_FORMAT_B8G8R8A8_UNORM
	.comm	_VULKAN_TEXTURE_READBACK,4,2    ; @VULKAN_TEXTURE_READBACK
	.comm	_VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,4,2 ; @VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
	.comm	_VK_ACCESS_TRANSFER_WRITE_BIT,4,2 ; @VK_ACCESS_TRANSFER_WRITE_BIT
	.comm	_VK_ACCESS_HOST_READ_BIT,4,2    ; @VK_ACCESS_HOST_READ_BIT
	.comm	_VK_PIPELINE_STAGE_TRANSFER_BIT,4,2 ; @VK_PIPELINE_STAGE_TRANSFER_BIT
	.comm	_VK_PIPELINE_STAGE_HOST_BIT,4,2 ; @VK_PIPELINE_STAGE_HOST_BIT
	.no_dead_strip	_vulkan_readback
.subsections_via_symbols
