	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_release                   ## -- Begin function pmap_release
	.p2align	4, 0x90
_pmap_release:                          ## @pmap_release
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	40(%rdi), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_KASSERT
	leaq	36(%r15), %rdi
	callq	_vm_radix_is_empty
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_KASSERT
	leaq	32(%r15), %rdi
	callq	_CPU_EMPTY
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_KASSERT
	movl	24(%r15), %edi
	callq	_DMAP_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	%eax, %r14d
	movq	_NKPML4E@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_2
## %bb.1:
	movq	_KPML4BASE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	shlq	$3, %rdi
	addq	24(%r15), %rdi
	shlq	$3, %rsi
	callq	___bzero
LBB0_2:
	movq	_ndmpdpphys@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%r15), %rbx
	testl	%esi, %esi
	jle	LBB0_4
## %bb.3:
	movq	_DMPML4I@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,8), %rdi
	shlq	$3, %rsi
	callq	___bzero
LBB0_4:
	movq	_PML4PML4I@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rbx,%rax,8)
	movq	_lm_ents@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_6
## %bb.5:
	movq	_LMSPML4I@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,8), %rdi
	shlq	$3, %rsi
	callq	___bzero
LBB0_6:
	movl	%r14d, %edi
	callq	_vm_page_unwire_noq
	movl	%r14d, %edi
	callq	_vm_page_free_zero
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DMAP_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_vm_page_unwire_noq
	movl	%ebx, %edi
	callq	_vm_page_free
LBB0_8:
	movq	(%r15), %rax
	movq	_PT_X86@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_cpu_stdext_feature2@GOTPCREL(%rip), %rax
	movq	_CPUID_STDEXT2_PKU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.11:
	addq	$8, %r15
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rangeset_fini                  ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"pmap_release: pmap has reserved page table page(s)"

	.comm	_NKPML4E,4,2                    ## @NKPML4E
	.comm	_KPML4BASE,4,2                  ## @KPML4BASE
	.comm	_ndmpdpphys,4,2                 ## @ndmpdpphys
	.comm	_DMPML4I,4,2                    ## @DMPML4I
	.comm	_PML4PML4I,8,3                  ## @PML4PML4I
	.comm	_lm_ents,4,2                    ## @lm_ents
	.comm	_LMSPML4I,4,2                   ## @LMSPML4I
	.comm	_PT_X86,8,3                     ## @PT_X86
	.comm	_cpu_stdext_feature2,4,2        ## @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ## @CPUID_STDEXT2_PKU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_release                   ; -- Begin function pmap_release
	.p2align	2
_pmap_release:                          ; @pmap_release
	.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, x0
	ldr	x1, [x0, #40]
	cmp	x1, #0
	cset	w0, eq
	bl	_KASSERT
	add	x0, x19, #36
	bl	_vm_radix_is_empty
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	add	x0, x19, #32
	bl	_CPU_EMPTY
	mov	x1, x19
	bl	_KASSERT
	ldr	w0, [x19, #24]
	bl	_DMAP_TO_PHYS
	bl	_PHYS_TO_VM_PAGE
	mov	x20, x0
Lloh2:
	adrp	x8, _NKPML4E@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NKPML4E@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x9, [x19, #24]
Lloh5:
	adrp	x10, _KPML4BASE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _KPML4BASE@GOTPAGEOFF]
Lloh7:
	ldrsw	x10, [x10]
	add	x0, x9, x10, lsl #3
	lsl	x1, x8, #3
	bl	_bzero
LBB0_2:
Lloh8:
	adrp	x8, _ndmpdpphys@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ndmpdpphys@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x21, [x19, #24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.3:
Lloh11:
	adrp	x9, _DMPML4I@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMPML4I@GOTPAGEOFF]
Lloh13:
	ldrsw	x9, [x9]
	add	x0, x21, x9, lsl #3
	lsl	x1, x8, #3
	bl	_bzero
LBB0_4:
Lloh14:
	adrp	x8, _PML4PML4I@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PML4PML4I@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	xzr, [x21, x8, lsl #3]
Lloh17:
	adrp	x8, _lm_ents@GOTPAGE
Lloh18:
	ldr	x8, [x8, _lm_ents@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.5:
Lloh20:
	adrp	x9, _LMSPML4I@GOTPAGE
Lloh21:
	ldr	x9, [x9, _LMSPML4I@GOTPAGEOFF]
Lloh22:
	ldrsw	x9, [x9]
	add	x0, x21, x9, lsl #3
	lsl	x1, x8, #3
	bl	_bzero
LBB0_6:
	mov	x0, x20
	bl	_vm_page_unwire_noq
	mov	x0, x20
	bl	_vm_page_free_zero
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.7:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_DMAP_TO_PHYS
	bl	_PHYS_TO_VM_PAGE
	mov	x20, x0
	bl	_vm_page_unwire_noq
	mov	x0, x20
	bl	_vm_page_free
LBB0_8:
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _PT_X86@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PT_X86@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
Lloh26:
	adrp	x8, _cpu_stdext_feature2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _cpu_stdext_feature2@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _CPUID_STDEXT2_PKU@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CPUID_STDEXT2_PKU@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	add	x0, x19, #8
	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
	b	_rangeset_fini
LBB0_11:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"pmap_release: pmap has reserved page table page(s)"

	.comm	_NKPML4E,4,2                    ; @NKPML4E
	.comm	_KPML4BASE,4,2                  ; @KPML4BASE
	.comm	_ndmpdpphys,4,2                 ; @ndmpdpphys
	.comm	_DMPML4I,4,2                    ; @DMPML4I
	.comm	_PML4PML4I,8,3                  ; @PML4PML4I
	.comm	_lm_ents,4,2                    ; @lm_ents
	.comm	_LMSPML4I,4,2                   ; @LMSPML4I
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_cpu_stdext_feature2,4,2        ; @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ; @CPUID_STDEXT2_PKU
.subsections_via_symbols
