	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es1938_playback2_prepare
_snd_es1938_playback2_prepare:          ## @snd_es1938_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
	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, %r13
	movq	(%r15), %rbx
	movq	%r15, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, (%r13)
	movl	8(%rbx), %eax
	movl	%eax, 8(%r13)
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_snd_pcm_format_width
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	callq	_snd_pcm_format_unsigned
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	cmpl	$16, %r14d
	setne	%al
	movl	$16, %ecx
	movl	$4, %edx
	cmovnel	%ecx, %edx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	setl	%r12b
	movl	$208, %ecx
	movl	$152, %r14d
	cmovll	%ecx, %r14d
	addl	%r12d, %eax
	movl	$2, %ecx
	subl	%eax, %ecx
	movl	%ecx, 4(%r13)
	movl	$65536, %ebx                    ## imm = 0x10000
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	callq	_snd_es1938_reset_fifo
	movq	_ESS_CMD_ANALOGCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%r12d
	movq	%r13, %rdi
	movl	$3, %edx
	movl	%r12d, %ecx
	callq	_snd_es1938_bits
	movq	_DAC1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_snd_es1938_rate_set
	movq	_ESS_CMD_DMACNTRELOADL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r13, %rdi
	callq	_snd_es1938_write
	movq	_ESS_CMD_DMACNTRELOADH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$8, %ebx
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_snd_es1938_write
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%dl
	movq	_ESS_CMD_SETFORMAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	sete	%bl
	shll	$7, %edx
	movq	%r13, %rdi
	callq	_snd_es1938_write
	movl	(%r15), %esi
	shll	$5, %ebx
	leal	81(%rbx), %edx
	movq	%r13, %rdi
	callq	_snd_es1938_write
	movq	_ESS_CMD_SETFORMAT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	-56(%rbp), %r14d                ## 4-byte Folded Reload
	orl	%ebx, %r14d
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_snd_es1938_write
	movq	%r13, %rdi
	callq	_snd_es1938_playback2_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	_DAC1,4,2                       ## @DAC1
	.comm	_ESS_CMD_DMACNTRELOADL,4,2      ## @ESS_CMD_DMACNTRELOADL
	.comm	_ESS_CMD_DMACNTRELOADH,4,2      ## @ESS_CMD_DMACNTRELOADH
	.comm	_ESS_CMD_SETFORMAT,4,2          ## @ESS_CMD_SETFORMAT
	.comm	_ESS_CMD_SETFORMAT2,4,2         ## @ESS_CMD_SETFORMAT2
	.no_dead_strip	_snd_es1938_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_es1938_playback2_prepare
_snd_es1938_playback2_prepare:          ; @snd_es1938_playback2_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	x23, [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, [x23, #8]
	str	w8, [x19, #8]
	ldp	w25, w0, [x23]
	bl	_snd_pcm_format_width
	mov	x21, x0
	ldr	w0, [x23, #4]
	bl	_snd_pcm_format_unsigned
	mov	x23, x0
	mov	w8, #4
	mov	w9, #16
	cmp	w21, #16
	csel	w24, w9, w8, ne
	cset	w8, ne
	mov	w9, #1
	mov	w10, #152
	mov	w11, #208
	cmp	w25, #2
	csel	w25, w11, w10, lt
	cinc	w10, w9, ge
	cinc	w21, w9, lt
	sub	w8, w10, w8
	str	w8, [x19, #4]
	mov	w8, #65536
	sub	w22, w8, w22
	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, x21
	bl	_snd_es1938_bits
Lloh3:
	adrp	x8, _DAC1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DAC1@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_es1938_rate_set
Lloh6:
	adrp	x8, _ESS_CMD_DMACNTRELOADL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ESS_CMD_DMACNTRELOADL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	and	w2, w22, #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, w22, #8
	mov	x0, x19
	bl	_snd_es1938_write
	cmp	w23, #0
	cset	w8, ne
Lloh12:
	adrp	x21, _ESS_CMD_SETFORMAT@GOTPAGE
Lloh13:
	ldr	x21, [x21, _ESS_CMD_SETFORMAT@GOTPAGEOFF]
	ldr	w1, [x21]
	cset	w22, eq
	lsl	w2, w8, #7
	mov	w8, #81
	mov	w9, #113
	csel	w20, w9, w8, eq
	mov	x0, x19
	bl	_snd_es1938_write
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_es1938_write
Lloh14:
	adrp	x8, _ESS_CMD_SETFORMAT2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ESS_CMD_SETFORMAT2@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	orr	w2, w24, w25
	bfi	w2, w22, #5, #1
	mov	x0, x19
	bl	_snd_es1938_write
	mov	x0, x19
	bl	_snd_es1938_playback2_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 AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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	_DAC1,4,2                       ; @DAC1
	.comm	_ESS_CMD_DMACNTRELOADL,4,2      ; @ESS_CMD_DMACNTRELOADL
	.comm	_ESS_CMD_DMACNTRELOADH,4,2      ; @ESS_CMD_DMACNTRELOADH
	.comm	_ESS_CMD_SETFORMAT,4,2          ; @ESS_CMD_SETFORMAT
	.comm	_ESS_CMD_SETFORMAT2,4,2         ; @ESS_CMD_SETFORMAT2
	.no_dead_strip	_snd_es1938_playback2_prepare
.subsections_via_symbols
