	.file	"extr_cmipci.c_open_device_check.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	open_device_check, @function
open_device_check:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 8[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, r15
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	ebx, DWORD PTR CM_OPEN_CH_MASK[rip]
	and	ebx, esi
	call	mutex_lock@PLT
	mov	rdx, QWORD PTR 0[rbp]
	movsx	rax, ebx
	lea	rdx, [rdx+rax*4]
	mov	r14d, DWORD PTR [rdx]
	test	r14d, r14d
	jne	.L7
	sal	rax, 4
	add	rax, QWORD PTR 16[rbp]
	mov	DWORD PTR [rdx], r13d
	mov	QWORD PTR 8[rax], r12
	test	DWORD PTR CM_OPEN_DAC[rip], r13d
	je	.L8
.L4:
	mov	rdi, r15
	call	mutex_unlock@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L8:
	.cfi_restore_state
	mov	QWORD PTR [rax], 0
	lea	r12, 12[rbp]
	mov	rdi, r12
	call	spin_lock_irq@PLT
	mov	edx, DWORD PTR CM_ENDBDAC[rip]
	mov	esi, DWORD PTR CM_REG_MISC_CTRL[rip]
	mov	rdi, rbp
	call	snd_cmipci_clear_bit@PLT
	mov	rdi, r12
	call	spin_unlock_irq@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	r14d, DWORD PTR EBUSY[rip]
	neg	r14d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	open_device_check, .-open_device_check
	.comm	EBUSY,4,4
	.comm	CM_REG_MISC_CTRL,4,4
	.comm	CM_OPEN_DAC,4,4
	.comm	CM_OPEN_CH_MASK,4,4
	.comm	CM_ENDBDAC,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_cmipci.c_open_device_check.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_device_check, %function
open_device_check:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r3, .L9
	add	r9, r0, #4
	ldr	r5, [r3]
	mov	r0, r9
	and	r5, r5, r1
	mov	r6, r1
	mov	r8, r2
	bl	mutex_lock
	ldr	r3, [r4]
	ldr	r7, [r3, r5, lsl #2]
	cmp	r7, #0
	bne	.L7
	ldr	r2, .L9+4
	str	r6, [r3, r5, lsl #2]
	ldr	r2, [r2]
	ldr	r3, [r4, #12]
	tst	r6, r2
	add	r2, r3, r5, lsl #3
	str	r8, [r2, #4]
	beq	.L8
.L4:
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	add	r6, r4, #8
	str	r7, [r3, r5, lsl #3]
	mov	r0, r6
	bl	spin_lock_irq
	ldr	r3, .L9+8
	ldr	r2, .L9+12
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	snd_cmipci_clear_bit
	mov	r0, r6
	bl	spin_unlock_irq
	b	.L4
.L7:
	mov	r0, r9
	bl	mutex_unlock
	ldr	r3, .L9+16
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	CM_OPEN_CH_MASK
	.word	CM_OPEN_DAC
	.word	CM_REG_MISC_CTRL
	.word	CM_ENDBDAC
	.word	EBUSY
	.size	open_device_check, .-open_device_check
	.comm	EBUSY,4,4
	.comm	CM_REG_MISC_CTRL,4,4
	.comm	CM_OPEN_DAC,4,4
	.comm	CM_OPEN_CH_MASK,4,4
	.comm	CM_ENDBDAC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
