	.file	"extr_msg-search-engine.c_server_read_write.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"socket %d: disconnected, cleaning\n"
	.align 8
.LC1:
	.string	"server_reader=%d, ready=%02x, state=%02x\n"
	.align 8
.LC2:
	.string	"socket %d: closing and cleaning\n"
	.text
	.p2align 4
	.globl	server_read_write
	.type	server_read_write, @function
server_read_write:
.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
	mov	r14d, edi
	mov	rdi, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	assert@PLT
	mov	eax, DWORD PTR EPOLLHUP[rip]
	or	eax, DWORD PTR EPOLLERR[rip]
	or	eax, DWORD PTR EPOLLRDHUP[rip]
	test	DWORD PTR [r12], eax
	je	.L2
	cmp	QWORD PTR verbosity[rip], 0
	jg	.L24
.L12:
	mov	rdi, rbp
	call	free_connection_buffers@PLT
	mov	edx, 24
	xor	esi, esi
	mov	rdi, rbp
	call	memset@PLT
	sub	DWORD PTR active_connections[rip], 1
	mov	eax, DWORD PTR EVA_DESTROY[rip]
	mov	QWORD PTR 16[r12], 0
.L1:
	add	rsp, 8
	.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
.L24:
	.cfi_restore_state
	mov	edi, DWORD PTR stderr[rip]
	mov	edx, r14d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, rbp
	call	server_writer@PLT
	test	eax, eax
	jne	.L1
	lea	r13, 16[rbp]
	lea	r15, .LC1[rip]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	test	ebx, ebx
	jg	.L9
	cmp	QWORD PTR 8[rbp], 0
	jne	.L9
	mov	rdi, r13
	call	get_ready_bytes@PLT
	test	rax, rax
	je	.L10
	mov	DWORD PTR 0[rbp], 1
.L10:
	mov	rdi, rbp
	call	server_writer@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR 4[r12]
	test	DWORD PTR EVT_READ[rip], eax
	je	.L9
	cmp	DWORD PTR 0[rbp], -3
	je	.L9
.L11:
	mov	rdi, rbp
	call	server_reader@PLT
	cmp	QWORD PTR verbosity[rip], 0
	mov	ebx, eax
	je	.L5
	mov	ecx, DWORD PTR 4[r12]
	mov	r8d, DWORD PTR 8[r12]
	mov	edx, eax
	mov	rsi, r15
	mov	edi, DWORD PTR stderr[rip]
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rdi, 20[rbp]
	call	free_unused_buffers@PLT
	mov	rdi, r13
	call	free_unused_buffers@PLT
	cmp	DWORD PTR 4[rbp], -3
	je	.L25
	cmp	DWORD PTR 0[rbp], 1
	mov	eax, DWORD PTR EVT_SPEC[rip]
	je	.L26
.L13:
	or	eax, DWORD PTR EVT_READ[rip]
	add	rsp, 8
	.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
.L26:
	.cfi_restore_state
	cmp	QWORD PTR 8[rbp], 0
	jne	.L13
	or	eax, DWORD PTR EVT_WRITE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	cmp	QWORD PTR verbosity[rip], 0
	jle	.L12
	mov	edi, DWORD PTR stderr[rip]
	mov	edx, r14d
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	server_read_write, .-server_read_write
	.comm	verbosity,8,8
	.comm	stderr,4,4
	.comm	active_connections,4,4
	.comm	EVT_WRITE,4,4
	.comm	EVT_SPEC,4,4
	.comm	EVT_READ,4,4
	.comm	EVA_DESTROY,4,4
	.comm	EPOLLRDHUP,4,4
	.comm	EPOLLHUP,4,4
	.comm	EPOLLERR,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_msg-search-engine.c_server_read_write.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"socket %d: disconnected, cleaning\012\000"
	.align	2
.LC1:
	.ascii	"server_reader=%d, ready=%02x, state=%02x\012\000"
	.align	2
.LC2:
	.ascii	"socket %d: closing and cleaning\012\000"
	.text
	.align	2
	.global	server_read_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	server_read_write, %function
server_read_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r2
	mov	r8, r0
	sub	sp, sp, #12
	mov	r0, r1
	mov	r4, r1
	bl	assert
	ldr	r3, .L33
	ldr	r2, .L33+4
	ldr	r1, .L33+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r2, [r5]
	orr	r3, r3, r1
	tst	r3, r2
	beq	.L2
	ldr	r3, .L33+12
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L30
.L12:
	mov	r0, r4
	bl	free_connection_buffers
	mov	r2, #20
	mov	r1, #0
	mov	r0, r4
	bl	memset
	mov	r0, #0
	ldr	r2, .L33+16
	ldr	r1, .L33+20
	ldr	r3, [r2]
	str	r0, [r5, #12]
	sub	r3, r3, #1
	ldr	r0, [r1]
	str	r3, [r2]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	ldr	r3, .L33+24
	mov	r2, r8
	ldr	r0, [r3]
	ldr	r1, .L33+28
	bl	fprintf
	b	.L12
.L2:
	mov	r0, r4
	bl	server_writer
	cmp	r0, #0
	bne	.L1
	ldr	r7, .L33+12
	ldr	r10, .L33+32
	ldr	r9, .L33+36
	add	r6, r4, #12
	b	.L11
.L5:
	cmp	fp, #0
	bgt	.L9
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L9
	mov	r0, r6
	bl	get_ready_bytes
	mov	r3, r0
	cmp	r3, #0
	movne	r3, #1
	mov	r0, r4
	strne	r3, [r4]
	bl	server_writer
	cmp	r0, #0
	bne	.L9
	ldr	r2, [r5, #4]
	ldr	r3, [r9]
	tst	r2, r3
	beq	.L9
	ldr	r3, [r4]
	cmn	r3, #3
	beq	.L9
.L11:
	mov	r0, r4
	bl	server_reader
	ldr	r3, [r7]
	mov	fp, r0
	cmp	r3, #0
	beq	.L5
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #4]
	str	r2, [sp]
	mov	r2, r0
	ldr	r0, .L33+24
	mov	r1, r10
	ldr	r0, [r0]
	bl	fprintf
	b	.L5
.L9:
	add	r0, r4, #16
	bl	free_unused_buffers
	mov	r0, r6
	bl	free_unused_buffers
	ldr	r3, [r4, #4]
	cmn	r3, #3
	beq	.L31
	ldr	r2, [r4]
	ldr	r3, .L33+40
	cmp	r2, #1
	ldr	r0, [r3]
	beq	.L32
.L13:
	ldr	r3, .L33+36
	ldr	r3, [r3]
	orr	r0, r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L33+44
	ldr	r3, [r3]
	orr	r0, r0, r3
	b	.L1
.L31:
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L12
	ldr	r3, .L33+24
	mov	r2, r8
	ldr	r0, [r3]
	ldr	r1, .L33+48
	bl	fprintf
	b	.L12
.L34:
	.align	2
.L33:
	.word	EPOLLHUP
	.word	EPOLLERR
	.word	EPOLLRDHUP
	.word	verbosity
	.word	active_connections
	.word	EVA_DESTROY
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	EVT_READ
	.word	EVT_SPEC
	.word	EVT_WRITE
	.word	.LC2
	.size	server_read_write, .-server_read_write
	.comm	verbosity,4,4
	.comm	stderr,4,4
	.comm	active_connections,4,4
	.comm	EVT_WRITE,4,4
	.comm	EVT_SPEC,4,4
	.comm	EVT_READ,4,4
	.comm	EVA_DESTROY,4,4
	.comm	EPOLLRDHUP,4,4
	.comm	EPOLLHUP,4,4
	.comm	EPOLLERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
