	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea64_pte_clear_native
_moea64_pte_clear_native:               ## @moea64_pte_clear_native
	.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	%edx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	_moea64_pteg_table@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	8(%rsi), %r12
	movl	4(%rsi), %edi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_moea64_pte_from_pvo
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_rlock
	movl	(%r13,%r12,8), %edi
	callq	_be64toh
	movq	_LPTE_AVPN_MASK@GOTPCREL(%rip), %rcx
	xorl	-48(%rbp), %eax
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
	movl	$-1, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_LPTE_REF@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_PTESYNC
	movl	4(%r13,%r12,8), %edi
	callq	_be64toh
	movl	%eax, %r15d
	movl	-20(%rbp), %eax
	movl	%eax, 28(%r13,%r12,8)
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
	xorl	%eax, %eax
	callq	_critical_enter
	movl	(%rbx), %edi
	callq	_TLBIE
	xorl	%eax, %eax
	callq	_critical_exit
	jmp	LBB0_5
LBB0_4:
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_moea64_pte_unset_native
	movl	%eax, %r15d
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_moea64_pte_insert_native
LBB0_5:
	movq	_LPTE_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_LPTE_REF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	andl	%r15d, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_moea64_pteg_table,8,3          ## @moea64_pteg_table
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_moea64_eviction_lock,4,2       ## @moea64_eviction_lock
	.comm	_LPTE_AVPN_MASK,4,2             ## @LPTE_AVPN_MASK
	.comm	_LPTE_REF,4,2                   ## @LPTE_REF
	.comm	_LPTE_CHG,4,2                   ## @LPTE_CHG
	.no_dead_strip	_moea64_pte_clear_native
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea64_pte_clear_native
_moea64_pte_clear_native:               ; @moea64_pte_clear_native
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _moea64_pteg_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _moea64_pteg_table@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	ldp	w0, w24, [x1, #4]
                                        ; kill: def $w24 killed $w24 def $x24
	sxtw	x24, w24
Lloh3:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_PMAP_LOCK_ASSERT
	add	x1, sp, #8
	mov	x0, x19
	bl	_moea64_pte_from_pvo
Lloh6:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_rlock
	lsl	x8, x24, #3
	ldr	w0, [x23, x8]
	bl	_be64toh
Lloh8:
	adrp	x8, _LPTE_AVPN_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LPTE_AVPN_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	eor	w9, w9, w0
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_runlock
	mov	w0, #-1
	b	LBB0_6
LBB0_2:
Lloh13:
	adrp	x22, _LPTE_REF@GOTPAGE
Lloh14:
	ldr	x22, [x22, _LPTE_REF@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.3:
	bl	_PTESYNC
	add	x20, x23, x24, lsl #3
	ldr	w0, [x20, #4]
	bl	_be64toh
	mov	x21, x0
	ldr	w8, [sp, #36]
	str	w8, [x20, #28]
Lloh15:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh16:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_runlock
	bl	_critical_enter
	ldr	w0, [x19]
	bl	_TLBIE
	bl	_critical_exit
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_runlock
	mov	x0, x20
	mov	x1, x19
	bl	_moea64_pte_unset_native
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_moea64_pte_insert_native
LBB0_5:
	ldr	w8, [x22]
Lloh19:
	adrp	x9, _LPTE_CHG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LPTE_CHG@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w0, w8, w21
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_moea64_pteg_table,8,3          ; @moea64_pteg_table
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_moea64_eviction_lock,4,2       ; @moea64_eviction_lock
	.comm	_LPTE_AVPN_MASK,4,2             ; @LPTE_AVPN_MASK
	.comm	_LPTE_REF,4,2                   ; @LPTE_REF
	.comm	_LPTE_CHG,4,2                   ; @LPTE_CHG
	.no_dead_strip	_moea64_pte_clear_native
.subsections_via_symbols
