	.file	"697915.c"
	.intel_syntax noprefix
	.text
	.globl	sendpacket
	.bss
	.align 32
	.type	sendpacket, @object
	.size	sendpacket, 4096
sendpacket:
	.zero	4096
	.globl	recvpacket
	.align 32
	.type	recvpacket, @object
	.size	recvpacket, 4096
recvpacket:
	.zero	4096
	.globl	sockfd
	.align 4
	.type	sockfd, @object
	.size	sockfd, 4
sockfd:
	.zero	4
	.globl	datalen
	.data
	.align 4
	.type	datalen, @object
	.size	datalen, 4
datalen:
	.long	56
	.globl	nsend
	.bss
	.align 4
	.type	nsend, @object
	.size	nsend, 4
nsend:
	.zero	4
	.globl	nreceived
	.align 4
	.type	nreceived, @object
	.size	nreceived, 4
nreceived:
	.zero	4
	.globl	dest_addr
	.align 16
	.type	dest_addr, @object
	.size	dest_addr, 16
dest_addr:
	.zero	16
	.globl	pid
	.align 4
	.type	pid, @object
	.size	pid, 4
pid:
	.zero	4
	.globl	from
	.align 16
	.type	from, @object
	.size	from, 16
from:
	.zero	16
	.globl	tvrecv
	.align 16
	.type	tvrecv, @object
	.size	tvrecv, 16
tvrecv:
	.zero	16
	.section	.rodata
.LC0:
	.string	"\n----PING stat----"
	.align 8
.LC2:
	.string	"%d packets transmitted, %d received, %%%.2f lost\n"
	.text
	.globl	statistics
	.type	statistics, @function
statistics:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR nsend[rip]
	mov	edx, DWORD PTR nreceived[rip]
	sub	eax, edx
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	cvtss2sd	xmm0, xmm0
	mov	eax, DWORD PTR nsend[rip]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	xmm1, QWORD PTR .LC1[rip]
	mulsd	xmm1, xmm2
	divsd	xmm0, xmm1
	movq	rcx, xmm0
	mov	edx, DWORD PTR nreceived[rip]
	mov	eax, DWORD PTR nsend[rip]
	movq	xmm0, rcx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR sockfd[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	statistics, .-statistics
	.globl	cal_chksum
	.type	cal_chksum, @function
cal_chksum:
.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	DWORD PTR -20[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	WORD PTR -26[rbp], 0
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 2[rax]
	mov	QWORD PTR -16[rbp], rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	add	DWORD PTR -20[rbp], eax
	sub	DWORD PTR -24[rbp], 2
.L3:
	cmp	DWORD PTR -24[rbp], 1
	jg	.L4
	cmp	DWORD PTR -24[rbp], 1
	jne	.L5
	lea	rax, -26[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	add	DWORD PTR -20[rbp], eax
.L5:
	mov	eax, DWORD PTR -20[rbp]
	sar	eax, 16
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	movzx	eax, ax
	add	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sar	eax, 16
	add	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	not	eax
	mov	WORD PTR -26[rbp], ax
	movzx	eax, WORD PTR -26[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cal_chksum, .-cal_chksum
	.globl	pack
	.type	pack, @function
pack:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	lea	rax, sendpacket[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR [rax], 8
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR 1[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	WORD PTR 2[rax], 0
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	WORD PTR 6[rax], dx
	mov	eax, DWORD PTR pid[rip]
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	WORD PTR 4[rax], dx
	mov	eax, DWORD PTR datalen[rip]
	add	eax, 28
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cal_chksum
	mov	rdx, QWORD PTR -16[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	eax, DWORD PTR -20[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pack, .-pack
	.section	.rodata
.LC3:
	.string	"sendto error"
	.text
	.globl	send_packet
	.type	send_packet, @function
send_packet:
.LFB9:
	.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	eax, DWORD PTR nsend[rip]
	add	eax, 1
	mov	DWORD PTR nsend[rip], eax
	mov	eax, DWORD PTR nsend[rip]
	mov	edi, eax
	call	pack
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR sockfd[rip]
	mov	r9d, 16
	lea	r8, dest_addr[rip]
	mov	ecx, 0
	lea	rsi, sendpacket[rip]
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L12
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	send_packet, .-send_packet
	.globl	tv_sub
	.type	tv_sub, @function
tv_sub:
.LFB10:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	sub	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jns	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rdx, 1000000[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	sub	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	tv_sub, .-tv_sub
	.section	.rodata
	.align 8
.LC4:
	.string	"ICMP packets's length is less than 8"
	.align 8
.LC6:
	.string	"%d byte from %s: icmp_seq=%u ttl=%d time=%.3f ms\n"
	.text
	.globl	unpack
	.type	unpack, @function
unpack:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 64
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	and	eax, 15
	movzx	eax, al
	sal	eax, 2
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	sub	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 7
	jg	.L16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, WORD PTR 4[rax]
	movzx	edx, ax
	mov	eax, DWORD PTR pid[rip]
	cmp	edx, eax
	jne	.L18
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, tvrecv[rip]
	call	tv_sub
	mov	rax, QWORD PTR tvrecv[rip]
	imul	rax, rax, 1000
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR tvrecv[rip+8]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC5[rip]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR 8[rax]
	movzx	r12d, al
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, WORD PTR 6[rax]
	movzx	ebx, ax
	mov	eax, DWORD PTR from[rip+4]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -76[rbp]
	movq	xmm0, rdx
	mov	r8d, r12d
	mov	ecx, ebx
	mov	rdx, rsi
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	jmp	.L17
.L18:
	mov	eax, -1
.L17:
	add	rsp, 64
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	unpack, .-unpack
	.section	.rodata
.LC7:
	.string	"recvfrom error"
	.text
	.globl	recv_packet
	.type	recv_packet, @function
recv_packet:
.LFB12:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, statistics[rip]
	mov	edi, 14
	call	signal@PLT
	mov	DWORD PTR -16[rbp], 16
.L25:
	mov	edi, 5
	call	alarm@PLT
	mov	eax, DWORD PTR sockfd[rip]
	lea	rdx, -16[rbp]
	mov	r9, rdx
	lea	r8, from[rip]
	mov	ecx, 0
	mov	edx, 4096
	lea	rsi, recvpacket[rip]
	mov	edi, eax
	call	recvfrom@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L28
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L22
.L20:
	mov	esi, 0
	lea	rdi, tvrecv[rip]
	call	gettimeofday@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, recvpacket[rip]
	call	unpack
	cmp	eax, -1
	je	.L29
	mov	eax, DWORD PTR nreceived[rip]
	add	eax, 1
	mov	DWORD PTR nreceived[rip], eax
	nop
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L26
	jmp	.L27
.L28:
	nop
	jmp	.L25
.L29:
	nop
.L22:
	jmp	.L25
.L27:
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	recv_packet, .-recv_packet
	.section	.rodata
.LC8:
	.string	"usage:%s hostname/IP address\n"
.LC9:
	.string	"icmp"
.LC10:
	.string	"getprotobyname"
.LC11:
	.string	"socket error"
.LC12:
	.string	"gethostbyname error"
	.align 8
.LC13:
	.string	"PING %s (%s): %d bytes data in ICMP packets.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -52[rbp], 51200
	cmp	DWORD PTR -68[rbp], 1
	jg	.L31
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L31:
	lea	rdi, .LC9[rip]
	call	getprotobyname@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L32
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edx, eax
	mov	esi, 3
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR sockfd[rip], eax
	mov	eax, DWORD PTR sockfd[rip]
	test	eax, eax
	jns	.L33
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	call	getuid@PLT
	mov	edi, eax
	call	setuid@PLT
	mov	eax, DWORD PTR sockfd[rip]
	lea	rdx, -52[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 8
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	QWORD PTR dest_addr[rip], 0
	mov	QWORD PTR dest_addr[rip+8], 0
	mov	WORD PTR dest_addr[rip], 2
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	eax, eax
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 4294967295
	cmp	rax, rdx
	jne	.L34
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L35
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L35:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, dest_addr[rip+4]
	call	memcpy@PLT
	mov	ebx, DWORD PTR datalen[rip]
	mov	eax, DWORD PTR dest_addr[rip+4]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	ecx, ebx
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L36
.L34:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR dest_addr[rip+4], rax
	mov	ebx, DWORD PTR datalen[rip]
	mov	eax, DWORD PTR dest_addr[rip+4]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	ecx, ebx
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L36:
	call	getpid@PLT
	mov	DWORD PTR pid[rip], eax
	lea	rsi, statistics[rip]
	mov	edi, 2
	call	signal@PLT
.L37:
	mov	eax, 0
	call	send_packet
	mov	eax, 0
	call	recv_packet
	mov	edi, 1
	call	sleep@PLT
	jmp	.L37
	.cfi_endproc
.LFE13:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1079574528
	.align 8
.LC5:
	.long	0
	.long	1083129856
	.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	"697915.c"
	.text
	.comm	sendpacket,4096,4
	.comm	recvpacket,4096,4
	.comm	sockfd,4,4
	.global	datalen
	.data
	.align	2
	.type	datalen, %object
	.size	datalen, 4
datalen:
	.word	56
	.global	nsend
	.bss
	.align	2
	.type	nsend, %object
	.size	nsend, 4
nsend:
	.space	4
	.global	nreceived
	.align	2
	.type	nreceived, %object
	.size	nreceived, 4
nreceived:
	.space	4
	.comm	dest_addr,16,4
	.comm	pid,4,4
	.comm	from,16,4
	.comm	tvrecv,8,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012----PING stat----\000"
	.global	__aeabi_i2f
	.global	__aeabi_f2d
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.align	2
.LC1:
	.ascii	"%d packets transmitted, %d received, %%%.2f lost\012"
	.ascii	"\000"
	.text
	.align	2
	.global	statistics
	.syntax unified
	.arm
	.fpu softvfp
	.type	statistics, %function
statistics:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	ldr	r0, .L2
	bl	puts
	ldr	r3, .L2+4
	ldr	r6, [r3]
	ldr	r3, .L2+8
	ldr	r7, [r3]
	ldr	r3, .L2+4
	ldr	r2, [r3]
	ldr	r3, .L2+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L2+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L2+12
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r7
	mov	r1, r6
	ldr	r0, .L2+16
	bl	printf
	ldr	r3, .L2+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	nsend
	.word	nreceived
	.word	1079574528
	.word	.LC1
	.word	sockfd
	.size	statistics, .-statistics
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cal_chksum
	.syntax unified
	.arm
	.fpu softvfp
	.type	cal_chksum, %function
cal_chksum:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-12]
	mov	r3, #0
	strh	r3, [fp, #-22]	@ movhi
	b	.L5
.L6:
	ldr	r3, [fp, #-12]
	add	r2, r3, #2
	str	r2, [fp, #-12]
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #2
	str	r3, [fp, #-20]
.L5:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bgt	.L6
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L7
	sub	r3, fp, #22
	ldr	r2, [fp, #-12]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldrh	r3, [fp, #-22]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
.L7:
	ldr	r3, [fp, #-16]
	asr	r2, r3, #16
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	asr	r3, r3, #16
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mvn	r3, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-22]	@ movhi
	ldrh	r3, [fp, #-22]
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC2
	.size	cal_chksum, .-cal_chksum
	.align	2
	.global	pack
	.syntax unified
	.arm
	.fpu softvfp
	.type	pack, %function
pack:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L14
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #8
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #6]	@ movhi
	ldr	r3, .L14+4
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, .L14+8
	ldr	r3, [r3]
	add	r3, r3, #28
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	str	r3, [fp, #-8]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	gettimeofday
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	cal_chksum
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	sendpacket
	.word	pid
	.word	datalen
	.size	pack, .-pack
	.section	.rodata
	.align	2
.LC3:
	.ascii	"sendto error\000"
	.text
	.align	2
	.global	send_packet
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_packet, %function
send_packet:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L19
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L19
	str	r3, [r2]
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r0, r3
	bl	pack
	str	r0, [fp, #-8]
	ldr	r3, .L19+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, #16
	str	r3, [sp, #4]
	ldr	r3, .L19+8
	str	r3, [sp]
	mov	r3, #0
	ldr	r1, .L19+12
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L19+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	nsend
	.word	sockfd
	.word	dest_addr
	.word	sendpacket
	.word	.LC3
	.size	send_packet, .-send_packet
	.align	2
	.global	tv_sub
	.syntax unified
	.arm
	.fpu softvfp
	.type	tv_sub, %function
tv_sub:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	sub	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r3, r3, #999424
	add	r3, r3, #576
	ldr	r2, [fp, #-8]
	str	r3, [r2, #4]
.L22:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	tv_sub, .-tv_sub
	.section	.rodata
	.align	2
.LC4:
	.ascii	"ICMP packets's length is less than 8\000"
	.global	__aeabi_dadd
	.align	2
.LC5:
	.ascii	"%d byte from %s: icmp_seq=%u ttl=%d time=%.3f ms\012"
	.ascii	"\000"
	.text
	.align	2
	.global	unpack
	.syntax unified
	.arm
	.fpu softvfp
	.type	unpack, %function
unpack:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]
	and	r3, r3, #15
	and	r3, r3, #255
	lsl	r3, r3, #2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #7
	bgt	.L24
	ldr	r0, .L27
	bl	puts
	mvn	r3, #0
	b	.L25
.L24:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L26
	ldr	r3, [fp, #-28]
	ldrh	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L26
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-24]
	ldr	r0, .L27+8
	bl	tv_sub
	ldr	r3, .L27+8
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L27+8
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L27+12
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, .L27+16
	ldr	r0, [r3, #4]
	bl	inet_ntoa
	mov	r1, r0
	ldr	r3, [fp, #-28]
	ldrh	r3, [r3, #6]
	mov	ip, r3
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	mov	r0, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	r0, [sp]
	mov	r3, ip
	mov	r2, r1
	ldr	r1, [fp, #-44]
	ldr	r0, .L27+20
	bl	printf
	mov	r3, #0
	b	.L25
.L26:
	mvn	r3, #0
.L25:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC4
	.word	pid
	.word	tvrecv
	.word	1083129856
	.word	from
	.word	.LC5
	.size	unpack, .-unpack
	.section	.rodata
	.align	2
.LC6:
	.ascii	"recvfrom error\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	recv_packet
	.syntax unified
	.arm
	.fpu softvfp
	.type	recv_packet, %function
recv_packet:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L40+4
	mov	r0, #14
	bl	signal
	mov	r3, #16
	str	r3, [fp, #-16]
.L35:
	mov	r0, #5
	bl	alarm
	ldr	r3, .L40+8
	ldr	r0, [r3]
	sub	r3, fp, #16
	str	r3, [sp, #4]
	ldr	r3, .L40+12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #4096
	ldr	r1, .L40+16
	bl	recvfrom
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L38
	ldr	r0, .L40+20
	bl	perror
	b	.L32
.L30:
	mov	r1, #0
	ldr	r0, .L40+24
	bl	gettimeofday
	ldr	r1, [fp, #-12]
	ldr	r0, .L40+16
	bl	unpack
	mov	r3, r0
	cmn	r3, #1
	beq	.L39
	ldr	r3, .L40+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L40+28
	str	r3, [r2]
	nop
	nop
	ldr	r3, .L40
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L36
	b	.L37
.L38:
	nop
	b	.L35
.L39:
	nop
.L32:
	b	.L35
.L37:
	bl	__stack_chk_fail
.L36:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC7
	.word	statistics
	.word	sockfd
	.word	from
	.word	recvpacket
	.word	.LC6
	.word	tvrecv
	.word	nreceived
	.size	recv_packet, .-recv_packet
	.section	.rodata
	.align	2
.LC8:
	.ascii	"usage:%s hostname/IP address\012\000"
	.align	2
.LC9:
	.ascii	"icmp\000"
	.align	2
.LC10:
	.ascii	"getprotobyname\000"
	.align	2
.LC11:
	.ascii	"socket error\000"
	.align	2
.LC12:
	.ascii	"gethostbyname error\000"
	.align	2
.LC13:
	.ascii	"PING %s (%s): %d bytes data in ICMP packets.\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L51
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #51200
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bgt	.L43
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L51+4
	bl	printf
	mov	r0, #1
	bl	exit
.L43:
	ldr	r0, .L51+8
	bl	getprotobyname
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L44
	ldr	r0, .L51+12
	bl	perror
	mov	r0, #1
	bl	exit
.L44:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r2, r3
	mov	r1, #3
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L51+16
	str	r3, [r2]
	ldr	r3, .L51+16
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L45
	ldr	r0, .L51+20
	bl	perror
	mov	r0, #1
	bl	exit
.L45:
	bl	getuid
	mov	r3, r0
	mov	r0, r3
	bl	setuid
	ldr	r3, .L51+16
	ldr	r0, [r3]
	sub	r3, fp, #28
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #8
	mov	r1, #1
	bl	setsockopt
	ldr	r3, .L51+24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	ldr	r3, .L51+24
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L46
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L47
	ldr	r0, .L51+28
	bl	perror
	mov	r0, #1
	bl	exit
.L47:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #12]
	mov	r2, r3
	ldr	r0, .L51+32
	bl	memcpy
	ldr	r3, [fp, #-20]
	ldr	r4, [r3]
	ldr	r3, .L51+24
	ldr	r0, [r3, #4]
	bl	inet_ntoa
	mov	r2, r0
	ldr	r3, .L51+36
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r0, .L51+40
	bl	printf
	b	.L48
.L46:
	ldr	r3, [fp, #-32]
	ldr	r2, .L51+24
	str	r3, [r2, #4]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r4, [r3]
	ldr	r3, .L51+24
	ldr	r0, [r3, #4]
	bl	inet_ntoa
	mov	r2, r0
	ldr	r3, .L51+36
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r0, .L51+40
	bl	printf
.L48:
	bl	getpid
	mov	r3, r0
	ldr	r2, .L51+44
	str	r3, [r2]
	ldr	r1, .L51+48
	mov	r0, #2
	bl	signal
.L49:
	bl	send_packet
	bl	recv_packet
	mov	r0, #1
	bl	sleep
	b	.L49
.L52:
	.align	2
.L51:
	.word	.LC14
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	sockfd
	.word	.LC11
	.word	dest_addr
	.word	.LC12
	.word	dest_addr+4
	.word	datalen
	.word	.LC13
	.word	pid
	.word	statistics
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
