	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MempAllocatePTE
_MempAllocatePTE:                       ## @MempAllocatePTE
	.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	_PhysicalPageTables@GOTPCREL(%rip), %rax
	movq	_MM_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	imulq	(%rax), %rcx
	movq	_PhysicalPageTablesBuffer@GOTPCREL(%rip), %r8
	shlq	$2, %rcx
	addq	(%r8), %rcx
	movq	%rcx, (%rsi)
	incq	(%rax)
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	(%rsi), %rdx
	movq	_MM_PAGE_SHIFT@GOTPCREL(%rip), %r8
	movb	(%r8), %cl
	shrq	%cl, %rdx
	movq	_PDE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rdi, %rcx
	shlq	$4, %rcx
	movq	%rdx, (%rax,%rcx)
	movabsq	$4294967297, %rdx               ## imm = 0x100000001
	movq	%rdx, 8(%rax,%rcx)
	movq	_KSEG0_BASE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	sarl	$22, %ecx
	movslq	%ecx, %rsi
	addq	%rdi, %rsi
	cmpq	$1024, %rsi                     ## imm = 0x400
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r8, %rbx
	callq	_TRACE
	movq	%rbx, %r8
	movq	_MM_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movq	(%r15), %rax
	movl	(%r13), %ecx
	sarl	$22, %ecx
	movslq	%ecx, %rsi
	addq	%r12, %rsi
LBB0_2:
	movq	_KernelPageTables@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rdx
	imulq	(%rcx), %rdx
	movq	_KernelPageTablesBuffer@GOTPCREL(%rip), %rdi
	shlq	$2, %rdx
	addq	(%rdi), %rdx
	movq	%rdx, (%r14)
	incq	(%rcx)
	movq	(%r14), %rdx
	movb	(%r8), %cl
	shrq	%cl, %rdx
	shlq	$4, %rsi
	movq	%rdx, (%rax,%rsi)
	movl	$1, 8(%rax,%rsi)
	movl	(%r13), %ecx
	sarl	$22, %ecx
	movslq	%ecx, %rcx
	addq	%r12, %rcx
	shlq	$4, %rcx
	movl	$1, 12(%rax,%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PhysicalPageTablesBuffer,8,3   ## @PhysicalPageTablesBuffer
	.comm	_PhysicalPageTables,8,3         ## @PhysicalPageTables
	.comm	_MM_PAGE_SIZE,8,3               ## @MM_PAGE_SIZE
	.comm	_MM_PAGE_SHIFT,8,3              ## @MM_PAGE_SHIFT
	.comm	_PDE,8,3                        ## @PDE
	.comm	_KSEG0_BASE,4,2                 ## @KSEG0_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING! Entry: %X > 1023\n"

	.comm	_KernelPageTablesBuffer,8,3     ## @KernelPageTablesBuffer
	.comm	_KernelPageTables,8,3           ## @KernelPageTables
	.no_dead_strip	_MempAllocatePTE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MempAllocatePTE
_MempAllocatePTE:                       ; @MempAllocatePTE
	.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	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _PhysicalPageTablesBuffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PhysicalPageTablesBuffer@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PhysicalPageTables@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PhysicalPageTables@GOTPAGEOFF]
	ldr	x10, [x9]
Lloh5:
	adrp	x21, _MM_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MM_PAGE_SIZE@GOTPAGEOFF]
	ldr	x11, [x21]
	mul	x10, x11, x10
	add	x8, x8, x10, lsl #2
	str	x8, [x1]
	ldr	x8, [x9]
	add	x8, x8, #1
	str	x8, [x9]
	ldr	x8, [x1]
Lloh7:
	adrp	x22, _MM_PAGE_SHIFT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MM_PAGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh9:
	adrp	x24, _PDE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _PDE@GOTPAGEOFF]
	lsr	x9, x8, x9
	ldr	x8, [x24]
	add	x10, x8, x0, lsl #4
	str	x9, [x10]
	movi.2s	v0, #1
	str	d0, [x10, #8]
Lloh11:
	adrp	x23, _KSEG0_BASE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _KSEG0_BASE@GOTPAGEOFF]
	ldr	w9, [x23]
	asr	w9, w9, #22
	add	x1, x0, w9, sxtw
	cmp	x1, #1024
	b.lo	LBB0_2
; %bb.1:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	x8, [x24]
	ldr	w9, [x23]
	asr	w9, w9, #22
	add	x1, x19, w9, sxtw
LBB0_2:
Lloh15:
	adrp	x9, _KernelPageTablesBuffer@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KernelPageTablesBuffer@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _KernelPageTables@GOTPAGE
Lloh19:
	ldr	x10, [x10, _KernelPageTables@GOTPAGEOFF]
	ldr	x11, [x10]
	ldr	x12, [x21]
	mul	x11, x12, x11
	add	x9, x9, x11, lsl #2
	str	x9, [x20]
	ldr	x9, [x10]
	add	x9, x9, #1
	str	x9, [x10]
	ldr	x9, [x20]
	ldr	x10, [x22]
	lsr	x9, x9, x10
	add	x10, x8, x1, lsl #4
	str	x9, [x10]
	mov	w9, #1
	str	w9, [x10, #8]
	ldr	w10, [x23]
	asr	w10, w10, #22
	add	x10, x19, w10, sxtw
	add	x8, x8, x10, lsl #4
	str	w9, [x8, #12]
	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
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PhysicalPageTablesBuffer,8,3   ; @PhysicalPageTablesBuffer
	.comm	_PhysicalPageTables,8,3         ; @PhysicalPageTables
	.comm	_MM_PAGE_SIZE,8,3               ; @MM_PAGE_SIZE
	.comm	_MM_PAGE_SHIFT,8,3              ; @MM_PAGE_SHIFT
	.comm	_PDE,8,3                        ; @PDE
	.comm	_KSEG0_BASE,4,2                 ; @KSEG0_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING! Entry: %X > 1023\n"

	.comm	_KernelPageTablesBuffer,8,3     ; @KernelPageTablesBuffer
	.comm	_KernelPageTables,8,3           ; @KernelPageTables
	.no_dead_strip	_MempAllocatePTE
.subsections_via_symbols
