	.file	"extr_sysex_tools.c_sysex_decode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sysex_decode
	.type	sysex_decode, @function
sysex_decode:
.LFB0:
	.cfi_startproc
	endbr64
	xor	eax, eax
	cmp	edx, 1
	jle	.L17
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rsi
	mov	esi, edx
	mov	r9, rdi
	sar	edx, 3
	mov	r10, rbx
	xor	r11d, r11d
	cmp	esi, 7
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	ecx, 1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8d, DWORD PTR [r10+rcx*4]
	and	r8d, 127
	mov	DWORD PTR -4[r9+rcx*4], r8d
	mov	eax, DWORD PTR [r10]
	sal	eax, cl
	and	eax, 128
	or	eax, r8d
	mov	DWORD PTR -4[r9+rcx*4], eax
	add	rcx, 1
	cmp	rcx, 8
	jne	.L5
	add	r11d, 1
	add	r10, 32
	add	r9, 28
	cmp	edx, r11d
	jg	.L6
.L7:
	lea	ecx, 0[0+rdx*8]
	mov	r11d, esi
	mov	r10d, ecx
	sub	r10d, edx
	mov	eax, r10d
	and	r11d, 7
	je	.L1
	and	esi, 6
	je	.L10
	movsx	rcx, ecx
	lea	r9d, -2[r11]
	movsx	rax, r10d
	lea	r8, [rbx+rcx*4]
	add	r9, 2
	lea	rsi, [rdi+rax*4]
	mov	ecx, 1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR [r8+rcx*4]
	and	edx, 127
	mov	DWORD PTR -4[rsi+rcx*4], edx
	mov	eax, DWORD PTR [r8]
	sal	eax, cl
	and	eax, 128
	or	eax, edx
	mov	DWORD PTR -4[rsi+rcx*4], eax
	add	rcx, 1
	cmp	r9, rcx
	jne	.L9
.L10:
	lea	eax, -1[r10+r11]
.L1:
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore 3
	ret
	.cfi_endproc
.LFE0:
	.size	sysex_decode, .-sysex_decode
	.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_sysex_tools.c_sysex_decode.c"
	.text
	.align	2
	.global	sysex_decode
	.syntax unified
	.arm
	.fpu softvfp
	.type	sysex_decode, %function
sysex_decode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #1
	ble	.L11
	cmp	r2, #7
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r9, r0
	movgt	r7, r1
	movgt	r6, r0
	movgt	r5, #0
	asr	r8, r2, #3
	ble	.L7
.L6:
	mov	lr, r6
	mov	r4, r7
	mov	ip, #0
.L5:
	ldr	r3, [r4, #4]!
	add	ip, ip, #1
	and	r0, r3, #127
	str	r0, [lr]
	ldr	r3, [r1, r5, lsl #5]
	cmp	ip, #7
	lsl	r3, r3, ip
	and	r3, r3, #128
	orr	r3, r3, r0
	str	r3, [lr], #4
	bne	.L5
	add	r5, r5, #1
	cmp	r8, r5
	add	r7, r7, #32
	add	r6, r6, #28
	bgt	.L6
.L7:
	ands	lr, r2, #7
	lsl	r3, r8, #3
	rsb	r0, r8, r8, lsl #3
	popeq	{r4, r5, r6, r7, r8, r9, pc}
	tst	r2, #6
	beq	.L10
	mov	ip, #0
	add	r8, r1, r8, lsl #5
	add	r9, r9, r0, lsl #2
	add	r1, r1, r3, lsl #2
	sub	r4, lr, #1
.L9:
	ldr	r3, [r1, #4]!
	add	ip, ip, #1
	and	r2, r3, #127
	str	r2, [r9]
	ldr	r3, [r8]
	cmp	ip, r4
	lsl	r3, r3, ip
	and	r3, r3, #128
	orr	r3, r3, r2
	str	r3, [r9], #4
	bne	.L9
.L10:
	add	r0, lr, r0
	sub	r0, r0, #1
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L11:
	mov	r0, #0
	bx	lr
	.size	sysex_decode, .-sysex_decode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
