	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atom_dac_detect
_radeon_atom_dac_detect:                ## @radeon_atom_dac_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, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_to_radeon_connector
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_atombios_dac_load_detect
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	(%r13), %rax
	movq	_CHIP_R600@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.2:
	movq	_RADEON_BIOS_0_SCRATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_connector_status_unknown@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_4:
	movq	_R600_BIOS_0_SCRATCH@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %r15d
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	(%r14), %eax
	movq	_ATOM_DEVICE_CRT1_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.6:
	movq	_ATOM_S0_CRT1_MASK@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jne	LBB0_7
LBB0_8:
	movq	_ATOM_DEVICE_CRT2_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.9:
	movq	_ATOM_S0_CRT2_MASK@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jne	LBB0_7
LBB0_11:
	movq	_ATOM_DEVICE_CV_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.12:
	movq	_ATOM_S0_CV_MASK@GOTPCREL(%rip), %rcx
	movq	_ATOM_S0_CV_MASK_A@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%r15d, %edx
	je	LBB0_14
LBB0_7:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ATOM_DEVICE_TV1_SUPPORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.15:
	movq	_ATOM_S0_TV1_COMPOSITE@GOTPCREL(%rip), %rax
	movq	_ATOM_S0_TV1_COMPOSITE_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	testl	%r15d, %ecx
	jne	LBB0_18
## %bb.16:
	movq	_ATOM_S0_TV1_SVIDEO@GOTPCREL(%rip), %rcx
	movq	_ATOM_S0_TV1_SVIDEO_A@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%r15d, %edx
	jne	LBB0_18
LBB0_17:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detect returned false \n"

	.comm	_connector_status_unknown,4,2   ## @connector_status_unknown
	.comm	_CHIP_R600,8,3                  ## @CHIP_R600
	.comm	_R600_BIOS_0_SCRATCH,4,2        ## @R600_BIOS_0_SCRATCH
	.comm	_RADEON_BIOS_0_SCRATCH,4,2      ## @RADEON_BIOS_0_SCRATCH
L_.str.1:                               ## @.str.1
	.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_dac_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_dac_detect
_radeon_atom_dac_detect:                ; @radeon_atom_dac_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x23, [x8]
	bl	_to_radeon_encoder
	mov	x21, x0
	mov	x0, x19
	bl	_to_radeon_connector
	mov	x20, x0
	mov	x0, x22
	mov	x1, x19
	bl	_atombios_dac_load_detect
	cbz	w0, LBB0_11
; %bb.1:
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _CHIP_R600@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_R600@GOTPAGEOFF]
Lloh2:
	adrp	x10, _RADEON_BIOS_0_SCRATCH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RADEON_BIOS_0_SCRATCH@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _R600_BIOS_0_SCRATCH@GOTPAGE
Lloh6:
	ldr	x11, [x11, _R600_BIOS_0_SCRATCH@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	ldr	w0, [x8]
	bl	_RREG32
	mov	x19, x0
	ldr	w8, [x21]
	stp	x19, x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATOM_DEVICE_CRT1_SUPPORT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh12:
	adrp	x9, _ATOM_S0_CRT1_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATOM_S0_CRT1_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w19
	b.ne	LBB0_10
LBB0_3:
Lloh15:
	adrp	x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ATOM_DEVICE_CRT2_SUPPORT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh18:
	adrp	x9, _ATOM_S0_CRT2_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATOM_S0_CRT2_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w19
	b.ne	LBB0_10
LBB0_5:
Lloh21:
	adrp	x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATOM_DEVICE_CV_SUPPORT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh24:
	adrp	x9, _ATOM_S0_CV_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ATOM_S0_CV_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _ATOM_S0_CV_MASK_A@GOTPAGE
Lloh28:
	ldr	x10, [x10, _ATOM_S0_CV_MASK_A@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w19
	b.ne	LBB0_10
LBB0_7:
Lloh30:
	adrp	x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ATOM_DEVICE_TV1_SUPPORT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.8:
Lloh33:
	adrp	x8, _ATOM_S0_TV1_COMPOSITE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ATOM_S0_TV1_COMPOSITE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _ATOM_S0_TV1_COMPOSITE_A@GOTPAGE
Lloh37:
	ldr	x9, [x9, _ATOM_S0_TV1_COMPOSITE_A@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	b.ne	LBB0_10
; %bb.9:
Lloh39:
	adrp	x8, _ATOM_S0_TV1_SVIDEO@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ATOM_S0_TV1_SVIDEO@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _ATOM_S0_TV1_SVIDEO_A@GOTPAGE
Lloh43:
	ldr	x9, [x9, _ATOM_S0_TV1_SVIDEO_A@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	b.eq	LBB0_13
LBB0_10:
Lloh45:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh46:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh47:
	adrp	x0, l_.str@PAGE
Lloh48:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh49:
	adrp	x8, _connector_status_unknown@GOTPAGE
Lloh50:
	ldr	x8, [x8, _connector_status_unknown@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
Lloh51:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh52:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detect returned false \n"

	.comm	_connector_status_unknown,4,2   ; @connector_status_unknown
	.comm	_CHIP_R600,8,3                  ; @CHIP_R600
	.comm	_R600_BIOS_0_SCRATCH,4,2        ; @R600_BIOS_0_SCRATCH
	.comm	_RADEON_BIOS_0_SCRATCH,4,2      ; @RADEON_BIOS_0_SCRATCH
l_.str.1:                               ; @.str.1
	.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_dac_detect
.subsections_via_symbols
