	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_mode_cursor_universal
_drm_mode_cursor_universal:             ## @drm_mode_cursor_universal
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r12
	movl	24(%rsi), %eax
	movl	%eax, -112(%rbp)
	movl	36(%rsi), %eax
	leal	(,%rax,4), %ecx
	movl	%ecx, -108(%rbp)
	movq	_DRM_FORMAT_ARGB8888@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -104(%rbp)
	movl	32(%rsi), %ecx
	movl	%ecx, -100(%rbp)
	movl	%eax, -96(%rbp)
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	movq	16(%rbx), %rax
	cmpq	%r14, %rax
	setne	%cl
	testq	%rax, %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	movq	_DRM_MODE_CURSOR_BO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	cmpq	$0, 24(%r13)
	je	LBB0_6
## %bb.2:
	leaq	-112(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_drm_internal_framebuffer_create
	movq	%r12, %rbx
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_4:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	testq	%rax, %rax
	cmoveq	%rbx, %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_8
## %bb.5:
	movq	%r12, %rdi
	callq	_drm_framebuffer_get
	jmp	LBB0_9
LBB0_6:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
LBB0_8:
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	16(%r13), %eax
	movl	%eax, 12(%r12)
	movl	12(%r13), %eax
	movl	%eax, 8(%r12)
LBB0_9:
	movq	_DRM_MODE_CURSOR_MOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	8(%r13), %rdx
	leaq	4(%r14), %rax
	testl	%ecx, (%r13)
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	cmovneq	%rdx, %rax
	leaq	4(%r13), %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	cmoveq	%r14, %rcx
	testq	%r12, %r12
	je	LBB0_11
## %bb.10:
	movl	(%r12), %edx
	movl	4(%r12), %ebx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	shll	$16, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	shll	$16, %ebx
	jmp	LBB0_12
LBB0_11:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%edx, %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
LBB0_12:
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_drv_uses_atomic_modeset
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%rbx
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	___setplane_atomic
	jmp	LBB0_15
LBB0_14:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%rbx
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	___setplane_internal
LBB0_15:
	addq	$48, %rsp
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	callq	_drm_framebuffer_put
LBB0_17:
	testl	%ebx, %ebx
	jne	LBB0_20
## %bb.18:
	movq	_DRM_MODE_CURSOR_MOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%r13)
	je	LBB0_20
## %bb.19:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rcx)
LBB0_20:
	movl	%ebx, %eax
	addq	$88, %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	_DRM_MODE_CURSOR_BO,4,2         ## @DRM_MODE_CURSOR_BO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to wrap cursor buffer in drm framebuffer\n"

	.comm	_DRM_MODE_CURSOR_MOVE,4,2       ## @DRM_MODE_CURSOR_MOVE
	.no_dead_strip	_drm_mode_cursor_universal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_mode_cursor_universal
_drm_mode_cursor_universal:             ; @drm_mode_cursor_universal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x21, x24, [x0, #8]
	ldr	x8, [x1, #24]
	ldp	w10, w9, [x1, #32]
	lsl	w11, w9, #2
	stp	w8, w11, [sp, #56]
Lloh0:
	adrp	x8, _DRM_FORMAT_ARGB8888@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_FORMAT_ARGB8888@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w10, [sp, #64]
	str	w9, [sp, #72]
	cmp	x21, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x21, #16]
	cmp	x8, x19
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	bl	_WARN_ON
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _DRM_MODE_CURSOR_BO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_CURSOR_BO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_6
; %bb.2:
	add	x1, sp, #56
	mov	x0, x24
	mov	x2, x23
	bl	_drm_internal_framebuffer_create
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x23
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_19
LBB0_4:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	csel	x8, x21, x8, eq
	ldr	x23, [x8]
	stp	x24, x22, [sp, #40]             ; 16-byte Folded Spill
	cbz	x23, LBB0_8
; %bb.5:
	mov	x0, x23
	bl	_drm_framebuffer_get
	b	LBB0_8
LBB0_6:
	stp	x24, x22, [sp, #40]             ; 16-byte Folded Spill
	mov	x23, #0
	b	LBB0_8
LBB0_7:
	stp	x24, x22, [sp, #40]             ; 16-byte Folded Spill
	ldur	d0, [x20, #12]
	str	d0, [x23, #8]
LBB0_8:
	mov	x22, x20
	ldr	w8, [x22], #4
Lloh8:
	adrp	x9, _DRM_MODE_CURSOR_MOVE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRM_MODE_CURSOR_MOVE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	add	x10, x20, #8
	add	x11, x19, #4
	tst	w9, w8
	csel	x8, x11, x10, eq
	csel	x9, x19, x22, eq
	ldr	w9, [x9]
	str	w9, [sp, #36]                   ; 4-byte Folded Spill
	ldr	w26, [x8]
	cbz	x23, LBB0_10
; %bb.9:
	ldp	w27, w28, [x23]
	lsl	w24, w27, #16
	lsl	w25, w28, #16
	b	LBB0_11
LBB0_10:
	mov	w27, #0
	mov	w28, #0
	mov	w24, #0
	mov	w25, #0
LBB0_11:
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_drm_drv_uses_atomic_modeset
	cbz	x0, LBB0_17
; %bb.12:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	str	x8, [sp, #16]
	stp	w24, w25, [sp, #4]
	str	wzr, [sp]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x26
	ldr	w4, [sp, #36]                   ; 4-byte Folded Reload
	mov	x5, x27
	mov	x6, x28
	mov	w7, #0
	bl	___setplane_atomic
	mov	x21, x0
	cbz	x23, LBB0_14
LBB0_13:
	mov	x0, x23
	bl	_drm_framebuffer_put
LBB0_14:
	cbnz	w21, LBB0_19
; %bb.15:
	ldr	w8, [x20]
Lloh11:
	adrp	x9, _DRM_MODE_CURSOR_MOVE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DRM_MODE_CURSOR_MOVE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.16:
	mov	w21, #0
	ldr	d0, [x22]
	str	d0, [x19]
	b	LBB0_19
LBB0_17:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	str	x8, [sp, #16]
	stp	w24, w25, [sp, #4]
	str	wzr, [sp]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x26
	ldr	w4, [sp, #36]                   ; 4-byte Folded Reload
	mov	x5, x27
	mov	x6, x28
	mov	w7, #0
	bl	___setplane_internal
	mov	x21, x0
	cbnz	x23, LBB0_13
	b	LBB0_14
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_ARGB8888,4,2        ; @DRM_FORMAT_ARGB8888
	.comm	_DRM_MODE_CURSOR_BO,4,2         ; @DRM_MODE_CURSOR_BO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to wrap cursor buffer in drm framebuffer\n"

	.comm	_DRM_MODE_CURSOR_MOVE,4,2       ; @DRM_MODE_CURSOR_MOVE
	.no_dead_strip	_drm_mode_cursor_universal
.subsections_via_symbols
