	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generic_hdmi_build_jack
_generic_hdmi_build_jack:               ## @generic_hdmi_build_jack
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movaps	l___const.generic_hdmi_build_jack.hdmi_str+16(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	l___const.generic_hdmi_build_jack.hdmi_str(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_get_pin
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_get_pcm_rec
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.1:
	leaq	-80(%rbp), %rdi
	callq	_strlen
	cltq
	leaq	(%rax,%rbp), %rdi
	addq	$-80, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_sprintf
LBB0_2:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_is_jack_detectable
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movl	$31, %edx
	subl	%eax, %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strncat
LBB0_4:
	movl	(%r14), %esi
	leaq	-80(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_snd_hda_jack_add_kctl
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.generic_hdmi_build_jack.hdmi_str
l___const.generic_hdmi_build_jack.hdmi_str:
	.asciz	"HDMI/DP\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	",pcm=%d"

L_.str.1:                               ## @.str.1
	.asciz	" Phantom"

	.no_dead_strip	_generic_hdmi_build_jack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generic_hdmi_build_jack
_generic_hdmi_build_jack:               ; @generic_hdmi_build_jack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, l___const.generic_hdmi_build_jack.hdmi_str@PAGE
Lloh4:
	add	x9, x9, l___const.generic_hdmi_build_jack.hdmi_str@PAGEOFF
	str	x8, [sp, #40]
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp]
	ldr	x22, [x0]
	mov	x0, x22
	bl	_get_pin
	mov	x20, x0
	mov	x0, x22
	mov	x1, x21
	bl	_get_pcm_rec
	ldr	w21, [x0]
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x22, sp
	mov	x0, sp
	bl	_strlen
	add	x0, x22, w0, sxtw
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_sprintf
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_is_jack_detectable
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, sp
	bl	_strlen
	mov	w8, #31
	sub	w2, w8, w0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, sp
	bl	_strncat
LBB0_4:
	ldr	w1, [x20]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #0
	bl	_snd_hda_jack_add_kctl
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
l___const.generic_hdmi_build_jack.hdmi_str: ; @__const.generic_hdmi_build_jack.hdmi_str
	.asciz	"HDMI/DP\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	",pcm=%d"

l_.str.1:                               ; @.str.1
	.asciz	" Phantom"

	.no_dead_strip	_generic_hdmi_build_jack
.subsections_via_symbols
