	.file	"92158.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"na funcao socket"
.LC1:
	.string	"na funcao bind"
.LC2:
	.string	"na funcao 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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -48[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	edi, 9000
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	erro
.L2:
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC1[rip]
	call	erro
.L3:
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	erro
.L4:
	mov	DWORD PTR -60[rbp], 16
.L8:
	nop
.L5:
	mov	edx, 1
	mov	esi, 0
	mov	edi, -1
	call	waitpid@PLT
	test	eax, eax
	jg	.L5
	lea	rdx, -60[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jle	.L8
	call	fork@PLT
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	process_client
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L8
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	process_client
	.type	process_client, @function
process_client:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1044[rbp], 0
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 1023
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	mov	BYTE PTR -1040[rbp+rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR -1060[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	process_client, .-process_client
	.section	.rodata
.LC3:
	.string	"Erro: %s\n"
	.text
	.globl	erro
	.type	erro, @function
erro:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, -1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	erro, .-erro
	.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	"92158.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"na funcao socket\000"
	.align	2
.LC1:
	.ascii	"na funcao bind\000"
	.align	2
.LC2:
	.ascii	"na funcao listen\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-40]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, .L10+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L10+8
	bl	erro
.L2:
	sub	r3, fp, #40
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L10+12
	bl	erro
.L3:
	mov	r1, #5
	ldr	r0, [fp, #-48]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L10+16
	bl	erro
.L4:
	mov	r3, #16
	str	r3, [fp, #-52]
.L8:
	nop
.L5:
	mov	r2, #1
	mov	r1, #0
	mvn	r0, #0
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bgt	.L5
	sub	r2, fp, #52
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	accept
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L8
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, [fp, #-48]
	bl	close
	ldr	r0, [fp, #-44]
	bl	process_client
	mov	r0, #0
	bl	exit
.L7:
	ldr	r0, [fp, #-44]
	bl	close
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	9000
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	process_client
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_client, %function
process_client:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L14+4
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1036]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r3, .L14+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, [fp, #-1040]
	bl	close
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	1023
	.word	stdout
	.size	process_client, .-process_client
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Erro: %s\012\000"
	.text
	.align	2
	.global	erro
	.syntax unified
	.arm
	.fpu softvfp
	.type	erro, %function
erro:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L17
	bl	printf
	mvn	r0, #0
	bl	exit
.L18:
	.align	2
.L17:
	.word	.LC5
	.size	erro, .-erro
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
