	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_unwire                 ## -- Begin function vm_page_unwire
	.p2align	4, 0x90
_vm_page_unwire:                        ## @vm_page_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
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_PQ_COUNT@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rsi, (%rax)
	setg	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_vm_page_unwire_noq
	testq	%rax, %rax
	je	LBB0_19
## %bb.2:
	cmpq	$0, 8(%r12)
	jne	LBB0_19
## %bb.3:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_page_free                   ## TAILCALL
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %r15
	movl	8(%r12), %edi
	movl	%edi, -44(%rbp)
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %ebx
	callq	_VPRC_WIRE_COUNT
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	je	LBB0_6
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	movl	$1, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edx
	decl	%edx
	movq	%r15, %rdi
	leaq	-44(%rbp), %rsi
	callq	_atomic_fcmpset_rel_int
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edi
	callq	_VPRC_WIRE_COUNT
	movb	$1, %r14b
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_vm_page_lock
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_PQ_ACTIVE@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_vm_page_queue
	movq	_PQ_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_vm_page_reference
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_vm_page_mvqueue
	jmp	LBB0_11
LBB0_14:
	testb	%r14b, %r14b
	jne	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	_vm_page_unlock
LBB0_16:
	movl	-44(%rbp), %edi
	callq	_VPRC_WIRE_COUNT
	cmpl	$1, %eax
	jne	LBB0_19
## %bb.17:
	movl	$1, %edi
	callq	_vm_wire_sub
	cmpl	$1, -44(%rbp)
	jne	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	callq	_vm_page_free
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PQ_COUNT,8,3                   ## @PQ_COUNT
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_PQ_ACTIVE,8,3                  ## @PQ_ACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_unwire                 ; -- Begin function vm_page_unwire
	.p2align	2
_vm_page_unwire:                        ; @vm_page_unwire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PQ_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PQ_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	cset	w0, gt
	mov	x1, x19
	bl	_KASSERT
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _VPO_UNMANAGED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_vm_page_unwire_noq
	cbz	x0, LBB0_20
; %bb.2:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_20
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_vm_page_free
LBB0_4:
	mov	w23, #0
	mov	x21, x19
	ldr	w0, [x21, #8]!
	str	w0, [sp, #12]
Lloh6:
	adrp	x22, _PQ_ACTIVE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PQ_ACTIVE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_VPRC_WIRE_COUNT
	cmp	w0, #0
	cset	w0, gt
	mov	x1, x19
	bl	_KASSERT
	cbz	w23, LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
	mov	w23, #1
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #12]
	sub	w2, w8, #1
	add	x1, sp, #12
	mov	x0, x21
	bl	_atomic_fcmpset_rel_int
	cbnz	w0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #12]
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #12]
	bl	_VPRC_WIRE_COUNT
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_vm_page_lock
	ldr	x8, [x22]
	cmp	x8, x20
	b.ne	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_vm_page_queue
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_vm_page_reference
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #0
	mov	w24, #1
	b	LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_vm_page_mvqueue
	b	LBB0_6
LBB0_15:
	tbnz	w24, #0, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_vm_page_unlock
LBB0_17:
	ldr	w0, [sp, #12]
	bl	_VPRC_WIRE_COUNT
	cmp	w0, #1
	b.ne	LBB0_20
; %bb.18:
	bl	_vm_wire_sub
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_vm_page_free
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PQ_COUNT,8,3                   ; @PQ_COUNT
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_PQ_ACTIVE,8,3                  ; @PQ_ACTIVE
.subsections_via_symbols
