	.file	"1106263.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Could not create socket"
.LC1:
	.string	"Socket created"
.LC2:
	.string	"bind failed. Error"
.LC3:
	.string	"bind done"
	.align 8
.LC4:
	.string	"Waiting for incoming connections..."
.LC5:
	.string	"Connection accepted"
.LC6:
	.string	"could not create thread"
.LC7:
	.string	"Handler assigned"
.LC8:
	.string	"accept failed"
	.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	WORD PTR -48[rbp], 2
	mov	DWORD PTR -44[rbp], 0
	mov	edi, 8888
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L9
.L3:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -76[rbp], 16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -76[rbp], 16
	jmp	.L5
.L7:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -68[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	lea	rdx, connection_handler[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L9
.L6:
	lea	rdi, .LC7[rip]
	call	puts@PLT
.L5:
	lea	rdx, -76[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jne	.L7
	cmp	DWORD PTR -68[rbp], 0
	jns	.L8
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L9
.L8:
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.string	"Greetings! I am your connection handler\n"
	.align 8
.LC10:
	.string	"Now type something and i shall repeat what you type \n"
.LC11:
	.string	"Client disconnected"
.LC12:
	.string	"recv failed"
	.text
	.globl	connection_handler
	.type	connection_handler, @function
connection_handler:
.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, 2048
	mov	QWORD PTR -2040[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -2040[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -2032[rbp], eax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -2024[rbp], rax
	mov	rax, QWORD PTR -2024[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -2024[rbp]
	mov	eax, DWORD PTR -2032[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, .LC10[rip]
	mov	QWORD PTR -2024[rbp], rax
	mov	rax, QWORD PTR -2024[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -2024[rbp]
	mov	eax, DWORD PTR -2032[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L12
.L13:
	lea	rax, -2016[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -2016[rbp]
	mov	eax, DWORD PTR -2032[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L12:
	lea	rsi, -2016[rbp]
	mov	eax, DWORD PTR -2032[rbp]
	mov	ecx, 0
	mov	edx, 2000
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2028[rbp], eax
	cmp	DWORD PTR -2028[rbp], 0
	jg	.L13
	cmp	DWORD PTR -2028[rbp], 0
	jne	.L14
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L15
.L14:
	cmp	DWORD PTR -2028[rbp], -1
	jne	.L15
	lea	rdi, .LC12[rip]
	call	perror@PLT
.L15:
	mov	rax, QWORD PTR -2040[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	connection_handler, .-connection_handler
	.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	"1106263.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Could not create socket\000"
	.align	2
.LC1:
	.ascii	"Socket created\000"
	.align	2
.LC2:
	.ascii	"bind failed. Error\000"
	.align	2
.LC3:
	.ascii	"bind done\000"
	.align	2
.LC4:
	.ascii	"Waiting for incoming connections...\000"
	.align	2
.LC5:
	.ascii	"Connection accepted\000"
	.align	2
.LC6:
	.ascii	"could not create thread\000"
	.align	2
.LC7:
	.ascii	"Handler assigned\000"
	.align	2
.LC8:
	.ascii	"accept failed\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 = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L11+4
	bl	printf
.L2:
	ldr	r0, .L11+8
	bl	puts
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r0, .L11+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-52]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L11+16
	bl	perror
	mov	r3, #1
	b	.L9
.L3:
	ldr	r0, .L11+20
	bl	puts
	mov	r1, #3
	ldr	r0, [fp, #-52]
	bl	listen
	ldr	r0, .L11+24
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-60]
	ldr	r0, .L11+24
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-60]
	b	.L5
.L7:
	ldr	r0, .L11+28
	bl	puts
	mov	r0, #1
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-48]
	str	r2, [r3]
	sub	r0, fp, #56
	ldr	r3, [fp, #-44]
	ldr	r2, .L11+32
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L11+36
	bl	perror
	mov	r3, #1
	b	.L9
.L6:
	ldr	r0, .L11+40
	bl	puts
.L5:
	sub	r2, fp, #60
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-52]
	bl	accept
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L11+44
	bl	perror
	mov	r3, #1
	b	.L9
.L8:
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	8888
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	connection_handler
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Greetings! I am your connection handler\012\000"
	.align	2
.LC11:
	.ascii	"Now type something and i shall repeat what you type"
	.ascii	" \012\000"
	.align	2
.LC12:
	.ascii	"Client disconnected\000"
	.align	2
.LC13:
	.ascii	"recv failed\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	connection_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	connection_handler, %function
connection_handler:
	@ args = 0, pretend = 0, frame = 2024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2016
	sub	sp, sp, #8
	str	r0, [fp, #-2024]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2024]
	ldr	r3, [r3]
	str	r3, [fp, #-2020]
	ldr	r3, .L20+4
	str	r3, [fp, #-2016]
	ldr	r0, [fp, #-2016]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-2016]
	ldr	r0, [fp, #-2020]
	bl	write
	ldr	r3, .L20+8
	str	r3, [fp, #-2016]
	ldr	r0, [fp, #-2016]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-2016]
	ldr	r0, [fp, #-2020]
	bl	write
	b	.L14
.L15:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2020]
	bl	write
.L14:
	sub	r1, fp, #2000
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #2000
	ldr	r0, [fp, #-2020]
	bl	recv
	str	r0, [fp, #-2012]
	ldr	r3, [fp, #-2012]
	cmp	r3, #0
	bgt	.L15
	ldr	r3, [fp, #-2012]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L20+12
	bl	puts
	ldr	r3, .L20+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L17
.L16:
	ldr	r3, [fp, #-2012]
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L20+20
	bl	perror
.L17:
	ldr	r0, [fp, #-2024]
	bl	free
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC14
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	stdout
	.word	.LC13
	.size	connection_handler, .-connection_handler
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
