	.file	"extr_mpu401.c_mpu401_intr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mpu401_intr, @function
mpu401_intr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 80
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	STATUS@PLT
	test	DWORD PTR MPU_INPUTBUSY[rip], eax
	jne	.L23
	mov	ebp, 1
	mov	r13, rsp
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbx
	mov	r14d, ebp
	call	READ@PLT
	mov	rdi, rbx
	mov	DWORD PTR -4[r13+rbp*4], eax
	call	STATUS@PLT
	mov	r12d, eax
	test	DWORD PTR MPU_INPUTBUSY[rip], eax
	jne	.L3
	add	rbp, 1
	cmp	rbp, 17
	jne	.L4
	mov	r14d, 16
.L3:
	mov	edi, DWORD PTR 16[rbx]
	mov	edx, r14d
	mov	rsi, r13
	call	midi_in@PLT
.L2:
	xor	ebp, ebp
	mov	r13, rsp
	and	r12d, DWORD PTR MPU_OUTPUTBUSY[rip]
	je	.L5
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	cmp	ebp, 16
	je	.L10
.L5:
	mov	edi, DWORD PTR 16[rbx]
	mov	edx, 1
	mov	rsi, r13
	call	midi_out@PLT
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR [rsp]
	mov	rdi, rbx
	add	ebp, 1
	call	WRITE@PLT
	mov	rdi, rbx
	call	STATUS@PLT
	test	DWORD PTR MPU_OUTPUTBUSY[rip], eax
	je	.L26
.L10:
	mov	eax, DWORD PTR M_TXEN[rip]
	mov	edx, eax
	and	edx, DWORD PTR [rbx]
	je	.L7
	cmp	QWORD PTR 8[rbx], 0
	jne	.L27
.L7:
	xor	r12d, r12d
	cmp	edx, eax
	sete	r12b
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	add	rsp, 80
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.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
.L27:
	.cfi_restore_state
	mov	edx, DWORD PTR mpu401_timeout[rip]
	lea	rdi, 4[rbx]
	mov	rcx, rbx
	mov	esi, 1
	call	callout_reset@PLT
	mov	eax, DWORD PTR M_TXEN[rip]
	mov	edx, DWORD PTR [rbx]
	and	edx, eax
	jmp	.L7
.L23:
	mov	r12d, eax
	jmp	.L2
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mpu401_intr, .-mpu401_intr
	.comm	mpu401_timeout,4,4
	.comm	M_TXEN,4,4
	.comm	MPU_OUTPUTBUSY,4,4
	.comm	MPU_INTR_BUF,4,4
	.comm	MPU_INPUTBUSY,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_mpu401.c_mpu401_intr.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpu401_intr, %function
mpu401_intr:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L25
	sub	sp, sp, #72
	ldr	r3, [r3]
	str	r3, [sp, #68]
	mov	r3,#0
	mov	r5, r0
	bl	STATUS
	ldr	r8, .L25+4
	ldr	r6, [r8]
	ands	r6, r0, r6
	bne	.L20
	mov	r7, sp
.L4:
	mov	r0, r5
	bl	READ
	mov	r3, r0
	mov	r0, r5
	str	r3, [r7, #4]!
	bl	STATUS
	ldr	r3, [r8]
	mov	r4, r0
	tst	r0, r3
	add	r6, r6, #1
	bne	.L3
	cmp	r6, #16
	bne	.L4
.L3:
	mov	r2, r6
	ldr	r0, [r5, #12]
	add	r1, sp, #4
	bl	midi_in
.L2:
	ldr	r6, .L25+8
	ldr	r0, [r6]
	ands	r4, r4, r0
	bne	.L9
.L5:
	mov	r2, #1
	ldr	r0, [r5, #12]
	add	r1, sp, #4
	bl	midi_out
	cmp	r0, #0
	beq	.L1
	ldr	r1, [sp, #4]
	mov	r0, r5
	bl	WRITE
	mov	r0, r5
	bl	STATUS
	ldr	r3, [r6]
	add	r4, r4, #1
	and	r0, r0, r3
	subs	r3, r4, #16
	movne	r3, #1
	cmp	r0, #0
	movne	r3, #0
	cmp	r3, #0
	bne	.L5
.L9:
	ldr	r4, .L25+12
	ldr	r3, [r5]
	ldr	r2, [r4]
	ands	r0, r2, r3
	beq	.L7
	ldr	r3, [r5, #8]
	cmp	r3, #0
	bne	.L23
.L7:
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #72
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	ldr	r2, .L25+16
	mov	r3, r5
	ldr	r2, [r2]
	mov	r1, #1
	add	r0, r5, #4
	bl	callout_reset
	ldr	r2, [r4]
	ldr	r3, [r5]
	and	r0, r2, r3
	b	.L7
.L20:
	mov	r4, r0
	b	.L2
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	MPU_INPUTBUSY
	.word	MPU_OUTPUTBUSY
	.word	M_TXEN
	.word	mpu401_timeout
	.size	mpu401_intr, .-mpu401_intr
	.comm	mpu401_timeout,4,4
	.comm	M_TXEN,4,4
	.comm	MPU_OUTPUTBUSY,4,4
	.comm	MPU_INTR_BUF,4,4
	.comm	MPU_INPUTBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
