	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvmgt_set_opregion
_kvmgt_set_opregion:                    ## @kvmgt_set_opregion
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_vgpu_opregion
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	_OPREGION_SIGNATURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_memunmap
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movq	_VFIO_REGION_TYPE_PCI_VENDOR_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPREGION_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_VFIO_REGION_INFO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, (%rsp)
	movq	_intel_vgpu_regops_opregion@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	callq	_intel_vgpu_register_reg
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OPREGION_SIGNATURE,4,2         ## @OPREGION_SIGNATURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ## @PCI_VENDOR_ID_INTEL
	.comm	_VFIO_REGION_TYPE_PCI_VENDOR_TYPE,4,2 ## @VFIO_REGION_TYPE_PCI_VENDOR_TYPE
	.comm	_VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION,4,2 ## @VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION
	.comm	_intel_vgpu_regops_opregion,4,2 ## @intel_vgpu_regops_opregion
	.comm	_OPREGION_SIZE,4,2              ## @OPREGION_SIZE
	.comm	_VFIO_REGION_INFO_FLAG_READ,4,2 ## @VFIO_REGION_INFO_FLAG_READ
	.no_dead_strip	_kvmgt_set_opregion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvmgt_set_opregion
_kvmgt_set_opregion:                    ; @kvmgt_set_opregion
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_vgpu_opregion
	ldr	x19, [x0]
	cbz	x19, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _OPREGION_SIGNATURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPREGION_SIGNATURE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #16
	bl	_memcmp
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_memunmap
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh7:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _VFIO_REGION_TYPE_PCI_VENDOR_TYPE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VFIO_REGION_TYPE_PCI_VENDOR_TYPE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh13:
	adrp	x8, _VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _OPREGION_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OPREGION_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
Lloh19:
	adrp	x8, _VFIO_REGION_INFO_FLAG_READ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VFIO_REGION_INFO_FLAG_READ@GOTPAGEOFF]
Lloh21:
	ldr	w5, [x8]
Lloh22:
	adrp	x3, _intel_vgpu_regops_opregion@GOTPAGE
Lloh23:
	ldr	x3, [x3, _intel_vgpu_regops_opregion@GOTPAGEOFF]
	mov	x0, x20
	mov	x6, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_intel_vgpu_register_reg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OPREGION_SIGNATURE,4,2         ; @OPREGION_SIGNATURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ; @PCI_VENDOR_ID_INTEL
	.comm	_VFIO_REGION_TYPE_PCI_VENDOR_TYPE,4,2 ; @VFIO_REGION_TYPE_PCI_VENDOR_TYPE
	.comm	_VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION,4,2 ; @VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION
	.comm	_intel_vgpu_regops_opregion,4,2 ; @intel_vgpu_regops_opregion
	.comm	_OPREGION_SIZE,4,2              ; @OPREGION_SIZE
	.comm	_VFIO_REGION_INFO_FLAG_READ,4,2 ; @VFIO_REGION_INFO_FLAG_READ
	.no_dead_strip	_kvmgt_set_opregion
.subsections_via_symbols
