	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_handle_inout                ## -- Begin function vm_handle_inout
	.p2align	4, 0x90
_vm_handle_inout:                       ## @vm_handle_inout
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movslq	(%rdx), %rsi
	cmpq	$4, %rsi
	sete	%al
	leal	-1(%rsi), %ecx
	cmpl	$2, %ecx
	setb	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_KASSERT
	cmpq	$0, 16(%rbx)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	je	LBB0_2
## %bb.1:
	callq	_emulate_inout_str
	jmp	LBB0_3
LBB0_2:
	callq	_emulate_inout_port
LBB0_3:
	movl	%eax, %r13d
	movq	8(%rbx), %r15
	movq	%rbx, %rdi
	callq	_inout_instruction
	movl	4(%rbx), %r9d
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rcx)
	leaq	L_.str.6(%rip), %rcx
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rcx, %rdx
LBB0_6:
	testq	%r15, %r15
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rsi, %rcx
	movq	%rdx, (%rsp)
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %r8d
	callq	_VCPU_CTR4
	movl	%r13d, %eax
	addq	$24, %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.1:                               ## @.str.1
	.asciz	"%s%s 0x%04x: %s"

L_.str.2:                               ## @.str.2
	.asciz	"rep "

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"error"

L_.str.5:                               ## @.str.5
	.asciz	"userspace"

L_.str.6:                               ## @.str.6
	.asciz	"handled"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_handle_inout                ; -- Begin function vm_handle_inout
	.p2align	2
_vm_handle_inout:                       ; @vm_handle_inout
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldrsw	x1, [x2]
	sub	w8, w1, #1
	cmp	x1, #4
	ccmp	w8, #2, #0, ne
	cset	w0, lo
	bl	_KASSERT
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_emulate_inout_str
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_emulate_inout_port
LBB0_3:
	mov	x23, x0
	ldr	x24, [x22, #8]
	mov	x0, x22
	bl	_inout_instruction
	mov	x4, x0
	ldr	w5, [x22, #4]
	cbz	w23, LBB0_5
; %bb.4:
Lloh0:
	adrp	x6, l_.str.4@PAGE
Lloh1:
	add	x6, x6, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21]
Lloh2:
	adrp	x9, l_.str.5@PAGE
Lloh3:
	add	x9, x9, l_.str.5@PAGEOFF
Lloh4:
	adrp	x10, l_.str.6@PAGE
Lloh5:
	add	x10, x10, l_.str.6@PAGEOFF
	cmp	w8, #0
	csel	x6, x10, x9, eq
LBB0_6:
Lloh6:
	adrp	x8, l_.str.2@PAGE
Lloh7:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh8:
	adrp	x9, l_.str.3@PAGE
Lloh9:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	x24, #0
	csel	x3, x9, x8, eq
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_VCPU_CTR4
	mov	x0, x23
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"%s%s 0x%04x: %s"

l_.str.2:                               ; @.str.2
	.asciz	"rep "

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"error"

l_.str.5:                               ; @.str.5
	.asciz	"userspace"

l_.str.6:                               ; @.str.6
	.asciz	"handled"

.subsections_via_symbols
