	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atombios_dac_load_detect
_atombios_dac_load_detect:              ## @atombios_dac_load_detect
	.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	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_radeon_connector
	movq	%rax, %r15
	movq	_ATOM_DEVICE_TV_SUPPORT@GOTPCREL(%rip), %rax
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ATOM_DEVICE_CRT_SUPPORT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ecx, (%r12)
	je	LBB0_1
## %bb.2:
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DAC_LoadDetection@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %r14d
	leaq	-72(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	(%r13), %edi
	leaq	-76(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %esi
	callq	_atom_parse_cmd_header
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:
	movq	$0, -72(%rbp)
	movq	8(%r12), %rax
	movq	_ENCODER_OBJECT_ID_INTERNAL_DAC1@GOTPCREL(%rip), %rcx
	movq	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPCREL(%rip), %rdi
	movq	_ATOM_DAC_A@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	(%rdi), %rax
	je	LBB0_5
## %bb.4:
	movq	_ATOM_DAC_B@GOTPCREL(%rip), %rsi
LBB0_5:
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rsi
	movl	(%rsi), %eax
	movl	%eax, -56(%rbp)
	movl	(%r15), %eax
	movq	_ATOM_DEVICE_CRT1_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	jne	LBB0_6
## %bb.7:
	movq	_ATOM_DEVICE_CRT2_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	je	LBB0_8
LBB0_6:
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
LBB0_12:
	movl	(%r13), %edi
	leaq	-72(%rbp), %rdx
	movl	%r14d, %esi
	callq	_atom_execute_table
	movl	$1, %ebx
	jmp	LBB0_13
LBB0_1:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	jne	LBB0_10
## %bb.9:
	movq	_ATOM_DEVICE_TV1_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	je	LBB0_12
LBB0_10:
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	cmpl	$3, -44(%rbp)
	jl	LBB0_12
## %bb.11:
	movq	_DAC_LOAD_MISC_YPrPb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ## @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ## @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_DEVICE_CRT_SUPPORT,4,2    ## @ATOM_DEVICE_CRT_SUPPORT
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_DAC_LoadDetection,4,2          ## @DAC_LoadDetection
	.comm	_ENCODER_OBJECT_ID_INTERNAL_DAC1,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_DAC1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1
	.comm	_ATOM_DAC_A,4,2                 ## @ATOM_DAC_A
	.comm	_ATOM_DAC_B,4,2                 ## @ATOM_DAC_B
	.comm	_ATOM_DEVICE_CRT1_SUPPORT,4,2   ## @ATOM_DEVICE_CRT1_SUPPORT
	.comm	_ATOM_DEVICE_CRT2_SUPPORT,4,2   ## @ATOM_DEVICE_CRT2_SUPPORT
	.comm	_DAC_LOAD_MISC_YPrPb,8,3        ## @DAC_LOAD_MISC_YPrPb
	.comm	_ATOM_DEVICE_TV1_SUPPORT,4,2    ## @ATOM_DEVICE_TV1_SUPPORT
	.no_dead_strip	_atombios_dac_load_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atombios_dac_load_detect
_atombios_dac_load_detect:              ; @atombios_dac_load_detect
	.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	x19, x1
	ldr	x8, [x0]
	ldr	x22, [x8]
	bl	_to_radeon_encoder
	mov	x21, x0
	mov	x0, x19
	bl	_to_radeon_connector
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_DEVICE_TV_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x23, _ATOM_DEVICE_CV_SUPPORT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ATOM_DEVICE_CV_SUPPORT@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w9, w10, w9
Lloh5:
	adrp	x10, _ATOM_DEVICE_CRT_SUPPORT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATOM_DEVICE_CRT_SUPPORT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x0
Lloh8:
	adrp	x8, _COMMAND@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _DAC_LoadDetection@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DAC_LoadDetection@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w0, [x22]
	add	x2, sp, #4
	mov	x3, sp
	mov	x1, x19
	bl	_atom_parse_cmd_header
	cbz	w0, LBB0_7
; %bb.2:
	str	xzr, [sp, #8]
	ldr	x8, [x21, #8]
Lloh14:
	adrp	x9, _ENCODER_OBJECT_ID_INTERNAL_DAC1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ENCODER_OBJECT_ID_INTERNAL_DAC1@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh20:
	adrp	x8, _ATOM_DAC_A@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATOM_DAC_A@GOTPAGEOFF]
Lloh22:
	adrp	x9, _ATOM_DAC_B@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ATOM_DAC_B@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w8, [x20]
Lloh24:
	adrp	x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x9]
	tst	w0, w8
	b.ne	LBB0_4
; %bb.3:
Lloh27:
	adrp	x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x9]
	tst	w0, w8
	b.eq	LBB0_8
LBB0_4:
	bl	_cpu_to_le16
	str	x0, [sp, #16]
LBB0_5:
	ldr	w0, [x22]
	add	x2, sp, #8
	mov	x1, x19
	bl	_atom_execute_table
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
LBB0_8:
	ldr	w0, [x23]
	tst	w0, w8
	b.ne	LBB0_10
; %bb.9:
Lloh30:
	adrp	x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x9]
	tst	w0, w8
	b.eq	LBB0_5
LBB0_10:
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	ldr	w8, [sp]
	cmp	w8, #3
	b.lt	LBB0_5
; %bb.11:
Lloh33:
	adrp	x8, _DAC_LOAD_MISC_YPrPb@GOTPAGE
Lloh34:
	ldr	x8, [x8, _DAC_LOAD_MISC_YPrPb@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_DEVICE_TV_SUPPORT,4,2     ; @ATOM_DEVICE_TV_SUPPORT
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ; @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_DEVICE_CRT_SUPPORT,4,2    ; @ATOM_DEVICE_CRT_SUPPORT
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_DAC_LoadDetection,4,2          ; @DAC_LoadDetection
	.comm	_ENCODER_OBJECT_ID_INTERNAL_DAC1,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_DAC1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1
	.comm	_ATOM_DAC_A,4,2                 ; @ATOM_DAC_A
	.comm	_ATOM_DAC_B,4,2                 ; @ATOM_DAC_B
	.comm	_ATOM_DEVICE_CRT1_SUPPORT,4,2   ; @ATOM_DEVICE_CRT1_SUPPORT
	.comm	_ATOM_DEVICE_CRT2_SUPPORT,4,2   ; @ATOM_DEVICE_CRT2_SUPPORT
	.comm	_DAC_LOAD_MISC_YPrPb,8,3        ; @DAC_LOAD_MISC_YPrPb
	.comm	_ATOM_DEVICE_TV1_SUPPORT,4,2    ; @ATOM_DEVICE_TV1_SUPPORT
	.no_dead_strip	_atombios_dac_load_detect
.subsections_via_symbols
