	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_playback_prepare_voice
_snd_emu10k1_playback_prepare_voice:    ## @snd_emu10k1_playback_prepare_voice
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rsi), %r14d
	xorl	%eax, %eax
	testl	%ecx, %ecx
	movl	$255, %ecx
	cmovnel	%eax, %ecx
	testq	%r8, %r8
	je	LBB0_2
## %bb.3:
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	xorl	%esi, %esi
	cmpl	$1, %edx
	movl	$0, %edx
	adcq	$1, %rdx
	cmpl	$2, (%rax)
	cmovneq	%rsi, %rdx
	movq	(%r8), %rax
	movl	(%rax,%rdx,4), %ebx
	shll	$16, %ebx
	orl	$65535, %ebx                    ## imm = 0xFFFF
	jmp	LBB0_4
LBB0_5:
	retq
LBB0_2:
	movl	$65535, %ebx                    ## imm = 0xFFFF
LBB0_4:
	movq	_IFATN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_snd_emu10k1_ptr_write
	movq	_VTFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	_CVCF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	_DCYSUSV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	$32639, %ecx                    ## imm = 0x7F7F
	callq	_snd_emu10k1_ptr_write
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_emu10k1_voice_clear_loop_stop ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IFATN,4,2                      ## @IFATN
	.comm	_VTFT,4,2                       ## @VTFT
	.comm	_CVCF,4,2                       ## @CVCF
	.comm	_DCYSUSV,4,2                    ## @DCYSUSV
	.no_dead_strip	_snd_emu10k1_playback_prepare_voice
.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_voice
_snd_emu10k1_playback_prepare_voice:    ; @snd_emu10k1_playback_prepare_voice
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_4
; %bb.1:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w20, [x1]
	mov	w8, #255
	cmp	w3, #0
	csel	w3, w8, wzr, eq
	mov	w21, #65535
	cbz	x4, LBB0_3
; %bb.2:
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w2, #0
	mov	w9, #1
	cinc	x9, x9, eq
	cmp	w8, #2
	csel	x8, x9, xzr, eq
	ldr	x9, [x4]
	ldr	w8, [x9, x8, lsl #2]
	bfi	w21, w8, #16, #16
LBB0_3:
Lloh0:
	adrp	x8, _IFATN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IFATN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_emu10k1_ptr_write
Lloh3:
	adrp	x8, _VTFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VTFT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_snd_emu10k1_ptr_write
Lloh6:
	adrp	x8, _CVCF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CVCF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_snd_emu10k1_ptr_write
Lloh9:
	adrp	x8, _DCYSUSV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DCYSUSV@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #32639
	bl	_snd_emu10k1_ptr_write
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_snd_emu10k1_voice_clear_loop_stop
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.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	_IFATN,4,2                      ; @IFATN
	.comm	_VTFT,4,2                       ; @VTFT
	.comm	_CVCF,4,2                       ; @CVCF
	.comm	_DCYSUSV,4,2                    ; @DCYSUSV
	.no_dead_strip	_snd_emu10k1_playback_prepare_voice
.subsections_via_symbols
