	.file	"548582.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Introduce los par\303\241metros."
	.align 8
.LC1:
	.string	"ERROR: No se ha podido ejecutar el getaddrinfo."
	.align 8
.LC2:
	.string	"[PID: %i] Conexi\303\263n desde %s:%s\n"
.LC3:
	.string	"Conexi\303\263n terminada"
	.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, 1392
	mov	DWORD PTR -1380[rbp], edi
	mov	QWORD PTR -1392[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1380[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	jmp	.L12
.L2:
	lea	rax, -1344[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1340[rbp], 0
	mov	DWORD PTR -1336[rbp], 1
	mov	DWORD PTR -1344[rbp], 1
	mov	rax, QWORD PTR -1392[rbp]
	add	rax, 16
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -1392[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1360[rbp]
	lea	rdx, -1344[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	test	eax, eax
	je	.L4
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -1360[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -1360[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -1372[rbp], eax
	mov	rax, QWORD PTR -1360[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -1360[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -1372[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	rax, QWORD PTR -1360[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	eax, DWORD PTR -1372[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -1376[rbp], 128
.L10:
	lea	rdx, -1376[rbp]
	lea	rcx, -1296[rbp]
	mov	eax, DWORD PTR -1372[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1368[rbp], eax
	call	fork@PLT
	mov	DWORD PTR -1364[rbp], eax
	cmp	DWORD PTR -1364[rbp], 0
	jne	.L5
.L8:
	mov	esi, DWORD PTR -1376[rbp]
	lea	rcx, -1168[rbp]
	lea	rdx, -1040[rbp]
	lea	rax, -1296[rbp]
	sub	rsp, 8
	push	1
	mov	r9d, 32
	mov	r8, rcx
	mov	ecx, 1025
	mov	rdi, rax
	call	getnameinfo@PLT
	add	rsp, 16
	mov	eax, 0
	call	getpid@PLT
	mov	esi, eax
	lea	rdx, -1168[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -1136[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	ecx, 0
	mov	edx, 80
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -1352[rbp], rax
	lea	rdx, -1136[rbp]
	mov	rax, QWORD PTR -1352[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	movzx	eax, BYTE PTR -1136[rbp]
	cmp	al, 81
	jne	.L6
	cmp	QWORD PTR -1352[rbp], 2
	jne	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	nop
	mov	eax, DWORD PTR -1368[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	jmp	.L10
.L6:
	mov	rdx, QWORD PTR -1352[rbp]
	lea	rsi, -1136[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	jmp	.L8
.L5:
	mov	eax, DWORD PTR -1368[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	jmp	.L10
.L12:
	call	__stack_chk_fail@PLT
.L11:
	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	"548582.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Introduce los par\303\241metros.\000"
	.align	2
.LC1:
	.ascii	"ERROR: No se ha podido ejecutar el getaddrinfo.\000"
	.align	2
.LC2:
	.ascii	"[PID: %i] Conexi\303\263n desde %s:%s\012\000"
	.align	2
.LC3:
	.ascii	"Conexi\303\263n terminada\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1344
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1360
	str	r0, [fp, #-1344]
	str	r1, [fp, #-1348]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1344]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L13+4
	bl	puts
	mvn	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	b	.L12
.L2:
	sub	r3, fp, #1296
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1308]
	mov	r3, #1
	str	r3, [fp, #-1304]
	mov	r3, #1
	str	r3, [fp, #-1312]
	ldr	r3, [fp, #-1348]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1348]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #1328
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #1296
	sub	r2, r2, #4
	sub	r2, r2, #12
	bl	getaddrinfo
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L13+8
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-1336]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-1336]
	ldr	r3, [r3, #8]
	mov	r2, #0
	mov	r1, r3
	bl	socket
	str	r0, [fp, #-1328]
	ldr	r3, [fp, #-1336]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-1336]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-1328]
	bl	bind
	ldr	r3, [fp, #-1336]
	mov	r0, r3
	bl	freeaddrinfo
	mov	r1, #5
	ldr	r0, [fp, #-1328]
	bl	listen
	mov	r3, #128
	str	r3, [fp, #-1332]
.L10:
	sub	r2, fp, #1328
	sub	r2, r2, #4
	sub	r3, fp, #1264
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-1328]
	bl	accept
	str	r0, [fp, #-1324]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1320]
	ldr	r3, [fp, #-1320]
	cmp	r3, #0
	bne	.L5
.L8:
	ldr	r1, [fp, #-1332]
	sub	r2, fp, #1024
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r0, fp, #1264
	sub	r0, r0, #4
	sub	r0, r0, #12
	mov	r3, #1
	str	r3, [sp, #8]
	mov	r3, #32
	str	r3, [sp, #4]
	sub	r3, fp, #1136
	sub	r3, r3, #4
	sub	r3, r3, #12
	str	r3, [sp]
	ldr	r3, .L13+12
	bl	getnameinfo
	bl	getpid
	mov	r1, r0
	sub	r3, fp, #1136
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r2, fp, #1024
	sub	r2, r2, #4
	sub	r2, r2, #8
	ldr	r0, .L13+16
	bl	printf
	sub	r1, fp, #1104
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #0
	mov	r2, #80
	ldr	r0, [fp, #-1324]
	bl	recv
	str	r0, [fp, #-1316]
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1316]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldrb	r3, [fp, #-1120]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L6
	ldr	r3, [fp, #-1316]
	cmp	r3, #2
	bne	.L6
	ldr	r0, .L13+20
	bl	puts
	nop
	ldr	r0, [fp, #-1324]
	bl	close
	b	.L10
.L6:
	ldr	r2, [fp, #-1316]
	sub	r1, fp, #1104
	sub	r1, r1, #4
	sub	r1, r1, #12
	mov	r3, #0
	ldr	r0, [fp, #-1324]
	bl	send
	b	.L8
.L5:
	ldr	r0, [fp, #-1324]
	bl	close
	b	.L10
.L12:
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	1025
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
