	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atom_dig_detect
_radeon_atom_dig_detect:                ## @radeon_atom_dig_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	callq	_to_radeon_encoder
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_to_radeon_connector
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_radeon_get_external_encoder
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_ASIC_IS_DCE4
	movq	_connector_status_unknown@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	testq	%r14, %r14
	je	LBB0_16
## %bb.2:
	movq	_ATOM_DEVICE_CRT_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_16
## %bb.3:
	movq	_EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_atombios_external_encoder_setup
	movq	_R600_BIOS_0_SCRATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %r14d
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movl	(%r12), %eax
	movq	_ATOM_DEVICE_CRT1_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	_ATOM_S0_CRT1_MASK@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rcx)
	jne	LBB0_5
LBB0_6:
	movq	_ATOM_DEVICE_CRT2_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:
	movq	_ATOM_S0_CRT2_MASK@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rcx)
	jne	LBB0_5
LBB0_9:
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	movq	_ATOM_S0_CV_MASK@GOTPCREL(%rip), %rcx
	movq	_ATOM_S0_CV_MASK_A@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%r14d, %edx
	je	LBB0_12
LBB0_5:
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
LBB0_16:
	movl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ATOM_DEVICE_TV1_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.13:
	movq	_ATOM_S0_TV1_COMPOSITE@GOTPCREL(%rip), %rax
	movq	_ATOM_S0_TV1_COMPOSITE_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
	testl	%r14d, %edx
	jne	LBB0_16
## %bb.14:
	movq	_ATOM_S0_TV1_SVIDEO@GOTPCREL(%rip), %rax
	movq	_ATOM_S0_TV1_SVIDEO_A@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	testl	%r14d, %edx
	jne	LBB0_16
LBB0_15:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_unknown,4,2   ## @connector_status_unknown
	.comm	_ATOM_DEVICE_CRT_SUPPORT,4,2    ## @ATOM_DEVICE_CRT_SUPPORT
	.comm	_EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION,4,2 ## @EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION
	.comm	_R600_BIOS_0_SCRATCH,4,2        ## @R600_BIOS_0_SCRATCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bios 0 scratch %x %08x\n"

	.comm	_ATOM_DEVICE_CRT1_SUPPORT,4,2   ## @ATOM_DEVICE_CRT1_SUPPORT
	.comm	_ATOM_S0_CRT1_MASK,4,2          ## @ATOM_S0_CRT1_MASK
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_ATOM_DEVICE_CRT2_SUPPORT,4,2   ## @ATOM_DEVICE_CRT2_SUPPORT
	.comm	_ATOM_S0_CRT2_MASK,4,2          ## @ATOM_S0_CRT2_MASK
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ## @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_S0_CV_MASK,4,2            ## @ATOM_S0_CV_MASK
	.comm	_ATOM_S0_CV_MASK_A,4,2          ## @ATOM_S0_CV_MASK_A
	.comm	_ATOM_DEVICE_TV1_SUPPORT,4,2    ## @ATOM_DEVICE_TV1_SUPPORT
	.comm	_ATOM_S0_TV1_COMPOSITE,4,2      ## @ATOM_S0_TV1_COMPOSITE
	.comm	_ATOM_S0_TV1_COMPOSITE_A,4,2    ## @ATOM_S0_TV1_COMPOSITE_A
	.comm	_ATOM_S0_TV1_SVIDEO,4,2         ## @ATOM_S0_TV1_SVIDEO
	.comm	_ATOM_S0_TV1_SVIDEO_A,4,2       ## @ATOM_S0_TV1_SVIDEO_A
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.no_dead_strip	_radeon_atom_dig_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atom_dig_detect
_radeon_atom_dig_detect:                ; @radeon_atom_dig_detect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x23, [x8]
	bl	_to_radeon_encoder
	mov	x21, x0
	mov	x0, x20
	bl	_to_radeon_connector
	mov	x20, x0
	mov	x0, x19
	bl	_radeon_get_external_encoder
	mov	x22, x0
	mov	x0, x23
	bl	_ASIC_IS_DCE4
	cmp	w0, #0
	ccmp	x22, #0, #4, ne
	b.eq	LBB0_12
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _ATOM_DEVICE_CRT_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_DEVICE_CRT_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.2:
Lloh3:
	adrp	x8, _EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_atombios_external_encoder_setup
Lloh6:
	adrp	x8, _R600_BIOS_0_SCRATCH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R600_BIOS_0_SCRATCH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x19, x0
	ldr	w2, [x21]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x20]
Lloh11:
	adrp	x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh14:
	adrp	x9, _ATOM_S0_CRT1_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATOM_S0_CRT1_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w19
	b.ne	LBB0_11
LBB0_4:
Lloh17:
	adrp	x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh20:
	adrp	x9, _ATOM_S0_CRT2_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATOM_S0_CRT2_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w19
	b.ne	LBB0_11
LBB0_6:
Lloh23:
	adrp	x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh26:
	adrp	x9, _ATOM_S0_CV_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ATOM_S0_CV_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _ATOM_S0_CV_MASK_A@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ATOM_S0_CV_MASK_A@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w19
	b.ne	LBB0_11
LBB0_8:
Lloh32:
	adrp	x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.9:
Lloh35:
	adrp	x8, _ATOM_S0_TV1_COMPOSITE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ATOM_S0_TV1_COMPOSITE@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _ATOM_S0_TV1_COMPOSITE_A@GOTPAGE
Lloh39:
	ldr	x9, [x9, _ATOM_S0_TV1_COMPOSITE_A@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	b.ne	LBB0_11
; %bb.10:
Lloh41:
	adrp	x8, _ATOM_S0_TV1_SVIDEO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ATOM_S0_TV1_SVIDEO@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _ATOM_S0_TV1_SVIDEO_A@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ATOM_S0_TV1_SVIDEO_A@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	b.eq	LBB0_14
LBB0_11:
Lloh47:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh48:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh49:
	adrp	x8, _connector_status_unknown@GOTPAGE
Lloh50:
	ldr	x8, [x8, _connector_status_unknown@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh51:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh52:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_unknown,4,2   ; @connector_status_unknown
	.comm	_ATOM_DEVICE_CRT_SUPPORT,4,2    ; @ATOM_DEVICE_CRT_SUPPORT
	.comm	_EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION,4,2 ; @EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION
	.comm	_R600_BIOS_0_SCRATCH,4,2        ; @R600_BIOS_0_SCRATCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bios 0 scratch %x %08x\n"

	.comm	_ATOM_DEVICE_CRT1_SUPPORT,4,2   ; @ATOM_DEVICE_CRT1_SUPPORT
	.comm	_ATOM_S0_CRT1_MASK,4,2          ; @ATOM_S0_CRT1_MASK
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_ATOM_DEVICE_CRT2_SUPPORT,4,2   ; @ATOM_DEVICE_CRT2_SUPPORT
	.comm	_ATOM_S0_CRT2_MASK,4,2          ; @ATOM_S0_CRT2_MASK
	.comm	_ATOM_DEVICE_CV_SUPPORT,4,2     ; @ATOM_DEVICE_CV_SUPPORT
	.comm	_ATOM_S0_CV_MASK,4,2            ; @ATOM_S0_CV_MASK
	.comm	_ATOM_S0_CV_MASK_A,4,2          ; @ATOM_S0_CV_MASK_A
	.comm	_ATOM_DEVICE_TV1_SUPPORT,4,2    ; @ATOM_DEVICE_TV1_SUPPORT
	.comm	_ATOM_S0_TV1_COMPOSITE,4,2      ; @ATOM_S0_TV1_COMPOSITE
	.comm	_ATOM_S0_TV1_COMPOSITE_A,4,2    ; @ATOM_S0_TV1_COMPOSITE_A
	.comm	_ATOM_S0_TV1_SVIDEO,4,2         ; @ATOM_S0_TV1_SVIDEO
	.comm	_ATOM_S0_TV1_SVIDEO_A,4,2       ; @ATOM_S0_TV1_SVIDEO_A
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.no_dead_strip	_radeon_atom_dig_detect
.subsections_via_symbols
