	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_detect_sink            ## -- Begin function dc_link_detect_sink
	.p2align	4, 0x90
_dc_link_detect_sink:                   ## @dc_link_detect_sink
	.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	%rsi, %r14
	movq	$0, -24(%rbp)
	movq	(%rdi), %rax
	movq	_SIGNAL_TYPE_LVDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.2:
	movq	%rdi, %rbx
	movq	_SIGNAL_TYPE_EDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*8(%rax)
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*(%rax)
LBB0_4:
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %edi
	movl	16(%rbx), %esi
	callq	_get_hpd_gpio
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %rbx
	movq	_GPIO_MODE_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dal_gpio_open
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dal_gpio_get_value
	movq	%rbx, %rdi
	callq	_dal_gpio_close
	leaq	-32(%rbp), %rdi
	callq	_dal_gpio_destroy_irq
	cmpq	$0, -24(%rbp)
	jne	LBB0_8
## %bb.6:
	movq	_dc_connection_none@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_dc_connection_single@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	$1, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGNAL_TYPE_LVDS,8,3           ## @SIGNAL_TYPE_LVDS
	.comm	_dc_connection_single,4,2       ## @dc_connection_single
	.comm	_SIGNAL_TYPE_EDP,8,3            ## @SIGNAL_TYPE_EDP
	.comm	_GPIO_MODE_INTERRUPT,4,2        ## @GPIO_MODE_INTERRUPT
	.comm	_dc_connection_none,4,2         ## @dc_connection_none
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_detect_sink            ; -- Begin function dc_link_detect_sink
	.p2align	2
_dc_link_detect_sink:                   ; @dc_link_detect_sink
	.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, x1
	str	xzr, [sp, #8]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SIGNAL_TYPE_LVDS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIGNAL_TYPE_LVDS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _dc_connection_single@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dc_connection_single@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x20, x0
Lloh5:
	adrp	x9, _SIGNAL_TYPE_EDP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SIGNAL_TYPE_EDP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	w1, #1
	blr	x8
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	mov	x0, x20
	mov	w1, #1
	blr	x8
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	w1, [x20, #16]
	ldp	w2, w0, [x8]
	bl	_get_hpd_gpio
	str	x0, [sp]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
Lloh8:
	adrp	x8, _GPIO_MODE_INTERRUPT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPIO_MODE_INTERRUPT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_dal_gpio_open
	add	x1, sp, #8
	mov	x0, x20
	bl	_dal_gpio_get_value
	mov	x0, x20
	bl	_dal_gpio_close
	mov	x0, sp
	bl	_dal_gpio_destroy_irq
Lloh11:
	adrp	x8, _dc_connection_none@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dc_connection_none@GOTPAGEOFF]
	ldr	x9, [sp, #8]
Lloh13:
	adrp	x10, _dc_connection_single@GOTPAGE
Lloh14:
	ldr	x10, [x10, _dc_connection_single@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #1
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGNAL_TYPE_LVDS,8,3           ; @SIGNAL_TYPE_LVDS
	.comm	_dc_connection_single,4,2       ; @dc_connection_single
	.comm	_SIGNAL_TYPE_EDP,8,3            ; @SIGNAL_TYPE_EDP
	.comm	_GPIO_MODE_INTERRUPT,4,2        ; @GPIO_MODE_INTERRUPT
	.comm	_dc_connection_none,4,2         ; @dc_connection_none
.subsections_via_symbols
