	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmspace_exit                   ## -- Begin function vmspace_exit
	.p2align	4, 0x90
_vmspace_exit:                          ## @vmspace_exit
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	(%rbx), %r15
	movq	_vmspace0@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_atomic_add_int
	movl	(%r15), %edx
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	decl	%edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_atomic_fcmpset_int
	movl	-44(%rbp), %edx
	testl	%eax, %eax
	jne	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %edx
	jl	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r12, (%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_LOCK
	movq	%r12, (%rbx)
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_UNLOCK
	movq	%r14, %rdi
	callq	_pmap_activate
	movl	-44(%rbp), %edx
	jmp	LBB0_4
LBB0_5:
	cmpl	$1, %edx
	jne	LBB0_9
## %bb.6:
	cmpq	%r15, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_LOCK
	movq	%r15, (%rbx)
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_UNLOCK
	movq	%r14, %rdi
	callq	_pmap_activate
LBB0_8:
	movq	%r15, %rdi
	callq	_vmspace_pmap
	movl	%eax, %edi
	callq	_pmap_remove_pages
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_LOCK
	movq	%r12, (%rbx)
	movq	%rbx, %rdi
	callq	_PROC_VMSPACE_UNLOCK
	movq	%r14, %rdi
	callq	_pmap_activate
	movq	%r15, %rdi
	callq	_vmspace_dofree
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmspace0,4,2                   ## @vmspace0
	.comm	_racct_enable,8,3               ## @racct_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmspace_exit                   ; -- Begin function vmspace_exit
	.p2align	2
_vmspace_exit:                          ; @vmspace_exit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x21, [x0]
	ldr	x19, [x21]
Lloh0:
	adrp	x22, _vmspace0@GOTPAGE
Lloh1:
	ldr	x22, [x22, _vmspace0@GOTPAGEOFF]
	mov	x0, x22
	mov	w1, #1
	bl	_atomic_add_int
	ldr	w8, [x19]
	str	w8, [sp, #12]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w2, w8, #1
	add	x1, sp, #12
	mov	x0, x19
	bl	_atomic_fcmpset_int
	ldr	w8, [sp, #12]
	cbnz	w0, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #2
	b.lt	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x21]
	cmp	x9, x22
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_PROC_VMSPACE_LOCK
	str	x22, [x21]
	mov	x0, x21
	bl	_PROC_VMSPACE_UNLOCK
	mov	x0, x20
	bl	_pmap_activate
	ldr	w8, [sp, #12]
	b	LBB0_1
LBB0_5:
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x21]
	cmp	x8, x19
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_PROC_VMSPACE_LOCK
	str	x19, [x21]
	mov	x0, x21
	bl	_PROC_VMSPACE_UNLOCK
	mov	x0, x20
	bl	_pmap_activate
LBB0_8:
	mov	x0, x19
	bl	_vmspace_pmap
	bl	_pmap_remove_pages
	mov	x0, x21
	bl	_PROC_VMSPACE_LOCK
	str	x22, [x21]
	mov	x0, x21
	bl	_PROC_VMSPACE_UNLOCK
	mov	x0, x20
	bl	_pmap_activate
	mov	x0, x19
	bl	_vmspace_dofree
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_vmspace0,4,2                   ; @vmspace0
	.comm	_racct_enable,8,3               ; @racct_enable
.subsections_via_symbols
