	.file	"extr_atmel.c_atmel_smooth_qual.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atmel_smooth_qual, @function
atmel_smooth_qual:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r11, QWORD PTR [rdi]
	mov	rcx, QWORD PTR jiffies[rip]
	xor	edx, edx
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	r10, QWORD PTR HZ[rip]
	sub	rcx, r11
	mov	rax, rcx
	div	r10
	cmp	rcx, r10
	jb	.L2
	mov	ecx, DWORD PTR 20[rdi]
	lea	rbx, -1[rax]
	mov	esi, DWORD PTR 16[rdi]
	mov	edx, DWORD PTR 8[rdi]
	mov	eax, DWORD PTR 12[rdi]
	mov	r8, rbx
	lea	r9d, 100[rcx]
	.p2align 4,,10
	.p2align 3
.L3:
	imul	edx, eax
	sub	r8, 1
	imul	edx, r9d
	movsx	rcx, edx
	sar	edx, 31
	imul	rcx, rcx, 274877907
	sar	rcx, 40
	sub	ecx, edx
	mov	edx, ecx
	mov	ecx, esi
	shr	ecx, 31
	add	esi, ecx
	sar	esi
	add	esi, edx
	xor	edx, edx
	cmp	r8, -1
	jne	.L3
	imul	rbx, r10
	add	r10, r11
	mov	DWORD PTR 16[rdi], esi
	mov	DWORD PTR 8[rdi], 0
	add	rbx, r10
	mov	QWORD PTR [rdi], rbx
.L2:
	mov	edx, DWORD PTR IW_QUAL_QUAL_INVALID[rip]
	mov	eax, DWORD PTR 24[rdi]
	or	eax, DWORD PTR IW_QUAL_QUAL_UPDATED[rip]
	pop	rbx
	.cfi_def_cfa_offset 8
	not	edx
	and	eax, edx
	mov	DWORD PTR 24[rdi], eax
	ret
	.cfi_endproc
.LFE0:
	.size	atmel_smooth_qual, .-atmel_smooth_qual
	.comm	jiffies,8,8
	.comm	IW_QUAL_QUAL_UPDATED,4,4
	.comm	IW_QUAL_QUAL_INVALID,4,4
	.comm	HZ,8,8
	.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_atmel.c_atmel_smooth_qual.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atmel_smooth_qual, %function
atmel_smooth_qual:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L7
	ldr	r3, .L7+4
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, [r0]
	ldr	r7, [r2]
	ldr	r6, [r3]
	sub	r7, r7, r5
	mov	r4, r0
	mov	r1, r6
	mov	r0, r7
	bl	__aeabi_uidiv
	cmp	r7, r6
	bcc	.L2
	sub	r0, r0, #1
	mov	r2, r0
	mov	r7, #0
	ldr	ip, [r4, #16]
	ldr	r8, [r4, #12]
	ldr	r3, [r4, #4]
	ldr	r1, [r4, #8]
	ldr	lr, .L7+8
	add	ip, ip, #100
.L3:
	mul	r3, r1, r3
	mul	r3, ip, r3
	smull	r10, r9, lr, r3
	sub	r2, r2, #1
	asr	r3, r3, #31
	rsb	r3, r3, r9, asr #8
	add	r8, r8, r8, lsr #31
	cmn	r2, #1
	add	r8, r3, r8, asr #1
	mov	r3, #0
	bne	.L3
	add	r5, r5, r6
	mla	r0, r6, r0, r5
	stm	r4, {r0, r7}
	str	r8, [r4, #12]
.L2:
	ldr	r3, .L7+12
	ldr	r2, .L7+16
	ldr	r1, [r3]
	ldr	r3, [r4, #20]
	ldr	r2, [r2]
	orr	r3, r3, r1
	bic	r3, r3, r2
	str	r3, [r4, #20]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	.align	2
.L7:
	.word	jiffies
	.word	HZ
	.word	274877907
	.word	IW_QUAL_QUAL_UPDATED
	.word	IW_QUAL_QUAL_INVALID
	.size	atmel_smooth_qual, .-atmel_smooth_qual
	.comm	jiffies,4,4
	.comm	IW_QUAL_QUAL_UPDATED,4,4
	.comm	IW_QUAL_QUAL_INVALID,4,4
	.comm	HZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
