	.file	"1065128.c"
	.intel_syntax noprefix
	.text
	.globl	thread_run
	.type	thread_run, @function
thread_run:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_run, .-thread_run
	.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:
.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, 592
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -584[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -580[rbp], eax
	cmp	DWORD PTR -580[rbp], 0
	jns	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -560[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -560[rbp], 2
	mov	edi, 3490
	call	htons@PLT
	mov	WORD PTR -558[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -556[rbp], eax
	lea	rcx, -560[rbp]
	mov	eax, DWORD PTR -580[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -580[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L5
	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
.L5:
	mov	DWORD PTR -592[rbp], 16
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -400[rbp]
	mov	rdi, rdx
#APP
# 46 "the_stack_data/1065128.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -576[rbp], edx
	mov	DWORD PTR -572[rbp], eax
	mov	eax, DWORD PTR -580[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -400[rbp+rax*8]
	mov	eax, DWORD PTR -580[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 -400[rbp+rax*8], rdx
	mov	eax, DWORD PTR -580[rbp]
	mov	DWORD PTR -584[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
.L14:
	mov	eax, DWORD PTR -584[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -400[rbp]
	mov	rdx, QWORD PTR -392[rbp]
	mov	QWORD PTR -528[rbp], rax
	mov	QWORD PTR -520[rbp], rdx
	mov	rax, QWORD PTR -384[rbp]
	mov	rdx, QWORD PTR -376[rbp]
	mov	QWORD PTR -512[rbp], rax
	mov	QWORD PTR -504[rbp], rdx
	mov	rax, QWORD PTR -368[rbp]
	mov	rdx, QWORD PTR -360[rbp]
	mov	QWORD PTR -496[rbp], rax
	mov	QWORD PTR -488[rbp], rdx
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR -344[rbp]
	mov	QWORD PTR -480[rbp], rax
	mov	QWORD PTR -472[rbp], rdx
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR -328[rbp]
	mov	QWORD PTR -464[rbp], rax
	mov	QWORD PTR -456[rbp], rdx
	mov	rax, QWORD PTR -320[rbp]
	mov	rdx, QWORD PTR -312[rbp]
	mov	QWORD PTR -448[rbp], rax
	mov	QWORD PTR -440[rbp], rdx
	mov	rax, QWORD PTR -304[rbp]
	mov	rdx, QWORD PTR -296[rbp]
	mov	QWORD PTR -432[rbp], rax
	mov	QWORD PTR -424[rbp], rdx
	mov	rax, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -280[rbp]
	mov	QWORD PTR -416[rbp], rax
	mov	QWORD PTR -408[rbp], rdx
	mov	eax, DWORD PTR -584[rbp]
	lea	edi, 1[rax]
	lea	rax, -528[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	DWORD PTR -588[rbp], 0
	jmp	.L7
.L13:
	mov	eax, DWORD PTR -588[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -528[rbp+rax*8]
	mov	eax, DWORD PTR -588[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	.L8
	mov	eax, DWORD PTR -588[rbp]
	cmp	eax, DWORD PTR -580[rbp]
	jne	.L9
	lea	rdx, -592[rbp]
	lea	rcx, -544[rbp]
	mov	eax, DWORD PTR -580[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -564[rbp], eax
	cmp	DWORD PTR -564[rbp], 0
	jns	.L10
	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
.L10:
	mov	eax, DWORD PTR -564[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -400[rbp+rax*8]
	mov	eax, DWORD PTR -564[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 -400[rbp+rax*8], rdx
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -564[rbp]
	cmp	eax, DWORD PTR -584[rbp]
	jle	.L8
	mov	eax, DWORD PTR -564[rbp]
	mov	DWORD PTR -584[rbp], eax
	jmp	.L8
.L9:
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -588[rbp]
	mov	ecx, 0
	mov	edx, 100
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -568[rbp], eax
	cmp	DWORD PTR -568[rbp], -1
	jne	.L11
	lea	rdi, .LC8[rip]
	call	perror@PLT
.L11:
	mov	eax, DWORD PTR -568[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -588[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	cmp	rax, -1
	jne	.L12
	lea	rdi, .LC9[rip]
	call	perror@PLT
.L12:
	mov	eax, DWORD PTR -588[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -588[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -400[rbp+rax*8]
	mov	eax, DWORD PTR -588[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 -400[rbp+rax*8], rdx
.L8:
	add	DWORD PTR -588[rbp], 1
.L7:
	mov	eax, DWORD PTR -588[rbp]
	cmp	eax, DWORD PTR -584[rbp]
	jle	.L13
	jmp	.L14
	.cfi_endproc
.LFE7:
	.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	"1065128.c"
	.text
	.align	2
	.global	thread_run
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_run, %function
thread_run:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	thread_run, .-thread_run
	.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 = 584
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #592
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-576]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-568]
	ldr	r3, [fp, #-568]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L18+4
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #552
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #548
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L18+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #548
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-548]
	sub	r3, fp, #552
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-568]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L18+12
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #10
	ldr	r0, [fp, #-568]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L18+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L18+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	mov	r3, #16
	str	r3, [fp, #-584]
	sub	r3, fp, #392
	str	r3, [fp, #-564]
	mov	r3, #0
	str	r3, [fp, #-572]
	b	.L6
.L7:
	ldr	r3, [fp, #-564]
	ldr	r2, [fp, #-572]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-572]
	add	r3, r3, #1
	str	r3, [fp, #-572]
.L6:
	ldr	r3, [fp, #-572]
	cmp	r3, #31
	bls	.L7
	ldr	r3, [fp, #-568]
	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, #-388]
	ldr	r3, [fp, #-568]
	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, #-388]
	ldr	r3, [fp, #-568]
	str	r3, [fp, #-576]
	ldr	r3, .L18+16
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L18+24
	bl	fwrite
.L16:
	ldr	r1, [fp, #-576]
	ldr	r0, .L18+28
	bl	printf
	sub	r3, fp, #520
	sub	r1, fp, #392
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-576]
	add	r0, r3, #1
	sub	r1, fp, #520
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L18+32
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	mov	r3, #0
	str	r3, [fp, #-580]
	b	.L9
.L15:
	ldr	r3, [fp, #-580]
	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, #-516]
	ldr	r3, [fp, #-580]
	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	.L10
	ldr	r2, [fp, #-580]
	ldr	r3, [fp, #-568]
	cmp	r2, r3
	bne	.L11
	sub	r2, fp, #584
	sub	r3, fp, #536
	mov	r1, r3
	ldr	r0, [fp, #-568]
	bl	accept
	str	r0, [fp, #-556]
	ldr	r3, [fp, #-556]
	cmp	r3, #0
	bge	.L12
	ldr	r3, .L18+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L18+36
	bl	fwrite
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-556]
	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, #-388]
	ldr	r3, [fp, #-556]
	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, #-388]
	ldr	r0, .L18+40
	bl	puts
	ldr	r2, [fp, #-556]
	ldr	r3, [fp, #-576]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-556]
	str	r3, [fp, #-576]
	b	.L10
.L11:
	sub	r1, fp, #264
	mov	r3, #0
	mov	r2, #100
	ldr	r0, [fp, #-580]
	bl	recv
	str	r0, [fp, #-560]
	ldr	r3, [fp, #-560]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L18+44
	bl	perror
.L13:
	sub	r2, fp, #264
	ldr	r3, [fp, #-560]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #264
	mov	r3, #0
	ldr	r0, [fp, #-580]
	bl	send
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L18+48
	bl	perror
.L14:
	ldr	r0, [fp, #-580]
	bl	close
	ldr	r3, [fp, #-580]
	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, #-388]
	ldr	r3, [fp, #-580]
	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, #-388]
.L10:
	ldr	r3, [fp, #-580]
	add	r3, r3, #1
	str	r3, [fp, #-580]
.L9:
	ldr	r2, [fp, #-580]
	ldr	r3, [fp, #-576]
	cmp	r2, r3
	ble	.L15
	b	.L16
.L19:
	.align	2
.L18:
	.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
