	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvmgt_guest_init
_kvmgt_guest_init:                      ## @kvmgt_guest_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_mdev_get_drvdata
	movq	%rax, %rbx
	movq	(%rax), %rdi
	callq	_handle_valid
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	16(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	(%r14), %rax
	movq	_current@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	___kvmgt_vgpu_exist
	testq	%rax, %rax
	jne	LBB0_1
## %bb.7:
	movl	$32, %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movq	%rax, (%rbx)
	movq	%rbx, 24(%rax)
	movq	%r14, 16(%rax)
	movq	%r14, %rdi
	callq	_kvm_get_kvm
	movq	%r15, %rdi
	callq	_kvmgt_protect_table_init
	movq	%rbx, %rdi
	callq	_gvt_cache_init
	leaq	28(%rbx), %rdi
	callq	_init_completion
	movq	_kvmgt_page_track_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rsi
	addq	$4, %rsi
	movl	%eax, 8(%r15)
	movq	_kvmgt_page_track_flush_slot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	%r14, %rdi
	callq	_kvm_page_track_register_notifier
	movl	24(%rbx), %edx
	addq	$8, %rbx
	leaq	L_.str.1(%rip), %rdi
	movl	$292, %esi                      ## imm = 0x124
	movq	%rbx, %rcx
	callq	_debugfs_create_ulong
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_gvt_vgpu_err
	movq	_ESRCH@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_current,8,3                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KVM is required to use Intel vGPU\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_kvmgt_page_track_write,4,2     ## @kvmgt_page_track_write
	.comm	_kvmgt_page_track_flush_slot,4,2 ## @kvmgt_page_track_flush_slot
L_.str.1:                               ## @.str.1
	.asciz	"kvmgt_nr_cache_entries"

	.no_dead_strip	_kvmgt_guest_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvmgt_guest_init
_kvmgt_guest_init:                      ; @kvmgt_guest_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_mdev_get_drvdata
	mov	x19, x0
	ldr	x0, [x0]
	bl	_handle_valid
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EEXIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_7
; %bb.3:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _current@GOTPAGE
Lloh3:
	ldr	x9, [x9, _current@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	___kvmgt_vgpu_exist
	cbnz	x0, LBB0_1
; %bb.5:
	mov	w0, #32
	bl	_vzalloc
	cbz	x0, LBB0_10
; %bb.6:
	mov	x21, x0
	str	x0, [x19]
	stp	x20, x19, [x0, #16]
	mov	x0, x20
	bl	_kvm_get_kvm
	mov	x0, x21
	bl	_kvmgt_protect_table_init
	mov	x0, x19
	bl	_gvt_cache_init
	add	x0, x19, #28
	bl	_init_completion
Lloh5:
	adrp	x8, _kvmgt_page_track_write@GOTPAGE
Lloh6:
	ldr	x8, [x8, _kvmgt_page_track_write@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21, #8]
Lloh8:
	adrp	x8, _kvmgt_page_track_flush_slot@GOTPAGE
Lloh9:
	ldr	x8, [x8, _kvmgt_page_track_flush_slot@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	x1, x21
	str	w8, [x1, #4]!
	mov	x0, x20
	bl	_kvm_page_track_register_notifier
	ldr	w2, [x19, #24]
	add	x3, x19, #8
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #292
	bl	_debugfs_create_ulong
	mov	x8, x0
	mov	w0, #0
	str	w8, [x21]
	b	LBB0_9
LBB0_7:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_vgpu_err
Lloh15:
	adrp	x8, _ESRCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_current,8,3                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KVM is required to use Intel vGPU\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_kvmgt_page_track_write,4,2     ; @kvmgt_page_track_write
	.comm	_kvmgt_page_track_flush_slot,4,2 ; @kvmgt_page_track_flush_slot
l_.str.1:                               ; @.str.1
	.asciz	"kvmgt_nr_cache_entries"

	.no_dead_strip	_kvmgt_guest_init
.subsections_via_symbols
