	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function detect_dp
_detect_dp:                             ## @detect_dp
	.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
	movl	%r8d, %r12d
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	%r8d, %esi
	callq	_link_detect_sink
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_get_ddc_transaction_type
	movq	%rax, (%rbx)
	movq	_DDC_TRANSACTION_TYPE_I2C_OVER_AUX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.1:
	movq	_SIGNAL_TYPE_DISPLAY_PORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	callq	_detect_dp_sink_caps
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	callq	_is_mst_supported
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_SIGNAL_TYPE_DISPLAY_PORT_MST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_dc_connection_mst_branch@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movl	8(%r15), %edi
	movq	(%rbx), %rsi
	callq	_dal_ddc_service_set_transaction_type
	movq	_DETECT_REASON_BOOT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpl	%r12d, (%rax)
	sete	%r13b
	movl	32(%r15), %edi
	movq	%r15, %rsi
	callq	_dm_helpers_dp_update_branch_info
	movl	32(%r15), %edi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_dm_helpers_dp_mst_start_top_mgr
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_dc_connection_single@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_SIGNAL_TYPE_DISPLAY_PORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_6:
	movq	(%r15), %rax
	movq	_dc_connection_mst_branch@GOTPCREL(%rip), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.7:
	movq	%r15, %rdi
	callq	_is_dp_active_dongle
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_dc_connection_active_dongle@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	cmpl	$0, 24(%r15)
	je	LBB0_9
## %bb.10:
	movq	16(%r15), %rax
	movq	_DISPLAY_DONGLE_DP_HDMI_CONVERTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movl	$1, (%r14)
	jmp	LBB0_13
LBB0_12:
	movl	8(%r15), %edi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_dp_passive_dongle_detection
	movq	%rax, 8(%rbx)
	movl	$1, %ebx
	jmp	LBB0_13
LBB0_2:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_link_disconnect_sink
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DDC_TRANSACTION_TYPE_I2C_OVER_AUX,8,3 ## @DDC_TRANSACTION_TYPE_I2C_OVER_AUX
	.comm	_SIGNAL_TYPE_DISPLAY_PORT,8,3   ## @SIGNAL_TYPE_DISPLAY_PORT
	.comm	_SIGNAL_TYPE_DISPLAY_PORT_MST,8,3 ## @SIGNAL_TYPE_DISPLAY_PORT_MST
	.comm	_dc_connection_mst_branch,8,3   ## @dc_connection_mst_branch
	.comm	_DETECT_REASON_BOOT,4,2         ## @DETECT_REASON_BOOT
	.comm	_dc_connection_single,8,3       ## @dc_connection_single
	.comm	_dc_connection_active_dongle,8,3 ## @dc_connection_active_dongle
	.comm	_DISPLAY_DONGLE_DP_HDMI_CONVERTER,8,3 ## @DISPLAY_DONGLE_DP_HDMI_CONVERTER
	.no_dead_strip	_detect_dp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detect_dp
_detect_dp:                             ; @detect_dp
	.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	x22, x4
	mov	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x1, x4
	bl	_link_detect_sink
	str	x0, [x21, #8]
	bl	_get_ddc_transaction_type
	str	x0, [x21]
Lloh0:
	adrp	x8, _DDC_TRANSACTION_TYPE_I2C_OVER_AUX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DDC_TRANSACTION_TYPE_I2C_OVER_AUX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.1:
Lloh3:
	adrp	x23, _SIGNAL_TYPE_DISPLAY_PORT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SIGNAL_TYPE_DISPLAY_PORT@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x21, #8]
	mov	x0, x20
	bl	_detect_dp_sink_caps
	cbz	w0, LBB0_12
; %bb.2:
	mov	x0, x20
	bl	_is_mst_supported
Lloh5:
	adrp	x24, _dc_connection_mst_branch@GOTPAGE
Lloh6:
	ldr	x24, [x24, _dc_connection_mst_branch@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _SIGNAL_TYPE_DISPLAY_PORT_MST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIGNAL_TYPE_DISPLAY_PORT_MST@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x21, #8]
	ldr	x8, [x24]
	str	x8, [x20]
	ldr	w0, [x20, #8]
	ldr	x1, [x21]
	bl	_dal_ddc_service_set_transaction_type
Lloh10:
	adrp	x8, _DETECT_REASON_BOOT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DETECT_REASON_BOOT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w22
	cset	w22, eq
	ldr	w0, [x20, #32]
	mov	x1, x20
	bl	_dm_helpers_dp_update_branch_info
	ldr	w0, [x20, #32]
	mov	x1, x20
	mov	x2, x22
	bl	_dm_helpers_dp_mst_start_top_mgr
	cbnz	w0, LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _dc_connection_single@GOTPAGE
Lloh14:
	ldr	x8, [x8, _dc_connection_single@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x20]
	ldr	x8, [x23]
	str	x8, [x21, #8]
LBB0_5:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.6:
	mov	x0, x20
	bl	_is_dp_active_dongle
	cbz	x0, LBB0_11
; %bb.7:
Lloh16:
	adrp	x8, _dc_connection_active_dongle@GOTPAGE
Lloh17:
	ldr	x8, [x8, _dc_connection_active_dongle@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x20]
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_13
; %bb.8:
	ldr	x8, [x20, #16]
Lloh19:
	adrp	x9, _DISPLAY_DONGLE_DP_HDMI_CONVERTER@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DISPLAY_DONGLE_DP_HDMI_CONVERTER@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	mov	w0, #1
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.9:
	str	w0, [x19]
	b	LBB0_12
LBB0_10:
	ldr	w0, [x20, #8]
	mov	x1, x21
	mov	x2, x23
	bl	_dp_passive_dongle_detection
	str	x0, [x21, #8]
LBB0_11:
	mov	w0, #1
LBB0_12:
	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_13:
	mov	x0, x20
	bl	_link_disconnect_sink
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DDC_TRANSACTION_TYPE_I2C_OVER_AUX,8,3 ; @DDC_TRANSACTION_TYPE_I2C_OVER_AUX
	.comm	_SIGNAL_TYPE_DISPLAY_PORT,8,3   ; @SIGNAL_TYPE_DISPLAY_PORT
	.comm	_SIGNAL_TYPE_DISPLAY_PORT_MST,8,3 ; @SIGNAL_TYPE_DISPLAY_PORT_MST
	.comm	_dc_connection_mst_branch,8,3   ; @dc_connection_mst_branch
	.comm	_DETECT_REASON_BOOT,4,2         ; @DETECT_REASON_BOOT
	.comm	_dc_connection_single,8,3       ; @dc_connection_single
	.comm	_dc_connection_active_dongle,8,3 ; @dc_connection_active_dongle
	.comm	_DISPLAY_DONGLE_DP_HDMI_CONVERTER,8,3 ; @DISPLAY_DONGLE_DP_HDMI_CONVERTER
	.no_dead_strip	_detect_dp
.subsections_via_symbols
