	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MmInitPageLookupTable          ## -- Begin function MmInitPageLookupTable
	.p2align	4, 0x90
_MmInitPageLookupTable:                 ## @MmInitPageLookupTable
	.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
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_MmLowestPhysicalPage@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LoaderFirmwarePermanent@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_MmMarkPagesInLookupTable
	xorl	%edi, %edi
	callq	_ArcGetMemoryDescriptor
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_ArcGetMemoryDescriptor
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r12d
	movl	8(%rbx), %edi
	movl	4(%rbx), %r13d
	addl	%r12d, %r13d
	callq	_MmGetSystemMemoryMapTypeString
	cmpl	%r15d, %r13d
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_MmMarkPagesInLookupTable
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_MmGetPageNumberFromAddress
	movl	%eax, %r12d
	shll	$2, %r15d
	movq	_MM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_ROUND_UP
	leaq	(%rax,%r14), %rdi
	callq	_MmGetPageNumberFromAddress
	movl	%eax, %ebx
	subl	%r12d, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_TRACE
	movq	_LoaderFirmwareTemporary@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MmMarkPagesInLookupTable       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MmInitPageLookupTable()\n"

	.comm	_MmLowestPhysicalPage,4,2       ## @MmLowestPhysicalPage
	.comm	_LoaderFirmwarePermanent,4,2    ## @LoaderFirmwarePermanent
L_.str.1:                               ## @.str.1
	.asciz	"Marking pages 0x%lx-0x%lx as type %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Ignoring pages 0x%lx-0x%lx (%s)\n"

	.comm	_MM_PAGE_SIZE,4,2               ## @MM_PAGE_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Marking the page lookup table pages as reserved StartPage: 0x%x PageCount: 0x%x\n"

	.comm	_LoaderFirmwareTemporary,4,2    ## @LoaderFirmwareTemporary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MmInitPageLookupTable          ; -- Begin function MmInitPageLookupTable
	.p2align	2
_MmInitPageLookupTable:                 ; @MmInitPageLookupTable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh2:
	adrp	x8, _MmLowestPhysicalPage@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MmLowestPhysicalPage@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _LoaderFirmwarePermanent@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LoaderFirmwarePermanent@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_MmMarkPagesInLookupTable
	mov	x0, #0
	bl	_ArcGetMemoryDescriptor
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
Lloh8:
	adrp	x22, l_.str.2@PAGE
Lloh9:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh10:
	adrp	x23, l_.str.1@PAGE
Lloh11:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	stp	x25, x0, [sp, #8]
	str	x24, [sp]
	mov	x0, x22
	bl	_TRACE
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_ArcGetMemoryDescriptor
	mov	x21, x0
	cbz	x0, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w24, w8, [x21]
	add	w25, w8, w24
	ldr	w0, [x21, #8]
	bl	_MmGetSystemMemoryMapTypeString
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w25, w20
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x25, x0, [sp, #8]
	str	x24, [sp]
	mov	x0, x23
	bl	_TRACE
	ldp	w1, w2, [x21]
	ldr	w3, [x21, #8]
	mov	x0, x19
	bl	_MmMarkPagesInLookupTable
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_MmGetPageNumberFromAddress
	mov	x21, x0
	lsl	w0, w20, #2
Lloh12:
	adrp	x8, _MM_PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MM_PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_ROUND_UP
	add	x0, x0, x19
	bl	_MmGetPageNumberFromAddress
	sub	w20, w0, w21
	stp	x21, x20, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
Lloh17:
	adrp	x8, _LoaderFirmwareTemporary@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LoaderFirmwareTemporary@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	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
	add	sp, sp, #112
	b	_MmMarkPagesInLookupTable
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MmInitPageLookupTable()\n"

	.comm	_MmLowestPhysicalPage,4,2       ; @MmLowestPhysicalPage
	.comm	_LoaderFirmwarePermanent,4,2    ; @LoaderFirmwarePermanent
l_.str.1:                               ; @.str.1
	.asciz	"Marking pages 0x%lx-0x%lx as type %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Ignoring pages 0x%lx-0x%lx (%s)\n"

	.comm	_MM_PAGE_SIZE,4,2               ; @MM_PAGE_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Marking the page lookup table pages as reserved StartPage: 0x%x PageCount: 0x%x\n"

	.comm	_LoaderFirmwareTemporary,4,2    ; @LoaderFirmwareTemporary
.subsections_via_symbols
