	.file	"extr_ring_buffer.c_hv_ringbuffer_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hv_ringbuffer_read
	.type	hv_ringbuffer_read, @function
hv_ringbuffer_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r9d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	xor	edi, edi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	edx, edx
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	DWORD PTR [r12], 0
	mov	rdi, r13
	mov	DWORD PTR 0[rbp], 0
	call	hv_pkt_iter_first@PLT
	mov	r8, rax
	test	rax, rax
	je	.L6
	xor	esi, esi
	test	r14d, r14d
	jne	.L4
	mov	eax, DWORD PTR [rax]
	lea	esi, 0[0+rax*8]
.L4:
	mov	eax, DWORD PTR 4[r8]
	xor	edi, edi
	mov	DWORD PTR 12[rsp], esi
	mov	QWORD PTR [rsp], r8
	lea	r14d, 0[0+rax*8]
	sub	r14d, esi
	mov	DWORD PTR [r12], r14d
	mov	eax, DWORD PTR 8[r8]
	cmp	ebx, r14d
	setl	dil
	mov	DWORD PTR 0[rbp], eax
	call	unlikely@PLT
	mov	r8, QWORD PTR [rsp]
	movsx	rsi, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR ENOBUFS[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edx, r14d
	add	rsi, r8
	mov	rdi, r15
	mov	QWORD PTR [rsp], r8
	call	memcpy@PLT
	mov	r8, QWORD PTR [rsp]
	mov	rdi, r13
	mov	rsi, r8
	call	__hv_pkt_iter_next@PLT
	mov	rdi, r13
	call	hv_pkt_iter_close@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xor	eax, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	hv_ringbuffer_read, .-hv_ringbuffer_read
	.comm	ENOBUFS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ring_buffer.c_hv_ringbuffer_read.c"
	.text
	.align	2
	.global	hv_ringbuffer_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	hv_ringbuffer_read, %function
hv_ringbuffer_read:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	clz	r0, r2
	lsr	r0, r0, #5
	mov	r8, r1
	mov	r9, r3
	mov	r4, r2
	bl	unlikely
	subs	r5, r0, #0
	beq	.L2
	ldr	r3, .L9
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, [sp, #32]
	str	r5, [r9]
	mov	r0, r7
	str	r5, [r3]
	bl	hv_pkt_iter_first
	subs	r6, r0, #0
	moveq	r4, r6
	beq	.L1
	ldr	r3, [sp, #36]
	ldr	r10, [r6, #4]
	cmp	r3, #0
	ldreq	r0, [r6]
	ldr	r2, [sp, #32]
	lsleq	r5, r0, #3
	rsb	r10, r5, r10, lsl #3
	str	r10, [r9]
	ldr	r3, [r6, #8]
	cmp	r4, r10
	movge	r0, #0
	movlt	r0, #1
	str	r3, [r2]
	bl	unlikely
	subs	r4, r0, #0
	beq	.L5
	ldr	r3, .L9+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r2, r10
	add	r1, r6, r5
	mov	r0, r8
	bl	memcpy
	mov	r1, r6
	mov	r0, r7
	bl	__hv_pkt_iter_next
	mov	r0, r7
	bl	hv_pkt_iter_close
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	EINVAL
	.word	ENOBUFS
	.size	hv_ringbuffer_read, .-hv_ringbuffer_read
	.comm	ENOBUFS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
