	.file	"310475.c"
	.intel_syntax noprefix
	.text
	.type	__bswap_64, @function
__bswap_64:
.LFB2:
	.cfi_startproc
	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]
	bswap	rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	__bswap_64, .-__bswap_64
	.globl	send_sock
	.section	.rodata
	.align 16
	.type	send_sock, @object
	.size	send_sock, 20
send_sock:
	.string	"/var/run/ptp_offset"
	.globl	ptp_sock
	.align 8
	.type	ptp_sock, @object
	.size	ptp_sock, 15
ptp_sock:
	.string	"/var/run/ptp4l"
	.align 8
.LC0:
	.string	"Check Clocks verifies the state of local clocks to ensure a sane TSN configuration"
	.align 8
.LC1:
	.string	"Usage: sudo ./check_clocks -d <interface name> "
.LC2:
	.string	"Options for check_clocks are"
	.align 8
.LC3:
	.string	" -d <TSN Ethernet interface name>. This is required"
	.align 8
.LC4:
	.string	" -v Verbose - Dumps ptp timestamps and deltas"
.LC5:
	.string	" -h Help - Print the usage"
	.text
	.globl	print_usage
	.type	print_usage, @function
print_usage:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	print_usage, .-print_usage
	.type	make_process_cpuclock, @function
make_process_cpuclock:
.LFB13:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	not	eax
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	or	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	make_process_cpuclock, .-make_process_cpuclock
	.type	fd_to_clockid, @function
fd_to_clockid:
.LFB14:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 3
	mov	edi, eax
	call	make_process_cpuclock
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	fd_to_clockid, .-fd_to_clockid
	.section	.rodata
.LC6:
	.string	"%s"
.LC7:
	.string	"Couldn't open socket"
	.align 8
.LC8:
	.string	"Couldn't issue SIOCETHTOOL ioctl"
.LC9:
	.string	"/dev/ptp"
.LC10:
	.string	"%s%d"
	.align 8
.LC11:
	.string	"Couldn't open the PTP fd. Did you forget to run with sudo again?"
	.text
	.type	open_phc_fd, @function
open_phc_fd:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	DWORD PTR -80[rbp], 65
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	lea	rdx, .LC6[rip]
	mov	esi, 16
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -80[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	jns	.L9
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rdx, -128[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	esi, 35142
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	edx, DWORD PTR -72[rbp]
	lea	rax, -32[rbp]
	mov	r8d, edx
	lea	rcx, .LC9[rip]
	lea	rdx, .LC10[rip]
	mov	esi, 16
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	rdx, QWORD PTR -152[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -152[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L11
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	open_phc_fd, .-open_phc_fd
	.type	build_ptp_request, @function
build_ptp_request:
.LFB16:
	.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	eax, esi
	mov	WORD PTR -12[rbp], ax
	mov	eax, edx
	mov	BYTE PTR -16[rbp], al
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 54
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	cmp	BYTE PTR -16[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 29
	jmp	.L15
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 13
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 1[rax], 2
	mov	edi, 54
	call	htons@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	edi, 1
	call	htons@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 28[rdx], ax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 32[rax], 4
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 33[rax], 127
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 34
	mov	edx, 10
	mov	esi, 255
	mov	rdi, rax
	call	memset@PLT
	mov	edi, 1
	call	htons@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 48[rdx], ax
	mov	edi, 2
	call	htons@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 50[rdx], ax
	movzx	eax, WORD PTR -12[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 52[rdx], ax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	build_ptp_request, .-build_ptp_request
	.section	.rodata
.LC12:
	.string	"Failed to open the socket\n"
.LC13:
	.string	"Failed to bind\n"
	.text
	.type	init_sockets, @function
init_sockets:
.LFB17:
	.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	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 2050
	mov	edi, 1
	call	socket@PLT
	mov	rdx, QWORD PTR -136[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L20
.L17:
	lea	rdi, send_sock[rip]
	call	unlink@PLT
	lea	rax, -128[rbp]
	mov	edx, 110
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -128[rbp], 1
	lea	rax, -128[rbp]
	add	rax, 2
	movabs	rsi, 7959393464555238959
	movabs	rdi, 7378707495192391727
	mov	QWORD PTR [rax], rsi
	mov	QWORD PTR 8[rax], rdi
	mov	WORD PTR 16[rax], 25971
	mov	BYTE PTR 18[rax], 116
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rcx, -128[rbp]
	mov	edx, 110
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
	mov	eax, 1
	jmp	.L20
.L19:
	mov	rax, QWORD PTR -144[rbp]
	mov	edx, 110
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	WORD PTR [rax], 1
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 2
	movabs	rcx, 7959393464555238959
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 1886679087
	mov	WORD PTR 12[rax], 27700
	mov	eax, 0
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	init_sockets, .-init_sockets
	.section	.rodata
.LC14:
	.string	"poll() failed: %s\n"
.LC15:
	.string	"Incomplete response received\n"
	.align 8
.LC16:
	.string	"Failed to send PTP management packet - %s\n"
	.text
	.type	send_wait_recv, @function
send_wait_recv:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -72[rbp], r8
	mov	QWORD PTR -80[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	WORD PTR -12[rbp], 9
	mov	rdx, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r9d, 110
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jne	.L23
	lea	rax, -16[rbp]
	mov	edx, 1000
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 1
	je	.L24
	cmp	DWORD PTR -28[rbp], -1
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L25:
	mov	eax, 1
	jmp	.L28
.L24:
	mov	rdx, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, 61
	jbe	.L27
	mov	eax, 0
	jmp	.L28
.L27:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L28
.L23:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
.L28:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	send_wait_recv, .-send_wait_recv
	.type	is_port_sane, @function
is_port_sane:
.LFB19:
	.cfi_startproc
	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, BYTE PTR 64[rax]
	cmp	al, 6
	je	.L31
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 64[rax]
	cmp	al, 9
	je	.L31
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 64[rax]
	cmp	al, 10
	jne	.L32
.L31:
	mov	eax, 1
	jmp	.L33
.L32:
	mov	eax, 0
.L33:
	and	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	is_port_sane, .-is_port_sane
	.type	get_port_status, @function
get_port_status:
.LFB20:
	.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	QWORD PTR -48[rbp], rsi
	mov	BYTE PTR -17[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, WORD PTR 48[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	cmp	ax, 1
	jne	.L36
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, WORD PTR 52[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	cmp	ax, 8196
	jne	.L36
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	is_port_sane
	mov	BYTE PTR -17[rbp], al
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 64[rax]
	movzx	edx, al
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
.L36:
	movzx	eax, BYTE PTR -17[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	get_port_status, .-get_port_status
	.type	get_master_offset, @function
get_master_offset:
.LFB21:
	.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	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, WORD PTR 48[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	cmp	ax, 1
	jne	.L39
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, WORD PTR 52[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	cmp	ax, -16384
	jne	.L39
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 54[rax]
	mov	rdi, rax
	call	__bswap_64
	mov	rdx, rax
	mov	rax, rdx
	sar	rax, 63
	xor	rdx, rax
	mov	QWORD PTR -24[rbp], rdx
	sub	QWORD PTR -24[rbp], rax
.L39:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	get_master_offset, .-get_master_offset
	.section	.rodata
	.align 8
.LC17:
	.string	"PTP peer port state and/or offset are messed up !\n"
	.text
	.type	check_ptp_offset, @function
check_ptp_offset:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 416
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	BYTE PTR -405[rbp], 0
	mov	DWORD PTR -396[rbp], 1
	mov	BYTE PTR -406[rbp], 0
	mov	QWORD PTR -392[rbp], 0
	lea	rdx, -256[rbp]
	lea	rax, -404[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	init_sockets
	test	eax, eax
	je	.L42
	mov	eax, DWORD PTR -396[rbp]
	jmp	.L49
.L42:
	movzx	edx, BYTE PTR -406[rbp]
	lea	rax, -384[rbp]
	mov	esi, 8196
	mov	rdi, rax
	call	build_ptp_request
	mov	eax, DWORD PTR -404[rbp]
	lea	rcx, -144[rbp]
	lea	rdx, -384[rbp]
	lea	rsi, -256[rbp]
	mov	r9d, 128
	mov	r8, rcx
	mov	ecx, 54
	mov	edi, eax
	call	send_wait_recv
	cmp	eax, 1
	jne	.L44
	mov	BYTE PTR -406[rbp], 1
	movzx	edx, BYTE PTR -406[rbp]
	lea	rax, -384[rbp]
	mov	esi, 8196
	mov	rdi, rax
	call	build_ptp_request
	mov	eax, DWORD PTR -404[rbp]
	lea	rcx, -144[rbp]
	lea	rdx, -384[rbp]
	lea	rsi, -256[rbp]
	mov	r9d, 128
	mov	r8, rcx
	mov	ecx, 54
	mov	edi, eax
	call	send_wait_recv
	cmp	eax, 1
	je	.L51
.L44:
	lea	rdx, -400[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	get_port_status
	mov	BYTE PTR -405[rbp], al
	mov	eax, DWORD PTR -400[rbp]
	cmp	eax, 9
	jne	.L46
	movzx	edx, BYTE PTR -406[rbp]
	lea	rax, -320[rbp]
	mov	esi, 49152
	mov	rdi, rax
	call	build_ptp_request
	mov	eax, DWORD PTR -404[rbp]
	lea	rcx, -144[rbp]
	lea	rdx, -320[rbp]
	lea	rsi, -256[rbp]
	mov	r9d, 128
	mov	r8, rcx
	mov	ecx, 54
	mov	edi, eax
	call	send_wait_recv
	cmp	eax, 1
	je	.L52
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	get_master_offset
	mov	QWORD PTR -392[rbp], rax
.L46:
	cmp	BYTE PTR -405[rbp], 0
	je	.L48
	cmp	QWORD PTR -392[rbp], 100
	jg	.L48
	mov	DWORD PTR -396[rbp], 0
	jmp	.L45
.L48:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 50
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	jmp	.L45
.L51:
	nop
	jmp	.L45
.L52:
	nop
.L45:
	mov	eax, DWORD PTR -404[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -396[rbp]
.L49:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	check_ptp_offset, .-check_ptp_offset
	.section	.rodata
.LC18:
	.string	"rt tstamp:\t%lu\n"
.LC19:
	.string	"tai tstamp:\t%lu\n"
.LC20:
	.string	"phc tstamp:\t%lu\n"
.LC21:
	.string	"rt latency:\t%lu\n"
.LC22:
	.string	"tai latency:\t%lu\n"
.LC23:
	.string	"phc latency:\t%lu\n"
.LC24:
	.string	"phc-rt delta:\t%ld\n"
.LC25:
	.string	"phc-tai delta:\t%ld\n\n"
.LC26:
	.string	"phc-rt delta is not %d sec !\n"
	.align 8
.LC27:
	.string	"phc-tai delta is greater than 50 usec !\n"
.LC28:
	.string	"adjtimex() failed: %s\n"
	.align 8
.LC29:
	.string	"TAI offset set in kernel is not correct !\n"
	.text
	.type	check_local_clock, @function
check_local_clock:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 416
	mov	QWORD PTR -408[rbp], rdi
	mov	DWORD PTR -412[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -224[rbp]
	mov	eax, 0
	mov	ecx, 26
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -388[rbp], 0
	mov	rdx, QWORD PTR -408[rbp]
	lea	rax, -392[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	open_phc_fd
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	lea	rax, -256[rbp]
	mov	rsi, rax
	mov	edi, 11
	call	clock_gettime@PLT
	mov	eax, DWORD PTR -392[rbp]
	mov	edi, eax
	call	fd_to_clockid
	mov	edx, eax
	lea	rax, -288[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -320[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -312[rbp]
	add	rax, rdx
	mov	QWORD PTR -384[rbp], rax
	mov	rax, QWORD PTR -256[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -248[rbp]
	add	rax, rdx
	mov	QWORD PTR -376[rbp], rax
	mov	rax, QWORD PTR -288[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -280[rbp]
	add	rax, rdx
	mov	QWORD PTR -368[rbp], rax
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	lea	rax, -304[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -304[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -296[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -320[rbp]
	imul	rcx, rax, 1000000000
	mov	rax, QWORD PTR -312[rbp]
	add	rcx, rax
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -360[rbp], rax
	lea	rax, -256[rbp]
	mov	rsi, rax
	mov	edi, 11
	call	clock_gettime@PLT
	lea	rax, -240[rbp]
	mov	rsi, rax
	mov	edi, 11
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -240[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -232[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -256[rbp]
	imul	rcx, rax, 1000000000
	mov	rax, QWORD PTR -248[rbp]
	add	rcx, rax
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -352[rbp], rax
	mov	eax, DWORD PTR -392[rbp]
	mov	edi, eax
	call	fd_to_clockid
	mov	edx, eax
	lea	rax, -288[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	clock_gettime@PLT
	mov	eax, DWORD PTR -392[rbp]
	mov	edi, eax
	call	fd_to_clockid
	mov	edx, eax
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -272[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -264[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -288[rbp]
	imul	rcx, rax, 1000000000
	mov	rax, QWORD PTR -280[rbp]
	add	rcx, rax
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -344[rbp], rax
	mov	rax, QWORD PTR -368[rbp]
	sub	rax, QWORD PTR -384[rbp]
	mov	QWORD PTR -336[rbp], rax
	mov	rax, QWORD PTR -368[rbp]
	sub	rax, QWORD PTR -376[rbp]
	mov	QWORD PTR -328[rbp], rax
	cmp	DWORD PTR -412[rbp], 0
	je	.L54
	mov	rax, QWORD PTR -384[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -376[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -368[rbp]
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -360[rbp]
	mov	rsi, rax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -352[rbp]
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -344[rbp]
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -336[rbp]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
.L54:
	movabs	rdx, -37000000000
	mov	rax, QWORD PTR -336[rbp]
	add	rax, rdx
	cqo
	xor	rax, rdx
	sub	rax, rdx
	cmp	rax, 49999
	jle	.L55
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 37
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -388[rbp], 1
.L55:
	mov	rax, QWORD PTR -328[rbp]
	cqo
	mov	rax, rdx
	xor	rax, QWORD PTR -328[rbp]
	sub	rax, rdx
	cmp	rax, 50000
	jle	.L56
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC27[rip]
	call	fwrite@PLT
	mov	DWORD PTR -388[rbp], 1
.L56:
	lea	rax, -224[rbp]
	mov	rdi, rax
	call	adjtimex@PLT
	cmp	eax, -1
	jne	.L57
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -388[rbp], 1
.L57:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, 37
	je	.L58
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC29[rip]
	call	fwrite@PLT
	mov	DWORD PTR -388[rbp], 1
.L58:
	mov	eax, DWORD PTR -392[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -388[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	check_local_clock, .-check_local_clock
	.section	.rodata
.LC30:
	.string	"dev"
.LC31:
	.string	"verbose"
.LC32:
	.string	"help"
	.align 8
.LC33:
	.string	"Dumping timestamps and deltas\n"
	.align 8
.LC34:
	.string	"option -%c requires an argument !\n"
.LC35:
	.string	"option '-%c' is invalid !\n"
.LC36:
	.string	":d:hv"
.LC37:
	.string	"Interface name is required\n"
	.align 8
.LC38:
	.string	"Clocks on this system are synchronized :)"
	.align 8
.LC39:
	.string	"Please verify ptp4l and phc config and restart them if necessary to synchronize the clocks !\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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, 200
	.cfi_offset 3, -24
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -184[rbp], 0
	lea	rdx, -176[rbp]
	mov	eax, 0
	mov	ecx, 16
	mov	rdi, rdx
	rep stosq
	lea	rax, .LC30[rip]
	mov	QWORD PTR -176[rbp], rax
	mov	DWORD PTR -168[rbp], 1
	mov	DWORD PTR -152[rbp], 100
	lea	rax, .LC31[rip]
	mov	QWORD PTR -144[rbp], rax
	lea	rax, -184[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	DWORD PTR -120[rbp], 1
	lea	rax, .LC32[rip]
	mov	QWORD PTR -112[rbp], rax
	mov	DWORD PTR -88[rbp], 104
	jmp	.L62
.L70:
	cmp	DWORD PTR -180[rbp], 118
	je	.L63
	cmp	DWORD PTR -180[rbp], 118
	jg	.L64
	cmp	DWORD PTR -180[rbp], 104
	je	.L65
	cmp	DWORD PTR -180[rbp], 104
	jg	.L64
	cmp	DWORD PTR -180[rbp], 100
	je	.L66
	cmp	DWORD PTR -180[rbp], 100
	jg	.L64
	cmp	DWORD PTR -180[rbp], 0
	je	.L62
	cmp	DWORD PTR -180[rbp], 58
	je	.L68
	jmp	.L64
.L66:
	mov	rcx, QWORD PTR optarg[rip]
	lea	rax, -48[rbp]
	mov	edx, 15
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	jmp	.L62
.L63:
	mov	DWORD PTR -184[rbp], 1
	lea	rdi, .LC33[rip]
	call	puts@PLT
	jmp	.L62
.L65:
	call	print_usage
	mov	eax, 0
	jmp	.L74
.L68:
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC34[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L74
.L64:
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	print_usage
	mov	eax, 1
	jmp	.L74
.L62:
	lea	rdx, -176[rbp]
	mov	rsi, QWORD PTR -208[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	lea	rdx, .LC36[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L70
	movzx	eax, BYTE PTR -48[rbp]
	test	al, al
	jne	.L71
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC37[rip]
	call	fwrite@PLT
	call	print_usage
	mov	eax, 1
	jmp	.L74
.L71:
	mov	edx, DWORD PTR -184[rbp]
	lea	rax, -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	check_local_clock
	mov	ebx, eax
	call	check_ptp_offset
	or	eax, ebx
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L72
	lea	rdi, .LC38[rip]
	call	puts@PLT
	jmp	.L73
.L72:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 93
	mov	esi, 1
	lea	rdi, .LC39[rip]
	call	fwrite@PLT
.L73:
	mov	eax, DWORD PTR -180[rbp]
.L74:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L75
	call	__stack_chk_fail@PLT
.L75:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.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	"310475.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__bswap_64, %function
__bswap_64:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, fp}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r2, [fp, #-20]
	eor	r3, r2, r2, ror #16
	lsr	r3, r3, #8
	ror	r2, r2, #8
	bic	r3, r3, #65280
	eor	r1, r2, r3
	ldr	r2, [fp, #-16]
	eor	r3, r2, r2, ror #16
	lsr	r3, r3, #8
	ror	r2, r2, #8
	bic	r3, r3, #65280
	eor	r3, r3, r2
	mov	r4, r3
	mov	r5, r1
	mov	r2, r4
	mov	r3, r5
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, r5, fp}
	bx	lr
	.size	__bswap_64, .-__bswap_64
	.global	send_sock
	.section	.rodata
	.align	2
	.type	send_sock, %object
	.size	send_sock, 20
send_sock:
	.ascii	"/var/run/ptp_offset\000"
	.global	ptp_sock
	.align	2
	.type	ptp_sock, %object
	.size	ptp_sock, 15
ptp_sock:
	.ascii	"/var/run/ptp4l\000"
	.align	2
.LC0:
	.ascii	"Check Clocks verifies the state of local clocks to "
	.ascii	"ensure a sane TSN configuration\000"
	.align	2
.LC1:
	.ascii	"Usage: sudo ./check_clocks -d <interface name> \000"
	.align	2
.LC2:
	.ascii	"Options for check_clocks are\000"
	.align	2
.LC3:
	.ascii	" -d <TSN Ethernet interface name>. This is required"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	" -v Verbose - Dumps ptp timestamps and deltas\000"
	.align	2
.LC5:
	.ascii	" -h Help - Print the usage\000"
	.text
	.align	2
	.global	print_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage, %function
print_usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L4
	bl	puts
	ldr	r0, .L4+4
	bl	puts
	ldr	r0, .L4+8
	bl	puts
	ldr	r0, .L4+12
	bl	puts
	ldr	r0, .L4+16
	bl	puts
	ldr	r0, .L4+20
	bl	puts
	nop
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	print_usage, .-print_usage
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_process_cpuclock, %function
make_process_cpuclock:
	@ 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]
	mvn	r3, r3
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	orr	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	make_process_cpuclock, .-make_process_cpuclock
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fd_to_clockid, %function
fd_to_clockid:
	@ 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]
	mov	r1, #3
	mov	r0, r3
	bl	make_process_cpuclock
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fd_to_clockid, .-fd_to_clockid
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.ascii	"Couldn't open socket\000"
	.align	2
.LC8:
	.ascii	"Couldn't issue SIOCETHTOOL ioctl\000"
	.align	2
.LC9:
	.ascii	"/dev/ptp\000"
	.align	2
.LC10:
	.ascii	"%s%d\000"
	.align	2
.LC11:
	.ascii	"Couldn't open the PTP fd. Did you forget to run wit"
	.ascii	"h sudo again?\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_phc_fd, %function
open_phc_fd:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, #44
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #100
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #65
	str	r3, [fp, #-68]
	sub	r0, fp, #100
	ldr	r3, [fp, #-116]
	ldr	r2, .L15+4
	mov	r1, #16
	bl	snprintf
	sub	r3, fp, #68
	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	.L11
	ldr	r0, .L15+8
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	sub	r3, fp, #100
	mov	r2, r3
	ldr	r1, .L15+12
	ldr	r0, [fp, #-104]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L15+16
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-60]
	sub	r0, fp, #24
	str	r3, [sp]
	ldr	r3, .L15+20
	ldr	r2, .L15+24
	mov	r1, #16
	bl	snprintf
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-112]
	str	r2, [r3]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L15+28
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r0, [fp, #-104]
	bl	close
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC12
	.word	.LC6
	.word	.LC7
	.word	35142
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	open_phc_fd, .-open_phc_fd
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_ptp_request, %function
build_ptp_request:
	@ 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]
	mov	r3, r1
	strh	r3, [fp, #-10]	@ movhi
	mov	r3, r2
	strb	r3, [fp, #-11]
	mov	r2, #54
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	ldrb	r3, [fp, #-11]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-8]
	mov	r2, #29
	strb	r2, [r3]
	b	.L19
.L18:
	ldr	r3, [fp, #-8]
	mov	r2, #13
	strb	r2, [r3]
.L19:
	ldr	r3, [fp, #-8]
	mov	r2, #2
	strb	r2, [r3, #1]
	mov	r0, #54
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #2]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #3]
	mov	r0, #1
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #28]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #29]
	ldr	r3, [fp, #-8]
	mov	r2, #4
	strb	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	mov	r2, #127
	strb	r2, [r3, #33]
	ldr	r3, [fp, #-8]
	add	r3, r3, #34
	mov	r2, #10
	mov	r1, #255
	mov	r0, r3
	bl	memset
	mov	r0, #1
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #48]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #49]
	mov	r0, #2
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #50]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #51]
	ldrh	r3, [fp, #-10]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #52]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #53]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	build_ptp_request, .-build_ptp_request
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Failed to open the socket\012\000"
	.align	2
.LC14:
	.ascii	"Failed to bind\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_sockets, %function
init_sockets:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	ldr	r1, .L26+4
	mov	r0, #1
	bl	socket
	mov	r2, r0
	ldr	r3, [fp, #-128]
	str	r2, [r3]
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L21
	ldr	r3, .L26+8
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L26+12
	bl	fwrite
	mov	r3, #1
	b	.L24
.L21:
	ldr	r0, .L26+16
	bl	unlink
	sub	r3, fp, #120
	mov	r2, #110
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	strh	r3, [fp, #-120]	@ movhi
	sub	r3, fp, #120
	add	r3, r3, #2
	ldr	r2, .L26+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #19
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	sub	r1, fp, #120
	mov	r2, #110
	mov	r0, r3
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L23
	ldr	r3, .L26+8
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L26+20
	bl	fwrite
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, #1
	b	.L24
.L23:
	mov	r2, #110
	mov	r1, #0
	ldr	r0, [fp, #-132]
	bl	memset
	ldr	r3, [fp, #-132]
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-132]
	add	r3, r3, #2
	ldr	r2, .L26+24
	mov	r0, r3
	mov	r1, r2
	mov	r3, #14
	mov	r2, r3
	bl	memcpy
	mov	r3, #0
.L24:
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC15
	.word	2050
	.word	stderr
	.word	.LC13
	.word	send_sock
	.word	.LC14
	.word	ptp_sock
	.size	init_sockets, .-init_sockets
	.section	.rodata
	.align	2
.LC16:
	.ascii	"poll() failed: %s\012\000"
	.align	2
.LC17:
	.ascii	"Incomplete response received\012\000"
	.align	2
.LC18:
	.ascii	"Failed to send PTP management packet - %s\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_wait_recv, %function
send_wait_recv:
	@ args = 8, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-56]
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-24]
	mov	r3, #9
	strh	r3, [fp, #-20]	@ movhi
	ldr	r2, [fp, #-52]
	mov	r3, #110
	str	r3, [sp, #4]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	mov	r3, #0
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	sendto
	str	r0, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bne	.L29
	sub	r3, fp, #24
	mov	r2, #1000
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	beq	.L30
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L31
	ldr	r3, .L36+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L36+8
	mov	r0, r4
	bl	fprintf
.L31:
	mov	r3, #1
	b	.L34
.L30:
	ldr	r3, [fp, #8]
	mov	r2, r3
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-40]
	bl	read
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #61
	bls	.L33
	mov	r3, #0
	b	.L34
.L33:
	ldr	r3, .L36+4
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L36+12
	bl	fwrite
	mov	r3, #1
	b	.L34
.L29:
	ldr	r3, .L36+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L36+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
.L34:
	ldr	r2, .L36
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC19
	.word	stderr
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	send_wait_recv, .-send_wait_recv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_port_sane, %function
is_port_sane:
	@ 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]
	ldrb	r3, [r3, #64]	@ zero_extendqisi2
	cmp	r3, #6
	beq	.L39
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #64]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L39
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #64]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L40
.L39:
	mov	r3, #1
	b	.L41
.L40:
	mov	r3, #0
.L41:
	and	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_port_sane, .-is_port_sane
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_port_status, %function
get_port_status:
	@ 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]
	str	r1, [fp, #-28]
	mov	r3, #0
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #48]	@ zero_extendqisi2
	ldrb	r3, [r3, #49]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	cmp	r3, #1
	bne	.L44
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #52]	@ zero_extendqisi2
	ldrb	r3, [r3, #53]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L46
	cmp	r2, r3
	bne	.L44
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	is_port_sane
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #64]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
.L44:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	8196
	.size	get_port_status, .-get_port_status
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_master_offset, %function
get_master_offset:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #24
	str	r0, [fp, #-48]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	ldrb	r2, [r3, #48]	@ zero_extendqisi2
	ldrb	r3, [r3, #49]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	cmp	r3, #1
	bne	.L49
	ldr	r3, [fp, #-44]
	ldrb	r2, [r3, #52]	@ zero_extendqisi2
	ldrb	r3, [r3, #53]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	cmp	r3, #49152
	bne	.L49
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	ldrb	r2, [r3, #54]	@ zero_extendqisi2
	ldrb	r1, [r3, #55]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r1, [r3, #56]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r2, r1, r2
	ldrb	r1, [r3, #57]	@ zero_extendqisi2
	lsl	r1, r1, #24
	orr	r2, r1, r2
	mov	r8, r2
	ldrb	r2, [r3, #58]	@ zero_extendqisi2
	ldrb	r1, [r3, #59]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r1, [r3, #60]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r2, r1, r2
	ldrb	r3, [r3, #61]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r2
	mov	r9, r3
	mov	r2, r8
	mov	r3, r9
	mov	r0, r2
	mov	r1, r3
	bl	__bswap_64
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	asr	r2, r1, #31
	asr	r3, r1, #31
	eor	r4, r2, r0
	eor	r5, r3, r1
	subs	r6, r4, r2
	sbc	r7, r5, r3
	str	r6, [fp, #-36]
	str	r7, [fp, #-32]
.L49:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
	.size	get_master_offset, .-get_master_offset
	.section	.rodata
	.align	2
.LC20:
	.ascii	"PTP peer port state and/or offset are messed up !\012"
	.ascii	"\000"
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_ptp_offset, %function
check_ptp_offset:
	@ args = 0, pretend = 0, frame = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #392
	ldr	r3, .L63
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-136]
	sub	r3, fp, #132
	mov	r2, #124
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	strb	r3, [fp, #-385]
	mov	r3, #1
	str	r3, [fp, #-376]
	mov	r3, #0
	strb	r3, [fp, #-386]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-372]
	str	r3, [fp, #-368]
	sub	r2, fp, #248
	sub	r3, fp, #384
	mov	r1, r2
	mov	r0, r3
	bl	init_sockets
	mov	r3, r0
	cmp	r3, #0
	beq	.L52
	ldr	r3, [fp, #-376]
	b	.L59
.L52:
	ldrb	r2, [fp, #-386]	@ zero_extendqisi2
	sub	r3, fp, #360
	ldr	r1, .L63+4
	mov	r0, r3
	bl	build_ptp_request
	ldr	r0, [fp, #-384]
	sub	r2, fp, #360
	sub	r1, fp, #248
	mov	r3, #128
	str	r3, [sp, #4]
	sub	r3, fp, #136
	str	r3, [sp]
	mov	r3, #54
	bl	send_wait_recv
	mov	r3, r0
	cmp	r3, #1
	bne	.L54
	mov	r3, #1
	strb	r3, [fp, #-386]
	ldrb	r2, [fp, #-386]	@ zero_extendqisi2
	sub	r3, fp, #360
	ldr	r1, .L63+4
	mov	r0, r3
	bl	build_ptp_request
	ldr	r0, [fp, #-384]
	sub	r2, fp, #360
	sub	r1, fp, #248
	mov	r3, #128
	str	r3, [sp, #4]
	sub	r3, fp, #136
	str	r3, [sp]
	mov	r3, #54
	bl	send_wait_recv
	mov	r3, r0
	cmp	r3, #1
	beq	.L61
.L54:
	sub	r2, fp, #380
	sub	r3, fp, #136
	mov	r1, r2
	mov	r0, r3
	bl	get_port_status
	mov	r3, r0
	strb	r3, [fp, #-385]
	ldr	r3, [fp, #-380]
	cmp	r3, #9
	bne	.L56
	ldrb	r2, [fp, #-386]	@ zero_extendqisi2
	sub	r3, fp, #304
	mov	r1, #49152
	mov	r0, r3
	bl	build_ptp_request
	ldr	r0, [fp, #-384]
	sub	r2, fp, #304
	sub	r1, fp, #248
	mov	r3, #128
	str	r3, [sp, #4]
	sub	r3, fp, #136
	str	r3, [sp]
	mov	r3, #54
	bl	send_wait_recv
	mov	r3, r0
	cmp	r3, #1
	beq	.L62
	sub	r3, fp, #136
	mov	r0, r3
	bl	get_master_offset
	str	r0, [fp, #-372]
	str	r1, [fp, #-368]
.L56:
	ldrb	r3, [fp, #-385]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L58
	sub	r3, fp, #372
	ldmia	r3, {r2-r3}
	cmp	r2, #101
	sbcs	r3, r3, #0
	bge	.L58
	mov	r3, #0
	str	r3, [fp, #-376]
	b	.L55
.L58:
	ldr	r3, .L63+8
	ldr	r3, [r3]
	mov	r2, #50
	mov	r1, #1
	ldr	r0, .L63+12
	bl	fwrite
	b	.L55
.L61:
	nop
	b	.L55
.L62:
	nop
.L55:
	ldr	r3, [fp, #-384]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-376]
.L59:
	ldr	r2, .L63
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	.LC21
	.word	8196
	.word	stderr
	.word	.LC20
	.size	check_ptp_offset, .-check_ptp_offset
	.section	.rodata
	.align	2
.LC22:
	.ascii	"rt tstamp:\011%lu\012\000"
	.align	2
.LC23:
	.ascii	"tai tstamp:\011%lu\012\000"
	.align	2
.LC24:
	.ascii	"phc tstamp:\011%lu\012\000"
	.align	2
.LC25:
	.ascii	"rt latency:\011%lu\012\000"
	.align	2
.LC26:
	.ascii	"tai latency:\011%lu\012\000"
	.align	2
.LC27:
	.ascii	"phc latency:\011%lu\012\000"
	.align	2
.LC28:
	.ascii	"phc-rt delta:\011%ld\012\000"
	.align	2
.LC29:
	.ascii	"phc-tai delta:\011%ld\012\012\000"
	.align	2
.LC30:
	.ascii	"phc-rt delta is not %d sec !\012\000"
	.align	2
.LC31:
	.ascii	"phc-tai delta is greater than 50 usec !\012\000"
	.align	2
.LC32:
	.ascii	"adjtimex() failed: %s\012\000"
	.align	2
.LC33:
	.ascii	"TAI offset set in kernel is not correct !\012\000"
	.align	2
.LC34:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_local_clock, %function
check_local_clock:
	@ args = 0, pretend = 0, frame = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #384
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L73+8
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r0, fp, #160
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-280]
	sub	r3, fp, #284
	ldr	r1, [fp, #-288]
	mov	r0, r3
	bl	open_phc_fd
	sub	r3, fp, #208
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	sub	r3, fp, #176
	mov	r1, r3
	mov	r0, #11
	bl	clock_gettime
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	fd_to_clockid
	mov	r2, r0
	sub	r3, fp, #192
	mov	r1, r3
	mov	r0, r2
	bl	clock_gettime
	ldr	r3, [fp, #-208]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-204]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-300]
	adc	r3, r5, r3
	str	r3, [fp, #-296]
	sub	r4, fp, #300
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-276]
	str	r4, [fp, #-272]
	ldr	r3, [fp, #-176]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-172]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-308]
	adc	r3, r5, r3
	str	r3, [fp, #-304]
	sub	r4, fp, #308
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-268]
	str	r4, [fp, #-264]
	ldr	r3, [fp, #-192]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-188]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-316]
	adc	r3, r5, r3
	str	r3, [fp, #-312]
	sub	r4, fp, #316
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-260]
	str	r4, [fp, #-256]
	sub	r3, fp, #208
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	sub	r3, fp, #200
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r3, [fp, #-200]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-196]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-324]
	adc	r3, r5, r3
	str	r3, [fp, #-320]
	ldr	r3, [fp, #-208]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-204]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-332]
	adc	r3, r5, r3
	str	r3, [fp, #-328]
	sub	r2, fp, #324
	ldmia	r2, {r1-r2}
	mov	r0, r1
	sub	r4, fp, #332
	ldmia	r4, {r3-r4}
	mov	ip, r3
	subs	r0, r0, ip
	str	r0, [fp, #-340]
	mov	r3, r4
	sbc	r3, r2, r3
	str	r3, [fp, #-336]
	sub	r4, fp, #340
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-252]
	str	r4, [fp, #-248]
	sub	r3, fp, #176
	mov	r1, r3
	mov	r0, #11
	bl	clock_gettime
	sub	r3, fp, #168
	mov	r1, r3
	mov	r0, #11
	bl	clock_gettime
	ldr	r3, [fp, #-168]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-164]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-348]
	adc	r3, r5, r3
	str	r3, [fp, #-344]
	ldr	r3, [fp, #-176]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-172]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-356]
	adc	r3, r5, r3
	str	r3, [fp, #-352]
	sub	r2, fp, #348
	ldmia	r2, {r1-r2}
	mov	r0, r1
	sub	r4, fp, #356
	ldmia	r4, {r3-r4}
	mov	ip, r3
	subs	r0, r0, ip
	str	r0, [fp, #-364]
	mov	r3, r4
	sbc	r3, r2, r3
	str	r3, [fp, #-360]
	sub	r4, fp, #364
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-244]
	str	r4, [fp, #-240]
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	fd_to_clockid
	mov	r2, r0
	sub	r3, fp, #192
	mov	r1, r3
	mov	r0, r2
	bl	clock_gettime
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	fd_to_clockid
	mov	r2, r0
	sub	r3, fp, #184
	mov	r1, r3
	mov	r0, r2
	bl	clock_gettime
	ldr	r3, [fp, #-184]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-180]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-372]
	adc	r3, r5, r3
	str	r3, [fp, #-368]
	ldr	r3, [fp, #-192]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L73+12
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	r2, r2, r3
	ldr	r3, .L73+12
	umull	r4, r5, r0, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-188]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r1, r4, r2
	str	r1, [fp, #-380]
	adc	r3, r5, r3
	str	r3, [fp, #-376]
	sub	r2, fp, #372
	ldmia	r2, {r1-r2}
	mov	r0, r1
	sub	r4, fp, #380
	ldmia	r4, {r3-r4}
	mov	ip, r3
	subs	r0, r0, ip
	str	r0, [fp, #-388]
	mov	r3, r4
	sbc	r3, r2, r3
	str	r3, [fp, #-384]
	sub	r4, fp, #388
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-236]
	str	r4, [fp, #-232]
	sub	r1, fp, #260
	ldmia	r1, {r0-r1}
	sub	r3, fp, #276
	ldmia	r3, {r2-r3}
	subs	ip, r0, r2
	str	ip, [fp, #-396]
	sbc	r3, r1, r3
	str	r3, [fp, #-392]
	sub	r4, fp, #396
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-228]
	str	r4, [fp, #-224]
	sub	r1, fp, #260
	ldmia	r1, {r0-r1}
	sub	r3, fp, #268
	ldmia	r3, {r2-r3}
	subs	ip, r0, r2
	str	ip, [fp, #-404]
	sbc	r3, r1, r3
	str	r3, [fp, #-400]
	sub	r4, fp, #404
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-220]
	str	r4, [fp, #-216]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	beq	.L66
	sub	r3, fp, #276
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+16
	bl	printf
	sub	r3, fp, #268
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+20
	bl	printf
	sub	r3, fp, #260
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+24
	bl	printf
	sub	r3, fp, #252
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+28
	bl	printf
	sub	r3, fp, #244
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+32
	bl	printf
	sub	r3, fp, #236
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+36
	bl	printf
	sub	r3, fp, #228
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+40
	bl	printf
	sub	r3, fp, #220
	ldmia	r3, {r2-r3}
	ldr	r0, .L73+44
	bl	printf
.L66:
	sub	r3, fp, #228
	ldmia	r3, {r2-r3}
	adr	r1, .L73
	ldmia	r1, {r0-r1}
	adds	ip, r2, r0
	str	ip, [fp, #-412]
	adc	r3, r3, r1
	str	r3, [fp, #-408]
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #412
	ldmia	r1, {r0-r1}
	mov	ip, r1
	asr	r2, ip, #31
	mov	ip, r1
	asr	r3, ip, #31
	mov	ip, r0
	eor	r8, r2, ip
	eor	r1, r1, r3
	mov	r9, r1
	subs	r8, r8, r2
	sbc	r9, r9, r3
	ldr	r2, .L73+48
	mov	r3, #0
	cmp	r2, r8
	sbcs	r3, r3, r9
	bge	.L67
	ldr	r3, .L73+52
	ldr	r3, [r3]
	mov	r2, #37
	ldr	r1, .L73+56
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-280]
.L67:
	sub	r1, fp, #220
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	asr	r2, r1, #31
	asr	r3, r1, #31
	sub	r1, fp, #220
	ldmia	r1, {r0-r1}
	eor	r6, r2, r0
	eor	r7, r3, r1
	subs	r6, r6, r2
	sbc	r7, r7, r3
	ldr	r2, .L73+60
	mov	r3, #0
	cmp	r2, r6
	sbcs	r3, r3, r7
	bge	.L68
	ldr	r3, .L73+52
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L73+64
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-280]
.L68:
	sub	r3, fp, #160
	mov	r0, r3
	bl	adjtimex
	mov	r3, r0
	cmn	r3, #1
	bne	.L69
	ldr	r3, .L73+52
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L73+68
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-280]
.L69:
	ldr	r3, [fp, #-80]
	cmp	r3, #37
	beq	.L70
	ldr	r3, .L73+52
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L73+72
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-280]
.L70:
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-280]
	ldr	r2, .L73+8
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L72
	bl	__stack_chk_fail
.L72:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L74:
	.align	3
.L73:
	.word	1654705664
	.word	-9
	.word	.LC34
	.word	1000000000
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	49999
	.word	stderr
	.word	.LC30
	.word	50000
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.size	check_local_clock, .-check_local_clock
	.section	.rodata
	.align	2
.LC35:
	.ascii	"dev\000"
	.align	2
.LC36:
	.ascii	"verbose\000"
	.align	2
.LC37:
	.ascii	"help\000"
	.align	2
.LC38:
	.ascii	"Dumping timestamps and deltas\012\000"
	.align	2
.LC39:
	.ascii	"option -%c requires an argument !\012\000"
	.align	2
.LC40:
	.ascii	"option '-%c' is invalid !\012\000"
	.align	2
.LC41:
	.ascii	":d:hv\000"
	.align	2
.LC42:
	.ascii	"Interface name is required\012\000"
	.align	2
.LC43:
	.ascii	"Clocks on this system are synchronized :)\000"
	.align	2
.LC44:
	.ascii	"Please verify ptp4l and phc config and restart them"
	.ascii	" if necessary to synchronize the clocks !\012\000"
	.align	2
.LC45:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #116
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L90
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	sub	r3, fp, #28
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	mov	r3, #0
	str	r3, [fp, #-104]
	sub	r3, fp, #96
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L90+4
	str	r3, [fp, #-96]
	mov	r3, #1
	str	r3, [fp, #-92]
	mov	r3, #100
	str	r3, [fp, #-84]
	ldr	r3, .L90+8
	str	r3, [fp, #-80]
	sub	r3, fp, #104
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-68]
	ldr	r3, .L90+12
	str	r3, [fp, #-64]
	mov	r3, #104
	str	r3, [fp, #-52]
	b	.L76
.L84:
	ldr	r3, [fp, #-100]
	cmp	r3, #118
	beq	.L77
	ldr	r3, [fp, #-100]
	cmp	r3, #118
	bgt	.L78
	ldr	r3, [fp, #-100]
	cmp	r3, #104
	beq	.L79
	ldr	r3, [fp, #-100]
	cmp	r3, #104
	bgt	.L78
	ldr	r3, [fp, #-100]
	cmp	r3, #100
	beq	.L80
	ldr	r3, [fp, #-100]
	cmp	r3, #100
	bgt	.L78
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	beq	.L76
	ldr	r3, [fp, #-100]
	cmp	r3, #58
	beq	.L82
	b	.L78
.L80:
	ldr	r3, .L90+16
	ldr	r1, [r3]
	sub	r3, fp, #32
	mov	r2, #15
	mov	r0, r3
	bl	strncpy
	b	.L76
.L77:
	mov	r3, #1
	str	r3, [fp, #-104]
	ldr	r0, .L90+20
	bl	puts
	b	.L76
.L79:
	bl	print_usage
	mov	r3, #0
	b	.L88
.L82:
	ldr	r3, .L90+24
	ldr	r3, [r3]
	ldr	r2, .L90+28
	ldr	r2, [r2]
	ldr	r1, .L90+32
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L88
.L78:
	ldr	r3, .L90+24
	ldr	r3, [r3]
	ldr	r2, .L90+28
	ldr	r2, [r2]
	ldr	r1, .L90+36
	mov	r0, r3
	bl	fprintf
	bl	print_usage
	mov	r3, #1
	b	.L88
.L76:
	sub	r3, fp, #96
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, .L90+40
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	getopt_long
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmn	r3, #1
	bne	.L84
	ldrb	r3, [fp, #-32]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L85
	ldr	r3, .L90+24
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L90+44
	bl	fwrite
	bl	print_usage
	mov	r3, #1
	b	.L88
.L85:
	ldr	r2, [fp, #-104]
	sub	r3, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	check_local_clock
	mov	r4, r0
	bl	check_ptp_offset
	mov	r3, r0
	orr	r3, r4, r3
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L86
	ldr	r0, .L90+48
	bl	puts
	b	.L87
.L86:
	ldr	r3, .L90+24
	ldr	r3, [r3]
	mov	r2, #93
	mov	r1, #1
	ldr	r0, .L90+52
	bl	fwrite
.L87:
	ldr	r3, [fp, #-100]
.L88:
	ldr	r2, .L90
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L89
	bl	__stack_chk_fail
.L89:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L91:
	.align	2
.L90:
	.word	.LC45
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	optarg
	.word	.LC38
	.word	stderr
	.word	optopt
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
