	.file	"215026.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
	.align 8
.LC0:
	.string	"\n\t\"CLIENT error\" - Uso correto: servidor porta\n"
.LC1:
	.string	"\n\tCLIENT - error: socket\n\t"
	.align 8
.LC2:
	.string	"\n\tCLIENT - error: host desconhecido"
	.align 8
.LC3:
	.string	"\nCLIENT: Digite a menssagem - 0 pra sair: "
.LC4:
	.string	"%s"
	.align 8
.LC5:
	.string	"\n\tCLIENT - error: Send to - erro ao enviar"
	.align 8
.LC6:
	.string	"\nEsperando mensagem do Server..."
	.align 8
.LC7:
	.string	"\nCLIENT - error: received from - erro ao receber"
.LC8:
	.string	"Server Diz:  "
	.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
	push	rbx
	sub	rsp, 152
	.cfi_offset 3, -24
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -148[rbp], 3
	je	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -128[rbp], eax
	cmp	DWORD PTR -128[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	error
.L4:
	mov	WORD PTR -112[rbp], 2
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L5
	lea	rdi, .LC2[rip]
	call	error
.L5:
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -112[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -110[rbp], ax
	mov	DWORD PTR -132[rbp], 16
.L8:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -132[rbp]
	mov	ebx, eax
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -112[rbp]
	lea	rsi, -80[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	r9d, ebx
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], 0
	jns	.L6
	lea	rdi, .LC5[rip]
	call	error
.L6:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rcx, -132[rbp]
	lea	rdx, -96[rbp]
	lea	rsi, -80[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 256
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], 0
	jns	.L7
	lea	rdi, .LC7[rip]
	call	error
.L7:
	mov	edx, 12
	lea	rsi, .LC8[rip]
	mov	edi, 1
	mov	eax, 0
	call	write@PLT
	mov	edx, DWORD PTR -124[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 1
	mov	eax, 0
	call	write@PLT
	jmp	.L8
	.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	"215026.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	mov	r0, #0
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\011\"CLIENT error\" - Uso correto: servidor po"
	.ascii	"rta\012\000"
	.align	2
.LC1:
	.ascii	"\012\011CLIENT - error: socket\012\011\000"
	.align	2
.LC2:
	.ascii	"\012\011CLIENT - error: host desconhecido\000"
	.align	2
.LC3:
	.ascii	"\012CLIENT: Digite a menssagem - 0 pra sair: \000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.align	2
.LC5:
	.ascii	"\012\011CLIENT - error: Send to - erro ao enviar\000"
	.align	2
.LC6:
	.ascii	"\012Esperando mensagem do Server...\000"
	.align	2
.LC7:
	.ascii	"\012CLIENT - error: received from - erro ao receber"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"Server Diz:  \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 = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-112]
	cmp	r3, #3
	beq	.L3
	ldr	r0, .L10+4
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L10+8
	bl	error
.L4:
	mov	r3, #2
	strh	r3, [fp, #-92]	@ movhi
	ldr	r3, [fp, #-116]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L10+12
	bl	error
.L5:
	ldr	r3, [fp, #-100]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-100]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #92
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-90]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-108]
.L8:
	ldr	r0, .L10+16
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L10+20
	bl	__isoc99_scanf
	sub	r3, fp, #60
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-108]
	sub	r1, fp, #60
	str	r3, [sp, #4]
	sub	r3, fp, #92
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-104]
	bl	sendto
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L10+24
	bl	error
.L6:
	ldr	r0, .L10+28
	bl	puts
	sub	r1, fp, #60
	sub	r3, fp, #108
	str	r3, [sp, #4]
	sub	r3, fp, #76
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #256
	ldr	r0, [fp, #-104]
	bl	recvfrom
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L10+32
	bl	error
.L7:
	mov	r2, #12
	ldr	r1, .L10+36
	mov	r0, #1
	bl	write
	sub	r3, fp, #60
	ldr	r2, [fp, #-96]
	mov	r1, r3
	mov	r0, #1
	bl	write
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.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
