	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea64_set_scratchpage_pa
_moea64_set_scratchpage_pa:             ## @moea64_set_scratchpage_pa
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_hw_direct_map@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_moea64_scratchpage_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movq	_moea64_scratchpage_pvo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rbx
	movl	(%rbx), %edi
	callq	_PMAP_LOCK
	movq	_VM_MEMATTR_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_moea64_calc_wimg
	orl	%eax, %r12d
	movl	%r12d, 4(%rbx)
	movq	_MOEA64_PTE_INVALIDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_MOEA64_PTE_REPLACE
	movl	(%rbx), %edi
	callq	_PMAP_UNLOCK
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_isync                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_hw_direct_map,4,2              ## @hw_direct_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Using OEA64 scratchpage with a direct map!"

	.comm	_moea64_scratchpage_mtx,4,2     ## @moea64_scratchpage_mtx
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_moea64_scratchpage_pvo,8,3     ## @moea64_scratchpage_pvo
	.comm	_VM_MEMATTR_DEFAULT,4,2         ## @VM_MEMATTR_DEFAULT
	.comm	_MOEA64_PTE_INVALIDATE,4,2      ## @MOEA64_PTE_INVALIDATE
	.no_dead_strip	_moea64_set_scratchpage_pa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea64_set_scratchpage_pa
_moea64_set_scratchpage_pa:             ; @moea64_set_scratchpage_pa
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _hw_direct_map@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_direct_map@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh5:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x0, _moea64_scratchpage_mtx@GOTPAGE
Lloh9:
	ldr	x0, [x0, _moea64_scratchpage_mtx@GOTPAGEOFF]
	bl	_mtx_assert
Lloh10:
	adrp	x8, _moea64_scratchpage_pvo@GOTPAGE
Lloh11:
	ldr	x8, [x8, _moea64_scratchpage_pvo@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x20, [x8, w20, sxtw #3]
	ldr	w0, [x20]
	bl	_PMAP_LOCK
Lloh13:
	adrp	x8, _VM_MEMATTR_DEFAULT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VM_MEMATTR_DEFAULT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_moea64_calc_wimg
	orr	w8, w0, w19
	str	w8, [x20, #4]
Lloh16:
	adrp	x8, _MOEA64_PTE_INVALIDATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MOEA64_PTE_INVALIDATE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_MOEA64_PTE_REPLACE
	ldr	w0, [x20]
	bl	_PMAP_UNLOCK
	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
	b	_isync
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_direct_map,4,2              ; @hw_direct_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Using OEA64 scratchpage with a direct map!"

	.comm	_moea64_scratchpage_mtx,4,2     ; @moea64_scratchpage_mtx
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_moea64_scratchpage_pvo,8,3     ; @moea64_scratchpage_pvo
	.comm	_VM_MEMATTR_DEFAULT,4,2         ; @VM_MEMATTR_DEFAULT
	.comm	_MOEA64_PTE_INVALIDATE,4,2      ; @MOEA64_PTE_INVALIDATE
	.no_dead_strip	_moea64_set_scratchpage_pa
.subsections_via_symbols
