	.file	"384454.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage:  %s <UDP SERVER PORT>\n"
.LC1:
	.string	"socket() failed"
.LC2:
	.string	"bind() failed"
.LC3:
	.string	"recvfrom() failed"
.LC4:
	.string	"Handling client %s\n"
	.align 8
.LC5:
	.string	"sendto() sent a different number of bytes than expected"
	.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, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -324[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -336[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	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	WORD PTR -318[rbp], ax
	mov	edx, 17
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -312[rbp], eax
	cmp	DWORD PTR -312[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	DieWithError
.L3:
	lea	rax, -304[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -304[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -300[rbp], eax
	movzx	eax, WORD PTR -318[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -302[rbp], ax
	lea	rcx, -304[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC2[rip]
	call	DieWithError
.L7:
	mov	DWORD PTR -316[rbp], 16
	lea	rcx, -316[rbp]
	lea	rdx, -288[rbp]
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jns	.L5
	lea	rdi, .LC3[rip]
	call	DieWithError
.L5:
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -308[rbp]
	movsx	rdx, eax
	lea	rcx, -288[rbp]
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	r9d, 16
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	edx, DWORD PTR -308[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L7
	lea	rdi, .LC5[rip]
	call	DieWithError
	jmp	.L7
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	DieWithError
	.type	DieWithError, @function
DieWithError:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	DieWithError, .-DieWithError
	.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	"384454.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage:  %s <UDP SERVER PORT>\012\000"
	.align	2
.LC1:
	.ascii	"socket() failed\000"
	.align	2
.LC2:
	.ascii	"bind() failed\000"
	.align	2
.LC3:
	.ascii	"recvfrom() failed\000"
	.align	2
.LC4:
	.ascii	"Handling client %s\012\000"
	.align	2
.LC5:
	.ascii	"sendto() sent a different number of bytes than expe"
	.ascii	"cted\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 = 320
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #328
	str	r0, [fp, #-320]
	str	r1, [fp, #-324]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-320]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L9+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-324]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L9+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-324]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #4
	sub	r3, r3, #304
	sub	r3, r3, #2
	strh	r2, [r3]	@ movhi
	mov	r2, #17
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-304]
	ldr	r3, [fp, #-304]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L9+12
	bl	DieWithError
.L3:
	sub	r3, fp, #296
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #292
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-292]
	sub	r3, fp, #4
	sub	r3, r3, #304
	sub	r3, r3, #2
	ldrh	r3, [r3]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #292
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #296
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-304]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L9+16
	bl	DieWithError
.L7:
	mov	r3, #16
	str	r3, [fp, #-308]
	sub	r1, fp, #264
	sub	r3, fp, #308
	str	r3, [sp, #4]
	sub	r3, fp, #280
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-304]
	bl	recvfrom
	str	r0, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L9+20
	bl	DieWithError
.L5:
	ldr	r0, [fp, #-276]
	bl	inet_ntoa
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L9+24
	bl	printf
	ldr	r2, [fp, #-300]
	sub	r1, fp, #264
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #280
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-304]
	bl	sendto
	mov	r2, r0
	ldr	r3, [fp, #-300]
	cmp	r3, r2
	beq	.L7
	ldr	r0, .L9+28
	bl	DieWithError
	b	.L7
.L10:
	.align	2
.L9:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.align	2
	.global	DieWithError
	.syntax unified
	.arm
	.fpu softvfp
	.type	DieWithError, %function
DieWithError:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	DieWithError, .-DieWithError
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
