	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_is_dp_sink_present     ## -- Begin function dc_link_is_dp_sink_present
	.p2align	4, 0x90
_dc_link_is_dp_sink_present:            ## @dc_link_is_dp_sink_present
	.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	%rdi, %rbx
	movq	$0, -48(%rbp)
	movl	4(%rdi), %edi
	callq	_dal_graphics_object_id_get_connector_id
	movq	_CONNECTOR_ID_DISPLAY_PORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_CONNECTOR_ID_EDP@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%r12b
	orb	%cl, %r12b
	movl	(%rbx), %edi
	callq	_dal_ddc_service_get_ddc_pin
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_GPIO_RESULT_OK@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	_GPIO_MODE_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_dal_ddc_open
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.3:
	movl	(%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_dal_gpio_get_value
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpq	%r12, (%r14)
	sete	%dil
	callq	_ASSERT
	movb	$1, %r15b
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_dal_gpio_get_value
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpq	%r12, (%r14)
	sete	%dil
	callq	_ASSERT
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.5:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_dal_gpio_get_value
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpq	%r12, (%r14)
	sete	%dil
	callq	_ASSERT
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_dal_gpio_get_value
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpq	%r12, (%r14)
	sete	%dil
	callq	_ASSERT
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.7:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	cmpq	$0, -48(%rbp)
	sete	%r15b
LBB0_8:
	cmpq	%r12, (%r14)
	sete	%r12b
	andb	%r15b, %r12b
	movq	%r13, %rdi
	callq	_dal_ddc_close
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	callq	_BREAK_TO_DEBUGGER
	jmp	LBB0_9
LBB0_10:
	leaq	-56(%rbp), %rdi
	callq	_dal_gpio_destroy_ddc
LBB0_9:
	movzbl	%r12b, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONNECTOR_ID_DISPLAY_PORT,4,2  ## @CONNECTOR_ID_DISPLAY_PORT
	.comm	_CONNECTOR_ID_EDP,4,2           ## @CONNECTOR_ID_EDP
	.comm	_GPIO_RESULT_OK,8,3             ## @GPIO_RESULT_OK
	.comm	_GPIO_MODE_INPUT,4,2            ## @GPIO_MODE_INPUT
	.comm	_GPIO_DDC_CONFIG_TYPE_MODE_I2C,4,2 ## @GPIO_DDC_CONFIG_TYPE_MODE_I2C
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_is_dp_sink_present     ; -- Begin function dc_link_is_dp_sink_present
	.p2align	2
_dc_link_is_dp_sink_present:            ; @dc_link_is_dp_sink_present
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0, #4]
	bl	_dal_graphics_object_id_get_connector_id
Lloh0:
	adrp	x8, _CONNECTOR_ID_DISPLAY_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONNECTOR_ID_DISPLAY_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
Lloh3:
	adrp	x8, _CONNECTOR_ID_EDP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONNECTOR_ID_EDP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w0, w8, #4, ne
	cset	w20, eq
	ldr	w0, [x19]
	bl	_dal_ddc_service_get_ddc_pin
	str	x0, [sp]
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x21, _GPIO_RESULT_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GPIO_RESULT_OK@GOTPAGEOFF]
	ldr	x22, [x21]
Lloh8:
	adrp	x8, _GPIO_MODE_INPUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPIO_MODE_INPUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_dal_ddc_open
	cmp	x22, x0
	b.ne	LBB0_8
; %bb.2:
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_dal_gpio_get_value
	mov	w20, w0
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
	bl	_ASSERT
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.3:
	mov	w0, #1000
	bl	_udelay
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_dal_gpio_get_value
	mov	w20, w0
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
	bl	_ASSERT
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.4:
	mov	w0, #1000
	bl	_udelay
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_dal_gpio_get_value
	mov	w20, w0
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
	bl	_ASSERT
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.5:
	mov	w0, #1000
	bl	_udelay
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_dal_gpio_get_value
	mov	w20, w0
	ldr	x8, [x21]
	cmp	x8, x20
	cset	w0, eq
	bl	_ASSERT
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.6:
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w8, eq
	b	LBB0_10
LBB0_7:
	bl	_BREAK_TO_DEBUGGER
	b	LBB0_11
LBB0_8:
	mov	x0, sp
	bl	_dal_gpio_destroy_ddc
	b	LBB0_11
LBB0_9:
	mov	w8, #1
LBB0_10:
	ldr	x9, [x21]
	cmp	x9, x20
	cset	w9, eq
	and	w20, w9, w8
	mov	x0, x19
	bl	_dal_ddc_close
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CONNECTOR_ID_DISPLAY_PORT,4,2  ; @CONNECTOR_ID_DISPLAY_PORT
	.comm	_CONNECTOR_ID_EDP,4,2           ; @CONNECTOR_ID_EDP
	.comm	_GPIO_RESULT_OK,8,3             ; @GPIO_RESULT_OK
	.comm	_GPIO_MODE_INPUT,4,2            ; @GPIO_MODE_INPUT
	.comm	_GPIO_DDC_CONFIG_TYPE_MODE_I2C,4,2 ; @GPIO_DDC_CONFIG_TYPE_MODE_I2C
.subsections_via_symbols
