	.file	"279737.c"
	.intel_syntax noprefix
	.text
	.local	queue
	.comm	queue,8,8
	.local	qhead
	.comm	qhead,8,8
	.local	qtail
	.comm	qtail,8,8
	.data
	.align 4
	.type	qempty, @object
	.size	qempty, 4
qempty:
	.long	1
	.local	qfull
	.comm	qfull,4,4
	.local	qempty_mtx
	.comm	qempty_mtx,40,32
	.local	qfull_mtx
	.comm	qfull_mtx,40,32
	.local	qempty_cond
	.comm	qempty_cond,48,32
	.local	qfull_cond
	.comm	qfull_cond,48,32
	.globl	replicas
	.bss
	.align 8
	.type	replicas, @object
	.size	replicas, 8
replicas:
	.zero	8
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"initializing packet queue for %d items\n"
.LC1:
	.string	"not enough memory\n"
	.text
	.globl	qinit
	.type	qinit, @function
qinit:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	esi, 10016
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR queue[rip], rax
	mov	rax, QWORD PTR queue[rip]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 2
	call	exit@PLT
.L2:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	rcx, QWORD PTR queue[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, 1
	imul	rdx, rax, 10016
	mov	rsi, QWORD PTR queue[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 10016
	add	rax, rsi
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L4
	mov	rdx, QWORD PTR queue[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10016
	sub	rax, 10016
	add	rdx, rax
	mov	rax, QWORD PTR queue[rip]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR queue[rip]
	mov	QWORD PTR qtail[rip], rax
	mov	rax, QWORD PTR qtail[rip]
	mov	QWORD PTR qhead[rip], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	qinit, .-qinit
	.section	.rodata
.LC2:
	.string	"[sg]etsockopt()"
.LC3:
	.string	"send"
.LC4:
	.string	"receiver"
	.align 8
.LC5:
	.string	"UDP %s buffer size set to %d bytes\n"
	.text
	.globl	buffer_size
	.type	buffer_size, @function
buffer_size:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 4
	mov	esi, DWORD PTR -12[rbp]
	lea	rcx, -28[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8d, esi
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jne	.L6
	lea	rsi, -12[rbp]
	lea	rcx, -28[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8, rsi
	mov	esi, 1
	mov	edi, eax
	call	getsockopt@PLT
	test	eax, eax
	je	.L7
.L6:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L11
.L7:
	mov	edx, DWORD PTR -28[rbp]
	cmp	DWORD PTR -24[rbp], 7
	jne	.L9
	lea	rax, .LC3[rip]
	jmp	.L10
.L9:
	lea	rax, .LC4[rip]
.L10:
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L11:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	buffer_size, .-buffer_size
	.section	.rodata
.LC6:
	.string	"%d"
.LC7:
	.string	"Address not found: %s\n"
.LC8:
	.string	"%s: %s\n"
	.align 8
.LC9:
	.string	"connecting to %s (%s) port %d\n"
.LC10:
	.string	"socket"
.LC11:
	.string	"connect"
	.text
	.globl	output_socket
	.type	output_socket, @function
output_socket:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	eax, edi
	mov	QWORD PTR -128[rbp], rsi
	mov	DWORD PTR -120[rbp], edx
	mov	WORD PTR -116[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -96[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -96[rbp], 2
	mov	DWORD PTR -88[rbp], 2
	mov	DWORD PTR -84[rbp], 17
	mov	DWORD PTR -92[rbp], 2
	movzx	edx, WORD PTR -116[rbp]
	lea	rax, -38[rbp]
	mov	ecx, edx
	lea	rdx, .LC6[rip]
	mov	esi, 6
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	BYTE PTR -33[rbp], 0
	lea	rcx, -104[rbp]
	lea	rdx, -96[rbp]
	lea	rsi, -38[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	test	eax, eax
	je	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -128[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -108[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L16:
	mov	edi, 2
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 24[rax]
	lea	rsi, 4[rax]
	lea	rax, -32[rbp]
	mov	ecx, 16
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	movzx	ecx, WORD PTR -116[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 32[rax]
	lea	rdx, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -112[rbp], eax
	cmp	DWORD PTR -112[rbp], -1
	jne	.L17
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L17:
	mov	edx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	esi, 7
	mov	edi, eax
	call	buffer_size
	test	eax, eax
	je	.L18
	mov	edi, 2
	call	exit@PLT
.L18:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -112[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L19
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L19:
	mov	eax, DWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	output_socket, .-output_socket
	.globl	writer
	.type	writer, @function
writer:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	jmp	.L23
.L26:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L24
.L25:
	mov	rax, QWORD PTR qhead[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, rax
	mov	rax, QWORD PTR qhead[rip]
	lea	rcx, 16[rax]
	mov	rsi, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	add	rax, rsi
	mov	eax, DWORD PTR 12[rax]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -4[rbp], 1
.L24:
	mov	eax, DWORD PTR count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L25
	mov	rax, QWORD PTR qhead[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR qhead[rip], rax
	lea	rdi, qfull_mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR qfull[rip], 0
	lea	rdi, qfull_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, qfull_mtx[rip]
	call	pthread_mutex_unlock@PLT
.L23:
	mov	rdx, QWORD PTR qhead[rip]
	mov	rax, QWORD PTR qtail[rip]
	cmp	rdx, rax
	jne	.L26
	lea	rdi, qempty_mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR qempty[rip]
	test	eax, eax
	je	.L27
	lea	rsi, qempty_mtx[rip]
	lea	rdi, qempty_cond[rip]
	call	pthread_cond_wait@PLT
.L27:
	mov	DWORD PTR qempty[rip], 1
	lea	rdi, qempty_mtx[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L23
	.cfi_endproc
.LFE9:
	.size	writer, .-writer
	.section	.rodata
.LC12:
	.string	"%s buffer_size port host...\n"
.LC13:
	.string	"invalid buffer size: %d\n"
	.align 8
.LC14:
	.string	"using UDP send and receive buffer size of %d bytes\n"
.LC15:
	.string	"invalid port: %d\n"
.LC16:
	.string	"input socket"
.LC17:
	.string	"bind"
.LC18:
	.string	"listening on *:%d\n"
	.align 8
.LC19:
	.string	"not enough memory for replica array"
.LC20:
	.string	"cannot create writer thread\n"
.LC21:
	.string	"read: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -72[rbp], 0
	cmp	DWORD PTR -84[rbp], 3
	jg	.L30
	mov	rax, QWORD PTR -96[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L54
.L30:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jg	.L32
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -76[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L54
.L32:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	add	rax, rbx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 109
	je	.L33
	cmp	eax, 109
	jg	.L34
	cmp	eax, 107
	je	.L35
	cmp	eax, 107
	jg	.L34
	cmp	eax, 75
	je	.L35
	cmp	eax, 77
	je	.L33
	jmp	.L34
.L35:
	sal	DWORD PTR -76[rbp], 10
	jmp	.L34
.L33:
	sal	DWORD PTR -76[rbp], 20
	nop
.L34:
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 9
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	WORD PTR -78[rbp], ax
	cmp	WORD PTR -78[rbp], 0
	jne	.L36
	movzx	edx, WORD PTR -78[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L54
.L36:
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	call	qinit
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L37
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L54
.L37:
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 8
	mov	edi, eax
	call	buffer_size
	test	eax, eax
	je	.L38
	mov	edi, 2
	call	exit@PLT
.L38:
	mov	WORD PTR -48[rbp], 2
	mov	DWORD PTR -44[rbp], 0
	movzx	eax, WORD PTR -78[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L39
	lea	rdi, .LC17[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L54
.L39:
	movzx	eax, WORD PTR -78[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 3
	mov	DWORD PTR count[rip], eax
	mov	eax, DWORD PTR count[rip]
	cdqe
	mov	esi, 16
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR replicas[rip], rax
	mov	rax, QWORD PTR replicas[rip]
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC19[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L54
.L40:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L41
.L44:
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 3
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR replicas[rip]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	sal	rdx, 4
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	cmp	DWORD PTR -68[rbp], 0
	jle	.L42
	mov	rdx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	sub	rax, 16
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L42
	mov	rdx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	sub	rax, 16
	add	rax, rdx
	movzx	edx, WORD PTR 8[rax]
	mov	rcx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	add	rax, rcx
	add	edx, 1
	mov	WORD PTR 8[rax], dx
	jmp	.L43
.L42:
	mov	rdx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	add	rdx, rax
	movzx	eax, WORD PTR -78[rbp]
	mov	WORD PTR 8[rdx], ax
.L43:
	mov	rdx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR replicas[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	movzx	eax, WORD PTR 8[rax]
	movzx	eax, ax
	mov	rsi, QWORD PTR replicas[rip]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	sal	rdx, 4
	lea	rbx, [rsi+rdx]
	mov	edx, DWORD PTR -76[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	output_socket
	mov	DWORD PTR 12[rbx], eax
	add	DWORD PTR -68[rbp], 1
.L41:
	mov	eax, DWORD PTR count[rip]
	cmp	DWORD PTR -68[rbp], eax
	jl	.L44
	lea	rax, -56[rbp]
	mov	ecx, 0
	lea	rdx, writer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L45
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC20[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L54
.L45:
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, 2048
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	jmp	.L46
.L49:
	mov	rax, QWORD PTR qtail[rip]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jg	.L47
	call	sched_yield@PLT
	jmp	.L46
.L47:
	mov	rax, QWORD PTR qtail[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR qtail[rip], rax
	lea	rdi, qempty_mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR qempty[rip], 0
	lea	rdi, qempty_cond[rip]
	call	pthread_cond_signal@PLT
	lea	rdi, qempty_mtx[rip]
	call	pthread_mutex_unlock@PLT
.L46:
	mov	rax, QWORD PTR qtail[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR qhead[rip]
	cmp	rdx, rax
	je	.L48
	mov	rax, QWORD PTR qtail[rip]
	lea	rcx, 16[rax]
	mov	rbx, QWORD PTR qtail[rip]
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, 10000
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	jg	.L49
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 11
	je	.L49
.L48:
	mov	rax, QWORD PTR qtail[rip]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jle	.L57
	lea	rdi, qfull_mtx[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR qfull[rip]
	test	eax, eax
	je	.L52
	lea	rsi, qfull_mtx[rip]
	lea	rdi, qfull_cond[rip]
	call	pthread_cond_wait@PLT
.L52:
	mov	DWORD PTR qfull[rip], 1
	lea	rdi, qfull_mtx[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L45
.L57:
	nop
	mov	rax, QWORD PTR qtail[rip]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jns	.L53
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 2
	jmp	.L54
.L53:
	mov	eax, 0
.L54:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L55
	call	__stack_chk_fail@PLT
.L55:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"279737.c"
	.text
	.local	queue
	.comm	queue,4,4
	.local	qhead
	.comm	qhead,4,4
	.local	qtail
	.comm	qtail,4,4
	.data
	.align	2
	.type	qempty, %object
	.size	qempty, 4
qempty:
	.word	1
	.local	qfull
	.comm	qfull,4,4
	.local	qempty_mtx
	.comm	qempty_mtx,24,4
	.local	qfull_mtx
	.comm	qfull_mtx,24,4
	.local	qempty_cond
	.comm	qempty_cond,48,8
	.local	qfull_cond
	.comm	qfull_cond,48,8
	.comm	replicas,4,4
	.comm	count,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"initializing packet queue for %d items\012\000"
	.align	2
.LC1:
	.ascii	"not enough memory\012\000"
	.text
	.align	2
	.global	qinit
	.syntax unified
	.arm
	.fpu softvfp
	.type	qinit, %function
qinit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L5
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r1, .L5+4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L5+8
	str	r2, [r3]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L5+12
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L5+16
	bl	fwrite
	mov	r0, #2
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r3, .L5+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, .L5+4
	mul	r2, r3, r2
	ldr	r3, .L5+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldr	ip, .L5+4
	mul	r3, ip, r3
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L4
	ldr	r3, .L5+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r1, .L5+4
	mul	r3, r1, r3
	sub	r3, r3, #9984
	sub	r3, r3, #24
	add	r3, r2, r3
	ldr	r2, .L5+8
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	ldr	r2, .L5+20
	str	r3, [r2]
	ldr	r3, .L5+20
	ldr	r3, [r3]
	ldr	r2, .L5+24
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	10008
	.word	queue
	.word	stderr
	.word	.LC1
	.word	qtail
	.word	qhead
	.size	qinit, .-qinit
	.section	.rodata
	.align	2
.LC2:
	.ascii	"[sg]etsockopt()\000"
	.align	2
.LC3:
	.ascii	"send\000"
	.align	2
.LC4:
	.ascii	"receiver\000"
	.align	2
.LC5:
	.ascii	"UDP %s buffer size set to %d bytes\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	buffer_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	buffer_size, %function
buffer_size:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #4
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	sub	r2, fp, #24
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	sub	r2, fp, #24
	sub	r3, fp, #12
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	getsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
.L8:
	ldr	r0, .L15+4
	bl	perror
	mvn	r3, #0
	b	.L13
.L9:
	ldr	r3, [fp, #-20]
	cmp	r3, #7
	bne	.L11
	ldr	r3, .L15+8
	b	.L12
.L11:
	ldr	r3, .L15+12
.L12:
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	buffer_size, .-buffer_size
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"Address not found: %s\012\000"
	.align	2
.LC9:
	.ascii	"%s: %s\012\000"
	.align	2
.LC10:
	.ascii	"connecting to %s (%s) port %d\012\000"
	.align	2
.LC11:
	.ascii	"socket\000"
	.align	2
.LC12:
	.ascii	"connect\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	output_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	output_socket, %function
output_socket:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #92
	mov	r3, r0
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	strh	r3, [fp, #-86]	@ movhi
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #72
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	str	r3, [fp, #-72]
	mov	r3, #2
	str	r3, [fp, #-64]
	mov	r3, #17
	str	r3, [fp, #-60]
	mov	r3, #2
	str	r3, [fp, #-68]
	ldrh	r3, [fp, #-86]
	sub	r0, fp, #40
	ldr	r2, .L26+4
	mov	r1, #6
	bl	snprintf
	mov	r3, #0
	strb	r3, [fp, #-35]
	sub	r3, fp, #84
	sub	r2, fp, #72
	sub	r1, fp, #40
	ldr	r0, [fp, #-92]
	bl	getaddrinfo
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L26+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-92]
	ldr	r1, .L26+12
	mov	r0, r3
	bl	fprintf
	b	.L20
.L19:
	ldr	r3, .L26+8
	ldr	r4, [r3]
	ldr	r0, [fp, #-76]
	bl	gai_strerror
	mov	r2, r0
	ldr	r3, [fp, #-92]
	ldr	r1, .L26+16
	mov	r0, r4
	bl	fprintf
.L20:
	mov	r0, #2
	bl	exit
.L18:
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #20]
	add	r1, r3, #4
	sub	r2, fp, #32
	mov	r3, #16
	mov	r0, #2
	bl	inet_ntop
	ldr	r3, [fp, #-84]
	ldr	r1, [r3, #24]
	ldrh	r3, [fp, #-86]
	sub	r2, fp, #32
	ldr	r0, .L26+20
	bl	printf
	ldr	r3, [fp, #-84]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #8]
	mov	r2, #0
	mov	r1, r3
	bl	socket
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L26+24
	bl	perror
	mov	r0, #2
	bl	exit
.L21:
	ldr	r2, [fp, #-96]
	mov	r1, #7
	ldr	r0, [fp, #-80]
	bl	buffer_size
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r0, #2
	bl	exit
.L22:
	ldr	r3, [fp, #-84]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-80]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r0, .L26+28
	bl	perror
	mov	r0, #2
	bl	exit
.L23:
	ldr	r3, [fp, #-80]
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC13
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	output_socket, .-output_socket
	.align	2
	.global	writer
	.syntax unified
	.arm
	.fpu softvfp
	.type	writer, %function
writer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	b	.L29
.L32:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L30
.L31:
	ldr	r3, .L35
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r0, [r3, #8]
	ldr	r3, .L35+4
	ldr	r3, [r3]
	add	r1, r3, #8
	ldr	r3, .L35+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, r3
	bl	write
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L30:
	ldr	r3, .L35+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L31
	ldr	r3, .L35+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L35+4
	str	r3, [r2]
	ldr	r0, .L35+12
	bl	pthread_mutex_lock
	ldr	r3, .L35+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L35+20
	bl	pthread_cond_signal
	ldr	r0, .L35+12
	bl	pthread_mutex_unlock
.L29:
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, .L35+24
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L32
	ldr	r0, .L35+28
	bl	pthread_mutex_lock
	ldr	r3, .L35+32
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	ldr	r1, .L35+28
	ldr	r0, .L35+36
	bl	pthread_cond_wait
.L33:
	ldr	r3, .L35+32
	mov	r2, #1
	str	r2, [r3]
	ldr	r0, .L35+28
	bl	pthread_mutex_unlock
	b	.L29
.L36:
	.align	2
.L35:
	.word	replicas
	.word	qhead
	.word	count
	.word	qfull_mtx
	.word	qfull
	.word	qfull_cond
	.word	qtail
	.word	qempty_mtx
	.word	qempty
	.word	qempty_cond
	.size	writer, .-writer
	.section	.rodata
	.align	2
.LC14:
	.ascii	"%s buffer_size port host...\012\000"
	.align	2
.LC15:
	.ascii	"invalid buffer size: %d\012\000"
	.align	2
.LC16:
	.ascii	"using UDP send and receive buffer size of %d bytes\012"
	.ascii	"\000"
	.align	2
.LC17:
	.ascii	"invalid port: %d\012\000"
	.align	2
.LC18:
	.ascii	"input socket\000"
	.align	2
.LC19:
	.ascii	"bind\000"
	.align	2
.LC20:
	.ascii	"listening on *:%d\012\000"
	.align	2
.LC21:
	.ascii	"not enough memory for replica array\000"
	.align	2
.LC22:
	.ascii	"cannot create writer thread\012\000"
	.align	2
.LC23:
	.ascii	"read: %s\012\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	bgt	.L38
	ldr	r3, .L66+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-68]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L66+8
	bl	fprintf
	mov	r3, #1
	b	.L62
.L38:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bgt	.L40
	ldr	r3, .L66+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	ldr	r1, .L66+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L62
.L40:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r4, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	add	r3, r4, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #109
	beq	.L41
	cmp	r3, #109
	bgt	.L42
	cmp	r3, #107
	beq	.L43
	cmp	r3, #107
	bgt	.L42
	cmp	r3, #75
	beq	.L43
	cmp	r3, #77
	beq	.L41
	b	.L42
.L43:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #10
	str	r3, [fp, #-52]
	b	.L42
.L41:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #20
	str	r3, [fp, #-52]
	nop
.L42:
	ldr	r3, [fp, #-52]
	ldr	r2, .L66+16
	smull	r1, r2, r3, r2
	asr	r2, r2, #9
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r1, [fp, #-52]
	ldr	r0, .L66+20
	bl	printf
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	strh	r3, [fp, #-58]	@ movhi
	ldrh	r3, [fp, #-58]
	cmp	r3, #0
	bne	.L44
	ldr	r3, .L66+4
	ldr	r3, [r3]
	ldrh	r2, [fp, #-58]
	ldr	r1, .L66+24
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L62
.L44:
	ldr	r0, [fp, #-40]
	bl	qinit
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L45
	ldr	r0, .L66+28
	bl	perror
	mov	r3, #2
	b	.L62
.L45:
	ldr	r2, [fp, #-52]
	mov	r1, #8
	ldr	r0, [fp, #-36]
	bl	buffer_size
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	mov	r0, #2
	bl	exit
.L46:
	mov	r3, #2
	strh	r3, [fp, #-32]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-28]
	ldrh	r3, [fp, #-58]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-30]	@ movhi
	sub	r3, fp, #32
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L47
	ldr	r0, .L66+32
	bl	perror
	mov	r3, #2
	b	.L62
.L47:
	ldrh	r3, [fp, #-58]
	mov	r1, r3
	ldr	r0, .L66+36
	bl	printf
	ldr	r3, [fp, #-64]
	sub	r3, r3, #3
	ldr	r2, .L66+40
	str	r3, [r2]
	ldr	r3, .L66+40
	ldr	r3, [r3]
	mov	r1, #12
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L66+44
	str	r2, [r3]
	ldr	r3, .L66+44
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L48
	ldr	r3, .L66+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L66+48
	bl	fwrite
	mov	r3, #2
	b	.L62
.L48:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L49
.L52:
	ldr	r3, [fp, #-44]
	add	r3, r3, #3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r1, r2, r3
	ldr	r3, .L66+44
	ldr	r0, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r2, [r1]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L50
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, #12
	add	r3, r1, r3
	ldr	r0, [r3]
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	mov	r1, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L50
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, #12
	add	r3, r1, r3
	ldrh	r1, [r3, #4]
	ldr	r3, .L66+44
	ldr	r0, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r2, r1, #1
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	strh	r2, [r3, #4]	@ movhi
	b	.L51
.L50:
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrh	r2, [fp, #-58]	@ movhi
	strh	r2, [r3, #4]	@ movhi
.L51:
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrh	r0, [r3, #4]
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	ip, [r3]
	ldr	r3, .L66+44
	ldr	r1, [r3]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r4, r1, r3
	ldr	r2, [fp, #-52]
	mov	r1, ip
	bl	output_socket
	mov	r3, r0
	str	r3, [r4, #8]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L49:
	ldr	r3, .L66+40
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L52
	sub	r0, fp, #56
	mov	r3, #0
	ldr	r2, .L66+52
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L53
	ldr	r3, .L66+4
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L66+56
	bl	fwrite
	mov	r3, #2
	b	.L62
.L53:
	mov	r2, #2048
	mov	r1, #4
	ldr	r0, [fp, #-36]
	bl	fcntl
	b	.L54
.L57:
	ldr	r3, .L66+60
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bgt	.L55
	bl	sched_yield
	b	.L54
.L55:
	ldr	r3, .L66+60
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L66+60
	str	r3, [r2]
	ldr	r0, .L66+64
	bl	pthread_mutex_lock
	ldr	r3, .L66+68
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L66+72
	bl	pthread_cond_signal
	ldr	r0, .L66+64
	bl	pthread_mutex_unlock
.L54:
	ldr	r3, .L66+60
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L66+76
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L56
	ldr	r3, .L66+60
	ldr	r3, [r3]
	add	r3, r3, #8
	ldr	r2, .L66+60
	ldr	r4, [r2]
	ldr	r2, .L66+80
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	read
	mov	r3, r0
	str	r3, [r4, #4]
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bgt	.L57
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #11
	beq	.L57
.L56:
	ldr	r3, .L66+60
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	ble	.L65
	ldr	r0, .L66+84
	bl	pthread_mutex_lock
	ldr	r3, .L66+88
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L60
	ldr	r1, .L66+84
	ldr	r0, .L66+92
	bl	pthread_cond_wait
.L60:
	ldr	r3, .L66+88
	mov	r2, #1
	str	r2, [r3]
	ldr	r0, .L66+84
	bl	pthread_mutex_unlock
	b	.L53
.L65:
	nop
	ldr	r3, .L66+60
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L61
	ldr	r0, [fp, #-48]
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L66+96
	bl	printf
	mov	r3, #2
	b	.L62
.L61:
	mov	r3, #0
.L62:
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC24
	.word	stderr
	.word	.LC14
	.word	.LC15
	.word	274877907
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	count
	.word	replicas
	.word	.LC21
	.word	writer
	.word	.LC22
	.word	qtail
	.word	qempty_mtx
	.word	qempty
	.word	qempty_cond
	.word	qhead
	.word	10000
	.word	qfull_mtx
	.word	qfull
	.word	qfull_cond
	.word	.LC23
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
