	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp5_crtc_cursor_set
_mdp5_crtc_cursor_set:                  ## @mdp5_crtc_cursor_set
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_to_mdp5_crtc
	movq	%rax, %r12
	movl	8(%rbx), %edi
	callq	_to_mdp5_crtc_state
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_kms
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_mdp_ctl_flush_mask_cursor
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, 48(%r12)
	je	LBB0_9
## %bb.1:
	movq	%r13, %r12
	movq	_CURSOR_WIDTH@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	movq	-112(%rbp), %r13                ## 8-byte Reload
	jb	LBB0_10
## %bb.2:
	movq	_CURSOR_HEIGHT@GOTPCREL(%rip), %rcx
	cmpq	%r13, (%rcx)
	jb	LBB0_10
## %bb.3:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %r15
	testq	%r15, %r15
	je	LBB0_11
## %bb.4:
	cmpq	$0, (%rcx)
	jne	LBB0_11
## %bb.5:
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_18
## %bb.7:
	movq	%rax, %rcx
	movl	(%rbx), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	40(%rax), %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	_msm_gem_get_and_pin_iova
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_pm_runtime_get_sync
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 32(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, 24(%rax)
	movq	%r13, %rcx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, 16(%rax)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mdp5_crtc_restore_cursor
	movq	%rbx, %rdi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	$1, %ecx
	jmp	LBB0_16
LBB0_9:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	callq	_DRM_DEV_ERROR
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	callq	_DBG
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	$0, 40(%r14)
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_pm_runtime_get_sync
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
LBB0_16:
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_mdp5_ctl_set_cursor
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %ecx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_20
LBB0_18:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_crtc_flush
LBB0_20:
	movq	%r13, %rdi
	callq	_pm_runtime_put_sync
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.21:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_drm_flip_work_queue
	movq	_PENDING_CURSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_request_pending
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cursor_set is deprecated with cursor planes\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CURSOR_WIDTH,8,3               ## @CURSOR_WIDTH
	.comm	_CURSOR_HEIGHT,8,3              ## @CURSOR_HEIGHT
L_.str.1:                               ## @.str.1
	.asciz	"bad cursor size: %dx%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cursor off"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.3:                               ## @.str.3
	.asciz	"failed to %sable cursor: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"en"

L_.str.5:                               ## @.str.5
	.asciz	"dis"

	.comm	_PENDING_CURSOR,4,2             ## @PENDING_CURSOR
	.no_dead_strip	_mdp5_crtc_cursor_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp5_crtc_cursor_set
_mdp5_crtc_cursor_set:                  ; @mdp5_crtc_cursor_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x4
	mov	x26, x3
	str	x2, [sp, #24]                   ; 8-byte Folded Spill
	mov	x28, x1
	mov	x19, x0
	bl	_to_mdp5_crtc
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_to_mdp5_crtc_state
	mov	x23, x0
	ldr	x22, [x19]
	mov	x0, x19
	bl	_get_kms
	mov	x27, x0
	ldr	x21, [x0, #8]
	mov	w0, #0
	bl	_mdp_ctl_flush_mask_cursor
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _CURSOR_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CURSOR_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CURSOR_HEIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CURSOR_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x26
	ccmp	x9, x25, #0, hs
	b.hs	LBB0_4
; %bb.2:
	ldr	w0, [x22]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x26
	mov	x3, x25
	bl	_DRM_DEV_ERROR
	b	LBB0_6
LBB0_3:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_6
LBB0_4:
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_6
; %bb.5:
	ldr	x8, [x23]
	cbz	x8, LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	mov	x24, x0
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	cbz	x1, LBB0_13
; %bb.10:
	mov	x0, x28
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_16
; %bb.11:
	mov	x28, x0
	ldr	w1, [x27]
	add	x2, x20, #40
	bl	_msm_gem_get_and_pin_iova
	cbnz	w0, LBB0_6
; %bb.12:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x21
	bl	_pm_runtime_get_sync
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x27, [x20, #32]
	stp	x26, x28, [x20, #24]
	str	x25, [x20, #16]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x19
	bl	_mdp5_crtc_restore_cursor
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w3, #1
	b	LBB0_14
LBB0_13:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	str	xzr, [x20, #40]
	mov	x25, x21
	mov	x0, x21
	bl	_pm_runtime_get_sync
	mov	x27, #0
	mov	w3, #0
LBB0_14:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x23
	mov	w2, #0
	bl	_mdp5_ctl_set_cursor
	mov	x23, x0
	cbz	w0, LBB0_17
; %bb.15:
	ldr	w0, [x22]
Lloh14:
	adrp	x8, l_.str.4@PAGE
Lloh15:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh16:
	adrp	x9, l_.str.5@PAGE
Lloh17:
	add	x9, x9, l_.str.5@PAGEOFF
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	cmp	x10, #0
	csel	x2, x9, x8, eq
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x23
	bl	_DRM_DEV_ERROR
	b	LBB0_18
LBB0_16:
Lloh20:
	adrp	x8, _ENOENT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_17:
	mov	x0, x19
	mov	x1, x24
	bl	_crtc_flush
LBB0_18:
	mov	x0, x25
	bl	_pm_runtime_put_sync
	cbz	x27, LBB0_8
; %bb.19:
	mov	x0, x20
	mov	x1, x27
	bl	_drm_flip_work_queue
Lloh22:
	adrp	x8, _PENDING_CURSOR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PENDING_CURSOR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_request_pending
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cursor_set is deprecated with cursor planes\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CURSOR_WIDTH,8,3               ; @CURSOR_WIDTH
	.comm	_CURSOR_HEIGHT,8,3              ; @CURSOR_HEIGHT
l_.str.1:                               ; @.str.1
	.asciz	"bad cursor size: %dx%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cursor off"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.3:                               ; @.str.3
	.asciz	"failed to %sable cursor: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"en"

l_.str.5:                               ; @.str.5
	.asciz	"dis"

	.comm	_PENDING_CURSOR,4,2             ; @PENDING_CURSOR
	.no_dead_strip	_mdp5_crtc_cursor_set
.subsections_via_symbols
