	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_high_alloc                 ## -- Begin function efi_high_alloc
	.p2align	4, 0x90
_efi_high_alloc:                        ## @efi_high_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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	$0, -48(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -112(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -152(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -144(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -128(%rbp)
	leaq	-160(%rbp), %rax
	movq	%rax, -136(%rbp)
	leaq	-152(%rbp), %rsi
	callq	_efi_get_memory_map
	movq	%rax, %r14
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_24
## %bb.1:
	movq	_EFI_ALLOC_ALIGN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rbx, %rsi
	cmovaq	%rsi, %rbx
	movq	%r12, %rdi
	callq	_round_up
	movq	_EFI_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_4:
	movq	-64(%rbp), %rsi
	cmpq	-72(%rbp), %rsi
	ja	LBB0_19
## %bb.5:
	movq	_EFI_CONVENTIONAL_MEMORY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r14
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %rsi
	movq	%rax, %rcx
	orq	%rsi, %rcx
	shrq	$32, %rcx
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=2
	xorl	%edx, %edx
	divq	%rsi
	cmpq	%r14, %rax
	ja	LBB0_7
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r14, %rax
	jbe	LBB0_18
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rdi
	movl	%r14d, %edx
	callq	_efi_early_memdesc_ptr
	movq	(%rax), %rcx
	cmpq	(%r12), %rcx
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%rax), %r15
	cmpq	%rbx, %r15
	jb	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	16(%rax), %r13
	movq	_EFI_PAGE_SIZE@GOTPCREL(%rip), %rax
	imulq	(%rax), %r15
	addq	%r13, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %r15
	cmovaeq	%rax, %r15
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	%r13, %rax
	cmpq	%r15, %rax
	ja	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	subq	-88(%rbp), %r15                 ## 8-byte Folded Reload
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_round_down
	cmpq	%r13, %rax
	jb	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_round_down
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpq	-48(%rbp), %rax
	jbe	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%rax, -48(%rbp)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, -48(%rbp)
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_allocate_pages@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EFI_ALLOCATE_ADDRESS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movq	_EFI_LOADER_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	leaq	-48(%rbp), %r8
	xorl	%eax, %eax
	callq	_efi_call_early
	movq	%rax, %r14
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	$0, -48(%rbp)
	movq	-64(%rbp), %rsi
	cmpq	-72(%rbp), %rsi
	jbe	LBB0_6
LBB0_19:
	movq	_EFI_NOT_FOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_23:
	movq	_free_pool@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-96(%rbp), %rsi
	xorl	%eax, %eax
	callq	_efi_call_early
LBB0_24:
	movq	%r14, %rax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EFI_SUCCESS,8,3                ## @EFI_SUCCESS
	.comm	_EFI_ALLOC_ALIGN,8,3            ## @EFI_ALLOC_ALIGN
	.comm	_EFI_PAGE_SIZE,8,3              ## @EFI_PAGE_SIZE
	.comm	_EFI_CONVENTIONAL_MEMORY,8,3    ## @EFI_CONVENTIONAL_MEMORY
	.comm	_EFI_NOT_FOUND,8,3              ## @EFI_NOT_FOUND
	.comm	_allocate_pages,4,2             ## @allocate_pages
	.comm	_EFI_ALLOCATE_ADDRESS,4,2       ## @EFI_ALLOCATE_ADDRESS
	.comm	_EFI_LOADER_DATA,4,2            ## @EFI_LOADER_DATA
	.comm	_free_pool,4,2                  ## @free_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_high_alloc                 ; -- Begin function efi_high_alloc
	.p2align	2
_efi_high_alloc:                        ; @efi_high_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	sub	x8, x29, #88
	sub	x9, x29, #96
	stp	x8, x9, [sp, #40]
	add	x8, sp, #96
	stp	x8, xzr, [sp, #80]
	stp	xzr, xzr, [sp, #64]
	add	x8, sp, #104
	str	x8, [sp, #56]
	add	x1, sp, #40
	bl	_efi_get_memory_map
	mov	x23, x0
Lloh0:
	adrp	x25, _EFI_SUCCESS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EFI_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.1:
	str	x19, [sp, #32]                  ; 8-byte Folded Spill
Lloh2:
	adrp	x8, _EFI_ALLOC_ALIGN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFI_ALLOC_ALIGN@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	cmp	x1, x21
	csel	x21, x1, x21, hi
	mov	x0, x22
	bl	_round_up
	ldp	x1, x8, [x29, #-96]
	cmp	x1, x8
	b.hi	LBB0_14
; %bb.2:
	mov	x22, x0
Lloh5:
	adrp	x26, _EFI_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _EFI_PAGE_SIZE@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh7:
	adrp	x27, _EFI_CONVENTIONAL_MEMORY@GOTPAGE
Lloh8:
	ldr	x27, [x27, _EFI_CONVENTIONAL_MEMORY@GOTPAGEOFF]
	udiv	x28, x0, x8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x23, x23, #1
	ldp	x1, x8, [x29, #-96]
	udiv	x8, x8, x1
	cmp	x8, x23
	b.ls	LBB0_11
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [sp, #96]
	mov	x2, x23
	bl	_efi_early_memdesc_ptr
	ldr	x8, [x0]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x8, [x0, #8]
	cmp	x8, x28
	b.lo	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x19, [x0, #16]
	ldr	x9, [x26]
	madd	x8, x9, x8, x19
	cmp	x8, x20
	csel	x8, x8, x20, lo
	add	x9, x19, x22
	cmp	x9, x8
	b.hi	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	x24, x8, x22
	mov	x0, x24
	mov	x1, x21
	bl	_round_down
	cmp	x0, x19
	b.lo	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x24
	mov	x1, x21
	bl	_round_down
	ldr	x8, [sp, #88]
	cmp	x0, #0
	ccmp	x0, x8, #0, ne
	b.ls	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	str	x0, [sp, #88]
	b	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #88]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x8, _allocate_pages@GOTPAGE
Lloh10:
	ldr	x8, [x8, _allocate_pages@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _EFI_ALLOCATE_ADDRESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EFI_ALLOCATE_ADDRESS@GOTPAGEOFF]
Lloh14:
	ldrsw	x1, [x8]
Lloh15:
	adrp	x8, _EFI_LOADER_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFI_LOADER_DATA@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	add	x9, sp, #88
	stp	x28, x9, [sp, #8]
	str	x8, [sp]
	bl	_efi_call_early
	ldr	x8, [x25]
	ldr	x20, [sp, #88]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [sp, #88]
	ldp	x1, x8, [x29, #-96]
	cmp	x1, x8
	b.ls	LBB0_3
LBB0_14:
Lloh18:
	adrp	x8, _EFI_NOT_FOUND@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EFI_NOT_FOUND@GOTPAGEOFF]
Lloh20:
	ldr	x23, [x8]
LBB0_15:
Lloh21:
	adrp	x8, _free_pool@GOTPAGE
Lloh22:
	ldr	x8, [x8, _free_pool@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x1, [sp, #96]
	bl	_efi_call_early
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_17:
	mov	x23, x0
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	x20, [x8]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EFI_SUCCESS,8,3                ; @EFI_SUCCESS
	.comm	_EFI_ALLOC_ALIGN,8,3            ; @EFI_ALLOC_ALIGN
	.comm	_EFI_PAGE_SIZE,8,3              ; @EFI_PAGE_SIZE
	.comm	_EFI_CONVENTIONAL_MEMORY,8,3    ; @EFI_CONVENTIONAL_MEMORY
	.comm	_EFI_NOT_FOUND,8,3              ; @EFI_NOT_FOUND
	.comm	_allocate_pages,4,2             ; @allocate_pages
	.comm	_EFI_ALLOCATE_ADDRESS,4,2       ; @EFI_ALLOCATE_ADDRESS
	.comm	_EFI_LOADER_DATA,4,2            ; @EFI_LOADER_DATA
	.comm	_free_pool,4,2                  ; @free_pool
.subsections_via_symbols
