	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_enable_hpd_filter      ## -- Begin function dc_link_enable_hpd_filter
	.p2align	4, 0x90
_dc_link_enable_hpd_filter:             ## @dc_link_enable_hpd_filter
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	testl	%esi, %esi
	je	LBB0_1
## %bb.7:
	movl	$0, (%rdi)
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_program_hpd_filter             ## TAILCALL
LBB0_1:
	movl	$1, (%rdi)
	movq	8(%rdi), %rax
	movl	(%rax), %edx
	movl	4(%rax), %eax
	movl	16(%rdi), %esi
	movl	%eax, %edi
	callq	_get_hpd_gpio
	movq	%rax, -16(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	movq	_GPIO_MODE_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dal_gpio_open
	movq	_GPIO_RESULT_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dal_irq_setup_hpd_filter
	movq	%rbx, %rdi
	callq	_dal_gpio_close
	jmp	LBB0_5
LBB0_4:
	xorl	%edi, %edi
	callq	_ASSERT_CRITICAL
LBB0_5:
	leaq	-16(%rbp), %rdi
	callq	_dal_gpio_destroy_irq
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_MODE_INTERRUPT,4,2        ## @GPIO_MODE_INTERRUPT
	.comm	_GPIO_RESULT_OK,8,3             ## @GPIO_RESULT_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_enable_hpd_filter      ; -- Begin function dc_link_enable_hpd_filter
	.p2align	2
_dc_link_enable_hpd_filter:             ; @dc_link_enable_hpd_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	cbz	w1, LBB0_2
; %bb.1:
	str	wzr, [x0]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_program_hpd_filter
LBB0_2:
	mov	w8, #1
	str	w8, [x0]
	ldr	x8, [x0, #8]
	ldr	w1, [x0, #16]
	ldp	w2, w0, [x8]
	bl	_get_hpd_gpio
	str	x0, [sp, #24]
	cbz	x0, LBB0_7
; %bb.3:
	mov	x19, x0
Lloh0:
	adrp	x8, _GPIO_MODE_INTERRUPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_MODE_INTERRUPT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_dal_gpio_open
Lloh3:
	adrp	x8, _GPIO_RESULT_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIO_RESULT_OK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	stp	xzr, xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_dal_irq_setup_hpd_filter
	mov	x0, x19
	bl	_dal_gpio_close
	b	LBB0_6
LBB0_5:
	mov	w0, #0
	bl	_ASSERT_CRITICAL
LBB0_6:
	add	x0, sp, #24
	bl	_dal_gpio_destroy_irq
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_MODE_INTERRUPT,4,2        ; @GPIO_MODE_INTERRUPT
	.comm	_GPIO_RESULT_OK,8,3             ; @GPIO_RESULT_OK
.subsections_via_symbols
