	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_cursor_atomic_update
_tegra_cursor_atomic_update:            ## @tegra_cursor_atomic_update
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	16(%rax), %edi
	xorl	%esi, %esi
	callq	_tegra_fb_get_plane
	movq	%rax, %r15
	movq	(%rbx), %rax
	movl	20(%rax), %edi
	callq	_to_tegra_dc
	movq	(%rbx), %rbx
	cmpl	$0, 20(%rbx)
	je	LBB0_5
## %bb.1:
	cmpl	$0, 16(%rbx)
	je	LBB0_5
## %bb.2:
	movq	%rax, %r14
	movl	(%rbx), %edx
	leal	-32(%rdx), %eax
	roll	$27, %eax
	cmpl	$8, %eax
	jae	LBB0_6
## %bb.3:
	movl	$139, %ecx
	btl	%eax, %ecx
	jb	LBB0_4
LBB0_6:
	movl	12(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_CURSOR_CLIP_DISPLAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltq
	leaq	l_switch.table.tegra_cursor_atomic_update(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	orl	(%rax), %ecx
	movl	(%r15), %esi
	shrl	$10, %esi
	orl	%ecx, %esi
	movq	_DC_DISP_CURSOR_START_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tegra_dc_writel
	movq	_DC_DISP_DISP_WIN_OPTIONS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_tegra_dc_readl
	movq	_CURSOR_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_tegra_dc_writel
	movq	_DC_DISP_BLEND_CURSOR_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_tegra_dc_readl
	movq	_CURSOR_DST_BLEND_MASK@GOTPCREL(%rip), %rcx
	movq	_CURSOR_SRC_BLEND_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_CURSOR_MODE_NORMAL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_CURSOR_DST_BLEND_NEG_K1_TIMES_SRC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_CURSOR_SRC_BLEND_K1_TIMES_SRC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_CURSOR_ALPHA@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_tegra_dc_writel
	movl	4(%rbx), %eax
	shll	$16, %eax
	movl	$16383, %esi                    ## imm = 0x3FFF
	andl	8(%rbx), %esi
	andl	$1073676288, %eax               ## imm = 0x3FFF0000
	orl	%eax, %esi
	movq	_DC_DISP_CURSOR_POSITION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tegra_dc_writel                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CURSOR_CLIP_DISPLAY,4,2        ## @CURSOR_CLIP_DISPLAY
	.comm	_CURSOR_SIZE_32x32,4,2          ## @CURSOR_SIZE_32x32
	.comm	_CURSOR_SIZE_64x64,4,2          ## @CURSOR_SIZE_64x64
	.comm	_CURSOR_SIZE_128x128,4,2        ## @CURSOR_SIZE_128x128
	.comm	_CURSOR_SIZE_256x256,4,2        ## @CURSOR_SIZE_256x256
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cursor size %ux%u not supported\n"

	.comm	_DC_DISP_CURSOR_START_ADDR,4,2  ## @DC_DISP_CURSOR_START_ADDR
	.comm	_DC_DISP_DISP_WIN_OPTIONS,4,2   ## @DC_DISP_DISP_WIN_OPTIONS
	.comm	_CURSOR_ENABLE,4,2              ## @CURSOR_ENABLE
	.comm	_DC_DISP_BLEND_CURSOR_CONTROL,4,2 ## @DC_DISP_BLEND_CURSOR_CONTROL
	.comm	_CURSOR_DST_BLEND_MASK,4,2      ## @CURSOR_DST_BLEND_MASK
	.comm	_CURSOR_SRC_BLEND_MASK,4,2      ## @CURSOR_SRC_BLEND_MASK
	.comm	_CURSOR_MODE_NORMAL,4,2         ## @CURSOR_MODE_NORMAL
	.comm	_CURSOR_DST_BLEND_NEG_K1_TIMES_SRC,4,2 ## @CURSOR_DST_BLEND_NEG_K1_TIMES_SRC
	.comm	_CURSOR_SRC_BLEND_K1_TIMES_SRC,4,2 ## @CURSOR_SRC_BLEND_K1_TIMES_SRC
	.comm	_CURSOR_ALPHA,4,2               ## @CURSOR_ALPHA
	.comm	_DC_DISP_CURSOR_POSITION,4,2    ## @DC_DISP_CURSOR_POSITION
	.comm	_DC_DISP_CURSOR_START_ADDR_HI,4,2 ## @DC_DISP_CURSOR_START_ADDR_HI
	.no_dead_strip	_tegra_cursor_atomic_update
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.tegra_cursor_atomic_update
l_switch.table.tegra_cursor_atomic_update:
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_64x64
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_128x128
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_256x256

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_cursor_atomic_update
_tegra_cursor_atomic_update:            ; @tegra_cursor_atomic_update
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #16]
	mov	w1, #0
	bl	_tegra_fb_get_plane
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w0, [x8, #20]
	bl	_to_tegra_dc
	ldr	x21, [x21]
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	w2, [x21]
	sub	w8, w2, #32
	ror	w8, w8, #5
	cmp	w8, #8
	b.hs	LBB0_4
; %bb.3:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_6
LBB0_4:
	ldr	w3, [x21, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_WARN
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x19, x0
Lloh2:
	adrp	x9, _CURSOR_CLIP_DISPLAY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CURSOR_CLIP_DISPLAY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, l_switch.table.tegra_cursor_atomic_update@PAGE
Lloh6:
	add	x10, x10, l_switch.table.tegra_cursor_atomic_update@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	w8, [x8]
	orr	w8, w8, w9
	ldr	w9, [x20]
	orr	w1, w8, w9, lsr #10
Lloh7:
	adrp	x8, _DC_DISP_CURSOR_START_ADDR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DC_DISP_CURSOR_START_ADDR@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_tegra_dc_writel
Lloh10:
	adrp	x20, _DC_DISP_DISP_WIN_OPTIONS@GOTPAGE
Lloh11:
	ldr	x20, [x20, _DC_DISP_DISP_WIN_OPTIONS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tegra_dc_readl
Lloh12:
	adrp	x8, _CURSOR_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CURSOR_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x20]
	mov	x0, x19
	bl	_tegra_dc_writel
Lloh15:
	adrp	x20, _DC_DISP_BLEND_CURSOR_CONTROL@GOTPAGE
Lloh16:
	ldr	x20, [x20, _DC_DISP_BLEND_CURSOR_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tegra_dc_readl
Lloh17:
	adrp	x8, _CURSOR_DST_BLEND_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CURSOR_DST_BLEND_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _CURSOR_SRC_BLEND_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CURSOR_SRC_BLEND_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
Lloh23:
	adrp	x9, _CURSOR_MODE_NORMAL@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CURSOR_MODE_NORMAL@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _CURSOR_DST_BLEND_NEG_K1_TIMES_SRC@GOTPAGE
Lloh27:
	ldr	x10, [x10, _CURSOR_DST_BLEND_NEG_K1_TIMES_SRC@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh28:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh29:
	adrp	x9, _CURSOR_SRC_BLEND_K1_TIMES_SRC@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CURSOR_SRC_BLEND_K1_TIMES_SRC@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh32:
	adrp	x9, _CURSOR_ALPHA@GOTPAGE
Lloh33:
	ldr	x9, [x9, _CURSOR_ALPHA@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w2, [x20]
	mov	x0, x19
	bl	_tegra_dc_writel
	ldp	w8, w9, [x21, #4]
	and	w1, w9, #0x3fff
	bfi	w1, w8, #16, #14
Lloh35:
	adrp	x8, _DC_DISP_CURSOR_POSITION@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DC_DISP_CURSOR_POSITION@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_tegra_dc_writel
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CURSOR_CLIP_DISPLAY,4,2        ; @CURSOR_CLIP_DISPLAY
	.comm	_CURSOR_SIZE_32x32,4,2          ; @CURSOR_SIZE_32x32
	.comm	_CURSOR_SIZE_64x64,4,2          ; @CURSOR_SIZE_64x64
	.comm	_CURSOR_SIZE_128x128,4,2        ; @CURSOR_SIZE_128x128
	.comm	_CURSOR_SIZE_256x256,4,2        ; @CURSOR_SIZE_256x256
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cursor size %ux%u not supported\n"

	.comm	_DC_DISP_CURSOR_START_ADDR,4,2  ; @DC_DISP_CURSOR_START_ADDR
	.comm	_DC_DISP_DISP_WIN_OPTIONS,4,2   ; @DC_DISP_DISP_WIN_OPTIONS
	.comm	_CURSOR_ENABLE,4,2              ; @CURSOR_ENABLE
	.comm	_DC_DISP_BLEND_CURSOR_CONTROL,4,2 ; @DC_DISP_BLEND_CURSOR_CONTROL
	.comm	_CURSOR_DST_BLEND_MASK,4,2      ; @CURSOR_DST_BLEND_MASK
	.comm	_CURSOR_SRC_BLEND_MASK,4,2      ; @CURSOR_SRC_BLEND_MASK
	.comm	_CURSOR_MODE_NORMAL,4,2         ; @CURSOR_MODE_NORMAL
	.comm	_CURSOR_DST_BLEND_NEG_K1_TIMES_SRC,4,2 ; @CURSOR_DST_BLEND_NEG_K1_TIMES_SRC
	.comm	_CURSOR_SRC_BLEND_K1_TIMES_SRC,4,2 ; @CURSOR_SRC_BLEND_K1_TIMES_SRC
	.comm	_CURSOR_ALPHA,4,2               ; @CURSOR_ALPHA
	.comm	_DC_DISP_CURSOR_POSITION,4,2    ; @DC_DISP_CURSOR_POSITION
	.comm	_DC_DISP_CURSOR_START_ADDR_HI,4,2 ; @DC_DISP_CURSOR_START_ADDR_HI
	.no_dead_strip	_tegra_cursor_atomic_update
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.tegra_cursor_atomic_update
l_switch.table.tegra_cursor_atomic_update:
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_64x64
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_128x128
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_32x32
	.quad	_CURSOR_SIZE_256x256

.subsections_via_symbols
