	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	16(%rdi), %r13
	movq	(%rdi), %r12
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	_CAF_MAX_PKT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	movq	(%r12), %r14
	testq	%r14, %r14
	movq	_CAF_MAX_PKT_SIZE@GOTPCREL(%rip), %r12
	jle	LBB0_5
## %bb.3:
	movq	%rax, %r15
	addl	8(%rax), %r14d
	movq	%r13, %rdi
	callq	_avio_tell
	movl	%r14d, %ebx
	subl	%eax, %ebx
	je	LBB0_1
## %bb.4:
	movq	%r15, %rax
	js	LBB0_20
LBB0_5:
	movl	12(%rax), %r15d
	movl	16(%rax), %ecx
	testl	%ecx, %ecx
	movq	%rax, %r14
	jle	LBB0_8
## %bb.6:
	cmpl	$1, %r15d
	jne	LBB0_8
## %bb.7:
	movl	(%r12), %edi
	movl	%edi, %eax
	cltd
	idivl	%ecx
	subl	%edx, %edi
	movl	%ebx, %esi
	callq	_FFMIN
	movl	%eax, %ecx
	cltd
	movq	%r14, %r12
	idivl	16(%r14)
	movl	%eax, %r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_8:
	movq	%r14, %r12
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %edx
	testl	%edx, %edx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_14
## %bb.9:
	movslq	20(%r12), %rax
	decl	%edx
	cmpl	%edx, %eax
	jge	LBB0_11
## %bb.10:
	movq	8(%rsi), %rdx
	movl	8(%rdx,%rax,8), %ecx
	movl	12(%rdx,%rax,8), %r15d
	subl	(%rdx,%rax,8), %ecx
	jmp	LBB0_13
LBB0_11:
	cmpl	%edx, %eax
	jne	LBB0_20
## %bb.12:
	movl	24(%r12), %ecx
	movq	8(%rsi), %rdx
	subl	(%rdx,%rax,8), %ecx
	movl	4(%rsi), %r15d
LBB0_13:
	subl	4(%rdx,%rax,8), %r15d
LBB0_14:
	testl	%ecx, %ecx
	je	LBB0_20
## %bb.15:
	testl	%r15d, %r15d
	je	LBB0_20
## %bb.16:
	cmpl	%ebx, %ecx
	jg	LBB0_20
## %bb.17:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ecx, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_19
## %bb.18:
	movl	%eax, (%r14)
	movq	$0, 16(%r14)
	movl	28(%r12), %eax
	movl	%eax, 8(%r14)
	movl	%eax, 4(%r14)
	incl	20(%r12)
	addl	%eax, %r15d
	movl	%r15d, 28(%r12)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_20:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CAF_MAX_PKT_SIZE,4,2           ## @CAF_MAX_PKT_SIZE
	.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	ldp	x8, x20, [x0, #8]
	ldr	x22, [x0]
	ldr	x23, [x8]
Lloh0:
	adrp	x25, _CAF_MAX_PKT_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _CAF_MAX_PKT_SIZE@GOTPAGEOFF]
	ldr	w21, [x25]
	mov	x0, x20
	bl	_avio_feof
	cbz	x0, LBB0_3
LBB0_1:
Lloh2:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x24, [x22]
	cmp	x24, #1
	b.lt	LBB0_6
; %bb.4:
	ldr	w21, [x22, #8]
	mov	x0, x20
	bl	_avio_tell
	add	w8, w21, w24
	subs	w21, w8, w0
	b.eq	LBB0_1
; %bb.5:
	tbnz	w21, #31, LBB0_12
LBB0_6:
	ldp	w24, w2, [x22, #12]
	cmp	w2, #1
	ccmp	w24, #1, #0, ge
	b.eq	LBB0_10
; %bb.7:
	ldr	w9, [x23]
	cbz	w9, LBB0_11
; %bb.8:
	ldrsw	x8, [x22, #20]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_15
; %bb.9:
	ldr	x9, [x23, #8]
	add	x8, x9, x8, lsl #3
	ldp	w9, w10, [x8, #8]
	ldp	w11, w8, [x8]
	sub	w2, w9, w11
	sub	w24, w10, w8
	b	LBB0_11
LBB0_10:
	ldr	w8, [x25]
	sdiv	w8, w8, w2
	mul	w0, w8, w2
	mov	x1, x21
	bl	_FFMIN
	mov	x2, x0
	ldr	w8, [x22, #16]
	sdiv	w24, w0, w8
LBB0_11:
	cmp	w2, #0
	ccmp	w24, #0, #4, ne
	ccmp	w2, w21, #0, ne
	b.le	LBB0_13
LBB0_12:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_2
; %bb.14:
	str	xzr, [x19, #16]
	ldr	w8, [x22, #28]
	stp	w8, w8, [x19, #4]
	str	w0, [x19]
	ldr	w9, [x22, #20]
	add	w9, w9, #1
	str	w9, [x22, #20]
	add	w8, w8, w24
	str	w8, [x22, #28]
	mov	w0, #0
	b	LBB0_2
LBB0_15:
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.16:
	ldr	w9, [x22, #24]
	ldr	x10, [x23, #8]
	add	x8, x10, x8, lsl #3
	ldp	w10, w8, [x8]
	sub	w2, w9, w10
	ldr	w9, [x23, #4]
	sub	w24, w9, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CAF_MAX_PKT_SIZE,4,2           ; @CAF_MAX_PKT_SIZE
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_read_packet
.subsections_via_symbols
