	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_unfree_page            ## -- Begin function vm_phys_unfree_page
	.p2align	4, 0x90
_vm_phys_unfree_page:                   ## @vm_phys_unfree_page
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_vm_phys_segs@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%rdi), %r12
	shlq	$5, %r12
	leaq	(%r15,%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	24(%r15,%r12), %edi
	callq	_VM_DOMAIN
	movl	%eax, %edi
	callq	_vm_domain_free_assert_locked
	movl	8(%r14), %eax
	movq	_VM_NFREEORDER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	sete	%r8b
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_8
## %bb.1:
	cmpl	$2, %ecx
	jl	LBB0_8
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	addq	%r15, %r12
	addq	$8, %r12
	movl	$1, %r13d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r14), %edi
	movl	(%r15), %ecx
	addl	%r13d, %ecx
	shrl	%cl, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subl	(%rax), %edi
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rbx
	callq	_atop
	leaq	(%rax,%rax,2), %rdi
	movl	8(%rbx,%rdi,8), %eax
	movq	_VM_NFREEORDER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	1(%r13), %edx
	cmpl	%ecx, %eax
	sete	%r8b
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rcx), %esi
	cmpl	%esi, %r13d
	movl	%edx, %r13d
	jl	LBB0_3
LBB0_7:
	leaq	(%rbx,%rdi,8), %r14
	decl	%edx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rsi
	cmpl	%edx, %eax
	jl	LBB0_15
## %bb.9:
	testb	%r8b, %r8b
	jne	LBB0_15
## %bb.10:
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setl	%dil
	movslq	%eax, %rsi
	callq	_KASSERT
	movq	16(%r15,%r12), %rax
	movq	(%rax), %rax
	movq	16(%r14), %rcx
	movq	(%rax,%rcx,8), %r13
	movl	8(%r14), %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_vm_freelist_rem
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.12:
	leaq	(%r15,%r12), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	decl	%ebx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	12(%r14), %r12d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	btcl	%eax, %r12d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %r15d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	movl	%r12d, %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subl	(%rax), %edi
	callq	_atop
	cmpl	%r12d, %r15d
	leaq	(%rax,%rax,2), %rax
	leaq	(%r13,%rax,8), %rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %r12
	cmovlq	%r14, %r12
	cmovlq	%rax, %r14
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_vm_freelist_add
	leal	-1(%rbx), %eax
	incl	%ebx
	movq	%r12, %r14
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_13
	jmp	LBB0_14
LBB0_4:
	movq	_FALSE@GOTPCREL(%rip), %rsi
	jmp	LBB0_15
LBB0_11:
	movq	%r14, %r12
LBB0_14:
	xorl	%edi, %edi
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_TRUE@GOTPCREL(%rip), %rsi
LBB0_15:
	movl	(%rsi), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vm_phys_segs,8,3               ## @vm_phys_segs
	.comm	_VM_NFREEORDER,4,2              ## @VM_NFREEORDER
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"vm_phys_unfree_page: fatal inconsistency"

	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_unfree_page            ; -- Begin function vm_phys_unfree_page
	.p2align	2
_vm_phys_unfree_page:                   ; @vm_phys_unfree_page
	.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, x0
Lloh0:
	adrp	x8, _vm_phys_segs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vm_phys_segs@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x22, [x0]
	add	x23, x21, x22, lsl #5
	ldr	w0, [x23, #24]
	bl	_VM_DOMAIN
	bl	_vm_domain_free_assert_locked
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x20, _VM_NFREEORDER@GOTPAGE
Lloh4:
	ldr	x20, [x20, _VM_NFREEORDER@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	cset	w10, eq
	ccmp	w9, #2, #8, eq
	b.ge	LBB0_2
; %bb.1:
	mov	w11, #0
	mov	x20, x19
	b	LBB0_6
LBB0_2:
	stp	x22, x21, [sp]                  ; 16-byte Folded Spill
	add	x25, x23, #8
	mov	w26, #1
Lloh5:
	adrp	x27, _PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x27, [x27, _PAGE_SHIFT@GOTPAGEOFF]
	mov	w28, #-1
Lloh7:
	adrp	x24, _FALSE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
	mov	w21, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #12]
	ldr	w9, [x27]
	add	w9, w26, w9
	lsl	w9, w28, w9
	and	w8, w9, w8
	ldr	w9, [x23]
	subs	w0, w8, w9
	b.lt	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x22, [x25]
	bl	_atop
	madd	x8, x0, x21, x22
	ldr	w8, [x8, #8]
	ldr	w9, [x20]
	sub	w12, w9, #1
	cmp	w8, w9
	cset	w10, eq
	add	w11, w26, #1
	ccmp	w26, w12, #0, eq
	mov	x26, x11
	b.lt	LBB0_3
; %bb.5:
	mov	w12, #24
	madd	x20, x0, x12, x22
	sub	w11, w11, #1
	ldp	x22, x21, [sp]                  ; 16-byte Folded Reload
LBB0_6:
Lloh9:
	adrp	x24, _FALSE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
	cmp	w8, w11
	b.lt	LBB0_13
; %bb.7:
	tbnz	w10, #0, LBB0_13
; %bb.8:
	cmp	w8, w9
	cset	w0, lt
	sxtw	x1, w8
	bl	_KASSERT
	add	x24, x21, x22, lsl #5
	ldr	x8, [x24, #16]
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	ldr	x21, [x8, x9, lsl #3]
	ldr	w22, [x20, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_vm_freelist_rem
	subs	w22, w22, #1
	b.lt	LBB0_11
; %bb.9:
	add	x24, x24, #8
	mov	w27, #24
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #12]
Lloh11:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w9, w22, w9
	mov	w10, #1
	lsl	w9, w10, w9
	eor	w28, w9, w8
	ldr	w25, [x19, #12]
	ldr	x26, [x24]
	ldr	w8, [x23]
	sub	w0, w28, w8
	bl	_atop
	madd	x8, x0, x27, x26
	cmp	w25, w28
	csel	x28, x20, x8, lt
	csel	x1, x8, x20, lt
	mov	x0, x21
	mov	x2, x22
	mov	w3, #0
	bl	_vm_freelist_add
	add	w8, w22, #1
	sub	w22, w22, #1
	mov	x20, x28
	cmp	w8, #1
	b.hi	LBB0_10
	b	LBB0_12
LBB0_11:
	mov	x28, x20
LBB0_12:
	cmp	x28, x19
	cset	w0, eq
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
Lloh16:
	adrp	x24, _TRUE@GOTPAGE
Lloh17:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x24]
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_vm_phys_segs,8,3               ; @vm_phys_segs
	.comm	_VM_NFREEORDER,4,2              ; @VM_NFREEORDER
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"vm_phys_unfree_page: fatal inconsistency"

	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
