	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_free_pages             ## -- Begin function vm_phys_free_pages
	.p2align	4, 0x90
_vm_phys_free_pages:                    ## @vm_phys_free_pages
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movslq	(%rdi), %rsi
	movq	_VM_NFREEORDER@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpl	(%rbx), %esi
	sete	%dil
	callq	_KASSERT
	movq	8(%r12), %rsi
	movq	_VM_NFREEPOOL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rsi
	setb	%dil
	callq	_KASSERT
	xorl	%edi, %edi
	cmpl	%r15d, (%rbx)
	setg	%dil
	movslq	%r15d, %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_KASSERT
	movq	_vm_phys_segs@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	16(%r12), %r14
	shlq	$5, %r14
	movl	24(%r13,%r14), %edi
	callq	_VM_DOMAIN
	movl	%eax, %edi
	callq	_vm_domain_free_assert_locked
	movl	(%rbx), %eax
	decl	%eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %ebx
	leaq	(%r14,%r13), %rax
	addq	$4, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r13,%r14), %rcx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rdx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%r15), %r13d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	addl	(%r12), %r15d
	incb	%r15b
	movl	%r15d, %ecx
	shrl	%cl, %ebx
	shll	%cl, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	12(%rax), %r14
	movl	%ebx, %edi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	subl	(%r15), %edi
	callq	_atop
	movq	%r12, %rdx
	movq	%r15, %rcx
	leaq	(%rax,%rax,2), %rax
	leaq	(%r14,%rax,8), %r12
	movq	_VM_NFREEORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movl	%r13d, %r15d
	cmpl	%eax, %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jge	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %eax
	addl	%r15d, %eax
	btcl	%eax, %ebx
	movl	%ebx, %edi
	subl	(%rcx), %edi
	jl	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %ebx
	jge	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	12(%rax), %r14
	movq	%rax, %r12
	callq	_atop
	leaq	(%rax,%rax,2), %r13
	cmpl	(%r14,%r13,8), %r15d
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r13,8), %rcx
	movq	4(%r12), %rax
	movq	%rcx, %r12
	movq	(%rax), %rax
	movq	8(%r14,%r13,8), %rcx
	movq	(%rax,%rcx,8), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_vm_freelist_rem
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	cmpq	%rdi, 8(%r14,%r13,8)
	je	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_vm_phys_set_pool
	jmp	LBB0_2
LBB0_8:
	movl	%r15d, %r13d
LBB0_12:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax,%r14), %rax
	movq	(%rax), %rax
	movq	8(%r12), %rcx
	movq	(%rax,%rcx,8), %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movl	$1, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_freelist_add                ## TAILCALL
LBB0_11:
	movl	%r15d, %r13d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_NFREEORDER,4,2              ## @VM_NFREEORDER
	.comm	_VM_NFREEPOOL,8,3               ## @VM_NFREEPOOL
	.comm	_vm_phys_segs,8,3               ## @vm_phys_segs
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_free_pages             ; -- Begin function vm_phys_free_pages
	.p2align	2
_vm_phys_free_pages:                    ; @vm_phys_free_pages
	.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	x20, x1
	mov	x19, x0
	ldrsw	x1, [x0]
Lloh0:
	adrp	x28, _VM_NFREEORDER@GOTPAGE
Lloh1:
	ldr	x28, [x28, _VM_NFREEORDER@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w1, w8
	cset	w0, eq
	bl	_KASSERT
	ldr	x1, [x19, #8]
Lloh2:
	adrp	x8, _VM_NFREEPOOL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_NFREEPOOL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x1, x8
	cset	w0, lo
	bl	_KASSERT
	ldr	w8, [x28]
	cmp	w8, w20
	cset	w0, gt
	sxtw	x1, w20
	bl	_KASSERT
Lloh5:
	adrp	x8, _vm_phys_segs@GOTPAGE
Lloh6:
	ldr	x8, [x8, _vm_phys_segs@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	add	x24, x8, x9, lsl #5
	ldr	w0, [x24, #24]
	bl	_VM_DOMAIN
	bl	_vm_domain_free_assert_locked
	ldr	w8, [x28]
	sub	w8, w8, #1
	cmp	w8, w20
	b.le	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_VM_PAGE_TO_PHYS
	mov	x22, x0
	add	x9, x24, #4
	add	x26, x24, #16
	add	x8, x24, #8
	stp	x8, x9, [sp]                    ; 16-byte Folded Spill
Lloh8:
	adrp	x25, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _PAGE_SHIFT@GOTPAGEOFF]
	mov	w23, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w20, #1
	ldr	w8, [x25]
	add	w8, w20, w8
	add	w8, w8, #1
	mov	w9, #-1
	lsl	w8, w9, w8
	and	w22, w8, w22
	ldr	x19, [x26]
	ldr	w8, [x24]
	sub	w0, w22, w8
	bl	_atop
	madd	x19, x0, x23, x19
	ldr	w8, [x28]
	sub	w8, w8, #1
	mov	x20, x21
	cmp	w21, w8
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	add	w8, w20, w8
	mov	w9, #1
	lsl	w8, w9, w8
	eor	w22, w8, w22
	ldr	w8, [x24]
	subs	w0, w22, w8
	b.lt	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x8]
	cmp	w22, w8
	b.ge	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x27, [x26]
	bl	_atop
	madd	x21, x0, x23, x27
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x8, [x8]
	madd	x27, x0, x23, x27
	ldr	x9, [x27, #8]
	ldr	x0, [x8, x9, lsl #3]
	mov	x1, x21
	mov	x2, x20
	bl	_vm_freelist_rem
	ldr	x8, [x27, #8]
	ldr	x0, [x19, #8]
	cmp	x8, x0
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x21
	mov	x2, x20
	bl	_vm_phys_set_pool
	b	LBB0_2
LBB0_8:
	mov	x21, x20
LBB0_9:
	ldr	x8, [x24, #8]
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	x0, [x8, x9, lsl #3]
	mov	x1, x19
	mov	x2, x21
	mov	w3, #1
	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	_vm_freelist_add
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_NFREEORDER,4,2              ; @VM_NFREEORDER
	.comm	_VM_NFREEPOOL,8,3               ; @VM_NFREEPOOL
	.comm	_vm_phys_segs,8,3               ; @vm_phys_segs
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
