	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__citrus_mapper_close           ## -- Begin function _citrus_mapper_close
	.p2align	4, 0x90
__citrus_mapper_close:                  ## @_citrus_mapper_close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movq	_cm_lock@GOTPCREL(%rip), %rdi
	callq	_WLOCK
	movq	(%rbx), %rax
	movq	_REFCOUNT_PERSISTENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rbx)
	cmpq	$1, %rax
	jne	LBB0_6
## %bb.4:
	movq	_cm_entry@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__CITRUS_HASH_REMOVE
	movl	8(%rbx), %edi
	callq	_free
LBB0_5:
	movq	_cm_lock@GOTPCREL(%rip), %rdi
	callq	_UNLOCK
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mapper_close                   ## TAILCALL
LBB0_6:
	movq	_cm_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UNLOCK                         ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cm_lock,4,2                    ## @cm_lock
	.comm	_REFCOUNT_PERSISTENT,8,3        ## @REFCOUNT_PERSISTENT
	.comm	_cm_entry,4,2                   ## @cm_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__citrus_mapper_close           ; -- Begin function _citrus_mapper_close
	.p2align	2
__citrus_mapper_close:                  ; @_citrus_mapper_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, _cm_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _cm_lock@GOTPAGEOFF]
	bl	_WLOCK
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _REFCOUNT_PERSISTENT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _REFCOUNT_PERSISTENT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.2:
	subs	x8, x8, #1
	b.lt	LBB0_5
; %bb.3:
	str	x8, [x19]
	b.ne	LBB0_6
; %bb.4:
Lloh5:
	adrp	x8, _cm_entry@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cm_entry@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__CITRUS_HASH_REMOVE
	ldr	w0, [x19, #8]
	bl	_free
LBB0_5:
Lloh8:
	adrp	x0, _cm_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _cm_lock@GOTPAGEOFF]
	bl	_UNLOCK
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mapper_close
LBB0_6:
Lloh10:
	adrp	x0, _cm_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _cm_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UNLOCK
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cm_lock,4,2                    ; @cm_lock
	.comm	_REFCOUNT_PERSISTENT,8,3        ; @REFCOUNT_PERSISTENT
	.comm	_cm_entry,4,2                   ; @cm_entry
.subsections_via_symbols
