	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_connector_detect
_hdmi_connector_detect:                 ## @hdmi_connector_detect
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_to_hdmi_connector
	movq	(%rax), %r14
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_HPD_GPIO_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_6
## %bb.1:
	movl	$-20, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_detect_gpio
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_detect_reg
	cmpl	%eax, %r15d
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r12d
	movl	$10, %edi
	callq	_mdelay
	incl	%ebx
	jne	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_DBG
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_DBG
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_detect_reg                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HPD_GPIO_INDEX,8,3             ## @HPD_GPIO_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDMI_HPD_INT_STATUS tells us: %d"

L_.str.1:                               ## @.str.1
	.asciz	"hpd gpio tells us: %d"

	.no_dead_strip	_hdmi_connector_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_connector_detect
_hdmi_connector_detect:                 ; @hdmi_connector_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	bl	_to_hdmi_connector
	ldr	x19, [x0]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HPD_GPIO_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HPD_GPIO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cbz	w8, LBB0_6
; %bb.1:
	mov	w22, #-20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_detect_gpio
	mov	x20, x0
	mov	x0, x19
	bl	_detect_reg
	cmp	w20, w0
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	mov	w0, #10
	bl	_mdelay
	adds	w22, w22, #1
	b.lo	LBB0_2
; %bb.4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DBG
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DBG
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_detect_reg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HPD_GPIO_INDEX,8,3             ; @HPD_GPIO_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDMI_HPD_INT_STATUS tells us: %d"

l_.str.1:                               ; @.str.1
	.asciz	"hpd gpio tells us: %d"

	.no_dead_strip	_hdmi_connector_detect
.subsections_via_symbols
