	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmu_booke_extract_and_hold
_mmu_booke_extract_and_hold:            ## @mmu_booke_extract_and_hold
	.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	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_PMAP_LOCK
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_pte_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PTE_ISVALID
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_6
## %bb.3:
	movq	_PTE_SW@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_PTE_UW@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rbx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_PTE_PA
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_vm_page_wire_mapped
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovneq	%r14, %rbx
	jmp	LBB0_11
LBB0_9:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_PTE_SW,4,2                     ## @PTE_SW
	.comm	_PTE_UW,4,2                     ## @PTE_UW
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.no_dead_strip	_mmu_booke_extract_and_hold
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmu_booke_extract_and_hold
_mmu_booke_extract_and_hold:            ; @mmu_booke_extract_and_hold
	.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	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, x1
	bl	_PMAP_LOCK
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_pte_find
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_PTE_ISVALID
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PTE_SW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PTE_SW@GOTPAGEOFF]
Lloh4:
	adrp	x10, _PTE_UW@GOTPAGE
Lloh5:
	ldr	x10, [x10, _PTE_UW@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x8, x19
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x21
	bl	_PTE_PA
	bl	_PHYS_TO_VM_PAGE
	mov	x20, x0
	bl	_vm_page_wire_mapped
	cmp	w0, #0
	csel	x20, xzr, x20, eq
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
LBB0_5:
	mov	x20, #0
LBB0_6:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	mov	x0, x20
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_PTE_SW,4,2                     ; @PTE_SW
	.comm	_PTE_UW,4,2                     ; @PTE_UW
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.no_dead_strip	_mmu_booke_extract_and_hold
.subsections_via_symbols
