	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_cache_bits                ## -- Begin function pmap_cache_bits
	.p2align	4, 0x90
_pmap_cache_bits:                       ## @pmap_cache_bits
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_pmap_is_valid_memattr
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_panic
LBB0_2:
	movl	(%rbx), %esi
	leal	-128(%rsi), %eax
	cmpl	$2, %eax
	jae	LBB0_3
## %bb.5:
	movq	_pat_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%ecx, %edx
	shll	$29, %edx
	sarl	$31, %edx
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.7:
	movq	_X86_PG_PTE_PAT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_3:
	cmpl	$130, %esi
	jne	LBB0_10
## %bb.4:
	movq	_EPT_PG_IGNORE_PAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_EPT_PG_MEMORY_TYPE
	orl	%ebx, %eax
	jmp	LBB0_11
LBB0_6:
	movq	_X86_PG_PDE_PAT@GOTPCREL(%rip), %rax
LBB0_8:
	andl	(%rax), %edx
	movl	%ecx, %eax
	shll	$30, %eax
	sarl	$31, %eax
	movq	_PG_NC_PCD@GOTPCREL(%rip), %rsi
	andl	(%rsi), %eax
	orl	%edx, %eax
	testb	$1, %cl
	je	LBB0_11
## %bb.9:
	movq	_PG_NC_PWT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_panic
                                        ## implicit-def: $eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown caching mode %d\n"

	.comm	_X86_PG_PDE_PAT,4,2             ## @X86_PG_PDE_PAT
	.comm	_X86_PG_PTE_PAT,4,2             ## @X86_PG_PTE_PAT
	.comm	_pat_index,8,3                  ## @pat_index
	.comm	_PG_NC_PCD,4,2                  ## @PG_NC_PCD
	.comm	_PG_NC_PWT,4,2                  ## @PG_NC_PWT
	.comm	_EPT_PG_IGNORE_PAT,4,2          ## @EPT_PG_IGNORE_PAT
L_.str.1:                               ## @.str.1
	.asciz	"unsupported pmap type %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_cache_bits                ; -- Begin function pmap_cache_bits
	.p2align	2
_pmap_cache_bits:                       ; @pmap_cache_bits
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_pmap_is_valid_memattr
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_2:
	ldr	w1, [x21]
	sub	w8, w1, #128
	cmp	w8, #2
	b.hs	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _pat_index@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pat_index@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w8, [x8, w19, sxtw #2]
	lsl	w9, w8, #29
Lloh5:
	adrp	x10, _X86_PG_PTE_PAT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _X86_PG_PTE_PAT@GOTPAGEOFF]
Lloh7:
	adrp	x11, _X86_PG_PDE_PAT@GOTPAGE
Lloh8:
	ldr	x11, [x11, _X86_PG_PDE_PAT@GOTPAGEOFF]
	cmp	w20, #0
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	and	w9, w10, w9, asr #31
	lsl	w10, w8, #30
Lloh9:
	adrp	x11, _PG_NC_PCD@GOTPAGE
Lloh10:
	ldr	x11, [x11, _PG_NC_PCD@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	and	w10, w11, w10, asr #31
	orr	w0, w9, w10
	tbz	w8, #0, LBB0_8
; %bb.4:
Lloh12:
	adrp	x8, _PG_NC_PWT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PG_NC_PWT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w0, w8, w0
	b	LBB0_8
LBB0_5:
	cmp	w1, #130
	b.ne	LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _EPT_PG_IGNORE_PAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPT_PG_IGNORE_PAT@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_EPT_PG_MEMORY_TYPE
	orr	w0, w0, w20
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
                                        ; implicit-def: $w0
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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown caching mode %d\n"

	.comm	_X86_PG_PDE_PAT,4,2             ; @X86_PG_PDE_PAT
	.comm	_X86_PG_PTE_PAT,4,2             ; @X86_PG_PTE_PAT
	.comm	_pat_index,8,3                  ; @pat_index
	.comm	_PG_NC_PCD,4,2                  ; @PG_NC_PCD
	.comm	_PG_NC_PWT,4,2                  ; @PG_NC_PWT
	.comm	_EPT_PG_IGNORE_PAT,4,2          ; @EPT_PG_IGNORE_PAT
l_.str.1:                               ; @.str.1
	.asciz	"unsupported pmap type %d"

.subsections_via_symbols
