	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function evaluate_relevance_search_rating
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_1:
	.quad	0x8000000000000000              ## double -0
LCPI0_2:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_3:
	.quad	0xbfe0000000000000              ## double -0.5
LCPI0_4:
	.quad	0x41dfffffffc00000              ## double 2147483647
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_evaluate_relevance_search_rating:      ## @evaluate_relevance_search_rating
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	_query_rate_weights@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_1
## %bb.2:
	xorpd	%xmm1, %xmm1
	xorl	%ebx, %ebx
	movq	_QRW@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movq	(%r13), %rax
	leaq	(%rax,%rbx), %rsi
	movsd	(%rax,%rbx), %xmm0              ## xmm0 = mem[0],zero
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	*8(%rax,%rbx)
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	incq	%r14
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
LBB0_4:
	movq	_QRP@GOTPCREL(%rip), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_5
## %bb.6:
	movsd	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	jmp	LBB0_7
LBB0_5:
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	imull	(%rax), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
LBB0_7:
	addsd	%xmm0, %xmm1
	movq	_QRT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	cmpl	$15, %esi
	ja	LBB0_12
## %bb.8:
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_get_rate_item_fast
	movq	%rax, %rcx
	movq	_QRT_min_creation_time@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	%ecx, (%rdx)
	jg	LBB0_23
## %bb.9:
	movq	_now@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	%ecx, %edi
	jle	LBB0_10
## %bb.11:
	imull	4(%rbx), %edi
	callq	_exp
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	jmp	LBB0_12
LBB0_10:
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
LBB0_12:
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movapd	%xmm1, %xmm0
	movb	$1, %al
	callq	_vkprintf
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_14:
	ucomisd	LCPI0_2(%rip), %xmm1
	jbe	LBB0_16
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movapd	%xmm1, %xmm0
	movb	$1, %al
	callq	_vkprintf
	movl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	jmp	LBB0_23
LBB0_16:
	movq	_Q_optional_tags@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.17:
	movq	_Q_K_Opt_Tag@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	callq	_item_count_optional_tags_sum
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	LCPI0_2(%rip), %xmm0
	movq	_optional_tags_mult_coeff@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	mulsd	%xmm0, %xmm1
LBB0_18:
	movq	_Q_relevance@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.19:
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	movl	$13, %esi
	callq	_get_rate_item_fast
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r12), %xmm0
	movzwl	%ax, %r14d
	movl	%eax, %r15d
	shrl	$16, %r15d
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movb	$1, %al
	callq	_vkprintf
	movq	_Q_order@GOTPCREL(%rip), %rax
	movq	_FLAG_ONLY_TITLE_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	cmovel	%r14d, %r15d
	incl	%r15d
	movq	_RELEVANCE_TABLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %ecx
	cmpl	%eax, %r15d
	cmovll	%r15d, %ecx
	movq	_tbl_relevance@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movslq	%ecx, %r14
	movsd	(%rax,%r14,8), %xmm1            ## xmm1 = mem[0],zero
	movsd	LCPI0_3(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_21
## %bb.20:
	movq	_Q_Relevance_Power@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_pow
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movq	(%rbx), %rax
	movsd	%xmm1, (%rax,%r14,8)
LBB0_21:
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
LBB0_22:
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r12), %xmm0
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movb	$2, %al
	callq	_vkprintf
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	mulsd	LCPI0_4(%rip), %xmm0
	cvttsd2si	%xmm0, %eax
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_rate_weights,4,2         ## @query_rate_weights
	.comm	_QRW,8,3                        ## @QRW
	.comm	_QRP,8,2                        ## @QRP
	.comm	_QRT,8,2                        ## @QRT
	.comm	_QRT_min_creation_time,4,2      ## @QRT_min_creation_time
	.comm	_now,4,2                        ## @now
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"evaluate_searchx_rating: r = %.lg\n"

	.comm	_Q_optional_tags,8,3            ## @Q_optional_tags
	.comm	_Q_K_Opt_Tag,8,3                ## @Q_K_Opt_Tag
	.comm	_optional_tags_mult_coeff,8,3   ## @optional_tags_mult_coeff
	.comm	_Q_relevance,8,3                ## @Q_relevance
L_.str.1:                               ## @.str.1
	.asciz	"item_id = %lld, in title = %d, whole = %d\n"

	.comm	_Q_order,4,2                    ## @Q_order
	.comm	_FLAG_ONLY_TITLE_SEARCH,4,2     ## @FLAG_ONLY_TITLE_SEARCH
	.comm	_RELEVANCE_TABLE_SIZE,4,2       ## @RELEVANCE_TABLE_SIZE
	.comm	_tbl_relevance,8,3              ## @tbl_relevance
	.comm	_Q_Relevance_Power,4,2          ## @Q_Relevance_Power
L_.str.2:                               ## @.str.2
	.asciz	"item_id = %lld, r = %.10lf\n"

	.no_dead_strip	_evaluate_relevance_search_rating
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evaluate_relevance_search_rating
_evaluate_relevance_search_rating:      ; @evaluate_relevance_search_rating
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _query_rate_weights@GOTPAGE
Lloh1:
	ldr	x21, [x21, _query_rate_weights@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	movi	d8, #0000000000000000
Lloh2:
	adrp	x24, _QRW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _QRW@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x1, x8, x22
	ldr	d9, [x1]
	ldr	x8, [x1, #8]
	mov	x0, x19
	blr	x8
	fmadd	d8, d9, d0, d8
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #16
	cmp	x23, x8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	fmov	d8, #0.50000000
LBB0_4:
Lloh4:
	adrp	x8, _QRP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _QRP@GOTPAGEOFF]
	ldp	w8, w9, [x8]
	mul	w8, w8, w20
	scvtf	d0, w8
	cmp	w9, #0
	mov	x8, #-9223372036854775808
	fmov	d1, x8
	fcsel	d0, d0, d1, eq
	fadd	d8, d8, d0
Lloh6:
	adrp	x20, _QRT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _QRT@GOTPAGEOFF]
	ldr	w1, [x20]
	cmp	w1, #15
	b.hi	LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_get_rate_item_fast
Lloh8:
	adrp	x8, _QRT_min_creation_time@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QRT_min_creation_time@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_20
LBB0_7:
Lloh11:
	adrp	x8, _now@GOTPAGE
Lloh12:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	subs	w8, w8, w0
	b.le	LBB0_9
; %bb.8:
	ldr	w9, [x20, #4]
	mul	w0, w9, w8
	bl	_exp
	fmul	d8, d8, d0
LBB0_9:
	fcmp	d8, #0.0
	b.pl	LBB0_11
; %bb.10:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	fmov	d0, d8
	bl	_vkprintf
	mov	w0, #0
	b	LBB0_20
LBB0_11:
	fmov	d0, #1.00000000
	fcmp	d8, d0
	b.le	LBB0_13
; %bb.12:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	fmov	d0, d8
	bl	_vkprintf
	mov	w0, #2147483647
	b	LBB0_20
LBB0_13:
Lloh18:
	adrp	x8, _Q_optional_tags@GOTPAGE
Lloh19:
	ldr	x8, [x8, _Q_optional_tags@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
Lloh21:
	adrp	x8, _Q_K_Opt_Tag@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Q_K_Opt_Tag@GOTPAGEOFF]
Lloh23:
	ldr	d9, [x8]
	mov	x0, x19
	bl	_item_count_optional_tags_sum
	fmov	d1, #1.00000000
	fmadd	d0, d9, d0, d1
Lloh24:
	adrp	x8, _optional_tags_mult_coeff@GOTPAGE
Lloh25:
	ldr	x8, [x8, _optional_tags_mult_coeff@GOTPAGEOFF]
Lloh26:
	ldr	d1, [x8]
	fmul	d0, d0, d1
	fmul	d8, d8, d0
LBB0_15:
Lloh27:
	adrp	x8, _Q_relevance@GOTPAGE
Lloh28:
	ldr	x8, [x8, _Q_relevance@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cbz	x8, LBB0_19
; %bb.16:
	mov	x0, x19
	mov	w1, #13
	bl	_get_rate_item_fast
	ldr	s0, [x19]
	sshll.2d	v0, v0, #0
	scvtf	d0, d0
	ubfx	x20, x0, #16, #16
	and	w21, w0, #0xffff
	mov	x8, x20
	stp	x8, x21, [sp]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
Lloh32:
	adrp	x8, _Q_order@GOTPAGE
Lloh33:
	ldr	x8, [x8, _Q_order@GOTPAGEOFF]
Lloh34:
	adrp	x9, _FLAG_ONLY_TITLE_SEARCH@GOTPAGE
Lloh35:
	ldr	x9, [x9, _FLAG_ONLY_TITLE_SEARCH@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w8
	csel	w8, w21, w20, eq
Lloh38:
	adrp	x9, _RELEVANCE_TABLE_SIZE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _RELEVANCE_TABLE_SIZE@GOTPAGEOFF]
	add	w10, w8, #1
Lloh40:
	ldr	w9, [x9]
	sub	w11, w9, #1
	cmp	w10, w9
Lloh41:
	adrp	x21, _tbl_relevance@GOTPAGE
Lloh42:
	ldr	x21, [x21, _tbl_relevance@GOTPAGEOFF]
	csinc	w8, w11, w8, ge
	ldr	x9, [x21]
	ldr	d0, [x9, w8, sxtw #3]
	fmov	d1, #-0.50000000
	fcmp	d0, d1
	b.pl	LBB0_18
; %bb.17:
	sxtw	x20, w8
Lloh43:
	adrp	x8, _Q_Relevance_Power@GOTPAGE
Lloh44:
	ldr	x8, [x8, _Q_Relevance_Power@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pow
	fmov	d1, #1.00000000
	fdiv	d0, d1, d0
	ldr	x8, [x21]
	str	d0, [x8, x20, lsl #3]
LBB0_18:
	fmul	d8, d8, d0
LBB0_19:
	ldr	s0, [x19]
	sshll.2d	v0, v0, #0
	scvtf	d0, d0
	str	d8, [sp]
Lloh46:
	adrp	x1, l_.str.2@PAGE
Lloh47:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	mov	x8, #281474972516352
	movk	x8, #16863, lsl #48
	fmov	d0, x8
	fmul	d0, d8, d0
	fcvtzs	w0, d0
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_query_rate_weights,4,2         ; @query_rate_weights
	.comm	_QRW,8,3                        ; @QRW
	.comm	_QRP,8,2                        ; @QRP
	.comm	_QRT,8,2                        ; @QRT
	.comm	_QRT_min_creation_time,4,2      ; @QRT_min_creation_time
	.comm	_now,4,2                        ; @now
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"evaluate_searchx_rating: r = %.lg\n"

	.comm	_Q_optional_tags,8,3            ; @Q_optional_tags
	.comm	_Q_K_Opt_Tag,8,3                ; @Q_K_Opt_Tag
	.comm	_optional_tags_mult_coeff,8,3   ; @optional_tags_mult_coeff
	.comm	_Q_relevance,8,3                ; @Q_relevance
l_.str.1:                               ; @.str.1
	.asciz	"item_id = %lld, in title = %d, whole = %d\n"

	.comm	_Q_order,4,2                    ; @Q_order
	.comm	_FLAG_ONLY_TITLE_SEARCH,4,2     ; @FLAG_ONLY_TITLE_SEARCH
	.comm	_RELEVANCE_TABLE_SIZE,4,2       ; @RELEVANCE_TABLE_SIZE
	.comm	_tbl_relevance,8,3              ; @tbl_relevance
	.comm	_Q_Relevance_Power,4,2          ; @Q_Relevance_Power
l_.str.2:                               ; @.str.2
	.asciz	"item_id = %lld, r = %.10lf\n"

	.no_dead_strip	_evaluate_relevance_search_rating
.subsections_via_symbols
