	.file	"extr_qsynth_reader.c_qsynth_reader_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	qsynth_reader_read, @function
qsynth_reader_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 8[rdi]
	mov	rbx, rsi
	mov	rbp, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[rbp]
	test	rax, rax
	je	.L2
	mov	ecx, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	mov	QWORD PTR 4[rsi], 0
	mov	QWORD PTR 32[rsi], 0
	sub	edi, ecx
	test	ecx, ecx
	mov	ecx, 0
	cmove	ecx, DWORD PTR VC_CONTAINER_PACKET_FLAG_FRAME_START[rip]
	mov	DWORD PTR [rsi], edi
	mov	DWORD PTR 24[rsi], ecx
	test	DWORD PTR VC_CONTAINER_READ_FLAG_SKIP[rip], edx
	jne	.L24
	test	DWORD PTR VC_CONTAINER_READ_FLAG_INFO[rip], edx
	je	.L25
.L11:
	mov	eax, DWORD PTR VC_CONTAINER_SUCCESS[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L24:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 0[rbp], 0
	mov	QWORD PTR 16[rbp], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 4[rbp]
	cmp	eax, DWORD PTR [rdi]
	jg	.L26
	mov	ecx, DWORD PTR VC_CONTAINER_PACKET_FLAG_FRAME[rip]
	mov	DWORD PTR [rsi], 5
	mov	DWORD PTR 8[rsi], eax
	mov	DWORD PTR 4[rsi], eax
	mov	QWORD PTR 32[rsi], 0
	mov	DWORD PTR 24[rsi], ecx
	test	DWORD PTR VC_CONTAINER_READ_FLAG_SKIP[rip], edx
	jne	.L27
	test	DWORD PTR VC_CONTAINER_READ_FLAG_INFO[rip], edx
	jne	.L11
	cmp	DWORD PTR 12[rbx], 4
	jle	.L28
	mov	edx, DWORD PTR 8[rbp]
	mov	rcx, QWORD PTR 16[rbx]
	test	edx, edx
	je	.L13
	movsx	rdx, eax
	sar	eax, 31
	mov	BYTE PTR [rcx], 83
	imul	rdx, rdx, 274877907
	sar	rdx, 38
	sub	edx, eax
	mov	eax, edx
	mov	rdx, QWORD PTR 16[rbx]
	mov	ecx, eax
	sar	ecx, 24
	mov	BYTE PTR 1[rdx], cl
	mov	ecx, eax
	mov	rdx, QWORD PTR 16[rbx]
	sar	ecx, 16
	mov	BYTE PTR 2[rdx], cl
	mov	rdx, QWORD PTR 16[rbx]
	mov	BYTE PTR 3[rdx], ah
	mov	rdx, QWORD PTR 16[rbx]
	mov	BYTE PTR 4[rdx], al
	mov	DWORD PTR 8[rbp], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	mov	esi, DWORD PTR 12[rbx]
	call	MIN@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR 0[rbp]
	mov	r12d, eax
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, r12d
	add	esi, DWORD PTR 4[rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	DWORD PTR [rbx], r12d
	add	r12d, DWORD PTR 0[rbp]
	mov	DWORD PTR 0[rbp], r12d
	cmp	r12d, DWORD PTR [rax]
	jne	.L11
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 0[rbp], 0
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR VC_CONTAINER_PACKET_FLAG_FRAME_END[rip]
	or	DWORD PTR 24[rbx], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR VC_CONTAINER_ERROR_EOS[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	add	eax, 40
	mov	DWORD PTR 8[rbp], 1
	mov	DWORD PTR 4[rbp], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L28:
	mov	eax, DWORD PTR VC_CONTAINER_ERROR_BUFFER_TOO_SMALL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	BYTE PTR [rcx], 80
	mov	rax, QWORD PTR 16[rbx]
	mov	BYTE PTR 1[rax], 0
	mov	rax, QWORD PTR 16[rbx]
	mov	BYTE PTR 2[rax], 0
	mov	rax, QWORD PTR 16[rbx]
	mov	BYTE PTR 3[rax], 0
	mov	rax, QWORD PTR 16[rbx]
	mov	BYTE PTR 4[rax], 40
	add	DWORD PTR 4[rbp], 40000
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	qsynth_reader_read, .-qsynth_reader_read
	.comm	VC_CONTAINER_SUCCESS,4,4
	.comm	VC_CONTAINER_READ_FLAG_SKIP,4,4
	.comm	VC_CONTAINER_READ_FLAG_INFO,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME_START,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME_END,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME,4,4
	.comm	VC_CONTAINER_ERROR_EOS,4,4
	.comm	VC_CONTAINER_ERROR_BUFFER_TOO_SMALL,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_qsynth_reader.c_qsynth_reader_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qsynth_reader_read, %function
qsynth_reader_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #4]
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r3]
	mov	r4, r1
	ldr	r1, [r5, #12]
	cmp	r1, #0
	beq	.L2
	mov	r3, #0
	ldr	ip, [r5]
	ldr	r0, [r1]
	cmp	ip, r3
	str	r3, [r4, #8]
	str	r3, [r4, #4]
	str	r3, [r4, #24]
	ldreq	r3, .L29
	sub	r0, r0, ip
	ldreq	r3, [r3]
	ldr	ip, .L29+4
	str	r3, [r4, #20]
	ldr	r3, [ip]
	str	r0, [r4]
	tst	r2, r3
	bne	.L24
	ldr	r3, .L29+8
	ldr	r3, [r3]
	ands	r6, r2, r3
	beq	.L25
.L11:
	ldr	r3, .L29+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	mov	r2, #0
	ldr	r3, [r1, #8]
	str	r2, [r5]
	str	r3, [r5, #12]
	b	.L11
.L2:
	ldr	r0, [r0]
	ldr	r3, [r5, #4]
	cmp	r3, r0
	bgt	.L26
	mov	r0, #5
	ldr	ip, .L29+4
	str	r3, [r4, #8]
	ldr	lr, [ip]
	ldr	ip, .L29+16
	tst	r2, lr
	ldr	ip, [ip]
	str	r3, [r4, #4]
	str	r1, [r4, #24]
	str	ip, [r4, #20]
	str	r0, [r4]
	bne	.L27
	ldr	r1, .L29+8
	ldr	r1, [r1]
	ands	r2, r2, r1
	bne	.L11
	ldr	r1, [r4, #12]
	cmp	r1, #4
	ble	.L28
	ldr	r1, [r5, #8]
	ldr	r0, [r4, #16]
	cmp	r1, #0
	beq	.L13
	mov	ip, #83
	ldr	r1, .L29+20
	strb	ip, [r0]
	smull	r0, r1, r3, r1
	asr	r3, r3, #31
	rsb	r3, r3, r1, asr #6
	ldr	r1, [r4, #16]
	lsr	r0, r3, #24
	strb	r0, [r1, #1]
	ldr	r1, [r4, #16]
	asr	r0, r3, #16
	strb	r0, [r1, #2]
	ldr	r1, [r4, #16]
	asr	r0, r3, #8
	strb	r0, [r1, #3]
	ldr	r1, [r4, #16]
	strb	r3, [r1, #4]
	str	r2, [r5, #8]
	b	.L11
.L25:
	ldr	r1, [r4, #12]
	bl	MIN
	mov	r7, r0
	ldr	r2, [r5, #12]
	ldr	r3, [r5]
	ldr	r1, [r2, #4]
	mov	r2, r0
	add	r1, r1, r3
	ldr	r0, [r4, #16]
	bl	memcpy
	ldr	r1, [r5, #12]
	ldr	r3, [r5]
	ldr	r2, [r1]
	add	r3, r7, r3
	cmp	r3, r2
	str	r7, [r4]
	str	r3, [r5]
	bne	.L11
	ldr	r2, .L29+24
	ldr	r3, [r4, #20]
	ldr	r0, [r2]
	ldr	r2, [r1, #8]
	orr	r3, r3, r0
	str	r2, [r5, #12]
	str	r6, [r5]
	str	r3, [r4, #20]
	b	.L11
.L26:
	ldr	r3, .L29+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L27:
	mov	r2, #1
	add	r3, r3, #40
	str	r3, [r5, #4]
	str	r2, [r5, #8]
	b	.L11
.L28:
	ldr	r3, .L29+32
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r3, #80
	mov	r2, #40
	strb	r3, [r0]
	ldr	r3, [r4, #16]
	strb	r1, [r3, #1]
	ldr	r3, [r4, #16]
	strb	r1, [r3, #2]
	ldr	r3, [r4, #16]
	strb	r1, [r3, #3]
	ldr	r3, [r4, #16]
	strb	r2, [r3, #4]
	ldr	r3, [r5, #4]
	add	r3, r3, #39936
	add	r3, r3, #64
	str	r3, [r5, #4]
	b	.L11
.L30:
	.align	2
.L29:
	.word	VC_CONTAINER_PACKET_FLAG_FRAME_START
	.word	VC_CONTAINER_READ_FLAG_SKIP
	.word	VC_CONTAINER_READ_FLAG_INFO
	.word	VC_CONTAINER_SUCCESS
	.word	VC_CONTAINER_PACKET_FLAG_FRAME
	.word	274877907
	.word	VC_CONTAINER_PACKET_FLAG_FRAME_END
	.word	VC_CONTAINER_ERROR_EOS
	.word	VC_CONTAINER_ERROR_BUFFER_TOO_SMALL
	.size	qsynth_reader_read, .-qsynth_reader_read
	.comm	VC_CONTAINER_SUCCESS,4,4
	.comm	VC_CONTAINER_READ_FLAG_SKIP,4,4
	.comm	VC_CONTAINER_READ_FLAG_INFO,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME_START,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME_END,4,4
	.comm	VC_CONTAINER_PACKET_FLAG_FRAME,4,4
	.comm	VC_CONTAINER_ERROR_EOS,4,4
	.comm	VC_CONTAINER_ERROR_BUFFER_TOO_SMALL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
