	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_gma_to_gpa          ## -- Begin function intel_vgpu_gma_to_gpa
	.p2align	4, 0x90
_intel_vgpu_gma_to_gpa:                 ## @intel_vgpu_gma_to_gpa
	.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	$72, %rsp
	.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, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	movq	(%rdi), %rcx
	movq	_INTEL_GVT_MM_GGTT@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rcx
	setne	%dl
	movq	_INTEL_GVT_MM_PPGTT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	movq	8(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	setne	%al
	andb	%dl, %al
	movzbl	%al, %edi
	callq	_GEM_BUG_ON
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %r13
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vgpu_gmadr_is_valid
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	*40(%r14)
	leaq	-88(%rbp), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_ggtt_get_guest_entry
	movq	%rbx, %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	callq	*(%rax)
	movq	_I915_GTT_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	movq	_I915_GTT_PAGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	notq	%rbx
	andq	%r15, %rbx
	addq	%rax, %rbx
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	jmp	LBB0_16
LBB0_3:
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	8(%r12), %rax
	cmpq	$129, %rax
	je	LBB0_6
## %bb.4:
	cmpq	$128, %rax
	jne	LBB0_14
## %bb.5:
	leaq	-88(%rbp), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_ppgtt_get_shadow_root_entry
	movq	%r15, %rdi
	callq	*(%r14)
	movq	%rax, %r13
	movq	%rax, -80(%rbp)
	movq	%r15, %rdi
	callq	*8(%r14)
	movq	%rax, -72(%rbp)
	movq	%r15, %rdi
	callq	*16(%r14)
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	movl	$4, %r15d
	movl	$3, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	%r15, %rdi
	callq	*32(%r14)
	leaq	-88(%rbp), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_ppgtt_get_shadow_root_entry
	movq	%r15, %rdi
	callq	*16(%r14)
	movq	%rax, %r13
	movq	%rax, -80(%rbp)
	movq	%r15, %rdi
	movl	$2, %r15d
	movl	$1, %ebx
LBB0_7:
	callq	*24(%r14)
	movq	%rax, -80(%rbp,%rbx,8)
	leaq	-88(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	_ppgtt_get_next_level_entry
	testl	%eax, %eax
	je	LBB0_8
LBB0_13:
	movq	(%r12), %rsi
	leaq	L_.str.3(%rip), %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_gvt_vgpu_err
	movq	_INTEL_GVT_INVALID_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_17
LBB0_14:
	movl	$1, %edi
	callq	_GEM_BUG_ON
LBB0_15:
	leaq	-88(%rbp), %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	callq	*(%rax)
	movq	_I915_GTT_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	movq	_I915_GTT_PAGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	notq	%rbx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	andq	%r8, %rbx
	addq	%rax, %rbx
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	movq	8(%r12), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edx, %edx
LBB0_16:
	movq	%rbx, %r9
	callq	_trace_gma_translate
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%r15d, %ebx
	leal	-2(%rbx), %r13d
	decq	%rbx
	xorl	%r15d, %r15d
	leaq	-88(%rbp), %r14
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%r15, %rbx
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp,%r15,8), %rdx
	xorl	%ecx, %ecx
	cmpq	%r15, %r13
	sete	%cl
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ppgtt_get_next_level_entry
	incq	%r15
	testl	%eax, %eax
	je	LBB0_11
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_gvt_dbg_core
	jmp	LBB0_13
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_GVT_INVALID_ADDR,8,3     ## @INTEL_GVT_INVALID_ADDR
	.comm	_INTEL_GVT_MM_GGTT,8,3          ## @INTEL_GVT_MM_GGTT
	.comm	_INTEL_GVT_MM_PPGTT,8,3         ## @INTEL_GVT_MM_PPGTT
	.comm	_I915_GTT_PAGE_SHIFT,8,3        ## @I915_GTT_PAGE_SHIFT
	.comm	_I915_GTT_PAGE_MASK,8,3         ## @I915_GTT_PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ggtt"

L_.str.1:                               ## @.str.1
	.asciz	"GMA 0x%lx is not present\n"

L_.str.2:                               ## @.str.2
	.asciz	"ppgtt"

L_.str.3:                               ## @.str.3
	.asciz	"invalid mm type: %d gma %lx\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_gma_to_gpa          ; -- Begin function intel_vgpu_gma_to_gpa
	.p2align	2
_intel_vgpu_gma_to_gpa:                 ; @intel_vgpu_gma_to_gpa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x21, [x0, #16]
	ldr	x8, [x21, #8]
	ldp	x26, x25, [x8]
	ldr	x8, [x0]
Lloh3:
	adrp	x22, _INTEL_GVT_MM_GGTT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _INTEL_GVT_MM_GGTT@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
Lloh5:
	adrp	x9, _INTEL_GVT_MM_PPGTT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INTEL_GVT_MM_PPGTT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_GEM_BUG_ON
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_vgpu_gmadr_is_valid
	cbz	w0, LBB0_22
; %bb.2:
	ldr	x8, [x26, #40]
	mov	x0, x19
	blr	x8
	mov	x2, x0
	mov	x1, sp
	mov	x0, x20
	bl	_ggtt_get_guest_entry
	ldr	x8, [x25]
	mov	x0, sp
	blr	x8
Lloh8:
	adrp	x8, _I915_GTT_PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I915_GTT_PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	lsl	x8, x0, x8
Lloh11:
	adrp	x9, _I915_GTT_PAGE_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _I915_GTT_PAGE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	bic	x9, x19, x9
	add	x22, x9, x8
	ldr	w0, [x21]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	mov	x3, #0
	b	LBB0_20
LBB0_3:
	ldr	x8, [x20, #8]
	cmp	x8, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	x8, #128
	b.ne	LBB0_18
; %bb.5:
	mov	x1, sp
	mov	x0, x20
	mov	w2, #0
	bl	_ppgtt_get_shadow_root_entry
	ldr	x8, [x26]
	mov	x0, x19
	blr	x8
	mov	x24, x0
	str	x0, [sp, #8]
	ldr	x8, [x26, #8]
	mov	x0, x19
	blr	x8
	str	x0, [sp, #16]
	ldr	x8, [x26, #16]
	mov	x0, x19
	blr	x8
	mov	w23, #0
	str	x0, [sp, #24]
	mov	w22, #1
	mov	w27, #3
	b	LBB0_7
LBB0_6:
	ldr	x8, [x26, #32]
	mov	x0, x19
	blr	x8
	mov	x2, x0
	mov	x1, sp
	mov	x0, x20
	bl	_ppgtt_get_shadow_root_entry
	ldr	x8, [x26, #16]
	mov	x0, x19
	blr	x8
	mov	x24, x0
	mov	w22, #0
	str	x0, [sp, #8]
	mov	w27, #1
	mov	w23, #1
LBB0_7:
	ldr	x8, [x26, #24]
	mov	x0, x19
	blr	x8
	add	x8, sp, #8
	str	x0, [x8, x27, lsl #3]
	mov	x1, sp
	mov	x0, x20
	mov	x2, x24
	mov	w3, #0
	bl	_ppgtt_get_next_level_entry
	cbnz	w0, LBB0_22
; %bb.8:
	ldr	x8, [x25, #8]
	mov	x0, sp
	blr	x8
	cbz	w0, LBB0_21
; %bb.9:
	ldr	x2, [sp, #16]
	mov	x1, sp
	mov	x0, x20
	mov	x3, x23
	bl	_ppgtt_get_next_level_entry
	cbnz	w0, LBB0_22
; %bb.10:
	ldr	x8, [x25, #8]
	mov	x0, sp
	blr	x8
	cbz	w0, LBB0_21
; %bb.11:
	tbnz	w23, #0, LBB0_19
; %bb.12:
	ldr	x2, [sp, #24]
	mov	x1, sp
	mov	x0, x20
	mov	w3, #0
	bl	_ppgtt_get_next_level_entry
	cbnz	w0, LBB0_22
; %bb.13:
	ldr	x8, [x25, #8]
	mov	x0, sp
	blr	x8
	cbz	w0, LBB0_21
; %bb.14:
	ldr	x2, [sp, #32]
	mov	x1, sp
	mov	x0, x20
	mov	x3, x22
	bl	_ppgtt_get_next_level_entry
	cbnz	w0, LBB0_22
; %bb.15:
	ldr	x8, [x25, #8]
	mov	x0, sp
	blr	x8
	cbz	w0, LBB0_21
; %bb.16:
	tbnz	w22, #0, LBB0_19
; %bb.17:
	ldr	x2, [sp, #40]
	mov	x1, sp
	mov	x0, x20
	mov	w3, #0
	bl	_ppgtt_get_next_level_entry
	b	LBB0_22
LBB0_18:
	mov	w0, #1
	bl	_GEM_BUG_ON
LBB0_19:
	ldr	x8, [x25]
	mov	x0, sp
	blr	x8
Lloh16:
	adrp	x8, _I915_GTT_PAGE_SHIFT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I915_GTT_PAGE_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _I915_GTT_PAGE_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _I915_GTT_PAGE_MASK@GOTPAGEOFF]
	lsl	x8, x0, x8
Lloh21:
	ldr	x9, [x9]
	bic	x9, x19, x9
	add	x22, x9, x8
	ldr	w0, [x21]
	ldr	x3, [x20, #8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #0
LBB0_20:
	mov	x4, x19
	mov	x5, x22
	bl	_trace_gma_translate
	b	LBB0_23
LBB0_21:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_gvt_dbg_core
LBB0_22:
	ldr	x1, [x20]
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_gvt_vgpu_err
Lloh28:
	adrp	x8, _INTEL_GVT_INVALID_ADDR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _INTEL_GVT_INVALID_ADDR@GOTPAGEOFF]
Lloh30:
	ldr	x22, [x8]
LBB0_23:
	ldr	x8, [sp, #40]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_GVT_INVALID_ADDR,8,3     ; @INTEL_GVT_INVALID_ADDR
	.comm	_INTEL_GVT_MM_GGTT,8,3          ; @INTEL_GVT_MM_GGTT
	.comm	_INTEL_GVT_MM_PPGTT,8,3         ; @INTEL_GVT_MM_PPGTT
	.comm	_I915_GTT_PAGE_SHIFT,8,3        ; @I915_GTT_PAGE_SHIFT
	.comm	_I915_GTT_PAGE_MASK,8,3         ; @I915_GTT_PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ggtt"

l_.str.1:                               ; @.str.1
	.asciz	"GMA 0x%lx is not present\n"

l_.str.2:                               ; @.str.2
	.asciz	"ppgtt"

l_.str.3:                               ; @.str.3
	.asciz	"invalid mm type: %d gma %lx\n"

.subsections_via_symbols
