	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_emulate_pio                ## -- Begin function kvm_emulate_pio
	.p2align	4, 0x90
_kvm_emulate_pio:                       ## @kvm_emulate_pio
	.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	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testl	%esi, %esi
	sete	%dil
	jne	LBB0_1
## %bb.2:
	movq	_KVM_EXIT_IO_OUT@GOTPCREL(%rip), %r13
	jmp	LBB0_3
LBB0_1:
	movq	_KVM_EXIT_IO_IN@GOTPCREL(%rip), %r13
LBB0_3:
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_trace_kvm_pio
	movq	_KVM_EXIT_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	56(%rbx), %rcx
	movl	%eax, 20(%rcx)
	movl	(%r13), %eax
	movl	%eax, 16(%rcx)
	movl	%r12d, 8(%rbx)
	movl	%r12d, (%rcx)
	movq	_KVM_PIO_PAGE_OFFSET@GOTPCREL(%rip), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	(%rax), %edx
	movl	%edx, 4(%rcx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 12(%rbx)
	movl	$1, 8(%rcx)
	movl	%r14d, 20(%rbx)
	movl	%r14d, 12(%rcx)
	movl	%r15d, 24(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	$0, 48(%rbx)
	movq	_VCPU_REGS_RAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_read
	movq	%rax, -48(%rbp)
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_kernel_pio
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_complete_pio
	movl	$1, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVM_EXIT_IO,4,2                ## @KVM_EXIT_IO
	.comm	_KVM_EXIT_IO_IN,4,2             ## @KVM_EXIT_IO_IN
	.comm	_KVM_EXIT_IO_OUT,4,2            ## @KVM_EXIT_IO_OUT
	.comm	_KVM_PIO_PAGE_OFFSET,4,2        ## @KVM_PIO_PAGE_OFFSET
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_VCPU_REGS_RAX,4,2              ## @VCPU_REGS_RAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_emulate_pio                ; -- Begin function kvm_emulate_pio
	.p2align	2
_kvm_emulate_pio:                       ; @kvm_emulate_pio
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	cmp	w1, #0
	cset	w0, eq
Lloh0:
	adrp	x8, _KVM_EXIT_IO_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVM_EXIT_IO_IN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _KVM_EXIT_IO_OUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _KVM_EXIT_IO_OUT@GOTPAGEOFF]
	csel	x23, x9, x8, eq
	mov	w24, #1
	mov	x1, x3
	mov	w3, #1
	bl	_trace_kvm_pio
Lloh4:
	adrp	x8, _KVM_EXIT_IO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KVM_EXIT_IO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	x9, [x19, #56]
	str	w8, [x9, #20]
	ldr	w8, [x23]
	str	w8, [x9, #16]
	str	w21, [x19, #8]
	str	w21, [x9]
Lloh7:
	adrp	x8, _KVM_PIO_PAGE_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KVM_PIO_PAGE_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x10, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	mul	w8, w10, w8
	str	w8, [x9, #4]
	movi.2s	v0, #1
	stur	d0, [x19, #12]
	stp	w24, w20, [x9, #8]
	stp	w20, w22, [x19, #20]
	stp	xzr, xzr, [x19, #40]
	str	xzr, [x19, #32]
Lloh13:
	adrp	x8, _VCPU_REGS_RAX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VCPU_REGS_RAX@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_register_read
	str	x0, [sp, #8]
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #4
	bl	_memcpy
	ldr	w1, [x19]
	mov	x0, x19
	bl	_kernel_pio
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_complete_pio
	mov	w0, #1
LBB0_3:
	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 AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KVM_EXIT_IO,4,2                ; @KVM_EXIT_IO
	.comm	_KVM_EXIT_IO_IN,4,2             ; @KVM_EXIT_IO_IN
	.comm	_KVM_EXIT_IO_OUT,4,2            ; @KVM_EXIT_IO_OUT
	.comm	_KVM_PIO_PAGE_OFFSET,4,2        ; @KVM_PIO_PAGE_OFFSET
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_VCPU_REGS_RAX,4,2              ; @VCPU_REGS_RAX
.subsections_via_symbols
