	.file	"567924.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: TCPClient <IP address of the server"
	.align 8
.LC1:
	.string	"Problem in creating the socket"
	.align 8
.LC2:
	.string	"Problem in connecting to the server"
.LC3:
	.string	"> "
.LC4:
	.string	"exit"
	.align 8
.LC5:
	.string	"The server terminated prematurely"
.LC6:
	.string	"%s\n> "
.LC7:
	.string	"socket close"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	DWORD PTR -8244[rbp], edi
	mov	QWORD PTR -8256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -8244[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -8228[rbp], eax
	cmp	DWORD PTR -8228[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L3:
	lea	rax, -8224[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -8224[rbp], 2
	mov	rax, QWORD PTR -8256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -8220[rbp], eax
	mov	edi, 3000
	call	htons@PLT
	mov	WORD PTR -8222[rbp], ax
	lea	rcx, -8224[rbp]
	mov	eax, DWORD PTR -8228[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 3
	call	exit@PLT
.L4:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L9:
	lea	rax, -8208[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strstr@PLT
	lea	rdx, -8208[rbp]
	cmp	rax, rdx
	jne	.L6
	mov	eax, DWORD PTR -8228[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L7
.L6:
	lea	rax, -8208[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -8208[rbp]
	mov	eax, DWORD PTR -8228[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rsi, -4112[rbp]
	mov	eax, DWORD PTR -8228[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	test	rax, rax
	jne	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 4
	call	exit@PLT
.L8:
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -8208[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
.L7:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"567924.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: TCPClient <IP address of the server\000"
	.align	2
.LC1:
	.ascii	"Problem in creating the socket\000"
	.align	2
.LC2:
	.ascii	"Problem in connecting to the server\000"
	.align	2
.LC3:
	.ascii	"> \000"
	.align	2
.LC4:
	.ascii	"exit\000"
	.align	2
.LC5:
	.ascii	"The server terminated prematurely\000"
	.align	2
.LC6:
	.ascii	"%s\012> \000"
	.align	2
.LC7:
	.ascii	"socket close\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 = 8224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #36
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L11+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [r4, #-24]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L11+8
	bl	perror
	mov	r0, #2
	bl	exit
.L3:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #20
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3, #-20]	@ movhi
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-16]
	ldr	r0, .L11+12
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	strh	r2, [r3, #-18]	@ movhi
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #20
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [r0, #-24]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L11+16
	bl	perror
	mov	r0, #3
	bl	exit
.L4:
	ldr	r0, .L11+20
	bl	printf
	b	.L5
.L9:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L11+24
	mov	r0, r3
	bl	strstr
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	cmp	r2, r3
	bne	.L6
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-24]
	bl	close
	b	.L7
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	ldr	r0, [r0, #-24]
	bl	send
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-24]
	bl	recv
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L11+28
	bl	perror
	mov	r0, #4
	bl	exit
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L11+32
	bl	printf
.L5:
	ldr	r3, .L11+36
	ldr	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
.L7:
	ldr	r0, .L11+40
	bl	puts
	mov	r0, #0
	bl	exit
.L12:
	.align	2
.L11:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	3000
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stdin
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
