	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es18xx_playback2_prepare
_snd_es18xx_playback2_prepare:          ## @snd_es18xx_playback2_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	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %r13
	movq	%rsi, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, %r12d
	movl	%r14d, (%r15)
	movq	%r15, %rdi
	callq	_snd_es18xx_reset_fifo
	xorl	%ecx, %ecx
	cmpl	$1, (%r13)
	sete	%cl
	incl	%ecx
	movq	%r15, %rdi
	movl	$168, %esi
	movl	$3, %edx
	callq	_snd_es18xx_bits
	movq	_DAC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_snd_es18xx_rate_set
	movl	$65536, %ebx                    ## imm = 0x10000
	subl	%r12d, %ebx
	movzbl	%bl, %edx
	movq	%r15, %rdi
	movl	$164, %esi
	callq	_snd_es18xx_write
	shrl	$8, %ebx
	movq	%r15, %rdi
	movl	$165, %esi
	movl	%ebx, %edx
	callq	_snd_es18xx_write
	movl	8(%r13), %edi
	callq	_snd_pcm_format_unsigned
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%dl
	shll	$7, %edx
	movq	%r15, %rdi
	movl	$182, %esi
	callq	_snd_es18xx_write
	movl	8(%r13), %edi
	callq	_snd_pcm_format_unsigned
	xorl	%edx, %edx
	testq	%rax, %rax
	sete	%dl
	shll	$5, %edx
	orl	$81, %edx
	movq	%r15, %rdi
	movl	$183, %esi
	callq	_snd_es18xx_write
	movl	8(%r13), %edi
	cmpl	$1, (%r13)
	movl	$208, %eax
	movl	$152, %r12d
	cmovel	%eax, %r12d
	callq	_snd_pcm_format_width
	cmpl	$16, %eax
	movl	$4, %eax
	movl	$16, %ebx
	cmovel	%eax, %ebx
	orl	%r12d, %ebx
	movl	8(%r13), %edi
	callq	_snd_pcm_format_unsigned
	xorl	%edx, %edx
	testq	%rax, %rax
	sete	%dl
	shll	$5, %edx
	orl	%ebx, %edx
	movq	%r15, %rdi
	movl	$183, %esi
	callq	_snd_es18xx_write
	movl	4(%r15), %edi
	movl	4(%r13), %esi
	movq	_DMA_MODE_WRITE@GOTPCREL(%rip), %rax
	movq	_DMA_AUTOINIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_snd_dma_program
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DAC1,4,2                       ## @DAC1
	.comm	_DMA_MODE_WRITE,4,2             ## @DMA_MODE_WRITE
	.comm	_DMA_AUTOINIT,4,2               ## @DMA_AUTOINIT
	.no_dead_strip	_snd_es18xx_playback2_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_es18xx_playback2_prepare
_snd_es18xx_playback2_prepare:          ; @snd_es18xx_playback2_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	x21, x1
	mov	x20, x0
	ldr	x23, [x1]
	mov	x0, x1
	bl	_snd_pcm_lib_buffer_bytes
	mov	x19, x0
	mov	x0, x21
	bl	_snd_pcm_lib_period_bytes
	mov	x22, x0
	str	w19, [x20]
	mov	x0, x20
	bl	_snd_es18xx_reset_fifo
	ldr	w8, [x23]
	cmp	w8, #1
	mov	w8, #1
	cinc	w3, w8, eq
	mov	x0, x20
	mov	w1, #168
	mov	w2, #3
	bl	_snd_es18xx_bits
Lloh0:
	adrp	x8, _DAC1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DAC1@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_snd_es18xx_rate_set
	mov	w8, #65536
	sub	w21, w8, w22
	and	w2, w21, #0xff
	mov	x0, x20
	mov	w1, #164
	bl	_snd_es18xx_write
	lsr	w2, w21, #8
	mov	x0, x20
	mov	w1, #165
	bl	_snd_es18xx_write
	ldr	w0, [x23, #8]
	bl	_snd_pcm_format_unsigned
	cmp	x0, #0
	cset	w8, ne
	lsl	w2, w8, #7
	mov	x0, x20
	mov	w1, #182
	bl	_snd_es18xx_write
	ldr	w0, [x23, #8]
	bl	_snd_pcm_format_unsigned
	cmp	x0, #0
	mov	w8, #81
	mov	w9, #113
	csel	w2, w9, w8, eq
	mov	x0, x20
	mov	w1, #183
	bl	_snd_es18xx_write
	ldr	w8, [x23]
	mov	w9, #152
	mov	w10, #208
	cmp	w8, #1
	csel	w21, w10, w9, eq
	ldr	w0, [x23, #8]
	bl	_snd_pcm_format_width
	mov	w8, #16
	mov	w9, #4
	cmp	w0, #16
	csel	w8, w9, w8, eq
	orr	w21, w8, w21
	ldr	w0, [x23, #8]
	bl	_snd_pcm_format_unsigned
	cmp	x0, #0
	cset	w8, eq
	bfi	w21, w8, #5, #1
	mov	x0, x20
	mov	w1, #183
	mov	x2, x21
	bl	_snd_es18xx_write
	ldr	w0, [x20, #4]
Lloh3:
	adrp	x8, _DMA_MODE_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_MODE_WRITE@GOTPAGEOFF]
	ldr	w1, [x23, #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, x19
	bl	_snd_dma_program
	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	_DAC1,4,2                       ; @DAC1
	.comm	_DMA_MODE_WRITE,4,2             ; @DMA_MODE_WRITE
	.comm	_DMA_AUTOINIT,4,2               ; @DMA_AUTOINIT
	.no_dead_strip	_snd_es18xx_playback2_prepare
.subsections_via_symbols
