	.file	"9511504.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"From client: %s\t To client : "
.LC1:
	.string	"exit"
.LC2:
	.string	"Server Exit..."
	.text
	.globl	servfunc
	.type	servfunc, @function
servfunc:
.LFB6:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L5:
	lea	rax, -96[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR 16[rax], 0
	mov	QWORD PTR 24[rax], 0
	mov	QWORD PTR 32[rax], 0
	mov	QWORD PTR 40[rax], 0
	mov	QWORD PTR 48[rax], 0
	mov	QWORD PTR 56[rax], 0
	mov	QWORD PTR 64[rax], 0
	mov	QWORD PTR 72[rax], 0
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR 16[rax], 0
	mov	QWORD PTR 24[rax], 0
	mov	QWORD PTR 32[rax], 0
	mov	QWORD PTR 40[rax], 0
	mov	QWORD PTR 48[rax], 0
	mov	QWORD PTR 56[rax], 0
	mov	QWORD PTR 64[rax], 0
	mov	QWORD PTR 72[rax], 0
	mov	DWORD PTR -100[rbp], 0
	nop
.L2:
	call	getchar@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -100[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -100[rbp], edx
	movsx	rdx, eax
	mov	BYTE PTR -96[rbp+rdx], cl
	cdqe
	movzx	eax, BYTE PTR -96[rbp+rax]
	cmp	al, 10
	jne	.L2
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, -96[rbp]
	mov	edx, 4
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	call	strncmp@PLT
	test	eax, eax
	jne	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	nop
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	servfunc, .-servfunc
	.section	.rodata
.LC3:
	.string	"socket creation failed..."
.LC4:
	.string	"Socket successfully created.."
.LC5:
	.string	"socket bind failed..."
.LC6:
	.string	"Socket successfully binded.."
.LC7:
	.string	"Listen failed..."
.LC8:
	.string	"Server listening.."
.LC9:
	.string	"server acccept failed..."
.LC10:
	.string	"server acccept the client..."
	.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, 64
	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 -56[rbp], eax
	cmp	DWORD PTR -56[rbp], -1
	jne	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L9:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -48[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	edi, 8080
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L10
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	je	.L11
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	DWORD PTR -60[rbp], 16
	lea	rdx, -60[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jns	.L12
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	servfunc
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"9511504.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"From client: %s\011 To client : \000"
	.align	2
.LC1:
	.ascii	"exit\000"
	.align	2
.LC2:
	.ascii	"Server Exit...\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	servfunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	servfunc, %function
servfunc:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L5:
	sub	r3, fp, #88
	mov	r0, r3
	mov	r3, #80
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #88
	mov	r2, #80
	mov	r1, r3
	ldr	r0, [fp, #-96]
	bl	read
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L8+4
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	mov	r3, #80
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-92]
	nop
.L2:
	bl	getchar
	mov	r1, r0
	ldr	r3, [fp, #-92]
	add	r2, r3, #1
	str	r2, [fp, #-92]
	and	r1, r1, #255
	sub	r2, fp, #4
	add	r2, r2, r3
	strb	r1, [r2, #-84]
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-84]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L2
	sub	r3, fp, #88
	mov	r2, #80
	mov	r1, r3
	ldr	r0, [fp, #-96]
	bl	write
	sub	r3, fp, #88
	mov	r2, #4
	mov	r1, r3
	ldr	r0, .L8+8
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L8+12
	bl	puts
	nop
	nop
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	servfunc, .-servfunc
	.section	.rodata
	.align	2
.LC4:
	.ascii	"socket creation failed...\000"
	.align	2
.LC5:
	.ascii	"Socket successfully created..\000"
	.align	2
.LC6:
	.ascii	"socket bind failed...\000"
	.align	2
.LC7:
	.ascii	"Socket successfully binded..\000"
	.align	2
.LC8:
	.ascii	"Listen failed...\000"
	.align	2
.LC9:
	.ascii	"Server listening..\000"
	.align	2
.LC10:
	.ascii	"server acccept failed...\000"
	.align	2
.LC11:
	.ascii	"server acccept the client...\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L17+4
	bl	puts
	mov	r0, #0
	bl	exit
.L11:
	ldr	r0, .L17+8
	bl	puts
	sub	r3, fp, #40
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, .L17+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L17+16
	bl	puts
	mov	r0, #0
	bl	exit
.L12:
	ldr	r0, .L17+20
	bl	puts
	mov	r1, #5
	ldr	r0, [fp, #-48]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L17+24
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	ldr	r0, .L17+28
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-52]
	sub	r2, fp, #52
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	accept
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L17+32
	bl	puts
	mov	r0, #0
	bl	exit
.L14:
	ldr	r0, .L17+36
	bl	puts
	ldr	r0, [fp, #-44]
	bl	servfunc
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC12
	.word	.LC4
	.word	.LC5
	.word	8080
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
