	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_virtmap                ## -- Begin function efi_get_virtmap
	.p2align	4, 0x90
_efi_get_virtmap:                       ## @efi_get_virtmap
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	_virtmap_base@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_CONFIG_ARM64@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%r12, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.3:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rbx
	jmp	LBB0_4
LBB0_2:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	movq	_cmp_mem_desc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_sort
LBB0_5:
	testq	%r12, %r12
	je	LBB0_18
## %bb.6:
	movq	%rbx, %rcx
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r13), %eax
	movl	%eax, 12(%r13)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	addl	%ecx, %r14d
	movslq	%r14d, %r14
	movq	%r13, %r15
	cmpq	%r12, %r14
	jae	LBB0_18
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%r14), %r13
	movq	_EFI_MEMORY_RUNTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx,%r14)
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r13), %ebx
	movq	_EFI_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	imull	8(%r13), %r12d
	xorl	%eax, %eax
	callq	_novamap
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_CONFIG_ARM64@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_regions_are_adjacent
	testl	%eax, %eax
	je	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_regions_have_compatible_memory_type_attrs
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r13), %edi
	movq	_SZ_64K@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_round_down
	movl	%eax, %ebx
	movl	4(%r13), %edi
	movl	%edi, %eax
	subl	%ebx, %eax
	addl	%eax, %r12d
	movq	_SZ_2M@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_IS_ALIGNED
	movl	(%r15), %esi
	cmpl	%esi, %r12d
	movq	_SZ_64K@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovll	%ecx, %esi
	testq	%rax, %rax
	cmovel	%ecx, %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_round_up
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	addl	%eax, %r12d
	subl	%ebx, %eax
	addl	4(%r13), %eax
	movl	%eax, 12(%r13)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
	movq	%r15, %rcx
	addq	%r15, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_16
LBB0_18:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_virtmap_base,4,2               ## @virtmap_base
	.comm	_CONFIG_ARM64,4,2               ## @CONFIG_ARM64
	.comm	_cmp_mem_desc,4,2               ## @cmp_mem_desc
	.comm	_EFI_MEMORY_RUNTIME,4,2         ## @EFI_MEMORY_RUNTIME
	.comm	_EFI_PAGE_SIZE,4,2              ## @EFI_PAGE_SIZE
	.comm	_SZ_64K,4,2                     ## @SZ_64K
	.comm	_SZ_2M,4,2                      ## @SZ_2M
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_virtmap                ; -- Begin function efi_get_virtmap
	.p2align	2
_efi_get_virtmap:                       ; @efi_get_virtmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	stp	x4, x3, [sp]                    ; 16-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _virtmap_base@GOTPAGE
Lloh1:
	ldr	x8, [x8, _virtmap_base@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _CONFIG_ARM64@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONFIG_ARM64@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _cmp_mem_desc@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cmp_mem_desc@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	udiv	x1, x22, x21
	mov	x0, x23
	mov	x2, x21
	mov	x4, #0
	bl	_sort
LBB0_2:
	cbz	x22, LBB0_13
; %bb.3:
	mov	x28, #0
	mov	x27, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25, #4]
	str	w8, [x25, #12]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w28, w21
	sxtw	x28, w8
	mov	x27, x25
	cmp	x28, x22
	b.hs	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x25, x23, x28
	ldr	w8, [x25]
Lloh9:
	adrp	x9, _EFI_MEMORY_RUNTIME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EFI_MEMORY_RUNTIME@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w26, w19, [x25, #4]
Lloh12:
	adrp	x8, _EFI_PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EFI_PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	bl	_novamap
	cbnz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mul	w19, w20, w19
Lloh15:
	adrp	x8, _CONFIG_ARM64@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CONFIG_ARM64@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x27
	mov	x1, x25
	bl	_regions_are_adjacent
	cbz	w0, LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x27
	mov	x1, x25
	bl	_regions_have_compatible_memory_type_attrs
	cbnz	w0, LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x25, #4]
Lloh18:
	adrp	x20, _SZ_64K@GOTPAGE
Lloh19:
	ldr	x20, [x20, _SZ_64K@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_round_down
	mov	x26, x0
	ldr	w0, [x25, #4]
	sub	w8, w0, w26
	add	w19, w8, w19
Lloh20:
	adrp	x27, _SZ_2M@GOTPAGE
Lloh21:
	ldr	x27, [x27, _SZ_2M@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_IS_ALIGNED
	ldr	w8, [x27]
	cmp	w19, w8
	ccmp	x0, #0, #4, ge
	ldr	w9, [x20]
	csel	w1, w9, w8, eq
	mov	x0, x24
	bl	_round_up
	mov	x24, x0
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25, #4]
	sub	w9, w24, w26
	add	w8, w9, w8
	str	w8, [x25, #12]
	add	w24, w19, w24
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x19
	mov	x1, x25
	mov	x2, x21
	bl	_memcpy
	add	x19, x19, x21
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	b	LBB0_5
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_virtmap_base,4,2               ; @virtmap_base
	.comm	_CONFIG_ARM64,4,2               ; @CONFIG_ARM64
	.comm	_cmp_mem_desc,4,2               ; @cmp_mem_desc
	.comm	_EFI_MEMORY_RUNTIME,4,2         ; @EFI_MEMORY_RUNTIME
	.comm	_EFI_PAGE_SIZE,4,2              ; @EFI_PAGE_SIZE
	.comm	_SZ_64K,4,2                     ; @SZ_64K
	.comm	_SZ_2M,4,2                      ; @SZ_2M
.subsections_via_symbols
