	.file	"extr_opl4_synth.c_snd_opl4_synth_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	snd_opl4_synth_reset
	.type	snd_opl4_synth_reset, @function
snd_opl4_synth_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 20[rdi]
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, r12
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	spin_lock_irqsave@PLT
	mov	edx, DWORD PTR OPL4_MAX_VOICES[rip]
	test	edx, edx
	jle	.L2
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, QWORD PTR OPL4_REG_MISC[rip]
	mov	edx, DWORD PTR OPL4_DAMP_BIT[rip]
	mov	rdi, rbp
	add	rsi, rbx
	add	rbx, 1
	call	snd_opl4_write@PLT
	cmp	DWORD PTR OPL4_MAX_VOICES[rip], ebx
	jg	.L3
.L2:
	xor	esi, esi
	mov	rdi, r12
	lea	r12, 4[rbp]
	call	spin_unlock_irqrestore@PLT
	mov	rdi, r12
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 16[rbp]
	call	INIT_LIST_HEAD@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, 8
	xor	esi, esi
	call	memset@PLT
	mov	eax, DWORD PTR OPL4_MAX_VOICES[rip]
	test	eax, eax
	jle	.L4
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	rsi, r12
	lea	rdi, [rax+rbx*8]
	mov	DWORD PTR [rdi], ebx
	add	rdi, 4
	add	rbx, 1
	call	list_add_tail@PLT
	cmp	DWORD PTR OPL4_MAX_VOICES[rip], ebx
	jg	.L5
.L4:
	mov	edi, DWORD PTR 0[rbp]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	snd_midi_channel_set_clear@PLT
	.cfi_endproc
.LFE0:
	.size	snd_opl4_synth_reset, .-snd_opl4_synth_reset
	.comm	OPL4_REG_MISC,8,8
	.comm	OPL4_MAX_VOICES,4,4
	.comm	OPL4_DAMP_BIT,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_opl4_synth.c_snd_opl4_synth_reset.c"
	.text
	.align	2
	.global	snd_opl4_synth_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_opl4_synth_reset, %function
snd_opl4_synth_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, .L10
	add	r9, r0, #16
	mov	r5, r0
	mov	r1, #0
	mov	r0, r9
	bl	spin_lock_irqsave
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r4, #0
	ldr	r8, .L10+4
	ldr	r7, .L10+8
.L3:
	ldr	r1, [r7]
	mov	r0, r5
	add	r1, r4, r1
	ldr	r2, [r8]
	bl	snd_opl4_write
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
.L2:
	mov	r4, #0
	mov	r1, #0
	mov	r0, r9
	add	r7, r5, #4
	bl	spin_unlock_irqrestore
	mov	r0, r7
	bl	INIT_LIST_HEAD
	add	r0, r5, #12
	bl	INIT_LIST_HEAD
	ldr	r3, [r5, #8]
	strb	r4, [r3]
	strb	r4, [r3, #1]
	strb	r4, [r3, #2]
	strb	r4, [r3, #3]
	ldr	r3, [r6]
	cmp	r3, r4
	ble	.L4
.L5:
	ldr	r3, [r5, #8]
	mov	r1, r7
	add	r0, r3, r4, lsl #3
	str	r4, [r3, r4, lsl #3]
	add	r0, r0, #4
	bl	list_add_tail
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L5
.L4:
	ldr	r0, [r5]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	snd_midi_channel_set_clear
.L11:
	.align	2
.L10:
	.word	OPL4_MAX_VOICES
	.word	OPL4_DAMP_BIT
	.word	OPL4_REG_MISC
	.size	snd_opl4_synth_reset, .-snd_opl4_synth_reset
	.comm	OPL4_REG_MISC,4,4
	.comm	OPL4_MAX_VOICES,4,4
	.comm	OPL4_DAMP_BIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
