	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_rate_weight                ## -- Begin function add_rate_weight
	.p2align	4, 0x90
_add_rate_weight:                       ## @add_rate_weight
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	jae	LBB0_4
## %bb.1:
	movl	%esi, %r14d
	movl	%edi, %ebx
	movsd	%xmm0, -32(%rbp)                ## 8-byte Spill
	movq	_query_rate_weights@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_MAX_RATE_WEIGHTS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setb	%dil
	callq	_assert
	cmpl	$-1, %ebx
	je	LBB0_2
## %bb.3:
	movq	_QRW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%ebx, (%rax,%rcx,8)
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rax,%rcx,8)
	testb	$2, %r14b
	movq	_rw_func_log_reverse@GOTPCREL(%rip), %rdx
	cmoveq	_rw_func_linear_reverse@GOTPCREL(%rip), %rdx
	movq	_rw_func_log@GOTPCREL(%rip), %rsi
	cmoveq	_rw_func_linear@GOTPCREL(%rip), %rsi
	testb	$1, %r14b
	cmovneq	%rdx, %rsi
	movq	(%rsi), %rdx
	movq	%rdx, 16(%rax,%rcx,8)
	incq	(%r15)
	jmp	LBB0_4
LBB0_2:
	movq	_QRP@GOTPCREL(%rip), %rax
	movq	$0, 8(%rax)
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rax)
	movq	_QRW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, 16(%rax,%rcx,8)
	movq	_FLAG_ENTRY_SORT_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Q_order@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_rate_weights,8,3         ## @query_rate_weights
	.comm	_MAX_RATE_WEIGHTS,8,3           ## @MAX_RATE_WEIGHTS
	.comm	_QRP,16,3                       ## @QRP
	.comm	_QRW,8,3                        ## @QRW
	.comm	_FLAG_ENTRY_SORT_SEARCH,4,2     ## @FLAG_ENTRY_SORT_SEARCH
	.comm	_Q_order,4,2                    ## @Q_order
	.comm	_rw_func_log_reverse,8,3        ## @rw_func_log_reverse
	.comm	_rw_func_log,8,3                ## @rw_func_log
	.comm	_rw_func_linear_reverse,8,3     ## @rw_func_linear_reverse
	.comm	_rw_func_linear,8,3             ## @rw_func_linear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_rate_weight                ; -- Begin function add_rate_weight
	.p2align	2
_add_rate_weight:                       ; @add_rate_weight
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
	fcmp	d0, #0.0
	b.ls	LBB0_4
; %bb.1:
	mov	x19, x1
	fmov	d8, d0
	mov	x20, x0
Lloh0:
	adrp	x21, _query_rate_weights@GOTPAGE
Lloh1:
	ldr	x21, [x21, _query_rate_weights@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _MAX_RATE_WEIGHTS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_RATE_WEIGHTS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	cmn	w20, #1
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _QRW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QRW@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x21]
	mov	w10, #24
	madd	x8, x9, x10, x8
	str	w20, [x8]
	str	d8, [x8, #8]
Lloh8:
	adrp	x9, _rw_func_linear_reverse@GOTPAGE
Lloh9:
	ldr	x9, [x9, _rw_func_linear_reverse@GOTPAGEOFF]
Lloh10:
	adrp	x10, _rw_func_log_reverse@GOTPAGE
Lloh11:
	ldr	x10, [x10, _rw_func_log_reverse@GOTPAGEOFF]
	tst	w19, #0x2
	csel	x9, x9, x10, eq
Lloh12:
	adrp	x10, _rw_func_linear@GOTPAGE
Lloh13:
	ldr	x10, [x10, _rw_func_linear@GOTPAGEOFF]
Lloh14:
	adrp	x11, _rw_func_log@GOTPAGE
Lloh15:
	ldr	x11, [x11, _rw_func_log@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	tst	w19, #0x1
	csel	x9, x10, x9, eq
	ldr	x9, [x9]
	str	x9, [x8, #16]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	b	LBB0_4
LBB0_3:
Lloh16:
	adrp	x8, _QRP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QRP@GOTPAGEOFF]
	str	xzr, [x8, #8]
	str	d8, [x8]
Lloh18:
	adrp	x8, _QRW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _QRW@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x9, [x21]
	mov	w10, #24
	madd	x8, x9, x10, x8
	str	xzr, [x8, #16]
Lloh21:
	adrp	x8, _FLAG_ENTRY_SORT_SEARCH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FLAG_ENTRY_SORT_SEARCH@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _Q_order@GOTPAGE
Lloh25:
	ldr	x9, [x9, _Q_order@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_query_rate_weights,8,3         ; @query_rate_weights
	.comm	_MAX_RATE_WEIGHTS,8,3           ; @MAX_RATE_WEIGHTS
	.comm	_QRP,16,3                       ; @QRP
	.comm	_QRW,8,3                        ; @QRW
	.comm	_FLAG_ENTRY_SORT_SEARCH,4,2     ; @FLAG_ENTRY_SORT_SEARCH
	.comm	_Q_order,4,2                    ; @Q_order
	.comm	_rw_func_log_reverse,8,3        ; @rw_func_log_reverse
	.comm	_rw_func_log,8,3                ; @rw_func_log
	.comm	_rw_func_linear_reverse,8,3     ; @rw_func_linear_reverse
	.comm	_rw_func_linear,8,3             ; @rw_func_linear
.subsections_via_symbols
