	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea64_pte_replace_native
_moea64_pte_replace_native:             ## @moea64_pte_replace_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_moea64_pteg_table@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	(%rsi), %r15
	leaq	(%r14,%r15,8), %rbx
	testl	%edx, %edx
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_moea64_pte_replace_inval_native ## TAILCALL
LBB0_1:
	leaq	-32(%rbp), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_moea64_pte_from_pvo
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_rlock
	movl	(%rbx), %edi
	callq	_be64toh
	movq	_LPTE_AVPN_MASK@GOTPCREL(%rip), %rcx
	movl	-32(%rbp), %edi
	xorl	%edi, %eax
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
	movl	$-1, %ebx
	jmp	LBB0_5
LBB0_4:
	callq	_htobe64
	movl	%eax, (%r14,%r15,8)
	movl	4(%r14,%r15,8), %edi
	callq	_be64toh
	movl	%eax, %ebx
	movq	_moea64_eviction_lock@GOTPCREL(%rip), %rdi
	callq	_rw_runlock
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_moea64_pteg_table,8,3          ## @moea64_pteg_table
	.comm	_moea64_eviction_lock,4,2       ## @moea64_eviction_lock
	.comm	_LPTE_AVPN_MASK,4,2             ## @LPTE_AVPN_MASK
	.no_dead_strip	_moea64_pte_replace_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_replace_native
_moea64_pte_replace_native:             ; @moea64_pte_replace_native
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x8, x1
Lloh0:
	adrp	x9, _moea64_pteg_table@GOTPAGE
Lloh1:
	ldr	x9, [x9, _moea64_pteg_table@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x9]
	ldrsw	x21, [x1]
	add	x19, x20, x21, lsl #3
	cbz	w2, LBB0_2
; %bb.1:
	mov	x1, x8
	mov	x2, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_moea64_pte_replace_inval_native
LBB0_2:
	add	x1, sp, #8
	mov	x0, x8
	bl	_moea64_pte_from_pvo
Lloh3:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_rlock
	ldr	w0, [x19]
	bl	_be64toh
	mov	x8, x0
Lloh5:
	adrp	x9, _LPTE_AVPN_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LPTE_AVPN_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldr	w0, [sp, #8]
	eor	w8, w0, w8
	tst	w8, w9
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_runlock
	mov	w19, #-1
	b	LBB0_5
LBB0_4:
	bl	_htobe64
	str	w0, [x19]
	add	x8, x20, x21, lsl #3
	ldr	w0, [x8, #4]
	bl	_be64toh
	mov	x19, x0
Lloh10:
	adrp	x0, _moea64_eviction_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _moea64_eviction_lock@GOTPAGEOFF]
	bl	_rw_runlock
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_moea64_pteg_table,8,3          ; @moea64_pteg_table
	.comm	_moea64_eviction_lock,4,2       ; @moea64_eviction_lock
	.comm	_LPTE_AVPN_MASK,4,2             ; @LPTE_AVPN_MASK
	.no_dead_strip	_moea64_pte_replace_native
.subsections_via_symbols
