	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea_bootstrap_alloc
_moea_bootstrap_alloc:                  ## @moea_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
	movl	%esi, %r15d
	callq	_round_page
	movq	%rax, %r14
	movq	_phys_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_15
## %bb.1:
	xorl	%r12d, %r12d
	movabsq	$8589934592, %r13               ## imm = 0x200000000
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rsi
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%r14), %rdx
	movq	8(%rcx,%rbx,8), %rdi
	cmpq	%rdi, %rdx
	jle	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r13, %r12
	cmpq	$0, 24(%rcx,%rbx,8)
	leaq	2(%rbx), %rbx
	je	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rbx,8), %rax
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_roundup2
	movq	_phys_avail@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rbx,8), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_5
	jmp	LBB0_14
LBB0_15:
	leaq	L_.str(%rip), %rdi
	callq	_panic
                                        ## implicit-def: $rax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	%rsi, %rax
	jne	LBB0_8
## %bb.7:
	andl	$-2, %ebx
	movq	%rdx, (%rcx,%rbx,8)
	movq	%rsi, %rax
	jmp	LBB0_16
LBB0_8:
	leal	1(%rbx), %r10d
	cmpq	%rdi, %rdx
	jne	LBB0_10
## %bb.9:
	movq	%rax, (%rcx,%r10,8)
	jmp	LBB0_16
LBB0_10:
	movq	_phys_avail_count@GOTPCREL(%rip), %r8
	movl	(%r8), %r9d
	leal	(%r9,%r9), %edi
	cmpl	%ebx, %edi
	jle	LBB0_13
## %bb.11:
	movslq	%edi, %rdi
	sarq	$32, %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rcx,%rdi,8), %xmm0
	movups	%xmm0, (%rcx,%rdi,8)
	leaq	-2(%rdi), %rsi
	movq	%rsi, %rdi
	cmpq	%r12, %rsi
	jg	LBB0_12
LBB0_13:
	movq	(%rcx,%r10,8), %rsi
	leal	3(%rbx), %edi
	movq	%rsi, (%rcx,%rdi,8)
	movq	%rax, (%rcx,%r10,8)
	addl	$2, %ebx
	andl	$-2, %ebx
	movq	%rdx, (%rcx,%rbx,8)
	incl	%r9d
	movl	%r9d, (%r8)
	jmp	LBB0_16
	.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	"moea_bootstrap_alloc: could not allocate memory"

	.no_dead_strip	_moea_bootstrap_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea_bootstrap_alloc
_moea_bootstrap_alloc:                  ; @moea_bootstrap_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	x19, x1
	bl	_round_page
Lloh0:
	adrp	x23, _phys_avail@GOTPAGE
Lloh1:
	ldr	x23, [x23, _phys_avail@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	x22, #0
	mov	x21, #0
	mov	x24, #8589934592
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, x0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x8, x21, lsl #3
	ldr	x11, [x9, #8]
	add	x9, x0, x20
	cmp	x9, x11
	b.le	LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x8, x21, lsl #3
	add	x21, x21, #2
	ldr	x9, [x9, #24]
	add	x22, x22, x24
	cbz	x9, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x8, x21, lsl #3]
	cbz	w19, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x19
	bl	_roundup2
	ldr	x8, [x23]
	ldr	x10, [x8, x21, lsl #3]
	cmp	x0, x10
	b.ge	LBB0_3
	b	LBB0_4
LBB0_7:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
                                        ; implicit-def: $x0
LBB0_8:
	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
LBB0_9:
	cmp	x0, x10
	b.ne	LBB0_11
; %bb.10:
	and	x11, x21, #0xfffffffe
	str	x9, [x8, x11, lsl #3]
	mov	x0, x10
	b	LBB0_8
LBB0_11:
	add	w12, w21, #1
	cmp	x9, x11
	b.ne	LBB0_13
; %bb.12:
	str	x0, [x8, x12, lsl #3]
	b	LBB0_8
LBB0_13:
Lloh4:
	adrp	x10, _phys_avail_count@GOTPAGE
Lloh5:
	ldr	x10, [x10, _phys_avail_count@GOTPAGEOFF]
	ldr	w11, [x10]
	lsl	w13, w11, #1
	cmp	w13, w21
	b.le	LBB0_19
; %bb.14:
	sxtw	x1, w13
	asr	x13, x22, #32
	mvn	x14, x13
	add	x15, x14, x1
	mov	x14, x1
	cmp	x15, #1
	b.eq	LBB0_18
; %bb.15:
	lsr	x14, x15, #1
	add	x15, x14, #1
	and	x16, x15, #0xfffffffffffffffe
	sub	x14, x1, x16, lsl #1
	sxtw	x17, w21
	mvn	x17, x17
	add	x17, x17, x1
	lsr	x17, x17, #1
	add	x17, x17, #1
	and	x17, x17, #0xfffffffffffffffe
	add	x1, x8, x1, lsl #3
	sub	x1, x1, #16
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	sub	x2, x1, #16
	ld2.2d	{ v0, v1 }, [x2]
	st2.2d	{ v0, v1 }, [x1]
	sub	x1, x1, #32
	sub	x17, x17, #2
	cbnz	x17, LBB0_16
; %bb.17:
	cmp	x15, x16
	b.eq	LBB0_19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	lsl	x15, x14, #3
	sub	x16, x14, #2
	add	x14, x8, x15
	ldp	x17, x1, [x14, #-16]
	str	x17, [x14]
	orr	x14, x15, #0x8
	str	x1, [x8, x14]
	mov	x14, x16
	cmp	x16, x13
	b.gt	LBB0_18
LBB0_19:
	lsl	x12, x12, #3
	ldr	x13, [x8, x12]
	add	w14, w21, #3
	str	x13, [x8, w14, uxtw #3]
	str	x0, [x8, x12]
	add	w12, w21, #2
	and	x12, x12, #0xfffffffe
	str	x9, [x8, x12, lsl #3]
	add	w8, w11, #1
	str	w8, [x10]
	b	LBB0_8
	.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	"moea_bootstrap_alloc: could not allocate memory"

	.no_dead_strip	_moea_bootstrap_alloc
.subsections_via_symbols
