	.file	"50138706.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Say Hi from the Server\n"
	.align 8
.LC1:
	.string	"[Server] Communicate with the new connection #%u @ %p ..\n"
.LC2:
	.string	"Send failed"
	.align 8
.LC3:
	.string	"[Server] Shuting down the new connection #%u ..\n"
	.text
	.globl	run
	.type	run, @function
run:
.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	QWORD PTR -24[rbp], rdi
	lea	rax, .LC0[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	call	pthread_self@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L4
.L3:
	add	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 4
	jle	.L5
.L4:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.section	.rodata
.LC4:
	.string	"[Server] Create socket"
.LC5:
	.string	"Create socket failed"
.LC6:
	.string	"[Server] Bind socket"
.LC7:
	.string	"Bind failed"
.LC8:
	.string	"[Server] Listening on socket"
.LC9:
	.string	"Listen failed"
	.align 8
.LC10:
	.string	"[Server] Wait for clients to connect .."
.LC11:
	.string	"Accept failed"
.LC12:
	.string	"[Server] Client connected"
.LC13:
	.string	"Create a worker thread failed"
	.align 8
.LC14:
	.string	"[Server] Achieve maximum amount of connections"
.LC15:
	.string	"[Server] Shuting down .."
.LC16:
	.string	"[Server] BYE "
	.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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -100[rbp], -1
	mov	DWORD PTR -112[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	DWORD PTR -108[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	DWORD PTR -64[rbp], 0
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	jns	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	jmp	.L9
.L8:
	mov	WORD PTR -96[rbp], 2
	mov	edi, 1234
	call	htons@PLT
	mov	WORD PTR -94[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -92[rbp], eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -112[rbp], 16
	mov	eax, DWORD PTR -112[rbp]
	mov	edx, eax
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L9
.L10:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L11
	lea	rdi, .LC9[rip]
	call	perror@PLT
	jmp	.L9
.L11:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L12
.L16:
	lea	rdx, -112[rbp]
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	edx, DWORD PTR -108[rbp]
	mov	DWORD PTR -80[rbp+rdx*4], eax
	mov	eax, DWORD PTR -108[rbp]
	mov	eax, DWORD PTR -80[rbp+rax*4]
	test	eax, eax
	jns	.L13
	lea	rdi, .LC11[rip]
	call	perror@PLT
	jmp	.L14
.L13:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -108[rbp]
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -108[rbp]
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, run[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L15
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -108[rbp]
	mov	eax, DWORD PTR -80[rbp+rax*4]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	jmp	.L14
.L15:
	add	DWORD PTR -108[rbp], 1
.L12:
	cmp	DWORD PTR -108[rbp], 4
	jbe	.L16
.L14:
	cmp	DWORD PTR -108[rbp], 5
	jne	.L17
	lea	rdi, .LC14[rip]
	call	puts@PLT
.L17:
	mov	DWORD PTR -104[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -104[rbp], 1
.L18:
	cmp	DWORD PTR -104[rbp], 4
	jle	.L19
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	edi, 3
	call	sleep@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L22
.L9:
	lea	rdi, .LC15[rip]
	call	puts@PLT
	cmp	DWORD PTR -100[rbp], 0
	js	.L21
	mov	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	close@PLT
.L21:
	mov	edi, 3
	call	sleep@PLT
	mov	eax, 1
.L22:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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	"50138706.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Say Hi from the Server\012\000"
	.align	2
.LC1:
	.ascii	"[Server] Communicate with the new connection #%u @ "
	.ascii	"%p ..\012\000"
	.align	2
.LC2:
	.ascii	"Send failed\000"
	.align	2
.LC3:
	.ascii	"[Server] Shuting down the new connection #%u ..\012"
	.ascii	"\000"
	.text
	.align	2
	.global	run
	.syntax unified
	.arm
	.fpu softvfp
	.type	run, %function
run:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L7
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	bl	pthread_self
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L7+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L5:
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L7+8
	bl	perror
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	ble	.L5
.L4:
	ldr	r1, [fp, #-8]
	ldr	r0, .L7+12
	bl	printf
	mov	r1, #2
	ldr	r0, [fp, #-8]
	bl	shutdown
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	run, .-run
	.section	.rodata
	.align	2
.LC4:
	.ascii	"[Server] Create socket\000"
	.align	2
.LC5:
	.ascii	"Create socket failed\000"
	.align	2
.LC6:
	.ascii	"[Server] Bind socket\000"
	.align	2
.LC7:
	.ascii	"Bind failed\000"
	.align	2
.LC8:
	.ascii	"[Server] Listening on socket\000"
	.align	2
.LC9:
	.ascii	"Listen failed\000"
	.align	2
.LC10:
	.ascii	"[Server] Wait for clients to connect ..\000"
	.align	2
.LC11:
	.ascii	"Accept failed\000"
	.align	2
.LC12:
	.ascii	"[Server] Client connected\000"
	.align	2
.LC13:
	.ascii	"Create a worker thread failed\000"
	.align	2
.LC14:
	.ascii	"[Server] Achieve maximum amount of connections\000"
	.align	2
.LC15:
	.ascii	"[Server] Shuting down ..\000"
	.align	2
.LC16:
	.ascii	"[Server] BYE \000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-80]
	sub	r3, fp, #64
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-76]
	sub	r3, fp, #48
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	sub	r3, fp, #28
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	ldr	r0, .L26+4
	bl	puts
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L26+8
	bl	perror
	b	.L11
.L10:
	mov	r3, #2
	strh	r3, [fp, #-64]	@ movhi
	ldr	r0, .L26+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-62]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r0, .L26+16
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-80]
	mov	r2, r3
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L26+20
	bl	perror
	b	.L11
.L12:
	ldr	r0, .L26+24
	bl	puts
	mov	r1, #3
	ldr	r0, [fp, #-68]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L26+28
	bl	perror
	b	.L11
.L13:
	ldr	r0, .L26+32
	bl	puts
	b	.L14
.L18:
	sub	r2, fp, #80
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	accept
	mov	r2, r0
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-24]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L26+36
	bl	perror
	b	.L16
.L15:
	ldr	r0, .L26+40
	bl	puts
	sub	r2, fp, #48
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #28
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L26+44
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L26+48
	bl	perror
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	mov	r1, #2
	mov	r0, r3
	bl	shutdown
	b	.L16
.L17:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L14:
	ldr	r3, [fp, #-76]
	cmp	r3, #4
	bls	.L18
.L16:
	ldr	r3, [fp, #-76]
	cmp	r3, #5
	bne	.L19
	ldr	r0, .L26+52
	bl	puts
.L19:
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L20
.L21:
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-44]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L20:
	ldr	r3, [fp, #-72]
	cmp	r3, #4
	ble	.L21
	ldr	r0, .L26+56
	bl	puts
	mov	r1, #2
	ldr	r0, [fp, #-68]
	bl	shutdown
	mov	r0, #3
	bl	sleep
	ldr	r0, .L26+60
	bl	puts
	mov	r3, #0
	b	.L24
.L11:
	ldr	r0, .L26+56
	bl	puts
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	blt	.L23
	ldr	r0, [fp, #-68]
	bl	close
.L23:
	mov	r0, #3
	bl	sleep
	mov	r3, #1
.L24:
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC17
	.word	.LC4
	.word	.LC5
	.word	1234
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	run
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
