	.file	"718838.c"
	.intel_syntax noprefix
	.text
	.globl	get_in_addr
	.type	get_in_addr, @function
get_in_addr:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 2
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_in_addr, .-get_in_addr
	.globl	get_in_port
	.type	get_in_port, @function
get_in_port:
.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]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 2
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 2[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 2[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_in_port, .-get_in_port
	.section	.rodata
.LC0:
	.string	"usage: %s <port>\n"
.LC1:
	.string	"failed to get port info: %s\n"
.LC2:
	.string	"failed to bind socket"
	.align 8
.LC3:
	.string	"listening for incoming messages at %s port %s...\n"
.LC4:
	.string	"failed to receive message"
	.align 8
.LC5:
	.string	"received %zd bytes from %s port %d:\n"
	.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
	lea	r11, -65536[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 352
	mov	DWORD PTR -65876[rbp], edi
	mov	QWORD PTR -65888[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -65876[rbp], 2
	je	.L8
	mov	rax, QWORD PTR -65888[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
.L8:
	mov	rax, QWORD PTR -65888[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -65840[rbp], rax
	mov	QWORD PTR -65824[rbp], 0
	mov	QWORD PTR -65816[rbp], 0
	mov	QWORD PTR -65808[rbp], 0
	mov	QWORD PTR -65800[rbp], 0
	mov	QWORD PTR -65792[rbp], 0
	mov	QWORD PTR -65784[rbp], 0
	mov	DWORD PTR -65824[rbp], 1
	mov	DWORD PTR -65816[rbp], 2
	lea	rcx, -65856[rbp]
	lea	rdx, -65824[rbp]
	mov	rax, QWORD PTR -65840[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	getaddrinfo@PLT
	mov	DWORD PTR -65860[rbp], eax
	cmp	DWORD PTR -65860[rbp], 0
	je	.L9
	mov	eax, DWORD PTR -65860[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
.L9:
	mov	rax, QWORD PTR -65856[rbp]
	mov	QWORD PTR -65848[rbp], rax
	jmp	.L10
.L15:
	mov	rax, QWORD PTR -65848[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -65848[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -65848[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -65864[rbp], eax
	cmp	DWORD PTR -65864[rbp], -1
	je	.L21
	mov	rax, QWORD PTR -65848[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -65848[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -65864[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L22
	mov	eax, DWORD PTR -65864[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L12
.L21:
	nop
.L12:
	mov	rax, QWORD PTR -65848[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -65848[rbp], rax
.L10:
	cmp	QWORD PTR -65848[rbp], 0
	jne	.L15
	jmp	.L14
.L22:
	nop
.L14:
	cmp	QWORD PTR -65848[rbp], 0
	jne	.L16
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -65856[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -65848[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	get_in_addr
	mov	rsi, rax
	mov	rax, QWORD PTR -65848[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, -65648[rbp]
	mov	ecx, 46
	mov	edi, eax
	call	inet_ntop@PLT
	mov	rax, QWORD PTR -65856[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	rdx, QWORD PTR -65840[rbp]
	lea	rax, -65648[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L19:
	mov	DWORD PTR -65868[rbp], 128
	lea	rcx, -65868[rbp]
	lea	rdx, -65776[rbp]
	lea	rsi, -65552[rbp]
	mov	eax, DWORD PTR -65864[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 65535
	mov	edi, eax
	call	recvfrom@PLT
	mov	QWORD PTR -65832[rbp], rax
	cmp	QWORD PTR -65832[rbp], -1
	jne	.L17
	lea	rdi, .LC4[rip]
	call	perror@PLT
	jmp	.L19
.L17:
	lea	rdx, -65552[rbp]
	mov	rax, QWORD PTR -65832[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -65776[rbp]
	mov	rdi, rax
	call	get_in_addr
	mov	rsi, rax
	movzx	eax, WORD PTR -65776[rbp]
	movzx	eax, ax
	lea	rdx, -65600[rbp]
	mov	ecx, 46
	mov	edi, eax
	call	inet_ntop@PLT
	lea	rax, -65776[rbp]
	mov	rdi, rax
	call	get_in_port
	mov	WORD PTR -65870[rbp], ax
	movzx	ecx, WORD PTR -65870[rbp]
	lea	rdx, -65600[rbp]
	mov	rax, QWORD PTR -65832[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -65552[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L19
	.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	"718838.c"
	.text
	.align	2
	.global	get_in_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_in_addr, %function
get_in_addr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_in_addr, .-get_in_addr
	.align	2
	.global	get_in_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_in_port, %function
get_in_port:
	@ 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	r3, [fp, #-8]
	ldrh	r3, [r3]
	cmp	r3, #2
	bne	.L5
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	b	.L6
.L5:
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_in_port, .-get_in_port
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s <port>\012\000"
	.align	2
.LC1:
	.ascii	"failed to get port info: %s\012\000"
	.align	2
.LC2:
	.ascii	"failed to bind socket\000"
	.align	2
.LC3:
	.ascii	"listening for incoming messages at %s port %s...\012"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"failed to receive message\000"
	.align	2
.LC5:
	.ascii	"received %zd bytes from %s port %d:\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 = 65840
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #65536
	sub	sp, sp, #316
	sub	r3, fp, #65536
	sub	r3, r3, #12
	str	r0, [r3, #-300]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	str	r1, [r3, #-304]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	cmp	r3, #2
	beq	.L8
	ldr	r3, .L23+4
	ldr	r0, [r3]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-304]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L23+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L8:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-304]
	ldr	r3, [r3, #4]
	str	r3, [r2, #-272]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #260
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-260]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #2
	str	r3, [r2, #-252]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #288
	sub	r2, fp, #65536
	sub	r2, r2, #12
	sub	r2, r2, #260
	sub	r1, fp, #65536
	sub	r1, r1, #12
	ldr	r1, [r1, #-272]
	mov	r0, #0
	bl	getaddrinfo
	str	r0, [r4, #-268]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-268]
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L23+4
	ldr	r4, [r3]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r0, [r3, #-268]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L23+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L9:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-288]
	str	r3, [r2, #-276]
	b	.L10
.L15:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r0, [r3, #4]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r1, [r3, #8]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r3, [r3, #12]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	mov	r4, r2
	mov	r2, r3
	bl	socket
	str	r0, [r4, #-280]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-280]
	cmn	r3, #1
	beq	.L21
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r1, [r3, #20]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r3, [r3, #16]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r0, [r0, #-280]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r0, [r3, #-280]
	bl	close
	b	.L12
.L21:
	nop
.L12:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r3, [r3, #28]
	str	r3, [r2, #-276]
.L10:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bne	.L15
	b	.L14
.L22:
	nop
.L14:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L23+16
	bl	perror
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-288]
	mov	r0, r3
	bl	freeaddrinfo
	mov	r0, #1
	bl	exit
.L16:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r4, [r3, #4]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	get_in_addr
	mov	r1, r0
	sub	r2, fp, #65536
	sub	r2, r2, #12
	sub	r2, r2, #100
	mov	r3, #46
	mov	r0, r4
	bl	inet_ntop
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-288]
	mov	r0, r3
	bl	freeaddrinfo
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #100
	ldr	r2, [r2, #-272]
	mov	r1, r3
	ldr	r0, .L23+20
	bl	printf
.L19:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #128
	str	r3, [r2, #-284]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #65536
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r0, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #284
	str	r3, [sp, #4]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #228
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, .L23+24
	ldr	r0, [r0, #-280]
	bl	recvfrom
	str	r0, [r4, #-264]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-264]
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L23+28
	bl	perror
	b	.L19
.L17:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-264]
	add	r3, r2, r3
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrh	r3, [r3, #-228]
	mov	r4, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #228
	mov	r0, r3
	bl	get_in_addr
	mov	r1, r0
	sub	r2, fp, #65536
	sub	r2, r2, #12
	sub	r2, r2, #52
	mov	r3, #46
	mov	r0, r4
	bl	inet_ntop
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r4, r3, #288
	sub	r4, r4, #2
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #228
	mov	r0, r3
	bl	get_in_port
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #288
	sub	r3, r3, #2
	ldrh	r3, [r3]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	sub	r2, r2, #52
	sub	r1, fp, #65536
	sub	r1, r1, #12
	ldr	r1, [r1, #-264]
	ldr	r0, .L23+32
	bl	printf
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	b	.L19
.L24:
	.align	2
.L23:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	65535
	.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
