	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea64_pvo_protect
_moea64_pvo_protect:                    ## @moea64_pvo_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_PMAP_LOCK_ASSERT
	movl	4(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, 4(%r12)
	movq	_LPTE_RPGN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	8(%r12), %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r14
	movq	_MOEA64_PTE_PROT_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_MOEA64_PTE_REPLACE
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_3
## %bb.2:
	movq	_LPTE_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_3:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_10
## %bb.4:
	testq	%r14, %r14
	je	LBB0_10
## %bb.5:
	movq	_PGA_EXECUTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, (%r14)
	jne	LBB0_10
## %bb.6:
	movq	_LPTE_I@GOTPCREL(%rip), %rax
	movq	_LPTE_G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_LPTE_NOEXEC@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ecx, 8(%r12)
	je	LBB0_7
LBB0_10:
	testq	%r14, %r14
	je	LBB0_16
LBB0_11:
	movq	_PVO_MANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_16
## %bb.12:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.13:
	movq	%r14, %rdi
	addq	$8, %rdi
	callq	_atomic_readandclear_32
	movl	%eax, %ebx
	orl	%r13d, %ebx
	movq	_LPTE_CHG@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_vm_page_dirty
LBB0_15:
	movq	_LPTE_REF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_16
## %bb.17:
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_page_aflag_set              ## TAILCALL
LBB0_7:
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_vm_page_aflag_set
LBB0_9:
	movq	%r12, %rdi
	callq	_PVO_VADDR
	movq	_LPTE_RPGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	8(%r12), %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_moea64_syncicache
	testq	%r14, %r14
	jne	LBB0_11
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_LPTE_RPGN,4,2                  ## @LPTE_RPGN
	.comm	_MOEA64_PTE_PROT_UPDATE,4,2     ## @MOEA64_PTE_PROT_UPDATE
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_LPTE_CHG,4,2                   ## @LPTE_CHG
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_PGA_EXECUTABLE,4,2             ## @PGA_EXECUTABLE
	.comm	_LPTE_I,4,2                     ## @LPTE_I
	.comm	_LPTE_G,4,2                     ## @LPTE_G
	.comm	_LPTE_NOEXEC,4,2                ## @LPTE_NOEXEC
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PVO_MANAGED,4,2                ## @PVO_MANAGED
	.comm	_LPTE_REF,4,2                   ## @LPTE_REF
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
	.no_dead_strip	_moea64_pvo_protect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea64_pvo_protect
_moea64_pvo_protect:                    ; @moea64_pvo_protect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_PMAP_LOCK_ASSERT
	ldp	w24, w8, [x20, #4]
	str	w19, [x20, #4]
Lloh3:
	adrp	x25, _LPTE_RPGN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _LPTE_RPGN@GOTPAGEOFF]
	ldr	w9, [x25]
	and	w0, w9, w8
	bl	_PHYS_TO_VM_PAGE
	mov	x19, x0
Lloh5:
	adrp	x8, _MOEA64_PTE_PROT_UPDATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MOEA64_PTE_PROT_UPDATE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x20
	bl	_MOEA64_PTE_REPLACE
	mov	x23, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _LPTE_CHG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LPTE_CHG@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w8, w24
	csel	w23, wzr, w9, eq
LBB0_2:
Lloh14:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x21
	ccmp	x19, #0, #4, ne
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _PGA_EXECUTABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PGA_EXECUTABLE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	tst	w1, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x20, #8]
Lloh20:
	adrp	x9, _LPTE_I@GOTPAGE
Lloh21:
	ldr	x9, [x9, _LPTE_I@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _LPTE_G@GOTPAGE
Lloh24:
	ldr	x10, [x10, _LPTE_G@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh26:
	adrp	x10, _LPTE_NOEXEC@GOTPAGE
Lloh27:
	ldr	x10, [x10, _LPTE_NOEXEC@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_12
LBB0_5:
	cbz	x19, LBB0_15
LBB0_6:
	ldr	w8, [x20]
Lloh29:
	adrp	x9, _PVO_MANAGED@GOTPAGE
Lloh30:
	ldr	x9, [x9, _PVO_MANAGED@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.7:
Lloh32:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w24
	b.eq	LBB0_15
; %bb.8:
	add	x0, x19, #8
	bl	_atomic_readandclear_32
	orr	w20, w0, w23
Lloh35:
	adrp	x8, _LPTE_CHG@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LPTE_CHG@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w20, w8
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_vm_page_dirty
LBB0_10:
Lloh38:
	adrp	x8, _LPTE_REF@GOTPAGE
Lloh39:
	ldr	x8, [x8, _LPTE_REF@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_15
; %bb.11:
Lloh41:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vm_page_aflag_set
LBB0_12:
	ldr	w8, [x19, #4]
Lloh44:
	adrp	x9, _VPO_UNMANAGED@GOTPAGE
Lloh45:
	ldr	x9, [x9, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_vm_page_aflag_set
LBB0_14:
	mov	x0, x20
	bl	_PVO_VADDR
	mov	x2, x0
	ldr	w8, [x20, #8]
	ldr	w9, [x25]
	and	w3, w9, w8
Lloh47:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh49:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x21
	bl	_moea64_syncicache
	cbnz	x19, LBB0_6
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_LPTE_RPGN,4,2                  ; @LPTE_RPGN
	.comm	_MOEA64_PTE_PROT_UPDATE,4,2     ; @MOEA64_PTE_PROT_UPDATE
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_LPTE_CHG,4,2                   ; @LPTE_CHG
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_PGA_EXECUTABLE,4,2             ; @PGA_EXECUTABLE
	.comm	_LPTE_I,4,2                     ; @LPTE_I
	.comm	_LPTE_G,4,2                     ; @LPTE_G
	.comm	_LPTE_NOEXEC,4,2                ; @LPTE_NOEXEC
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PVO_MANAGED,4,2                ; @PVO_MANAGED
	.comm	_LPTE_REF,4,2                   ; @LPTE_REF
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
	.no_dead_strip	_moea64_pvo_protect
.subsections_via_symbols
