	.file	"72954.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s <hostname> <port>\n"
.LC1:
	.string	"ERROR: no such host as %s\n"
	.align 8
.LC2:
	.string	"INFO: Server socket: %s : %d \n"
.LC3:
	.string	"ERROR: socket"
.LC4:
	.string	"Please enter msg: "
.LC5:
	.string	"ERROR: connect"
.LC6:
	.string	"ERROR in sendto"
.LC7:
	.string	"ERROR in recvfrom"
.LC8:
	.string	"Echo from server: %s"
	.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
	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
	cmp	DWORD PTR -1108[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -1120[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -1120[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -1088[rbp], rax
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1104[rbp], eax
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -1080[rbp], rax
	cmp	QWORD PTR -1080[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -1088[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -1072[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -1072[rbp], 2
	mov	rax, QWORD PTR -1080[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1080[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1072[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	eax, DWORD PTR -1104[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1070[rbp], ax
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1100[rbp], eax
	cmp	DWORD PTR -1100[rbp], 0
	jg	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L5
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -1096[rbp], eax
	cmp	DWORD PTR -1096[rbp], 0
	jns	.L6
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L6:
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1092[rbp], eax
	cmp	DWORD PTR -1092[rbp], 0
	jns	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
.L7:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1100[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"72954.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s <hostname> <port>\012\000"
	.align	2
.LC1:
	.ascii	"ERROR: no such host as %s\012\000"
	.align	2
.LC2:
	.ascii	"INFO: Server socket: %s : %d \012\000"
	.align	2
.LC3:
	.ascii	"ERROR: socket\000"
	.align	2
.LC4:
	.ascii	"Please enter msg: \000"
	.align	2
.LC5:
	.ascii	"ERROR: connect\000"
	.align	2
.LC6:
	.ascii	"ERROR in sendto\000"
	.align	2
.LC7:
	.ascii	"ERROR in recvfrom\000"
	.align	2
.LC8:
	.ascii	"Echo from server: %s\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 = 1080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1072
	sub	sp, sp, #12
	str	r0, [fp, #-1088]
	str	r1, [fp, #-1092]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1088]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1092]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L10+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-1092]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-1080]
	ldr	r3, [fp, #-1092]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1076]
	ldr	r0, [fp, #-1080]
	bl	gethostbyname
	str	r0, [fp, #-1072]
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-1080]
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1072]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-1072]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-1076]
	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, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, [fp, #-1052]
	bl	inet_ntoa
	mov	r4, r0
	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	r2, r3
	mov	r1, r4
	ldr	r0, .L10+16
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bgt	.L4
	ldr	r0, .L10+20
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, .L10+24
	bl	printf
	ldr	r3, .L10+28
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1068]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L10+32
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1068]
	bl	send
	str	r0, [fp, #-1064]
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L10+36
	bl	perror
.L6:
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1068]
	bl	recv
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L10+40
	bl	perror
.L7:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L10+44
	bl	printf
	ldr	r0, [fp, #-1068]
	bl	close
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stdin
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
