	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_primary_plane_update
_virtio_gpu_primary_plane_update:       ## @virtio_gpu_primary_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, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r13
	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	(%rbx), %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
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r14), %rax
	movq	32(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.8:
	cmpq	$0, 8(%r15)
	je	LBB0_12
## %bb.9:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	callq	_to_virtio_gpu_framebuffer
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_gem_to_virtio_gpu_obj
	movq	8(%rax), %r12
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.10:
	movq	%rax, %r13
	movq	(%r14), %rax
	movswl	2(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	(%r14), %rax
	movswl	6(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r14), %rax
	movswl	10(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, %ebx
	movq	(%r14), %rax
	movswl	14(%rax), %edi
	callq	_cpu_to_le32
                                        ## kill: def $eax killed $eax def $rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rdi, %r13
	xorl	%edx, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%ebx, %r9d
	pushq	$0
	pushq	%rax
	callq	_virtio_gpu_cmd_transfer_to_host_2d
	addq	$16, %rsp
	jmp	LBB0_14
LBB0_12:
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_13:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_14:
	movq	(%r14), %rax
	movl	28(%rax), %edx
	movl	24(%rax), %ecx
	movl	16(%rax), %r9d
	movl	20(%rax), %r8d
	movswl	2(%rax), %r10d
	movswl	6(%rax), %r11d
	movswl	10(%rax), %ebx
	movswl	14(%rax), %eax
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	pushq	%rax
	pushq	%rbx
	pushq	%r11
	pushq	%r10
	callq	_DRM_DEBUG
	addq	$32, %rsp
	movl	(%r15), %esi
	movq	(%r14), %rax
	movswl	2(%rax), %ecx
	movswl	6(%rax), %r8d
	movswl	10(%rax), %r9d
	movswl	14(%rax), %eax
	subq	$8, %rsp
	movq	%r13, %rdi
	movq	%r12, %rdx
	pushq	%rax
	callq	_virtio_gpu_cmd_set_scanout
	addq	$16, %rsp
	testq	%r12, %r12
	je	LBB0_6
## %bb.15:
	movq	(%r14), %rax
	movswl	10(%rax), %edx
	movswl	14(%rax), %ecx
	movswl	2(%rax), %r8d
	movswl	6(%rax), %r9d
	movq	%r13, %rdi
	movq	%r12, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_virtio_gpu_cmd_resource_flush  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n"

	.no_dead_strip	_virtio_gpu_primary_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_primary_plane_update
_virtio_gpu_primary_plane_update:       ; @virtio_gpu_primary_plane_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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]
	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
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	mov	x21, #0
	ldr	x0, [x22]
	cbnz	x0, LBB0_2
	b	LBB0_3
LBB0_6:
	ldr	x8, [x20]
	ldr	x0, [x8, #32]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_10
; %bb.8:
	bl	_to_virtio_gpu_framebuffer
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_gem_to_virtio_gpu_obj
	ldp	x8, x22, [x0]
	cbz	x8, LBB0_11
; %bb.9:
	mov	x23, x0
	ldr	x8, [x20]
	ldrsh	w0, [x8, #2]
	bl	_cpu_to_le32
	mov	x24, x0
	ldr	x8, [x20]
	ldrsh	w0, [x8, #6]
	bl	_cpu_to_le32
	mov	x25, x0
	ldr	x8, [x20]
	ldrsh	w0, [x8, #10]
	bl	_cpu_to_le32
	mov	x26, x0
	ldr	x8, [x20]
	ldrsh	w0, [x8, #14]
	bl	_cpu_to_le32
	mov	x6, x0
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	mov	x3, x24
	mov	x4, x25
	mov	x5, x26
	mov	x7, #0
	bl	_virtio_gpu_cmd_transfer_to_host_2d
	b	LBB0_11
LBB0_10:
	mov	x22, #0
LBB0_11:
	ldr	x8, [x20]
	ldp	w3, w2, [x8, #24]
	ldp	w5, w4, [x8, #16]
	ldrsh	w6, [x8, #2]
	ldrsh	w7, [x8, #6]
	ldrsh	w9, [x8, #10]
	ldrsh	w8, [x8, #14]
	stp	w9, w8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG
	ldr	w1, [x21]
	ldr	x8, [x20]
	ldrsh	w3, [x8, #2]
	ldrsh	w4, [x8, #6]
	ldrsh	w5, [x8, #10]
	ldrsh	w6, [x8, #14]
	mov	x0, x19
	mov	x2, x22
	bl	_virtio_gpu_cmd_set_scanout
	cbz	x22, LBB0_4
; %bb.12:
	ldr	x8, [x20]
	ldrsh	w2, [x8, #10]
	ldrsh	w3, [x8, #14]
	ldrsh	w4, [x8, #2]
	ldrsh	w5, [x8, #6]
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_virtio_gpu_cmd_resource_flush
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n"

	.no_dead_strip	_virtio_gpu_primary_plane_update
.subsections_via_symbols
