	.file	"extr_search-data.c_normalize_query_rate_weights.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	normalize_query_rate_weights
	.type	normalize_query_rate_weights, @function
normalize_query_rate_weights:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, DWORD PTR QRP[rip+8]
	movsx	rax, DWORD PTR query_rate_weights[rip]
	test	r8d, r8d
	jne	.L2
	mov	rcx, QWORD PTR QRW[rip]
	movsd	xmm0, QWORD PTR QRP[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR query_rate_weights[rip], edx
	movsd	QWORD PTR [rcx+rax*8], xmm0
	mov	eax, edx
.L2:
	test	eax, eax
	je	.L11
	jle	.L5
	mov	rdi, QWORD PTR QRW[rip]
	sub	eax, 1
	pxor	xmm0, xmm0
	mov	rsi, rax
	lea	rcx, 8[rdi+rax*8]
	mov	rdx, rdi
	mov	rax, rdi
	.p2align 4,,10
	.p2align 3
.L6:
	addsd	xmm0, QWORD PTR [rax]
	add	rax, 8
	cmp	rax, rcx
	jne	.L6
	movsd	xmm1, QWORD PTR .LC2[rip]
	comisd	xmm1, xmm0
	ja	.L5
	movsd	xmm1, QWORD PTR .LC1[rip]
	divsd	xmm1, xmm0
	.p2align 4,,10
	.p2align 3
.L8:
	movsd	xmm0, QWORD PTR [rdx]
	add	rdx, 8
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -8[rdx], xmm0
	cmp	rdx, rcx
	jne	.L8
	test	r8d, r8d
	jne	.L11
	movsx	rax, esi
	mov	DWORD PTR query_rate_weights[rip], esi
	movsd	xmm0, QWORD PTR [rdi+rax*8]
	movsd	QWORD PTR QRP[rip], xmm0
.L11:
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR query_rate_weights[rip], 0
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	normalize_query_rate_weights, .-normalize_query_rate_weights
	.comm	query_rate_weights,4,4
	.comm	QRW,8,8
	.comm	QRP,16,16
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	3894859413
	.long	1041313291
	.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_search-data.c_normalize_query_rate_weights.c"
	.text
	.global	__aeabi_dadd
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_dcmplt
	.align	2
	.global	normalize_query_rate_weights
	.syntax unified
	.arm
	.fpu softvfp
	.type	normalize_query_rate_weights, %function
normalize_query_rate_weights:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L18
	ldr	r10, .L18+4
	ldr	r3, [r9, #8]
	sub	sp, sp, #12
	cmp	r3, #0
	ldr	r8, [r10]
	str	r3, [sp, #4]
	bne	.L2
	ldmia	r9, {r2-r3}
	ldr	r1, .L18+8
	add	r0, r8, #1
	ldr	r1, [r1]
	str	r0, [r10]
	add	r1, r1, r8, lsl #3
	mov	r8, r0
	stm	r1, {r2-r3}
.L2:
	cmp	r8, #0
	beq	.L11
	ble	.L5
	ldr	r3, .L18+8
	mov	r4, #0
	ldr	r6, [r3]
	mov	r5, #0
	mov	fp, r6
	add	r7, r6, r8, lsl #3
.L6:
	mov	r0, r4
	ldmia	fp!, {r2-r3}
	mov	r1, r5
	bl	__aeabi_dadd
	cmp	r7, fp
	mov	r4, r0
	mov	r5, r1
	bne	.L6
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	bl	__aeabi_dcmplt
	cmp	r0, #0
	bne	.L5
	mov	r2, r4
	mov	r3, r5
	mov	r0, #0
	ldr	r1, .L18+20
	bl	__aeabi_ddiv
	mov	r4, r0
	mov	r5, r1
.L8:
	ldmia	r6, {r0-r1}
	mov	r2, r4
	mov	r3, r5
	bl	__aeabi_dmul
	stm	r6!, {r0-r1}
	cmp	r7, r6
	bne	.L8
	ldr	r3, [sp, #4]
	cmp	r3, #0
	ldmdbeq	r7, {r2-r3}
	stmeq	r9, {r2-r3}
	subeq	r8, r8, #1
	streq	r8, [r10]
.L11:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mov	r3, #0
	mov	r0, #0
	str	r3, [r10]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	.align	2
.L18:
	.word	QRP
	.word	query_rate_weights
	.word	QRW
	.word	-400107883
	.word	1041313291
	.word	1072693248
	.size	normalize_query_rate_weights, .-normalize_query_rate_weights
	.comm	query_rate_weights,4,4
	.comm	QRW,4,4
	.comm	QRP,16,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
