	.file	"247017094.c"
	.intel_syntax noprefix
	.text
	.globl	copy_data
	.type	copy_data, @function
copy_data:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 528
	mov	QWORD PTR -520[rbp], rdi
	mov	DWORD PTR -524[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -524[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -520[rbp]
	lea	rax, -512[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L2
	call	__stack_chk_fail@PLT
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	copy_data, .-copy_data
	.section	.rodata
.LC0:
	.string	"server socket: "
.LC1:
	.string	"bind : "
.LC2:
	.string	"listen"
.LC3:
	.string	"accept"
	.align 8
.LC4:
	.string	"New Client connected from port no %d and IP %s\n"
.LC5:
	.string	"Sent message: %s"
.LC6:
	.string	"Client disconnected"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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, 1112
	.cfi_offset 3, -24
	mov	DWORD PTR -1108[rbp], edi
	mov	QWORD PTR -1120[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1104[rbp], 16
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1096[rbp], eax
	cmp	DWORD PTR -1096[rbp], -1
	jne	.L4
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	mov	WORD PTR -1088[rbp], 2
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1086[rbp], ax
	mov	DWORD PTR -1084[rbp], 0
	lea	rax, -1088[rbp]
	add	rax, 8
	mov	QWORD PTR [rax], 0
	mov	eax, DWORD PTR -1104[rbp]
	mov	edx, eax
	lea	rcx, -1088[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -1096[rbp]
	mov	esi, 2
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	lea	rdx, -1104[rbp]
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1092[rbp], eax
	cmp	DWORD PTR -1092[rbp], -1
	jne	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rbx, rax
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1100[rbp], 1
	jmp	.L8
.L9:
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1092[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1100[rbp], eax
	cmp	DWORD PTR -1100[rbp], 0
	je	.L8
	mov	eax, DWORD PTR -1100[rbp]
	movsx	rdx, eax
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1092[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	eax, DWORD PTR -1100[rbp]
	cdqe
	mov	BYTE PTR -1056[rbp+rax], 0
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -1100[rbp]
	lea	rax, -1056[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	copy_data
.L8:
	cmp	DWORD PTR -1100[rbp], 0
	jne	.L9
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1092[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L6
	.cfi_endproc
.LFE9:
	.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	"247017094.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	copy_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy_data, %function
copy_data:
	@ args = 0, pretend = 0, frame = 512
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #512
	str	r0, [fp, #-512]
	str	r1, [fp, #-516]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-516]
	sub	r3, fp, #508
	ldr	r1, [fp, #-512]
	mov	r0, r3
	bl	memcpy
	nop
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L2
	bl	__stack_chk_fail
.L2:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	copy_data, .-copy_data
	.section	.rodata
	.align	2
.LC1:
	.ascii	"server socket: \000"
	.align	2
.LC2:
	.ascii	"bind : \000"
	.align	2
.LC3:
	.ascii	"listen\000"
	.align	2
.LC4:
	.ascii	"accept\000"
	.align	2
.LC5:
	.ascii	"New Client connected from port no %d and IP %s\012\000"
	.align	2
.LC6:
	.ascii	"Sent message: %s\000"
	.align	2
.LC7:
	.ascii	"Client disconnected\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1088
	sub	sp, sp, #4
	str	r0, [fp, #-1096]
	str	r1, [fp, #-1100]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-1088]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L13+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L6:
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1100]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-1068]
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, #8
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	ldr	r3, [fp, #-1088]
	mov	r2, r3
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1080]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L13+8
	bl	perror
	mvn	r0, #0
	bl	exit
.L7:
	mov	r1, #2
	ldr	r0, [fp, #-1080]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L13+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L8:
	sub	r2, fp, #1072
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1080]
	bl	accept
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L13+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L9:
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #4
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r4, r3
	ldr	r0, [fp, #-1052]
	bl	inet_ntoa
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L13+20
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-1084]
	b	.L10
.L11:
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1076]
	bl	recv
	str	r0, [fp, #-1084]
	ldr	r3, [fp, #-1084]
	cmp	r3, #0
	beq	.L10
	ldr	r2, [fp, #-1084]
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1076]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L13+24
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [fp, #-1084]
	mov	r0, r3
	bl	copy_data
.L10:
	ldr	r3, [fp, #-1084]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L13+28
	bl	puts
	ldr	r0, [fp, #-1076]
	bl	close
	b	.L8
.L14:
	.align	2
.L13:
	.word	.LC8
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
