	.file	"719310.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s port\n"
.LC1:
	.string	"getaddrinfo: %s\n"
.LC2:
	.string	"Could not bind\n"
	.align 8
.LC3:
	.string	"Received %zd bytes from %s:%s\n"
.LC4:
	.string	"getnameinfo: %s\n"
.LC5:
	.string	"Error sending response\n"
	.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, 1824
	mov	DWORD PTR -1812[rbp], edi
	mov	QWORD PTR -1824[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1812[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -1824[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:
	lea	rax, -1760[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1756[rbp], 0
	mov	DWORD PTR -1752[rbp], 1
	mov	DWORD PTR -1760[rbp], 1
	mov	DWORD PTR -1748[rbp], 0
	mov	QWORD PTR -1728[rbp], 0
	mov	QWORD PTR -1736[rbp], 0
	mov	QWORD PTR -1720[rbp], 0
	mov	rax, QWORD PTR -1824[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1784[rbp]
	lea	rdx, -1760[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	getaddrinfo@PLT
	mov	DWORD PTR -1788[rbp], eax
	cmp	DWORD PTR -1788[rbp], 0
	je	.L3
	mov	eax, DWORD PTR -1788[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -1784[rbp]
	mov	QWORD PTR -1776[rbp], rax
	jmp	.L4
.L9:
	mov	rax, QWORD PTR -1776[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -1776[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -1776[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -1792[rbp], eax
	cmp	DWORD PTR -1792[rbp], -1
	je	.L18
	mov	rax, QWORD PTR -1776[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -1776[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -1792[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L19
	mov	eax, DWORD PTR -1792[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L6
.L18:
	nop
.L6:
	mov	rax, QWORD PTR -1776[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -1776[rbp], rax
.L4:
	cmp	QWORD PTR -1776[rbp], 0
	jne	.L9
	jmp	.L8
.L19:
	nop
.L8:
	cmp	QWORD PTR -1776[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR -1784[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
.L16:
	mov	DWORD PTR -1796[rbp], 128
	lea	rcx, -1796[rbp]
	lea	rdx, -1712[rbp]
	lea	rsi, -1552[rbp]
	mov	eax, DWORD PTR -1792[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 500
	mov	edi, eax
	call	recvfrom@PLT
	mov	QWORD PTR -1768[rbp], rax
	cmp	QWORD PTR -1768[rbp], -1
	je	.L20
	mov	esi, DWORD PTR -1796[rbp]
	lea	rcx, -1584[rbp]
	lea	rdx, -1040[rbp]
	lea	rax, -1712[rbp]
	sub	rsp, 8
	push	2
	mov	r9d, 32
	mov	r8, rcx
	mov	ecx, 1025
	mov	rdi, rax
	call	getnameinfo@PLT
	add	rsp, 16
	mov	DWORD PTR -1788[rbp], eax
	cmp	DWORD PTR -1788[rbp], 0
	jne	.L13
	lea	rcx, -1584[rbp]
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -1768[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -1788[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L14:
	mov	edi, DWORD PTR -1796[rbp]
	mov	rdx, QWORD PTR -1768[rbp]
	lea	rcx, -1712[rbp]
	lea	rsi, -1552[rbp]
	mov	eax, DWORD PTR -1792[rbp]
	mov	r9d, edi
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	cmp	QWORD PTR -1768[rbp], rax
	je	.L16
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L16
.L20:
	nop
	jmp	.L16
	.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	"719310.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s port\012\000"
	.align	2
.LC1:
	.ascii	"getaddrinfo: %s\012\000"
	.align	2
.LC2:
	.ascii	"Could not bind\012\000"
	.align	2
.LC3:
	.ascii	"Received %zd bytes from %s:%s\012\000"
	.align	2
.LC4:
	.ascii	"getnameinfo: %s\012\000"
	.align	2
.LC5:
	.ascii	"Error sending response\012\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 = 1760
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1776
	sub	sp, sp, #4
	str	r0, [fp, #-1768]
	str	r1, [fp, #-1772]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1768]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L21+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1772]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L21+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #1712
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1732]
	mov	r3, #1
	str	r3, [fp, #-1728]
	mov	r3, #1
	str	r3, [fp, #-1736]
	mov	r3, #0
	str	r3, [fp, #-1724]
	mov	r3, #0
	str	r3, [fp, #-1712]
	mov	r3, #0
	str	r3, [fp, #-1716]
	mov	r3, #0
	str	r3, [fp, #-1708]
	ldr	r3, [fp, #-1772]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #1744
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #1712
	sub	r2, r2, #12
	sub	r2, r2, #12
	mov	r0, #0
	bl	getaddrinfo
	str	r0, [fp, #-1744]
	ldr	r3, [fp, #-1744]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L21+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-1744]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L21+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-1760]
	str	r3, [fp, #-1752]
	b	.L4
.L9:
	ldr	r3, [fp, #-1752]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-1752]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-1752]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-1748]
	ldr	r3, [fp, #-1748]
	cmn	r3, #1
	beq	.L18
	ldr	r3, [fp, #-1752]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-1752]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-1748]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r0, [fp, #-1748]
	bl	close
	b	.L6
.L18:
	nop
.L6:
	ldr	r3, [fp, #-1752]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-1752]
.L4:
	ldr	r3, [fp, #-1752]
	cmp	r3, #0
	bne	.L9
	b	.L8
.L19:
	nop
.L8:
	ldr	r3, [fp, #-1752]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L21+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-1760]
	mov	r0, r3
	bl	freeaddrinfo
.L16:
	mov	r3, #128
	str	r3, [fp, #-1756]
	sub	r1, fp, #1520
	sub	r1, r1, #12
	sub	r1, r1, #12
	sub	r3, fp, #1744
	sub	r3, r3, #12
	str	r3, [sp, #4]
	sub	r3, fp, #1680
	sub	r3, r3, #12
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #500
	ldr	r0, [fp, #-1748]
	bl	recvfrom
	str	r0, [fp, #-1740]
	ldr	r3, [fp, #-1740]
	cmn	r3, #1
	beq	.L20
	ldr	r1, [fp, #-1756]
	sub	r2, fp, #1024
	sub	r2, r2, #12
	sub	r2, r2, #8
	sub	r0, fp, #1680
	sub	r0, r0, #12
	sub	r0, r0, #12
	mov	r3, #2
	str	r3, [sp, #8]
	mov	r3, #32
	str	r3, [sp, #4]
	sub	r3, fp, #1552
	sub	r3, r3, #12
	sub	r3, r3, #12
	str	r3, [sp]
	ldr	r3, .L21+20
	bl	getnameinfo
	str	r0, [fp, #-1744]
	ldr	r3, [fp, #-1744]
	cmp	r3, #0
	bne	.L13
	sub	r3, fp, #1552
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r2, fp, #1024
	sub	r2, r2, #12
	sub	r2, r2, #8
	ldr	r1, [fp, #-1740]
	ldr	r0, .L21+24
	bl	printf
	b	.L14
.L13:
	ldr	r3, .L21+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-1744]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L21+28
	mov	r0, r4
	bl	fprintf
.L14:
	ldr	r2, [fp, #-1740]
	ldr	r3, [fp, #-1756]
	sub	r1, fp, #1520
	sub	r1, r1, #12
	sub	r1, r1, #12
	str	r3, [sp, #4]
	sub	r3, fp, #1680
	sub	r3, r3, #12
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-1748]
	bl	sendto
	mov	r2, r0
	ldr	r3, [fp, #-1740]
	cmp	r3, r2
	beq	.L16
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L21+32
	bl	fwrite
	b	.L16
.L20:
	nop
	b	.L16
.L22:
	.align	2
.L21:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	1025
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
