	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea_extract_and_hold          ## -- Begin function moea_extract_and_hold
	.p2align	4, 0x90
_moea_extract_and_hold:                 ## @moea_extract_and_hold
	.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
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%esi, %edi
	callq	_PMAP_LOCK
	movq	_ADDR_POFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	%ebx, %esi
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_moea_pvo_find_va
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_PTE_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.2:
	movl	4(%rax), %edi
	movq	_PTE_PP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movq	_PTE_RW@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.3:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_PTE_RPGN@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_vm_page_wire_mapped
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovneq	%r14, %rbx
LBB0_7:
	movl	%r15d, %edi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDR_POFF,4,2                  ## @ADDR_POFF
	.comm	_PTE_VALID,4,2                  ## @PTE_VALID
	.comm	_PTE_PP,4,2                     ## @PTE_PP
	.comm	_PTE_RW,4,2                     ## @PTE_RW
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_PTE_RPGN,4,2                   ## @PTE_RPGN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea_extract_and_hold          ; -- Begin function moea_extract_and_hold
	.p2align	2
_moea_extract_and_hold:                 ; @moea_extract_and_hold
	.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	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x0, x1
	bl	_PMAP_LOCK
Lloh0:
	adrp	x8, _ADDR_POFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADDR_POFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w1, w21, w8
	mov	x0, x19
	mov	x2, #0
	bl	_moea_pvo_find_va
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _PTE_VALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PTE_VALID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [x0, #4]
Lloh6:
	adrp	x9, _PTE_PP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PTE_PP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh9:
	adrp	x10, _PTE_RW@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PTE_RW@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, w10
	b.eq	LBB0_5
; %bb.3:
Lloh12:
	adrp	x9, _VM_PROT_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_5
LBB0_4:
	mov	x20, #0
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x9, _PTE_RPGN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PTE_RPGN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_PHYS_TO_VM_PAGE
	mov	x20, x0
	bl	_vm_page_wire_mapped
	cmp	w0, #0
	csel	x20, xzr, x20, eq
LBB0_6:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDR_POFF,4,2                  ; @ADDR_POFF
	.comm	_PTE_VALID,4,2                  ; @PTE_VALID
	.comm	_PTE_PP,4,2                     ; @PTE_PP
	.comm	_PTE_RW,4,2                     ; @PTE_RW
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_PTE_RPGN,4,2                   ; @PTE_RPGN
.subsections_via_symbols
