	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_postinit                  ## -- Begin function pmap_postinit
	.p2align	4, 0x90
_pmap_postinit:                         ## @pmap_postinit
	.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	_maxproc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PMAP_DOMAINS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$1, %edx
	sbbl	$-1, %eax
	leal	-4(,%rax,4), %edi
	movl	%eax, %r14d
	decl	%r14d
	movq	_M_VMPMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_malloc
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	xorl	%eax, %eax
	movq	_L1_TABLE_SIZE@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_pmap_init_l1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addq	$4, %rbx
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	_L1_TABLE_SIZE@GOTPCREL(%rip), %r15
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rdi
	movq	_M_VMPMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, (%rsp)
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$-1, %r8d
	movq	%rdi, %r9
	callq	_contigmalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %r13
	testq	%r13, %r13
	movq	_kernel_pmap@GOTPCREL(%rip), %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	%rbx, %r13
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_pmap_get_l2_bucket
	movq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_l2pte_index
	movq	_L2_S_CACHE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	(%r15,%rax,4), %ecx
	leaq	(%r15,%rax,4), %rdi
	movq	_pte_l2_s_cache_mode_pt@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%r15,%rax,4)
	callq	_PTE_SYNC
	movq	%rbx, %rdi
	callq	_cpu_tlb_flushD_SE
	addq	(%r14), %rbx
	cmpq	%r13, %rbx
	jl	LBB0_6
	jmp	LBB0_7
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_maxproc,4,2                    ## @maxproc
	.comm	_PMAP_DOMAINS,4,2               ## @PMAP_DOMAINS
	.comm	_M_VMPMAP,4,2                   ## @M_VMPMAP
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_L1_TABLE_SIZE,8,3              ## @L1_TABLE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate L1 KVM"

	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_L2_S_CACHE_MASK,4,2            ## @L2_S_CACHE_MASK
	.comm	_pte_l2_s_cache_mode_pt,4,2     ## @pte_l2_s_cache_mode_pt
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_postinit                  ; -- Begin function pmap_postinit
	.p2align	2
_pmap_postinit:                         ; @pmap_postinit
	.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
Lloh0:
	adrp	x8, _maxproc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _maxproc@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PMAP_DOMAINS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PMAP_DOMAINS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cinc	w8, w10, ne
	sub	w20, w8, #1
	lsl	w0, w20, #2
Lloh6:
	adrp	x8, _M_VMPMAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_VMPMAP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_malloc
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	w25, #0
Lloh12:
	adrp	x22, _L1_TABLE_SIZE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _L1_TABLE_SIZE@GOTPAGEOFF]
Lloh14:
	adrp	x27, _kernel_pmap@GOTPAGE
Lloh15:
	ldr	x27, [x27, _kernel_pmap@GOTPAGEOFF]
Lloh16:
	adrp	x28, _L2_S_CACHE_MASK@GOTPAGE
Lloh17:
	ldr	x28, [x28, _L2_S_CACHE_MASK@GOTPAGEOFF]
Lloh18:
	adrp	x20, _pte_l2_s_cache_mode_pt@GOTPAGE
Lloh19:
	ldr	x20, [x20, _pte_l2_s_cache_mode_pt@GOTPAGEOFF]
Lloh20:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh21:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_init_l1
	add	w25, w25, #1
	add	x19, x19, #4
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w25, w8
Lloh22:
	adrp	x22, _L1_TABLE_SIZE@GOTPAGE
Lloh23:
	ldr	x22, [x22, _L1_TABLE_SIZE@GOTPAGEOFF]
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x0, [x22]
Lloh24:
	adrp	x8, _M_VMPMAP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _M_VMPMAP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	mov	w4, #-1
	mov	x5, x0
	mov	w6, #0
	bl	_contigmalloc
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x8, x21
	mov	x22, x21
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x27]
	mov	x1, x22
	bl	_pmap_get_l2_bucket
	ldr	x26, [x0]
	mov	x0, x22
	bl	_l2pte_index
	add	x0, x26, x0, lsl #2
	ldr	w8, [x0]
	ldr	w9, [x28]
	bic	w8, w8, w9
	ldr	w9, [x20]
	orr	w8, w8, w9
	str	w8, [x0]
	bl	_PTE_SYNC
	mov	x0, x22
	bl	_cpu_tlb_flushD_SE
	ldr	x8, [x24]
	add	x22, x8, x22
	cmp	x22, x23
	b.lt	LBB0_7
	b	LBB0_2
LBB0_8:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_maxproc,4,2                    ; @maxproc
	.comm	_PMAP_DOMAINS,4,2               ; @PMAP_DOMAINS
	.comm	_M_VMPMAP,4,2                   ; @M_VMPMAP
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_L1_TABLE_SIZE,8,3              ; @L1_TABLE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate L1 KVM"

	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_L2_S_CACHE_MASK,4,2            ; @L2_S_CACHE_MASK
	.comm	_pte_l2_s_cache_mode_pt,4,2     ; @pte_l2_s_cache_mode_pt
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
