	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_metafile_aio
_load_metafile_aio:                     ## @load_metafile_aio
	.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
	testl	%ebx, %ebx
	setns	%al
	movq	_large_users_number@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_large_metafiles@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%ebx, %r15
	movq	%r15, %rbx
	shlq	$4, %rbx
	movl	(%rax,%rbx), %edi
	callq	_assert
	movq	(%r14), %r13
	movq	_large_users@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	12(%rax,%r15,8), %r12
	movslq	4(%rax,%r15,8), %rcx
	subq	%rcx, %r12
	shlq	$3, %r12
	movq	_index_large_data_offset@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	leaq	(%rdx,%rcx,8), %r14
	movq	_verbosity@GOTPCREL(%rip), %rcx
	cmpl	$2, (%rcx)
	jl	LBB0_2
## %bb.1:
	movl	(%rax,%r15,8), %ecx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movq	%r12, %r8
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r13), %r15
	leaq	(%rbx,%r13), %r14
	addq	$8, %r14
	movq	8(%r13,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.3:
	callq	_check_aio_completion
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	movq	_verbosity@GOTPCREL(%rip), %rbx
	jne	LBB0_15
## %bb.4:
	cmpl	$0, (%r15)
	je	LBB0_5
## %bb.16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_verbosity@GOTPCREL(%rip), %rbx
	cmpl	$4, (%rbx)
	jl	LBB0_12
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	cmpl	$4, (%rbx)
	jl	LBB0_12
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_12:
	movl	(%r15), %edi
	callq	_assert
	movq	_idx_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movq	_ct_metafile_aio@GOTPCREL(%rip), %r8
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	%r15, %r9
	callq	_create_aio_read_connection
	movq	%rax, (%r14)
	cmpl	$4, (%rbx)
	jl	LBB0_14
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
LBB0_14:
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	(%r14), %rdi
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WaitAioArrAdd                  ## TAILCALL
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_metafile_alloc
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_free_by_LRU
	movl	%eax, %edi
	callq	_assert
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_large_users_number,4,2         ## @large_users_number
	.comm	_large_metafiles,8,3            ## @large_metafiles
	.comm	_large_users,8,3                ## @large_users
	.comm	_index_large_data_offset,4,2    ## @index_large_data_offset
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loading metafile %d for user %d (%ld bytes at position %lld) 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	"AIO query creating...\n"

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

	.no_dead_strip	_load_metafile_aio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_metafile_aio
_load_metafile_aio:                     ; @load_metafile_aio
	.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, x0
	bl	_WaitAioArrClear
	cmp	w22, #0
Lloh0:
	adrp	x8, _large_users_number@GOTPAGE
Lloh1:
	ldr	x8, [x8, _large_users_number@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w22, #4, ge
	cset	w0, gt
	bl	_assert
Lloh3:
	adrp	x19, _large_metafiles@GOTPAGE
Lloh4:
	ldr	x19, [x19, _large_metafiles@GOTPAGEOFF]
	ldr	x8, [x19]
	sxtw	x24, w22
	sbfiz	x20, x22, #4, #32
	ldr	w0, [x8, x20]
	bl	_assert
	ldr	x25, [x19]
	add	x19, x25, x20
Lloh5:
	adrp	x8, _large_users@GOTPAGE
Lloh6:
	ldr	x8, [x8, _large_users@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x9, x8, w22, sxtw #3
	ldr	w10, [x9, #12]
	ldrsw	x9, [x9, #4]
	sub	w10, w10, w9
	sbfiz	x20, x10, #3, #32
Lloh8:
	adrp	x10, _index_large_data_offset@GOTPAGE
Lloh9:
	ldr	x10, [x10, _index_large_data_offset@GOTPAGEOFF]
Lloh10:
	ldrsw	x10, [x10]
	add	x21, x10, x9, lsl #3
Lloh11:
	adrp	x23, _verbosity@GOTPAGE
Lloh12:
	ldr	x23, [x23, _verbosity@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, #2
	b.lt	LBB0_2
; %bb.1:
	lsl	x9, x24, #3
Lloh13:
	adrp	x10, _stderr@GOTPAGE
Lloh14:
	ldr	x10, [x10, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x10]
	ldr	w8, [x8, x9]
	stp	x20, x21, [sp, #16]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	stp	x22, x8, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	add	x22, x25, x24, lsl #4
	ldr	x0, [x22, #8]!
	cbz	x0, LBB0_6
; %bb.3:
	bl	_check_aio_completion
	ldr	x0, [x22]
	cbnz	x0, LBB0_13
; %bb.4:
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.5:
	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_6:
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_10
; %bb.7:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_8:
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_10
; %bb.9:
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
	bl	_fprintf
LBB0_10:
	ldr	w0, [x19]
	bl	_assert
Lloh28:
	adrp	x8, _idx_fd@GOTPAGE
Lloh29:
	ldr	x8, [x8, _idx_fd@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh31:
	adrp	x4, _ct_metafile_aio@GOTPAGE
Lloh32:
	ldr	x4, [x4, _ct_metafile_aio@GOTPAGEOFF]
	mov	x2, x21
	mov	x3, x20
	mov	x5, x19
	bl	_create_aio_read_connection
	str	x0, [x22]
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_12
; %bb.11:
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	x0, [x22]
LBB0_12:
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x0, [x22]
LBB0_13:
	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
	b	_WaitAioArrAdd
LBB0_14:
Lloh38:
	adrp	x8, _stderr@GOTPAGE
Lloh39:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_metafile_alloc
	str	w0, [x19]
	cbnz	w0, LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	bl	_free_by_LRU
	bl	_assert
	b	LBB0_15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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 AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_large_users_number,4,2         ; @large_users_number
	.comm	_large_metafiles,8,3            ; @large_metafiles
	.comm	_large_users,8,3                ; @large_users
	.comm	_index_large_data_offset,4,2    ; @index_large_data_offset
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loading metafile %d for user %d (%ld bytes at position %lld) 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	"AIO query creating...\n"

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

	.no_dead_strip	_load_metafile_aio
.subsections_via_symbols
