	.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	%rbx, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movq	%rbx, %rdi
	callq	_avio_rb32
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movq	%rbx, %rdi
	callq	_avio_rb32
                                        ## kill: def $eax killed $eax def $rax
	leal	16(%rax), %ecx
	cmpl	%ecx, %r15d
	jge	LBB0_3
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_av_get_packet
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	addl	$-16, (%r14)
	movl	$1, 4(%r14)
	subl	%r12d, %r15d
	addl	$-16, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_avio_skip
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_EIO,4,2                        ## @EIO
	.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	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_avio_feof
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
LBB0_2:
	mov	x0, x22
	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:
	mov	x0, x19
	mov	w1, #4
	bl	_avio_skip
	mov	x0, x19
	bl	_avio_rb32
	mov	x21, x0
	mov	x0, x19
	mov	w1, #4
	bl	_avio_skip
	mov	x0, x19
	bl	_avio_rb32
	add	w8, w0, #16
	cmp	w21, w8
	b.ge	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_5:
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_av_get_packet
	mov	x22, x0
	tbnz	w0, #31, LBB0_2
; %bb.6:
	ldr	w8, [x20]
	sub	w8, w8, #16
	mov	w9, #1
	stp	w8, w9, [x20]
	sub	w8, w21, w22
	sub	w1, w8, #16
	mov	x0, x19
	bl	_avio_skip
	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	_EIO,4,2                        ; @EIO
	.no_dead_strip	_read_packet
.subsections_via_symbols
