	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_head_atomic_check_dither
_nv50_head_atomic_check_dither:         ## @nv50_head_atomic_check_dither
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdx), %rax
	movq	16(%rdx), %rcx
	movq	_DITHERING_MODE_AUTO@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	jne	LBB0_3
## %bb.1:
	movl	(%rcx), %eax
	leal	(%rax,%rax,2), %edi
	xorl	%eax, %eax
	cmpl	%edi, 16(%rsi)
	jle	LBB0_3
## %bb.2:
	movq	_DITHERING_MODE_DYNAMIC2X2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movl	8(%rdx), %edx
	movq	_DITHERING_DEPTH_AUTO@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	jne	LBB0_6
## %bb.4:
	cmpl	$8, (%rcx)
	jl	LBB0_7
## %bb.5:
	movq	_DITHERING_DEPTH_8BPC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_7
LBB0_6:
	orl	%eax, %edx
	movl	%edx, %eax
LBB0_7:
	movl	%eax, 4(%rsi)
	movl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, 8(%rsi)
	sarl	$3, %eax
	movl	%eax, 12(%rsi)
	movl	$1, (%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DITHERING_MODE_AUTO,8,3        ## @DITHERING_MODE_AUTO
	.comm	_DITHERING_MODE_DYNAMIC2X2,4,2  ## @DITHERING_MODE_DYNAMIC2X2
	.comm	_DITHERING_DEPTH_AUTO,4,2       ## @DITHERING_DEPTH_AUTO
	.comm	_DITHERING_DEPTH_8BPC,4,2       ## @DITHERING_DEPTH_8BPC
	.no_dead_strip	_nv50_head_atomic_check_dither
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nv50_head_atomic_check_dither
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	4294967293                      ; 0xfffffffd
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nv50_head_atomic_check_dither:         ; @nv50_head_atomic_check_dither
	.cfi_startproc
; %bb.0:
	ldr	x9, [x2, #16]
	ldr	x8, [x2]
Lloh0:
	adrp	x10, _DITHERING_MODE_AUTO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DITHERING_MODE_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x1, #16]
	ldr	w10, [x9]
	add	w10, w10, w10, lsl #1
Lloh3:
	adrp	x11, _DITHERING_MODE_DYNAMIC2X2@GOTPAGE
Lloh4:
	ldr	x11, [x11, _DITHERING_MODE_DYNAMIC2X2@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w8, w10
	csel	w8, w11, wzr, gt
LBB0_2:
	ldr	w10, [x2, #8]
Lloh6:
	adrp	x11, _DITHERING_DEPTH_AUTO@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DITHERING_DEPTH_AUTO@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x9]
	cmp	w9, #8
	b.lt	LBB0_6
; %bb.4:
Lloh9:
	adrp	x9, _DITHERING_DEPTH_8BPC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DITHERING_DEPTH_8BPC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_5:
	orr	w8, w10, w8
LBB0_6:
	dup.2s	v0, w8
Lloh12:
	adrp	x9, lCPI0_0@PAGE
Lloh13:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	sshl.2s	v0, v0, v1
	str	d0, [x1, #8]
	mov	w9, #1
	stp	w9, w8, [x1]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdr	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DITHERING_MODE_AUTO,8,3        ; @DITHERING_MODE_AUTO
	.comm	_DITHERING_MODE_DYNAMIC2X2,4,2  ; @DITHERING_MODE_DYNAMIC2X2
	.comm	_DITHERING_DEPTH_AUTO,4,2       ; @DITHERING_DEPTH_AUTO
	.comm	_DITHERING_DEPTH_8BPC,4,2       ; @DITHERING_DEPTH_8BPC
	.no_dead_strip	_nv50_head_atomic_check_dither
.subsections_via_symbols
