	.file	"641772.c"
	.intel_syntax noprefix
	.text
	.globl	clientCount
	.bss
	.align 4
	.type	clientCount, @object
	.size	clientCount, 4
clientCount:
	.zero	4
	.local	mutex
	.comm	mutex,40,32
	.local	cond
	.comm	cond,48,32
	.globl	Client
	.align 32
	.type	Client, @object
	.size	Client, 28672
Client:
	.zero	28672
	.globl	thread
	.align 32
	.type	thread, @object
	.size	thread, 8192
thread:
	.zero	8192
	.section	.rodata
.LC0:
	.string	"Client %d connected.\n"
.LC1:
	.string	"LIST"
.LC2:
	.string	"Client %d is at socket %d.\n"
.LC3:
	.string	"SEND"
	.text
	.globl	doNetworking
	.type	doNetworking, @function
doNetworking:
.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, 2112
	mov	QWORD PTR -2104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -2104[rbp]
	mov	QWORD PTR -2072[rbp], rax
	mov	rax, QWORD PTR -2072[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -2088[rbp], eax
	mov	rax, QWORD PTR -2072[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -2084[rbp], eax
	mov	eax, DWORD PTR -2088[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	lea	rsi, -2064[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2080[rbp], eax
	mov	eax, DWORD PTR -2080[rbp]
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 0
	lea	rax, -2064[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	DWORD PTR -2096[rbp], 0
	mov	DWORD PTR -2092[rbp], 0
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -2092[rbp]
	cmp	eax, DWORD PTR -2088[rbp]
	je	.L4
	mov	eax, DWORD PTR -2092[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, Client[rip+4]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -2092[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	lea	rsi, -1040[rbp]
	add	rax, rsi
	mov	r8d, ecx
	mov	ecx, edx
	lea	rdx, .LC2[rip]
	mov	esi, 1024
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	add	DWORD PTR -2096[rbp], eax
.L4:
	add	DWORD PTR -2092[rbp], 1
.L3:
	mov	eax, DWORD PTR clientCount[rip]
	cmp	DWORD PTR -2092[rbp], eax
	jl	.L5
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	jmp	.L8
.L2:
	lea	rax, -2064[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	lea	rsi, -2064[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2080[rbp], eax
	mov	eax, DWORD PTR -2080[rbp]
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 0
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	atoi@PLT
	sub	eax, 1
	mov	DWORD PTR -2076[rbp], eax
	lea	rsi, -2064[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2080[rbp], eax
	mov	eax, DWORD PTR -2080[rbp]
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 0
	mov	eax, DWORD PTR -2076[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, Client[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	lea	rsi, -2064[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	jmp	.L8
	.cfi_endproc
.LFE6:
	.size	doNetworking, .-doNetworking
	.section	.rodata
.LC4:
	.string	"please enter %s <port>"
.LC5:
	.string	"error binding"
.LC6:
	.string	"error listening"
	.align 8
.LC7:
	.string	"Server started listenting on port %i\n"
	.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
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 1
	jg	.L11
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L16
.L11:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	WORD PTR -48[rbp], 2
	mov	eax, DWORD PTR -56[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	mov	edi, 0
	call	htons@PLT
	movzx	eax, ax
	mov	DWORD PTR -44[rbp], eax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L13
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L16
.L13:
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 1024
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L14
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, DWORD PTR clientCount[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, 16[rax]
	lea	rax, Client[rip]
	add	rax, rdx
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR clientCount[rip]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 2
	lea	rcx, Client[rip]
	add	rax, rcx
	lea	rcx, 8[rax]
	mov	ebx, DWORD PTR clientCount[rip]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	edx, eax
	movsx	rcx, ebx
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, Client[rip+4]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR clientCount[rip]
	mov	edx, DWORD PTR clientCount[rip]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, Client[rip]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR clientCount[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, Client[rip]
	add	rdx, rax
	mov	eax, DWORD PTR clientCount[rip]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, thread[rip]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, doNetworking[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	eax, DWORD PTR clientCount[rip]
	add	eax, 1
	mov	DWORD PTR clientCount[rip], eax
	jmp	.L15
.L16:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"641772.c"
	.text
	.global	clientCount
	.bss
	.align	2
	.type	clientCount, %object
	.size	clientCount, 4
clientCount:
	.space	4
	.local	mutex
	.comm	mutex,24,4
	.local	cond
	.comm	cond,48,8
	.comm	Client,28672,4
	.comm	thread,4096,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Client %d connected.\012\000"
	.align	2
.LC1:
	.ascii	"LIST\000"
	.align	2
.LC2:
	.ascii	"Client %d is at socket %d.\012\000"
	.align	2
.LC3:
	.ascii	"SEND\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	doNetworking
	.syntax unified
	.arm
	.fpu softvfp
	.type	doNetworking, %function
doNetworking:
	@ args = 0, pretend = 0, frame = 2088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2096
	str	r0, [fp, #-2088]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2088]
	str	r3, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	ldr	r3, [r3]
	str	r3, [fp, #-2072]
	ldr	r3, [fp, #-2076]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-2068]
	ldr	r3, [fp, #-2072]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
.L8:
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-2068]
	bl	recv
	str	r0, [fp, #-2064]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2064]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L10+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	str	r3, [fp, #-2084]
	mov	r3, #0
	str	r3, [fp, #-2080]
	b	.L3
.L5:
	ldr	r2, [fp, #-2080]
	ldr	r3, [fp, #-2072]
	cmp	r2, r3
	beq	.L4
	ldr	r2, [fp, #-2084]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r0, r3, r2
	ldr	r3, [fp, #-2080]
	add	r1, r3, #1
	ldr	ip, .L10+12
	ldr	r2, [fp, #-2080]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, ip, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r2, .L10+16
	mov	r1, #1024
	bl	snprintf
	mov	r2, r0
	ldr	r3, [fp, #-2084]
	add	r3, r3, r2
	str	r3, [fp, #-2084]
.L4:
	ldr	r3, [fp, #-2080]
	add	r3, r3, #1
	str	r3, [fp, #-2080]
.L3:
	ldr	r3, .L10+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-2080]
	cmp	r2, r3
	blt	.L5
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-2068]
	bl	send
	b	.L8
.L2:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L10+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-2068]
	bl	recv
	str	r0, [fp, #-2064]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2064]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-2060]
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-2068]
	bl	recv
	str	r0, [fp, #-2064]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2064]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, .L10+12
	ldr	r2, [fp, #-2060]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r0, [r3]
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	bl	send
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	Client
	.word	.LC2
	.word	clientCount
	.word	.LC3
	.size	doNetworking, .-doNetworking
	.section	.rodata
	.align	2
.LC5:
	.ascii	"please enter %s <port>\000"
	.align	2
.LC6:
	.ascii	"error binding\000"
	.align	2
.LC7:
	.ascii	"error listening\000"
	.align	2
.LC8:
	.ascii	"Server started listenting on port %i\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bgt	.L13
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+4
	bl	printf
	mov	r3, #1
	b	.L18
.L13:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-40]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-36]
	mov	r3, #2
	strh	r3, [fp, #-32]	@ movhi
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-30]	@ movhi
	mov	r0, #0
	bl	htons
	mov	r3, r0
	str	r3, [fp, #-28]
	sub	r3, fp, #32
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L20+8
	bl	puts
	mov	r3, #1
	b	.L18
.L15:
	mov	r1, #1024
	ldr	r0, [fp, #-36]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r0, .L20+12
	bl	puts
	mov	r3, #0
	b	.L18
.L16:
	ldr	r1, [fp, #-40]
	ldr	r0, .L20+16
	bl	printf
.L17:
	ldr	r3, .L20+20
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #8
	ldr	r2, .L20+24
	add	r1, r3, r2
	ldr	r3, .L20+20
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #24
	ldr	r2, .L20+24
	add	r3, r3, r2
	ldr	r2, .L20+20
	ldr	r4, [r2]
	mov	r2, r3
	ldr	r0, [fp, #-36]
	bl	accept
	mov	r2, r0
	ldr	r1, .L20+24
	mov	r3, r4
	lsl	r3, r3, #3
	sub	r3, r3, r4
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	str	r2, [r3]
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, .L20+28
	add	r0, r3, r2
	ldr	r3, .L20+20
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L20+24
	add	r3, r3, r2
	ldr	r2, .L20+32
	mov	r1, #0
	bl	pthread_create
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
	b	.L17
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC9
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	clientCount
	.word	Client
	.word	thread
	.word	doNetworking
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
