	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_swap_pat
_pmap_swap_pat:                         ## @pmap_swap_pat
	.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	%esi, %r14d
	movl	(%rdi), %esi
	leal	-128(%rsi), %eax
	cmpl	$2, %eax
	jae	LBB0_1
## %bb.4:
	movq	_X86_PG_PTE_PAT@GOTPCREL(%rip), %rax
	movq	_X86_PG_PDE_PAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	movl	%r15d, %ebx
	andl	%r14d, %ebx
	xorl	%edi, %edi
	cmpl	%r15d, %ebx
	setne	%dil
	movslq	%r14d, %r14
	movq	%r14, %rsi
	callq	_KASSERT
	testl	%ebx, %ebx
	cmovnel	%r15d, %ebx
	xorl	%ebx, %r14d
	jmp	LBB0_3
LBB0_1:
	cmpl	$130, %esi
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_panic
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86_PG_PTE_PAT,4,2             ## @X86_PG_PTE_PAT
	.comm	_X86_PG_PDE_PAT,4,2             ## @X86_PG_PDE_PAT
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"pmap_switch_pat_bits: bad pm_type %d"

	.no_dead_strip	_pmap_swap_pat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_swap_pat
_pmap_swap_pat:                         ; @pmap_swap_pat
	.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	w1, [x0]
	sub	w8, w1, #128
	cmp	w8, #2
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _X86_PG_PTE_PAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X86_PG_PTE_PAT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _X86_PG_PDE_PAT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _X86_PG_PDE_PAT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ands	w9, w8, w19
	csel	w20, wzr, w8, eq
	cmp	w9, w8
	sxtw	x1, w19
	cset	w0, ne
	bl	_KASSERT
	eor	w19, w20, w19
	b	LBB0_4
LBB0_2:
	cmp	w1, #130
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_X86_PG_PTE_PAT,4,2             ; @X86_PG_PTE_PAT
	.comm	_X86_PG_PDE_PAT,4,2             ; @X86_PG_PDE_PAT
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"pmap_switch_pat_bits: bad pm_type %d"

	.no_dead_strip	_pmap_swap_pat
.subsections_via_symbols
