	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea_kextract                  ## -- Begin function moea_kextract
	.p2align	4, 0x90
_moea_kextract:                         ## @moea_kextract
	.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
	movl	%esi, %ebx
	movq	_VM_MIN_KERNEL_ADDRESS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jg	LBB0_2
## %bb.1:
	movq	_kernel_pmap@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_PMAP_LOCK
	movl	(%r15), %edi
	movq	_ADDR_POFF@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	notl	%esi
	andl	%ebx, %esi
	xorl	%edx, %edx
	callq	_moea_pvo_find_va
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_PTE_RPGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	andl	(%r12), %ebx
	orl	%eax, %ebx
	movl	(%r15), %edi
	callq	_PMAP_UNLOCK
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_MIN_KERNEL_ADDRESS,4,2      ## @VM_MIN_KERNEL_ADDRESS
	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_ADDR_POFF,4,2                  ## @ADDR_POFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moea_kextract: no addr found"

	.comm	_PTE_RPGN,4,2                   ## @PTE_RPGN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea_kextract                  ; -- Begin function moea_kextract
	.p2align	2
_moea_kextract:                         ; @moea_kextract
	.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, x1
Lloh0:
	adrp	x8, _VM_MIN_KERNEL_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_MIN_KERNEL_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _kernel_pmap@GOTPAGE
Lloh4:
	ldr	x21, [x21, _kernel_pmap@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_PMAP_LOCK
	ldr	w0, [x21]
Lloh5:
	adrp	x22, _ADDR_POFF@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ADDR_POFF@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w1, w19, w8
	mov	x2, #0
	bl	_moea_pvo_find_va
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _PTE_RPGN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PTE_RPGN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	w9, [x22]
	and	w9, w9, w19
	orr	w19, w9, w8
	ldr	w0, [x21]
	bl	_PMAP_UNLOCK
LBB0_2:
	mov	x0, x19
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_MIN_KERNEL_ADDRESS,4,2      ; @VM_MIN_KERNEL_ADDRESS
	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_ADDR_POFF,4,2                  ; @ADDR_POFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moea_kextract: no addr found"

	.comm	_PTE_RPGN,4,2                   ; @PTE_RPGN
.subsections_via_symbols
