	.file	"extr_emupcm.c_snd_emu10k1_playback_prepare_voice.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_emu10k1_playback_prepare_voice, @function
snd_emu10k1_playback_prepare_voice:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L1
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	cmp	ecx, 1
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	sbb	ecx, ecx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rax, QWORD PTR 8[rsi]
	mov	rbp, rdi
	movzx	ecx, cl
	mov	r13d, DWORD PTR [rsi]
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	cmp	DWORD PTR [rdi], 2
	jne	.L4
	xor	eax, eax
	test	edx, edx
	sete	al
	add	eax, 1
.L4:
	mov	r12d, 65535
	test	r8, r8
	je	.L5
	mov	rdx, QWORD PTR [r8]
	mov	r12d, DWORD PTR [rdx+rax*4]
	sal	r12d, 16
	or	r12d, 65535
.L5:
	mov	esi, DWORD PTR IFATN[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	snd_emu10k1_ptr_write@PLT
	mov	ecx, r12d
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, DWORD PTR VTFT[rip]
	call	snd_emu10k1_ptr_write@PLT
	mov	ecx, r12d
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, DWORD PTR CVCF[rip]
	call	snd_emu10k1_ptr_write@PLT
	mov	rdi, rbp
	mov	edx, r13d
	mov	ecx, 32639
	mov	esi, DWORD PTR DCYSUSV[rip]
	call	snd_emu10k1_ptr_write@PLT
	mov	esi, r13d
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	snd_emu10k1_voice_clear_loop_stop@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.cfi_endproc
.LFE0:
	.size	snd_emu10k1_playback_prepare_voice, .-snd_emu10k1_playback_prepare_voice
	.comm	VTFT,4,4
	.comm	IFATN,4,4
	.comm	DCYSUSV,4,4
	.comm	CVCF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_emupcm.c_snd_emu10k1_playback_prepare_voice.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_emu10k1_playback_prepare_voice, %function
snd_emu10k1_playback_prepare_voice:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	cmp	r1, #0
	mov	r4, r0
	ldr	r0, [sp, #16]
	popeq	{r4, r5, r6, pc}
	ldr	ip, [r1, #4]
	ldr	r5, [r1]
	ldr	ip, [ip]
	cmp	r3, #0
	ldr	ip, [ip]
	movne	r3, #0
	ldr	r1, [ip]
	moveq	r3, #255
	cmp	r1, #2
	movne	r2, #0
	bne	.L4
	cmp	r2, #0
	movne	r2, #1
	moveq	r2, #2
.L4:
	cmp	r0, #0
	ldrne	r1, [r0]
	ldrne	r6, .L12
	ldrne	r2, [r1, r2, lsl #2]
	mov	r0, r4
	orrne	r6, r6, r2, lsl #16
	ldr	r2, .L12+4
	ldreq	r6, .L12
	ldr	r1, [r2]
	mov	r2, r5
	bl	snd_emu10k1_ptr_write
	ldr	r2, .L12+8
	mov	r3, r6
	ldr	r1, [r2]
	mov	r0, r4
	mov	r2, r5
	bl	snd_emu10k1_ptr_write
	ldr	r2, .L12+12
	mov	r3, r6
	ldr	r1, [r2]
	mov	r0, r4
	mov	r2, r5
	bl	snd_emu10k1_ptr_write
	ldr	r2, .L12+16
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r3, .L12+20
	mov	r2, r5
	bl	snd_emu10k1_ptr_write
	mov	r1, r5
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	snd_emu10k1_voice_clear_loop_stop
.L13:
	.align	2
.L12:
	.word	65535
	.word	IFATN
	.word	VTFT
	.word	CVCF
	.word	DCYSUSV
	.word	32639
	.size	snd_emu10k1_playback_prepare_voice, .-snd_emu10k1_playback_prepare_voice
	.comm	VTFT,4,4
	.comm	IFATN,4,4
	.comm	DCYSUSV,4,4
	.comm	CVCF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
