	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_enter_pde
_pmap_enter_pde:                        ## @pmap_enter_pde
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r13
	sete	%al
	movq	_PG_W@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%r14, %rdi
	callq	_pmap_global_bit
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_pmap_rw_bit
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_pmap_modified_bit
	orl	%r15d, %eax
	andl	%r12d, %eax
	xorl	%edi, %edi
	movl	%r15d, -96(%rbp)                ## 4-byte Spill
	cmpl	%r15d, %eax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	%r14, %rdi
	callq	_pmap_valid_bit
	movl	%eax, %r15d
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_PMAP_LOCK_ASSERT
	movq	%r14, %rdi
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r12d, %esi
	callq	_pmap_pde_ept_executable
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pmap_allow_2m_x_page
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_PMAP_ENTER_NOSLEEP@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	movl	(%rax), %eax
	andl	-68(%rbp), %eax                 ## 4-byte Folded Reload
	cmoveq	-88(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_pmap_allocpde
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r12
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%r13d, %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_pmap_pkru_same
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_12
## %bb.10:
	movq	(%r14), %rax
	movq	_PT_X86@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	_X86_PG_PKU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_pmap_pkru_get
	orl	%ebx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
LBB0_12:
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_DMAP
	movq	%rax, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pmap_pde_index
	leaq	(%rbx,%rax,4), %r13
	movl	(%rbx,%rax,4), %ebx
	testl	%r15d, %ebx
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_25
## %bb.13:
	xorl	%edi, %edi
	movq	-104(%rbp), %r13                ## 8-byte Reload
	cmpl	$2, (%r13)
	setge	%dil
	leaq	L_.str.4(%rip), %rsi
	callq	_KASSERT
	movq	_PMAP_ENTER_NOREPLACE@GOTPCREL(%rip), %rax
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_15
## %bb.14:
	decl	(%r13)
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_1:
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdx
LBB0_2:
	movq	%r14, %rcx
	callq	_CTR2
	movq	_KERN_FAILURE@GOTPCREL(%rip), %rbx
	jmp	LBB0_46
LBB0_4:
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
LBB0_5:
	movq	%r14, %rcx
	callq	_CTR2
	movq	_KERN_RESOURCE_SHORTAGE@GOTPCREL(%rip), %rbx
	jmp	LBB0_46
LBB0_7:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_SLIST_INIT
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_pmap_unwire_ptp
	movq	_KERN_FAILURE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_46
## %bb.8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_pmap_invalidate_page
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
	jmp	LBB0_46
LBB0_15:
	leaq	-48(%rbp), %rdi
	callq	_SLIST_INIT
	movq	_PG_PS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_18
## %bb.16:
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r12, %r8
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_pmap_remove_pde
	testl	%ebx, -92(%rbp)                 ## 4-byte Folded Reload
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %r13
	jne	LBB0_21
## %bb.17:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_pmap_invalidate_pde_page
	jmp	LBB0_21
LBB0_18:
	xorl	%eax, %eax
	callq	_pmap_delayed_invl_start
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	%rsi, %rdx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r9
	callq	_pmap_remove_ptes
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_pmap_invalidate_all
LBB0_20:
	xorl	%eax, %eax
	callq	_pmap_delayed_invl_finish
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %r13
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_21:
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
	movl	(%r15), %edi
	cmpq	%r12, (%r13)
	jle	LBB0_22
## %bb.24:
	xorl	%eax, %eax
	testl	%edi, %edi
	sete	%al
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_KASSERT
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_22:
	movq	_PG_FRAME@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_pmap_insert_pt_page
	testq	%rax, %rax
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_25
## %bb.23:
	leaq	L_.str.5(%rip), %rdi
	callq	_panic
LBB0_25:
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_40
## %bb.26:
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movq	%r12, %r8
	callq	_pmap_pv_insert_pde
	testl	%eax, %eax
	je	LBB0_27
## %bb.30:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -96(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_40
## %bb.31:
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_32
## %bb.33:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_34
LBB0_27:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_SLIST_INIT
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	%rbx, %rcx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	callq	_pmap_unwire_ptp
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pmap_invalidate_page
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
LBB0_29:
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdx
	jmp	LBB0_5
LBB0_32:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_34:
	testq	%rax, %rax
	jle	LBB0_40
## %bb.35:
	movq	_PGA_WRITEABLE@GOTPCREL(%rip), %r13
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_36 Depth=1
	xorl	%edx, %edx
	divq	%rcx
LBB0_39:                                ##   in Loop: Header=BB0_36 Depth=1
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_40
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_vm_page_aflag_set
	addq	$4, %rbx
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_39
LBB0_40:
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_41
## %bb.42:
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rsi
	jmp	LBB0_43
LBB0_41:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %esi
LBB0_43:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testl	%ecx, -52(%rbp)                 ## 4-byte Folded Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_45
## %bb.44:
	addq	%rsi, 8(%r14)
LBB0_45:
	movq	%r14, %rdi
	callq	_pmap_resident_count_inc
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_pde_store
	movq	_pmap_pde_mappings@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_add_long
	movq	_KTR_PMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_CTR2
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rbx
LBB0_46:
	movl	(%rbx), %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_PG_W,4,2                       ## @PG_W
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_enter_pde: cannot create wired user mapping"

L_.str.1:                               ## @.str.1
	.asciz	"pmap_enter_pde: newpde is missing PG_M"

	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_KTR_PMAP,4,2                   ## @KTR_PMAP
L_.str.2:                               ## @.str.2
	.asciz	"pmap_enter_pde: 2m x blocked for va %#lx in pmap %p"

	.comm	_KERN_FAILURE,4,2               ## @KERN_FAILURE
	.comm	_PMAP_ENTER_NOSLEEP,4,2         ## @PMAP_ENTER_NOSLEEP
L_.str.3:                               ## @.str.3
	.asciz	"pmap_enter_pde: failure for va %#lx in pmap %p"

	.comm	_KERN_RESOURCE_SHORTAGE,4,2     ## @KERN_RESOURCE_SHORTAGE
	.comm	_NBPDR,8,3                      ## @NBPDR
	.comm	_VM_MAXUSER_ADDRESS,8,3         ## @VM_MAXUSER_ADDRESS
	.comm	_PT_X86,8,3                     ## @PT_X86
	.comm	_X86_PG_PKU_MASK,4,2            ## @X86_PG_PKU_MASK
L_.str.4:                               ## @.str.4
	.asciz	"pmap_enter_pde: pdpg's reference count is too low"

	.comm	_PMAP_ENTER_NOREPLACE,4,2       ## @PMAP_ENTER_NOREPLACE
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_PG_FRAME,4,2                   ## @PG_FRAME
L_.str.5:                               ## @.str.5
	.asciz	"pmap_enter_pde: trie insert failed"

	.comm	_PG_MANAGED,4,2                 ## @PG_MANAGED
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PGA_WRITEABLE,4,2              ## @PGA_WRITEABLE
	.comm	_pmap_pde_mappings,4,2          ## @pmap_pde_mappings
L_.str.7:                               ## @.str.7
	.asciz	"pmap_enter_pde: success for va %#lx in pmap %p"

	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
	.no_dead_strip	_pmap_enter_pde
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_enter_pde
_pmap_enter_pde:                        ; @pmap_enter_pde
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x5
	str	x4, [sp, #16]                   ; 8-byte Folded Spill
	mov	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PG_W@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PG_W@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w2
	ccmp	x8, x0, #4, ne
	cset	w0, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x19
	bl	_pmap_global_bit
	mov	x28, x0
	mov	x0, x19
	bl	_pmap_rw_bit
	mov	x25, x0
	mov	x0, x19
	bl	_pmap_modified_bit
	orr	w8, w0, w25
	and	w8, w8, w21
	cmp	w8, w25
	cset	w0, ne
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	mov	x0, x19
	bl	_pmap_valid_bit
	mov	x27, x0
Lloh10:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_PMAP_LOCK_ASSERT
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_pde_ept_executable
	mov	x1, x0
	mov	x0, x19
	bl	_pmap_allow_2m_x_page
	cbz	w0, LBB0_9
; %bb.1:
Lloh13:
	adrp	x8, _PMAP_ENTER_NOSLEEP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PMAP_ENTER_NOSLEEP@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w23
	csel	x2, x24, xzr, eq
	mov	x0, x19
	mov	x1, x20
	bl	_pmap_allocpde
	cbz	x0, LBB0_35
; %bb.2:
	mov	x26, x0
Lloh16:
	adrp	x8, _NBPDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	add	w2, w8, w20
	mov	x0, x19
	mov	x1, x20
	bl	_pmap_pkru_same
	cbz	w0, LBB0_12
; %bb.3:
Lloh19:
	adrp	x8, _VM_MAXUSER_ADDRESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VM_MAXUSER_ADDRESS@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x8, x20
	b.le	LBB0_6
; %bb.4:
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _PT_X86@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PT_X86@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh25:
	adrp	x8, _X86_PG_PKU_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _X86_PG_PKU_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w21, w21, w8
	mov	x0, x19
	mov	x1, x20
	bl	_pmap_pkru_get
	orr	w21, w21, w0
LBB0_6:
	mov	x0, x26
	bl	_VM_PAGE_TO_PHYS
	bl	_PHYS_TO_DMAP
	mov	x22, x0
	mov	x0, x20
	bl	_pmap_pde_index
	add	x8, x22, x0, lsl #2
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w22, [x8]
	tst	w22, w27
	b.eq	LBB0_24
; %bb.7:
	ldr	w8, [x26]
	cmp	w8, #1
	cset	w0, gt
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_KASSERT
Lloh30:
	adrp	x8, _PMAP_ENTER_NOREPLACE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PMAP_ENTER_NOREPLACE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_14
; %bb.8:
	ldr	w8, [x26]
	sub	w8, w8, #1
	str	w8, [x26]
Lloh33:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh38:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	x2, x20
	mov	x3, x19
	bl	_CTR2
LBB0_11:
Lloh43:
	adrp	x8, _KERN_FAILURE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _KERN_FAILURE@GOTPAGEOFF]
	b	LBB0_36
LBB0_12:
	add	x0, sp, #24
	bl	_SLIST_INIT
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x20
	mov	x2, x26
	bl	_pmap_unwire_ptp
	cbz	x0, LBB0_11
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_pmap_invalidate_page
	add	x0, sp, #24
	mov	w1, #1
	bl	_vm_page_free_pages_toq
	b	LBB0_11
LBB0_14:
	add	x0, sp, #24
	bl	_SLIST_INIT
Lloh45:
	adrp	x8, _PG_PS@GOTPAGE
Lloh46:
	ldr	x8, [x8, _PG_PS@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_17
; %bb.15:
	add	x3, sp, #24
	mov	x0, x19
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x20
	mov	x4, x24
	bl	_pmap_remove_pde
	tst	w22, w28
	b.ne	LBB0_20
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_pmap_invalidate_pde_page
	b	LBB0_20
LBB0_17:
	bl	_pmap_delayed_invl_start
Lloh48:
	adrp	x8, _NBPDR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	add	x2, x8, x20
	add	x4, sp, #24
	mov	x0, x19
	mov	x1, x20
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x5, x24
	bl	_pmap_remove_ptes
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_pmap_invalidate_all
LBB0_19:
	bl	_pmap_delayed_invl_finish
LBB0_20:
	add	x0, sp, #24
	mov	w1, #1
	bl	_vm_page_free_pages_toq
Lloh51:
	adrp	x8, _VM_MAXUSER_ADDRESS@GOTPAGE
Lloh52:
	ldr	x8, [x8, _VM_MAXUSER_ADDRESS@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x8]
	ldr	w8, [x27]
	cmp	x9, x20
	b.le	LBB0_22
; %bb.21:
	cmp	w8, #0
	cset	w0, eq
	mov	x1, x27
	bl	_KASSERT
	b	LBB0_24
LBB0_22:
Lloh54:
	adrp	x9, _PG_FRAME@GOTPAGE
Lloh55:
	ldr	x9, [x9, _PG_FRAME@GOTPAGEOFF]
Lloh56:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_PHYS_TO_VM_PAGE
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_pmap_insert_pt_page
	cbz	x0, LBB0_24
; %bb.23:
Lloh57:
	adrp	x0, l_.str.5@PAGE
Lloh58:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_panic
LBB0_24:
	mov	x4, x24
Lloh59:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh60:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
Lloh62:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh63:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
	tst	w8, w21
	ldr	x28, [sp, #16]                  ; 8-byte Folded Reload
Lloh64:
	adrp	x24, _NBPDR@GOTPAGE
Lloh65:
	ldr	x24, [x24, _NBPDR@GOTPAGEOFF]
	b.eq	LBB0_30
; %bb.25:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	bl	_pmap_pv_insert_pde
	cbz	w0, LBB0_33
; %bb.26:
	tst	w21, w25
	b.eq	LBB0_30
; %bb.27:
	ldr	x8, [x24]
	ldr	x9, [x27]
	udiv	x8, x8, x9
	cmp	x8, #1
	b.lt	LBB0_30
; %bb.28:
Lloh66:
	adrp	x23, _PGA_WRITEABLE@GOTPAGE
Lloh67:
	ldr	x23, [x23, _PGA_WRITEABLE@GOTPAGEOFF]
	mov	x22, x28
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x22
	bl	_vm_page_aflag_set
	add	x22, x22, #4
	ldr	x8, [x24]
	ldr	x9, [x27]
	udiv	x8, x8, x9
	add	x8, x28, x8, lsl #2
	cmp	x22, x8
	b.lo	LBB0_29
LBB0_30:
Lloh68:
	adrp	x8, _PG_W@GOTPAGE
Lloh69:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	ldr	x9, [x24]
	ldr	x10, [x27]
	udiv	x1, x9, x10
	tst	w8, w21
	b.eq	LBB0_32
; %bb.31:
	ldr	x8, [x19, #8]
	add	x8, x8, x1
	str	x8, [x19, #8]
LBB0_32:
	mov	x0, x19
	bl	_pmap_resident_count_inc
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x21
	bl	_pde_store
Lloh71:
	adrp	x0, _pmap_pde_mappings@GOTPAGE
Lloh72:
	ldr	x0, [x0, _pmap_pde_mappings@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_add_long
Lloh73:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh74:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh75:
	ldr	w0, [x8]
Lloh76:
	adrp	x1, l_.str.7@PAGE
Lloh77:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_CTR2
Lloh78:
	adrp	x8, _KERN_SUCCESS@GOTPAGE
Lloh79:
	ldr	x8, [x8, _KERN_SUCCESS@GOTPAGEOFF]
	b	LBB0_36
LBB0_33:
	add	x0, sp, #24
	bl	_SLIST_INIT
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x20
	mov	x2, x26
	bl	_pmap_unwire_ptp
	cbz	x0, LBB0_35
; %bb.34:
	mov	x0, x19
	mov	x1, x20
	bl	_pmap_invalidate_page
	add	x0, sp, #24
	mov	w1, #1
	bl	_vm_page_free_pages_toq
LBB0_35:
Lloh80:
	adrp	x8, _KTR_PMAP@GOTPAGE
Lloh81:
	ldr	x8, [x8, _KTR_PMAP@GOTPAGEOFF]
Lloh82:
	ldr	w0, [x8]
Lloh83:
	adrp	x1, l_.str.3@PAGE
Lloh84:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_CTR2
Lloh85:
	adrp	x8, _KERN_RESOURCE_SHORTAGE@GOTPAGE
Lloh86:
	ldr	x8, [x8, _KERN_RESOURCE_SHORTAGE@GOTPAGEOFF]
LBB0_36:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh85, Lloh86
	.loh AdrpAdd	Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_PG_W,4,2                       ; @PG_W
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_enter_pde: cannot create wired user mapping"

l_.str.1:                               ; @.str.1
	.asciz	"pmap_enter_pde: newpde is missing PG_M"

	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_KTR_PMAP,4,2                   ; @KTR_PMAP
l_.str.2:                               ; @.str.2
	.asciz	"pmap_enter_pde: 2m x blocked for va %#lx in pmap %p"

	.comm	_KERN_FAILURE,4,2               ; @KERN_FAILURE
	.comm	_PMAP_ENTER_NOSLEEP,4,2         ; @PMAP_ENTER_NOSLEEP
l_.str.3:                               ; @.str.3
	.asciz	"pmap_enter_pde: failure for va %#lx in pmap %p"

	.comm	_KERN_RESOURCE_SHORTAGE,4,2     ; @KERN_RESOURCE_SHORTAGE
	.comm	_NBPDR,8,3                      ; @NBPDR
	.comm	_VM_MAXUSER_ADDRESS,8,3         ; @VM_MAXUSER_ADDRESS
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_X86_PG_PKU_MASK,4,2            ; @X86_PG_PKU_MASK
l_.str.4:                               ; @.str.4
	.asciz	"pmap_enter_pde: pdpg's reference count is too low"

	.comm	_PMAP_ENTER_NOREPLACE,4,2       ; @PMAP_ENTER_NOREPLACE
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_PG_FRAME,4,2                   ; @PG_FRAME
l_.str.5:                               ; @.str.5
	.asciz	"pmap_enter_pde: trie insert failed"

	.comm	_PG_MANAGED,4,2                 ; @PG_MANAGED
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PGA_WRITEABLE,4,2              ; @PGA_WRITEABLE
	.comm	_pmap_pde_mappings,4,2          ; @pmap_pde_mappings
l_.str.7:                               ; @.str.7
	.asciz	"pmap_enter_pde: success for va %#lx in pmap %p"

	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
	.no_dead_strip	_pmap_enter_pde
.subsections_via_symbols
