	.file	"extr_ntpdate.c_clock_filter.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clock_filter, @function
clock_filter:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbx
	sub	rsp, 16
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR NTP_SHIFT[rip]
	mov	rbx, rsp
	mov	rcx, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L45:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L45
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L46
.L4:
	mov	eax, DWORD PTR sys_samples[rip]
	lea	rbx, 3[rsp]
	mov	r13, rbx
	and	rbx, -4
	shr	r13, 2
	cmp	eax, ecx
	setle	dl
	xor	edi, edi
	test	eax, eax
	setg	dil
	and	edi, edx
	call	INSIST@PLT
	mov	r10d, DWORD PTR sys_samples[rip]
	xor	eax, eax
	lea	ecx, -1[r10]
	test	r10d, r10d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, rax
	mov	DWORD PTR [rbx+rax*4], eax
	add	rax, 1
	cmp	rcx, rdx
	jne	.L8
.L9:
	mov	r8, QWORD PTR [r12]
	cmp	r10d, 1
	jle	.L7
	lea	r14d, -2[r10]
	mov	r9, rbx
	mov	r11d, 1
	add	r14, 2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, r11
	cmp	r10d, r11d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	movsx	rcx, DWORD PTR [rbx+rax*4]
	mov	rdx, rcx
	mov	rcx, QWORD PTR [r8+rcx*8]
	test	rcx, rcx
	je	.L14
	movsx	rdi, DWORD PTR [r9]
	mov	rsi, rdi
	mov	rdi, QWORD PTR [r8+rdi*8]
	test	rdi, rdi
	je	.L26
	cmp	rcx, rdi
	jge	.L14
.L26:
	mov	DWORD PTR [r9], edx
	mov	DWORD PTR [rbx+rax*4], esi
.L14:
	add	rax, 1
	cmp	r10d, eax
	jg	.L12
.L16:
	add	r11, 1
	add	r9, 4
	cmp	r14, r11
	jne	.L13
.L7:
	movsx	rax, DWORD PTR 0[0+r13*4]
	lea	rdi, 32[r12]
	mov	rdx, QWORD PTR [r8+rax*8]
	lea	r13, 0[0+rax*8]
	test	rdx, rdx
	jne	.L47
	mov	QWORD PTR 8[r12], 0
	call	L_CLR@PLT
	mov	rax, QWORD PTR PEER_MAXDISP[rip]
	mov	QWORD PTR 40[r12], 0
	mov	QWORD PTR 16[r12], rax
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L48
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L47:
	.cfi_restore_state
	mov	QWORD PTR 8[r12], rdx
	mov	rdx, QWORD PTR 48[r12]
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR 32[r12], eax
	call	LFPTOFP@PLT
	mov	QWORD PTR 16[r12], 0
	mov	QWORD PTR 40[r12], rax
	mov	eax, DWORD PTR sys_samples[rip]
	cmp	eax, 1
	jle	.L1
	lea	r8d, -2[rax]
	mov	r9, QWORD PTR [r12]
	mov	edx, 1
	xor	esi, esi
	mov	rdi, QWORD PTR PEER_MAXDISP[rip]
	add	r8, 2
	.p2align 4,,10
	.p2align 3
.L21:
	movsx	r10, DWORD PTR [rbx+rdx*4]
	mov	ecx, edx
	mov	rax, rdi
	cmp	QWORD PTR [r9+r10*8], 0
	je	.L19
	mov	r11, QWORD PTR 24[r12]
	mov	rax, QWORD PTR [r11+r10*8]
	mov	r10, QWORD PTR [r11+r13]
	mov	r11, r10
	sub	r11, rax
	sub	rax, r10
	cmovs	rax, r11
	cmp	rax, rdi
	cmovg	rax, rdi
.L19:
	sar	eax, cl
	add	rdx, 1
	cdqe
	add	rsi, rax
	mov	QWORD PTR 16[r12], rsi
	cmp	rdx, r8
	jne	.L21
	jmp	.L1
.L46:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	clock_filter, .-clock_filter
	.comm	sys_samples,4,4
	.comm	PEER_MAXDISP,8,8
	.comm	NTP_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ntpdate.c_clock_filter.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clock_filter, %function
clock_filter:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r3, .L37
	ldr	r4, .L37+4
	ldr	r2, [r3]
	ldr	r1, [r4]
	lsl	r3, r2, #2
	add	r3, r3, #7
	cmp	r1, r2
	bic	r3, r3, #7
	mov	r8, r0
	sub	sp, sp, r3
	movle	r0, #1
	movgt	r0, #0
	ldr	r3, .L37+8
	cmp	r1, #0
	movle	r0, #0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	INSIST
	ldr	r7, [r4]
	str	sp, [fp, #-48]
	cmp	r7, #0
	ble	.L6
	mov	r3, #0
	ldr	r2, [fp, #-48]
	sub	r2, r2, #4
.L5:
	str	r3, [r2, #4]!
	add	r3, r3, #1
	cmp	r3, r7
	bne	.L5
.L6:
	cmp	r7, #1
	ldr	r5, [r8]
	ble	.L4
	mov	r0, #0
	ldr	r6, [fp, #-48]
	sub	r10, r7, #1
.L10:
	add	r0, r0, #1
	cmp	r0, r7
	add	r4, r6, #4
	movlt	r1, r4
	movlt	r2, r0
	bge	.L13
.L12:
	ldr	ip, [r1], #4
	ldr	r3, [r5, ip, lsl #2]
	cmp	r3, #0
	beq	.L11
	ldr	lr, [r6]
	ldr	r9, [r5, lr, lsl #2]
	cmp	r3, r9
	movge	r3, #0
	movlt	r3, #1
	cmp	r9, #0
	moveq	r3, #1
	cmp	r3, #0
	strne	ip, [r6]
	strne	lr, [r1, #-4]
.L11:
	add	r2, r2, #1
	cmp	r2, r7
	bne	.L12
.L13:
	cmp	r0, r10
	mov	r6, r4
	bne	.L10
.L4:
	ldr	r3, [fp, #-48]
	add	r0, r8, #16
	ldr	r3, [r3]
	ldr	r5, [r5, r3, lsl #2]
	lsl	r4, r3, #2
	cmp	r5, #0
	bne	.L35
	str	r5, [r8, #4]
	bl	L_CLR
	ldr	r3, .L37+12
	str	r5, [r8, #20]
	ldr	r3, [r3]
	str	r3, [r8, #8]
.L1:
	ldr	r3, .L37+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L35:
	ldr	r2, [r8, #24]
	str	r5, [r8, #4]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [r8, #16]
	bl	LFPTOFP
	mov	r1, #0
	ldr	r3, .L37+4
	str	r0, [r8, #20]
	ldr	r5, [r3]
	str	r1, [r8, #8]
	cmp	r5, #1
	ble	.L1
	mov	r3, #1
	ldr	r2, .L37+12
	ldr	r0, [fp, #-48]
	ldr	r6, [r8]
	ldr	lr, [r2]
.L18:
	ldr	r2, [r0, #4]!
	ldr	ip, [r6, r2, lsl #2]
	cmp	ip, #0
	moveq	r2, lr
	beq	.L16
	ldr	r7, [r8, #12]
	ldr	ip, [r7, r2, lsl #2]
	ldr	r7, [r7, r4]
	subs	r2, ip, r7
	submi	r2, r7, ip
	cmp	r2, lr
	movge	r2, lr
.L16:
	add	r1, r1, r2, asr r3
	add	r3, r3, #1
	cmp	r3, r5
	str	r1, [r8, #8]
	bne	.L18
	b	.L1
.L36:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	NTP_SHIFT
	.word	sys_samples
	.word	.LC0
	.word	PEER_MAXDISP
	.size	clock_filter, .-clock_filter
	.comm	sys_samples,4,4
	.comm	PEER_MAXDISP,4,4
	.comm	NTP_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
