	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_dvo_setup             ## -- Begin function atombios_dvo_setup
	.p2align	4, 0x90
_atombios_dvo_setup:                    ## @atombios_dvo_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	callq	_to_radeon_encoder
	movq	%rax, %r15
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DVOEncoderControl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %r14d
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	8(%r13), %edi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %esi
	callq	_atom_parse_cmd_header
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	movq	(%r13), %rax
	movq	_CHIP_RV410@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.3:
	movl	-48(%rbp), %esi
	cmpl	$1, %esi
	je	LBB0_4
## %bb.14:
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_15
LBB0_2:
	movl	$1, -48(%rbp)
LBB0_4:
	movl	-44(%rbp), %edx
	cmpl	$3, %edx
	je	LBB0_12
## %bb.5:
	cmpl	$2, %edx
	je	LBB0_10
## %bb.6:
	cmpl	$1, %edx
	jne	LBB0_13
## %bb.7:
	movl	%r12d, -72(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_radeon_dig_monitor_is_duallink
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_PANEL_ENCODER_MISC_DUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	orl	-68(%rbp), %eax
	movq	_ATOM_PANEL_MISC_888RGB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -68(%rbp)
	jmp	LBB0_16
LBB0_12:
	movl	%r12d, -72(%rbp)
	movslq	(%r15), %rax
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movl	$0, -68(%rbp)
	jmp	LBB0_16
LBB0_10:
	movl	%r12d, -72(%rbp)
	movslq	(%r15), %rax
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	_ATOM_DEVICE_DFP1_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_radeon_dig_monitor_is_duallink
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:
	movq	_PANEL_ENCODER_MISC_DUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -68(%rbp)
	jmp	LBB0_16
LBB0_13:
	leaq	L_.str(%rip), %rdi
	movl	$1, %esi
LBB0_15:
	callq	_DRM_ERROR
LBB0_16:
	movl	8(%r13), %edi
	leaq	-72(%rbp), %rdx
	movl	%r14d, %esi
	callq	_atom_execute_table
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_DVOEncoderControl,4,2          ## @DVOEncoderControl
	.comm	_CHIP_RV410,8,3                 ## @CHIP_RV410
	.comm	_PANEL_ENCODER_MISC_DUAL,4,2    ## @PANEL_ENCODER_MISC_DUAL
	.comm	_ATOM_PANEL_MISC_888RGB,4,2     ## @ATOM_PANEL_MISC_888RGB
	.comm	_ATOM_DEVICE_DFP1_INDEX,4,2     ## @ATOM_DEVICE_DFP1_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_dvo_setup             ; -- Begin function atombios_dvo_setup
	.p2align	2
_atombios_dvo_setup:                    ; @atombios_dvo_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x23, [x8]
	bl	_to_radeon_encoder
	mov	x21, x0
Lloh0:
	adrp	x8, _COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _DVOEncoderControl@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DVOEncoderControl@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w0, [x23, #8]
	add	x2, sp, #4
	mov	x3, sp
	mov	x1, x19
	bl	_atom_parse_cmd_header
	cbz	w0, LBB0_15
; %bb.1:
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _CHIP_RV410@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHIP_RV410@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_4
; %bb.2:
	ldr	w1, [sp, #4]
	cmp	w1, #1
	b.eq	LBB0_5
; %bb.3:
	ldr	w2, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_4:
	mov	w8, #1
	str	w8, [sp, #4]
LBB0_5:
	ldr	w2, [sp]
	cmp	w2, #3
	b.eq	LBB0_9
; %bb.6:
	cmp	w2, #2
	b.eq	LBB0_10
; %bb.7:
	cmp	w2, #1
	b.ne	LBB0_12
; %bb.8:
	str	w22, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_radeon_dig_monitor_is_duallink
	ldr	w8, [sp, #12]
Lloh11:
	adrp	x9, _PANEL_ENCODER_MISC_DUAL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PANEL_ENCODER_MISC_DUAL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w0, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _ATOM_PANEL_MISC_888RGB@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATOM_PANEL_MISC_888RGB@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #12]
	b	LBB0_14
LBB0_9:
	str	w22, [sp, #8]
	ldrsw	x8, [x21]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	str	wzr, [sp, #12]
	b	LBB0_14
LBB0_10:
	str	w22, [sp, #8]
	ldrsw	x8, [x21]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_cpu_to_le16
	str	x0, [sp, #24]
Lloh17:
	adrp	x8, _ATOM_DEVICE_DFP1_INDEX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATOM_DEVICE_DFP1_INDEX@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_radeon_dig_monitor_is_duallink
	cbz	w0, LBB0_14
; %bb.11:
Lloh20:
	adrp	x8, _PANEL_ENCODER_MISC_DUAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PANEL_ENCODER_MISC_DUAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	str	w8, [sp, #12]
	b	LBB0_14
LBB0_12:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
LBB0_13:
	bl	_DRM_ERROR
LBB0_14:
	ldr	w0, [x23, #8]
	add	x2, sp, #8
	mov	x1, x19
	bl	_atom_execute_table
LBB0_15:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_DVOEncoderControl,4,2          ; @DVOEncoderControl
	.comm	_CHIP_RV410,8,3                 ; @CHIP_RV410
	.comm	_PANEL_ENCODER_MISC_DUAL,4,2    ; @PANEL_ENCODER_MISC_DUAL
	.comm	_ATOM_PANEL_MISC_888RGB,4,2     ; @ATOM_PANEL_MISC_888RGB
	.comm	_ATOM_DEVICE_DFP1_INDEX,4,2     ; @ATOM_DEVICE_DFP1_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols
