	.file	"extr_gus_reset.c_snd_gf1_stop_voices.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	snd_gf1_stop_voices
	.type	snd_gf1_stop_voices, @function
snd_gf1_stop_voices:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movzx	r13d, r13w
	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
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	in_interrupt@PLT
	test	eax, eax
	jne	.L2
	movsx	r15d, r14w
	mov	r12d, r14d
	cmp	r15d, r13d
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, 50
	call	msleep_interruptible@PLT
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movzx	esi, r14w
	mov	edx, r13d
	mov	rdi, rbp
	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
	jmp	snd_gf1_clear_voices@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, DWORD PTR SNDRV_GF1_VB_VOLUME_RATE[rip]
	mov	edx, 20
	mov	rdi, rbp
	call	snd_gf1_write8@PLT
	movzx	edx, WORD PTR SNDRV_GF1_MIN_OFFSET[rip]
	mov	esi, DWORD PTR SNDRV_GF1_VB_VOLUME_START[rip]
	mov	rdi, rbp
	call	snd_gf1_write8@PLT
	mov	esi, DWORD PTR SNDRV_GF1_VB_VOLUME_END[rip]
	movzx	edx, bx
	mov	rdi, rbp
	call	snd_gf1_write8@PLT
	mov	esi, DWORD PTR SNDRV_GF1_VB_VOLUME_CONTROL[rip]
	mov	edx, 64
	mov	rdi, rbp
	call	snd_gf1_write8@PLT
	cmp	QWORD PTR 8[rbp], 0
	je	.L5
	mov	rdi, rbp
	call	snd_gf1_delay@PLT
	mov	esi, DWORD PTR SNDRV_GF1_VB_VOLUME_CONTROL[rip]
	mov	edx, 64
	mov	rdi, rbp
	call	snd_gf1_write8@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	add	r12d, 1
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	movsx	r15d, r12w
	cmp	r15d, r13d
	jg	.L8
.L7:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	esi, r15d
	mov	rdi, rbp
	call	snd_gf1_select_voice@PLT
	mov	esi, 9
	mov	rdi, rbp
	call	snd_gf1_read16@PLT
	sar	eax, 8
	cmp	WORD PTR SNDRV_GF1_MIN_OFFSET[rip], ax
	mov	ebx, eax
	jnb	.L5
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	snd_gf1_stop_voices, .-snd_gf1_stop_voices
	.comm	SNDRV_GF1_VB_VOLUME_START,4,4
	.comm	SNDRV_GF1_VB_VOLUME_RATE,4,4
	.comm	SNDRV_GF1_VB_VOLUME_END,4,4
	.comm	SNDRV_GF1_VB_VOLUME_CONTROL,4,4
	.comm	SNDRV_GF1_MIN_OFFSET,2,2
	.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_gus_reset.c_snd_gf1_stop_voices.c"
	.text
	.align	2
	.global	snd_gf1_stop_voices
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_gf1_stop_voices, %function
snd_gf1_stop_voices:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	r8, r1
	mov	r6, r2
	bl	in_interrupt
	cmp	r0, #0
	bne	.L2
	lsl	r4, r8, #16
	asr	r4, r4, #16
	cmp	r4, r6
	bgt	.L8
	ldr	r7, .L15
	ldr	fp, .L15+4
	ldr	r9, .L15+8
	b	.L7
.L5:
	add	r4, r4, #1
	lsl	r4, r4, #16
	mov	r1, #0
	mov	r0, r5
	asr	r4, r4, #16
	bl	spin_unlock_irqrestore
	cmp	r4, r6
	bgt	.L8
.L7:
	mov	r1, #0
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r1, r4
	mov	r0, r5
	bl	snd_gf1_select_voice
	mov	r1, #9
	mov	r0, r5
	bl	snd_gf1_read16
	asr	r10, r0, #8
	ldrh	r2, [r7]
	lsl	r3, r10, #16
	lsr	r3, r3, #16
	cmp	r2, r3
	bcs	.L5
	mov	r2, #20
	ldr	r1, [fp]
	mov	r0, r5
	bl	snd_gf1_write8
	ldr	r3, .L15+12
	ldrh	r2, [r7]
	ldr	r1, [r3]
	mov	r0, r5
	bl	snd_gf1_write8
	ldr	r3, .L15+16
	lsl	r2, r10, #16
	ldr	r1, [r3]
	lsr	r2, r2, #16
	mov	r0, r5
	bl	snd_gf1_write8
	mov	r2, #64
	mov	r0, r5
	ldr	r1, [r9]
	bl	snd_gf1_write8
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L5
	mov	r0, r5
	bl	snd_gf1_delay
	mov	r2, #64
	mov	r0, r5
	ldr	r1, [r9]
	bl	snd_gf1_write8
	b	.L5
.L8:
	mov	r0, #50
	bl	msleep_interruptible
.L2:
	mov	r2, r6
	mov	r1, r8
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	snd_gf1_clear_voices
.L16:
	.align	2
.L15:
	.word	SNDRV_GF1_MIN_OFFSET
	.word	SNDRV_GF1_VB_VOLUME_RATE
	.word	SNDRV_GF1_VB_VOLUME_CONTROL
	.word	SNDRV_GF1_VB_VOLUME_START
	.word	SNDRV_GF1_VB_VOLUME_END
	.size	snd_gf1_stop_voices, .-snd_gf1_stop_voices
	.comm	SNDRV_GF1_VB_VOLUME_START,4,4
	.comm	SNDRV_GF1_VB_VOLUME_RATE,4,4
	.comm	SNDRV_GF1_VB_VOLUME_END,4,4
	.comm	SNDRV_GF1_VB_VOLUME_CONTROL,4,4
	.comm	SNDRV_GF1_MIN_OFFSET,2,2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
