	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qxl_framebuffer_surface_dirty
_qxl_framebuffer_surface_dirty:         ## @qxl_framebuffer_surface_dirty
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movq	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	(%rdi), %r14
	callq	_drm_modeset_lock_all
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_gem_to_qxl_bo
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	cmoveq	%rax, %rcx
	cmpl	$0, (%rcx)
	je	LBB0_5
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.3:
	movq	_DRM_MODE_FB_DIRTY_ANNOTATE_COPY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%r12d, (%rcx)
	sete	%dl
	setne	%cl
	shrl	%cl, %r15d
	movl	$2, %r10d
	subl	%edx, %r10d
	jmp	LBB0_4
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movl	12(%rbx), %ecx
	movl	%ecx, -68(%rbp)
	movl	8(%rbx), %ecx
	movl	%ecx, -72(%rbp)
	leaq	-72(%rbp), %r13
	movl	$1, %r15d
	movl	$1, %r10d
LBB0_4:
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	%r13, %r9
	pushq	$0
	pushq	%r10
	pushq	%r15
	callq	_qxl_draw_dirty_fb
	addq	$32, %rsp
LBB0_5:
	movq	(%rbx), %rdi
	callq	_drm_modeset_unlock_all
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FB_DIRTY_ANNOTATE_COPY,4,2 ## @DRM_MODE_FB_DIRTY_ANNOTATE_COPY
	.no_dead_strip	_qxl_framebuffer_surface_dirty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qxl_framebuffer_surface_dirty
_qxl_framebuffer_surface_dirty:         ; @qxl_framebuffer_surface_dirty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x24, x5
	mov	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x0, [x0]
	ldr	x23, [x0]
	bl	_drm_modeset_lock_all
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_gem_to_qxl_bo
	ldr	x8, [x0, #8]
	cmp	x8, #0
	csel	x8, x0, x8, eq
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x2, x0
	cbz	w24, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _DRM_MODE_FB_DIRTY_ANNOTATE_COPY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_FB_DIRTY_ANNOTATE_COPY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	cset	w8, ne
	lsr	w6, w24, w8
	mov	w8, #1
	cinc	w7, w8, ne
	b	LBB0_4
LBB0_3:
	stp	xzr, xzr, [sp, #16]
	ldr	d0, [x19, #8]
	str	d0, [sp, #8]
	add	x22, sp, #8
	mov	w6, #1
	mov	w7, #1
LBB0_4:
	str	wzr, [sp]
	mov	x0, x23
	mov	x1, x19
	mov	x3, x21
	mov	x4, x20
	mov	x5, x22
	bl	_qxl_draw_dirty_fb
LBB0_5:
	ldr	x0, [x19]
	bl	_drm_modeset_unlock_all
	mov	w0, #0
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FB_DIRTY_ANNOTATE_COPY,4,2 ; @DRM_MODE_FB_DIRTY_ANNOTATE_COPY
	.no_dead_strip	_qxl_framebuffer_surface_dirty
.subsections_via_symbols
