	.file	"extr_ca_midi.c_ca_midi_output_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ca_midi_output_open, @function
ca_midi_output_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR [rdi]
	xor	edi, edi
	mov	rbp, QWORD PTR [rax]
	mov	eax, DWORD PTR 24[rbp]
	test	eax, eax
	sete	dil
	call	snd_BUG_ON@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR ENXIO[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	r13, 4[rbp]
	xor	esi, esi
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	r12d, DWORD PTR 0[rbp]
	mov	QWORD PTR 16[rbp], rbx
	xor	esi, esi
	or	r12d, DWORD PTR CA_MIDI_MODE_OUTPUT[rip]
	mov	rdi, r13
	mov	DWORD PTR 0[rbp], r12d
	and	r12d, DWORD PTR CA_MIDI_MODE_INPUT[rip]
	jne	.L4
	call	spin_unlock_irqrestore@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	rdi, rbp
	mov	edx, 1
	call	ca_midi_cmd@PLT
	mov	esi, DWORD PTR 8[rbp]
	mov	rdi, rbp
	mov	edx, 1
	call	ca_midi_cmd@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	call	spin_unlock_irqrestore@PLT
	xor	r12d, r12d
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ca_midi_output_open, .-ca_midi_output_open
	.comm	ENXIO,4,4
	.comm	CA_MIDI_MODE_OUTPUT,4,4
	.comm	CA_MIDI_MODE_INPUT,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_ca_midi.c_ca_midi_output_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ca_midi_output_open, %function
ca_midi_output_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, [r3]
	mov	r7, r0
	ldr	r0, [r6, #20]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	snd_BUG_ON
	subs	r4, r0, #0
	beq	.L2
	ldr	r3, .L7
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	add	r5, r6, #4
	mov	r1, #0
	mov	r0, r5
	bl	spin_lock_irqsave
	ldr	r3, .L7+4
	ldr	r2, .L7+8
	ldr	r1, [r3]
	ldr	r3, [r6]
	ldr	r2, [r2]
	orr	r3, r3, r1
	tst	r3, r2
	mov	r0, r5
	mov	r1, #0
	str	r7, [r6, #16]
	str	r3, [r6]
	bne	.L4
	bl	spin_unlock_irqrestore
	ldr	r1, [r6, #12]
	mov	r2, #1
	mov	r0, r6
	bl	ca_midi_cmd
	mov	r2, #1
	mov	r0, r6
	ldr	r1, [r6, #8]
	bl	ca_midi_cmd
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bl	spin_unlock_irqrestore
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	ENXIO
	.word	CA_MIDI_MODE_OUTPUT
	.word	CA_MIDI_MODE_INPUT
	.size	ca_midi_output_open, .-ca_midi_output_open
	.comm	ENXIO,4,4
	.comm	CA_MIDI_MODE_OUTPUT,4,4
	.comm	CA_MIDI_MODE_INPUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
