	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kernel_pte_alloc
_kernel_pte_alloc:                      ## @kernel_pte_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_kernel_ptbls@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_6
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %r10
	movq	_PTBL_PAGES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movq	_kptbl_min@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	cmpl	$1, %r9d
	jne	LBB0_10
## %bb.2:
	xorl	%ebx, %ebx
	testb	$1, %r9b
	jne	LBB0_5
	jmp	LBB0_6
LBB0_10:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r10, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	imulq	%rsi, %r12
	leaq	(%r12,%r12), %r14
	movl	%r9d, %r11d
	andl	$-2, %r11d
	negq	%r11
	xorl	%ebx, %ebx
	movq	_kernel_pmap@GOTPCREL(%rip), %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rax
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	(%rdi), %rdi
	movq	%rax, (%rdi,%rcx,8)
	leaq	(%r12,%rax), %rdi
	movq	(%r13), %r8
	movq	(%r8), %rsi
	movq	%rdi, 8(%rsi,%rcx,8)
	addq	%r14, %rax
	addq	$2, %rcx
	addq	$-2, %rbx
	cmpq	%rbx, %r11
	jne	LBB0_11
## %bb.3:
	negq	%rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testb	$1, %r9b
	je	LBB0_6
LBB0_5:
	imulq	%rbx, %r10
	imulq	%rsi, %r10
	addq	%rdx, %r10
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	addq	%rbx, %rcx
	movq	%r10, (%rax,%rcx,8)
LBB0_6:
	cmpq	%r14, %r15
	jge	LBB0_9
## %bb.7:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_PDIR_IDX
	movq	(%rbx,%rax,8), %r12
	movq	%r15, %rdi
	callq	_PTBL_IDX
	movq	%rax, %rbx
	movq	_kernload@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	movq	_kernstart@GOTPCREL(%rip), %rax
	subq	(%rax), %rdi
	callq	_PTE_RPN_FROM_PA
	movl	%eax, (%r12,%rbx,4)
	movq	_PTE_M@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_SR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_SW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_SX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_WIRED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_VALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PTE_PS_4KB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12,%rbx,4)
	movslq	(%r13), %rax
	addq	%rax, %r15
	cmpq	%r14, %r15
	jl	LBB0_8
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_ptbls,4,2               ## @kernel_ptbls
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PTBL_PAGES,4,2                 ## @PTBL_PAGES
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_kptbl_min,4,2                  ## @kptbl_min
	.comm	_kernload,8,3                   ## @kernload
	.comm	_kernstart,8,3                  ## @kernstart
	.comm	_PTE_M,4,2                      ## @PTE_M
	.comm	_PTE_SR,4,2                     ## @PTE_SR
	.comm	_PTE_SW,4,2                     ## @PTE_SW
	.comm	_PTE_SX,4,2                     ## @PTE_SX
	.comm	_PTE_WIRED,4,2                  ## @PTE_WIRED
	.comm	_PTE_VALID,4,2                  ## @PTE_VALID
	.comm	_PTE_PS_4KB,4,2                 ## @PTE_PS_4KB
	.no_dead_strip	_kernel_pte_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kernel_pte_alloc
_kernel_pte_alloc:                      ; @kernel_pte_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _kernel_ptbls@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_ptbls@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x9]
Lloh6:
	adrp	x9, _PTBL_PAGES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PTBL_PAGES@GOTPAGEOFF]
Lloh8:
	adrp	x11, _kptbl_min@GOTPAGE
Lloh9:
	ldr	x11, [x11, _kptbl_min@GOTPAGEOFF]
Lloh10:
	ldrsw	x12, [x9]
Lloh11:
	ldrsw	x9, [x11]
	lsl	x9, x9, #3
	mul	x10, x10, x12
Lloh12:
	adrp	x11, _kernel_pmap@GOTPAGE
Lloh13:
	ldr	x11, [x11, _kernel_pmap@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	ldr	x12, [x12]
	str	x2, [x12, x9]
	add	x9, x9, #8
	add	x2, x2, x10
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_3:
	cmp	x19, x20
	b.ge	LBB0_6
; %bb.4:
Lloh14:
	adrp	x26, _PTE_SW@GOTPAGE
Lloh15:
	ldr	x26, [x26, _PTE_SW@GOTPAGEOFF]
Lloh16:
	adrp	x27, _PTE_SX@GOTPAGE
Lloh17:
	ldr	x27, [x27, _PTE_SX@GOTPAGEOFF]
Lloh18:
	adrp	x28, _PTE_WIRED@GOTPAGE
Lloh19:
	ldr	x28, [x28, _PTE_WIRED@GOTPAGEOFF]
Lloh20:
	adrp	x21, _PTE_VALID@GOTPAGE
Lloh21:
	ldr	x21, [x21, _PTE_VALID@GOTPAGEOFF]
Lloh22:
	adrp	x22, _PTE_PS_4KB@GOTPAGE
Lloh23:
	ldr	x22, [x22, _PTE_PS_4KB@GOTPAGEOFF]
Lloh24:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh25:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh26:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh27:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	x24, [x8]
	mov	x0, x19
	bl	_PDIR_IDX
	ldr	x24, [x24, x0, lsl #3]
	mov	x0, x19
	bl	_PTBL_IDX
	lsl	x25, x0, #2
Lloh29:
	adrp	x8, _kernload@GOTPAGE
Lloh30:
	ldr	x8, [x8, _kernload@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
Lloh32:
	adrp	x9, _kernstart@GOTPAGE
Lloh33:
	ldr	x9, [x9, _kernstart@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x8, x8, x19
	sub	x0, x8, x9
	bl	_PTE_RPN_FROM_PA
	str	w0, [x24, x25]
Lloh35:
	adrp	x8, _PTE_M@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PTE_M@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _PTE_SR@GOTPAGE
Lloh39:
	ldr	x9, [x9, _PTE_SR@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	ldr	w10, [x26]
	ldr	w11, [x27]
	ldr	w12, [x28]
	ldr	w13, [x21]
	ldr	w14, [x22]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
	str	w8, [x24, x25]
	ldrsw	x8, [x23]
	add	x19, x19, x8
	cmp	x19, x20
	b.lt	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_ptbls,4,2               ; @kernel_ptbls
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PTBL_PAGES,4,2                 ; @PTBL_PAGES
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_kptbl_min,4,2                  ; @kptbl_min
	.comm	_kernload,8,3                   ; @kernload
	.comm	_kernstart,8,3                  ; @kernstart
	.comm	_PTE_M,4,2                      ; @PTE_M
	.comm	_PTE_SR,4,2                     ; @PTE_SR
	.comm	_PTE_SW,4,2                     ; @PTE_SW
	.comm	_PTE_SX,4,2                     ; @PTE_SX
	.comm	_PTE_WIRED,4,2                  ; @PTE_WIRED
	.comm	_PTE_VALID,4,2                  ; @PTE_VALID
	.comm	_PTE_PS_4KB,4,2                 ; @PTE_PS_4KB
	.no_dead_strip	_kernel_pte_alloc
.subsections_via_symbols
