	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_set_pt_cache_mode
_pmap_set_pt_cache_mode:                ## @pmap_set_pt_cache_mode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_L1_IDX
	movq	%rax, %r12
	movl	(%r15,%rax,4), %ebx
	movl	%ebx, %edi
	callq	_l1pte_section_p
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_L1_S_CACHE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	andl	%ebx, %eax
	movq	_pte_l1_s_cache_mode_pt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ecx, %ecx
	cmpl	%esi, %eax
	je	LBB0_8
## %bb.2:
	leaq	(%r15,%r12,4), %r14
	jmp	LBB0_7
LBB0_3:
	movslq	%ebx, %rax
	movq	_L1_C_ADDR_MASK@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdi
	andq	%rax, %rdi
	callq	_kernel_pt_lookup
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	callq	_panic
LBB0_5:
	movq	%r14, %rdi
	callq	_l2pte_index
	movl	(%r15,%rax,4), %ebx
	movq	_L2_S_CACHE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %edi
	andl	%ebx, %edi
	movq	_pte_l2_s_cache_mode_pt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ecx, %ecx
	cmpl	%esi, %edi
	je	LBB0_8
## %bb.6:
	leaq	(%r15,%rax,4), %r14
LBB0_7:
	notl	%edx
	andl	%ebx, %edx
	orl	%esi, %edx
	movl	%edx, (%r14)
	movq	%r14, %rdi
	callq	_PTE_SYNC
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_cpu_dcache_wbinv_range
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_cpu_l2cache_wbinv_range
	movl	$1, %ecx
LBB0_8:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L1_S_CACHE_MASK,4,2            ## @L1_S_CACHE_MASK
	.comm	_pte_l1_s_cache_mode_pt,4,2     ## @pte_l1_s_cache_mode_pt
	.comm	_L1_C_ADDR_MASK,4,2             ## @L1_C_ADDR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_bootstrap: No L2 for L2 @ va %p\n"

	.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
	.no_dead_strip	_pmap_set_pt_cache_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_set_pt_cache_mode
_pmap_set_pt_cache_mode:                ; @pmap_set_pt_cache_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_L1_IDX
	add	x19, x19, x0, lsl #2
	ldr	w20, [x19]
	mov	x0, x20
	bl	_l1pte_section_p
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _L1_S_CACHE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L1_S_CACHE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w10, w8, w20
Lloh3:
	adrp	x9, _pte_l1_s_cache_mode_pt@GOTPAGE
Lloh4:
	ldr	x9, [x9, _pte_l1_s_cache_mode_pt@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	sxtw	x8, w20
Lloh5:
	adrp	x9, _L1_C_ADDR_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _L1_C_ADDR_MASK@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	and	x0, x9, x8
	bl	_kernel_pt_lookup
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, #0
	bl	_panic
LBB0_4:
	mov	x0, x21
	bl	_l2pte_index
	add	x19, x19, x0, lsl #2
	ldr	w20, [x19]
Lloh10:
	adrp	x8, _L2_S_CACHE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _L2_S_CACHE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w10, w8, w20
Lloh13:
	adrp	x9, _pte_l2_s_cache_mode_pt@GOTPAGE
Lloh14:
	ldr	x9, [x9, _pte_l2_s_cache_mode_pt@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x9]
	cmp	w10, w9
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	bic	w8, w20, w8
	orr	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_PTE_SYNC
	mov	x0, x19
	mov	w1, #4
	bl	_cpu_dcache_wbinv_range
	mov	x0, x19
	mov	w1, #4
	bl	_cpu_l2cache_wbinv_range
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_L1_S_CACHE_MASK,4,2            ; @L1_S_CACHE_MASK
	.comm	_pte_l1_s_cache_mode_pt,4,2     ; @pte_l1_s_cache_mode_pt
	.comm	_L1_C_ADDR_MASK,4,2             ; @L1_C_ADDR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_bootstrap: No L2 for L2 @ va %p\n"

	.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
	.no_dead_strip	_pmap_set_pt_cache_mode
.subsections_via_symbols
