	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es1938_capture_prepare
_snd_es1938_capture_prepare:            ## @snd_es1938_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	(%r15), %rbx
	movq	%r15, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, (%r14)
	movl	8(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	(%rbx), %r13d
	movl	4(%rbx), %edi
	callq	_snd_pcm_format_width
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_snd_pcm_format_unsigned
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	cmpl	$2, %r13d
	movl	$64, %eax
	movl	$8, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	setl	%r12b
	xorl	%eax, %eax
	cmpl	$16, -44(%rbp)                  ## 4-byte Folded Reload
	setne	%al
	movl	$16, %ecx
	movl	$4, %r13d
	cmovnel	%ecx, %r13d
	addl	%r12d, %eax
	movl	$2, %ecx
	subl	%eax, %ecx
	movl	%ecx, 4(%r14)
	movq	%r14, %rdi
	callq	_snd_es1938_reset_fifo
	movq	_ESS_CMD_ANALOGCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%r12d
	movq	%r14, %rdi
	movl	$3, %edx
	movl	%r12d, %ecx
	callq	_snd_es1938_bits
	movq	_ADC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_snd_es1938_rate_set
	movl	$65536, %ebx                    ## imm = 0x10000
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	_ESS_CMD_DMACNTRELOADL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	callq	_snd_es1938_write
	movq	_ESS_CMD_DMACNTRELOADH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$8, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_snd_es1938_write
	movq	_ESS_CMD_SETFORMAT2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	sete	%bl
	shll	$5, %ebx
	leal	81(%rbx), %edx
	movq	%r14, %rdi
	callq	_snd_es1938_write
	movl	(%r15), %esi
	addl	-56(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ebx, %r13d
	orl	$144, %r13d
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_snd_es1938_write
	movq	%r14, %rdi
	callq	_snd_es1938_capture_setdma
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ESS_CMD_ANALOGCONTROL,4,2      ## @ESS_CMD_ANALOGCONTROL
	.comm	_ADC1,4,2                       ## @ADC1
	.comm	_ESS_CMD_DMACNTRELOADL,4,2      ## @ESS_CMD_DMACNTRELOADL
	.comm	_ESS_CMD_DMACNTRELOADH,4,2      ## @ESS_CMD_DMACNTRELOADH
	.comm	_ESS_CMD_SETFORMAT2,4,2         ## @ESS_CMD_SETFORMAT2
	.no_dead_strip	_snd_es1938_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_es1938_capture_prepare
_snd_es1938_capture_prepare:            ; @snd_es1938_capture_prepare
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x24, [x20]
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	mov	x21, x0
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	mov	x22, x0
	str	w21, [x19]
	ldr	w8, [x24, #8]
	str	w8, [x19, #8]
	ldp	w25, w0, [x24]
	bl	_snd_pcm_format_width
	mov	x23, x0
	ldr	w0, [x24, #4]
	bl	_snd_pcm_format_unsigned
	mov	x21, x0
	mov	w8, #1
	mov	w9, #8
	mov	w10, #64
	cmp	w25, #2
	csel	w25, w10, w9, lt
	cinc	w9, w8, ge
	cinc	w24, w8, lt
	mov	w8, #4
	mov	w10, #16
	cmp	w23, #16
	csel	w23, w10, w8, ne
	cset	w8, ne
	sub	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_snd_es1938_reset_fifo
Lloh0:
	adrp	x8, _ESS_CMD_ANALOGCONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESS_CMD_ANALOGCONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3
	mov	x3, x24
	bl	_snd_es1938_bits
Lloh3:
	adrp	x8, _ADC1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADC1@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_es1938_rate_set
	mov	w8, #65536
	sub	w20, w8, w22
Lloh6:
	adrp	x8, _ESS_CMD_DMACNTRELOADL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ESS_CMD_DMACNTRELOADL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	and	w2, w20, #0xff
	mov	x0, x19
	bl	_snd_es1938_write
Lloh9:
	adrp	x8, _ESS_CMD_DMACNTRELOADH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ESS_CMD_DMACNTRELOADH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	lsr	w2, w20, #8
	mov	x0, x19
	bl	_snd_es1938_write
Lloh12:
	adrp	x20, _ESS_CMD_SETFORMAT2@GOTPAGE
Lloh13:
	ldr	x20, [x20, _ESS_CMD_SETFORMAT2@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w8, #81
	mov	w9, #113
	cmp	w21, #0
	csel	w2, w9, w8, eq
	mov	w8, #144
	mov	w9, #176
	csel	w21, w9, w8, eq
	mov	x0, x19
	bl	_snd_es1938_write
	ldr	w1, [x20]
	orr	w8, w23, w25
	orr	w2, w8, w21
	mov	x0, x19
	bl	_snd_es1938_write
	mov	x0, x19
	bl	_snd_es1938_capture_setdma
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ESS_CMD_ANALOGCONTROL,4,2      ; @ESS_CMD_ANALOGCONTROL
	.comm	_ADC1,4,2                       ; @ADC1
	.comm	_ESS_CMD_DMACNTRELOADL,4,2      ; @ESS_CMD_DMACNTRELOADL
	.comm	_ESS_CMD_DMACNTRELOADH,4,2      ; @ESS_CMD_DMACNTRELOADH
	.comm	_ESS_CMD_SETFORMAT2,4,2         ; @ESS_CMD_SETFORMAT2
	.no_dead_strip	_snd_es1938_capture_prepare
.subsections_via_symbols
