	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_handle_suspend
_vm_handle_suspend:                     ## @vm_handle_suspend
	.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
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r14
	movslq	%esi, %rdi
	leaq	(,%rdi,4), %r12
	addq	24(%r14), %r12
	leaq	4(%r14), %r15
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%r15, %rsi
	callq	_CPU_SET_ATOMIC
	movq	%r12, %rdi
	callq	_vcpu_lock
	leaq	16(%r14), %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	leaq	L_.str.3(%rip), %rdx
	callq	_VCPU_CTR0
	movq	%r12, %rdi
	callq	_vcpu_unlock
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_vm_handle_rendezvous
	movq	%r12, %rdi
	callq	_vcpu_lock
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_CPU_CMP
	testq	%rax, %rax
	je	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%r14)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_VCPU_CTR0
	movq	_VCPU_SLEEPING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_vcpu_require_state_locked
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r12, %rsi
	leaq	L_.str.2(%rip), %rdx
	callq	_msleep_spin
	movq	_VCPU_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_vcpu_require_state_locked
	jmp	LBB0_1
LBB0_2:
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_VCPU_CTR0
	movq	%r12, %rdi
	callq	_vcpu_unlock
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_CPU_ISSET
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_vcpu_notify_event
	jmp	LBB0_6
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %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	"All vcpus suspended"

L_.str.1:                               ## @.str.1
	.asciz	"Sleeping during suspend"

	.comm	_VCPU_SLEEPING,4,2              ## @VCPU_SLEEPING
L_.str.2:                               ## @.str.2
	.asciz	"vmsusp"

	.comm	_hz,4,2                         ## @hz
	.comm	_VCPU_FROZEN,4,2                ## @VCPU_FROZEN
L_.str.3:                               ## @.str.3
	.asciz	"Rendezvous during suspend"

	.no_dead_strip	_vm_handle_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_handle_suspend
_vm_handle_suspend:                     ; @vm_handle_suspend
	.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
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x23, x1
	mov	x20, x0
	ldr	x8, [x0, #24]
	add	x22, x8, w1, sxtw #2
	add	x21, x0, #4
	mov	x0, x1
	mov	x1, x21
	bl	_CPU_SET_ATOMIC
	mov	x0, x22
	bl	_vcpu_lock
	add	x24, x20, #16
	mov	x0, x21
	mov	x1, x24
	bl	_CPU_CMP
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x28, _VCPU_SLEEPING@GOTPAGE
Lloh1:
	ldr	x28, [x28, _VCPU_SLEEPING@GOTPAGEOFF]
Lloh2:
	adrp	x19, _hz@GOTPAGE
Lloh3:
	ldr	x19, [x19, _hz@GOTPAGEOFF]
Lloh4:
	adrp	x26, l_.str.2@PAGE
Lloh5:
	add	x26, x26, l_.str.2@PAGEOFF
Lloh6:
	adrp	x25, _VCPU_FROZEN@GOTPAGE
Lloh7:
	ldr	x25, [x25, _VCPU_FROZEN@GOTPAGEOFF]
Lloh8:
	adrp	x27, l_.str.3@PAGE
Lloh9:
	add	x27, x27, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x23
	mov	x2, x27
	bl	_VCPU_CTR0
	mov	x0, x22
	bl	_vcpu_unlock
	mov	x0, x20
	mov	x1, x23
	bl	_vm_handle_rendezvous
	mov	x0, x22
	bl	_vcpu_lock
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_CPU_CMP
	cbz	x0, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x23
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_VCPU_CTR0
	ldr	w2, [x28]
	mov	x0, x20
	mov	x1, x23
	bl	_vcpu_require_state_locked
	ldr	w3, [x19]
	mov	x0, x22
	mov	x1, x22
	mov	x2, x26
	bl	_msleep_spin
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x23
	bl	_vcpu_require_state_locked
	b	LBB0_3
LBB0_6:
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	bl	_VCPU_CTR0
	mov	x0, x22
	bl	_vcpu_unlock
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	w22, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w22, w22, #1
	ldr	w8, [x20]
	cmp	w22, w8
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_CPU_ISSET
	cbz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	bl	_vcpu_notify_event
	b	LBB0_8
LBB0_11:
	mov	w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	mov	w0, #0
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"All vcpus suspended"

l_.str.1:                               ; @.str.1
	.asciz	"Sleeping during suspend"

	.comm	_VCPU_SLEEPING,4,2              ; @VCPU_SLEEPING
l_.str.2:                               ; @.str.2
	.asciz	"vmsusp"

	.comm	_hz,4,2                         ; @hz
	.comm	_VCPU_FROZEN,4,2                ; @VCPU_FROZEN
l_.str.3:                               ; @.str.3
	.asciz	"Rendezvous during suspend"

	.no_dead_strip	_vm_handle_suspend
.subsections_via_symbols
