	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_vgpu_open
_intel_vgpu_open:                       ## @intel_vgpu_open
	.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	%rdi, %r14
	callq	_mdev_get_drvdata
	movq	%rax, %r15
	movq	_intel_vgpu_iommu_notifier@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_intel_vgpu_group_notifier@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_VFIO_IOMMU_NOTIFY_DMA_UNMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_mdev_dev
	movq	_VFIO_IOMMU_NOTIFY@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	movq	%r15, %rcx
	callq	_vfio_register_notifier
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_gvt_vgpu_err
	jmp	LBB0_10
LBB0_2:
	leaq	4(%r15), %r12
	movq	_VFIO_GROUP_NOTIFY_SET_KVM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_mdev_dev
	movq	_VFIO_GROUP_NOTIFY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	movq	%r12, %rcx
	callq	_vfio_register_notifier
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_gvt_vgpu_err
	jmp	LBB0_4
LBB0_5:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	%r14, %rdi
	callq	_kvmgt_guest_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.9:
	movq	_intel_gvt_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	addq	$8, %r15
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	jmp	LBB0_10
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_mdev_dev
	movq	_VFIO_GROUP_NOTIFY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movq	%r12, %rdx
	callq	_vfio_unregister_notifier
LBB0_4:
	movq	%r14, %rdi
	callq	_mdev_dev
	movl	(%r13), %esi
	movl	%eax, %edi
	movq	%r15, %rdx
	callq	_vfio_unregister_notifier
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_intel_vgpu_iommu_notifier,4,2  ## @intel_vgpu_iommu_notifier
	.comm	_intel_vgpu_group_notifier,4,2  ## @intel_vgpu_group_notifier
	.comm	_VFIO_IOMMU_NOTIFY_DMA_UNMAP,8,3 ## @VFIO_IOMMU_NOTIFY_DMA_UNMAP
	.comm	_VFIO_IOMMU_NOTIFY,4,2          ## @VFIO_IOMMU_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vfio_register_notifier for iommu failed: %d\n"

	.comm	_VFIO_GROUP_NOTIFY_SET_KVM,8,3  ## @VFIO_GROUP_NOTIFY_SET_KVM
	.comm	_VFIO_GROUP_NOTIFY,4,2          ## @VFIO_GROUP_NOTIFY
L_.str.1:                               ## @.str.1
	.asciz	"vfio_register_notifier for group failed: %d\n"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_intel_gvt_ops,8,3              ## @intel_gvt_ops
	.no_dead_strip	_intel_vgpu_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_vgpu_open
_intel_vgpu_open:                       ; @intel_vgpu_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_mdev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _intel_vgpu_iommu_notifier@GOTPAGE
Lloh1:
	ldr	x8, [x8, _intel_vgpu_iommu_notifier@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0]
Lloh3:
	adrp	x8, _intel_vgpu_group_notifier@GOTPAGE
Lloh4:
	ldr	x8, [x8, _intel_vgpu_group_notifier@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x21, x0
	str	w8, [x21, #4]!
Lloh6:
	adrp	x8, _VFIO_IOMMU_NOTIFY_DMA_UNMAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VFIO_IOMMU_NOTIFY_DMA_UNMAP@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, x20
	bl	_mdev_dev
Lloh9:
	adrp	x23, _VFIO_IOMMU_NOTIFY@GOTPAGE
Lloh10:
	ldr	x23, [x23, _VFIO_IOMMU_NOTIFY@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x3, x19
	bl	_vfio_register_notifier
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_gvt_vgpu_err
	b	LBB0_10
LBB0_2:
Lloh13:
	adrp	x8, _VFIO_GROUP_NOTIFY_SET_KVM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VFIO_GROUP_NOTIFY_SET_KVM@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, x20
	bl	_mdev_dev
Lloh16:
	adrp	x24, _VFIO_GROUP_NOTIFY@GOTPAGE
Lloh17:
	ldr	x24, [x24, _VFIO_GROUP_NOTIFY@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x3, x21
	bl	_vfio_register_notifier
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_gvt_vgpu_err
	b	LBB0_9
LBB0_4:
Lloh20:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_try_module_get
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_kvmgt_guest_init
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.6:
Lloh23:
	adrp	x8, _intel_gvt_ops@GOTPAGE
Lloh24:
	ldr	x8, [x8, _intel_gvt_ops@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	add	x0, x19, #8
	mov	w1, #0
	bl	_atomic_set
	b	LBB0_10
LBB0_7:
	mov	w22, #0
LBB0_8:
	mov	x0, x20
	bl	_mdev_dev
	ldr	w1, [x24]
	mov	x2, x21
	bl	_vfio_unregister_notifier
LBB0_9:
	mov	x0, x20
	bl	_mdev_dev
	ldr	w1, [x23]
	mov	x2, x19
	bl	_vfio_unregister_notifier
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_intel_vgpu_iommu_notifier,4,2  ; @intel_vgpu_iommu_notifier
	.comm	_intel_vgpu_group_notifier,4,2  ; @intel_vgpu_group_notifier
	.comm	_VFIO_IOMMU_NOTIFY_DMA_UNMAP,8,3 ; @VFIO_IOMMU_NOTIFY_DMA_UNMAP
	.comm	_VFIO_IOMMU_NOTIFY,4,2          ; @VFIO_IOMMU_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vfio_register_notifier for iommu failed: %d\n"

	.comm	_VFIO_GROUP_NOTIFY_SET_KVM,8,3  ; @VFIO_GROUP_NOTIFY_SET_KVM
	.comm	_VFIO_GROUP_NOTIFY,4,2          ; @VFIO_GROUP_NOTIFY
l_.str.1:                               ; @.str.1
	.asciz	"vfio_register_notifier for group failed: %d\n"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_intel_gvt_ops,8,3              ; @intel_gvt_ops
	.no_dead_strip	_intel_vgpu_open
.subsections_via_symbols
