	.file	"extr_rl2.c_rl2_read_packet.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rl2_read_packet, @function
rl2_read_packet:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	mov	rdx, QWORD PTR 24[rdi]
	mov	r10, QWORD PTR INT64_MAX[rip]
	test	eax, eax
	jle	.L10
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r8d, -1[rax]
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, -1
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rsi, QWORD PTR [rdx]
	mov	r9, QWORD PTR 8[rdi]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, rdx
.L4:
	mov	rcx, QWORD PTR [r9+rax*8]
	mov	rdx, QWORD PTR [rsi+rax*8]
	cmp	rdx, QWORD PTR [rcx]
	jnb	.L3
	sal	rdx, 4
	add	rdx, QWORD PTR 8[rcx]
	mov	rcx, QWORD PTR [rdx]
	cmp	rcx, r10
	jge	.L3
	mov	r10, rcx
	mov	ebp, eax
	mov	rbx, rdx
.L3:
	lea	rdx, 1[rax]
	cmp	r8, rax
	jne	.L8
	mov	eax, DWORD PTR AVERROR_EOF[rip]
	cmp	ebp, -1
	je	.L1
	movsx	rax, ebp
	mov	r13, QWORD PTR 16[rdi]
	mov	edx, DWORD PTR SEEK_SET[rip]
	add	QWORD PTR [rsi+rax*8], 1
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, r13
	call	avio_seek@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	rsi, r12
	mov	rdi, r13
	call	av_get_packet@PLT
	cmp	DWORD PTR 8[rbx], eax
	jne	.L14
	mov	edx, DWORD PTR 12[rbx]
	mov	DWORD PTR [r12], ebp
	mov	DWORD PTR 4[r12], edx
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, r12
	call	av_packet_unref@PLT
	mov	edi, DWORD PTR EIO[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	AVERROR@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR AVERROR_EOF[rip]
	ret
	.cfi_endproc
.LFE0:
	.size	rl2_read_packet, .-rl2_read_packet
	.comm	SEEK_SET,4,4
	.comm	INT64_MAX,8,8
	.comm	EIO,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_rl2.c_rl2_read_packet.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rl2_read_packet, %function
rl2_read_packet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, [r0]
	ldr	r3, .L12
	cmp	r8, #0
	mov	r6, r1
	ldr	r7, [r3]
	ldr	r1, [r0, #12]
	ble	.L2
	mov	r2, #0
	mvn	r4, #0
	mov	r5, r2
	ldr	r9, [r1]
	ldr	lr, [r0, #4]
	sub	r1, r9, #4
	sub	lr, lr, #4
.L4:
	ldr	ip, [lr, #4]!
	ldr	r3, [r1, #4]!
	ldr	fp, [ip]
	add	r10, r3, r3, lsl #1
	cmp	r3, fp
	bcs	.L3
	ldr	r3, [ip, #4]
	ldr	ip, [r3, r10, lsl #2]
	add	r3, r3, r10, lsl #2
	cmp	ip, r7
	movlt	r7, ip
	movlt	r4, r2
	movlt	r5, r3
.L3:
	add	r2, r2, #1
	cmp	r2, r8
	bne	.L4
	cmn	r4, #1
	beq	.L2
	ldr	r3, [r9, r4, lsl #2]
	ldr	r7, [r0, #8]
	add	r3, r3, #1
	ldr	r2, .L12+4
	str	r3, [r9, r4, lsl #2]
	ldr	r1, [r5]
	ldr	r2, [r2]
	mov	r0, r7
	bl	avio_seek
	mov	r0, r7
	mov	r1, r6
	ldr	r2, [r5, #4]
	bl	av_get_packet
	ldr	r3, [r5, #4]
	cmp	r3, r0
	bne	.L11
	ldr	r3, [r5, #8]
	str	r4, [r6]
	str	r3, [r6, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r0, r6
	bl	av_packet_unref
	ldr	r3, .L12+8
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	AVERROR
.L2:
	ldr	r3, .L12+12
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	INT64_MAX
	.word	SEEK_SET
	.word	EIO
	.word	AVERROR_EOF
	.size	rl2_read_packet, .-rl2_read_packet
	.comm	SEEK_SET,4,4
	.comm	INT64_MAX,4,4
	.comm	EIO,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
