	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_pcm_open
_hdmi_pcm_open:                         ## @hdmi_pcm_open
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rsi), %r15
	movq	(%rdx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_hinfo_to_pin_index
	movl	%eax, %r14d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_3:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_get_pin
	movq	%rax, %r12
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_hdmi_choose_cvt
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	-52(%rbp), %esi
	movq	%r15, %rdi
	callq	_get_cvt
	movq	%rax, %rbx
	movl	$1, (%rax)
	movl	24(%rax), %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, 16(%r15)
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %esi
	movq	_AC_VERB_SET_CONNECT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %r8d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_snd_hda_codec_write_cache
	cmpl	$-2138691577, (%r13)            ## imm = 0x80862807
	movq	%r13, %r12
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	jne	LBB0_7
## %bb.6:
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_haswell_config_cvts
LBB0_7:
	movl	24(%rbx), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_snd_hda_spdif_ctls_assign
	movl	8(%rbx), %esi
	movl	12(%rbx), %ecx
	movl	16(%rbx), %eax
	movl	20(%rbx), %edx
	movdqu	8(%rbx), %xmm0
	pshufd	$225, %xmm0, %xmm0              ## xmm0 = xmm0[1,0,2,3]
	movdqu	%xmm0, (%r15)
	movl	4(%rbx), %edi
	movl	%edi, 20(%r15)
	movq	_static_hdmi_pcm@GOTPCREL(%rip), %rdi
	cmpl	$0, (%rdi)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
LBB0_13:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%edx, 12(%rdi)
	movl	%eax, 8(%rdi)
	movl	%esi, 4(%rdi)
	movl	%ecx, (%rdi)
	movq	(%r14), %rdi
	movq	_SNDRV_PCM_HW_PARAM_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$2, %ecx
	callq	_snd_pcm_hw_constraint_step
	jmp	LBB0_14
LBB0_4:
	movl	%eax, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpq	$0, 16(%rdi)
	je	LBB0_13
## %bb.9:
	addq	$8, %rdi
	movq	%r15, %rsi
	callq	_snd_hdmi_eld_update_pcm_info
	movl	8(%r15), %eax
	movl	12(%r15), %edx
	cmpl	%eax, %edx
	jg	LBB0_12
## %bb.10:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.11:
	movl	4(%r15), %esi
	testl	%esi, %esi
	jne	LBB0_13
LBB0_12:
	movl	$0, (%rbx)
	movl	$0, 16(%r15)
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_snd_hda_spdif_ctls_unassign
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ## @AC_VERB_SET_CONNECT_SEL
	.comm	_static_hdmi_pcm,4,2            ## @static_hdmi_pcm
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ## @SNDRV_PCM_HW_PARAM_CHANNELS
	.no_dead_strip	_hdmi_pcm_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_pcm_open
_hdmi_pcm_open:                         ; @hdmi_pcm_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x1, #8]
	ldr	x25, [x2]
	str	wzr, [sp, #8]
	mov	x0, x23
	mov	x1, x21
	bl	_hinfo_to_pin_index
	mov	x22, x0
	lsr	w0, w0, #31
	bl	_snd_BUG_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	mov	x0, x23
	mov	x1, x22
	bl	_get_pin
	mov	x24, x0
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x22
	bl	_hdmi_choose_cvt
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	w1, [sp, #12]
	mov	x0, x23
	bl	_get_cvt
	mov	x23, x0
	mov	w8, #1
	str	w8, [x0]
	ldr	w8, [x0, #24]
	str	w8, [x21, #16]
	ldr	w1, [x24]
Lloh2:
	adrp	x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	ldr	w4, [sp, #8]
	mov	x0, x20
	mov	w2, #0
	bl	_snd_hda_codec_write_cache
	ldr	w8, [x20]
	mov	w9, #10247
	movk	w9, #32902, lsl #16
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
	ldr	w2, [sp, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_haswell_config_cvts
LBB0_6:
	ldr	w2, [x23, #24]
	mov	x0, x20
	mov	x1, x22
	bl	_snd_hda_spdif_ctls_assign
	ldp	w9, w8, [x23, #16]
	ldr	w10, [x23, #12]
	stp	w9, w8, [x21, #8]
	ldp	w12, w11, [x23, #4]
	stp	w10, w11, [x21]
	str	w12, [x21, #20]
Lloh5:
	adrp	x12, _static_hdmi_pcm@GOTPAGE
Lloh6:
	ldr	x12, [x12, _static_hdmi_pcm@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
	cbz	w12, LBB0_9
LBB0_7:
	stp	w9, w8, [x25, #8]
	stp	w10, w11, [x25]
	ldr	x0, [x19]
Lloh8:
	adrp	x8, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_CHANNELS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #2
	bl	_snd_pcm_hw_constraint_step
	mov	w0, #0
LBB0_8:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	x12, [x24, #16]
	cbz	x12, LBB0_7
; %bb.10:
	add	x0, x24, #8
	mov	x1, x21
	bl	_snd_hdmi_eld_update_pcm_info
	ldp	w9, w8, [x21, #8]
	cmp	w8, w9
	b.gt	LBB0_13
; %bb.11:
	ldr	w10, [x21]
	cbz	w10, LBB0_13
; %bb.12:
	ldr	w11, [x21, #4]
	cbnz	w11, LBB0_7
LBB0_13:
	str	wzr, [x23]
	str	wzr, [x21, #16]
	mov	x0, x20
	mov	x1, x22
	bl	_snd_hda_spdif_ctls_unassign
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ; @AC_VERB_SET_CONNECT_SEL
	.comm	_static_hdmi_pcm,4,2            ; @static_hdmi_pcm
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SNDRV_PCM_HW_PARAM_CHANNELS,4,2 ; @SNDRV_PCM_HW_PARAM_CHANNELS
	.no_dead_strip	_hdmi_pcm_open
.subsections_via_symbols
