	.file	"697256.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Error: Send message "
	.text
	.globl	send_message
	.type	send_message, @function
send_message:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	je	.L4
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	send_message, .-send_message
	.section	.rodata
.LC1:
	.string	"Error: Receive message "
.LC2:
	.string	"Received: "
.LC3:
	.string	"%s"
	.text
	.globl	receive_message
	.type	receive_message, @function
receive_message:
.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, 560
	mov	DWORD PTR -548[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -532[rbp], eax
	cmp	DWORD PTR -532[rbp], 0
	jg	.L6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	receive_message, .-receive_message
	.section	.rodata
.LC4:
	.string	"Error: Create socket  "
.LC5:
	.string	"Error: Connect "
	.text
	.globl	get_tcp_sock
	.type	get_tcp_sock, @function
get_tcp_sock:
.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, 64
	mov	eax, edi
	mov	QWORD PTR -64[rbp], rsi
	mov	WORD PTR -52[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L10
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	movzx	eax, WORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	WORD PTR -32[rbp], 2
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -28[rbp], eax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L11:
	mov	eax, DWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_tcp_sock, .-get_tcp_sock
	.section	.rodata
	.align 8
.LC6:
	.string	"3 command line arguments are required. Port number,ip address and message to send "
.LC7:
	.string	"Port number is %s \n"
.LC8:
	.string	"IP address is %s \n"
.LC9:
	.string	"Sending a message: %s \n"
	.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
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 4
	je	.L15
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	WORD PTR -22[rbp], ax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	movsx	eax, WORD PTR -22[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	get_tcp_sock
	mov	DWORD PTR -20[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	send_message
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	receive_message
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.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	"697256.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error: Send message \000"
	.text
	.align	2
	.global	send_message
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_message, %function
send_message:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	mov	r3, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	send
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L4
	ldr	r0, .L5
	bl	puts
	mvn	r0, #0
	bl	exit
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	send_message, .-send_message
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Error: Receive message \000"
	.align	2
.LC2:
	.ascii	"Received: \000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	receive_message
	.syntax unified
	.arm
	.fpu softvfp
	.type	receive_message, %function
receive_message:
	@ args = 0, pretend = 0, frame = 528
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #528
	str	r0, [fp, #-528]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-528]
	bl	recv
	str	r0, [fp, #-524]
	ldr	r3, [fp, #-524]
	cmp	r3, #0
	bgt	.L8
	ldr	r0, .L11+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L8:
	ldr	r0, .L11+8
	bl	printf
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L11+12
	bl	printf
	mov	r0, #10
	bl	putchar
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	receive_message, .-receive_message
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Error: Create socket  \000"
	.align	2
.LC6:
	.ascii	"Error: Connect \000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_tcp_sock
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_tcp_sock, %function
get_tcp_sock:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	mov	r3, r0
	str	r1, [fp, #-44]
	strh	r3, [fp, #-38]	@ movhi
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L18+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L14:
	ldrh	r3, [fp, #-38]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, [fp, #-44]
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	connect
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L18+8
	bl	puts
	mvn	r0, #0
	bl	exit
.L15:
	ldr	r3, [fp, #-32]
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC7
	.word	.LC5
	.word	.LC6
	.size	get_tcp_sock, .-get_tcp_sock
	.section	.rodata
	.align	2
.LC8:
	.ascii	"3 command line arguments are required. Port number,"
	.ascii	"ip address and message to send \000"
	.align	2
.LC9:
	.ascii	"Port number is %s \012\000"
	.align	2
.LC10:
	.ascii	"IP address is %s \012\000"
	.align	2
.LC11:
	.ascii	"Sending a message: %s \012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	beq	.L21
	ldr	r0, .L22
	bl	puts
	mvn	r0, #0
	bl	exit
.L21:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22+4
	bl	printf
	ldr	r1, [fp, #-16]
	ldr	r0, .L22+8
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, .L22+12
	bl	printf
	ldrsh	r3, [fp, #-18]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	get_tcp_sock
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	send_message
	ldr	r0, [fp, #-8]
	bl	receive_message
	ldr	r0, [fp, #-8]
	bl	close
	mov	r0, #0
	bl	exit
.L23:
	.align	2
.L22:
	.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
