	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_metafile_unload                ## -- Begin function metafile_unload
	.p2align	4, 0x90
_metafile_unload:                       ## @metafile_unload
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	testl	%edi, %edi
	setns	%al
	movq	_MAX_METAFILES@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_fprintf
LBB0_2:
	movq	_metafiles@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movslq	%r14d, %rbx
	shlq	$5, %rbx
	movl	$-1, %eax
	cmpq	$0, (%r15,%rbx)
	je	LBB0_5
## %bb.3:
	cmpq	$0, 24(%r15,%rbx)
	jne	LBB0_5
## %bb.4:
	leaq	(%r15,%rbx), %r12
	movq	8(%r15,%rbx), %rax
	movq	16(%r15,%rbx), %rdi
	movq	(%rax), %rsi
	callq	_zzfree
	movq	$0, (%r12)
	movq	$0, 16(%r15,%rbx)
	movq	_metafiles_loaded@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	8(%r15,%rbx), %rax
	movl	(%rax), %eax
	movq	_allocated_metafile_bytes@GOTPCREL(%rip), %rcx
	subl	%eax, (%rcx)
	movl	%r14d, %edi
	callq	_del_use
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_METAFILES,4,2              ## @MAX_METAFILES
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unloading metafile %d\n"

	.comm	_metafiles,8,3                  ## @metafiles
	.comm	_metafiles_loaded,4,2           ## @metafiles_loaded
	.comm	_allocated_metafile_bytes,4,2   ## @allocated_metafile_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_metafile_unload                ; -- Begin function metafile_unload
	.p2align	2
_metafile_unload:                       ; @metafile_unload
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cmp	w0, #0
Lloh0:
	adrp	x8, _MAX_METAFILES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_METAFILES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w0, #4, ge
	cset	w0, gt
	bl	_assert
Lloh3:
	adrp	x8, _verbosity@GOTPAGE
Lloh4:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_fprintf
LBB0_2:
Lloh11:
	adrp	x8, _metafiles@GOTPAGE
Lloh12:
	ldr	x8, [x8, _metafiles@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sxtw	x9, w19
	add	x20, x8, x9, lsl #5
	ldr	x10, [x20]
	cbz	x10, LBB0_4
; %bb.3:
	ldr	x10, [x20, #24]
	cbz	x10, LBB0_5
LBB0_4:
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
	add	x21, x8, x9, lsl #5
	ldp	x8, x0, [x21, #8]
	ldr	x1, [x8]
	bl	_zzfree
	str	xzr, [x20]
	str	xzr, [x21, #16]
Lloh14:
	adrp	x8, _metafiles_loaded@GOTPAGE
Lloh15:
	ldr	x8, [x8, _metafiles_loaded@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _allocated_metafile_bytes@GOTPAGE
Lloh17:
	ldr	x9, [x9, _allocated_metafile_bytes@GOTPAGEOFF]
	ldr	w10, [x9]
	sub	w8, w10, w8
	str	w8, [x9]
	mov	x0, x19
	bl	_del_use
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_METAFILES,4,2              ; @MAX_METAFILES
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unloading metafile %d\n"

	.comm	_metafiles,8,3                  ; @metafiles
	.comm	_metafiles_loaded,4,2           ; @metafiles_loaded
	.comm	_allocated_metafile_bytes,4,2   ; @allocated_metafile_bytes
.subsections_via_symbols
