	.file	"674166.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: %s [SERVER NAME] [SERVER PORT]\n"
	.align 8
.LC1:
	.string	"The provided [SERVER PORT] is not a valid number"
	.align 8
.LC2:
	.string	"Connecting to server with name: %s, on port: %i\n"
	.align 8
.LC3:
	.string	"Cannot resolve address for the provided hostname"
.LC4:
	.string	"Error during socket creation"
.LC5:
	.string	"Insert a message: "
	.align 8
.LC6:
	.string	"Message cannot be sent to the server"
	.align 8
.LC7:
	.string	"Cannote receive any message from the server"
.LC8:
	.string	"Message from server: %s\n"
	.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, 1104
	mov	DWORD PTR -1092[rbp], edi
	mov	QWORD PTR -1104[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -1104[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -1072[rbp], rax
	cmp	DWORD PTR -1092[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -1104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -1088[rbp], eax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
.L3:
	mov	edx, DWORD PTR -1088[rbp]
	mov	rax, QWORD PTR -1072[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	cmp	rax, -1
	jne	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	WORD PTR -1056[rbp], 2
	mov	eax, DWORD PTR -1088[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	mov	rax, QWORD PTR -1064[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1064[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1056[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1084[rbp], eax
	cmp	DWORD PTR -1084[rbp], -1
	jne	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L8:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	lea	rcx, -1056[rbp]
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1084[rbp]
	mov	r9d, 16
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -1080[rbp], eax
	cmp	DWORD PTR -1080[rbp], 0
	jns	.L6
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1084[rbp]
	mov	r9d, 0
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -1076[rbp], eax
	cmp	DWORD PTR -1076[rbp], 0
	jns	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
	.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	"674166.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s [SERVER NAME] [SERVER PORT]\012\000"
	.align	2
.LC1:
	.ascii	"The provided [SERVER PORT] is not a valid number\000"
	.align	2
.LC2:
	.ascii	"Connecting to server with name: %s, on port: %i\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"Cannot resolve address for the provided hostname\000"
	.align	2
.LC4:
	.ascii	"Error during socket creation\000"
	.align	2
.LC5:
	.ascii	"Insert a message: \000"
	.align	2
.LC6:
	.ascii	"Message cannot be sent to the server\000"
	.align	2
.LC7:
	.ascii	"Cannote receive any message from the server\000"
	.align	2
.LC8:
	.ascii	"Message from server: %s\012\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1088
	str	r0, [fp, #-1080]
	str	r1, [fp, #-1084]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-1084]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-1072]
	ldr	r3, [fp, #-1080]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, [fp, #-1084]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-1084]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-1068]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L10+8
	bl	perror
.L3:
	ldr	r2, [fp, #-1068]
	ldr	r1, [fp, #-1072]
	ldr	r0, .L10+12
	bl	printf
	ldr	r0, [fp, #-1072]
	bl	gethostbyname
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L10+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1068]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-1064]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-1064]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L10+20
	bl	perror
.L8:
	ldr	r0, .L10+24
	bl	printf
	ldr	r3, .L10+28
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, r3, #1
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-1060]
	bl	sendto
	str	r0, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L10+32
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1060]
	bl	recvfrom
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L10+36
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L10+40
	bl	printf
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	stdin
	.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
