	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_recvpacket               ## -- Begin function vmbus_recvpacket
	.p2align	4, 0x90
_vmbus_recvpacket:                      ## @vmbus_recvpacket
	.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	%r8, %rbx
	movq	%rcx, %r15
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movl	$0, (%rcx)
	movl	$0, (%r8)
	leaq	-64(%rbp), %rsi
	movl	$12, %edx
	callq	_hv_ringbuffer_peek
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	subl	%ecx, %edx
	shll	$3, %edx
	movl	%edx, (%r15)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %edx
	jle	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_ETOOSMALL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_3:
	movl	-56(%rbp), %eax
	movl	%eax, (%rbx)
	shll	$3, %ecx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_hv_ringbuffer_read
	cmpl	$0, -44(%rbp)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_vmbus_setevent
LBB0_5:
	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:                                 ## @.str
	.asciz	"Buffer too small - got %d needs %d\n"

	.comm	_ETOOSMALL,4,2                  ## @ETOOSMALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_recvpacket               ; -- Begin function vmbus_recvpacket
	.p2align	2
_vmbus_recvpacket:                      ; @vmbus_recvpacket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x4
	mov	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	str	wzr, [x3]
	str	wzr, [x4]
	add	x1, sp, #16
	mov	w2, #12
	bl	_hv_ringbuffer_peek
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_6
; %bb.1:
	ldp	w9, w8, [sp, #16]
	sub	w9, w9, w8
	lsl	w2, w9, #3
	str	w2, [x23]
	cmp	w2, w21
	b.le	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_err
Lloh2:
	adrp	x8, _ETOOSMALL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETOOSMALL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	ldr	w9, [sp, #24]
	str	w9, [x22]
	lsl	w3, w8, #3
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_hv_ringbuffer_read
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_vmbus_setevent
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer too small - got %d needs %d\n"

	.comm	_ETOOSMALL,4,2                  ; @ETOOSMALL
.subsections_via_symbols
