	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_io_update_area             ## -- Begin function qxl_io_update_area
	.p2align	4, 0x90
_qxl_io_update_area:                    ## @qxl_io_update_area
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpl	$0, 32(%rsi)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	xorl	%r12d, %r12d
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%r15)
	jns	LBB0_5
	jmp	LBB0_8
LBB0_3:
	movl	(%rbx), %r12d
	cmpq	$0, (%r15)
	js	LBB0_8
LBB0_5:
	cmpq	$0, 8(%r15)
	js	LBB0_8
## %bb.6:
	movq	8(%rbx), %rax
	cmpq	%rax, 16(%r15)
	jg	LBB0_8
## %bb.7:
	movq	16(%rbx), %rax
	cmpq	%rax, 24(%r15)
	jle	LBB0_10
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	8(%r14), %rax
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	%xmm0, 8(%rax)
	movups	%xmm1, 24(%rax)
	movq	8(%r14), %rax
	movl	%r12d, (%rax)
	movq	_QXL_IO_UPDATE_AREA_ASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_wait_for_io_cmd_user
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got io update area with no hw surface\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QXL_IO_UPDATE_AREA_ASYNC,4,2   ## @QXL_IO_UPDATE_AREA_ASYNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_io_update_area             ; -- Begin function qxl_io_update_area
	.p2align	2
_qxl_io_update_area:                    ; @qxl_io_update_area
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1, #32]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_4
LBB0_2:
	mov	w22, #0
	ldr	x8, [x20]
	tbz	x8, #63, LBB0_5
	b	LBB0_8
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_2
LBB0_4:
	ldr	w22, [x21]
	ldr	x8, [x20]
	tbnz	x8, #63, LBB0_8
LBB0_5:
	ldr	x8, [x20, #8]
	tbnz	x8, #63, LBB0_8
; %bb.6:
	ldr	x8, [x21, #8]
	ldr	x9, [x20, #16]
	cmp	x9, x8
	b.gt	LBB0_8
; %bb.7:
	ldr	x8, [x21, #16]
	ldr	x9, [x20, #24]
	cmp	x9, x8
	b.le	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldp	q0, q1, [x20]
	stur	q1, [x8, #24]
	stur	q0, [x8, #8]
	ldr	x8, [x19, #8]
	str	w22, [x8]
Lloh5:
	adrp	x8, _QXL_IO_UPDATE_AREA_ASYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QXL_IO_UPDATE_AREA_ASYNC@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_wait_for_io_cmd_user
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got io update area with no hw surface\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QXL_IO_UPDATE_AREA_ASYNC,4,2   ; @QXL_IO_UPDATE_AREA_ASYNC
.subsections_via_symbols
