	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea64_protect                 ## -- Begin function moea64_protect
	.p2align	4, 0x90
_moea64_protect:                        ## @moea64_protect
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	movl	%edi, %r14d
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	%r12, %r8
	movl	%ebx, %r9d
	callq	_CTR4
	movq	_curproc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r13, (%rax)
	sete	%al
	movq	_kernel_pmap@GOTPCREL(%rip), %rcx
	cmpq	%r13, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_VM_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_VM_PROT_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.6:
	movl	%r14d, %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_moea64_remove                  ## TAILCALL
LBB0_1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_PMAP_LOCK
	movq	%r15, -56(%rbp)
	movq	_pvo_tree@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rsi
	callq	_RB_NFIND
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_PVO_VADDR
	cmpq	%r12, %rax
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_pvo_tree@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_RB_NEXT
	movq	%r12, %r15
	movq	%rax, %r12
	movl	%r14d, %edi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_moea64_pvo_protect
	movq	%r12, %rbx
	testq	%r12, %r12
	movq	%r15, %r12
	jne	LBB0_3
LBB0_5:
	movq	%r13, %rdi
	callq	_PMAP_UNLOCK
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KTR_PMAP,4,2                   ## @KTR_PMAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x"

	.comm	_curproc,8,3                    ## @curproc
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
L_.str.1:                               ## @.str.1
	.asciz	"moea64_protect: non current pmap"

	.comm	_VM_PROT_READ,4,2               ## @VM_PROT_READ
	.comm	_VM_PROT_NONE,4,2               ## @VM_PROT_NONE
	.comm	_pvo_tree,4,2                   ## @pvo_tree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea64_protect                 ; -- Begin function moea64_protect
	.p2align	2
_moea64_protect:                        ; @moea64_protect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x4
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	mov	x4, x19
	mov	x5, x21
	bl	_CTR4
Lloh5:
	adrp	x8, _curproc@GOTPAGE
Lloh6:
	ldr	x8, [x8, _curproc@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cmp	x8, x20
Lloh8:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh9:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ccmp	x8, x20, #4, ne
	cset	w0, eq
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
Lloh13:
	adrp	x8, _VM_PROT_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VM_PROT_READ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh16:
	adrp	x9, _VM_PROT_NONE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VM_PROT_NONE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	x3, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_moea64_remove
LBB0_2:
	mov	x0, x20
	bl	_PMAP_LOCK
	str	x23, [sp, #8]
Lloh19:
	adrp	x25, _pvo_tree@GOTPAGE
Lloh20:
	ldr	x25, [x25, _pvo_tree@GOTPAGEOFF]
	ldr	w0, [x25]
	add	x2, sp, #8
	mov	x1, x20
	bl	_RB_NFIND
	cbz	x0, LBB0_6
; %bb.3:
	mov	x23, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_PVO_VADDR
	cmp	x0, x19
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	mov	x1, x20
	mov	x2, x23
	bl	_RB_NEXT
	mov	x24, x0
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	x3, x21
	bl	_moea64_pvo_protect
	mov	x23, x24
	cbnz	x24, LBB0_4
LBB0_6:
	mov	x0, x20
	bl	_PMAP_UNLOCK
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_KTR_PMAP,4,2                   ; @KTR_PMAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x"

	.comm	_curproc,8,3                    ; @curproc
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
l_.str.1:                               ; @.str.1
	.asciz	"moea64_protect: non current pmap"

	.comm	_VM_PROT_READ,4,2               ; @VM_PROT_READ
	.comm	_VM_PROT_NONE,4,2               ; @VM_PROT_NONE
	.comm	_pvo_tree,4,2                   ; @pvo_tree
.subsections_via_symbols
