	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_dp_detect
_cdv_dp_detect:                         ## @cdv_dp_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %r14
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdx
	xorl	%esi, %esi
	movl	$8, %ecx
	callq	_cdv_intel_dp_aux_native_read
	cmpl	$8, %eax
	jne	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovnel	%eax, %ebx
	cmpl	%eax, %ebx
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jne	LBB0_5
LBB0_4:
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movl	8(%rax), %ecx
	movl	12(%rax), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.comm	_DP_DPCD_REV,8,3                ## @DP_DPCD_REV
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPCD: Rev=%x LN_Rate=%x LN_CNT=%x LN_DOWNSP=%x\n"

	.no_dead_strip	_cdv_dp_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_dp_detect
_cdv_dp_detect:                         ; @cdv_dp_detect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x2, [x20]
	mov	w1, #0
	mov	w3, #8
	bl	_cdv_intel_dp_aux_native_read
	cmp	w0, #8
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _DP_DPCD_REV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DP_DPCD_REV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
Lloh6:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh7:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w9, #0
	csel	w19, w19, w8, eq
	cmp	w19, w8
	b.eq	LBB0_3
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh10:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_4
LBB0_3:
	ldr	x8, [x20]
	ldp	w1, w2, [x8]
	ldp	w3, w4, [x8, #8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.comm	_DP_DPCD_REV,8,3                ; @DP_DPCD_REV
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPCD: Rev=%x LN_Rate=%x LN_CNT=%x LN_DOWNSP=%x\n"

	.no_dead_strip	_cdv_dp_detect
.subsections_via_symbols
