	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_cursor_atomic_check
_sti_cursor_atomic_check:               ## @sti_cursor_atomic_check
	.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	%rsi, %r14
	movq	%rdi, %r13
	callq	_to_sti_plane
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_sti_cursor
	movq	40(%r14), %r12
	xorl	%r15d, %r15d
	testq	%r12, %r12
	je	LBB0_18
## %bb.1:
	movq	32(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	24(%r14), %edi
	movq	%r12, %rsi
	callq	_drm_atomic_get_crtc_state
	movq	%rax, %r13
	movslq	(%r14), %rax
	movslq	4(%r14), %rbx
	movl	20(%r14), %edi
	movq	8(%r13), %rdx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	subq	%rax, %rdx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	16(%r14), %edi
	movq	(%r13), %rdx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	subq	%rbx, %rdx
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, %r13d
	movswl	10(%r14), %esi
	movswl	14(%r14), %edx
	movq	_STI_CURS_MIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %esi
	jl	LBB0_6
## %bb.3:
	cmpl	%eax, %edx
	jl	LBB0_6
## %bb.4:
	movq	_STI_CURS_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %esi
	jg	LBB0_6
## %bb.5:
	cmpl	%eax, %edx
	jg	LBB0_6
## %bb.8:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.9:
	cmpl	%esi, (%rcx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_11
## %bb.10:
	cmpl	%edx, 4(%rcx)
	je	LBB0_15
LBB0_11:
	movl	%esi, (%rcx)
	movl	%edx, 4(%rcx)
	movl	32(%rcx), %edi
	movl	8(%rcx), %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	24(%rcx), %ecx
	movq	%rax, %rdx
	callq	_dma_free_wc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %esi
	movl	4(%rcx), %edx
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	%esi, (%rcx)
	movl	%edx, 4(%rcx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	imull	%esi, %edx
	movl	%edx, 8(%rcx)
	movl	32(%rcx), %edi
	movq	%rcx, %rax
	addq	$24, %rax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rsi
	movq	%rcx, %rbx
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movl	%edx, %esi
	movq	%rax, %rdx
	callq	_dma_alloc_wc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_13
LBB0_15:
	xorl	%r15d, %r15d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_drm_fb_cma_get_gem_obj
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_to_sti_mixer
	movl	%eax, %edi
	callq	_sti_mixer_to_str
	movl	%eax, %ebx
	movl	(%r14), %r12d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_sti_plane_to_str
	leaq	L_.str.3(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_DRM_DEBUG_KMS
	leaq	L_.str.4(%rip), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_18
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_14
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
LBB0_14:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_STI_CURS_MIN_SIZE,4,2          ## @STI_CURS_MIN_SIZE
	.comm	_STI_CURS_MAX_SIZE,4,2          ## @STI_CURS_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid cursor size (%dx%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate memory for pixmap\n"

L_.str.2:                               ## @.str.2
	.asciz	"Can't get CMA GEM object for fb\n"

L_.str.3:                               ## @.str.3
	.asciz	"CRTC:%d (%s) drm plane:%d (%s)\n"

L_.str.4:                               ## @.str.4
	.asciz	"(%dx%d)@(%d,%d)\n"

	.no_dead_strip	_sti_cursor_atomic_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_cursor_atomic_check
_sti_cursor_atomic_check:               ; @sti_cursor_atomic_check
	.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	x28, x1
	mov	x19, x0
	bl	_to_sti_plane
	mov	x20, x0
	bl	_to_sti_cursor
	ldp	x26, x24, [x28, #32]
	cmp	x24, #0
	ccmp	x26, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x27, x0
	ldr	w0, [x28, #24]
	mov	x1, x24
	bl	_drm_atomic_get_crtc_state
	mov	x25, x0
	ldpsw	x21, x22, [x28]
	ldr	w0, [x28, #20]
	ldr	x8, [x25, #8]
	sub	x2, x8, x21
	mov	w1, #0
	bl	_clamp_val
	mov	x23, x0
	ldr	w0, [x28, #16]
	ldr	x8, [x25]
	sub	x2, x8, x22
	mov	w1, #0
	bl	_clamp_val
	ldrsh	w8, [x28, #10]
	ldrsh	w9, [x28, #14]
Lloh0:
	adrp	x10, _STI_CURS_MIN_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _STI_CURS_MIN_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w8, w10
	ccmp	w9, w10, #8, ge
	b.lt	LBB0_4
; %bb.3:
Lloh3:
	adrp	x10, _STI_CURS_MAX_SIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _STI_CURS_MAX_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w10
	ccmp	w9, w10, #0, le
	b.le	LBB0_7
LBB0_4:
	stp	x8, x9, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x25, x0
	ldr	x2, [x27, #16]
	cbz	x2, LBB0_11
; %bb.8:
	ldr	w10, [x27]
	cmp	w10, w8
	b.ne	LBB0_10
; %bb.9:
	ldr	w10, [x27, #4]
	cmp	w10, w9
	b.eq	LBB0_13
LBB0_10:
	stp	w8, w9, [x27]
	ldr	w0, [x27, #32]
	ldr	w1, [x27, #8]
	ldr	w3, [x27, #24]
	bl	_dma_free_wc
	ldp	w8, w9, [x27]
	b	LBB0_12
LBB0_11:
	stp	w8, w9, [x27]
LBB0_12:
	mul	w1, w9, w8
	str	w1, [x27, #8]
	ldr	w0, [x27, #32]
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	add	x2, x27, #24
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_dma_alloc_wc
	str	x0, [x27, #16]
	cbz	x0, LBB0_15
LBB0_13:
	mov	x0, x26
	mov	w1, #0
	bl	_drm_fb_cma_get_gem_obj
	cbz	w0, LBB0_16
; %bb.14:
	ldr	w26, [x24]
	mov	x0, x24
	bl	_to_sti_mixer
	bl	_sti_mixer_to_str
	mov	x24, x0
	ldr	w19, [x19]
	mov	x0, x20
	bl	_sti_plane_to_str
	mov	x4, x0
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x26
	mov	x2, x24
	mov	x3, x19
	bl	_DRM_DEBUG_KMS
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x23
	mov	x2, x25
	mov	x3, x21
	mov	x4, x22
	bl	_DRM_DEBUG_KMS
	b	LBB0_1
LBB0_15:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_16:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STI_CURS_MIN_SIZE,4,2          ; @STI_CURS_MIN_SIZE
	.comm	_STI_CURS_MAX_SIZE,4,2          ; @STI_CURS_MAX_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid cursor size (%dx%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate memory for pixmap\n"

l_.str.2:                               ; @.str.2
	.asciz	"Can't get CMA GEM object for fb\n"

l_.str.3:                               ; @.str.3
	.asciz	"CRTC:%d (%s) drm plane:%d (%s)\n"

l_.str.4:                               ; @.str.4
	.asciz	"(%dx%d)@(%d,%d)\n"

	.no_dead_strip	_sti_cursor_atomic_check
.subsections_via_symbols
