	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfi_read_packet
_bfi_read_packet:                       ## @bfi_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r13
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ecx
LBB0_4:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$0, 8(%r13)
	je	LBB0_9
## %bb.6:
	movl	12(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_17
## %bb.7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_av_get_packet
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_4
## %bb.8:
	movl	20(%r13), %esi
	movl	%esi, (%r14)
	movl	%ecx, %eax
	cltd
	idivl	12(%r13)
	addl	%esi, %eax
	movl	%eax, 20(%r13)
	decq	(%r13)
	jmp	LBB0_18
LBB0_9:
	movl	$83, %edi
	movl	$65, %esi
	movl	$86, %edx
	movl	$73, %ecx
	callq	_MKTAG
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	shll	$8, %ebx
	movq	%r12, %rdi
	callq	_avio_r8
	addl	%eax, %ebx
	movl	$83, %edi
	movl	$65, %esi
	movl	$86, %edx
	movl	$73, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_11
LBB0_13:
	movq	%r12, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_avio_rl32
	movq	%r12, %rdi
	callq	_avio_rl32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_avio_rl32
	movq	%r12, %rdi
	callq	_avio_rl32
	subl	%eax, %ebx
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%ebx, 12(%r13)
	js	LBB0_19
## %bb.14:
	testl	%ebx, %ebx
	js	LBB0_19
## %bb.15:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_av_get_packet
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_4
## %bb.16:
	movl	16(%r13), %eax
	movl	%eax, (%r14)
	movl	%ecx, %edx
	addl	%eax, %edx
	movl	%edx, 16(%r13)
	jmp	LBB0_18
LBB0_17:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ecx
LBB0_18:
	xorl	%eax, %eax
	cmpl	$0, 8(%r13)
	sete	%al
	movl	%eax, 8(%r13)
	movl	%eax, 4(%r14)
	jmp	LBB0_4
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_20:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid audio/video offsets or chunk size\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_bfi_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfi_read_packet
_bfi_read_packet:                       ; @bfi_read_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x24, [x0, #8]
	ldr	x8, [x24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_avio_feof
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_9
; %bb.6:
	ldr	w2, [x24, #12]
	cmp	w2, #1
	b.lt	LBB0_17
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_4
; %bb.8:
	ldr	w8, [x24, #20]
	str	w8, [x19]
	ldr	w9, [x24, #12]
	sdiv	w9, w0, w9
	add	w8, w9, w8
	str	w8, [x24, #20]
	ldr	x8, [x24]
	sub	x8, x8, #1
	str	x8, [x24]
	b	LBB0_18
LBB0_9:
	mov	w0, #83
	mov	w1, #65
	mov	w2, #86
	mov	w3, #73
	bl	_MKTAG
	cbz	w0, LBB0_13
; %bb.10:
	mov	w22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_avio_feof
	cbnz	x0, LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	bl	_avio_r8
	add	w22, w0, w22, lsl #8
	mov	w0, #83
	mov	w1, #65
	mov	w2, #86
	mov	w3, #73
	bl	_MKTAG
	cmp	w22, w0
	b.ne	LBB0_11
LBB0_13:
	mov	x0, x20
	bl	_avio_rl32
	mov	x22, x0
	mov	x0, x20
	bl	_avio_rl32
	mov	x0, x20
	bl	_avio_rl32
	mov	x23, x0
	mov	x0, x20
	bl	_avio_rl32
	mov	x0, x20
	bl	_avio_rl32
	sub	w2, w0, w23
	sub	w8, w22, w0
	str	w8, [x24, #12]
	tbnz	w2, #31, LBB0_19
; %bb.14:
	tbnz	w8, #31, LBB0_19
; %bb.15:
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_4
; %bb.16:
	ldr	w8, [x24, #16]
	str	w8, [x19]
	add	w8, w8, w0
	str	w8, [x24, #16]
	b	LBB0_18
LBB0_17:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_18:
	ldr	w8, [x24, #8]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x24, #8]
	str	w8, [x19, #4]
	b	LBB0_4
LBB0_19:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_3
LBB0_20:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid audio/video offsets or chunk size\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_bfi_read_packet
.subsections_via_symbols
