	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppgtt_populate_spt_by_guest_entry
_ppgtt_populate_spt_by_guest_entry:     ## @ppgtt_populate_spt_by_guest_entry
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movl	(%rsi), %edi
	callq	_get_next_pt_type
	movl	%eax, %edi
	callq	_gtt_type_is_pt
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movl	(%r15), %eax
	movq	_GTT_TYPE_PPGTT_PDE_ENTRY@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_vgpu_ips_enabled
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	*8(%r13)
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setne	%r12b
LBB0_3:
	movq	%r15, %rdi
	callq	*(%r13)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_vgpu_find_spt_by_gfn
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ppgtt_get_spt
	cmpl	8(%rbx), %r12d
	je	LBB0_14
## %bb.5:
	movl	%r12d, 8(%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_gvt_dbg_mm
	movl	4(%rbx), %edi
	callq	_clear_page
	movq	%rbx, %rdi
	callq	_ppgtt_populate_spt
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_ppgtt_put_spt
	jmp	LBB0_16
LBB0_7:
	movl	(%r15), %edi
	callq	_get_next_pt_type
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_gtt_type_is_pt
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	callq	*(%r13)
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r12d, %ecx
	callq	_ppgtt_alloc_spt_gfn
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_16
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_16
LBB0_11:
	movl	12(%rbx), %esi
	movq	%r14, %rdi
	callq	_intel_vgpu_enable_page_track
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:
	movq	%rbx, %rdi
	callq	_ppgtt_populate_spt
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_13
LBB0_15:
	movq	%rbx, %rdi
	callq	_ppgtt_free_spt
	xorl	%ebx, %ebx
LBB0_16:
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_gvt_vgpu_err
	movl	%r12d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movl	(%r14), %edi
	movl	(%rbx), %r8d
	movl	12(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_trace_spt_change
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GTT_TYPE_PPGTT_PDE_ENTRY,4,2   ## @GTT_TYPE_PPGTT_PDE_ENTRY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reshadow PDE since ips changed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"new"

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

	.no_dead_strip	_ppgtt_populate_spt_by_guest_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppgtt_populate_spt_by_guest_entry
_ppgtt_populate_spt_by_guest_entry:     ; @ppgtt_populate_spt_by_guest_entry
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x8]
	ldr	w0, [x1]
	bl	_get_next_pt_type
	bl	_gtt_type_is_pt
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _GTT_TYPE_PPGTT_PDE_ENTRY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GTT_TYPE_PPGTT_PDE_ENTRY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_vgpu_ips_enabled
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x23, #8]
	mov	x0, x19
	blr	x8
	cmp	x0, #0
	cset	w22, ne
	b	LBB0_4
LBB0_3:
	mov	w22, #0
LBB0_4:
	ldr	x8, [x23]
	mov	x0, x19
	blr	x8
	mov	x1, x0
	mov	x0, x20
	bl	_intel_vgpu_find_spt_by_gfn
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	bl	_ppgtt_get_spt
	ldr	w8, [x21, #8]
	cmp	w22, w8
	b.eq	LBB0_17
; %bb.6:
	str	w22, [x21, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_dbg_mm
	ldr	w0, [x21, #4]
	bl	_clear_page
	mov	x0, x21
	bl	_ppgtt_populate_spt
	cbz	w0, LBB0_17
; %bb.7:
	mov	x22, x0
	mov	x0, x21
	bl	_ppgtt_put_spt
	b	LBB0_15
LBB0_8:
	ldr	w0, [x19]
	bl	_get_next_pt_type
	mov	x21, x0
	bl	_gtt_type_is_pt
	cbz	w0, LBB0_11
; %bb.9:
	ldr	x8, [x23]
	mov	x0, x19
	blr	x8
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_ppgtt_alloc_spt_gfn
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_15
LBB0_11:
	mov	x21, #0
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_12:
	ldr	w1, [x21, #12]
	mov	x0, x20
	bl	_intel_vgpu_enable_page_track
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.13:
	mov	x0, x21
	bl	_ppgtt_populate_spt
	mov	x22, x0
	cbz	w0, LBB0_16
LBB0_14:
	mov	x0, x21
	bl	_ppgtt_free_spt
	mov	x21, #0
LBB0_15:
	ldp	w3, w2, [x19]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_gvt_vgpu_err
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_16:
	ldr	w0, [x20]
	ldr	w3, [x21, #12]
	ldr	w4, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_trace_spt_change
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GTT_TYPE_PPGTT_PDE_ENTRY,4,2   ; @GTT_TYPE_PPGTT_PDE_ENTRY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reshadow PDE since ips changed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"new"

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

	.no_dead_strip	_ppgtt_populate_spt_by_guest_entry
.subsections_via_symbols
