	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea64_bootstrap_alloc         ## -- Begin function moea64_bootstrap_alloc
	.p2align	4, 0x90
_moea64_bootstrap_alloc:                ## @moea64_bootstrap_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
	callq	_round_page
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_phys_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.1:
	movl	$3, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movabsq	$8589934592, %rcx               ## imm = 0x200000000
	addq	%rcx, %r13
	cmpq	$0, (%rax,%rbx,8)
	leaq	2(%rbx), %rbx
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rax,%rbx,8), %r12
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_roundup2
	movq	%rax, %r12
	movq	_phys_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rax,%rbx,8), %r12
	jl	LBB0_7
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r12,%rcx), %r15
	cmpq	-16(%rax,%rbx,8), %r15
	jg	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_platform_real_maxaddr
	cmpq	%rax, %r15
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_phys_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_panic
                                        ## implicit-def: $r12
LBB0_18:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	-3(%rbx), %rdi
	movl	%edi, %ecx
	andl	$-2, %ecx
	movq	_phys_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%rax,%rcx,8), %r12
	jne	LBB0_11
## %bb.10:
	movq	%r15, (%rax,%rcx,8)
	jmp	LBB0_18
LBB0_11:
	leaq	-2(%rbx), %rcx
	movl	%ecx, %esi
	movq	(%rax,%rsi,8), %rcx
	cmpq	%rcx, %r15
	jne	LBB0_13
## %bb.12:
	movq	%r12, (%rax,%rsi,8)
	jmp	LBB0_18
LBB0_13:
	movq	_phys_avail_count@GOTPCREL(%rip), %r8
	movl	(%r8), %r9d
	leal	(%r9,%r9), %edx
	cmpl	%edi, %edx
	jle	LBB0_17
## %bb.14:
	movslq	%edx, %rcx
	sarq	$32, %r13
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rax,%rcx,8), %xmm0
	movups	%xmm0, (%rax,%rcx,8)
	leaq	-2(%rcx), %rdx
	movq	%rdx, %rcx
	cmpq	%r13, %rdx
	jg	LBB0_15
## %bb.16:
	movq	(%rax,%rsi,8), %rcx
LBB0_17:
	movl	%ebx, %edx
	movq	%rcx, (%rax,%rdx,8)
	movq	%r12, (%rax,%rsi,8)
	decl	%ebx
	andl	$-2, %ebx
	movq	%r15, (%rax,%rbx,8)
	incl	%r9d
	movl	%r9d, (%r8)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_phys_avail,8,3                 ## @phys_avail
	.comm	_phys_avail_count,4,2           ## @phys_avail_count
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moea64_bootstrap_alloc: could not allocate memory"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea64_bootstrap_alloc         ; -- Begin function moea64_bootstrap_alloc
	.p2align	2
_moea64_bootstrap_alloc:                ; @moea64_bootstrap_alloc
	.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	x20, x1
	bl	_round_page
Lloh0:
	adrp	x25, _phys_avail@GOTPAGE
Lloh1:
	ldr	x25, [x25, _phys_avail@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	x24, #0
	mov	x22, #0
	mov	x26, #8589934592
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x8, x22, lsl #3
	add	x22, x22, #2
	ldr	x9, [x9, #24]
	add	x24, x24, x26
	cbz	x9, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x8, x22, lsl #3]
	cbz	x20, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_roundup2
	mov	x19, x0
	ldr	x8, [x25]
	ldr	x9, [x8, x22, lsl #3]
	cmp	x0, x9
	b.lt	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x8, x22, lsl #3
	ldr	x9, [x9, #8]
	add	x23, x19, x21
	cmp	x23, x9
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_platform_real_maxaddr
	cmp	x23, x0
	b.le	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	b	LBB0_2
LBB0_8:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
                                        ; implicit-def: $x19
LBB0_9:
	mov	x0, x19
	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
LBB0_10:
	and	x9, x22, #0xfffffffe
	ldr	x8, [x25]
	ldr	x10, [x8, x9, lsl #3]
	cmp	x19, x10
	b.ne	LBB0_12
; %bb.11:
	str	x23, [x8, x9, lsl #3]
	b	LBB0_9
LBB0_12:
	add	x10, x22, #1
	and	x9, x10, #0xffffffff
	ldr	x12, [x8, w10, uxtw #3]
	cmp	x23, x12
	b.ne	LBB0_14
; %bb.13:
	str	x19, [x8, x9, lsl #3]
	b	LBB0_9
LBB0_14:
Lloh4:
	adrp	x10, _phys_avail_count@GOTPAGE
Lloh5:
	ldr	x10, [x10, _phys_avail_count@GOTPAGEOFF]
	ldr	w11, [x10]
	lsl	w13, w11, #1
	cmp	w13, w22
	b.le	LBB0_21
; %bb.15:
	sxtw	x17, w13
	asr	x12, x24, #32
	mvn	x13, x12
	add	x14, x13, x17
	mov	x13, x17
	cmp	x14, #1
	b.eq	LBB0_19
; %bb.16:
	lsr	x13, x14, #1
	add	x14, x13, #1
	and	x15, x14, #0xfffffffffffffffe
	sub	x13, x17, x15, lsl #1
	sxtw	x16, w22
	mvn	x16, x16
	add	x16, x16, x17
	lsr	x16, x16, #1
	add	x16, x16, #1
	and	x16, x16, #0xfffffffffffffffe
	add	x17, x8, x17, lsl #3
	sub	x17, x17, #16
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	sub	x0, x17, #16
	ld2.2d	{ v0, v1 }, [x0]
	st2.2d	{ v0, v1 }, [x17]
	sub	x17, x17, #32
	sub	x16, x16, #2
	cbnz	x16, LBB0_17
; %bb.18:
	cmp	x14, x15
	b.eq	LBB0_20
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	lsl	x14, x13, #3
	sub	x15, x13, #2
	add	x13, x8, x14
	ldp	x16, x17, [x13, #-16]
	str	x16, [x13]
	orr	x13, x14, #0x8
	str	x17, [x8, x13]
	mov	x13, x15
	cmp	x15, x12
	b.gt	LBB0_19
LBB0_20:
	ldr	x12, [x8, x9, lsl #3]
LBB0_21:
	add	w13, w22, #3
	str	x12, [x8, w13, uxtw #3]
	str	x19, [x8, x9, lsl #3]
	add	w9, w22, #2
	and	x9, x9, #0xfffffffe
	str	x23, [x8, x9, lsl #3]
	add	w8, w11, #1
	str	w8, [x10]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_phys_avail,8,3                 ; @phys_avail
	.comm	_phys_avail_count,4,2           ; @phys_avail_count
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moea64_bootstrap_alloc: could not allocate memory"

.subsections_via_symbols
