	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mphyp_pte_clear
_mphyp_pte_clear:                       ## @mphyp_pte_clear
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movl	%edi, %ebx
	movl	4(%rsi), %edi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	movq	_mphyp_eviction_lock@GOTPCREL(%rip), %rdi
	leaq	-40(%rbp), %rsi
	callq	_rm_rlock
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_mphyp_pte_synch
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_brokenkvm@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_mphyp_eviction_lock@GOTPCREL(%rip), %rdi
	leaq	-40(%rbp), %rsi
	callq	_rm_runlock
	movq	_LPTE_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	jmp	LBB0_8
LBB0_3:
	movq	_LPTE_CHG@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	_H_CLEAR_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	leaq	-48(%rbp), %rax
	leaq	-44(%rbp), %r9
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%rax
	callq	_phyp_pft_hcall
	addq	$16, %rsp
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	movslq	%eax, %rsi
	callq	_KASSERT
	movl	(%rbx), %eax
	andl	-44(%rbp), %eax
	orl	%eax, %r14d
LBB0_5:
	movq	_LPTE_REF@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	_H_CLEAR_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	leaq	-48(%rbp), %rax
	leaq	-44(%rbp), %r9
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%rax
	callq	_phyp_pft_hcall
	addq	$16, %rsp
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	movslq	%eax, %rsi
	callq	_KASSERT
	movl	(%rbx), %eax
	andl	-44(%rbp), %eax
	orl	%eax, %r14d
LBB0_7:
	movq	_mphyp_eviction_lock@GOTPCREL(%rip), %rdi
	leaq	-40(%rbp), %rsi
	callq	_rm_runlock
LBB0_8:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_mphyp_eviction_lock,4,2        ## @mphyp_eviction_lock
	.comm	_brokenkvm,8,3                  ## @brokenkvm
	.comm	_LPTE_REF,4,2                   ## @LPTE_REF
	.comm	_LPTE_CHG,4,2                   ## @LPTE_CHG
	.comm	_H_CLEAR_MOD,4,2                ## @H_CLEAR_MOD
	.comm	_H_SUCCESS,4,2                  ## @H_SUCCESS
	.comm	_H_CLEAR_REF,4,2                ## @H_CLEAR_REF
	.no_dead_strip	_mphyp_pte_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mphyp_pte_clear
_mphyp_pte_clear:                       ; @mphyp_pte_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_PMAP_LOCK_ASSERT
Lloh3:
	adrp	x0, _mphyp_eviction_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _mphyp_eviction_lock@GOTPAGEOFF]
	add	x1, sp, #8
	bl	_rm_rlock
	mov	x0, x19
	mov	x1, x20
	bl	_mphyp_pte_synch
	mov	x19, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh5:
	adrp	x8, _brokenkvm@GOTPAGE
Lloh6:
	ldr	x8, [x8, _brokenkvm@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh8:
	adrp	x0, _mphyp_eviction_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _mphyp_eviction_lock@GOTPAGEOFF]
	add	x1, sp, #8
	bl	_rm_runlock
Lloh10:
	adrp	x8, _LPTE_REF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LPTE_REF@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	bic	w19, w19, w8
	b	LBB0_8
LBB0_3:
Lloh13:
	adrp	x23, _LPTE_CHG@GOTPAGE
Lloh14:
	ldr	x23, [x23, _LPTE_CHG@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh15:
	adrp	x22, _H_SUCCESS@GOTPAGE
Lloh16:
	ldr	x22, [x22, _H_SUCCESS@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
Lloh17:
	adrp	x8, _H_CLEAR_MOD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _H_CLEAR_MOD@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w2, [x20]
	add	x5, sp, #4
	mov	x6, sp
	mov	x7, sp
	mov	w1, #0
	mov	w3, #0
	mov	w4, #0
	bl	_phyp_pft_hcall
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x22]
	cmp	w0, w8
	cset	w8, eq
	sxtw	x1, w0
	mov	x0, x8
	bl	_KASSERT
	ldr	w8, [sp, #4]
	ldr	w9, [x23]
	and	w8, w9, w8
	orr	w19, w8, w19
LBB0_5:
Lloh20:
	adrp	x23, _LPTE_REF@GOTPAGE
Lloh21:
	ldr	x23, [x23, _LPTE_REF@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
Lloh22:
	adrp	x8, _H_CLEAR_REF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _H_CLEAR_REF@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w2, [x20]
	add	x5, sp, #4
	mov	x6, sp
	mov	x7, sp
	mov	w1, #0
	mov	w3, #0
	mov	w4, #0
	bl	_phyp_pft_hcall
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x22]
	cmp	w0, w8
	cset	w8, eq
	sxtw	x1, w0
	mov	x0, x8
	bl	_KASSERT
	ldr	w8, [sp, #4]
	ldr	w9, [x23]
	and	w8, w9, w8
	orr	w19, w8, w19
LBB0_7:
Lloh25:
	adrp	x0, _mphyp_eviction_lock@GOTPAGE
Lloh26:
	ldr	x0, [x0, _mphyp_eviction_lock@GOTPAGEOFF]
	add	x1, sp, #8
	bl	_rm_runlock
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_mphyp_eviction_lock,4,2        ; @mphyp_eviction_lock
	.comm	_brokenkvm,8,3                  ; @brokenkvm
	.comm	_LPTE_REF,4,2                   ; @LPTE_REF
	.comm	_LPTE_CHG,4,2                   ; @LPTE_CHG
	.comm	_H_CLEAR_MOD,4,2                ; @H_CLEAR_MOD
	.comm	_H_SUCCESS,4,2                  ; @H_SUCCESS
	.comm	_H_CLEAR_REF,4,2                ; @H_CLEAR_REF
	.no_dead_strip	_mphyp_pte_clear
.subsections_via_symbols
