	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmspace_acquire_ref            ## -- Begin function vmspace_acquire_ref
	.p2align	4, 0x90
_vmspace_acquire_ref:                   ## @vmspace_acquire_ref
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_PROC_VMSPACE_LOCK
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	movl	%edx, -28(%rbp)
	testl	%edx, %edx
	jle	LBB0_1
## %bb.3:
	leaq	-28(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incl	%edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_atomic_fcmpset_int
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-28(%rbp), %edx
	testl	%edx, %edx
	jg	LBB0_5
LBB0_1:
	movq	%r14, %rdi
	callq	_PROC_VMSPACE_UNLOCK
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %r15
	movq	%r14, %rdi
	callq	_PROC_VMSPACE_UNLOCK
	cmpq	%r15, %rbx
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_vmspace_free
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmspace_acquire_ref            ; -- Begin function vmspace_acquire_ref
	.p2align	2
_vmspace_acquire_ref:                   ; @vmspace_acquire_ref
	.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
	bl	_PROC_VMSPACE_LOCK
	ldr	x19, [x20]
	cbz	x19, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	str	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w2, w8, #1
	add	x1, sp, #12
	mov	x0, x19
	bl	_atomic_fcmpset_int
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #0
	b.gt	LBB0_2
LBB0_4:
	mov	x0, x20
	bl	_PROC_VMSPACE_UNLOCK
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_PROC_VMSPACE_UNLOCK
	b	LBB0_9
LBB0_6:
	ldr	x21, [x20]
	mov	x0, x20
	bl	_PROC_VMSPACE_UNLOCK
	cmp	x19, x21
	b.eq	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_vmspace_free
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
