	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_io_cache          ## -- Begin function vc_container_io_cache
	.p2align	4, 0x90
_vc_container_io_cache:                 ## @vc_container_io_cache
	.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	16(%rdi), %r15
	movq	(%r15), %rax
	movq	_MAX_NUM_CACHED_AREAS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_15
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	24(%r15), %r13
	movq	24(%rdi), %rcx
	imulq	$88, %rax, %rbx
	movq	%rcx, 80(%r13,%rbx)
	leaq	(%rcx,%rsi), %rax
	movq	%rax, 56(%r13,%rbx)
	movq	%rcx, 64(%r13,%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r13,%rbx)
	movq	%rdi, 72(%r13,%rbx)
	movl	(%rdi), %eax
	movq	_VC_CONTAINER_IO_CAPS_CANT_SEEK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_MEM_CACHE_AREA_READ_MAX_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	jmp	LBB0_5
LBB0_4:
	movq	_VC_CONTAINER_IO_CAPS_SEEK_SLOW@GOTPCREL(%rip), %rcx
	movq	_MEM_CACHE_AREA_READ_MAX_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	cmpq	%r14, %rdi
	movq	_MEM_CACHE_READ_MAX_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmovbq	%rdx, %rdi
	testl	%eax, (%rcx)
	cmoveq	%rdx, %rdi
LBB0_5:
	movq	%rdi, 16(%r13,%rbx)
	cmpq	%r14, %rdi
	cmovaeq	%r14, %rdi
	movq	%rdi, 24(%r13,%rbx)
	callq	_malloc
	movq	%rax, 32(%r13,%rbx)
	movq	%rax, 40(%r13,%rbx)
	movq	24(%r13,%rbx), %rdx
	leaq	(%rdx,%rax), %rcx
	movq	%rcx, 48(%r13,%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	incq	(%r15)
	leaq	(%rbx,%r13), %rsi
	addq	$8, %rsi
	movq	16(%r12), %rcx
	movq	16(%rcx), %r15
	testq	%r15, %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.7:
	movq	8(%r15), %rcx
	subq	(%r15), %rcx
	jle	LBB0_9
## %bb.8:
	leaq	(%rbx,%r13), %rdi
	addq	$24, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rdx, %rcx
	cmovbq	%rcx, %rdx
	movq	%rdx, (%rsi)
	movq	(%r15), %rsi
	addq	40(%r15), %rsi
	movq	%rax, %rdi
	callq	_memcpy
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	addq	%rax, (%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
LBB0_9:
	leaq	(%rbx,%r13), %r15
	addq	$56, %r15
	movq	(%rsi), %rsi
	subq	%rsi, %rdx
	jbe	LBB0_11
## %bb.10:
	addq	%r13, %rbx
	addq	$64, %rbx
	movq	8(%rbx), %rdi
	addq	-24(%rbx), %rsi
	callq	*8(%rdi)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	(%rcx), %rax
	movq	%rax, (%rcx)
	addq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	16(%rcx), %rcx
	movq	%rax, 8(%rcx)
LBB0_11:
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_vc_container_io_seek
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.12:
	movq	_VC_CONTAINER_IO_CAPS_CANT_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_16
## %bb.13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	jmp	LBB0_16
LBB0_15:
	xorl	%r14d, %r14d
LBB0_16:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NUM_CACHED_AREAS,8,3       ## @MAX_NUM_CACHED_AREAS
	.comm	_VC_CONTAINER_IO_CAPS_CANT_SEEK,4,2 ## @VC_CONTAINER_IO_CAPS_CANT_SEEK
	.comm	_MEM_CACHE_AREA_READ_MAX_SIZE,8,3 ## @MEM_CACHE_AREA_READ_MAX_SIZE
	.comm	_VC_CONTAINER_IO_CAPS_SEEK_SLOW,4,2 ## @VC_CONTAINER_IO_CAPS_SEEK_SLOW
	.comm	_MEM_CACHE_READ_MAX_SIZE,8,3    ## @MEM_CACHE_READ_MAX_SIZE
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_io_cache          ; -- Begin function vc_container_io_cache
	.p2align	2
_vc_container_io_cache:                 ; @vc_container_io_cache
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x26, [x0, #16]
	ldr	x8, [x26]
Lloh0:
	adrp	x9, _MAX_NUM_CACHED_AREAS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_NUM_CACHED_AREAS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x9, [x26, #24]
	ldr	x10, [x0, #24]
	mov	w11, #88
	madd	x11, x8, x11, x9
	str	x10, [x11, #80]
	add	x12, x10, x1
	mov	x24, x11
	mov	x21, x11
	mov	x25, x11
	mov	x23, x11
	str	x12, [x23, #56]!
	str	x10, [x24, #64]!
	str	xzr, [x21, #8]!
	str	x0, [x25, #72]!
	str	xzr, [x11]
	ldr	w10, [x0]
Lloh3:
	adrp	x22, _VC_CONTAINER_IO_CAPS_CANT_SEEK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _VC_CONTAINER_IO_CAPS_CANT_SEEK@GOTPAGEOFF]
	ldr	w11, [x22]
	tst	w11, w10
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x10, _MEM_CACHE_AREA_READ_MAX_SIZE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MEM_CACHE_AREA_READ_MAX_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x11, _VC_CONTAINER_IO_CAPS_SEEK_SLOW@GOTPAGE
Lloh9:
	ldr	x11, [x11, _VC_CONTAINER_IO_CAPS_SEEK_SLOW@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh11:
	adrp	x11, _MEM_CACHE_AREA_READ_MAX_SIZE@GOTPAGE
Lloh12:
	ldr	x11, [x11, _MEM_CACHE_AREA_READ_MAX_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x11, x19
	ccmp	w10, #0, #4, hs
Lloh14:
	adrp	x10, _MEM_CACHE_READ_MAX_SIZE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MEM_CACHE_READ_MAX_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	csel	x10, x10, x11, eq
LBB0_4:
	mov	w11, #88
	madd	x27, x8, x11, x9
	str	x10, [x27, #16]
	cmp	x10, x19
	csel	x0, x10, x19, lo
	mov	x28, x27
	str	x0, [x28, #24]!
	bl	_malloc
	str	x0, [x27, #40]!
	stur	x0, [x27, #-8]
	ldr	x8, [x28]
	add	x9, x8, x0
	str	x9, [x27, #8]
	cbz	x0, LBB0_13
; %bb.5:
	ldr	x9, [x26]
	add	x9, x9, #1
	str	x9, [x26]
	ldr	x9, [x20, #16]
	ldr	x26, [x9, #16]
	cbz	x26, LBB0_8
; %bb.6:
	ldp	x9, x10, [x26]
	subs	x9, x10, x9
	b.le	LBB0_8
; %bb.7:
	cmp	x9, x8
	csel	x2, x9, x8, lo
	str	x2, [x21]
	ldr	x8, [x26, #40]
	ldr	x9, [x26]
	add	x1, x9, x8
	bl	_memcpy
	ldr	x8, [x21]
	ldr	x9, [x26]
	add	x8, x9, x8
	str	x8, [x26]
	ldr	x8, [x28]
LBB0_8:
	ldr	x9, [x21]
	subs	x2, x8, x9
	b.ls	LBB0_10
; %bb.9:
	ldr	x0, [x25]
	ldr	x8, [x0, #8]
	ldr	x10, [x27]
	add	x1, x10, x9
	blr	x8
	ldr	x8, [x21]
	ldr	x9, [x24]
	add	x8, x8, x0
	add	x9, x9, x8
	str	x8, [x21]
	ldr	x8, [x25]
	ldr	x8, [x8, #16]
	str	x9, [x8, #8]
LBB0_10:
	ldr	x1, [x23]
	mov	x0, x20
	bl	_vc_container_io_seek
Lloh17:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.11:
	ldr	w8, [x20]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
	ldr	x19, [x21]
	b	LBB0_14
LBB0_13:
	mov	x19, #0
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NUM_CACHED_AREAS,8,3       ; @MAX_NUM_CACHED_AREAS
	.comm	_VC_CONTAINER_IO_CAPS_CANT_SEEK,4,2 ; @VC_CONTAINER_IO_CAPS_CANT_SEEK
	.comm	_MEM_CACHE_AREA_READ_MAX_SIZE,8,3 ; @MEM_CACHE_AREA_READ_MAX_SIZE
	.comm	_VC_CONTAINER_IO_CAPS_SEEK_SLOW,4,2 ; @VC_CONTAINER_IO_CAPS_SEEK_SLOW
	.comm	_MEM_CACHE_READ_MAX_SIZE,8,3    ; @MEM_CACHE_READ_MAX_SIZE
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
.subsections_via_symbols
