	.file	"extr_audiotoolbox_midi.c_DecodeBlock.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"MIDI message in the past?"
.LC1:
	.string	"unhandled MIDI event: %x"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"rendering audio unit failed: %i"
	.text
	.p2align 4
	.type	DecodeBlock, @function
DecodeBlock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	rsi, rsi
	je	.L8
	mov	eax, DWORD PTR BLOCK_FLAG_DISCONTINUITY[rip]
	mov	rbx, QWORD PTR [rdi]
	mov	r12, rdi
	mov	rbp, rsi
	or	eax, DWORD PTR BLOCK_FLAG_CORRUPTED[rip]
	test	DWORD PTR [rsi], eax
	jne	.L30
.L4:
	mov	r14, QWORD PTR VLC_TICK_INVALID[rip]
	lea	r13, 4[rbx]
	cmp	QWORD PTR 8[rbp], r14
	je	.L5
	mov	rdi, r13
	call	date_Get@PLT
	cdqe
	cmp	rax, QWORD PTR VLC_TICK_INVALID[rip]
	je	.L6
	mov	r14, QWORD PTR 8[rbp]
.L5:
	mov	rdi, r13
	call	date_Get@PLT
	cdqe
	cmp	rax, r14
	jg	.L31
.L7:
	mov	edx, DWORD PTR 16[rbp]
	test	edx, edx
	jle	.L9
	mov	rsi, QWORD PTR 24[rbp]
	mov	r9d, DWORD PTR [rsi]
	cmp	edx, 1
	je	.L16
	mov	r10d, DWORD PTR 4[rsi]
	xor	ecx, ecx
	cmp	edx, 2
	je	.L10
	mov	ecx, DWORD PTR 8[rsi]
.L10:
	mov	r8d, r9d
	and	r8d, 240
	cmp	r8d, 128
	je	.L11
	lea	eax, -129[r8]
	cmp	eax, 6
	ja	.L12
	mov	edi, DWORD PTR 8[rbx]
	xor	r8d, r8d
	mov	edx, r10d
	mov	esi, r9d
	call	MusicDeviceMIDIEvent@PLT
.L13:
	mov	rdi, r13
	mov	r14, QWORD PTR 8[rbp]
	call	date_Get@PLT
	movabs	rdx, 3777893186295716171
	cdqe
	sub	r14, rax
	imul	rcx, r14, 441
	mov	rax, rcx
	sar	rcx, 63
	imul	rdx
	sar	rdx, 11
	mov	r14, rdx
	sub	r14, rcx
	cmp	edx, ecx
	je	.L9
	mov	esi, r14d
	mov	rdi, r12
	call	decoder_NewAudioBuffer@PLT
	mov	r15, rax
	test	rax, rax
	je	.L9
	mov	rdi, r13
	call	date_Get@PLT
	mov	esi, r14d
	mov	rdi, r13
	cdqe
	mov	QWORD PTR 8[r15], rax
	call	date_Increment@PLT
	mov	rdx, QWORD PTR 8[r15]
	mov	edi, DWORD PTR [rbx]
	xor	ecx, ecx
	mov	DWORD PTR 16[rsp], 1
	xor	esi, esi
	lea	r9, 16[rsp]
	mov	r8d, r14d
	sub	eax, edx
	mov	DWORD PTR 8[rsp], edx
	lea	edx, 0[0+r14*8]
	mov	DWORD PTR 32[r15], eax
	mov	eax, DWORD PTR kAudioTimeStampWordClockTimeValid[rip]
	mov	DWORD PTR 12[rsp], eax
	mov	rax, QWORD PTR 24[rsp]
	mov	DWORD PTR 4[rax], edx
	mov	rdx, QWORD PTR 24[r15]
	mov	DWORD PTR [rax], 2
	mov	QWORD PTR 8[rax], rdx
	lea	rdx, 8[rsp]
	call	AudioUnitRender@PLT
	cmp	QWORD PTR noErr[rip], rax
	mov	rdx, rax
	je	.L14
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Warn@PLT
	mov	rdi, r15
	call	block_Release@PLT
	mov	rdi, rbp
	call	block_Release@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR VLCDEC_SUCCESS[rip]
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L32
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	block_Release@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L30:
	call	Flush@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR BLOCK_FLAG_CORRUPTED[rip], eax
	je	.L4
	mov	rdi, rbp
	call	block_Release@PLT
	mov	eax, DWORD PTR VLCDEC_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rsi, QWORD PTR 8[rbp]
	mov	rdi, r13
	call	date_Set@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbp
	call	block_Release@PLT
	mov	rsi, r15
	mov	rdi, r12
	call	decoder_QueueAudio@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L16:
	xor	r10d, r10d
	xor	ecx, ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, r8d
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Warn@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	edx, DWORD PTR UINT32_MAX[rip]
	jge	.L13
	mov	edi, DWORD PTR 8[rbx]
	call	MusicDeviceSysEx@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, r12
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	msg_Warn@PLT
	mov	rdi, rbp
	call	block_Release@PLT
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	DecodeBlock, .-DecodeBlock
	.comm	noErr,8,8
	.comm	kAudioTimeStampWordClockTimeValid,4,4
	.comm	VLC_TICK_INVALID,8,8
	.comm	VLCDEC_SUCCESS,4,4
	.comm	UINT32_MAX,4,4
	.comm	BLOCK_FLAG_DISCONTINUITY,4,4
	.comm	BLOCK_FLAG_CORRUPTED,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_audiotoolbox_midi.c_DecodeBlock.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MIDI message in the past?\000"
	.align	2
.LC1:
	.ascii	"unhandled MIDI event: %x\000"
	.align	2
.LC2:
	.ascii	"rendering audio unit failed: %i\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	DecodeBlock, %function
DecodeBlock:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L36
	sub	sp, sp, #36
	subs	r4, r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	beq	.L8
	ldr	r3, .L36+4
	ldr	r6, .L36+8
	ldr	r3, [r3]
	ldr	r1, [r6]
	ldr	r2, [r4]
	orr	r3, r3, r1
	tst	r3, r2
	mov	r5, r0
	ldr	r7, [r0]
	bne	.L32
.L4:
	ldr	r9, .L36+12
	ldr	r3, [r4, #4]
	ldr	r8, [r9]
	add	r6, r7, #4
	cmp	r3, r8
	beq	.L5
	mov	r0, r6
	bl	date_Get
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L6
	ldr	r8, [r4, #4]
.L5:
	mov	r0, r6
	bl	date_Get
	cmp	r0, r8
	bgt	.L33
.L7:
	ldr	r0, [r4, #8]
	cmp	r0, #0
	ble	.L9
	ldr	lr, [r4, #12]
	cmp	r0, #1
	ldr	r1, [lr]
	beq	.L16
	cmp	r0, #2
	moveq	r3, #0
	ldr	r2, [lr, #4]
	ldrne	r3, [lr, #8]
.L10:
	and	ip, r1, #240
	cmp	ip, #128
	beq	.L11
.L35:
	sub	r0, ip, #129
	cmp	r0, #6
	bhi	.L12
	mov	ip, #0
	ldr	r0, [r7, #8]
	str	ip, [sp]
	bl	MusicDeviceMIDIEvent
.L13:
	mov	r0, r6
	ldr	r8, [r4, #4]
	bl	date_Get
	sub	r1, r8, r0
	rsb	r1, r1, r1, lsl #3
	ldr	r8, .L36+16
	rsb	r1, r1, r1, lsl #6
	smull	r3, r8, r1, r8
	asr	r1, r1, #31
	rsbs	r8, r1, r8, asr #12
	beq	.L9
	mov	r1, r8
	mov	r0, r5
	bl	decoder_NewAudioBuffer
	subs	r9, r0, #0
	beq	.L9
	mov	r0, r6
	bl	date_Get
	mov	r3, r0
	mov	r1, r8
	str	r3, [r9, #4]
	mov	r0, r6
	bl	date_Increment
	mov	r2, r0
	mov	lr, #1
	mov	ip, #2
	mov	r3, #0
	ldr	r1, [r9, #4]
	ldr	r0, [r7]
	sub	r2, r2, r1
	str	r2, [r9, #16]
	ldr	r2, .L36+20
	str	r1, [sp, #12]
	ldr	r2, [r2]
	ldr	r1, [r9, #12]
	str	r2, [sp, #16]
	ldr	r2, [sp, #24]
	str	lr, [sp, #20]
	str	ip, [r2]
	lsl	ip, r8, #3
	str	r1, [r2, #8]
	str	ip, [r2, #4]
	add	r2, sp, #20
	mov	r1, r3
	str	r2, [sp, #4]
	str	r8, [sp]
	add	r2, sp, #12
	bl	AudioUnitRender
	ldr	r3, .L36+24
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L14
	mov	r2, r0
	ldr	r1, .L36+28
	mov	r0, r5
	bl	msg_Warn
	mov	r0, r9
	bl	block_Release
	mov	r0, r4
	bl	block_Release
.L8:
	ldr	r3, .L36+32
	ldr	r0, [r3]
.L1:
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	mov	r0, r4
	bl	block_Release
	b	.L8
.L32:
	bl	Flush
	ldr	r3, [r6]
	ldr	r2, [r4]
	tst	r2, r3
	beq	.L4
	mov	r0, r4
	bl	block_Release
	ldr	r3, .L36+32
	ldr	r0, [r3]
	b	.L1
.L6:
	mov	r0, r6
	ldr	r1, [r4, #4]
	bl	date_Set
	b	.L7
.L14:
	mov	r0, r4
	bl	block_Release
	mov	r1, r9
	mov	r0, r5
	bl	decoder_QueueAudio
	b	.L8
.L16:
	mov	r2, #0
	and	ip, r1, #240
	cmp	ip, #128
	mov	r3, r2
	bne	.L35
.L11:
	ldr	r3, .L36+36
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L13
	mov	r2, r0
	mov	r1, lr
	ldr	r0, [r7, #8]
	bl	MusicDeviceSysEx
	b	.L13
.L12:
	mov	r2, ip
	mov	r0, r5
	ldr	r1, .L36+40
	bl	msg_Warn
	b	.L13
.L33:
	mov	r0, r5
	ldr	r1, .L36+44
	bl	msg_Warn
	mov	r0, r4
	bl	block_Release
	b	.L8
.L34:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC3
	.word	BLOCK_FLAG_DISCONTINUITY
	.word	BLOCK_FLAG_CORRUPTED
	.word	VLC_TICK_INVALID
	.word	1759218605
	.word	kAudioTimeStampWordClockTimeValid
	.word	noErr
	.word	.LC2
	.word	VLCDEC_SUCCESS
	.word	UINT32_MAX
	.word	.LC1
	.word	.LC0
	.size	DecodeBlock, .-DecodeBlock
	.comm	noErr,4,4
	.comm	kAudioTimeStampWordClockTimeValid,4,4
	.comm	VLC_TICK_INVALID,4,4
	.comm	VLCDEC_SUCCESS,4,4
	.comm	UINT32_MAX,4,4
	.comm	BLOCK_FLAG_DISCONTINUITY,4,4
	.comm	BLOCK_FLAG_CORRUPTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
