	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	movq	%r12, %rdi
	callq	_PMAP_LOCK
	cmpq	%r14, %rbx
	jge	LBB0_5
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rbx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rbx, %rdi
	callq	_L2_NEXT_BUCKET
	movq	%rax, %r13
	cmpq	%r14, %rax
	cmovgeq	%r14, %r13
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_pmap_get_l2_bucket
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_l2pte_index
	cmpq	%r13, %rbx
	jge	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%rax,4), %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	jmp	LBB0_8
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=2
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, (%r12)
	decl	(%r14)
	movq	%r14, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=2
	addq	(%r14), %rbx
	addq	$4, %r15
	cmpq	%r13, %rbx
	jge	LBB0_4
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	testl	%edi, %edi
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	callq	_l2pte_pa
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_pmap_find_pv
	movq	%r12, %r14
	movq	%rax, %r12
	movl	(%rax), %ecx
	movq	_PVF_WIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=2
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_panic
	movq	_PVF_WIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r12), %ecx
	jmp	LBB0_13
LBB0_5:
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wunlock
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PMAP_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pvh_global_lock,4,2            ## @pvh_global_lock
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_PVF_WIRED,4,2                  ## @PVF_WIRED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_unwire: pv %p isn't wired"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_wlock
	mov	x0, x19
	bl	_PMAP_LOCK
	cmp	x21, x20
	b.ge	LBB0_14
; %bb.1:
Lloh2:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _VPO_UNMANAGED@GOTPAGE
Lloh5:
	ldr	x25, [x25, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
Lloh8:
	adrp	x26, _PVF_WIRED@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PVF_WIRED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x27
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x21, x20
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x0, x21
	bl	_L2_NEXT_BUCKET
	cmp	x0, x20
	csel	x27, x0, x20, lt
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_get_l2_bucket
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x0]
	mov	x0, x21
	bl	_l2pte_index
	cmp	x21, x27
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x28, x23, x0, lsl #2
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	bic	w8, w9, w8
	str	w8, [x23]
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x24]
	add	x28, x28, #4
	add	x21, x8, x21
	cmp	x21, x27
	b.ge	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	cbz	w0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	bl	_l2pte_pa
	bl	_PHYS_TO_VM_PAGE
	cbz	x0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x0]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x1, x19
	mov	x2, x21
	bl	_pmap_find_pv
	mov	x23, x0
	ldr	w9, [x0]
	ldr	w8, [x26]
	tst	w8, w9
	b.ne	LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x22
	mov	x1, x23
	bl	_panic
	ldr	w8, [x26]
	ldr	w9, [x23]
	b	LBB0_7
LBB0_14:
Lloh10:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_wunlock
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PMAP_UNLOCK
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pvh_global_lock,4,2            ; @pvh_global_lock
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_PVF_WIRED,4,2                  ; @PVF_WIRED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_unwire: pv %p isn't wired"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
