	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @read_packet
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movl	(%rdi), %edi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r12), %r15d
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	callq	_avio_tell
	movq	8(%r12), %rcx
	cmpq	%rax, %rcx
	je	LBB0_1
## %bb.4:
	movslq	(%r12), %rdx
	addq	%rax, %rdx
	movl	%ecx, %esi
	subl	%eax, %esi
	cmpq	%rcx, %rdx
	cmovgl	%esi, %r15d
LBB0_5:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_av_get_packet
	movl	%eax, (%r14)
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0]
	bl	_avio_feof
	cbz	x0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w21, [x22]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	bl	_avio_tell
	ldr	x8, [x22, #8]
	cmp	x8, x0
	b.eq	LBB0_1
; %bb.5:
	ldrsw	x9, [x22]
	sub	w10, w8, w0
	add	x9, x0, x9
	cmp	x9, x8
	csel	w21, w10, w21, gt
LBB0_6:
	ldr	w0, [x20]
	mov	x1, x19
	mov	x2, x21
	bl	_av_get_packet
	str	w0, [x19]
	tbnz	w0, #31, LBB0_2
; %bb.7:
	mov	w0, #0
Lloh3:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols
