	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_metafile                  ## -- Begin function load_metafile
	.p2align	4, 0x90
_load_metafile:                         ## @load_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	%edi, %ebx
	xorl	%eax, %eax
	callq	_WaitAioArrClear
	movq	_metafile_number@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%ebx, (%rax)
	setg	%dil
	callq	_assert
	movq	_metafiles@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%ebx, %r12
	shlq	$5, %r12
	movq	_verbosity@GOTPCREL(%rip), %r15
	cmpl	$3, (%r15)
	jl	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	leaq	(%r12,%r13), %r14
	leaq	(%r12,%r13), %rbx
	addq	$16, %rbx
	movq	16(%r13,%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	callq	_check_aio_completion
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_18
## %bb.4:
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$4, (%r15)
	jl	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	cmpq	$0, (%r14)
	je	LBB0_9
LBB0_19:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	cmpq	$0, (%r14)
	jne	LBB0_19
LBB0_9:
	xorl	%eax, %eax
	callq	_free_metafiles
	leaq	(%r12,%r13), %r15
	addq	$24, %r15
	movq	24(%r13,%r12), %rax
	movl	(%rax), %edi
	callq	_zzmalloc
	movq	%rax, 8(%r13,%r12)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %r13
	movq	_stderr@GOTPCREL(%rip), %r12
	leaq	L_.str.4(%rip), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	(%r15), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_zzmalloc
	movq	%rax, -16(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%r13, %rbx
LBB0_13:
	movq	(%r15), %rcx
	movslq	4(%rcx), %rdx
	leaq	(%rax,%rdx,8), %rdx
	movq	%rdx, (%r14)
	movl	(%rcx), %edx
	movq	_allocated_metafile_bytes@GOTPCREL(%rip), %rsi
	addl	%edx, (%rsi)
	movq	_verbosity@GOTPCREL(%rip), %r12
	cmpl	$3, (%r12)
	jle	LBB0_15
## %bb.14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	-16(%r15), %rax
	movq	(%r15), %rcx
LBB0_15:
	movq	_idx_fd@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movq	8(%rcx), %rdx
	addq	16(%rcx), %rdx
	movl	(%rcx), %ecx
	movq	_ct_metafile_aio@GOTPCREL(%rip), %r8
	movq	%rax, %rsi
	movq	%r14, %r9
	callq	_create_aio_read_connection
	movq	%rax, (%rbx)
	cmpl	$4, (%r12)
	jl	LBB0_17
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%rbx), %rax
LBB0_17:
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	(%rbx), %rdi
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WaitAioArrAdd                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_metafile_number,4,2            ## @metafile_number
	.comm	_metafiles,8,3                  ## @metafiles
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loading metafile %d in aio mode\n"

L_.str.1:                               ## @.str.1
	.asciz	"Previous AIO query failed at %p, scheduling a new one\n"

L_.str.2:                               ## @.str.2
	.asciz	"No previous aio found for this metafile\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error: memory leak at load_metafile.\n"

L_.str.4:                               ## @.str.4
	.asciz	"no space to load metafile - cannot allocate %d bytes\n"

	.comm	_allocated_metafile_bytes,4,2   ## @allocated_metafile_bytes
L_.str.5:                               ## @.str.5
	.asciz	"AIO query creating...\n"

	.comm	_idx_fd,4,2                     ## @idx_fd
	.comm	_ct_metafile_aio,4,2            ## @ct_metafile_aio
L_.str.6:                               ## @.str.6
	.asciz	"AIO query created\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_metafile                  ; -- Begin function load_metafile
	.p2align	2
_load_metafile:                         ; @load_metafile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
	bl	_WaitAioArrClear
Lloh0:
	adrp	x8, _metafile_number@GOTPAGE
Lloh1:
	ldr	x8, [x8, _metafile_number@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, gt
	bl	_assert
Lloh3:
	adrp	x8, _metafiles@GOTPAGE
Lloh4:
	ldr	x8, [x8, _metafiles@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	sxtw	x24, w20
	add	x19, x23, x24, lsl #5
Lloh6:
	adrp	x22, _verbosity@GOTPAGE
Lloh7:
	ldr	x22, [x22, _verbosity@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	mov	x21, x19
	ldr	x0, [x21, #16]!
	cbz	x0, LBB0_6
; %bb.3:
	bl	_check_aio_completion
	ldr	x0, [x21]
	cbnz	x0, LBB0_21
; %bb.4:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	w8, [x22]
	cmp	w8, #4
	b.lt	LBB0_10
; %bb.7:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	bl	_fprintf
LBB0_10:
	ldr	x8, [x19]
	cbz	x8, LBB0_12
; %bb.11:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	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
	add	sp, sp, #96
	b	_fprintf
LBB0_12:
	bl	_free_metafiles
	add	x24, x23, x24, lsl #5
	mov	x23, x24
	ldr	x8, [x23, #24]!
	ldr	w0, [x8]
	bl	_zzmalloc
	mov	x1, x0
	str	x0, [x24, #8]!
	cbnz	x0, LBB0_16
; %bb.13:
Lloh28:
	adrp	x25, _stderr@GOTPAGE
Lloh29:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
Lloh30:
	adrp	x20, l_.str.4@PAGE
Lloh31:
	add	x20, x20, l_.str.4@PAGEOFF
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	x8, [x23]
	ldr	w8, [x8]
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_zzmalloc
	str	x0, [x24]
	cbz	x0, LBB0_14
; %bb.15:
	mov	x1, x0
LBB0_16:
	ldr	x8, [x23]
	ldp	w10, w9, [x8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x9, x1, x9, lsl #3
Lloh32:
	adrp	x11, _allocated_metafile_bytes@GOTPAGE
Lloh33:
	ldr	x11, [x11, _allocated_metafile_bytes@GOTPAGEOFF]
	str	x9, [x19]
	ldr	w9, [x11]
	add	w9, w9, w10
	str	w9, [x11]
	ldr	w9, [x22]
	cmp	w9, #3
	b.le	LBB0_18
; %bb.17:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	ldr	x1, [x24]
	ldr	x8, [x23]
LBB0_18:
Lloh39:
	adrp	x9, _idx_fd@GOTPAGE
Lloh40:
	ldr	x9, [x9, _idx_fd@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x9]
	ldp	x10, x9, [x8, #8]
	add	x2, x10, x9
	ldr	w3, [x8]
Lloh42:
	adrp	x4, _ct_metafile_aio@GOTPAGE
Lloh43:
	ldr	x4, [x4, _ct_metafile_aio@GOTPAGEOFF]
	mov	x5, x19
	bl	_create_aio_read_connection
	str	x0, [x21]
	ldr	w8, [x22]
	cmp	w8, #4
	b.lt	LBB0_20
; %bb.19:
Lloh44:
	adrp	x8, _stderr@GOTPAGE
Lloh45:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	ldr	x0, [x21]
LBB0_20:
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x0, [x21]
LBB0_21:
	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
	add	sp, sp, #96
	b	_WaitAioArrAdd
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_metafile_number,4,2            ; @metafile_number
	.comm	_metafiles,8,3                  ; @metafiles
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loading metafile %d in aio mode\n"

l_.str.1:                               ; @.str.1
	.asciz	"Previous AIO query failed at %p, scheduling a new one\n"

l_.str.2:                               ; @.str.2
	.asciz	"No previous aio found for this metafile\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error: memory leak at load_metafile.\n"

l_.str.4:                               ; @.str.4
	.asciz	"no space to load metafile - cannot allocate %d bytes\n"

	.comm	_allocated_metafile_bytes,4,2   ; @allocated_metafile_bytes
l_.str.5:                               ; @.str.5
	.asciz	"AIO query creating...\n"

	.comm	_idx_fd,4,2                     ; @idx_fd
	.comm	_ct_metafile_aio,4,2            ; @ct_metafile_aio
l_.str.6:                               ; @.str.6
	.asciz	"AIO query created\n"

.subsections_via_symbols
