	.file	"extr_hdspm.c_snd_hdspm_midi_output_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_hdspm_midi_output_write, @function
snd_hdspm_midi_output_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 144
	.cfi_def_cfa_offset 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	call	spin_lock_irqsave@PLT
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	jne	.L11
.L2:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 144
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	snd_rawmidi_transmit_empty@PLT
	test	eax, eax
	jne	.L2
	mov	esi, DWORD PTR 4[rbp]
	mov	edi, DWORD PTR 8[rbp]
	call	snd_hdspm_midi_output_possible@PLT
	test	eax, eax
	jle	.L2
	cmp	eax, 128
	mov	edx, 128
	mov	rbx, rsp
	mov	rdi, QWORD PTR 16[rbp]
	cmovle	edx, eax
	mov	rsi, rbx
	call	snd_rawmidi_transmit@PLT
	test	eax, eax
	jle	.L2
	sub	eax, 1
	lea	r12, 1[rsp+rax]
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	edx, BYTE PTR [rbx]
	mov	esi, DWORD PTR 4[rbp]
	add	rbx, 1
	mov	edi, DWORD PTR 8[rbp]
	call	snd_hdspm_midi_write_byte@PLT
	cmp	rbx, r12
	jne	.L3
	jmp	.L2
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_hdspm_midi_output_write, .-snd_hdspm_midi_output_write
	.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_hdspm.c_snd_hdspm_midi_output_write.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_hdspm_midi_output_write, %function
snd_hdspm_midi_output_write:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L13
	sub	sp, sp, #136
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #132]
	mov	r3,#0
	bl	spin_lock_irqsave
	ldr	r0, [r4, #12]
	cmp	r0, #0
	bne	.L11
.L2:
	mov	r0, r4
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #132]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, #0
	add	sp, sp, #136
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	bl	snd_rawmidi_transmit_empty
	cmp	r0, #0
	bne	.L2
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	bl	snd_hdspm_midi_output_possible
	cmp	r0, #0
	ble	.L2
	cmp	r0, #128
	movlt	r2, r0
	movge	r2, #128
	ldr	r0, [r4, #12]
	add	r1, sp, #4
	bl	snd_rawmidi_transmit
	cmp	r0, #0
	ble	.L2
	add	r5, sp, #4
	add	r6, r5, r0
.L3:
	ldrb	r2, [r5], #1	@ zero_extendqisi2
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	bl	snd_hdspm_midi_write_byte
	cmp	r6, r5
	bne	.L3
	b	.L2
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.size	snd_hdspm_midi_output_write, .-snd_hdspm_midi_output_write
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
