	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_ringbuffer_read             ## -- Begin function hv_ringbuffer_read
	.p2align	4, 0x90
_hv_ringbuffer_read:                    ## @hv_ringbuffer_read
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r12
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_3:
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %r15
	movl	$0, (%r12)
	movq	%r14, %r12
	movl	$0, (%r14)
	movq	%rbx, %rdi
	callq	_hv_pkt_iter_first
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.5:
	movl	(%rax), %ecx
	shll	$3, %ecx
LBB0_6:
	movl	4(%rax), %ebx
	shll	$3, %ebx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	subl	%ecx, %ebx
	movl	%ebx, (%r15)
	movq	%rax, %r14
	movl	8(%rax), %eax
	movl	%eax, (%r12)
	xorl	%edi, %edi
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_8:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	%r14, %rsi
	addq	%rax, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	___hv_pkt_iter_next
	movq	%rbx, %rdi
	callq	_hv_pkt_iter_close
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_ringbuffer_read             ; -- Begin function hv_ringbuffer_read
	.p2align	2
_hv_ringbuffer_read:                    ; @hv_ringbuffer_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x25, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	cmp	w2, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	str	wzr, [x23]
	str	wzr, [x21]
	mov	x0, x19
	bl	_hv_pkt_iter_first
	cbz	x0, LBB0_3
; %bb.5:
	mov	x22, x0
	cbz	w25, LBB0_7
; %bb.6:
	mov	w26, #0
	b	LBB0_8
LBB0_7:
	ldr	w8, [x22]
	lsl	w26, w8, #3
LBB0_8:
	ldr	w8, [x22, #4]
	lsl	w8, w8, #3
	sub	w25, w8, w26
	cmp	w25, w24
	str	w25, [x23]
	ldr	w8, [x22, #8]
	str	w8, [x21]
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
Lloh2:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
	b	LBB0_2
LBB0_10:
	add	x1, x22, w26, sxtw
	mov	x0, x20
	mov	x2, x25
	bl	_memcpy
	mov	x0, x19
	mov	x1, x22
	bl	___hv_pkt_iter_next
	mov	x0, x19
	bl	_hv_pkt_iter_close
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
.subsections_via_symbols
