	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_opregion_base_write_handler ## -- Begin function intel_vgpu_opregion_base_write_handler
	.p2align	4, 0x90
_intel_vgpu_opregion_base_write_handler: ## @intel_vgpu_opregion_base_write_handler
	.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
	movl	%esi, %r12d
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rdi
	callq	_gvt_dbg_core
	movq	_intel_gvt_host@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.2:
	movq	_INTEL_GVT_OPREGION_PAGES@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_13
## %bb.3:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movl	%r12d, %r14d
	sarl	%cl, %r14d
	addl	%r15d, %r14d
	movq	%r13, %rdi
	callq	_vgpu_opregion
	movq	(%rax), %rax
	movl	%r14d, (%rax,%r15,4)
	incq	%r15
	movslq	(%rbx), %rax
	cmpq	%rax, %r15
	jl	LBB0_4
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_6:
	movq	%r13, %rdi
	callq	_vgpu_opregion
	cmpl	$0, 8(%rax)
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_map_vgpu_opregion
LBB0_8:
	movq	_INTEL_GVT_OPREGION_PAGES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movl	%r12d, %r15d
	sarl	%cl, %r12d
	addl	%ebx, %r12d
	movq	%r13, %rdi
	callq	_vgpu_opregion
	movq	(%rax), %rax
	movl	%r12d, (%rax,%rbx,4)
	movl	%r15d, %r12d
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_11:
	movq	%r13, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_map_vgpu_opregion              ## TAILCALL
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_gvt_vgpu_err
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"emulate opregion from kernel\n"

	.comm	_intel_gvt_host,4,2             ## @intel_gvt_host
	.comm	_INTEL_GVT_OPREGION_PAGES,4,2   ## @INTEL_GVT_OPREGION_PAGES
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"not supported hypervisor\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_opregion_base_write_handler ; -- Begin function intel_vgpu_opregion_base_write_handler
	.p2align	2
_intel_vgpu_opregion_base_write_handler: ; @intel_vgpu_opregion_base_write_handler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_dbg_core
Lloh2:
	adrp	x8, _intel_gvt_host@GOTPAGE
Lloh3:
	ldr	x8, [x8, _intel_gvt_host@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.2:
Lloh5:
	adrp	x21, _INTEL_GVT_OPREGION_PAGES@GOTPAGE
Lloh6:
	ldr	x21, [x21, _INTEL_GVT_OPREGION_PAGES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
Lloh7:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	asr	w8, w20, w8
	add	w24, w22, w8
	mov	x0, x19
	bl	_vgpu_opregion
	ldr	x8, [x0]
	str	w24, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	mov	w19, #0
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_vgpu_opregion
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_map_vgpu_opregion
LBB0_8:
Lloh9:
	adrp	x21, _INTEL_GVT_OPREGION_PAGES@GOTPAGE
Lloh10:
	ldr	x21, [x21, _INTEL_GVT_OPREGION_PAGES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x22, #0
Lloh11:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	asr	w8, w20, w8
	add	w24, w22, w8
	mov	x0, x19
	bl	_vgpu_opregion
	ldr	x8, [x0]
	str	w24, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_10
LBB0_11:
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_map_vgpu_opregion
LBB0_12:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w19, w8
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_gvt_vgpu_err
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"emulate opregion from kernel\n"

	.comm	_intel_gvt_host,4,2             ; @intel_gvt_host
	.comm	_INTEL_GVT_OPREGION_PAGES,4,2   ; @INTEL_GVT_OPREGION_PAGES
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"not supported hypervisor\n"

.subsections_via_symbols
