	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_playback_prepare
_snd_emu10k1_playback_prepare:          ## @snd_emu10k1_playback_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, %r13
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	8(%r13), %r12
	movq	8(%r12), %r15
	movl	(%r15), %ebx
	movq	%r13, %rdi
	callq	_snd_pcm_lib_period_bytes
	cmpl	$2, (%r12)
	sete	%cl
	shrl	%cl, %ebx
                                        ## kill: def $eax killed $eax def $rax
	shrl	%cl, %eax
	leal	(%rax,%rbx), %r9d
	movq	16(%r15), %rcx
	movq	$0, (%rsp)
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movl	%ebx, %r8d
	callq	_snd_emu10k1_pcm_init_voice
	movl	(%r15), %ebx
	movq	%r13, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, %r12d
	addl	%ebx, %r12d
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	movq	(%r13), %rax
	shlq	$2, %rax
	addq	(%r14), %rax
	movq	%rax, (%rsp)
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_snd_emu10k1_pcm_init_voice
	movq	8(%r15), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	shlq	$2, %rax
	addq	(%r14), %rax
	movq	%rax, (%rsp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_snd_emu10k1_pcm_init_voice
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_snd_emu10k1_playback_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_playback_prepare
_snd_emu10k1_playback_prepare:          ; @snd_emu10k1_playback_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	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x21, [x19, #8]
	ldr	x23, [x21, #8]
	ldr	w22, [x23]
	mov	x0, x19
	bl	_snd_pcm_lib_period_bytes
	ldr	w8, [x21]
	cmp	w8, #2
	cset	w8, eq
	lsr	w4, w22, w8
	lsr	w8, w0, w8
	add	w5, w8, w4
	ldr	x3, [x23, #16]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	mov	x6, #0
	bl	_snd_emu10k1_pcm_init_voice
	ldr	w21, [x23]
	mov	x0, x19
	bl	_snd_pcm_lib_buffer_bytes
	add	w22, w0, w21
	ldr	x8, [x23, #8]
	ldr	x3, [x8]
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x6, x8, x9, lsl #2
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	mov	x4, x21
	mov	x5, x22
	bl	_snd_emu10k1_pcm_init_voice
	ldr	x8, [x23, #8]
	ldr	x3, [x8, #8]
	cbz	x3, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x6, x8, x9, lsl #2
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	x4, x21
	mov	x5, x22
	bl	_snd_emu10k1_pcm_init_voice
LBB0_2:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_snd_emu10k1_playback_prepare
.subsections_via_symbols
