	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmu_guess_page_from_pte_write
_mmu_guess_page_from_pte_write:         ## @mmu_guess_page_from_pte_write
	.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	%ecx, %ebx
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	$0, -36(%rbp)
	cmpl	$8, %ecx
	je	LBB0_2
## %bb.1:
	cmpl	$4, %ebx
	jne	LBB0_17
LBB0_2:
	movq	%r15, %rdi
	callq	_is_pae
	movl	%ebx, %ecx
	xorl	$4, %ecx
	movl	%r12d, %edx
	andl	$3, %edx
	orl	%ecx, %edx
	sete	%cl
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	testb	%cl, %cl
	je	LBB0_6
## %bb.4:
	movq	16(%r15), %rdi
	movl	%r12d, %esi
	andl	$-8, %esi
	leaq	-36(%rbp), %rdx
	movl	$8, %ecx
	callq	_kvm_read_guest
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	leal	7(%r12), %eax
	testl	%r12d, %r12d
	cmovnsl	%r12d, %eax
	andl	$-8, %eax
	subl	%eax, %r12d
	movslq	%r12d, %rax
	leaq	(%rax,%rbp), %rdi
	addq	$-36, %rdi
	jmp	LBB0_11
LBB0_9:
	testb	%cl, %cl
	je	LBB0_13
## %bb.10:
	leaq	-36(%rbp), %rdi
LBB0_11:
	movq	%r14, %rsi
	movl	$4, %edx
	jmp	LBB0_12
LBB0_6:
	testb	$7, %r12b
	jne	LBB0_13
## %bb.7:
	cmpl	$8, %ebx
	jne	LBB0_13
## %bb.8:
	leaq	-36(%rbp), %rdi
	movq	%r14, %rsi
	movl	$8, %edx
LBB0_12:
	callq	_memcpy
LBB0_13:
	movl	-36(%rbp), %edi
	callq	_is_present_gpte
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movq	_PT64_BASE_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-36(%rbp), %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	xorl	%eax, %eax
	callq	_smp_rmb
	movq	16(%r15), %rdi
	movl	%ebx, %esi
	callq	_gfn_to_pfn
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_is_error_pfn
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	%r14d, %edi
	callq	_kvm_release_pfn_clean
	jmp	LBB0_17
LBB0_16:
	movl	%ebx, (%r15)
	movl	%r14d, 4(%r15)
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT64_BASE_ADDR_MASK,4,2        ## @PT64_BASE_ADDR_MASK
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_mmu_guess_page_from_pte_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmu_guess_page_from_pte_write
_mmu_guess_page_from_pte_write:         ; @mmu_guess_page_from_pte_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	cmp	w3, #8
	b.eq	LBB0_2
; %bb.1:
	cmp	w22, #4
	b.ne	LBB0_17
LBB0_2:
	mov	x0, x19
	bl	_is_pae
	tst	w21, #0x3
	ccmp	w22, #4, #0, eq
	cset	w8, eq
	cbz	x0, LBB0_6
; %bb.3:
	cbz	w8, LBB0_9
; %bb.4:
	ldr	x0, [x19, #16]
	and	w1, w21, #0xfffffff8
	add	x22, sp, #12
	add	x2, sp, #12
	mov	w3, #8
	bl	_kvm_read_guest
	cbnz	w0, LBB0_17
; %bb.5:
	negs	w8, w21
	and	w8, w8, #0x7
	and	w9, w21, #0x7
	csneg	w8, w9, w8, mi
	add	x0, x22, w8, sxtw
	b	LBB0_8
LBB0_6:
	cbz	w8, LBB0_13
; %bb.7:
	add	x0, sp, #12
LBB0_8:
	mov	x1, x20
	mov	w2, #4
	b	LBB0_12
LBB0_9:
	tst	w21, #0x7
	b.ne	LBB0_13
; %bb.10:
	cmp	w22, #8
	b.ne	LBB0_13
; %bb.11:
	add	x0, sp, #12
	mov	x1, x20
	mov	w2, #8
LBB0_12:
	bl	_memcpy
LBB0_13:
	ldr	w0, [sp, #12]
	bl	_is_present_gpte
	cbz	w0, LBB0_17
; %bb.14:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _PT64_BASE_ADDR_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PT64_BASE_ADDR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
	and	w8, w9, w8
Lloh5:
	ldr	w9, [x10]
	asr	w20, w8, w9
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	str	w8, [x19, #8]
	bl	_smp_rmb
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_gfn_to_pfn
	mov	x21, x0
	bl	_is_error_pfn
	cbz	x0, LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_kvm_release_pfn_clean
	b	LBB0_17
LBB0_16:
	stp	w20, w21, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PT64_BASE_ADDR_MASK,4,2        ; @PT64_BASE_ADDR_MASK
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_mmu_guess_page_from_pte_write
.subsections_via_symbols
