	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_L1_IDX
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %ebx
	movl	%ebx, %edi
	callq	_l1pte_section_p
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r14, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_L1_S_SUPERSEC@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	movq	_L1_SUP_FRAME@GOTPCREL(%rip), %rax
	cmoveq	_L1_S_FRAME@GOTPCREL(%rip), %rax
	movq	_L1_SUP_OFFSET@GOTPCREL(%rip), %rcx
	cmoveq	_L1_S_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	andl	%ebx, %eax
	andl	(%rcx), %r12d
	orl	%eax, %r12d
	movq	_L1_S_PROT_W@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
LBB0_2:
	movl	%r12d, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_vm_page_wire_mapped
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovneq	%r15, %rbx
	jmp	LBB0_15
LBB0_3:
	movq	(%r14), %rbx
	movq	%r13, %rdi
	callq	_L2_IDX
	movq	(%rbx,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_L2_BUCKET
	movq	(%rbx,%rax,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.5:
	movl	%r12d, %edi
	callq	_l2pte_index
	movl	(%rbx,%rax,4), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movq	_L2_S_PROT_W@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
LBB0_7:
	movq	_L2_TYPE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_L2_TYPE_L@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	movq	_L2_S_FRAME@GOTPCREL(%rip), %rcx
	cmoveq	_L2_L_FRAME@GOTPCREL(%rip), %rcx
	movq	_L2_S_OFFSET@GOTPCREL(%rip), %rdx
	cmoveq	_L2_L_OFFSET@GOTPCREL(%rip), %rdx
	andl	(%rcx), %eax
	andl	(%rdx), %r12d
	orl	%eax, %r12d
	jmp	LBB0_2
LBB0_8:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_PMAP_UNLOCK
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jne	LBB0_14
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"huh"

	.comm	_L1_S_SUPERSEC,4,2              ## @L1_S_SUPERSEC
	.comm	_L1_SUP_FRAME,4,2               ## @L1_SUP_FRAME
	.comm	_L1_SUP_OFFSET,4,2              ## @L1_SUP_OFFSET
	.comm	_L1_S_FRAME,4,2                 ## @L1_S_FRAME
	.comm	_L1_S_OFFSET,4,2                ## @L1_S_OFFSET
	.comm	_L1_S_PROT_W,4,2                ## @L1_S_PROT_W
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_L2_S_PROT_W,4,2                ## @L2_S_PROT_W
	.comm	_L2_TYPE_MASK,4,2               ## @L2_TYPE_MASK
	.comm	_L2_TYPE_L,4,2                  ## @L2_TYPE_L
	.comm	_L2_L_FRAME,4,2                 ## @L2_L_FRAME
	.comm	_L2_L_OFFSET,4,2                ## @L2_L_OFFSET
	.comm	_L2_S_FRAME,4,2                 ## @L2_S_FRAME
	.comm	_L2_S_OFFSET,4,2                ## @L2_S_OFFSET
.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_L1_IDX
	mov	x23, x0
	mov	x0, x19
	bl	_PMAP_LOCK
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w22, [x8, x23, lsl #2]
	mov	x0, x22
	bl	_l1pte_section_p
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh5:
	adrp	x8, _L1_S_SUPERSEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _L1_S_SUPERSEC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _L1_S_FRAME@GOTPAGE
Lloh9:
	ldr	x9, [x9, _L1_S_FRAME@GOTPAGEOFF]
Lloh10:
	adrp	x10, _L1_SUP_FRAME@GOTPAGE
Lloh11:
	ldr	x10, [x10, _L1_SUP_FRAME@GOTPAGEOFF]
	tst	w8, w22
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh12:
	adrp	x9, _L1_S_OFFSET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _L1_S_OFFSET@GOTPAGEOFF]
Lloh14:
	adrp	x10, _L1_SUP_OFFSET@GOTPAGE
Lloh15:
	ldr	x10, [x10, _L1_SUP_OFFSET@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	and	w9, w9, w20
	orr	w0, w9, w8
Lloh16:
	adrp	x8, _L1_S_PROT_W@GOTPAGE
Lloh17:
	ldr	x8, [x8, _L1_S_PROT_W@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_8
LBB0_2:
	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_3:
	ldr	x22, [x19]
	mov	x0, x23
	bl	_L2_IDX
	ldr	x8, [x22, x0, lsl #3]
	cbz	x8, LBB0_9
; %bb.4:
	ldr	x22, [x8]
	mov	x0, x23
	bl	_L2_BUCKET
	ldr	x22, [x22, x0, lsl #3]
	cbz	x22, LBB0_9
; %bb.5:
	mov	x0, x20
	bl	_l2pte_index
	ldr	w8, [x22, x0, lsl #2]
	cbz	w8, LBB0_9
; %bb.6:
Lloh19:
	adrp	x9, _L2_S_PROT_W@GOTPAGE
Lloh20:
	ldr	x9, [x9, _L2_S_PROT_W@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_7:
Lloh22:
	adrp	x9, _L2_TYPE_MASK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _L2_TYPE_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _L2_TYPE_L@GOTPAGE
Lloh26:
	ldr	x10, [x10, _L2_TYPE_L@GOTPAGEOFF]
	and	w9, w9, w8
Lloh27:
	ldr	w10, [x10]
Lloh28:
	adrp	x11, _L2_L_FRAME@GOTPAGE
Lloh29:
	ldr	x11, [x11, _L2_L_FRAME@GOTPAGEOFF]
Lloh30:
	adrp	x12, _L2_S_FRAME@GOTPAGE
Lloh31:
	ldr	x12, [x12, _L2_S_FRAME@GOTPAGEOFF]
	cmp	w9, w10
	csel	x9, x11, x12, eq
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh32:
	adrp	x9, _L2_L_OFFSET@GOTPAGE
Lloh33:
	ldr	x9, [x9, _L2_L_OFFSET@GOTPAGEOFF]
Lloh34:
	adrp	x10, _L2_S_OFFSET@GOTPAGE
Lloh35:
	ldr	x10, [x10, _L2_S_OFFSET@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	and	w9, w9, w20
	orr	w0, w9, w8
	b	LBB0_2
LBB0_8:
Lloh36:
	adrp	x8, _VM_PROT_WRITE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_2
LBB0_9:
	mov	x20, #0
LBB0_10:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh39:
	adrp	x9, _VM_PROT_WRITE@GOTPAGE
Lloh40:
	ldr	x9, [x9, _VM_PROT_WRITE@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w21
	b.ne	LBB0_9
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"huh"

	.comm	_L1_S_SUPERSEC,4,2              ; @L1_S_SUPERSEC
	.comm	_L1_SUP_FRAME,4,2               ; @L1_SUP_FRAME
	.comm	_L1_SUP_OFFSET,4,2              ; @L1_SUP_OFFSET
	.comm	_L1_S_FRAME,4,2                 ; @L1_S_FRAME
	.comm	_L1_S_OFFSET,4,2                ; @L1_S_OFFSET
	.comm	_L1_S_PROT_W,4,2                ; @L1_S_PROT_W
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_L2_S_PROT_W,4,2                ; @L2_S_PROT_W
	.comm	_L2_TYPE_MASK,4,2               ; @L2_TYPE_MASK
	.comm	_L2_TYPE_L,4,2                  ; @L2_TYPE_L
	.comm	_L2_L_FRAME,4,2                 ; @L2_L_FRAME
	.comm	_L2_L_OFFSET,4,2                ; @L2_L_OFFSET
	.comm	_L2_S_FRAME,4,2                 ; @L2_S_FRAME
	.comm	_L2_S_OFFSET,4,2                ; @L2_S_OFFSET
.subsections_via_symbols
