	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_reset_ggtt          ## -- Begin function intel_vgpu_reset_ggtt
	.p2align	4, 0x90
_intel_vgpu_reset_ggtt:                 ## @intel_vgpu_reset_ggtt
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	8(%rax), %rbx
	movq	16(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_GTT_TYPE_GGTT_PTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)
	movl	(%rax), %esi
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	callq	*8(%rbx)
	movq	%r15, %rdi
	callq	*(%rbx)
	movq	%r12, %rdi
	callq	_vgpu_aperture_gmadr_base
	movl	%eax, %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_vgpu_aperture_sz
	movl	%eax, %r13d
	movb	(%r15), %cl
	sarl	%cl, %r13d
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.1:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	leal	1(%rbx), %r15d
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edx
	callq	_ggtt_set_host_entry
	movl	%r15d, %ebx
	testl	%r13d, %r13d
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	leaq	-56(%rbp), %r15
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_ggtt_get_host_entry
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ggtt_invalidate_pte
	jmp	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_vgpu_hidden_gmadr_base
	movl	%eax, %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_vgpu_hidden_sz
	movl	%eax, %r13d
	movb	(%r15), %cl
	sarl	%cl, %r13d
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.6:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %edi
	leal	1(%rbx), %r15d
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edx
	callq	_ggtt_set_host_entry
	movl	%r15d, %ebx
	testl	%r13d, %r13d
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %edi
	leaq	-56(%rbp), %r15
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_ggtt_get_host_entry
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ggtt_invalidate_pte
	jmp	LBB0_9
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_ggtt_invalidate
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GTT_TYPE_GGTT_PTE,4,2          ## @GTT_TYPE_GGTT_PTE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_reset_ggtt          ; -- Begin function intel_vgpu_reset_ggtt
	.p2align	2
_intel_vgpu_reset_ggtt:                 ; @intel_vgpu_reset_ggtt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldp	x22, x20, [x8, #8]
Lloh0:
	adrp	x9, _GTT_TYPE_GGTT_PTE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GTT_TYPE_GGTT_PTE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [sp, #8]
	ldr	x9, [x22, #8]
	ldr	w1, [x8]
	add	x0, sp, #8
	blr	x9
	ldr	x8, [x22]
	add	x0, sp, #8
	blr	x8
	mov	x0, x21
	bl	_vgpu_aperture_gmadr_base
	mov	x22, x0
Lloh3:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w25, [x23]
	mov	x0, x21
	bl	_vgpu_aperture_sz
	ldr	w8, [x23]
	asr	w24, w0, w8
	cbz	w24, LBB0_5
; %bb.1:
	asr	w22, w22, w25
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	add	w25, w22, #1
	add	x1, sp, #8
	mov	x2, x22
	bl	_ggtt_set_host_entry
	mov	x22, x25
	cbz	w24, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w24, w24, #1
	cbz	w19, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	mov	x1, sp
	mov	x2, x22
	bl	_ggtt_get_host_entry
	mov	x1, sp
	mov	x0, x21
	bl	_ggtt_invalidate_pte
	b	LBB0_2
LBB0_5:
	mov	x0, x21
	bl	_vgpu_hidden_gmadr_base
	mov	x22, x0
	ldr	w24, [x23]
	mov	x0, x21
	bl	_vgpu_hidden_sz
	ldr	w8, [x23]
	asr	w23, w0, w8
	cbz	w23, LBB0_10
; %bb.6:
	asr	w22, w22, w24
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x21]
	add	w24, w22, #1
	add	x1, sp, #8
	mov	x2, x22
	bl	_ggtt_set_host_entry
	mov	x22, x24
	cbz	w23, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w23, #1
	cbz	w19, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x21]
	mov	x1, sp
	mov	x2, x22
	bl	_ggtt_get_host_entry
	mov	x1, sp
	mov	x0, x21
	bl	_ggtt_invalidate_pte
	b	LBB0_7
LBB0_10:
	mov	x0, x20
	bl	_ggtt_invalidate
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GTT_TYPE_GGTT_PTE,4,2          ; @GTT_TYPE_GGTT_PTE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
