	.file	"326008.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Uso: %s <puerto>\n"
.LC1:
	.string	"ERROR en apertura de socket"
.LC2:
	.string	"ERROR en binding"
.LC3:
	.string	"Socket disponible: %d\n"
.LC4:
	.string	"lectura de socket"
.LC5:
	.string	"rb"
.LC6:
	.string	"%d"
.LC7:
	.string	"escritura en socket"
.LC8:
	.string	"termine"
	.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, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -188[rbp], 1
	cmp	DWORD PTR -196[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -184[rbp], eax
	cmp	DWORD PTR -184[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -160[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -180[rbp], eax
	mov	WORD PTR -160[rbp], 2
	mov	DWORD PTR -156[rbp], 0
	mov	eax, DWORD PTR -180[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -158[rbp], ax
	lea	rax, -160[rbp]
	add	rax, 8
	mov	edx, 8
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	movzx	eax, WORD PTR -158[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -192[rbp], 16
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -192[rbp]
	lea	rdx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 127
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -176[rbp], eax
	cmp	DWORD PTR -176[rbp], 0
	jns	.L5
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	ecx, DWORD PTR -192[rbp]
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 16
	mov	rsi, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -176[rbp], eax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -172[rbp], eax
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edx, DWORD PTR -172[rbp]
	lea	rax, -144[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	ecx, DWORD PTR -192[rbp]
	lea	rdx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -176[rbp], eax
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	jmp	.L6
.L8:
	mov	rdx, QWORD PTR -168[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 128
	mov	rdi, rax
	call	fread@PLT
	mov	ecx, DWORD PTR -192[rbp]
	lea	rdx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -176[rbp], eax
	cmp	DWORD PTR -176[rbp], 0
	jns	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	edi, 50
	call	usleep@PLT
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	add	DWORD PTR -188[rbp], 1
.L6:
	mov	eax, DWORD PTR -188[rbp]
	sal	eax, 7
	cmp	DWORD PTR -172[rbp], eax
	jg	.L8
	mov	ecx, DWORD PTR -192[rbp]
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 7
	lea	rsi, .LC8[rip]
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -176[rbp], eax
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -172[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	movsx	rsi, eax
	mov	rdx, QWORD PTR -168[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	ecx, DWORD PTR -192[rbp]
	lea	rdx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -176[rbp], eax
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"326008.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Uso: %s <puerto>\012\000"
	.align	2
.LC1:
	.ascii	"ERROR en apertura de socket\000"
	.align	2
.LC2:
	.ascii	"ERROR en binding\000"
	.align	2
.LC3:
	.ascii	"Socket disponible: %d\012\000"
	.align	2
.LC4:
	.ascii	"lectura de socket\000"
	.align	2
.LC5:
	.ascii	"rb\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"escritura en socket\000"
	.align	2
.LC8:
	.ascii	"termine\000"
	.global	__aeabi_idivmod
	.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 = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #192
	str	r0, [fp, #-184]
	str	r1, [fp, #-188]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-176]
	ldr	r3, [fp, #-184]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-188]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L11+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #152
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-188]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-168]
	mov	r3, #2
	strh	r3, [fp, #-152]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-168]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-150]	@ movhi
	sub	r3, fp, #152
	add	r3, r3, #8
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #152
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-172]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L11+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldrh	r3, [fp, #-150]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L11+20
	bl	printf
	mov	r3, #16
	str	r3, [fp, #-180]
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #136
	sub	r3, fp, #180
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #127
	ldr	r0, [fp, #-172]
	bl	recvfrom
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L11+24
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-188]
	add	r3, r3, #8
	ldr	r1, [r3]
	ldr	r3, [fp, #-180]
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-172]
	bl	sendto
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-188]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L11+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-160]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-160]
	bl	fseek
	ldr	r0, [fp, #-160]
	bl	ftell
	str	r0, [fp, #-156]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-160]
	bl	fseek
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #136
	ldr	r2, [fp, #-156]
	ldr	r1, .L11+32
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-180]
	sub	r1, fp, #136
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-172]
	bl	sendto
	str	r0, [fp, #-164]
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	b	.L6
.L8:
	sub	r0, fp, #136
	ldr	r3, [fp, #-160]
	mov	r2, #1
	mov	r1, #128
	bl	fread
	ldr	r3, [fp, #-180]
	sub	r1, fp, #136
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-172]
	bl	sendto
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L11+36
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	mov	r0, #50
	bl	usleep
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L6:
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #7
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	bgt	.L8
	ldr	r3, [fp, #-180]
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #7
	ldr	r1, .L11+40
	ldr	r0, [fp, #-172]
	bl	sendto
	str	r0, [fp, #-164]
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, [fp, #-160]
	bl	ftell
	mov	r2, r0
	ldr	r3, [fp, #-156]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r1, r3
	sub	r0, fp, #136
	ldr	r3, [fp, #-160]
	mov	r2, #1
	bl	fread
	ldr	r3, [fp, #-180]
	sub	r1, fp, #136
	str	r3, [sp, #4]
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-172]
	bl	sendto
	str	r0, [fp, #-164]
	ldr	r0, [fp, #-160]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	stderr
	.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
