	.file	"extr_sockstream.c_stream_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	stream_read
	.type	stream_read, @function
stream_read:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdx, rdx
	jle	.L6
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
.L5:
	mov	rdx, r13
	lea	rsi, [r12+rbx*4]
	mov	edi, ebp
	sub	rdx, rbx
	call	read@PLT
	test	rax, rax
	je	.L7
	js	.L14
	add	rbx, rax
.L4:
	cmp	r13, rbx
	jg	.L5
.L7:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, rbx
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdx, QWORD PTR errno[rip]
	cmp	rdx, QWORD PTR EINTR[rip]
	je	.L4
	cmp	rdx, QWORD PTR EAGAIN[rip]
	je	.L4
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	stream_read, .-stream_read
	.comm	errno,8,8
	.comm	EINTR,8,8
	.comm	EAGAIN,8,8
	.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_sockstream.c_stream_read.c"
	.text
	.align	2
	.global	stream_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	stream_read, %function
stream_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r5, r2, #0
	ble	.L6
	mov	r10, r0
	mov	r6, r1
	mov	r4, #0
	ldr	r8, .L12
	ldr	r7, .L12+4
	ldr	r9, .L12+8
.L5:
	mov	r0, r10
	sub	r2, r5, r4
	add	r1, r6, r4, lsl #2
	bl	read
	cmp	r0, #0
	beq	.L7
	addge	r4, r4, r0
	blt	.L11
.L4:
	cmp	r5, r4
	bgt	.L5
.L7:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r3, [r8]
	ldr	r2, [r7]
	cmp	r3, r2
	beq	.L4
	ldr	r2, [r9]
	cmp	r3, r2
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	b	.L4
.L6:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	.align	2
.L12:
	.word	errno
	.word	EINTR
	.word	EAGAIN
	.size	stream_read, .-stream_read
	.comm	errno,4,4
	.comm	EINTR,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
