	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function program_hpd_filter
_program_hpd_filter:                    ## @program_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	cmpq	$0, 24(%rdi)
	jne	LBB0_8
## %bb.1:
	movl	$-129, %ebx
	addl	(%rdi), %ebx
	cmpl	$5, %ebx
	ja	LBB0_8
## %bb.2:
	movl	$61, %eax
	btl	%ebx, %eax
	jae	LBB0_8
## %bb.3:
	movq	8(%rdi), %rax
	movl	(%rax), %edx
	movl	4(%rax), %eax
	movl	16(%rdi), %esi
	movl	%eax, %edi
	callq	_get_hpd_gpio
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r14
	movq	_GPIO_MODE_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dal_gpio_open
	movq	_GPIO_RESULT_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movslq	%ebx, %rax
	leaq	l_switch.table.program_hpd_filter(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
	leaq	l_switch.table.program_hpd_filter.1(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	movl	%ecx, -32(%rbp)
	movl	%eax, -28(%rbp)
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_dal_irq_setup_hpd_filter
	movq	%r14, %rdi
	callq	_dal_gpio_close
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_6:
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_ASSERT_CRITICAL
LBB0_7:
	leaq	-40(%rbp), %rdi
	callq	_dal_gpio_destroy_irq
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	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
	.no_dead_strip	_program_hpd_filter
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.program_hpd_filter
l_switch.table.program_hpd_filter:
	.long	500                             ## 0x1f4
	.long	500                             ## 0x1f4
	.long	500                             ## 0x1f4
	.long	500                             ## 0x1f4
	.long	80                              ## 0x50
	.long	80                              ## 0x50

	.p2align	2                               ## @switch.table.program_hpd_filter.1
l_switch.table.program_hpd_filter.1:
	.long	100                             ## 0x64
	.long	100                             ## 0x64
	.long	100                             ## 0x64
	.long	100                             ## 0x64
	.long	0                               ## 0x0
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function program_hpd_filter
_program_hpd_filter:                    ; @program_hpd_filter
	.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
	ldr	x8, [x0, #24]
	cbnz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x0]
	sub	w20, w8, #129
	cmp	w20, #5
	b.hi	LBB0_3
; %bb.2:
	mov	w8, #61
	lsr	w8, w8, w20
	tbnz	w8, #0, LBB0_5
LBB0_3:
	mov	w19, #0
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	ldr	x8, [x0, #8]
	ldr	w1, [x0, #16]
	ldp	w2, w0, [x8]
	bl	_get_hpd_gpio
	mov	x19, x0
	str	x0, [sp, #8]
	cbz	x0, LBB0_4
; %bb.6:
Lloh0:
	adrp	x8, _GPIO_MODE_INTERRUPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_MODE_INTERRUPT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	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_8
; %bb.7:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sbfiz	x8, x20, #2, #32
Lloh6:
	adrp	x9, l_switch.table.program_hpd_filter@PAGE
Lloh7:
	add	x9, x9, l_switch.table.program_hpd_filter@PAGEOFF
	ldr	w9, [x9, x8]
Lloh8:
	adrp	x10, l_switch.table.program_hpd_filter.1@PAGE
Lloh9:
	add	x10, x10, l_switch.table.program_hpd_filter.1@PAGEOFF
	ldr	w8, [x10, x8]
	stp	w9, w8, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_dal_irq_setup_hpd_filter
	mov	x0, x19
	bl	_dal_gpio_close
	mov	w19, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	bl	_ASSERT_CRITICAL
	mov	w19, #0
LBB0_9:
	add	x0, sp, #8
	bl	_dal_gpio_destroy_irq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_MODE_INTERRUPT,4,2        ; @GPIO_MODE_INTERRUPT
	.comm	_GPIO_RESULT_OK,8,3             ; @GPIO_RESULT_OK
	.no_dead_strip	_program_hpd_filter
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.program_hpd_filter
l_switch.table.program_hpd_filter:
	.long	500                             ; 0x1f4
	.long	500                             ; 0x1f4
	.long	500                             ; 0x1f4
	.long	500                             ; 0x1f4
	.long	80                              ; 0x50
	.long	80                              ; 0x50

	.p2align	2                               ; @switch.table.program_hpd_filter.1
l_switch.table.program_hpd_filter.1:
	.long	100                             ; 0x64
	.long	100                             ; 0x64
	.long	100                             ; 0x64
	.long	100                             ; 0x64
	.long	0                               ; 0x0
	.long	0                               ; 0x0

.subsections_via_symbols
