	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvm_set_pte_rmapp
_kvm_set_pte_rmapp:                     ## @kvm_set_pte_rmapp
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	(%rdx), %edi
	callq	_pte_huge
	movl	%eax, %edi
	callq	_WARN_ON
	movl	(%r14), %edi
	callq	_pte_pfn
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_rmap_next
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r12
	leaq	L_.str(%rip), %r15
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rmap_remove
	movq	_shadow_trap_nonpresent_pte@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	___set_spte
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_rmap_next
	movq	%rax, %r12
	testq	%r12, %r12
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_is_shadow_present_pte
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_rmap_printk
	movl	(%r14), %edi
	callq	_pte_write
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r14
	movl	(%r12), %edi
	movq	_PT64_BASE_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	shll	%cl, %edx
	notl	%eax
	andl	%edi, %eax
	orl	%eax, %edx
	movq	_SPTE_HOST_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_PT_WRITABLE_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	notl	%r13d
	andl	%edx, %r13d
	callq	_is_writeble_pte
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	callq	_spte_to_pfn
	movl	%eax, %edi
	callq	_kvm_set_pfn_dirty
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	___set_spte
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %r13
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_rmap_next
	movq	%rax, %r12
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%r12, %r12
	jne	LBB0_2
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvm_flush_remote_tlbs
LBB0_9:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kvm_set_pte_rmapp: spte %p %llx\n"

	.comm	_shadow_trap_nonpresent_pte,4,2 ## @shadow_trap_nonpresent_pte
	.comm	_PT64_BASE_ADDR_MASK,4,2        ## @PT64_BASE_ADDR_MASK
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PT_WRITABLE_MASK,4,2           ## @PT_WRITABLE_MASK
	.comm	_SPTE_HOST_WRITEABLE,4,2        ## @SPTE_HOST_WRITEABLE
	.no_dead_strip	_kvm_set_pte_rmapp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvm_set_pte_rmapp
_kvm_set_pte_rmapp:                     ; @kvm_set_pte_rmapp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x2]
	bl	_pte_huge
	bl	_WARN_ON
	ldr	w0, [x20]
	bl	_pte_pfn
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_rmap_next
	cbz	x0, LBB0_9
; %bb.1:
	mov	x24, x0
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_rmap_remove
Lloh2:
	adrp	x8, _shadow_trap_nonpresent_pte@GOTPAGE
Lloh3:
	ldr	x8, [x8, _shadow_trap_nonpresent_pte@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x24
	bl	___set_spte
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_rmap_next
	mov	x24, x0
	cbz	x0, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_is_shadow_present_pte
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w2, [x24]
	mov	x0, x23
	mov	x1, x24
	bl	_rmap_printk
	ldr	w0, [x20]
	bl	_pte_write
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w25, [x24]
Lloh5:
	adrp	x8, _PT64_BASE_ADDR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PT64_BASE_ADDR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
Lloh8:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w26, [x8]
Lloh11:
	adrp	x8, _PT_WRITABLE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PT_WRITABLE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w28, [x8]
Lloh14:
	adrp	x8, _SPTE_HOST_WRITEABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SPTE_HOST_WRITEABLE@GOTPAGEOFF]
Lloh16:
	ldr	w27, [x8]
	mov	x0, x25
	bl	_is_writeble_pte
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	bl	_spte_to_pfn
	bl	_kvm_set_pfn_dirty
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	bic	w8, w25, w22
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	lsl	w9, w9, w26
	orr	w8, w9, w8
	orr	w9, w27, w28
	bic	w1, w8, w9
	mov	x0, x24
	bl	___set_spte
	mov	x0, x19
	mov	x1, x21
	mov	x2, x24
	b	LBB0_3
LBB0_8:
	mov	x0, x19
	bl	_kvm_flush_remote_tlbs
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kvm_set_pte_rmapp: spte %p %llx\n"

	.comm	_shadow_trap_nonpresent_pte,4,2 ; @shadow_trap_nonpresent_pte
	.comm	_PT64_BASE_ADDR_MASK,4,2        ; @PT64_BASE_ADDR_MASK
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PT_WRITABLE_MASK,4,2           ; @PT_WRITABLE_MASK
	.comm	_SPTE_HOST_WRITEABLE,4,2        ; @SPTE_HOST_WRITEABLE
	.no_dead_strip	_kvm_set_pte_rmapp
.subsections_via_symbols
