	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_unwire                    ## -- Begin function pmap_unwire
	.p2align	4, 0x90
_pmap_unwire:                           ## @pmap_unwire
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r12
	callq	_pmap_valid_bit
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_PMAP_LOCK
	cmpl	%ebx, %r13d
	jge	LBB0_27
## %bb.1:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPML4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	movq	_PML4MASK@GOTPCREL(%rip), %rcx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %r15d
	notl	%r15d
	andl	%eax, %r15d
	cmpl	%r13d, %r15d
	cmovll	%ebx, %r15d
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %r13d
	cmpl	%ebx, %r15d
	jge	LBB0_27
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pmap_pml4e
	testl	%r14d, (%rax)
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	movl	%r13d, %esi
	callq	_pmap_pml4e_to_pdpe
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r13d, %ecx
	movq	_PDRMASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	notl	%r15d
	andl	%ecx, %r15d
	cmpl	%r13d, %r15d
	cmovll	%ebx, %r15d
	movq	%rax, %rdi
	movl	%r13d, %esi
	callq	_pmap_pdpe_to_pde
	movl	(%rax), %esi
	testl	%r14d, %esi
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	movq	_PG_PS@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_W@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %r15d
	jle	LBB0_13
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	movq	_PDPMASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
	cmpl	%ebx, %r15d
	jg	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	cmpl	%r15d, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_atomic_clear_long
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cltq
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	subq	%rax, (%r12)
	jmp	LBB0_26
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_pmap_demote_pde
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %r15d
	cmovgel	%ebx, %r15d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pmap_pde_to_pte
	cmpl	%r15d, %r13d
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %r15d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=2
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_atomic_clear_long
	decq	(%r12)
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=2
	addq	$4, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	cmpl	%r15d, %r13d
	je	LBB0_25
LBB0_20:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %esi
	testl	%r14d, %esi
	je	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %eax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=2
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_26
LBB0_27:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PMAP_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NBPML4,4,2                     ## @NBPML4
	.comm	_PML4MASK,4,2                   ## @PML4MASK
	.comm	_NBPDP,4,2                      ## @NBPDP
	.comm	_PDPMASK,4,2                    ## @PDPMASK
	.comm	_NBPDR,4,2                      ## @NBPDR
	.comm	_PDRMASK,4,2                    ## @PDRMASK
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_PG_W,4,2                       ## @PG_W
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_unwire: pde %#jx is missing PG_W"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"pmap_unwire: demotion failed"

L_.str.2:                               ## @.str.2
	.asciz	"pmap_unwire: pte %#jx is missing PG_W"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_unwire                    ; -- Begin function pmap_unwire
	.p2align	2
_pmap_unwire:                           ; @pmap_unwire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x25, x1
	mov	x20, x0
	bl	_pmap_valid_bit
	mov	x21, x0
	mov	x0, x20
	bl	_PMAP_LOCK
	cmp	w25, w19
	b.ge	LBB0_24
; %bb.1:
Lloh0:
	adrp	x22, l_.str.2@PAGE
Lloh1:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh2:
	adrp	x24, _NBPDR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NBPDR@GOTPAGEOFF]
Lloh4:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x28, _PG_W@GOTPAGE
Lloh7:
	ldr	x28, [x28, _PG_W@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _NBPML4@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NBPML4@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _PML4MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PML4MASK@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x9]
	add	w8, w8, w25
	bic	w8, w8, w9
	cmp	w8, w25
	csel	w23, w19, w8, lt
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, x23
	cmp	w23, w19
	b.ge	LBB0_24
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	mov	x0, x20
	mov	x1, x25
	bl	_pmap_pml4e
	ldr	w8, [x0]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x25
	bl	_pmap_pml4e_to_pdpe
	ldr	w8, [x0]
	tst	w8, w21
	b.eq	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
Lloh13:
	adrp	x9, _PDRMASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PDRMASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	add	w8, w8, w25
	bic	w8, w8, w9
	cmp	w8, w25
	csel	w23, w19, w8, lt
	mov	x1, x25
	bl	_pmap_pdpe_to_pde
	ldr	w8, [x0]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
Lloh16:
	adrp	x9, _PG_PS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	add	w8, w8, w25
	cmp	w23, w19
	ccmp	w8, w23, #0, le
	b.eq	LBB0_23
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x26
	mov	x2, x25
	bl	_pmap_demote_pde
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, w19
	csel	w23, w23, w19, lt
	mov	x0, x26
	mov	x1, x25
	bl	_pmap_pde_to_pte
	cmp	w25, w23
	b.ne	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x25
	b	LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh23:
	adrp	x8, _NBPDP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NBPDP@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _PDPMASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PDPMASK@GOTPAGEOFF]
	b	LBB0_3
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=2
	mov	x0, x26
	bl	_atomic_clear_long
	ldr	x8, [x20]
	sub	x8, x8, #1
	str	x8, [x20]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	x26, x26, #4
	ldr	w8, [x27]
	add	w25, w8, w25
	cmp	w25, w23
	b.eq	LBB0_4
LBB0_20:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x26]
	tst	w8, w21
	b.eq	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w1, [x28]
	tst	w1, w8
	b.ne	LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=2
	str	x8, [sp]
	mov	x0, x22
	bl	_panic
	ldr	w1, [x28]
	b	LBB0_18
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x28]
	mov	x0, x26
	bl	_atomic_clear_long
	ldr	w8, [x24]
	ldr	w9, [x27]
	sdiv	w8, w8, w9
	ldr	x9, [x20]
	sub	x8, x9, w8, sxtw
	str	x8, [x20]
	b	LBB0_4
LBB0_24:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_PMAP_UNLOCK
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NBPML4,4,2                     ; @NBPML4
	.comm	_PML4MASK,4,2                   ; @PML4MASK
	.comm	_NBPDP,4,2                      ; @NBPDP
	.comm	_PDPMASK,4,2                    ; @PDPMASK
	.comm	_NBPDR,4,2                      ; @NBPDR
	.comm	_PDRMASK,4,2                    ; @PDRMASK
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_PG_W,4,2                       ; @PG_W
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_unwire: pde %#jx is missing PG_W"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"pmap_unwire: demotion failed"

l_.str.2:                               ; @.str.2
	.asciz	"pmap_unwire: pte %#jx is missing PG_W"

.subsections_via_symbols
