	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_cursor_plane_update
_virtio_gpu_cursor_plane_update:        ## @virtio_gpu_cursor_plane_update
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r14
	movq	40(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_drm_crtc_to_virtio_gpu_output
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_2:
	xorl	%r15d, %r15d
LBB0_3:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_drm_crtc_to_virtio_gpu_output
	movq	%rax, %r15
LBB0_5:
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%rbx), %rax
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.8:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	callq	_to_virtio_gpu_framebuffer
	movq	%rax, %r14
	movq	8(%rax), %rax
	movl	(%rax), %edi
	callq	_gem_to_virtio_gpu_obj
	movq	16(%rax), %rsi
	cmpq	$0, 8(%rax)
	je	LBB0_15
## %bb.9:
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	16(%rax), %rcx
	cmpq	(%r12), %rcx
	je	LBB0_15
## %bb.10:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	24(%rax), %rdi
	callq	_cpu_to_le32
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r8
	xorl	%r9d, %r9d
	pushq	(%r14)
	pushq	$0
	callq	_virtio_gpu_cmd_transfer_to_host_2d
	addq	$16, %rsp
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_virtio_gpu_object_reserve
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	(%r13), %edi
	movq	(%r14), %rsi
	callq	_dma_resv_add_excl_fence
	movq	(%r14), %rdi
	callq	_dma_fence_put
	movq	$0, (%r14)
	movq	%r13, %rdi
	callq	_virtio_gpu_object_unreserve
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_virtio_gpu_object_wait
LBB0_12:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_13:
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_15:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_16:
	movq	(%rbx), %rdx
	movq	16(%rdx), %rax
	movq	(%rdx), %rcx
	movq	8(%rdx), %rdx
	cmpq	(%r12), %rax
	je	LBB0_19
## %bb.17:
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	(%rax), %r9
	movq	8(%rax), %r8
	jmp	LBB0_21
LBB0_19:
	leaq	L_.str.1(%rip), %rdi
	movq	%rdx, %rsi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_VIRTIO_GPU_CMD_MOVE_CURSOR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
	jmp	LBB0_25
LBB0_20:
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
LBB0_21:
	leaq	L_.str(%rip), %rdi
	movq	%rsi, %r12
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_VIRTIO_GPU_CMD_UPDATE_CURSOR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
	movq	%r12, %rdi
	callq	_cpu_to_le32
	movq	%rax, 40(%r15)
	movq	(%rbx), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	8(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, 32(%r15)
	movq	(%rbx), %rax
	movq	16(%rax), %rax
	movq	(%rax), %rdi
	jmp	LBB0_24
LBB0_23:
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	%rax, 32(%r15)
	xorl	%edi, %edi
LBB0_24:
	callq	_cpu_to_le32
	movq	%rax, 24(%r15)
LBB0_25:
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, 8(%r15)
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_virtio_gpu_cursor_ping         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update, handle %d, pos +%d+%d, hot %d,%d\n"

	.comm	_VIRTIO_GPU_CMD_UPDATE_CURSOR,8,3 ## @VIRTIO_GPU_CMD_UPDATE_CURSOR
L_.str.1:                               ## @.str.1
	.asciz	"move +%d+%d\n"

	.comm	_VIRTIO_GPU_CMD_MOVE_CURSOR,8,3 ## @VIRTIO_GPU_CMD_MOVE_CURSOR
	.no_dead_strip	_virtio_gpu_cursor_plane_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_gpu_cursor_plane_update
_virtio_gpu_cursor_plane_update:        ; @virtio_gpu_cursor_plane_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x20, x0
	ldp	x9, x8, [x0]
	ldr	x19, [x8]
	ldr	x0, [x9, #40]
	cbz	x0, LBB0_5
; %bb.1:
	bl	_drm_crtc_to_virtio_gpu_output
	mov	x21, x0
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_3
LBB0_2:
	bl	_drm_crtc_to_virtio_gpu_output
	mov	x21, x0
LBB0_3:
	cmp	x21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_6
; %bb.4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	mov	x21, #0
	ldr	x0, [x22, #8]
	cbnz	x0, LBB0_2
	b	LBB0_3
LBB0_6:
	ldr	x8, [x20]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_11
; %bb.7:
	bl	_to_virtio_gpu_framebuffer
	mov	x24, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_gem_to_virtio_gpu_obj
	ldp	x8, x23, [x0, #8]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	x8, [x20]
	ldr	x9, [x8, #16]
	ldr	x10, [x22]
	cmp	x9, x10
	b.eq	LBB0_12
; %bb.9:
	mov	x25, x0
	ldr	x0, [x8, #32]
	bl	_cpu_to_le32
	mov	x26, x0
	ldr	x8, [x20]
	ldr	x0, [x8, #24]
	bl	_cpu_to_le32
	mov	x4, x0
	ldr	x7, [x24]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #0
	mov	x3, x26
	mov	w5, #0
	mov	w6, #0
	bl	_virtio_gpu_cmd_transfer_to_host_2d
	mov	x0, x25
	mov	w1, #0
	bl	_virtio_gpu_object_reserve
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x25]
	ldr	x1, [x24]
	bl	_dma_resv_add_excl_fence
	ldr	x0, [x24]
	bl	_dma_fence_put
	str	xzr, [x24]
	mov	x0, x25
	bl	_virtio_gpu_object_unreserve
	mov	x0, x25
	mov	w1, #0
	bl	_virtio_gpu_object_wait
	b	LBB0_12
LBB0_11:
	mov	x23, #0
LBB0_12:
	ldr	x8, [x20]
	ldp	x2, x10, [x8, #8]
	ldr	x9, [x22]
	ldr	x8, [x8]
	cmp	x10, x9
	b.eq	LBB0_15
; %bb.13:
	cbz	x10, LBB0_16
; %bb.14:
	ldp	x10, x9, [x10]
	b	LBB0_17
LBB0_15:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x2
	mov	x2, x8
	bl	_DRM_DEBUG
Lloh2:
	adrp	x8, _VIRTIO_GPU_CMD_MOVE_CURSOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIRTIO_GPU_CMD_MOVE_CURSOR@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_cpu_to_le32
	str	x0, [x21, #16]
	b	LBB0_21
LBB0_16:
	mov	x9, #0
LBB0_17:
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DRM_DEBUG
Lloh7:
	adrp	x8, _VIRTIO_GPU_CMD_UPDATE_CURSOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VIRTIO_GPU_CMD_UPDATE_CURSOR@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
	bl	_cpu_to_le32
	str	x0, [x21, #16]
	mov	x0, x23
	bl	_cpu_to_le32
	str	x0, [x21, #40]
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_19
; %bb.18:
	ldr	x0, [x8, #8]
	bl	_cpu_to_le32
	str	x0, [x21, #32]
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	x0, [x8]
	b	LBB0_20
LBB0_19:
	mov	x0, #0
	bl	_cpu_to_le32
	str	x0, [x21, #32]
	mov	x0, #0
LBB0_20:
	bl	_cpu_to_le32
	str	x0, [x21, #24]
LBB0_21:
	ldr	x8, [x20]
	ldr	x0, [x8, #8]
	bl	_cpu_to_le32
	str	x0, [x21, #8]
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_cpu_to_le32
	str	x0, [x21]
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_virtio_gpu_cursor_ping
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update, handle %d, pos +%d+%d, hot %d,%d\n"

	.comm	_VIRTIO_GPU_CMD_UPDATE_CURSOR,8,3 ; @VIRTIO_GPU_CMD_UPDATE_CURSOR
l_.str.1:                               ; @.str.1
	.asciz	"move +%d+%d\n"

	.comm	_VIRTIO_GPU_CMD_MOVE_CURSOR,8,3 ; @VIRTIO_GPU_CMD_MOVE_CURSOR
	.no_dead_strip	_virtio_gpu_cursor_plane_update
.subsections_via_symbols
