	.file	"extr_nanocat.c_nn_rw_loop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Message not sent (EAGAIN)\n"
.LC1:
	.string	"Can't send"
.LC2:
	.string	"Can't recv"
	.text
	.p2align 4
	.globl	nn_rw_loop
	.type	nn_rw_loop, @function
nn_rw_loop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	imul	r12d, DWORD PTR 4[rdi], 1000
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	imul	eax, DWORD PTR [rdi], 1000
	mov	r14d, r12d
	mov	DWORD PTR 12[rsp], eax
	not	r14d
	.p2align 4,,10
	.p2align 3
.L6:
	xor	eax, eax
	call	nn_clock_ms@PLT
	mov	edx, DWORD PTR 8[r13]
	mov	esi, DWORD PTR 12[r13]
	xor	ecx, ecx
	mov	edi, ebp
	mov	ebx, eax
	call	nn_send@PLT
	test	eax, eax
	jns	.L2
	mov	rcx, QWORD PTR EAGAIN[rip]
	cmp	QWORD PTR errno[rip], rcx
	je	.L19
.L2:
	not	eax
	lea	rsi, .LC1[rip]
	shr	eax, 31
	mov	edi, eax
	call	nn_assert_errno@PLT
	mov	eax, DWORD PTR 0[r13]
	test	eax, eax
	js	.L4
.L21:
	add	ebx, DWORD PTR 12[rsp]
.L5:
	xor	eax, eax
	call	nn_clock_ms@PLT
	mov	esi, ebx
	sub	esi, eax
	test	esi, esi
	jle	.L6
.L20:
	test	r14d, r14d
	jns	.L7
	cmp	r12d, esi
	cmovl	esi, r12d
.L7:
	mov	edi, ebp
	call	nn_set_recv_timeout@PLT
	mov	edx, DWORD PTR NN_MSG[rip]
	xor	ecx, ecx
	mov	edi, ebp
	lea	rsi, 16[rsp]
	call	nn_recv@PLT
	mov	r15d, eax
	test	eax, eax
	jns	.L9
	mov	rax, QWORD PTR errno[rip]
	cmp	rax, QWORD PTR EAGAIN[rip]
	je	.L5
	cmp	rax, QWORD PTR ETIMEDOUT[rip]
	je	.L11
	cmp	rax, QWORD PTR EFSM[rip]
	je	.L11
.L9:
	mov	edi, r15d
	lea	rsi, .LC2[rip]
	not	edi
	shr	edi, 31
	call	nn_assert_errno@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	edx, r15d
	mov	rdi, r13
	call	nn_print_message@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	nn_freemsg@PLT
	xor	eax, eax
	call	nn_clock_ms@PLT
	mov	esi, ebx
	sub	esi, eax
	test	esi, esi
	jg	.L20
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	xor	eax, eax
	call	nn_clock_ms@PLT
	mov	edi, ebx
	sub	edi, eax
	test	edi, edi
	jle	.L5
	call	nn_sleep@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	eax, DWORD PTR 0[r13]
	test	eax, eax
	jns	.L21
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, ebp
	mov	rdi, r13
	call	nn_recv_loop@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 40
	.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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nn_rw_loop, .-nn_rw_loop
	.comm	stderr,4,4
	.comm	errno,8,8
	.comm	NN_MSG,4,4
	.comm	ETIMEDOUT,8,8
	.comm	EFSM,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_nanocat.c_nn_rw_loop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Message not sent (EAGAIN)\012\000"
	.align	2
.LC1:
	.ascii	"Can't send\000"
	.align	2
.LC2:
	.ascii	"Can't recv\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nn_rw_loop
	.syntax unified
	.arm
	.fpu softvfp
	.type	nn_rw_loop, %function
nn_rw_loop:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	r3, .L23
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldm	r0, {r2, r3}
	mov	r5, r1
	rsb	r1, r2, r2, lsl #5
	rsb	r4, r3, r3, lsl #5
	add	r2, r2, r1, lsl #2
	add	r3, r3, r4, lsl #2
	lsl	r2, r2, #3
	ldr	r9, .L23+4
	str	r2, [sp, #4]
	lsl	r4, r3, #3
.L6:
	bl	nn_clock_ms
	mov	r3, #0
	mov	r6, r0
	ldr	r2, [r7, #8]
	mov	r0, r5
	ldr	r1, [r7, #12]
	bl	nn_send
	cmp	r0, #0
	bge	.L2
	ldr	r3, .L23+8
	ldr	r2, [r3]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L19
.L2:
	mvn	r0, r0
	ldr	r1, .L23+12
	lsr	r0, r0, #31
	bl	nn_assert_errno
	ldr	r3, [r7]
	cmp	r3, #0
	blt	.L4
.L21:
	ldr	r3, [sp, #4]
	ldr	r8, .L23+16
	ldr	r10, .L23+20
	add	r6, r3, r6
.L5:
	bl	nn_clock_ms
	sub	r3, r6, r0
	cmp	r3, #0
	ble	.L6
.L20:
	mvn	r1, r4
	cmp	r4, r3
	lsr	r1, r1, #31
	movge	r1, #0
	cmp	r1, #0
	moveq	r1, r3
	movne	r1, r4
	mov	r0, r5
	bl	nn_set_recv_timeout
	ldr	r2, .L23+24
	mov	r3, #0
	mov	r0, r5
	ldr	r2, [r2]
	add	r1, sp, #8
	bl	nn_recv
	subs	fp, r0, #0
	bge	.L8
	ldr	r3, .L23+8
	ldr	r2, [r9]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L5
	ldr	r2, [r10]
	cmp	r3, r2
	beq	.L10
	ldr	r2, .L23+28
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L10
.L8:
	mvn	r0, fp
	mov	r1, r8
	lsr	r0, r0, #31
	bl	nn_assert_errno
	mov	r2, fp
	ldr	r1, [sp, #8]
	mov	r0, r7
	bl	nn_print_message
	ldr	r0, [sp, #8]
	bl	nn_freemsg
	bl	nn_clock_ms
	sub	r3, r6, r0
	cmp	r3, #0
	bgt	.L20
	b	.L6
.L10:
	bl	nn_clock_ms
	sub	r0, r6, r0
	cmp	r0, #0
	ble	.L5
	bl	nn_sleep
	b	.L5
.L19:
	ldr	r3, .L23+32
	ldr	r1, .L23+36
	ldr	r0, [r3]
	bl	fprintf
	ldr	r3, [r7]
	cmp	r3, #0
	bge	.L21
.L4:
	mov	r1, r5
	mov	r0, r7
	bl	nn_recv_loop
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC3
	.word	EAGAIN
	.word	errno
	.word	.LC1
	.word	.LC2
	.word	ETIMEDOUT
	.word	NN_MSG
	.word	EFSM
	.word	stderr
	.word	.LC0
	.size	nn_rw_loop, .-nn_rw_loop
	.comm	stderr,4,4
	.comm	errno,4,4
	.comm	NN_MSG,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EFSM,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
