	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp5_crtc_restore_cursor
_mdp5_crtc_restore_cursor:              ## @mdp5_crtc_restore_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DRM_FORMAT_ARGB8888@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_drm_format_info
	movq	%rax, %r13
	movl	4(%r14), %edi
	callq	_to_mdp5_crtc_state
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_mdp5_crtc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_get_kms
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_CURSOR_ALPHA_PER_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	leaq	20(%r15), %rdi
	callq	_assert_spin_locked
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%r15), %r12d
	movl	4(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	(%r13), %rax
	movl	(%rax), %r13d
	leaq	-60(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_roi
	movslq	(%r15), %rdi
	xorl	%ebx, %ebx
	movl	$0, %eax
	testq	%rdi, %rdi
	jns	LBB0_2
## %bb.1:
	callq	_abs
	xorl	%ebx, %ebx
                                        ## kill: def $eax killed $eax def $rax
	xorl	%r12d, %r12d
LBB0_2:
	movslq	4(%r15), %rdi
	testq	%rdi, %rdi
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	jns	LBB0_4
## %bb.3:
	movq	%rax, %r12
	callq	_abs
	movl	%eax, %ebx
	movq	%r12, %rax
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	imull	-52(%rbp), %r13d                ## 4-byte Folded Reload
	movl	(%r14), %esi
	movl	-60(%rbp), %r8d
	movl	-56(%rbp), %r9d
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	pushq	%rbx
	pushq	%rax
	callq	_DBG
	addq	$16, %rsp
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_REG_MDP5_LM_CURSOR_STRIDE
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_mdp5_write
	movl	%ebx, %edi
	callq	_REG_MDP5_LM_CURSOR_FORMAT
	movl	%ebx, %r13d
	movl	%eax, %ebx
	movq	_CURSOR_FMT_ARGB8888@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MDP5_LM_CURSOR_FORMAT_FORMAT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mdp5_write
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_IMG_SIZE
	movl	%eax, %r14d
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_MDP5_LM_CURSOR_IMG_SIZE_SRC_H
	movl	%eax, %ebx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_MDP5_LM_CURSOR_IMG_SIZE_SRC_W
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mdp5_write
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_SIZE
	movl	%eax, %r14d
	movl	-56(%rbp), %edi
	callq	_MDP5_LM_CURSOR_SIZE_ROI_H
	movl	%eax, %ebx
	movl	-60(%rbp), %edi
	callq	_MDP5_LM_CURSOR_SIZE_ROI_W
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mdp5_write
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_START_XY
	movl	%eax, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MDP5_LM_CURSOR_START_XY_Y_START
	movl	%eax, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MDP5_LM_CURSOR_START_XY_X_START
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mdp5_write
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_XY
	movl	%eax, %r14d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_MDP5_LM_CURSOR_XY_SRC_Y
	movl	%eax, %ebx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_MDP5_LM_CURSOR_XY_SRC_X
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mdp5_write
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_BASE_ADDR
	movl	16(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mdp5_write
	movq	_MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	callq	_MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL
	orl	%eax, %ebx
	movl	%r13d, %edi
	callq	_REG_MDP5_LM_CURSOR_BLEND_CONFIG
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_mdp5_write
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_ARGB8888,4,2        ## @DRM_FORMAT_ARGB8888
	.comm	_CURSOR_ALPHA_PER_PIXEL,4,2     ## @CURSOR_ALPHA_PER_PIXEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d"

	.comm	_CURSOR_FMT_ARGB8888,4,2        ## @CURSOR_FMT_ARGB8888
	.comm	_MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN,4,2 ## @MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN
	.no_dead_strip	_mdp5_crtc_restore_cursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp5_crtc_restore_cursor
_mdp5_crtc_restore_cursor:              ; @mdp5_crtc_restore_cursor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
Lloh0:
	adrp	x8, _DRM_FORMAT_ARGB8888@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_FORMAT_ARGB8888@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_drm_format_info
	mov	x23, x0
	ldr	w0, [x20, #4]
	bl	_to_mdp5_crtc_state
	mov	x21, x0
	mov	x0, x20
	bl	_to_mdp5_crtc
	mov	x22, x0
	mov	x0, x20
	bl	_get_kms
	mov	x19, x0
Lloh3:
	adrp	x8, _CURSOR_ALPHA_PER_PIXEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CURSOR_ALPHA_PER_PIXEL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	add	x0, x22, #20
	bl	_assert_spin_locked
	ldr	x8, [x21]
	ldr	w21, [x8]
	ldp	w24, w25, [x22]
	ldp	w27, w8, [x22, #8]
	str	w8, [sp]                        ; 4-byte Folded Spill
	ldr	x8, [x23]
	ldr	w28, [x8]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x20
	bl	_get_roi
	ldrsw	x0, [x22]
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	w23, #0
	ldrsw	x0, [x22, #4]
	tbnz	w0, #31, LBB0_4
LBB0_2:
	mov	w26, #0
	b	LBB0_5
LBB0_3:
	bl	_abs
	mov	x23, x0
	mov	w24, #0
	ldrsw	x0, [x22, #4]
	tbz	w0, #31, LBB0_2
LBB0_4:
	bl	_abs
	mov	x26, x0
	mov	w25, #0
LBB0_5:
	mul	w28, w28, w27
	ldr	w1, [x20]
	ldp	w5, w4, [sp, #8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x24
	mov	x3, x25
	mov	x6, x23
	mov	x7, x26
	bl	_DBG
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_STRIDE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x28
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_FORMAT
	mov	x20, x0
Lloh8:
	adrp	x8, _CURSOR_FMT_ARGB8888@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CURSOR_FMT_ARGB8888@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_MDP5_LM_CURSOR_FORMAT_FORMAT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_IMG_SIZE
	mov	x20, x0
	ldr	w0, [sp]                        ; 4-byte Folded Reload
	bl	_MDP5_LM_CURSOR_IMG_SIZE_SRC_H
	mov	x28, x0
	mov	x0, x27
	bl	_MDP5_LM_CURSOR_IMG_SIZE_SRC_W
	orr	w2, w0, w28
	mov	x0, x19
	mov	x1, x20
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_SIZE
	mov	x20, x0
	ldr	w0, [sp, #8]
	bl	_MDP5_LM_CURSOR_SIZE_ROI_H
	mov	x27, x0
	ldr	w0, [sp, #12]
	bl	_MDP5_LM_CURSOR_SIZE_ROI_W
	orr	w2, w0, w27
	mov	x0, x19
	mov	x1, x20
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_START_XY
	mov	x20, x0
	mov	x0, x25
	bl	_MDP5_LM_CURSOR_START_XY_Y_START
	mov	x25, x0
	mov	x0, x24
	bl	_MDP5_LM_CURSOR_START_XY_X_START
	orr	w2, w0, w25
	mov	x0, x19
	mov	x1, x20
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_XY
	mov	x20, x0
	mov	x0, x26
	bl	_MDP5_LM_CURSOR_XY_SRC_Y
	mov	x24, x0
	mov	x0, x23
	bl	_MDP5_LM_CURSOR_XY_SRC_X
	orr	w2, w0, w24
	mov	x0, x19
	mov	x1, x20
	bl	_mdp5_write
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_BASE_ADDR
	mov	x1, x0
	ldr	w2, [x22, #16]
	mov	x0, x19
	bl	_mdp5_write
Lloh11:
	adrp	x8, _MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	bl	_MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL
	orr	w20, w0, w20
	mov	x0, x21
	bl	_REG_MDP5_LM_CURSOR_BLEND_CONFIG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_mdp5_write
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_ARGB8888,4,2        ; @DRM_FORMAT_ARGB8888
	.comm	_CURSOR_ALPHA_PER_PIXEL,4,2     ; @CURSOR_ALPHA_PER_PIXEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: x=%d, y=%d roi_w=%d roi_h=%d src_x=%d src_y=%d"

	.comm	_CURSOR_FMT_ARGB8888,4,2        ; @CURSOR_FMT_ARGB8888
	.comm	_MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN,4,2 ; @MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN
	.no_dead_strip	_mdp5_crtc_restore_cursor
.subsections_via_symbols
