	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i9xx_update_cursor
_i9xx_update_cursor:                    ## @i9xx_update_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	%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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	32(%rdi), %edi
	callq	_to_i915
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r13d
	testq	%r14, %r14
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	cmpq	$0, 16(%r14)
	je	LBB0_1
## %bb.3:
	movl	(%r14), %r15d
	movq	%rbx, %rdi
	callq	_i9xx_cursor_ctl_crtc
	orl	%r15d, %eax
	movslq	%eax, %r15
	movslq	8(%r14), %rax
	movq	_CUR_FBC_CTL_EN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	decq	%rdx
	orq	%rcx, %rdx
	xorl	%ebx, %ebx
	cmpl	12(%r14), %eax
	cmovneq	%rdx, %rbx
	movq	%r14, %rdi
	callq	_intel_cursor_base
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_intel_cursor_position
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
LBB0_4:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jl	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_skl_write_cursor_wm
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 8(%r12)
	jne	LBB0_9
## %bb.7:
	cmpq	%rbx, 16(%r12)
	jne	LBB0_9
## %bb.8:
	cmpq	%r15, 24(%r12)
	je	LBB0_12
LBB0_9:
	movq	%r14, %rdi
	callq	_HAS_CUR_FBC
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	%r13d, %edi
	callq	_CUR_FBC_CTL
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_I915_WRITE_FW
LBB0_11:
	movl	%r13d, %edi
	callq	_CURCNTR
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_I915_WRITE_FW
	movl	%r13d, %edi
	callq	_CURPOS
	movl	%eax, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_I915_WRITE_FW
	movl	%r13d, %edi
	callq	_CURBASE
	movl	%eax, %edi
	movq	%rbx, %r13
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_I915_WRITE_FW
	movq	%rbx, 8(%r12)
	movq	%r13, 16(%r12)
	movq	%r15, 24(%r12)
LBB0_13:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_12:
	movl	%r13d, %edi
	callq	_CURPOS
	movl	%eax, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_I915_WRITE_FW
	movl	%r13d, %edi
	callq	_CURBASE
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_I915_WRITE_FW
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CUR_FBC_CTL_EN,4,2             ## @CUR_FBC_CTL_EN
	.no_dead_strip	_i9xx_update_cursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i9xx_update_cursor
_i9xx_update_cursor:                    ; @i9xx_update_cursor
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x25, x2
	mov	x26, x1
	mov	x20, x0
	ldr	w0, [x0, #32]
	bl	_to_i915
	mov	x19, x0
	ldr	w21, [x20]
	cbz	x25, LBB0_3
; %bb.1:
	ldr	x8, [x25, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w22, [x25]
	mov	x0, x26
	bl	_i9xx_cursor_ctl_crtc
	orr	w8, w0, w22
	sxtw	x22, w8
Lloh0:
	adrp	x8, _CUR_FBC_CTL_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CUR_FBC_CTL_EN@GOTPAGEOFF]
	ldp	w9, w10, [x25, #8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
Lloh2:
	ldrsw	x8, [x8]
	sub	x11, x9, #1
	orr	x8, x8, x11
	cmp	w9, w10
	csel	x24, xzr, x8, eq
	mov	x0, x25
	bl	_intel_cursor_base
	mov	x23, x0
	mov	x0, x25
	bl	_intel_cursor_position
	mov	x25, x0
	b	LBB0_6
LBB0_3:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_5
LBB0_4:
	mov	x22, #0
	mov	x23, #0
	mov	x25, #0
LBB0_5:
	mov	x24, #0
LBB0_6:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #9
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x26
	bl	_skl_write_cursor_wm
LBB0_8:
	ldr	x8, [x20, #8]
	cmp	x8, x23
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #16]
	cmp	x8, x24
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x20, #24]
	cmp	x8, x22
	b.eq	LBB0_15
LBB0_11:
	mov	x0, x19
	bl	_HAS_CUR_FBC
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_CUR_FBC_CTL
	mov	x1, x24
	bl	_I915_WRITE_FW
LBB0_13:
	mov	x0, x21
	bl	_CURCNTR
	mov	x1, x22
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_CURPOS
	mov	x1, x25
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_CURBASE
	mov	x1, x23
	bl	_I915_WRITE_FW
	stp	x23, x24, [x20, #8]
	str	x22, [x20, #24]
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_15:
	mov	x0, x21
	bl	_CURPOS
	mov	x1, x25
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_CURBASE
	mov	x1, x23
	bl	_I915_WRITE_FW
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CUR_FBC_CTL_EN,4,2             ; @CUR_FBC_CTL_EN
	.no_dead_strip	_i9xx_update_cursor
.subsections_via_symbols
