	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_cursor_upload
_nv04_cursor_upload:                    ## @nv04_cursor_upload
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_nv_cursor_width
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rbx,%r14), %esi
	movq	%r12, %rdi
	callq	_nouveau_bo_rd32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%r14), %esi
	movl	%eax, %ecx
	shrl	$16, %ecx
	andl	$32768, %ecx                    ## imm = 0x8000
	movl	%eax, %edi
	shrl	$9, %edi
	andl	$31744, %edi                    ## imm = 0x7C00
	orl	%ecx, %edi
	movl	%eax, %edx
	shrl	$6, %edx
	andl	$992, %edx                      ## imm = 0x3E0
	orl	%edi, %edx
	shrl	$3, %eax
	andl	$31, %eax
	orl	%eax, %edx
	movq	%r15, %rdi
	callq	_nouveau_bo_wr16
	incl	%r14d
	cmpl	%r14d, %r13d
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	%r13d, %edx
	addl	$64, %ebx
	cmpl	%r13d, %esi
	jne	LBB0_2
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv04_cursor_upload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function nv04_cursor_upload
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967287                      ; 0xfffffff7
	.long	4294967290                      ; 0xfffffffa
	.long	4294967293                      ; 0xfffffffd
lCPI0_1:
	.long	32768                           ; 0x8000
	.long	31744                           ; 0x7c00
	.long	992                             ; 0x3e0
	.long	31                              ; 0x1f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nv04_cursor_upload:                    ; @nv04_cursor_upload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x2
	mov	x20, x1
	bl	_nv_cursor_width
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x0
	mov	w22, #0
	mov	w23, #0
	mov	w24, #0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #16]                   ; 16-byte Folded Spill
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_1@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	w25, #0
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w1, w22, w25
	mov	x0, x20
	bl	_nouveau_bo_rd32
	add	w1, w23, w25
	dup.4s	v0, w0
	ldr	q1, [sp, #16]                   ; 16-byte Folded Reload
	ushl.4s	v0, v0, v1
	ldr	q1, [sp]                        ; 16-byte Folded Reload
	and.16b	v0, v0, v1
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	mov.s	w8, v0[1]
	fmov	w9, s0
	orr	w2, w9, w8
	mov	x0, x19
	bl	_nouveau_bo_wr16
	add	w25, w25, #1
	cmp	w21, w25
	b.ne	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #1
	add	w23, w23, w21
	add	w22, w22, #64
	cmp	w24, w21
	b.ne	LBB0_2
LBB0_5:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv04_cursor_upload
.subsections_via_symbols
