	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_present_sense
_hdmi_present_sense:                    ## @hdmi_present_sense
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	48(%rdi), %r14
	movq	16(%r14), %r13
	movl	12(%rdi), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_snd_hda_pin_sense
	movq	_AC_PINSENSE_PRESENCE@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%r8b
	movl	%r8d, 16(%r12)
	movq	_AC_PINSENSE_ELDV@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	setne	%al
	andb	%r8b, %al
	movzbl	%al, %r9d
	movl	%r9d, 4(%r13)
	movq	_SND_PR_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	callq	__snd_printd
	cmpl	$0, 4(%r13)
	je	LBB0_7
## %bb.1:
	movl	24(%r13), %edx
	leaq	8(%r13), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_snd_hdmi_get_eld
	testq	%rax, %rax
	js	LBB0_5
## %bb.2:
	leaq	20(%r13), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	24(%r13), %esi
	movq	8(%r13), %rdx
	movq	%rbx, %rdi
	callq	_snd_hdmi_parse_eld
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	cmpl	$0, 4(%r13)
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_snd_hdmi_show_eld
	leaq	32(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	4(%r13), %eax
	jmp	LBB0_9
LBB0_5:
	movl	$0, 4(%r13)
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.13:
	movq	(%r14), %rax
	movl	4(%rax), %ebx
	addq	$8, %r12
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msecs_to_jiffies
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_delayed_work             ## TAILCALL
LBB0_7:
	leaq	32(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$0, 20(%r12)
	je	LBB0_12
## %bb.8:
	movl	4(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_12
LBB0_9:
	movl	%eax, 20(%r12)
	movq	24(%r12), %rax
	movq	8(%r13), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_14
## %bb.10:
	movl	40(%r12), %edi
	movl	24(%r13), %esi
	movq	%rax, %rdx
	callq	_memcmp
	movq	8(%r13), %rdx
	testq	%rax, %rax
	je	LBB0_11
LBB0_14:
	movl	40(%r12), %edi
	movl	24(%r13), %esi
	callq	_memcpy
	movq	8(%r13), %rax
	movq	%rax, 24(%r12)
	movl	20(%r13), %eax
	movl	%eax, 36(%r12)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movq	_SNDRV_CTL_EVENT_MASK_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	(%r12), %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_ctl_notify                 ## TAILCALL
LBB0_11:
	movq	%rdx, 24(%r12)
	movl	20(%r13), %eax
	movl	%eax, 36(%r12)
LBB0_12:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_PINSENSE_PRESENCE,4,2       ## @AC_PINSENSE_PRESENCE
	.comm	_AC_PINSENSE_ELDV,4,2           ## @AC_PINSENSE_ELDV
	.comm	_SND_PR_VERBOSE,4,2             ## @SND_PR_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n"

	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ## @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_hdmi_present_sense
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_present_sense
_hdmi_present_sense:                    ; @hdmi_present_sense
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #48]
	ldr	x23, [x20, #16]
	ldr	w22, [x0, #12]
	mov	x0, x20
	mov	x1, x22
	bl	_snd_hda_pin_sense
Lloh0:
	adrp	x8, _AC_PINSENSE_PRESENCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_PINSENSE_PRESENCE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w4, ne
	str	w4, [x19, #16]
Lloh3:
	adrp	x8, _AC_PINSENSE_ELDV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_PINSENSE_ELDV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	and	w5, w4, w8
	str	w5, [x23, #4]
Lloh6:
	adrp	x8, _SND_PR_VERBOSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SND_PR_VERBOSE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w2, [x20, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x22
	bl	__snd_printd
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_8
; %bb.1:
	ldr	w2, [x23, #24]
	add	x3, x23, #8
	mov	x0, x20
	mov	x1, x22
	bl	_snd_hdmi_get_eld
	tbnz	x0, #63, LBB0_5
; %bb.2:
	add	x22, x23, #20
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w1, [x23, #24]
	ldr	x2, [x23, #8]
	mov	x0, x22
	bl	_snd_hdmi_parse_eld
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_snd_hdmi_show_eld
	add	x21, x19, #32
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x23, #4]
	b	LBB0_10
LBB0_5:
	str	wzr, [x23, #4]
LBB0_6:
	cbz	w21, LBB0_8
; %bb.7:
	ldr	x8, [x20]
	ldr	w20, [x8, #4]
	add	x19, x19, #8
	mov	w0, #300
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_queue_delayed_work
LBB0_8:
	add	x21, x19, #32
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_14
; %bb.9:
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_14
LBB0_10:
	str	w8, [x19, #20]
	ldr	x8, [x19, #24]
	ldr	x2, [x23, #8]
	cmp	x8, x2
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x19, #40]
	ldr	w1, [x23, #24]
	mov	x2, x8
	bl	_memcmp
	ldr	x2, [x23, #8]
	cbz	x0, LBB0_13
LBB0_12:
	ldr	w0, [x19, #40]
	ldr	w1, [x23, #24]
	bl	_memcpy
	ldr	x8, [x23, #8]
	str	x8, [x19, #24]
	ldr	w8, [x23, #20]
	str	w8, [x19, #36]
	mov	x0, x21
	bl	_mutex_unlock
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w9, w8
	ldr	x2, [x19]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_snd_ctl_notify
LBB0_13:
	str	x2, [x19, #24]
	ldr	w8, [x23, #20]
	str	w8, [x19, #36]
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_PINSENSE_PRESENCE,4,2       ; @AC_PINSENSE_PRESENCE
	.comm	_AC_PINSENSE_ELDV,4,2           ; @AC_PINSENSE_ELDV
	.comm	_SND_PR_VERBOSE,4,2             ; @SND_PR_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n"

	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ; @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_hdmi_present_sense
.subsections_via_symbols
