	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crtc_update_cursor
_intel_crtc_update_cursor:              ## @intel_crtc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	16(%rdi), %r13
	callq	_to_intel_crtc
	movl	4(%rax), %edx
	movl	8(%rax), %r14d
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	movq	%r13, %rbx
	je	LBB0_8
## %bb.5:
	xorl	%esi, %esi
	movl	$0, %r12d
	cmpl	8(%rcx), %edx
	jg	LBB0_7
## %bb.6:
	movl	12(%rax), %r12d
LBB0_7:
	cmpl	(%rcx), %r14d
	cmovgl	%esi, %r12d
	testl	%edx, %edx
	jns	LBB0_9
	jmp	LBB0_10
LBB0_1:
	movq	%r13, %rbx
LBB0_8:
	testl	%edx, %edx
	js	LBB0_10
LBB0_9:
	movq	_CURSOR_X_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_3:
	movq	%r13, %rbx
	testl	%edx, %edx
	jns	LBB0_9
LBB0_10:
	movslq	%edx, %rcx
	xorl	%esi, %esi
	addq	16(%rax), %rcx
	cmovsl	%esi, %r12d
	movq	_CURSOR_POS_SIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CURSOR_X_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	%cl, %esi
	negl	%edx
LBB0_11:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movl	(%rax), %r13d
	orl	%esi, %edx
	testl	%r14d, %r14d
	js	LBB0_14
## %bb.12:
	movq	_CURSOR_Y_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_13
LBB0_14:
	movslq	%r14d, %rsi
	movq	_CURSOR_POS_SIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_CURSOR_Y_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	%cl, %edi
	orl	%edi, %edx
	negl	%r14d
	addq	24(%rax), %rsi
	js	LBB0_15
LBB0_13:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	orl	%edx, %r14d
	testl	%r12d, %r12d
	jne	LBB0_17
	jmp	LBB0_16
LBB0_15:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	orl	%edx, %r14d
LBB0_16:
	xorl	%r12d, %r12d
	cmpl	$0, 32(%rax)
	je	LBB0_22
LBB0_17:
	movq	%rbx, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	jne	LBB0_23
## %bb.18:
	movq	%rbx, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	je	LBB0_19
LBB0_23:
	movl	%r13d, %edi
	callq	_CURPOS_IVB
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movq	%r15, %rdi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivb_update_cursor              ## TAILCALL
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	%r13d, %edi
	callq	_CURPOS
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movq	%rbx, %rdi
	callq	_IS_845G
	testq	%rax, %rax
	jne	LBB0_24
## %bb.20:
	movq	%rbx, %rdi
	callq	_IS_I865G
	testq	%rax, %rax
	je	LBB0_21
LBB0_24:
	movq	%r15, %rdi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i845_update_cursor             ## TAILCALL
LBB0_21:
	movq	%r15, %rdi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i9xx_update_cursor             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CURSOR_POS_SIGN,4,2            ## @CURSOR_POS_SIGN
	.comm	_CURSOR_X_SHIFT,4,2             ## @CURSOR_X_SHIFT
	.comm	_CURSOR_Y_SHIFT,4,2             ## @CURSOR_Y_SHIFT
	.no_dead_strip	_intel_crtc_update_cursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crtc_update_cursor
_intel_crtc_update_cursor:              ; @intel_crtc_update_cursor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #16]
	bl	_to_intel_crtc
	ldp	w9, w8, [x0, #4]
	cbz	w21, LBB0_5
; %bb.1:
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_4
; %bb.2:
	ldr	x10, [x19]
	cbz	x10, LBB0_7
; %bb.3:
	ldr	w11, [x0, #12]
	ldr	w12, [x10, #8]
	cmp	w9, w12
	ldr	w10, [x10]
	ccmp	w8, w10, #0, le
	csel	w21, wzr, w11, gt
	tbz	w9, #31, LBB0_6
	b	LBB0_8
LBB0_4:
	mov	w21, #0
LBB0_5:
	tbnz	w9, #31, LBB0_8
LBB0_6:
	mov	w11, #0
Lloh0:
	adrp	x10, _CURSOR_X_SHIFT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CURSOR_X_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	b	LBB0_9
LBB0_7:
	mov	w21, #0
	tbz	w9, #31, LBB0_6
LBB0_8:
	sxtw	x10, w9
	ldr	x11, [x0, #16]
	add	x10, x11, x10
	cmp	x10, #0
	csel	w21, wzr, w21, lt
Lloh3:
	adrp	x10, _CURSOR_POS_SIGN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CURSOR_POS_SIGN@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x10]
Lloh6:
	adrp	x10, _CURSOR_X_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CURSOR_X_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w11, w11, w10
	neg	w9, w9
LBB0_9:
	ldr	w22, [x0]
	lsl	w9, w9, w10
	orr	w9, w9, w11
	tbnz	w8, #31, LBB0_11
; %bb.10:
Lloh9:
	adrp	x10, _CURSOR_Y_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CURSOR_Y_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	b	LBB0_12
LBB0_11:
	sxtw	x10, w8
	ldr	x11, [x0, #24]
	add	x11, x11, x10
Lloh12:
	adrp	x10, _CURSOR_POS_SIGN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CURSOR_POS_SIGN@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x10]
Lloh15:
	adrp	x10, _CURSOR_Y_SHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CURSOR_Y_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsl	w12, w12, w10
	orr	w9, w12, w9
	neg	w8, w8
	tbnz	x11, #63, LBB0_18
LBB0_12:
	lsl	w8, w8, w10
	orr	w23, w8, w9
	cbnz	w21, LBB0_15
; %bb.13:
	ldr	w8, [x0, #32]
	cbz	w8, LBB0_19
LBB0_14:
	mov	w21, #0
LBB0_15:
	mov	x0, x20
	bl	_IS_IVYBRIDGE
	cbnz	x0, LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_IS_HASWELL
	cbz	x0, LBB0_20
LBB0_17:
	mov	x0, x22
	bl	_CURPOS_IVB
	mov	x1, x23
	bl	_I915_WRITE
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ivb_update_cursor
LBB0_18:
	lsl	w8, w8, w10
	orr	w23, w8, w9
	ldr	w8, [x0, #32]
	cbnz	w8, LBB0_14
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x0, x22
	bl	_CURPOS
	mov	x1, x23
	bl	_I915_WRITE
	mov	x0, x20
	bl	_IS_845G
	cbnz	x0, LBB0_22
; %bb.21:
	mov	x0, x20
	bl	_IS_I865G
	cbz	x0, LBB0_23
LBB0_22:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_i845_update_cursor
LBB0_23:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_i9xx_update_cursor
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CURSOR_POS_SIGN,4,2            ; @CURSOR_POS_SIGN
	.comm	_CURSOR_X_SHIFT,4,2             ; @CURSOR_X_SHIFT
	.comm	_CURSOR_Y_SHIFT,4,2             ; @CURSOR_Y_SHIFT
	.no_dead_strip	_intel_crtc_update_cursor
.subsections_via_symbols
