	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_early_alloc            ## -- Begin function vm_phys_early_alloc
	.p2align	4, 0x90
_vm_phys_early_alloc:                   ## @vm_phys_early_alloc
	.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
	movq	%rsi, %r14
	movq	_phys_avail@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_vm_phys_avail_size
	cmpq	%r13, %rax
	cmovgl	%ebx, %r15d
	cmovgq	%rax, %r13
	movq	(%r12), %rax
	cmpq	$0, 24(%rax,%rbx,8)
	leaq	2(%rbx), %rbx
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
LBB0_4:
	movq	%r14, %rdi
	callq	_round_page
	movq	%rax, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%r12), %rax
	cmpq	(%rcx), %r14
	jne	LBB0_6
## %bb.5:
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rbx
	addq	%rbx, %r14
	movq	%r14, (%rax,%rcx,8)
	movl	%r15d, %edi
	callq	_vm_phys_avail_check
	jmp	LBB0_12
LBB0_6:
	movslq	%r15d, %rbx
	leaq	-1(%r14), %rcx
	andq	8(%rax,%rbx,8), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%r14), %rax
	cmpq	%r13, %rax
	jbe	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_8:
	incq	%rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_11
## %bb.9:
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	subq	%r13, %rdi
	movl	%r15d, %esi
	callq	_vm_phys_avail_split
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	(%r12), %rax
	subq	%r13, (%rax,%rbx,8)
LBB0_11:
	movq	(%r12), %rax
	subq	%r14, (%rax,%rbx,8)
	movl	%r15d, %edi
	callq	_vm_phys_avail_check
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rbx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_phys_avail,8,3                 ## @phys_avail
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot find a large enough size\n"

	.comm	_mem_affinity,8,3               ## @mem_affinity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_phys_early_alloc            ; -- Begin function vm_phys_early_alloc
	.p2align	2
_vm_phys_early_alloc:                   ; @vm_phys_early_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x22, _phys_avail@GOTPAGE
Lloh1:
	ldr	x22, [x22, _phys_avail@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x23, #0
	mov	w19, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_vm_phys_avail_size
	cmp	x0, x23
	csel	x23, x0, x23, gt
	csel	w19, w21, w19, gt
	ldr	x8, [x22]
	add	x8, x8, x21, lsl #3
	add	x21, x21, #2
	ldr	x8, [x8, #24]
	cbnz	x8, LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w19, #0
	mov	x23, #0
LBB0_4:
	mov	x0, x20
	bl	_round_page
	mov	x20, x0
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x8]
	ldr	x8, [x22]
	cmp	x0, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x9, x19
	sbfiz	x9, x9, #3, #32
	ldr	x21, [x8, x9]
	add	x10, x21, x20
	str	x10, [x8, x9]
	mov	x0, x19
	bl	_vm_phys_avail_check
	b	LBB0_12
LBB0_6:
	sxtw	x9, w19
	add	x24, x9, #1
	ldr	x8, [x8, x24, lsl #3]
	sub	x9, x20, #1
	and	x21, x8, x9
	add	x8, x21, x20
	cmp	x8, x23
	b.ls	LBB0_8
; %bb.7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_8:
	lsl	x23, x24, #3
	cbz	x21, LBB0_11
; %bb.9:
	ldr	x8, [x22]
	ldr	x8, [x8, x24, lsl #3]
	sub	x0, x8, x21
	mov	x1, x19
	bl	_vm_phys_avail_split
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x8, [x22]
	ldr	x9, [x8, x23]
	sub	x9, x9, x21
	str	x9, [x8, x23]
LBB0_11:
	ldr	x8, [x22]
	ldr	x9, [x8, x23]
	sub	x9, x9, x20
	str	x9, [x8, x23]
	mov	x0, x19
	bl	_vm_phys_avail_check
	ldr	x8, [x22]
	ldr	x21, [x8, x23]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_phys_avail,8,3                 ; @phys_avail
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot find a large enough size\n"

	.comm	_mem_affinity,8,3               ; @mem_affinity
.subsections_via_symbols
