	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_detect_dpcd
_intel_dp_detect_dpcd:                  ## @intel_dp_detect_dpcd
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	callq	_intel_dp_get_dpcd
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movq	_DP_DOWNSTREAMPORT_PRESENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DP_DWN_STRM_PORT_PRESENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14,%rax,4)
	je	LBB0_7
## %bb.2:
	movq	8(%rbx), %rax
	movq	_DP_DS_PORT_HPD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_DP_SINK_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_intel_dp_aux_native_read_retry
	testl	%eax, %eax
	je	LBB0_12
## %bb.4:
	movl	-20(%rbp), %edi
	callq	_DP_GET_SINK_COUNT
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_11
LBB0_6:
	leaq	16(%rbx), %rdi
	callq	_drm_probe_ddc
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	movq	8(%rbx), %rcx
	movq	_DP_DS_PORT_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rcx), %eax
	movq	_DP_DS_PORT_TYPE_VGA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.9:
	movq	_DP_DS_PORT_TYPE_NON_EDID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
LBB0_11:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_connector_status_unknown@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.comm	_DP_DOWNSTREAMPORT_PRESENT,8,3  ## @DP_DOWNSTREAMPORT_PRESENT
	.comm	_DP_DWN_STRM_PORT_PRESENT,4,2   ## @DP_DWN_STRM_PORT_PRESENT
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_DP_DS_PORT_HPD,4,2             ## @DP_DS_PORT_HPD
	.comm	_DP_SINK_COUNT,4,2              ## @DP_SINK_COUNT
	.comm	_connector_status_unknown,4,2   ## @connector_status_unknown
	.comm	_DP_DS_PORT_TYPE_MASK,4,2       ## @DP_DS_PORT_TYPE_MASK
	.comm	_DP_DS_PORT_TYPE_VGA,4,2        ## @DP_DS_PORT_TYPE_VGA
	.comm	_DP_DS_PORT_TYPE_NON_EDID,4,2   ## @DP_DS_PORT_TYPE_NON_EDID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Broken DP branch device, ignoring\n"

	.no_dead_strip	_intel_dp_detect_dpcd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_detect_dpcd
_intel_dp_detect_dpcd:                  ; @intel_dp_detect_dpcd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	bl	_intel_dp_get_dpcd
	cbz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _DP_DOWNSTREAMPORT_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_DOWNSTREAMPORT_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
Lloh3:
	adrp	x9, _DP_DWN_STRM_PORT_PRESENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DP_DWN_STRM_PORT_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DP_DS_PORT_HPD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DP_DS_PORT_HPD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _DP_SINK_COUNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_SINK_COUNT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_intel_dp_aux_native_read_retry
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w0, [sp, #12]
	bl	_DP_GET_SINK_COUNT
Lloh12:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh13:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh14:
	adrp	x9, _connector_status_disconnected@GOTPAGE
Lloh15:
	ldr	x9, [x9, _connector_status_disconnected@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_11
LBB0_5:
	add	x0, x19, #16
	bl	_drm_probe_ddc
	cbz	x0, LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh17:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _DP_DS_PORT_TYPE_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DP_DS_PORT_TYPE_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh21:
	adrp	x9, _DP_DS_PORT_TYPE_VGA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DP_DS_PORT_TYPE_VGA@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _DP_DS_PORT_TYPE_NON_EDID@GOTPAGE
Lloh25:
	ldr	x10, [x10, _DP_DS_PORT_TYPE_NON_EDID@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_9
LBB0_8:
Lloh27:
	adrp	x8, _connector_status_unknown@GOTPAGE
Lloh28:
	ldr	x8, [x8, _connector_status_unknown@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_10:
Lloh31:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh32:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.comm	_DP_DOWNSTREAMPORT_PRESENT,8,3  ; @DP_DOWNSTREAMPORT_PRESENT
	.comm	_DP_DWN_STRM_PORT_PRESENT,4,2   ; @DP_DWN_STRM_PORT_PRESENT
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_DP_DS_PORT_HPD,4,2             ; @DP_DS_PORT_HPD
	.comm	_DP_SINK_COUNT,4,2              ; @DP_SINK_COUNT
	.comm	_connector_status_unknown,4,2   ; @connector_status_unknown
	.comm	_DP_DS_PORT_TYPE_MASK,4,2       ; @DP_DS_PORT_TYPE_MASK
	.comm	_DP_DS_PORT_TYPE_VGA,4,2        ; @DP_DS_PORT_TYPE_VGA
	.comm	_DP_DS_PORT_TYPE_NON_EDID,4,2   ; @DP_DS_PORT_TYPE_NON_EDID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Broken DP branch device, ignoring\n"

	.no_dead_strip	_intel_dp_detect_dpcd
.subsections_via_symbols
