	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_set_tmr
_vmx_set_tmr:                           ## @vmx_set_tmr
	.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	%edx, %r14d
	movq	%rdi, %r15
	xorl	%edi, %edi
	cmpl	$256, %esi                      ## imm = 0x100
	setb	%dil
	movslq	%esi, %r12
	movq	%r12, %rsi
	callq	_KASSERT
	movl	8(%r15), %edi
	movq	(%r15), %rsi
	xorl	%edx, %edx
	callq	_vcpu_is_running
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	(%r15), %rax
	leaq	(,%rax,4), %r15
	addq	(%rax), %r15
	leal	63(%r12), %eax
	testl	%r12d, %r12d
	cmovnsl	%r12d, %eax
	andl	$192, %eax
	movl	%r12d, %r13d
	subl	%eax, %r13d
	movq	%r15, %rdi
	callq	_VMPTRLD
	movl	%r12d, %edi
	callq	_VMCS_EOI_EXIT
	movl	%eax, %edi
	callq	_vmcs_read
	movq	%rax, %rbx
	btsq	%r13, %rbx
	btrq	%r13, %rax
	testl	%r14d, %r14d
	cmoveq	%rax, %rbx
	movl	%r12d, %edi
	callq	_VMCS_EOI_EXIT
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_vmcs_write
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VMCLEAR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"vmx_set_tmr: vcpu cannot be running"

	.no_dead_strip	_vmx_set_tmr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_set_tmr
_vmx_set_tmr:                           ; @vmx_set_tmr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmp	w1, #256
	cset	w0, lo
	sxtw	x1, w19
	bl	_KASSERT
	ldr	w0, [x21, #8]
	ldr	x1, [x21]
	mov	x2, #0
	bl	_vcpu_is_running
	cmp	w0, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x21]
	ldr	x9, [x8]
	add	x21, x9, x8, lsl #2
	negs	w8, w19
	and	w8, w8, #0x3f
	and	w9, w19, #0x3f
	csneg	w8, w9, w8, mi
	mov	w9, #1
	lsl	x22, x9, x8
	mov	x0, x21
	bl	_VMPTRLD
	mov	x0, x19
	bl	_VMCS_EOI_EXIT
	bl	_vmcs_read
	orr	x8, x0, x22
	bic	x9, x0, x22
	cmp	w20, #0
	csel	x20, x9, x8, eq
	mov	x0, x19
	bl	_VMCS_EOI_EXIT
	mov	x1, x20
	bl	_vmcs_write
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_VMCLEAR
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"vmx_set_tmr: vcpu cannot be running"

	.no_dead_strip	_vmx_set_tmr
.subsections_via_symbols
