	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_vmspace_copy              ## -- Begin function pmap_vmspace_copy
	.p2align	4, 0x90
_pmap_vmspace_copy:                     ## @pmap_vmspace_copy
	.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
	movq	(%rdi), %rax
	xorl	%r15d, %r15d
	cmpq	(%rsi), %rax
	jne	LBB0_11
## %bb.1:
	movq	_PT_X86@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.2:
	movq	_cpu_stdext_feature2@GOTPCREL(%rip), %rax
	movq	_CPUID_STDEXT2_PKU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_11
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	cmpq	%r14, %rbx
	jae	LBB0_6
	.p2align	4, 0x90
LBB0_5:
	movq	%rbx, %rdi
	callq	_PMAP_LOCK
	movq	%r14, %rdi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	movq	%rbx, %rdi
LBB0_7:
	callq	_PMAP_LOCK
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pmap_pkru_copy
	movl	%eax, %r15d
	cmpl	(%r12), %eax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_pmap_pkru_deassign_all
LBB0_9:
	movq	%r14, %rdi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rdi
	callq	_PMAP_UNLOCK
	cmpl	(%r12), %r15d
	jne	LBB0_11
## %bb.10:
	xorl	%edi, %edi
	callq	_vm_wait
	cmpq	%r14, %rbx
	jae	LBB0_6
	jmp	LBB0_5
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_X86,8,3                     ## @PT_X86
	.comm	_cpu_stdext_feature2,4,2        ## @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ## @CPUID_STDEXT2_PKU
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_vmspace_copy              ; -- Begin function pmap_vmspace_copy
	.p2align	2
_pmap_vmspace_copy:                     ; @pmap_vmspace_copy
	.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
	ldr	x8, [x0]
	ldr	x9, [x1]
Lloh0:
	adrp	x10, _PT_X86@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PT_X86@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, eq
	b.ne	LBB0_9
; %bb.1:
Lloh3:
	adrp	x8, _cpu_stdext_feature2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cpu_stdext_feature2@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CPUID_STDEXT2_PKU@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CPUID_STDEXT2_PKU@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.2:
	mov	x19, x1
	mov	x20, x0
Lloh9:
	adrp	x22, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ENOMEM@GOTPAGEOFF]
	cmp	x20, x19
	b.hs	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_PMAP_LOCK
	mov	x0, x19
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_PMAP_LOCK
	mov	x0, x20
LBB0_5:
	bl	_PMAP_LOCK
	mov	x0, x20
	mov	x1, x19
	bl	_pmap_pkru_copy
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_pmap_pkru_deassign_all
LBB0_7:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	mov	x0, x20
	bl	_PMAP_UNLOCK
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_10
; %bb.8:
	mov	x0, #0
	bl	_vm_wait
	cmp	x20, x19
	b.hs	LBB0_4
	b	LBB0_3
LBB0_9:
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_cpu_stdext_feature2,4,2        ; @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ; @CPUID_STDEXT2_PKU
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
