	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_detect
_intel_dp_detect:                       ## @intel_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_intel_attached_dp
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_dp_to_dig_port
	movq	%rax, %rbx
	movl	(%r15), %edx
	movl	4(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_drm_modeset_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%r13, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_edp_detect
	movl	%eax, %r12d
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_intel_digital_port_connected
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_intel_dp_detect_dpcd
	movl	%eax, %r12d
	jmp	LBB0_5
LBB0_4:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r12d
	jne	LBB0_8
## %bb.6:
	leaq	48(%r13), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	40(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	(%r13), %esi
	testl	%esi, %esi
	je	LBB0_20
## %bb.7:
	movq	%r13, %rbx
	addq	$32, %rbx
	movl	32(%r13), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	$0, (%r13)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_dp_mst_topology_mgr_set_mst
	jmp	LBB0_20
LBB0_8:
	cmpl	$0, 4(%r13)
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_intel_dp_max_common_lane_count
	movl	%eax, 28(%r13)
	movq	%r13, %rdi
	callq	_intel_dp_max_common_rate
	movl	%eax, 24(%r13)
	movl	$0, 4(%r13)
LBB0_10:
	movq	%r13, %rdi
	callq	_intel_dp_print_rates
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$11, %eax
	jl	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	callq	_intel_dp_get_dsc_sink_cap
LBB0_12:
	movq	%r13, %rdi
	callq	_intel_dp_configure_mst
	cmpl	$0, (%r13)
	je	LBB0_14
## %bb.13:
	movl	(%rbx), %ebx
	jmp	LBB0_21
LBB0_14:
	movq	%r13, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	je	LBB0_15
LBB0_16:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r13)
	movq	%r13, %rdi
	callq	_intel_dp_set_edid
	movq	%r13, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	callq	_to_intel_connector
	cmpq	$0, (%rax)
	je	LBB0_19
LBB0_18:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_19:
	movq	%r13, %rdi
	callq	_intel_dp_check_service_irq
LBB0_20:
	movl	%r12d, %ebx
LBB0_21:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_24
## %bb.22:
	cmpl	$0, (%r13)
	jne	LBB0_24
## %bb.23:
	movq	%r13, %rdi
	callq	_intel_dp_unset_edid
LBB0_24:
	movq	%r14, %rdi
	callq	_intel_display_power_flush_work
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_intel_dp_retrain_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[CONNECTOR:%d:%s]\n"

	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
L_.str.1:                               ## @.str.1
	.asciz	"MST device may have disappeared %d vs %d\n"

	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.no_dead_strip	_intel_dp_detect
.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
_intel_dp_detect:                       ; @intel_dp_detect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_to_i915
	mov	x19, x0
	mov	x0, x21
	bl	_intel_attached_dp
	mov	x20, x0
	bl	_dp_to_dig_port
	mov	x24, x0
	ldp	w2, w1, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_drm_modeset_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x20
	bl	_intel_dp_is_edp
Lloh2:
	adrp	x26, _connector_status_disconnected@GOTPAGE
Lloh3:
	ldr	x26, [x26, _connector_status_disconnected@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_edp_detect
	mov	x22, x0
	b	LBB0_5
LBB0_2:
	mov	x0, x24
	bl	_intel_digital_port_connected
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_intel_dp_detect_dpcd
	mov	x22, x0
	b	LBB0_5
LBB0_4:
	ldr	w22, [x26]
LBB0_5:
	ldr	w8, [x26]
Lloh4:
	adrp	x25, _connector_status_connected@GOTPAGE
Lloh5:
	ldr	x25, [x25, _connector_status_connected@GOTPAGEOFF]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.6:
	add	x0, x20, #48
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x20, #40]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w1, [x20]
	cbz	w1, LBB0_19
; %bb.7:
	mov	x21, x20
	ldr	w2, [x21, #32]!
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	str	wzr, [x20]
	mov	x0, x21
	mov	w1, #0
	bl	_drm_dp_mst_topology_mgr_set_mst
	b	LBB0_19
LBB0_8:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_intel_dp_max_common_lane_count
	str	w0, [x20, #28]
	mov	x0, x20
	bl	_intel_dp_max_common_rate
	str	w0, [x20, #24]
	str	wzr, [x20, #4]
LBB0_10:
	mov	x0, x20
	bl	_intel_dp_print_rates
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #11
	b.lt	LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_intel_dp_get_dsc_sink_cap
LBB0_12:
	mov	x0, x20
	bl	_intel_dp_configure_mst
	ldr	w8, [x20]
	cbz	w8, LBB0_14
; %bb.13:
	ldr	w23, [x26]
	b	LBB0_20
LBB0_14:
	mov	x0, x20
	bl	_intel_dp_is_edp
	cbz	x0, LBB0_25
LBB0_15:
	stp	xzr, xzr, [x20, #8]
	mov	x0, x20
	bl	_intel_dp_set_edid
	mov	x0, x20
	bl	_intel_dp_is_edp
	cbnz	x0, LBB0_17
; %bb.16:
	mov	x0, x21
	bl	_to_intel_connector
	ldr	x8, [x0]
	cbz	x8, LBB0_18
LBB0_17:
	ldr	w22, [x25]
LBB0_18:
	mov	x0, x20
	bl	_intel_dp_check_service_irq
LBB0_19:
	mov	x23, x22
LBB0_20:
	ldr	w8, [x25]
	cmp	w23, w8
	b.eq	LBB0_23
; %bb.21:
	ldr	w8, [x20]
	cbnz	w8, LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_intel_dp_unset_edid
LBB0_23:
	mov	x0, x19
	bl	_intel_display_power_flush_work
LBB0_24:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	x0, x24
	mov	x1, x23
	bl	_intel_dp_retrain_link
	mov	x23, x0
	cbnz	w0, LBB0_24
	b	LBB0_15
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[CONNECTOR:%d:%s]\n"

	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
l_.str.1:                               ; @.str.1
	.asciz	"MST device may have disappeared %d vs %d\n"

	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.no_dead_strip	_intel_dp_detect
.subsections_via_symbols
