	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_extract_and_hold          ## -- Begin function pmap_extract_and_hold
	.p2align	4, 0x90
_pmap_extract_and_hold:                 ## @pmap_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	%edx, %r14d
	movl	%esi, %r12d
	movl	%edi, %r15d
	callq	_PMAP_LOCK
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_pmap_pte1
	movl	%eax, %edi
	callq	_pte1_load
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_pte1_is_section
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_PTE1_RO@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_12
LBB0_4:
	movl	%ebx, %edi
	callq	_pte1_pa
	movq	_PTE1_OFFSET@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r12d
	orl	%eax, %r12d
LBB0_5:
	movl	%r12d, %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_13
LBB0_6:
	movl	%ebx, %edi
	callq	_pte1_is_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_pmap_pte2
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_pte2_load
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_pmap_pte2_release
	movl	%r12d, %edi
	callq	_pte2_is_valid
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	_PTE2_RO@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_14
## %bb.9:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_14
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%r15d, %edi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%r12d, %edi
	callq	_pte2_pa
	movl	%eax, %r12d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PTE1_RO,4,2                    ## @PTE1_RO
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_PTE1_OFFSET,4,2                ## @PTE1_OFFSET
	.comm	_PTE2_RO,4,2                    ## @PTE2_RO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_extract_and_hold          ; -- Begin function pmap_extract_and_hold
	.p2align	2
_pmap_extract_and_hold:                 ; @pmap_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, x2
	mov	x21, x1
	mov	x19, x0
	bl	_PMAP_LOCK
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_pte1
	bl	_pte1_load
	mov	x22, x0
	bl	_pte1_is_section
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _PTE1_RO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTE1_RO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_9
LBB0_3:
	mov	x0, x22
	bl	_pte1_pa
Lloh6:
	adrp	x8, _PTE1_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PTE1_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w21
	orr	w0, w8, w0
LBB0_4:
	bl	_PHYS_TO_VM_PAGE
	mov	x20, x0
	bl	_vm_page_wire_mapped
	cmp	w0, #0
	csel	x20, xzr, x20, eq
	b	LBB0_10
LBB0_5:
	mov	x0, x22
	bl	_pte1_is_link
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_pte2
	mov	x22, x0
	bl	_pte2_load
	mov	x21, x0
	mov	x0, x22
	bl	_pmap_pte2_release
	mov	x0, x21
	bl	_pte2_is_valid
	cbz	x0, LBB0_9
; %bb.7:
Lloh9:
	adrp	x8, _PTE2_RO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PTE2_RO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.8:
Lloh12:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_11
LBB0_9:
	mov	x20, #0
LBB0_10:
	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
LBB0_11:
	mov	x0, x21
	bl	_pte2_pa
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PTE1_RO,4,2                    ; @PTE1_RO
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_PTE1_OFFSET,4,2                ; @PTE1_OFFSET
	.comm	_PTE2_RO,4,2                    ; @PTE2_RO
.subsections_via_symbols
