	.file	"extr_sequencer.c_seq_startplay.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	seq_startplay, @function
seq_startplay:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, lock[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	xor	r12d, r12d
	mov	rdi, rbp
	mov	rsi, r12
	call	spin_lock_irqsave@PLT
	mov	ebx, DWORD PTR qhead[rip]
	mov	rdi, rbp
	mov	rsi, r12
	sub	DWORD PTR qlen[rip], 1
	lea	eax, 1[rbx]
	cdq
	idiv	DWORD PTR SEQ_MAX_QUEUE[rip]
	mov	DWORD PTR qhead[rip], edx
	call	spin_unlock_irqrestore@PLT
	mov	eax, DWORD PTR EV_SZ[rip]
	mov	rdx, QWORD PTR queue[rip]
	mov	DWORD PTR seq_playing[rip], 1
	imul	eax, ebx
	cdqe
	lea	rdi, [rdx+rax*4]
	call	play_event@PLT
	test	eax, eax
	jne	.L11
.L2:
	mov	eax, DWORD PTR qlen[rip]
	test	eax, eax
	jg	.L5
	mov	DWORD PTR seq_playing[rip], 0
	mov	ecx, DWORD PTR SEQ_MAX_QUEUE[rip]
	sub	ecx, eax
	cmp	ecx, DWORD PTR output_threshold[rip]
	jge	.L12
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	cmp	eax, 2
	jne	.L1
	mov	DWORD PTR qhead[rip], ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	add	DWORD PTR qlen[rip], 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	lea	rdi, seq_sleeper[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	wake_up@PLT
	.cfi_endproc
.LFE0:
	.size	seq_startplay, .-seq_startplay
	.comm	seq_sleeper,4,4
	.comm	seq_playing,4,4
	.comm	queue,8,8
	.comm	qlen,4,4
	.comm	qhead,4,4
	.comm	output_threshold,4,4
	.comm	lock,4,4
	.comm	SEQ_MAX_QUEUE,4,4
	.comm	EV_SZ,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_sequencer.c_seq_startplay.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	seq_startplay, %function
seq_startplay:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L12
	ldr	fp, .L12+4
	ldr	r6, .L12+8
	ldr	r5, .L12+12
	ldr	r10, .L12+16
	ldr	r9, .L12+20
	b	.L2
.L5:
	mov	r7, #0
	mov	r0, r6
	mov	r1, r7
	bl	spin_lock_irqsave
	ldr	r4, [r5]
	ldr	r1, [r8]
	add	r0, r4, #1
	bl	__aeabi_idivmod
	mov	ip, r1
	ldr	r0, [fp]
	mov	r1, r7
	sub	r2, r0, #1
	mov	r0, r6
	str	ip, [r5]
	str	r2, [fp]
	bl	spin_unlock_irqrestore
	ldr	r2, [r9]
	ldr	r0, [r10]
	mul	r2, r4, r2
	add	r0, r0, r2, lsl #2
	mov	r2, #1
	ldr	r3, .L12+24
	str	r2, [r3]
	bl	play_event
	cmp	r0, #0
	bne	.L11
.L2:
	ldr	r2, [fp]
	cmp	r2, #0
	bgt	.L5
	mov	r1, #0
	ldr	r0, .L12+28
	ldr	r3, [r8]
	ldr	r0, [r0]
	sub	r2, r3, r2
	ldr	r3, .L12+24
	cmp	r2, r0
	str	r1, [r3]
	poplt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r0, .L12+32
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	wake_up
.L11:
	cmp	r0, #2
	ldreq	r2, [fp]
	streq	r4, [r5]
	addeq	r2, r2, #1
	streq	r2, [fp]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	SEQ_MAX_QUEUE
	.word	qlen
	.word	lock
	.word	qhead
	.word	queue
	.word	EV_SZ
	.word	seq_playing
	.word	output_threshold
	.word	seq_sleeper
	.size	seq_startplay, .-seq_startplay
	.comm	seq_sleeper,4,4
	.comm	seq_playing,4,4
	.comm	queue,4,4
	.comm	qlen,4,4
	.comm	qhead,4,4
	.comm	output_threshold,4,4
	.comm	lock,4,4
	.comm	SEQ_MAX_QUEUE,4,4
	.comm	EV_SZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
