	.file	"6165.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket() failed"
.LC1:
	.string	"bind() failed"
.LC2:
	.string	"listen failed\n"
.LC3:
	.string	"Server up and running.\n"
	.align 8
.LC4:
	.string	"SERVER: Waiting for contact..., %d\n"
.LC5:
	.string	"select"
.LC6:
	.string	"accept failed\n"
.LC7:
	.string	"set "
.LC8:
	.string	"recv"
.LC9:
	.string	"send"
	.text
	.globl	main
	.type	main, @function
main:
.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, 448
	mov	DWORD PTR -436[rbp], edi
	mov	QWORD PTR -448[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -424[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -420[rbp], eax
	cmp	DWORD PTR -420[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rax, -400[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -400[rbp], 2
	mov	edi, 3490
	call	htons@PLT
	mov	WORD PTR -398[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -396[rbp], eax
	lea	rcx, -400[rbp]
	mov	eax, DWORD PTR -420[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -420[rbp]
	mov	esi, 6
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	DWORD PTR -432[rbp], 16
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -240[rbp]
	mov	rdi, rdx
#APP
# 42 "the_stack_data/6165.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -416[rbp], edx
	mov	DWORD PTR -412[rbp], eax
	mov	eax, DWORD PTR -420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -240[rbp+rax*8]
	mov	eax, DWORD PTR -420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -240[rbp+rax*8], rdx
	mov	eax, DWORD PTR -420[rbp]
	mov	DWORD PTR -424[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
.L13:
	mov	eax, DWORD PTR -424[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR -368[rbp], rax
	mov	QWORD PTR -360[rbp], rdx
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR -216[rbp]
	mov	QWORD PTR -352[rbp], rax
	mov	QWORD PTR -344[rbp], rdx
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR -200[rbp]
	mov	QWORD PTR -336[rbp], rax
	mov	QWORD PTR -328[rbp], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -320[rbp], rax
	mov	QWORD PTR -312[rbp], rdx
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR -304[rbp], rax
	mov	QWORD PTR -296[rbp], rdx
	mov	rax, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -280[rbp], rdx
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR -272[rbp], rax
	mov	QWORD PTR -264[rbp], rdx
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], rdx
	mov	eax, DWORD PTR -424[rbp]
	lea	edi, 1[rax]
	lea	rax, -368[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	DWORD PTR -428[rbp], 0
	jmp	.L6
.L12:
	mov	eax, DWORD PTR -428[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -368[rbp+rax*8]
	mov	eax, DWORD PTR -428[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR -428[rbp]
	cmp	eax, DWORD PTR -420[rbp]
	jne	.L8
	lea	rdx, -432[rbp]
	lea	rcx, -384[rbp]
	mov	eax, DWORD PTR -420[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -404[rbp], eax
	cmp	DWORD PTR -404[rbp], 0
	jns	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -404[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -240[rbp+rax*8]
	mov	eax, DWORD PTR -404[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -240[rbp+rax*8], rdx
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -404[rbp]
	cmp	eax, DWORD PTR -424[rbp]
	jle	.L7
	mov	eax, DWORD PTR -404[rbp]
	mov	DWORD PTR -424[rbp], eax
	jmp	.L7
.L8:
	lea	rsi, -112[rbp]
	mov	eax, DWORD PTR -428[rbp]
	mov	ecx, 0
	mov	edx, 100
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -408[rbp], eax
	cmp	DWORD PTR -408[rbp], -1
	jne	.L10
	lea	rdi, .LC8[rip]
	call	perror@PLT
.L10:
	mov	eax, DWORD PTR -408[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], 0
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -112[rbp]
	mov	eax, DWORD PTR -428[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	cmp	rax, -1
	jne	.L11
	lea	rdi, .LC9[rip]
	call	perror@PLT
.L11:
	mov	eax, DWORD PTR -428[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -428[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -240[rbp+rax*8]
	mov	eax, DWORD PTR -428[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	not	rax
	and	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -240[rbp+rax*8], rdx
.L7:
	add	DWORD PTR -428[rbp], 1
.L6:
	mov	eax, DWORD PTR -428[rbp]
	cmp	eax, DWORD PTR -424[rbp]
	jle	.L12
	jmp	.L13
	.cfi_endproc
.LFE6:
	.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	"6165.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket() failed\000"
	.align	2
.LC1:
	.ascii	"bind() failed\000"
	.align	2
.LC2:
	.ascii	"listen failed\012\000"
	.align	2
.LC3:
	.ascii	"Server up and running.\012\000"
	.align	2
.LC4:
	.ascii	"SERVER: Waiting for contact..., %d\012\000"
	.align	2
.LC5:
	.ascii	"select\000"
	.align	2
.LC6:
	.ascii	"accept failed\012\000"
	.align	2
.LC7:
	.ascii	"set \000"
	.align	2
.LC8:
	.ascii	"recv\000"
	.align	2
.LC9:
	.ascii	"send\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 432
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #440
	str	r0, [fp, #-432]
	str	r1, [fp, #-436]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-420]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-412]
	ldr	r3, [fp, #-412]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L17+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #396
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #392
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L17+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #392
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-392]
	sub	r3, fp, #396
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-412]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	ldr	r0, .L17+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #6
	ldr	r0, [fp, #-412]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L17+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L17+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L4:
	mov	r3, #16
	str	r3, [fp, #-428]
	sub	r3, fp, #236
	str	r3, [fp, #-408]
	mov	r3, #0
	str	r3, [fp, #-416]
	b	.L5
.L6:
	ldr	r3, [fp, #-408]
	ldr	r2, [fp, #-416]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-416]
	add	r3, r3, #1
	str	r3, [fp, #-416]
.L5:
	ldr	r3, [fp, #-416]
	cmp	r3, #31
	bls	.L6
	ldr	r3, [fp, #-412]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-232]
	ldr	r3, [fp, #-412]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-232]
	ldr	r3, [fp, #-412]
	str	r3, [fp, #-420]
	ldr	r3, .L17+16
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L17+24
	bl	fwrite
.L15:
	ldr	r1, [fp, #-420]
	ldr	r0, .L17+28
	bl	printf
	sub	r3, fp, #364
	sub	r1, fp, #236
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-420]
	add	r0, r3, #1
	sub	r1, fp, #364
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L17+32
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	mov	r3, #0
	str	r3, [fp, #-424]
	b	.L8
.L14:
	ldr	r3, [fp, #-424]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-360]
	ldr	r3, [fp, #-424]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L9
	ldr	r2, [fp, #-424]
	ldr	r3, [fp, #-412]
	cmp	r2, r3
	bne	.L10
	sub	r2, fp, #428
	sub	r3, fp, #380
	mov	r1, r3
	ldr	r0, [fp, #-412]
	bl	accept
	str	r0, [fp, #-400]
	ldr	r3, [fp, #-400]
	cmp	r3, #0
	bge	.L11
	ldr	r3, .L17+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L17+36
	bl	fwrite
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-400]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-232]
	ldr	r3, [fp, #-400]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-232]
	ldr	r0, .L17+40
	bl	puts
	ldr	r2, [fp, #-400]
	ldr	r3, [fp, #-420]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-400]
	str	r3, [fp, #-420]
	b	.L9
.L10:
	sub	r1, fp, #108
	mov	r3, #0
	mov	r2, #100
	ldr	r0, [fp, #-424]
	bl	recv
	str	r0, [fp, #-404]
	ldr	r3, [fp, #-404]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L17+44
	bl	perror
.L12:
	sub	r2, fp, #108
	ldr	r3, [fp, #-404]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #108
	mov	r3, #0
	ldr	r0, [fp, #-424]
	bl	send
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L17+48
	bl	perror
.L13:
	ldr	r0, [fp, #-424]
	bl	close
	ldr	r3, [fp, #-424]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-232]
	ldr	r3, [fp, #-424]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	mvn	r3, r3
	and	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-232]
.L9:
	ldr	r3, [fp, #-424]
	add	r3, r3, #1
	str	r3, [fp, #-424]
.L8:
	ldr	r2, [fp, #-424]
	ldr	r3, [fp, #-420]
	cmp	r2, r3
	ble	.L14
	b	.L15
.L18:
	.align	2
.L17:
	.word	.LC10
	.word	.LC0
	.word	3490
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
