	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i845_check_cursor
_i845_check_cursor:                     ## @i845_check_cursor
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	32(%rsi), %r15
	callq	_intel_check_cursor
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	testq	%r15, %r15
	je	LBB0_12
## %bb.2:
	movq	%rbx, %rdi
	callq	_i845_cursor_size_ok
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpq	$0, 16(%rbx)
	je	LBB0_5
## %bb.6:
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setne	%dil
	jmp	LBB0_7
LBB0_3:
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	jmp	LBB0_10
LBB0_5:
	xorl	%edi, %edi
LBB0_7:
	callq	_WARN_ON
	movq	(%r15), %rax
	movl	(%rax), %esi
	leal	-256(%rsi), %eax
	roll	$24, %eax
	cmpl	$7, %eax
	ja	LBB0_9
## %bb.8:
	movl	$139, %ecx
	btl	%eax, %ecx
	jae	LBB0_9
## %bb.11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i845_cursor_ctl
	movl	%eax, (%rbx)
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DRM_DEBUG_KMS
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cursor dimension %dx%d not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid cursor stride (%u)\n"

	.no_dead_strip	_i845_check_cursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i845_check_cursor
_i845_check_cursor:                     ; @i845_check_cursor
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #32]
	bl	_intel_check_cursor
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
	cbz	x21, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_i845_cursor_size_ok
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	x9, [x21]
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, ne
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_1
LBB0_7:
	ldp	w2, w1, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_12
LBB0_8:
	mov	w0, #0
LBB0_9:
	bl	_WARN_ON
	ldr	x8, [x21]
	ldr	w1, [x8]
	sub	w8, w1, #256
	ror	w8, w8, #8
	cmp	w8, #7
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #139
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	bl	_i845_cursor_ctl
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_1
LBB0_11:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_12:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cursor dimension %dx%d not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid cursor stride (%u)\n"

	.no_dead_strip	_i845_check_cursor
.subsections_via_symbols
