	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppgtt_handle_guest_entry_add
_ppgtt_handle_guest_entry_add:          ## @ppgtt_handle_guest_entry_add
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	(%r12), %edi
	movl	(%r14), %ecx
	movl	4(%rsi), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %r9
	callq	_trace_spt_guest_change
	movl	(%rbx), %esi
	movl	4(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	callq	_gvt_vdbg_mm
	movl	(%rbx), %edi
	callq	_get_next_pt_type
	movl	%eax, %edi
	callq	_gtt_type_is_pt
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rsi
	callq	_ppgtt_populate_spt_by_guest_entry
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_5:
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_ppgtt_populate_shadow_entry
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_6
LBB0_3:
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	callq	_gvt_vgpu_err
	jmp	LBB0_7
LBB0_4:
	leaq	-48(%rbp), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_ppgtt_get_shadow_entry
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_ppgtt_generate_shadow_entry
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_ppgtt_set_shadow_entry
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %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	"add"

L_.str.1:                               ## @.str.1
	.asciz	"add shadow entry: type %d, index %lu, value %llx\n"

L_.str.2:                               ## @.str.2
	.asciz	"fail: spt %p guest entry 0x%llx type %d\n"

	.no_dead_strip	_ppgtt_handle_guest_entry_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppgtt_handle_guest_entry_add
_ppgtt_handle_guest_entry_add:          ; @ppgtt_handle_guest_entry_add
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22]
	ldr	w3, [x19]
	ldr	w4, [x1, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x5, x21
	bl	_trace_spt_guest_change
	ldp	w1, w3, [x20]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_gvt_vdbg_mm
	ldr	w0, [x20]
	bl	_get_next_pt_type
	bl	_gtt_type_is_pt
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x22
	mov	x1, x20
	bl	_ppgtt_populate_spt_by_guest_entry
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_4
LBB0_3:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_ppgtt_populate_shadow_entry
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_4:
	ldp	w3, w2, [x20]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_gvt_vgpu_err
	b	LBB0_6
LBB0_5:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_ppgtt_get_shadow_entry
	add	x0, sp, #8
	mov	x1, x22
	mov	x2, x20
	bl	_ppgtt_generate_shadow_entry
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_ppgtt_set_shadow_entry
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add"

l_.str.1:                               ; @.str.1
	.asciz	"add shadow entry: type %d, index %lu, value %llx\n"

l_.str.2:                               ; @.str.2
	.asciz	"fail: spt %p guest entry 0x%llx type %d\n"

	.no_dead_strip	_ppgtt_handle_guest_entry_add
.subsections_via_symbols
