	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pat_index
_pmap_pat_index:                        ## @pmap_pat_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movl	(%rdi), %eax
	xorl	%r14d, %r14d
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.5:
	testl	%edx, %edx
	jne	LBB0_6
## %bb.7:
	movq	_X86_PG_PTE_PAT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.2:
	movq	_EPT_PG_IGNORE_PAT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_panic
LBB0_4:
	movl	$7, %edi
	callq	_EPT_PG_MEMORY_TYPE
	andl	%ebx, %eax
	sarl	$3, %eax
	cmpl	$4, %eax
	jne	LBB0_10
	jmp	LBB0_13
LBB0_6:
	movq	_X86_PG_PDE_PAT@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ecx, %ecx
	testl	%ebx, (%rax)
	setne	%cl
	leal	(,%rcx,4), %eax
	movq	_PG_NC_PCD@GOTPCREL(%rip), %rdx
	testl	%ebx, (%rdx)
	leal	2(,%rcx,4), %ecx
	cmovel	%eax, %ecx
	movq	_PG_NC_PWT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ebx, (%rdx)
	setne	%al
	orl	%ecx, %eax
	cmpl	$4, %eax
	je	LBB0_13
LBB0_10:
	cmpl	$7, %eax
	jne	LBB0_12
## %bb.11:
	movl	$3, %r14d
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %r14d
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86_PG_PDE_PAT,4,2             ## @X86_PG_PDE_PAT
	.comm	_X86_PG_PTE_PAT,4,2             ## @X86_PG_PTE_PAT
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EPT PTE %#lx has no PAT memory type"

	.no_dead_strip	_pmap_pat_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pat_index
_pmap_pat_index:                        ; @pmap_pat_index
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _X86_PG_PDE_PAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X86_PG_PDE_PAT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _X86_PG_PTE_PAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _X86_PG_PTE_PAT@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	tst	w8, w19
	cset	w8, ne
Lloh4:
	adrp	x9, _PG_NC_PCD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PG_NC_PCD@GOTPAGEOFF]
	lsl	w10, w8, #2
Lloh6:
	ldr	w9, [x9]
	mov	w11, #2
	bfi	w11, w8, #2, #1
	tst	w9, w19
	csel	w8, w10, w11, eq
Lloh7:
	adrp	x9, _PG_NC_PWT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PG_NC_PWT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w19
	cset	w9, ne
	orr	w0, w8, w9
	cmp	w0, #4
	b.ne	LBB0_6
	b	LBB0_8
LBB0_2:
	cmp	w8, #130
	b.ne	LBB0_8
; %bb.3:
Lloh10:
	adrp	x8, _EPT_PG_IGNORE_PAT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPT_PG_IGNORE_PAT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_5
; %bb.4:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_5:
	mov	w0, #7
	bl	_EPT_PG_MEMORY_TYPE
	and	w8, w0, w19
	asr	w0, w8, #3
	cmp	w0, #4
	b.eq	LBB0_8
LBB0_6:
	cmp	w0, #7
	b.ne	LBB0_9
; %bb.7:
	mov	w0, #3
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_X86_PG_PDE_PAT,4,2             ; @X86_PG_PDE_PAT
	.comm	_X86_PG_PTE_PAT,4,2             ; @X86_PG_PTE_PAT
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EPT PTE %#lx has no PAT memory type"

	.no_dead_strip	_pmap_pat_index
.subsections_via_symbols
