	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_handle_rendezvous
_vm_handle_rendezvous:                  ## @vm_handle_rendezvous
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpl	$-1, %esi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.3:
	cmpl	%ebx, (%r14)
	setg	%dil
	jmp	LBB0_4
LBB0_1:
	movl	$1, %edi
LBB0_4:
	movslq	%ebx, %rsi
	callq	_KASSERT
	leaq	4(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mtx_lock
	cmpq	$0, 8(%r14)
	je	LBB0_13
## %bb.5:
	leaq	8(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	20(%r14), %r13
	leaq	28(%r14), %r12
	leaq	16(%r14), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_CPU_AND
	cmpl	$-1, %ebx
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_CPU_ISSET
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_CPU_ISSET
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_VCPU_CTR0
	movl	24(%r14), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	*8(%r14)
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_CPU_SET
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_CPU_CMP
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	leaq	L_.str.3(%rip), %rdx
	callq	_RENDEZVOUS_CTR0
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	leaq	L_.str.4(%rip), %rcx
	xorl	%r8d, %r8d
	callq	_mtx_sleep
	cmpq	$0, 8(%r14)
	jne	LBB0_6
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_VCPU_CTR0
	movq	$0, 8(%r14)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_wakeup
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Calling rendezvous func"

L_.str.2:                               ## @.str.2
	.asciz	"Rendezvous completed"

L_.str.3:                               ## @.str.3
	.asciz	"Wait for rendezvous completion"

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

	.no_dead_strip	_vm_handle_rendezvous
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_handle_rendezvous
_vm_handle_rendezvous:                  ; @vm_handle_rendezvous
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
	cmn	w1, #1
	b.eq	LBB0_3
; %bb.1:
	tbnz	w20, #31, LBB0_4
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, w20
	cset	w0, gt
	b	LBB0_5
LBB0_3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	sxtw	x1, w20
	bl	_KASSERT
	add	x21, x19, #4
	mov	x0, x21
	bl	_mtx_lock
	mov	x22, x19
	ldr	x8, [x22, #8]!
	cbz	x8, LBB0_14
; %bb.6:
	add	x23, x19, #20
	add	x24, x19, #28
	add	x25, x19, #16
Lloh0:
	adrp	x26, l_.str.3@PAGE
Lloh1:
	add	x26, x26, l_.str.3@PAGEOFF
Lloh2:
	adrp	x27, l_.str.4@PAGE
Lloh3:
	add	x27, x27, l_.str.4@PAGEOFF
Lloh4:
	adrp	x28, l_.str.1@PAGE
Lloh5:
	add	x28, x28, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x24
	bl	_CPU_AND
	cmn	w20, #1
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_CPU_ISSET
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_CPU_ISSET
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x28
	bl	_VCPU_CTR0
	ldr	x8, [x19, #8]
	ldr	w2, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	mov	x0, x20
	mov	x1, x25
	bl	_CPU_SET
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	mov	x1, x25
	bl	_CPU_CMP
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x26
	bl	_RENDEZVOUS_CTR0
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	mov	x3, x27
	mov	w4, #0
	bl	_mtx_sleep
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_7
	b	LBB0_14
LBB0_13:
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_VCPU_CTR0
	str	xzr, [x19, #8]
	mov	x0, x22
	bl	_wakeup
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mtx_unlock
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Calling rendezvous func"

l_.str.2:                               ; @.str.2
	.asciz	"Rendezvous completed"

l_.str.3:                               ; @.str.3
	.asciz	"Wait for rendezvous completion"

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

	.no_dead_strip	_vm_handle_rendezvous
.subsections_via_symbols
