	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cache_read
_cache_read:                            ## @cache_read
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)
	movl	56(%r15), %edi
	movq	_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rcx
	movq	%r15, %rsi
	callq	_av_tree_find
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	-64(%rbp), %rbx
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.3:
	movq	(%r15), %r13
	xorl	%edi, %edi
	subq	(%rbx), %r13
	setge	%dil
	callq	_av_assert0
	cmpq	8(%rbx), %r13
	jge	LBB0_9
## %bb.4:
	movq	16(%rbx), %rax
	addq	%r13, %rax
	cmpq	%rax, 8(%r15)
	je	LBB0_6
## %bb.5:
	movl	52(%r15), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rsi
	callq	_lseek
LBB0_6:
	testq	%rax, %rax
	js	LBB0_9
## %bb.7:
	movq	%rax, 8(%r15)
	movl	52(%r15), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rsi
	subq	%r13, %rsi
	movl	%r12d, %edi
	callq	_FFMIN
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_read
	testq	%rax, %rax
	jle	LBB0_9
## %bb.8:
	movq	%rax, %r13
	movdqu	(%r15), %xmm0
	movq	%rax, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, (%r15)
	incl	48(%r15)
	jmp	LBB0_18
LBB0_9:
	movq	(%r15), %rsi
	cmpq	16(%r15), %rsi
	je	LBB0_13
## %bb.10:
	movl	44(%r15), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ffurl_seek
	movq	%rax, %r13
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	%r13, 16(%r15)
LBB0_13:
	movl	44(%r15), %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_ffurl_read
	movq	%rax, %r13
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.14:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_16
## %bb.15:
	movl	$1, 24(%r15)
	movq	32(%r15), %rax
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	setge	%dil
	callq	_av_assert0
LBB0_16:
	testq	%r13, %r13
	jle	LBB0_18
## %bb.17:
	addq	%r13, 16(%r15)
	incl	40(%r15)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_add_entry
	movq	(%r15), %rsi
	addq	%r13, %rsi
	movq	%rsi, (%r15)
	movq	32(%r15), %rdi
	callq	_FFMAX
	movq	%rax, 32(%r15)
	jmp	LBB0_18
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_cmp,4,2                        ## @cmp
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to perform internal seek\n"

	.comm	_AVERROR_EOF,8,3                ## @AVERROR_EOF
	.no_dead_strip	_cache_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cache_read
_cache_read:                            ; @cache_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x19, [x0]
	stp	xzr, xzr, [sp, #8]
	ldr	w0, [x19, #56]
Lloh3:
	adrp	x8, _cmp@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cmp@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x1, x19
	bl	_av_tree_find
	ldr	x8, [sp, #8]
	cmp	x0, #0
	csel	x24, x8, x0, eq
	cbz	x24, LBB0_7
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x24]
	subs	x25, x8, x9
	cset	w0, ge
	bl	_av_assert0
	ldr	x8, [x24, #8]
	cmp	x25, x8
	b.ge	LBB0_7
; %bb.2:
	ldr	x8, [x24, #16]
	ldr	x9, [x19, #8]
	add	x1, x8, x25
	cmp	x9, x1
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #52]
Lloh6:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_lseek
	mov	x1, x0
LBB0_4:
	tbnz	x1, #63, LBB0_7
; %bb.5:
	str	x1, [x19, #8]
	ldr	w23, [x19, #52]
	ldr	x8, [x24, #8]
	sub	x1, x8, x25
	mov	x0, x22
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x23
	mov	x1, x21
	bl	_read
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x23, x0
	dup.2d	v0, x0
	ldr	q1, [x19]
	add.2d	v0, v1, v0
	str	q0, [x19]
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	str	w8, [x19, #48]
	b	LBB0_16
LBB0_7:
	ldr	x1, [x19]
	ldr	x8, [x19, #16]
	cmp	x1, x8
	b.eq	LBB0_10
; %bb.8:
	ldr	w0, [x19, #44]
Lloh9:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_ffurl_seek
	mov	x23, x0
	tbnz	x0, #63, LBB0_15
; %bb.9:
	str	x23, [x19, #16]
LBB0_10:
	ldr	w0, [x19, #44]
	mov	x1, x21
	mov	x2, x22
	bl	_ffurl_read
	mov	x23, x0
	cmp	w22, #1
	b.lt	LBB0_13
; %bb.11:
Lloh12:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x23, x8
	b.ne	LBB0_13
; %bb.12:
	mov	w8, #1
	str	w8, [x19, #24]
	ldr	x8, [x19, #32]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, ge
	bl	_av_assert0
LBB0_13:
	cmp	x23, #1
	b.lt	LBB0_16
; %bb.14:
	ldr	x8, [x19, #16]
	add	x8, x8, x23
	str	x8, [x19, #16]
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_add_entry
	ldr	x8, [x19]
	add	x1, x8, x23
	str	x1, [x19]
	ldr	x0, [x19, #32]
	bl	_FFMAX
	str	x0, [x19, #32]
	b	LBB0_16
LBB0_15:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_16:
	ldr	x8, [sp, #24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_cmp,4,2                        ; @cmp
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to perform internal seek\n"

	.comm	_AVERROR_EOF,8,3                ; @AVERROR_EOF
	.no_dead_strip	_cache_read
.subsections_via_symbols
