	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_phys_enq_range
_vm_phys_enq_range:                     ## @vm_phys_enq_range
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%edi, %edi
	testl	%esi, %esi
	setg	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%r13, %rdi
	callq	_VM_PAGE_TO_PHYS
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %r14d
	imull	%r12d, %r14d
	addl	%eax, %r14d
	movl	%r12d, %edi
	callq	_fls
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	decl	%ebx
	xorl	%edi, %edi
	testl	%r14d, %ebx
	sete	%dil
	movslq	%r12d, %rsi
	callq	_KASSERT
	movq	_VM_NFREEORDER@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rsi
	xorl	%edi, %edi
	cmpl	(%r14), %esi
	sete	%dil
	callq	_KASSERT
	bsfl	%r12d, %eax
	movl	$-1, %ecx
	cmovel	%ecx, %eax
	xorl	%edi, %edi
	cmpl	(%r14), %eax
	setl	%dil
	movslq	%eax, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_vm_freelist_add
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	cltq
	leaq	(%r13,%rax,4), %r13
	subl	%eax, %r12d
	jg	LBB0_1
## %bb.2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_phys_enq_range: npages is 0"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_VM_NFREEORDER,4,2              ## @VM_NFREEORDER
	.no_dead_strip	_vm_phys_enq_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_phys_enq_range
_vm_phys_enq_range:                     ; @vm_phys_enq_range
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cmp	w1, #0
	cset	w0, gt
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x22
	bl	_VM_PAGE_TO_PHYS
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	madd	w24, w23, w21, w0
	mov	x0, x21
	bl	_fls
	sub	w8, w0, #1
	lsl	w8, w23, w8
	sub	w8, w8, #1
	tst	w8, w24
	cset	w0, eq
	sxtw	x1, w21
	bl	_KASSERT
Lloh5:
	adrp	x24, _VM_NFREEORDER@GOTPAGE
Lloh6:
	ldr	x24, [x24, _VM_NFREEORDER@GOTPAGEOFF]
	mov	w25, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x1, [x22]
	ldr	w8, [x24]
	cmp	w1, w8
	cset	w0, eq
	bl	_KASSERT
	rbit	w8, w21
	clz	w8, w8
	cmp	w21, #0
	csinv	w23, w8, wzr, ne
	ldr	w8, [x24]
	cmp	w23, w8
	cset	w0, lt
	sxtw	x1, w23
	bl	_KASSERT
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x19
	bl	_vm_freelist_add
	lsl	w8, w25, w23
	add	x22, x22, w8, sxtw #2
	sub	w21, w21, w8
	cmp	w21, #0
	b.gt	LBB0_1
; %bb.2:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_phys_enq_range: npages is 0"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_VM_NFREEORDER,4,2              ; @VM_NFREEORDER
	.no_dead_strip	_vm_phys_enq_range
.subsections_via_symbols
