	.file	"extr_maestro3.c_snd_m3_substream_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_m3_substream_open, @function
snd_m3_substream_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	r14, 20[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	rdi, r14
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L2
	mov	rbx, QWORD PTR 24[rbp]
	sub	eax, 1
	sal	rax, 5
	lea	rax, 32[rbx+rax]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	add	rbx, 32
	cmp	rbx, rax
	je	.L2
.L6:
	mov	r12d, DWORD PTR [rbx]
	test	r12d, r12d
	jne	.L3
	mov	DWORD PTR [rbx], 1
	mov	rdi, r14
	mov	QWORD PTR 24[rbx], 0
	call	spin_unlock_irq@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	QWORD PTR [rax], rbx
	mov	rax, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	QWORD PTR 16[rbx], r13
	cmp	QWORD PTR 0[r13], rax
	je	.L13
	mov	rax, QWORD PTR 8[rbx]
	lea	rdx, 12[rbp]
	mov	QWORD PTR [rax], rdx
.L8:
	lea	rdx, 8[rbp]
	add	rbp, 4
	mov	QWORD PTR 8[rax], rdx
	mov	QWORD PTR 16[rax], rbp
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, r14
	call	spin_unlock_irq@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	lea	rdx, 16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	snd_m3_substream_open, .-snd_m3_substream_open
	.comm	SNDRV_PCM_STREAM_PLAYBACK,8,8
	.comm	ENOMEM,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_maestro3.c_snd_m3_substream_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_m3_substream_open, %function
snd_m3_substream_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r0
	add	r7, r0, #20
	mov	r0, r7
	mov	r6, r1
	bl	spin_lock_irq
	ldr	ip, [r8]
	cmp	ip, #0
	ble	.L2
	ldr	r2, [r8, #24]
	mov	r3, #0
	mov	r5, r2
	b	.L6
.L3:
	cmp	r3, ip
	add	r5, r5, #16
	beq	.L2
.L6:
	ldr	r4, [r2, r3, lsl #4]
	add	r3, r3, #1
	cmp	r4, #0
	bne	.L3
	mov	r3, #1
	mov	r0, r7
	str	r3, [r5]
	str	r4, [r5, #12]
	bl	spin_unlock_irq
	ldr	r3, .L14
	ldr	r1, [r6]
	ldr	r2, [r3]
	ldr	r3, [r6, #4]
	cmp	r1, r2
	str	r5, [r3]
	str	r6, [r5, #8]
	beq	.L13
	ldr	r2, [r5, #4]
	add	r3, r8, #12
	str	r3, [r2]
.L8:
	add	r1, r8, #8
	add	r3, r8, #4
	mov	r0, r4
	stmib	r2, {r1, r3}
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r7
	bl	spin_unlock_irq
	ldr	r3, .L14+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r2, [r5, #4]
	add	r3, r8, #16
	str	r3, [r2]
	b	.L8
.L15:
	.align	2
.L14:
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	ENOMEM
	.size	snd_m3_substream_open, .-snd_m3_substream_open
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
