	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_map_entry                 ## -- Begin function pmap_map_entry
	.p2align	4, 0x90
_pmap_map_entry:                        ## @pmap_map_entry
	.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	%r8d, %ebx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rdx, %rax
	orq	%rsi, %rax
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andq	(%rcx), %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$130, %ebx
	jne	LBB0_2
## %bb.3:
	movq	_pte_l2_s_cache_mode@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_pte_l2_s_cache_mode_pt@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %r14
	jmp	LBB0_6
LBB0_2:
	xorl	%r14d, %r14d
LBB0_6:
	movq	_L1_S_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r13, %rax
	shrq	%cl, %rax
	movq	_L1_TYPE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r12,%rax,4), %ecx
	movq	_L1_TYPE_C@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_panic
LBB0_8:
	movq	%r13, %rdi
	callq	_L1_IDX
	movq	_L1_C_ADDR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%r12,%rax,4), %edi
	callq	_kernel_pt_lookup
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	callq	_panic
LBB0_10:
	movq	_L2_S_PROTO@GOTPCREL(%rip), %rax
	movq	_PTE_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orq	%r15, %r14
	orq	(%rax), %r14
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_L2_S_PROT
	movq	%rax, %rbx
	orq	%r14, %rbx
	movq	%r13, %rdi
	callq	_l2pte_index
	movq	%rbx, (%r12,%rax,8)
	movq	%r13, %rdi
	callq	_l2pte_index
	leaq	(%r12,%rax,8), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTE_SYNC                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ouin"

	.comm	_pte_l2_s_cache_mode,8,3        ## @pte_l2_s_cache_mode
	.comm	_pte_l2_s_cache_mode_pt,8,3     ## @pte_l2_s_cache_mode_pt
	.comm	_L1_S_SHIFT,8,3                 ## @L1_S_SHIFT
	.comm	_L1_TYPE_MASK,4,2               ## @L1_TYPE_MASK
	.comm	_L1_TYPE_C,4,2                  ## @L1_TYPE_C
L_.str.1:                               ## @.str.1
	.asciz	"pmap_map_entry: no L2 table for VA 0x%08x"

	.comm	_L1_C_ADDR_MASK,4,2             ## @L1_C_ADDR_MASK
L_.str.2:                               ## @.str.2
	.asciz	"pmap_map_entry: can't find L2 table for VA 0x%08x"

	.comm	_L2_S_PROTO,8,3                 ## @L2_S_PROTO
	.comm	_PTE_KERNEL,4,2                 ## @PTE_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_map_entry                 ; -- Begin function pmap_map_entry
	.p2align	2
_pmap_map_entry:                        ; @pmap_map_entry
	.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	x23, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	orr	x8, x2, x1
Lloh0:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	tst	x9, x8
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cmp	w23, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w23, #130
	b.ne	LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _pte_l2_s_cache_mode@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pte_l2_s_cache_mode@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _pte_l2_s_cache_mode_pt@GOTPAGE
Lloh8:
	ldr	x8, [x8, _pte_l2_s_cache_mode_pt@GOTPAGEOFF]
LBB0_4:
	ldr	x23, [x8]
	b	LBB0_6
LBB0_5:
	mov	x23, #0
LBB0_6:
Lloh9:
	adrp	x8, _L1_S_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _L1_S_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	lsr	x8, x19, x8
	ldr	w8, [x22, x8, lsl #2]
Lloh12:
	adrp	x9, _L1_TYPE_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _L1_TYPE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh15:
	adrp	x9, _L1_TYPE_C@GOTPAGE
Lloh16:
	ldr	x9, [x9, _L1_TYPE_C@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.7:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_8:
	mov	x0, x19
	bl	_L1_IDX
	ldr	w8, [x22, x0, lsl #2]
Lloh20:
	adrp	x9, _L1_C_ADDR_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _L1_C_ADDR_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_kernel_pt_lookup
	mov	x22, x0
	cbnz	x0, LBB0_10
; %bb.9:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_10:
Lloh25:
	adrp	x8, _L2_S_PROTO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _L2_S_PROTO@GOTPAGEOFF]
Lloh27:
	ldr	x24, [x8]
Lloh28:
	adrp	x8, _PTE_KERNEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PTE_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_L2_S_PROT
	orr	x8, x23, x20
	orr	x8, x8, x24
	orr	x20, x8, x0
	mov	x0, x19
	bl	_l2pte_index
	str	x20, [x22, x0, lsl #3]
	mov	x0, x19
	bl	_l2pte_index
	add	x0, x22, x0, lsl #3
	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
	b	_PTE_SYNC
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ouin"

	.comm	_pte_l2_s_cache_mode,8,3        ; @pte_l2_s_cache_mode
	.comm	_pte_l2_s_cache_mode_pt,8,3     ; @pte_l2_s_cache_mode_pt
	.comm	_L1_S_SHIFT,8,3                 ; @L1_S_SHIFT
	.comm	_L1_TYPE_MASK,4,2               ; @L1_TYPE_MASK
	.comm	_L1_TYPE_C,4,2                  ; @L1_TYPE_C
l_.str.1:                               ; @.str.1
	.asciz	"pmap_map_entry: no L2 table for VA 0x%08x"

	.comm	_L1_C_ADDR_MASK,4,2             ; @L1_C_ADDR_MASK
l_.str.2:                               ; @.str.2
	.asciz	"pmap_map_entry: can't find L2 table for VA 0x%08x"

	.comm	_L2_S_PROTO,8,3                 ; @L2_S_PROTO
	.comm	_PTE_KERNEL,4,2                 ; @PTE_KERNEL
.subsections_via_symbols
