	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atombios_yuv_setup
_atombios_yuv_setup:                    ## @atombios_yuv_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	callq	_to_radeon_encoder
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_radeon_crtc
	movq	%rax, %r12
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EnableYUV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	_CHIP_R600@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movq	_RADEON_BIOS_3_SCRATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_R600_BIOS_3_SCRATCH@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_RREG32
	movl	%eax, %r13d
	movl	(%r14), %eax
	movq	_ATOM_DEVICE_TV_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movl	$18, %ecx
	movq	_ATOM_S3_TV1_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.6:
	movl	$24, %ecx
	movq	_ATOM_S3_CV_ACTIVE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%r12), %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	orl	(%rax), %esi
LBB0_8:
	movl	%ebx, %edi
	callq	_WREG32
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
LBB0_10:
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movl	8(%r15), %edi
	leaq	-48(%rbp), %rdx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_atom_execute_table
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_WREG32
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%esi, %esi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_EnableYUV,4,2                  ## @EnableYUV
	.comm	_CHIP_R600,8,3                  ## @CHIP_R600
	.comm	_R600_BIOS_3_SCRATCH,4,2        ## @R600_BIOS_3_SCRATCH
	.comm	_RADEON_BIOS_3_SCRATCH,4,2      ## @RADEON_BIOS_3_SCRATCH
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ## @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_S3_TV1_ACTIVE,4,2         ## @ATOM_S3_TV1_ACTIVE
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ## @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_S3_CV_ACTIVE,4,2          ## @ATOM_S3_CV_ACTIVE
	.comm	_ATOM_ENABLE,4,2                ## @ATOM_ENABLE
	.no_dead_strip	_atombios_yuv_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atombios_yuv_setup
_atombios_yuv_setup:                    ; @atombios_yuv_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x25, [x8]
	bl	_to_radeon_encoder
	mov	x24, x0
	ldr	w0, [x20]
	bl	_to_radeon_crtc
	mov	x20, x0
Lloh0:
	adrp	x8, _COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _EnableYUV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EnableYUV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x21, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x25]
Lloh6:
	adrp	x9, _CHIP_R600@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHIP_R600@GOTPAGEOFF]
Lloh8:
	adrp	x10, _RADEON_BIOS_3_SCRATCH@GOTPAGE
Lloh9:
	ldr	x10, [x10, _RADEON_BIOS_3_SCRATCH@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x11, _R600_BIOS_3_SCRATCH@GOTPAGE
Lloh12:
	ldr	x11, [x11, _R600_BIOS_3_SCRATCH@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	ldr	w22, [x8]
	mov	x0, x22
	bl	_RREG32
	mov	x23, x0
	ldr	w8, [x24]
Lloh13:
	adrp	x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #18
Lloh16:
	adrp	x9, _ATOM_S3_TV1_ACTIVE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATOM_S3_TV1_ACTIVE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh18:
	adrp	x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	mov	w8, #24
Lloh21:
	adrp	x9, _ATOM_S3_CV_ACTIVE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATOM_S3_CV_ACTIVE@GOTPAGEOFF]
LBB0_4:
	ldr	w9, [x9]
	ldr	w10, [x20]
	lsl	w8, w10, w8
	orr	w1, w8, w9
LBB0_5:
	mov	x0, x22
	bl	_WREG32
	cbz	w19, LBB0_7
; %bb.6:
Lloh23:
	adrp	x8, _ATOM_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ATOM_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_7:
	ldr	w8, [x20]
	str	w8, [sp, #8]
	ldr	w0, [x25, #8]
	add	x2, sp, #8
	mov	x1, x21
	bl	_atom_execute_table
	mov	x0, x22
	mov	x1, x23
	bl	_WREG32
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	mov	w1, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_EnableYUV,4,2                  ; @EnableYUV
	.comm	_CHIP_R600,8,3                  ; @CHIP_R600
	.comm	_R600_BIOS_3_SCRATCH,4,2        ; @R600_BIOS_3_SCRATCH
	.comm	_RADEON_BIOS_3_SCRATCH,4,2      ; @RADEON_BIOS_3_SCRATCH
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ; @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_S3_TV1_ACTIVE,4,2         ; @ATOM_S3_TV1_ACTIVE
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ; @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_S3_CV_ACTIVE,4,2          ; @ATOM_S3_CV_ACTIVE
	.comm	_ATOM_ENABLE,4,2                ; @ATOM_ENABLE
	.no_dead_strip	_atombios_yuv_setup
.subsections_via_symbols
