	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_wire                   ## -- Begin function vm_page_wire
	.p2align	4, 0x90
_vm_page_wire:                          ## @vm_page_wire
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_vm_page_busied
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rdi
	callq	_VM_OBJECT_ASSERT_LOCKED
LBB0_2:
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.4:
	movl	4(%rbx), %edi
	callq	_VPRC_WIRE_COUNT
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	jmp	LBB0_5
LBB0_3:
	movl	$1, %edi
LBB0_5:
	movq	%rbx, %rsi
	callq	_KASSERT
	leaq	4(%rbx), %rdi
	movl	$1, %esi
	callq	_atomic_fetchadd_int
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_VPRC_WIRE_COUNT
	movq	_VPRC_WIRE_COUNT_MAX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	%r14d, %edi
	callq	_VPRC_WIRE_COUNT
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movl	$1, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_vm_wire_add                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_FICTITIOUS,4,2              ## @PG_FICTITIOUS
	.comm	_VPRC_WIRE_COUNT_MAX,8,3        ## @VPRC_WIRE_COUNT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_wire                   ; -- Begin function vm_page_wire
	.p2align	2
_vm_page_wire:                          ; @vm_page_wire
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
	cmp	x8, #0
	cset	w0, ne
	mov	x1, x19
	bl	_KASSERT
	mov	x0, x19
	bl	_vm_page_busied
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_VM_OBJECT_ASSERT_LOCKED
LBB0_2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _PG_FICTITIOUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PG_FICTITIOUS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_VPRC_WIRE_COUNT
	cmp	x0, #0
	cset	w0, gt
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	mov	x1, x19
	bl	_KASSERT
	add	x0, x19, #4
	mov	w1, #1
	bl	_atomic_fetchadd_int
	mov	x20, x0
	bl	_VPRC_WIRE_COUNT
Lloh3:
	adrp	x8, _VPRC_WIRE_COUNT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VPRC_WIRE_COUNT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, ne
	mov	x1, x19
	bl	_KASSERT
	mov	x0, x20
	bl	_VPRC_WIRE_COUNT
	cbz	x0, LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vm_wire_add
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_FICTITIOUS,4,2              ; @PG_FICTITIOUS
	.comm	_VPRC_WIRE_COUNT_MAX,8,3        ; @VPRC_WIRE_COUNT_MAX
.subsections_via_symbols
