	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es1688_capture_prepare
_snd_es1688_capture_prepare:            ## @snd_es1688_capture_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	%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
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	(%rbx), %r13
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r14d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, (%r12)
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_snd_es1688_reset
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_snd_es1688_set_rate
	movq	_ES1688_DSP_CMD_SPKOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_snd_es1688_dsp_command
	movq	%r12, %rdi
	movl	$184, %esi
	movl	$14, %edx
	callq	_snd_es1688_write
	movq	%r12, %rdi
	movl	$168, %esi
	callq	_snd_es1688_read
	andl	$252, %eax
	movl	$3, %ecx
	subl	(%r13), %ecx
	orl	%eax, %ecx
	movzbl	%cl, %edx
	movq	%r12, %rdi
	movl	$168, %esi
	callq	_snd_es1688_write
	movq	%r12, %rdi
	movl	$185, %esi
	movl	$2, %edx
	callq	_snd_es1688_write
	movl	(%r13), %r15d
	movl	8(%r13), %edi
	callq	_snd_pcm_format_width
	xorl	%edx, %edx
	cmpl	$8, %eax
	movl	$208, %eax
	movl	$244, %ecx
	cmovel	%eax, %ecx
	movl	$152, %eax
	movl	$188, %ebx
	cmovel	%eax, %ebx
	setne	%dl
	cmpl	$1, %r15d
	cmovel	%ecx, %ebx
	shll	$5, %edx
	orl	$81, %edx
	movq	%r12, %rdi
	movl	$183, %esi
	callq	_snd_es1688_write
	movq	%r12, %rdi
	movl	$183, %esi
	movl	%ebx, %edx
	callq	_snd_es1688_write
	movq	%r12, %rdi
	movl	$177, %esi
	callq	_snd_es1688_read
	andb	$15, %al
	orb	$80, %al
	movzbl	%al, %edx
	movq	%r12, %rdi
	movl	$177, %esi
	callq	_snd_es1688_write
	movq	%r12, %rdi
	movl	$178, %esi
	callq	_snd_es1688_read
	andb	$15, %al
	orb	$80, %al
	movzbl	%al, %edx
	movq	%r12, %rdi
	movl	$178, %esi
	callq	_snd_es1688_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	negl	%ebx
	movl	8(%r12), %edi
	movl	4(%r13), %esi
	movq	_DMA_MODE_READ@GOTPCREL(%rip), %rax
	movq	_DMA_AUTOINIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_snd_dma_program
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movzbl	%bl, %edx
	movq	%r12, %rdi
	movl	$164, %esi
	callq	_snd_es1688_write
	movzbl	%bh, %edx
	movq	%r12, %rdi
	movl	$165, %esi
	callq	_snd_es1688_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ES1688_DSP_CMD_SPKOFF,4,2      ## @ES1688_DSP_CMD_SPKOFF
	.comm	_DMA_MODE_READ,4,2              ## @DMA_MODE_READ
	.comm	_DMA_AUTOINIT,4,2               ## @DMA_AUTOINIT
	.no_dead_strip	_snd_es1688_capture_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_es1688_capture_prepare
_snd_es1688_capture_prepare:            ; @snd_es1688_capture_prepare
	.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	x23, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x24, [x23]
	mov	x0, x23
	bl	_snd_pcm_lib_buffer_bytes
	mov	x21, x0
	mov	x0, x23
	bl	_snd_pcm_lib_period_bytes
	mov	x22, x0
	str	w21, [x19]
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_snd_es1688_reset
	mov	x0, x19
	mov	x1, x23
	bl	_snd_es1688_set_rate
Lloh0:
	adrp	x8, _ES1688_DSP_CMD_SPKOFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ES1688_DSP_CMD_SPKOFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_es1688_dsp_command
	mov	x0, x19
	mov	w1, #184
	mov	w2, #14
	bl	_snd_es1688_write
	mov	x0, x19
	mov	w1, #168
	bl	_snd_es1688_read
	and	w8, w0, #0xfc
	ldr	w9, [x24]
	mov	w10, #3
	sub	w9, w10, w9
	orr	w8, w9, w8
	and	w2, w8, #0xff
	mov	x0, x19
	mov	w1, #168
	bl	_snd_es1688_write
	mov	x0, x19
	mov	w1, #185
	mov	w2, #2
	bl	_snd_es1688_write
	ldr	w23, [x24]
	ldr	w0, [x24, #8]
	bl	_snd_pcm_format_width
	mov	w8, #-12
	mov	w9, #-48
	cmp	w0, #8
	csel	w8, w9, w8, eq
	mov	w9, #-68
	mov	w10, #-104
	csel	w9, w10, w9, eq
	mov	w10, #113
	mov	w11, #81
	csel	w2, w11, w10, eq
	cmp	w23, #1
	csel	w23, w8, w9, eq
	mov	x0, x19
	mov	w1, #183
	bl	_snd_es1688_write
	and	w2, w23, #0xfc
	mov	x0, x19
	mov	w1, #183
	bl	_snd_es1688_write
	mov	x0, x19
	mov	w1, #177
	bl	_snd_es1688_read
	mov	w23, #80
	mov	w2, #80
	bfxil	w2, w0, #0, #4
	mov	x0, x19
	mov	w1, #177
	bl	_snd_es1688_write
	mov	x0, x19
	mov	w1, #178
	bl	_snd_es1688_read
	bfxil	w23, w0, #0, #4
	mov	x0, x19
	mov	w1, #178
	mov	x2, x23
	bl	_snd_es1688_write
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	neg	w22, w22
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _DMA_MODE_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_MODE_READ@GOTPAGEOFF]
	ldr	w1, [x24, #4]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DMA_AUTOINIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_AUTOINIT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x2, x21
	bl	_snd_dma_program
	mov	x0, x20
	bl	_spin_lock_irqsave
	and	w2, w22, #0xff
	mov	x0, x19
	mov	w1, #164
	bl	_snd_es1688_write
	ubfx	w2, w22, #8, #8
	mov	x0, x19
	mov	w1, #165
	bl	_snd_es1688_write
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ES1688_DSP_CMD_SPKOFF,4,2      ; @ES1688_DSP_CMD_SPKOFF
	.comm	_DMA_MODE_READ,4,2              ; @DMA_MODE_READ
	.comm	_DMA_AUTOINIT,4,2               ; @DMA_AUTOINIT
	.no_dead_strip	_snd_es1688_capture_prepare
.subsections_via_symbols
