	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_list_metafile          ## -- Begin function prepare_list_metafile
	.p2align	4, 0x90
_prepare_list_metafile:                 ## @prepare_list_metafile
	.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
	movl	%esi, %r14d
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	movq	_tot_metafiles_memory@GOTPCREL(%rip), %r12
	movq	_memory_for_metafiles@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	(%rbx), %rax
	jle	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_unload_LRU
	testq	%rax, %rax
	jne	LBB0_1
LBB0_3:
	movl	%r15d, %edi
	callq	_get_list_metafile
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	_Header@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	(%r15), %eax
	setl	%dil
	callq	_assert
	movl	(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	movq	_metafiles@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	%ebx, %r12d
	movq	(%rax,%r12,8), %rax
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.13:
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_14
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_6:
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	cmpq	$0, 16(%rax)
	je	LBB0_9
## %bb.8:
	movl	(%rax), %edi
	callq	_assert
	movl	%ebx, %edi
	incl	%edi
	callq	_get_metafile_offset
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_get_metafile_offset
	subl	%eax, %r15d
	movq	_tot_lost_aio_bytes@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	movl	%r15d, (%rax)
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	movq	(%r13), %rax
	movq	(%rax,%r12,8), %rax
	movl	$0, (%rax)
	movq	$0, 16(%rax)
LBB0_9:
	cmpq	$0, 16(%rax)
	jne	LBB0_15
## %bb.10:
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.11:
	movl	%ebx, %edi
	callq	_update_use
	movl	$1, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$4, %edi
	callq	_zmalloc0
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	(%r13), %rax
	movq	(%rax,%r12,8), %rax
	movq	$-1, 4(%rax)
LBB0_15:
	movl	$1, %esi
	testl	%r14d, %r14d
	jg	LBB0_17
## %bb.16:
	xorl	%esi, %esi
	cmpq	$0, 16(%rax)
	setne	%sil
LBB0_17:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_load_metafile_aio              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"preparing metafile...\n"

	.comm	_tot_metafiles_memory,8,3       ## @tot_metafiles_memory
	.comm	_memory_for_metafiles,8,3       ## @memory_for_metafiles
	.comm	_Header,4,2                     ## @Header
L_.str.1:                               ## @.str.1
	.asciz	"preparing metafile #%d of %d\n"

	.comm	_metafiles,8,3                  ## @metafiles
	.comm	_tot_lost_aio_bytes,4,2         ## @tot_lost_aio_bytes
L_.str.2:                               ## @.str.2
	.asciz	"skipping pending aio query. Total lost memory %lld\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_list_metafile          ; -- Begin function prepare_list_metafile
	.p2align	2
_prepare_list_metafile:                 ; @prepare_list_metafile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_vkprintf
Lloh2:
	adrp	x21, _tot_metafiles_memory@GOTPAGE
Lloh3:
	ldr	x21, [x21, _tot_metafiles_memory@GOTPAGEOFF]
Lloh4:
	adrp	x22, _memory_for_metafiles@GOTPAGE
Lloh5:
	ldr	x22, [x22, _memory_for_metafiles@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_unload_LRU
	cbnz	x0, LBB0_1
LBB0_3:
	mov	x0, x20
	bl	_get_list_metafile
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x20, x0
Lloh6:
	adrp	x21, _Header@GOTPAGE
Lloh7:
	ldr	x21, [x21, _Header@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	cset	w0, lt
	bl	_assert
	ldr	w8, [x21]
	stp	x20, x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_vkprintf
Lloh10:
	adrp	x22, _metafiles@GOTPAGE
Lloh11:
	ldr	x22, [x22, _metafiles@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w23, w20
	ldr	x8, [x8, w20, uxtw #3]
	tbnz	w19, #31, LBB0_7
; %bb.5:
	cbnz	x8, LBB0_10
	b	LBB0_14
LBB0_6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	cbz	x8, LBB0_14
; %bb.8:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w0, [x8]
	bl	_assert
	add	w0, w20, #1
	bl	_get_metafile_offset
	mov	x21, x0
	mov	x0, x20
	bl	_get_metafile_offset
Lloh12:
	adrp	x8, _tot_lost_aio_bytes@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tot_lost_aio_bytes@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w10, w21, w0
	add	w9, w9, w10
	str	w9, [x8]
	str	x9, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
	bl	_vkprintf
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	str	wzr, [x8]
	str	xzr, [x8, #16]
LBB0_10:
	ldr	x9, [x8, #16]
	cbnz	x9, LBB0_15
; %bb.11:
	ldr	w9, [x8]
	cbz	w9, LBB0_15
; %bb.12:
	mov	x0, x20
	bl	_update_use
	mov	w0, #1
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	w0, #4
	bl	_zmalloc0
	ldr	x8, [x22]
	lsl	x9, x23, #3
	str	x0, [x8, x9]
	ldr	x8, [x22]
	ldr	x8, [x8, x9]
	movi.2d	v0, #0xffffffffffffffff
	stur	d0, [x8, #4]
LBB0_15:
	cmp	w19, #0
	b.le	LBB0_17
; %bb.16:
	mov	w1, #1
	b	LBB0_18
LBB0_17:
	ldr	x8, [x8, #16]
	cmp	x8, #0
	cset	w1, ne
LBB0_18:
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_load_metafile_aio
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"preparing metafile...\n"

	.comm	_tot_metafiles_memory,8,3       ; @tot_metafiles_memory
	.comm	_memory_for_metafiles,8,3       ; @memory_for_metafiles
	.comm	_Header,4,2                     ; @Header
l_.str.1:                               ; @.str.1
	.asciz	"preparing metafile #%d of %d\n"

	.comm	_metafiles,8,3                  ; @metafiles
	.comm	_tot_lost_aio_bytes,4,2         ; @tot_lost_aio_bytes
l_.str.2:                               ; @.str.2
	.asciz	"skipping pending aio query. Total lost memory %lld\n"

.subsections_via_symbols
