	.file	"250367.c"
	.intel_syntax noprefix
	.text
	.local	entries
	.comm	entries,2621440,32
	.local	next_entry
	.comm	next_entry,4,4
	.type	find_entry, @function
find_entry:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, entries[rip]
	lea	rcx, [rax+rdx]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 32
	mov	rsi, rax
	mov	rdi, rcx
	call	memcmp@PLT
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, entries[rip]
	add	rax, rdx
	jmp	.L4
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 65535
	jle	.L5
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_entry, .-find_entry
	.type	find_or_insert_entry, @function
find_or_insert_entry:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	find_entry
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	mov	eax, DWORD PTR next_entry[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR next_entry[rip], edx
	movzx	eax, ax
	mov	edx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, entries[rip]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
.L7:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	find_or_insert_entry, .-find_or_insert_entry
	.section	.rodata
.LC0:
	.string	"socket"
.LC1:
	.string	"setsockopt"
.LC2:
	.string	"bind"
.LC3:
	.string	"recvfrom"
.LC4:
	.string	"sendto"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	WORD PTR -96[rbp], 2
	mov	edi, 49918
	call	htons@PLT
	mov	WORD PTR -94[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -92[rbp], eax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	jns	.L10
	lea	rdi, .LC0[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L17
.L10:
	mov	DWORD PTR -120[rbp], 1
	lea	rdx, -120[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L12
	lea	rdi, .LC1[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L17
.L12:
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L13
	lea	rdi, .LC2[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L17
.L13:
	mov	DWORD PTR -124[rbp], 16
	lea	rcx, -124[rbp]
	lea	rdx, -96[rbp]
	lea	rsi, -80[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 64
	mov	edi, eax
	call	recvfrom@PLT
	cmp	rax, 64
	je	.L14
	lea	rdi, .LC3[rip]
	call	perror@PLT
	jmp	.L15
.L14:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	find_or_insert_entry
	mov	QWORD PTR -104[rbp], rax
	mov	edx, DWORD PTR -92[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 32[rax], edx
	movzx	edx, WORD PTR -94[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	WORD PTR 36[rax], dx
	lea	rax, -80[rbp]
	add	rax, 32
	mov	rdi, rax
	call	find_entry
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	DWORD PTR -110[rbp], eax
	mov	rax, QWORD PTR -104[rbp]
	movzx	eax, WORD PTR 36[rax]
	mov	WORD PTR -106[rbp], ax
	mov	ecx, DWORD PTR -124[rbp]
	lea	rdx, -96[rbp]
	lea	rsi, -110[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 6
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L13
	lea	rdi, .LC4[rip]
	call	perror@PLT
	jmp	.L15
.L16:
	mov	ecx, DWORD PTR -124[rbp]
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L13
	lea	rdi, .LC4[rip]
	call	perror@PLT
	nop
.L15:
	jmp	.L13
.L17:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"250367.c"
	.text
	.local	entries
	.comm	entries,2621440,4
	.local	next_entry
	.comm	next_entry,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_entry, %function
find_entry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L5:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	mov	r2, #32
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6
	add	r3, r3, r2
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #65536
	blt	.L5
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	entries
	.size	find_entry, .-find_entry
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_or_insert_entry, %function
find_or_insert_entry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	find_entry
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L11
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L11
	str	r2, [r1]
	lsl	r2, r3, #16
	lsr	r2, r2, #16
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L11+4
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #32
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	memcpy
.L9:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	next_entry
	.word	entries
	.size	find_or_insert_entry, .-find_or_insert_entry
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket\000"
	.align	2
.LC1:
	.ascii	"setsockopt\000"
	.align	2
.LC2:
	.ascii	"bind\000"
	.align	2
.LC3:
	.ascii	"recvfrom\000"
	.align	2
.LC4:
	.ascii	"sendto\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 = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #88
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #2
	strh	r3, [fp, #-88]	@ movhi
	ldr	r0, .L23+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-86]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-84]
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L23+8
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L21
.L14:
	mov	r3, #1
	str	r3, [fp, #-108]
	sub	r3, fp, #108
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-104]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L16
	ldr	r0, .L23+12
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L21
.L16:
	sub	r3, fp, #88
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L23+16
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L21
.L17:
	mov	r3, #16
	str	r3, [fp, #-112]
	sub	r1, fp, #72
	sub	r3, fp, #112
	str	r3, [sp, #4]
	sub	r3, fp, #88
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #64
	ldr	r0, [fp, #-104]
	bl	recvfrom
	mov	r3, r0
	cmp	r3, #64
	beq	.L18
	ldr	r0, .L23+20
	bl	perror
	b	.L19
.L18:
	sub	r3, fp, #72
	mov	r0, r3
	bl	find_or_insert_entry
	str	r0, [fp, #-100]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-100]
	str	r2, [r3, #32]
	ldrh	r2, [fp, #-86]
	ldr	r3, [fp, #-100]
	strh	r2, [r3, #36]	@ movhi
	sub	r3, fp, #72
	add	r3, r3, #32
	mov	r0, r3
	bl	find_entry
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-100]
	ldr	r3, [r3, #32]
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-100]
	ldrh	r3, [r3, #36]
	strh	r3, [fp, #-92]	@ movhi
	ldr	r3, [fp, #-112]
	sub	r1, fp, #96
	str	r3, [sp, #4]
	sub	r3, fp, #88
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #6
	ldr	r0, [fp, #-104]
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L23+24
	bl	perror
	b	.L19
.L20:
	ldr	r3, [fp, #-112]
	str	r3, [sp, #4]
	sub	r3, fp, #88
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-104]
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L23+24
	bl	perror
	nop
.L19:
	b	.L17
.L21:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC5
	.word	49918
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
