	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _pmap_alloc_l3
__pmap_alloc_l3:                        ## @_pmap_alloc_l3
	.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	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	movq	_VM_ALLOC_NOOBJ@GOTPCREL(%rip), %rax
	movq	_VM_ALLOC_WIRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_VM_ALLOC_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_vm_page_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %r15
	movq	_PG_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_pmap_zero_page
LBB0_6:
	movq	_NUL1E@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r12, %rax
	jbe	LBB0_7
## %bb.8:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_L1_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_L2_SHIFT@GOTPCREL(%rip), %rax
	subl	(%rax), %ecx
	movq	%r12, %rbx
                                        ## kill: def $cl killed $cl killed $ecx
	shrq	%cl, %rbx
	leaq	(,%rbx,4), %r13
	addq	(%r14), %r13
	movq	%r13, %rdi
	callq	_pmap_load
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	movq	%r13, %rdi
	callq	_pmap_load
	movq	%rax, %rdi
	callq	_PTE_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	incl	4(%rax)
	jmp	LBB0_12
LBB0_1:
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_RELEASE_PV_LIST_LOCK
	movq	%r14, %rdi
	callq	_PMAP_UNLOCK
	movq	_pvh_global_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_rw_runlock
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_vm_wait
	movq	%rbx, %rdi
	callq	_rw_rlock
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	jmp	LBB0_14
LBB0_7:
	subq	%rax, %r12
	leaq	(,%r12,4), %r13
	addq	(%r14), %r13
	movq	%r15, %rdi
	callq	_VM_PAGE_TO_PHYS
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	movq	_PTE_PPN0_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_PTE_V@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pmap_store
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_pmap_distribute_l1
	jmp	LBB0_13
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_9:
	movq	_NUL1E@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	__pmap_alloc_l3
	testq	%rax, %rax
	je	LBB0_10
LBB0_12:
	movq	%r13, %rdi
	callq	_pmap_load
	movq	%rax, %rdi
	callq	_PTE_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_DMAP
	movq	_Ln_ADDR_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %r12
	leaq	(%rax,%r12,4), %rbx
	movq	%r15, %rdi
	callq	_VM_PAGE_TO_PHYS
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_PTE_PPN0_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_PTE_V@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pmap_store
LBB0_13:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pmap_resident_count_inc
LBB0_14:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
	callq	_vm_page_unwire_noq
	movq	%r15, %rdi
	callq	_vm_page_free_zero
	xorl	%r15d, %r15d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_VM_ALLOC_NOOBJ,4,2             ## @VM_ALLOC_NOOBJ
	.comm	_VM_ALLOC_WIRED,4,2             ## @VM_ALLOC_WIRED
	.comm	_VM_ALLOC_ZERO,4,2              ## @VM_ALLOC_ZERO
	.comm	_pvh_global_lock,4,2            ## @pvh_global_lock
	.comm	_PG_ZERO,4,2                    ## @PG_ZERO
	.comm	_NUL1E,8,3                      ## @NUL1E
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PTE_V,4,2                      ## @PTE_V
	.comm	_PTE_PPN0_S,4,2                 ## @PTE_PPN0_S
	.comm	_L1_SHIFT,8,3                   ## @L1_SHIFT
	.comm	_L2_SHIFT,8,3                   ## @L2_SHIFT
	.comm	_Ln_ADDR_MASK,8,3               ## @Ln_ADDR_MASK
	.no_dead_strip	__pmap_alloc_l3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _pmap_alloc_l3
__pmap_alloc_l3:                        ; @_pmap_alloc_l3
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_PMAP_LOCK_ASSERT
Lloh3:
	adrp	x8, _VM_ALLOC_NOOBJ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_ALLOC_NOOBJ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _VM_ALLOC_WIRED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_ALLOC_WIRED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _VM_ALLOC_ZERO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VM_ALLOC_ZERO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, #0
	mov	x1, x21
	bl	_vm_page_alloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
Lloh12:
	adrp	x9, _PG_ZERO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PG_ZERO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_pmap_zero_page
LBB0_3:
Lloh15:
	adrp	x24, _NUL1E@GOTPAGE
Lloh16:
	ldr	x24, [x24, _NUL1E@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x21
	b.ls	LBB0_8
; %bb.4:
Lloh17:
	adrp	x8, _L1_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _L1_SHIFT@GOTPAGEOFF]
Lloh19:
	adrp	x9, _L2_SHIFT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _L2_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	ldr	x9, [x9]
	sub	x8, x8, x9
	lsr	x25, x21, x8
	ldr	x8, [x19]
	add	x23, x8, x25, lsl #2
	mov	x0, x23
	bl	_pmap_load
	cbz	x0, LBB0_10
; %bb.5:
	mov	x0, x23
	bl	_pmap_load
	bl	_PTE_TO_PHYS
	bl	_PHYS_TO_VM_PAGE
	ldr	w8, [x0, #4]
	add	w8, w8, #1
	str	w8, [x0, #4]
	b	LBB0_11
LBB0_6:
	cbz	x22, LBB0_9
; %bb.7:
	mov	x0, x22
	bl	_RELEASE_PV_LIST_LOCK
	mov	x0, x19
	bl	_PMAP_UNLOCK
Lloh23:
	adrp	x20, _pvh_global_lock@GOTPAGE
Lloh24:
	ldr	x20, [x20, _pvh_global_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_rw_runlock
	mov	x0, #0
	bl	_vm_wait
	mov	x0, x20
	bl	_rw_rlock
	mov	x0, x19
	bl	_PMAP_LOCK
	mov	x20, #0
	b	LBB0_13
LBB0_8:
	sub	x21, x21, x8
	ldr	x8, [x19]
	add	x22, x8, x21, lsl #2
	mov	x0, x20
	bl	_VM_PAGE_TO_PHYS
Lloh25:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	sdiv	w8, w0, w8
Lloh28:
	adrp	x9, _PTE_V@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PTE_V@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _PTE_PPN0_S@GOTPAGE
Lloh32:
	ldr	x10, [x10, _PTE_PPN0_S@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w23, w8, w9
	mov	x0, x22
	mov	x1, x23
	bl	_pmap_store
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_pmap_distribute_l1
	b	LBB0_12
LBB0_9:
	mov	x20, #0
	b	LBB0_13
LBB0_10:
	ldr	x8, [x24]
	add	x1, x8, x25
	mov	x0, x19
	mov	x2, x22
	bl	__pmap_alloc_l3
	cbz	x0, LBB0_14
LBB0_11:
	mov	x0, x23
	bl	_pmap_load
	bl	_PTE_TO_PHYS
	bl	_PHYS_TO_DMAP
Lloh34:
	adrp	x8, _Ln_ADDR_MASK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _Ln_ADDR_MASK@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	and	x8, x8, x21
	add	x21, x0, x8, lsl #2
	mov	x0, x20
	bl	_VM_PAGE_TO_PHYS
Lloh37:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	sdiv	w8, w0, w8
Lloh40:
	adrp	x9, _PTE_V@GOTPAGE
Lloh41:
	ldr	x9, [x9, _PTE_V@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
Lloh43:
	adrp	x10, _PTE_PPN0_S@GOTPAGE
Lloh44:
	ldr	x10, [x10, _PTE_PPN0_S@GOTPAGEOFF]
Lloh45:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w1, w8, w9
	mov	x0, x21
	bl	_pmap_store
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_pmap_resident_count_inc
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x0, x20
	bl	_vm_page_unwire_noq
	mov	x0, x20
	bl	_vm_page_free_zero
	mov	x20, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_VM_ALLOC_NOOBJ,4,2             ; @VM_ALLOC_NOOBJ
	.comm	_VM_ALLOC_WIRED,4,2             ; @VM_ALLOC_WIRED
	.comm	_VM_ALLOC_ZERO,4,2              ; @VM_ALLOC_ZERO
	.comm	_pvh_global_lock,4,2            ; @pvh_global_lock
	.comm	_PG_ZERO,4,2                    ; @PG_ZERO
	.comm	_NUL1E,8,3                      ; @NUL1E
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PTE_V,4,2                      ; @PTE_V
	.comm	_PTE_PPN0_S,4,2                 ; @PTE_PPN0_S
	.comm	_L1_SHIFT,8,3                   ; @L1_SHIFT
	.comm	_L2_SHIFT,8,3                   ; @L2_SHIFT
	.comm	_Ln_ADDR_MASK,8,3               ; @Ln_ADDR_MASK
	.no_dead_strip	__pmap_alloc_l3
.subsections_via_symbols
