	.file	"extr_emu10k1.c_emu_vtrigger.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	emu_vtrigger, @function
emu_vtrigger:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdx, QWORD PTR EMU_CHAN_PTRX_PITCHTARGET[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CPF_PITCH[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 65535
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_IFATN[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 65535
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_VTFT[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 65535
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CVCF[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_IP[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edx, 1
	mov	rdi, rbp
	call	emu_enastop@PLT
	mov	rbx, QWORD PTR [rbx]
	test	rbx, rbx
	je	.L15
.L8:
	mov	eax, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR 8[rbx]
	test	eax, eax
	je	.L2
	cmp	QWORD PTR 24[rbx], 1
	sbb	r12d, r12d
	and	r12d, -2
	add	r12d, 4
	cmp	QWORD PTR 24[rbx], 1
	sbb	r13d, r13d
	and	r13d, 2
	add	r13d, 28
	cmp	QWORD PTR 16[rbx], 0
	je	.L4
	xor	r14d, r14d
.L9:
	xor	r15d, r15d
.L6:
	mov	rdx, QWORD PTR EMU_CHAN_CD0[rip]
	mov	ecx, r14d
	mov	rdi, rbp
	add	rdx, r15
	add	r15, 1
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	cmp	r12d, r15d
	jg	.L6
	mov	rdx, QWORD PTR EMU_CHAN_CCR_CACHEINVALIDSIZE[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 64
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CCR_READADDRESS[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, r13d
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CCR_CACHEINVALIDSIZE[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 65280
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_IFATN[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, -1
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_VTFT[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, -1
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CVCF[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, 32639
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_DCYSUSV[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	xor	edx, edx
	mov	rdi, rbp
	call	emu_enastop@PLT
	mov	edi, DWORD PTR 12[rbx]
	call	emu_rate_to_linearpitch@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	r13d, eax
	call	emu_rate_to_pitch@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, r13d
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_PTRX_PITCHTARGET[rip]
	mov	r12d, eax
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, r13d
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_CPF_PITCH[rip]
	call	emu_wrptr@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, r12d
	mov	rdi, rbp
	mov	rdx, QWORD PTR EMU_CHAN_IP[rip]
	sar	ecx, 8
	call	emu_wrptr@PLT
	mov	rbx, QWORD PTR [rbx]
	test	rbx, rbx
	jne	.L8
.L15:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	add	r13d, r13d
	mov	r14d, -2139062144
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	emu_vtrigger, .-emu_vtrigger
	.comm	EMU_CHAN_VTFT,8,8
	.comm	EMU_CHAN_PTRX_PITCHTARGET,8,8
	.comm	EMU_CHAN_IP,8,8
	.comm	EMU_CHAN_IFATN,8,8
	.comm	EMU_CHAN_DCYSUSV,8,8
	.comm	EMU_CHAN_CVCF,8,8
	.comm	EMU_CHAN_CPF_PITCH,8,8
	.comm	EMU_CHAN_CD0,8,8
	.comm	EMU_CHAN_CCR_READADDRESS,8,8
	.comm	EMU_CHAN_CCR_CACHEINVALIDSIZE,8,8
	.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_emu10k1.c_emu_vtrigger.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	emu_vtrigger, %function
emu_vtrigger:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	r4, r1
	mov	r7, r2
	ldr	r10, .L16
	ldr	r9, .L16+4
	sub	sp, sp, #12
	b	.L8
.L2:
	ldr	r2, .L16+8
	mov	r3, r7
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+12
	ldr	r1, [r4, #4]
	mov	r3, r7
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+16
	ldr	r1, [r4, #4]
	mov	r3, r10
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+20
	ldr	r1, [r4, #4]
	mov	r3, r10
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+24
	ldr	r1, [r4, #4]
	mov	r3, r10
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+28
	ldr	r1, [r4, #4]
	mov	r3, r7
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r1, [r4, #4]
	mov	r2, #1
	mov	r0, r5
	bl	emu_enastop
	ldr	r4, [r4]
	cmp	r4, #0
	beq	.L15
.L8:
	cmp	r7, #0
	ldr	r1, [r4, #4]
	beq	.L2
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #12]
	cmp	r2, #0
	moveq	r2, #30
	movne	r2, #28
	moveq	r8, #2
	movne	r8, #4
	cmp	r3, #0
	str	r2, [sp, #4]
	beq	.L4
	mov	fp, #0
.L9:
	mov	r6, #0
.L6:
	ldr	r2, [r9]
	mov	r3, fp
	add	r2, r6, r2
	mov	r0, r5
	add	r6, r6, #1
	bl	emu_wrptr
	cmp	r6, r8
	ldrne	r1, [r4, #4]
	bne	.L6
.L5:
	ldr	r6, .L16+32
	ldr	r1, [r4, #4]
	ldr	r2, [r6]
	mov	r3, #0
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+36
	ldr	r1, [r4, #4]
	mov	r3, #64
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, [r6]
	ldr	r1, [r4, #4]
	ldr	r3, [sp, #4]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+16
	ldr	r1, [r4, #4]
	mov	r3, #65280
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+20
	ldr	r1, [r4, #4]
	mvn	r3, #0
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+24
	ldr	r1, [r4, #4]
	mvn	r3, #0
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+40
	ldr	r3, .L16+44
	ldr	r1, [r4, #4]
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r1, [r4, #4]
	mov	r2, #0
	mov	r0, r5
	bl	emu_enastop
	ldr	r0, [r4, #8]
	bl	emu_rate_to_linearpitch
	mov	r6, r0
	ldr	r0, [r4, #8]
	bl	emu_rate_to_pitch
	mov	r8, r0
	ldr	r2, .L16+8
	ldr	r1, [r4, #4]
	mov	r3, r6
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+12
	ldr	r1, [r4, #4]
	mov	r3, r6
	ldr	r2, [r2]
	mov	r0, r5
	bl	emu_wrptr
	ldr	r2, .L16+28
	ldr	r1, [r4, #4]
	mov	r0, r5
	ldr	r2, [r2]
	asr	r3, r8, #8
	bl	emu_wrptr
	ldr	r4, [r4]
	cmp	r4, #0
	bne	.L8
.L15:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [sp, #4]
	ldr	fp, .L16+48
	lsl	r3, r3, #1
	str	r3, [sp, #4]
	b	.L9
.L17:
	.align	2
.L16:
	.word	65535
	.word	EMU_CHAN_CD0
	.word	EMU_CHAN_PTRX_PITCHTARGET
	.word	EMU_CHAN_CPF_PITCH
	.word	EMU_CHAN_IFATN
	.word	EMU_CHAN_VTFT
	.word	EMU_CHAN_CVCF
	.word	EMU_CHAN_IP
	.word	EMU_CHAN_CCR_CACHEINVALIDSIZE
	.word	EMU_CHAN_CCR_READADDRESS
	.word	EMU_CHAN_DCYSUSV
	.word	32639
	.word	-2139062144
	.size	emu_vtrigger, .-emu_vtrigger
	.comm	EMU_CHAN_VTFT,4,4
	.comm	EMU_CHAN_PTRX_PITCHTARGET,4,4
	.comm	EMU_CHAN_IP,4,4
	.comm	EMU_CHAN_IFATN,4,4
	.comm	EMU_CHAN_DCYSUSV,4,4
	.comm	EMU_CHAN_CVCF,4,4
	.comm	EMU_CHAN_CPF_PITCH,4,4
	.comm	EMU_CHAN_CD0,4,4
	.comm	EMU_CHAN_CCR_READADDRESS,4,4
	.comm	EMU_CHAN_CCR_CACHEINVALIDSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
