	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cmipci_capture_spdif_prepare
_snd_cmipci_capture_spdif_prepare:      ## @snd_cmipci_capture_spdif_prepare
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	leaq	8(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	_CM_REG_FUNCTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CM_CAPTURE_SPDF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_snd_cmipci_set_bit
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.1:
	movq	(%r14), %rax
	cmpl	$48001, (%rax)                  ## imm = 0xBB81
	movq	_CM_REG_CHFORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CM_DBLSPDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	jl	LBB0_3
## %bb.2:
	callq	_snd_cmipci_set_bit
	jmp	LBB0_4
LBB0_3:
	callq	_snd_cmipci_clear_bit
LBB0_4:
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_snd_pcm_format_width
	movq	_CM_REG_MISC_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CM_SPD32SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	cmpl	$17, %eax
	jl	LBB0_6
## %bb.5:
	callq	_snd_cmipci_set_bit
	jmp	LBB0_7
LBB0_6:
	callq	_snd_cmipci_clear_bit
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movq	_CM_CH_CAPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_cmipci_pcm_prepare         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_REG_FUNCTRL1,4,2            ## @CM_REG_FUNCTRL1
	.comm	_CM_CAPTURE_SPDF,4,2            ## @CM_CAPTURE_SPDF
	.comm	_CM_REG_CHFORMAT,4,2            ## @CM_REG_CHFORMAT
	.comm	_CM_DBLSPDS,4,2                 ## @CM_DBLSPDS
	.comm	_CM_REG_MISC_CTRL,4,2           ## @CM_REG_MISC_CTRL
	.comm	_CM_SPD32SEL,4,2                ## @CM_SPD32SEL
	.comm	_CM_CH_CAPT,8,3                 ## @CM_CH_CAPT
	.no_dead_strip	_snd_cmipci_capture_spdif_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_cmipci_capture_spdif_prepare
_snd_cmipci_capture_spdif_prepare:      ; @snd_cmipci_capture_spdif_prepare
	.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
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _CM_REG_FUNCTRL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM_REG_FUNCTRL1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CM_CAPTURE_SPDF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CM_CAPTURE_SPDF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_snd_cmipci_set_bit
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CM_REG_CHFORMAT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CM_REG_CHFORMAT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
Lloh9:
	adrp	x9, _CM_DBLSPDS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CM_DBLSPDS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x9]
	mov	w9, #48001
	mov	x0, x20
	cmp	w8, w9
	b.lt	LBB0_3
; %bb.2:
	bl	_snd_cmipci_set_bit
	b	LBB0_4
LBB0_3:
	bl	_snd_cmipci_clear_bit
LBB0_4:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_snd_pcm_format_width
Lloh12:
	adrp	x8, _CM_REG_MISC_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CM_REG_MISC_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _CM_SPD32SEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CM_SPD32SEL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	cmp	w0, #17
	b.lt	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_snd_cmipci_set_bit
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_snd_cmipci_clear_bit
LBB0_7:
	mov	x0, x21
	bl	_spin_unlock_irq
Lloh18:
	adrp	x8, _CM_CH_CAPT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CM_CH_CAPT@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh20:
	ldr	x8, [x8]
	add	x1, x9, x8, lsl #2
	mov	x0, x20
	mov	x2, 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	_snd_cmipci_pcm_prepare
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_REG_FUNCTRL1,4,2            ; @CM_REG_FUNCTRL1
	.comm	_CM_CAPTURE_SPDF,4,2            ; @CM_CAPTURE_SPDF
	.comm	_CM_REG_CHFORMAT,4,2            ; @CM_REG_CHFORMAT
	.comm	_CM_DBLSPDS,4,2                 ; @CM_DBLSPDS
	.comm	_CM_REG_MISC_CTRL,4,2           ; @CM_REG_MISC_CTRL
	.comm	_CM_SPD32SEL,4,2                ; @CM_SPD32SEL
	.comm	_CM_CH_CAPT,8,3                 ; @CM_CH_CAPT
	.no_dead_strip	_snd_cmipci_capture_spdif_prepare
.subsections_via_symbols
