	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcpu_set_state_locked
_vcpu_set_state_locked:                 ## @vcpu_set_state_locked
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	(%rdi), %r15
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %r14
	leaq	(%r15,%r14,8), %rbx
	movq	%rbx, %rdi
	callq	_vcpu_assert_locked
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15,%r14,8), %eax
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	movq	%r12, %r15
	je	LBB0_4
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r12
	addq	$4, %r12
	leaq	(%rax,%rcx,8), %r14
	addq	$16, %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%r12)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vcpu_notify_event_locked
	movl	(%rbx), %edi
	callq	_vcpu_state2str
	movq	%r15, %rdi
	movl	%r13d, %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	callq	_VCPU_CTR1
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	leaq	L_.str.1(%rip), %rdx
	callq	_msleep_spin
	cmpl	$130, (%rbx)
	jne	LBB0_3
	jmp	LBB0_4
LBB0_5:
	xorl	%edi, %edi
	cmpl	$130, %eax
	setne	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	cmpl	$129, (%rbx)
	movq	%r12, %r15
	jne	LBB0_4
## %bb.6:
	movq	_curcpu@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_NOCPU@GOTPCREL(%rip), %rax
LBB0_7:
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%r14,%rcx,8), %rsi
	xorl	%edi, %edi
	cmpq	(%rax), %rsi
	sete	%dil
	callq	_KASSERT
	movl	(%rbx), %edi
	leal	-128(%rdi), %eax
	cmpl	$3, %eax
	jae	LBB0_8
## %bb.12:
	cmpl	$131, %r12d
	jne	LBB0_13
	jmp	LBB0_10
LBB0_8:
	cmpl	$131, %edi
	jne	LBB0_13
## %bb.9:
	cmpl	$131, %r12d
	jne	LBB0_10
LBB0_13:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_16
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r14,%rax,8), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_vcpu_state2str
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_vcpu_state2str
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	_VCPU_CTR2
	movl	%r12d, (%rbx)
	cmpl	$129, %r12d
	jne	LBB0_14
## %bb.11:
	movq	_curcpu@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_14:
	movq	_NOCPU@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
	cmpl	$130, %r12d
	jne	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_wakeup
LBB0_16:
	movl	%r14d, %eax
	addq	$40, %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	"vcpu state change from %s to idle requested"

L_.str.1:                               ## @.str.1
	.asciz	"vmstat"

	.comm	_hz,4,2                         ## @hz
L_.str.2:                               ## @.str.2
	.asciz	"invalid transition from vcpu idle state"

	.comm	_curcpu,8,3                     ## @curcpu
	.comm	_NOCPU,8,3                      ## @NOCPU
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.5:                               ## @.str.5
	.asciz	"vcpu state changed from %s to %s"

	.no_dead_strip	_vcpu_set_state_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcpu_set_state_locked
_vcpu_set_state_locked:                 ; @vcpu_set_state_locked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x26, [x0]
	sxtw	x8, w21
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	w8, #24
	smaddl	x20, w1, w8, x26
	mov	x0, x20
	bl	_vcpu_assert_locked
	ldr	w8, [x20]
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	cmp	w8, #130
	cbz	w23, LBB0_4
; %bb.1:
	b.eq	LBB0_6
; %bb.2:
	mov	w8, #24
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	madd	x8, x9, x8, x26
	add	x28, x8, #4
	add	x23, x8, #16
	mov	w19, #1
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
Lloh2:
	adrp	x27, _hz@GOTPAGE
Lloh3:
	ldr	x27, [x27, _hz@GOTPAGEOFF]
Lloh4:
	adrp	x25, l_.str.1@PAGE
Lloh5:
	add	x25, x25, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w19, [x28]
	mov	x0, x20
	mov	w1, #0
	bl	_vcpu_notify_event_locked
	ldr	w0, [x20]
	bl	_vcpu_state2str
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	bl	_VCPU_CTR1
	ldr	w3, [x27]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x25
	bl	_msleep_spin
	ldr	w8, [x20]
	cmp	w8, #130
	b.ne	LBB0_3
	b	LBB0_6
LBB0_4:
	cset	w0, ne
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x20]
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _curcpu@GOTPAGE
Lloh9:
	ldr	x8, [x8, _curcpu@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x8, _NOCPU@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NOCPU@GOTPAGEOFF]
LBB0_7:
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
	mov	w9, #24
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	madd	x24, x10, x9, x26
	ldr	x1, [x24, #8]!
	ldr	x8, [x8]
	cmp	x1, x8
	cset	w0, eq
	bl	_KASSERT
	ldr	w0, [x20]
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_9
; %bb.8:
	cmp	w19, #131
	b.ne	LBB0_11
	b	LBB0_12
LBB0_9:
	cmp	w0, #131
	b.ne	LBB0_11
; %bb.10:
	cmp	w19, #131
	b.ne	LBB0_12
LBB0_11:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_12:
	bl	_vcpu_state2str
	mov	x23, x0
	mov	x0, x19
	bl	_vcpu_state2str
	mov	x4, x0
Lloh15:
	adrp	x2, l_.str.5@PAGE
Lloh16:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x22
	mov	x1, x21
	mov	x3, x23
	bl	_VCPU_CTR2
	str	w19, [x20]
	cmp	w19, #129
	b.ne	LBB0_14
; %bb.13:
	mov	w0, #0
Lloh17:
	adrp	x8, _curcpu@GOTPAGE
Lloh18:
	ldr	x8, [x8, _curcpu@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x24]
	b	LBB0_17
LBB0_14:
Lloh20:
	adrp	x8, _NOCPU@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NOCPU@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	x8, [x24]
	cmp	w19, #130
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_wakeup
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vcpu state change from %s to idle requested"

l_.str.1:                               ; @.str.1
	.asciz	"vmstat"

	.comm	_hz,4,2                         ; @hz
l_.str.2:                               ; @.str.2
	.asciz	"invalid transition from vcpu idle state"

	.comm	_curcpu,8,3                     ; @curcpu
	.comm	_NOCPU,8,3                      ; @NOCPU
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.5:                               ; @.str.5
	.asciz	"vcpu state changed from %s to %s"

	.no_dead_strip	_vcpu_set_state_locked
.subsections_via_symbols
