	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_onload_ad_metafile             ## -- Begin function onload_ad_metafile
	.p2align	4, 0x90
_onload_ad_metafile:                    ## @onload_ad_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
	movq	%rdi, %rbx
	movq	_verbosity@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	jle	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	%r14d, %rcx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	movq	(%rbx), %rax
	movq	8(%rbx), %r15
	movq	32(%r15), %r12
	movq	_ct_aio@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	%r15, 8(%r12)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	%rbx, 24(%r15)
	sete	%dil
	callq	_assert
	cmpl	%r14d, (%r15)
	jle	LBB0_6
## %bb.3:
	movq	_aio_read_errors@GOTPCREL(%rip), %rax
	incl	(%rax)
	cmpq	$0, (%r13)
	js	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	8(%r15), %rcx
	movq	_active_aio_queries@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r15), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_fprintf
LBB0_5:
	movslq	(%r15), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	$0, 24(%r15)
	cmpq	$0, (%r13)
	jle	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	8(%r15), %rcx
	movslq	16(%r15), %r9
	movl	(%r9), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %r8d
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movl	16(%r15), %eax
	movq	_RBuff@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	addl	(%r15), %eax
	movq	_RBuffEnd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_idx_bytes@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	8(%r15), %rdi
	movslq	(%r15), %rax
	addq	%rdi, %rax
	movq	%rax, (%r13)
	callq	_idx_fake_readpos
	movl	(%r12), %edi
	movslq	(%r15), %rdx
	movl	$1, %r14d
	movl	$1, %esi
	callq	_idx_read_ad
	xorl	%eax, %eax
	callq	_idx_check_crc
	movq	_idx_metafile_pos@GOTPCREL(%rip), %rax
	movslq	(%r15), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, (%rax)
	sete	%dil
	callq	_assert
	movq	%rbx, (%r13)
	movq	_RBuff@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_RBuffEnd@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ADF_ANCIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r12)
	movq	_ancient_ads_pending@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	_ancient_ads_aio_loaded@GOTPCREL(%rip), %rax
	incl	(%rax)
	movslq	(%r15), %rax
	movq	_ancient_ads_aio_loaded_bytes@GOTPCREL(%rip), %rcx
	addq	%rax, (%rcx)
LBB0_9:
	movq	_allocated_metafile_bytes@GOTPCREL(%rip), %rcx
	subq	%rax, (%rcx)
	movq	_allocated_metafiles@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	$0, 24(%r15)
	movq	%r15, %rdi
	callq	_free
	movq	$0, 8(%r12)
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"onload_ad_metafile(%p,%d)\n"

	.comm	_ct_aio,8,3                     ## @ct_aio
	.comm	_aio_read_errors,4,2            ## @aio_read_errors
L_.str.1:                               ## @.str.1
	.asciz	"ERROR reading ad %d data from index at position %lld [pending aio queries: %lld]: read %d bytes out of %d: %m\n"

	.comm	_active_aio_queries,4,2         ## @active_aio_queries
	.comm	_allocated_metafile_bytes,8,3   ## @allocated_metafile_bytes
	.comm	_allocated_metafiles,4,2        ## @allocated_metafiles
L_.str.2:                               ## @.str.2
	.asciz	"*** Read ad %d data from index at position %lld: read %d bytes at address %p, magic %08x\n"

	.comm	_RBuff,4,2                      ## @RBuff
	.comm	_RBuffEnd,4,2                   ## @RBuffEnd
	.comm	_idx_bytes,8,3                  ## @idx_bytes
	.comm	_idx_metafile_pos,8,3           ## @idx_metafile_pos
	.comm	_ADF_ANCIENT,4,2                ## @ADF_ANCIENT
	.comm	_ancient_ads_pending,4,2        ## @ancient_ads_pending
	.comm	_ancient_ads_aio_loaded,4,2     ## @ancient_ads_aio_loaded
	.comm	_ancient_ads_aio_loaded_bytes,8,3 ## @ancient_ads_aio_loaded_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_onload_ad_metafile             ; -- Begin function onload_ad_metafile
	.p2align	2
_onload_ad_metafile:                    ; @onload_ad_metafile
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _verbosity@GOTPAGE
Lloh1:
	ldr	x23, [x23, _verbosity@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	sxtw	x3, w20
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fprintf
LBB0_2:
	ldp	x8, x19, [x21]
	ldr	x22, [x19, #32]
Lloh7:
	adrp	x9, _ct_aio@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ct_aio@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x22, #8]
	cmp	x8, x19
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #24]
	cmp	x8, x21
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19]
	cmp	w8, w20
	b.le	LBB0_6
; %bb.3:
Lloh10:
	adrp	x8, _aio_read_errors@GOTPAGE
Lloh11:
	ldr	x8, [x8, _aio_read_errors@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x8, [x23]
	tbnz	x8, #63, LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x22]
	ldr	x3, [x19, #8]
Lloh15:
	adrp	x8, _active_aio_queries@GOTPAGE
Lloh16:
	ldr	x8, [x8, _active_aio_queries@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x20, x9, [sp, #8]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_5:
	mov	w20, #0
	ldrsw	x8, [x19]
	b	LBB0_9
LBB0_6:
	str	xzr, [x19, #24]
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w2, [x22]
	ldr	x3, [x19, #8]
	ldrsw	x8, [x19, #16]
	ldr	w9, [x8]
	stp	x8, x9, [sp, #8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_8:
	ldr	w8, [x19, #16]
Lloh25:
	adrp	x21, _RBuff@GOTPAGE
Lloh26:
	ldr	x21, [x21, _RBuff@GOTPAGEOFF]
	str	w8, [x21]
	ldr	w9, [x19]
	add	w8, w9, w8
Lloh27:
	adrp	x23, _RBuffEnd@GOTPAGE
Lloh28:
	ldr	x23, [x23, _RBuffEnd@GOTPAGEOFF]
Lloh29:
	adrp	x24, _idx_bytes@GOTPAGE
Lloh30:
	ldr	x24, [x24, _idx_bytes@GOTPAGEOFF]
	str	w8, [x23]
	ldr	x25, [x24]
	ldr	x0, [x19, #8]
	ldrsw	x8, [x19]
	add	x8, x0, x8
	str	x8, [x24]
	bl	_idx_fake_readpos
	ldr	w0, [x22]
	ldrsw	x2, [x19]
	mov	w20, #1
	mov	w1, #1
	bl	_idx_read_ad
	bl	_idx_check_crc
Lloh31:
	adrp	x8, _idx_metafile_pos@GOTPAGE
Lloh32:
	ldr	x8, [x8, _idx_metafile_pos@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldrsw	x9, [x19]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	str	x25, [x24]
	str	wzr, [x21]
	str	wzr, [x23]
Lloh34:
	adrp	x8, _ADF_ANCIENT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ADF_ANCIENT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	w9, [x22, #16]
	bic	w8, w9, w8
	str	w8, [x22, #16]
Lloh37:
	adrp	x8, _ancient_ads_pending@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ancient_ads_pending@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh39:
	adrp	x8, _ancient_ads_aio_loaded@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ancient_ads_aio_loaded@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldrsw	x8, [x19]
Lloh41:
	adrp	x9, _ancient_ads_aio_loaded_bytes@GOTPAGE
Lloh42:
	ldr	x9, [x9, _ancient_ads_aio_loaded_bytes@GOTPAGEOFF]
	ldr	x10, [x9]
	add	x10, x10, x8
	str	x10, [x9]
LBB0_9:
Lloh43:
	adrp	x9, _allocated_metafile_bytes@GOTPAGE
Lloh44:
	ldr	x9, [x9, _allocated_metafile_bytes@GOTPAGEOFF]
	ldr	x10, [x9]
	sub	x8, x10, x8
	str	x8, [x9]
Lloh45:
	adrp	x8, _allocated_metafiles@GOTPAGE
Lloh46:
	ldr	x8, [x8, _allocated_metafiles@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_free
	str	xzr, [x22, #8]
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"onload_ad_metafile(%p,%d)\n"

	.comm	_ct_aio,8,3                     ; @ct_aio
	.comm	_aio_read_errors,4,2            ; @aio_read_errors
l_.str.1:                               ; @.str.1
	.asciz	"ERROR reading ad %d data from index at position %lld [pending aio queries: %lld]: read %d bytes out of %d: %m\n"

	.comm	_active_aio_queries,4,2         ; @active_aio_queries
	.comm	_allocated_metafile_bytes,8,3   ; @allocated_metafile_bytes
	.comm	_allocated_metafiles,4,2        ; @allocated_metafiles
l_.str.2:                               ; @.str.2
	.asciz	"*** Read ad %d data from index at position %lld: read %d bytes at address %p, magic %08x\n"

	.comm	_RBuff,4,2                      ; @RBuff
	.comm	_RBuffEnd,4,2                   ; @RBuffEnd
	.comm	_idx_bytes,8,3                  ; @idx_bytes
	.comm	_idx_metafile_pos,8,3           ; @idx_metafile_pos
	.comm	_ADF_ANCIENT,4,2                ; @ADF_ANCIENT
	.comm	_ancient_ads_pending,4,2        ; @ancient_ads_pending
	.comm	_ancient_ads_aio_loaded,4,2     ; @ancient_ads_aio_loaded
	.comm	_ancient_ads_aio_loaded_bytes,8,3 ; @ancient_ads_aio_loaded_bytes
.subsections_via_symbols
