	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_protect_tte
_pmap_protect_tte:                      ## @pmap_protect_tte
	.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
	movq	%rdx, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	movq	_TD_SW@GOTPCREL(%rip), %rax
	movq	_TD_W@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atomic_clear_long
	movq	_TD_PV@GOTPCREL(%rip), %rcx
	movl	(%r14), %edx
	orl	(%rcx), %edx
	movl	%eax, %ecx
	notl	%ecx
	testl	%ecx, %edx
	jne	LBB0_2
## %bb.1:
	movl	%eax, %edi
	callq	_TD_PA
	movl	%eax, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	%eax, %edi
	callq	_vm_page_dirty
LBB0_2:
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_TD_SW,4,2                      ## @TD_SW
	.comm	_TD_W,4,2                       ## @TD_W
	.comm	_TD_PV,4,2                      ## @TD_PV
	.no_dead_strip	_pmap_protect_tte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_protect_tte
_pmap_protect_tte:                      ; @pmap_protect_tte
	.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, x2
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_PMAP_LOCK_ASSERT
Lloh3:
	adrp	x8, _TD_SW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TD_SW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x20, _TD_W@GOTPAGE
Lloh7:
	ldr	x20, [x20, _TD_W@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_atomic_clear_long
Lloh8:
	adrp	x8, _TD_PV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TD_PV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	bics	wzr, w8, w0
	b.ne	LBB0_2
; %bb.1:
	bl	_TD_PA
	bl	_PHYS_TO_VM_PAGE
	bl	_vm_page_dirty
LBB0_2:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_TD_SW,4,2                      ; @TD_SW
	.comm	_TD_W,4,2                       ; @TD_W
	.comm	_TD_PV,4,2                      ; @TD_PV
	.no_dead_strip	_pmap_protect_tte
.subsections_via_symbols
