	.file	"101055.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"recvfrom error"
.LC1:
	.string	"a"
.LC2:
	.string	"receive.txt"
	.text
	.globl	echo_ser
	.type	echo_ser, @function
echo_ser:
.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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	lea	rdx, -1024[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
.L5:
	mov	DWORD PTR -1072[rbp], 16
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -1072[rbp]
	lea	rdx, -1056[rbp]
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -1068[rbp], eax
	cmp	DWORD PTR -1068[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L7
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	cmp	DWORD PTR -1068[rbp], 0
	jle	.L5
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -1064[rbp], rax
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	edi, DWORD PTR -1072[rbp]
	mov	eax, DWORD PTR -1068[rbp]
	movsx	rdx, eax
	lea	rcx, -1056[rbp]
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	r9d, edi
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L5
.L7:
	nop
	jmp	.L5
	.cfi_endproc
.LFE6:
	.size	echo_ser, .-echo_ser
	.section	.rodata
.LC3:
	.string	"socket error"
.LC4:
	.string	"bind error"
	.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
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L9
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 5188
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	echo_ser
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"101055.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"recvfrom error\000"
	.align	2
.LC1:
	.ascii	"a\000"
	.align	2
.LC2:
	.ascii	"receive.txt\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	echo_ser
	.syntax unified
	.arm
	.fpu softvfp
	.type	echo_ser, %function
echo_ser:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	str	r0, [fp, #-1064]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L5:
	mov	r3, #16
	str	r3, [fp, #-1060]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #1056
	sub	r3, r3, #4
	str	r3, [sp, #4]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1064]
	bl	recvfrom
	str	r0, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	cmn	r3, #1
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L7
	ldr	r0, .L8+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	ble	.L5
	ldr	r1, .L8+8
	ldr	r0, .L8+12
	bl	fopen
	str	r0, [fp, #-1052]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1052]
	mov	r0, r3
	bl	fputs
	ldr	r2, [fp, #-1056]
	ldr	r3, [fp, #-1060]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	str	r3, [sp, #4]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-1064]
	bl	sendto
	ldr	r0, [fp, #-1052]
	bl	fclose
	b	.L5
.L7:
	nop
	b	.L5
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	echo_ser, .-echo_ser
	.section	.rodata
	.align	2
.LC4:
	.ascii	"socket error\000"
	.align	2
.LC5:
	.ascii	"bind error\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L15+4
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L15+8
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L15+12
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r0, [fp, #-28]
	bl	echo_ser
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	.LC4
	.word	5188
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
