	.file	"extr_bfi.c_bfi_read_packet.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Invalid audio/video offsets or chunk size\n"
	.text
	.p2align 4
	.type	bfi_read_packet, @function
bfi_read_packet:
.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, 8
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR 8[rdi]
	cmp	QWORD PTR [r14], 0
	jne	.L2
.L4:
	mov	r8d, DWORD PTR AVERROR_EOF[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L2:
	.cfi_restore_state
	mov	r12, QWORD PTR [rdi]
	mov	rbp, rdi
	mov	r13, rsi
	mov	rdi, r12
	call	avio_feof@PLT
	test	rax, rax
	jne	.L4
	mov	ebx, DWORD PTR 8[r14]
	test	ebx, ebx
	je	.L5
	mov	edx, DWORD PTR 12[r14]
	test	edx, edx
	jle	.L12
	mov	rsi, r13
	mov	rdi, r12
	call	av_get_packet@PLT
	mov	r8d, eax
	test	eax, eax
	js	.L1
	cdq
	mov	ecx, DWORD PTR 20[r14]
	idiv	DWORD PTR 12[r14]
	mov	DWORD PTR 0[r13], ecx
	sub	QWORD PTR [r14], 1
	add	eax, ecx
	mov	DWORD PTR 20[r14], eax
.L11:
	mov	edx, DWORD PTR 8[r14]
	xor	eax, eax
	test	edx, edx
	sete	al
	mov	DWORD PTR 8[r14], eax
	mov	DWORD PTR 4[r13], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	call	avio_feof@PLT
	test	rax, rax
	jne	.L19
	mov	rdi, r12
	sal	ebx, 8
	call	avio_r8@PLT
	add	ebx, eax
.L5:
	mov	edi, 83
	mov	ecx, 73
	mov	edx, 86
	mov	esi, 65
	call	MKTAG@PLT
	mov	rdi, r12
	cmp	eax, ebx
	jne	.L8
	call	avio_rl32@PLT
	mov	rdi, r12
	mov	ebx, eax
	call	avio_rl32@PLT
	mov	rdi, r12
	call	avio_rl32@PLT
	mov	rdi, r12
	mov	r15d, eax
	call	avio_rl32@PLT
	mov	rdi, r12
	call	avio_rl32@PLT
	mov	edx, eax
	sub	edx, r15d
	sub	ebx, eax
	mov	DWORD PTR 12[r14], ebx
	js	.L13
	test	edx, edx
	js	.L13
	mov	rsi, r13
	mov	rdi, r12
	call	av_get_packet@PLT
	mov	r8d, eax
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR 16[r14]
	mov	DWORD PTR 0[r13], eax
	add	eax, r8d
	mov	DWORD PTR 16[r14], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR EIO[rip]
	add	rsp, 8
	.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
	jmp	AVERROR@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR EAGAIN[rip]
	call	AVERROR@PLT
	mov	r8d, eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	call	av_log@PLT
	mov	r8d, DWORD PTR AVERROR_INVALIDDATA[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bfi_read_packet, .-bfi_read_packet
	.comm	EIO,4,4
	.comm	EAGAIN,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.comm	AVERROR_EOF,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_bfi.c_bfi_read_packet.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid audio/video offsets or chunk size\012\000"
	.global	__aeabi_idiv
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfi_read_packet, %function
bfi_read_packet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0, #4]
	ldr	r3, [r8]
	cmp	r3, #0
	bne	.L2
.L4:
	ldr	r3, .L17
	ldr	r4, [r3]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r6, [r0]
	mov	r5, r0
	mov	r0, r6
	mov	r7, r1
	bl	avio_feof
	cmp	r0, #0
	bne	.L4
	ldr	r4, [r8, #4]
	cmp	r4, #0
	beq	.L5
	ldr	r2, [r8, #8]
	cmp	r2, #0
	ble	.L11
	mov	r0, r6
	mov	r1, r7
	bl	av_get_packet
	subs	r4, r0, #0
	blt	.L1
	ldr	r5, [r8, #16]
	ldr	r1, [r8, #8]
	str	r5, [r7]
	bl	__aeabi_idiv
	ldr	r3, [r8]
	add	r0, r0, r5
	sub	r3, r3, #1
	str	r0, [r8, #16]
	str	r3, [r8]
.L10:
	ldr	r3, [r8, #4]
	mov	r0, r4
	clz	r3, r3
	lsr	r3, r3, #5
	str	r3, [r8, #4]
	str	r3, [r7, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	bl	avio_feof
	cmp	r0, #0
	bne	.L16
	mov	r0, r6
	bl	avio_r8
	lsl	r4, r4, #8
	add	r4, r4, r0
.L5:
	mov	r3, #73
	mov	r2, #86
	mov	r1, #65
	mov	r0, #83
	bl	MKTAG
	cmp	r0, r4
	mov	r0, r6
	bne	.L8
	bl	avio_rl32
	mov	r4, r0
	mov	r0, r6
	bl	avio_rl32
	mov	r0, r6
	bl	avio_rl32
	mov	r9, r0
	mov	r0, r6
	bl	avio_rl32
	mov	r0, r6
	bl	avio_rl32
	sub	r2, r0, r9
	sub	r0, r4, r0
	orrs	r3, r0, r2
	str	r0, [r8, #8]
	bpl	.L9
	ldr	r3, .L17+4
	mov	r0, r5
	ldr	r1, [r3]
	ldr	r2, .L17+8
	bl	av_log
	ldr	r3, .L17+12
	ldr	r4, [r3]
	b	.L1
.L16:
	ldr	r3, .L17+16
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, [r3]
	b	AVERROR
.L11:
	ldr	r3, .L17+20
	ldr	r0, [r3]
	bl	AVERROR
	mov	r4, r0
	b	.L10
.L9:
	mov	r0, r6
	mov	r1, r7
	bl	av_get_packet
	subs	r4, r0, #0
	blt	.L1
	ldr	r3, [r8, #12]
	add	r2, r3, r4
	str	r3, [r7]
	str	r2, [r8, #12]
	b	.L10
.L18:
	.align	2
.L17:
	.word	AVERROR_EOF
	.word	AV_LOG_ERROR
	.word	.LC0
	.word	AVERROR_INVALIDDATA
	.word	EIO
	.word	EAGAIN
	.size	bfi_read_packet, .-bfi_read_packet
	.comm	EIO,4,4
	.comm	EAGAIN,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.comm	AVERROR_EOF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
