	.file	"983816.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.section	.rodata
.LC0:
	.string	"./clienteTcp  <ip>  <porto>"
.LC1:
	.string	"Erro"
.LC2:
	.string	"Erro Socket"
.LC3:
	.string	"Erro Bind"
.LC4:
	.string	"Erro Listen"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 16
	cmp	DWORD PTR -52[rbp], 3
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	DWORD PTR count[rip], 0
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L3
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	mov	eax, 0
	call	mallocEndereco
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR [rax], 2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	mov	rcx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L11
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L11:
	nop
.L7:
	mov	edx, 1
	mov	esi, 0
	mov	edi, -1
	call	waitpid@PLT
	test	eax, eax
	jg	.L7
	mov	eax, 0
	call	mallocEndereco
	mov	QWORD PTR -16[rbp], rax
	lea	rdx, -44[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jle	.L11
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	call	fork@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	processCliente
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 0
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L11
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"** New message received **"
	.align 8
.LC6:
	.string	"Client %d connecting from (IP:port) %s:%d says \"%s\"\n"
	.align 8
.LC7:
	.string	"Server received connection from (IP:port) %s:%d; already received %d connections!"
	.text
	.globl	processCliente
	.type	processCliente, @function
processCliente:
.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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	QWORD PTR -1088[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	edx, 1023
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1060[rbp], eax
	mov	eax, DWORD PTR -1060[rbp]
	cdqe
	mov	BYTE PTR -1040[rbp+rax], 0
	mov	rax, QWORD PTR -1088[rbp]
	lea	rsi, 4[rax]
	lea	rax, -1056[rbp]
	mov	ecx, 16
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -1088[rbp]
	movzx	eax, WORD PTR 2[rax]
	movzx	ecx, ax
	mov	eax, DWORD PTR count[rip]
	lea	rsi, -1040[rbp]
	lea	rdx, -1056[rbp]
	mov	r8, rsi
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	esi, DWORD PTR count[rip]
	mov	rax, QWORD PTR -1088[rbp]
	movzx	eax, WORD PTR 2[rax]
	movzx	ecx, ax
	lea	rdx, -1056[rbp]
	lea	rax, -1040[rbp]
	mov	r8d, esi
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	processCliente, .-processCliente
	.section	.rodata
.LC8:
	.string	"Erro mallocEndereco"
	.text
	.globl	mallocEndereco
	.type	mallocEndereco, @function
mallocEndereco:
.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, 16
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L15
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mallocEndereco, .-mallocEndereco
	.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	"983816.c"
	.text
	.comm	count,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"./clienteTcp  <ip>  <porto>\000"
	.align	2
.LC1:
	.ascii	"Erro\000"
	.align	2
.LC2:
	.ascii	"Erro Socket\000"
	.align	2
.LC3:
	.ascii	"Erro Bind\000"
	.align	2
.LC4:
	.ascii	"Erro Listen\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	beq	.L2
	ldr	r0, .L12+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L2:
	ldr	r3, .L12+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L12+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L3:
	bl	mallocEndereco
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #16]
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	strh	r2, [r3, #2]	@ movhi
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L12+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L4:
	mov	r2, #16
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L12+20
	bl	puts
	mvn	r0, #0
	bl	exit
.L5:
	mov	r1, #5
	ldr	r0, [fp, #-20]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L12+24
	bl	puts
	mvn	r0, #0
	bl	exit
.L11:
	nop
.L7:
	mov	r2, #1
	mov	r1, #0
	mvn	r0, #0
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bgt	.L7
	bl	mallocEndereco
	str	r0, [fp, #-16]
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	accept
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L11
	ldr	r3, .L12+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L12+8
	str	r3, [r2]
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-20]
	bl	close
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	processCliente
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r0, [fp, #-16]
	bl	free
	mov	r0, #0
	bl	exit
.L9:
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r0, [fp, #-16]
	bl	free
	b	.L11
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	count
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"** New message received **\000"
	.align	2
.LC7:
	.ascii	"Client %d connecting from (IP:port) %s:%d says \"%s"
	.ascii	"\"\012\000"
	.align	2
.LC8:
	.ascii	"Server received connection from (IP:port) %s:%d; al"
	.ascii	"ready received %d connections!\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	processCliente
	.syntax unified
	.arm
	.fpu softvfp
	.type	processCliente, %function
processCliente:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L16+4
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	read
	str	r0, [fp, #-1052]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1052]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-1060]
	add	r1, r3, #4
	sub	r2, fp, #1040
	sub	r2, r2, #4
	sub	r2, r2, #4
	mov	r3, #16
	mov	r0, #2
	bl	inet_ntop
	ldr	r0, .L16+8
	bl	puts
	ldr	r3, .L16+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-1060]
	ldrh	r3, [r3, #2]
	mov	r0, r3
	sub	r2, fp, #1040
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L16+16
	bl	printf
	ldr	r3, .L16+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-1060]
	ldrh	r3, [r3, #2]
	mov	r1, r3
	ldr	r3, .L16+12
	ldr	r3, [r3]
	sub	r2, fp, #1040
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L16+24
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	write
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC9
	.word	1023
	.word	.LC6
	.word	count
	.word	.LC7
	.word	stdout
	.word	.LC8
	.size	processCliente, .-processCliente
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Erro mallocEndereco\000"
	.text
	.align	2
	.global	mallocEndereco
	.syntax unified
	.arm
	.fpu softvfp
	.type	mallocEndereco, %function
mallocEndereco:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L21
	bl	puts
	mvn	r0, #0
	bl	exit
.L19:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	mov	r3, #16
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC10
	.size	mallocEndereco, .-mallocEndereco
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
