	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rate_weight_add
_rate_weight_add:                       ## @rate_weight_add
	.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
	xorl	%ecx, %ecx
	testl	%edx, %edx
	jle	LBB0_14
## %bb.1:
	movl	%edx, %ebx
	movq	_query_rate_weights@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_MAX_RATE_WEIGHTS@GOTPCREL(%rip), %rdx
	movl	$-3, %ecx
	cmpq	(%rdx), %rax
	jae	LBB0_14
## %bb.2:
	movl	%edi, %r14d
	cmpl	$80, %esi
	jne	LBB0_5
## %bb.3:
	movl	$-4, %ecx
	cmpl	$108, %r14d
	jne	LBB0_14
## %bb.4:
	movq	_QRP@GOTPCREL(%rip), %rcx
	movq	$0, 8(%rcx)
	movl	%ebx, (%rcx)
	movq	_QRW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rax
	movq	$0, 8(%rcx,%rax)
	movq	_FLAG_ENTRY_SORT_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Q_order@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	jmp	LBB0_13
LBB0_5:
	movl	%esi, %edi
	callq	_get_sorting_mode
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_FLAG_REVERSE_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%eax, %ecx
	andl	$15, %ecx
	movq	_QRW@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movq	(%r15), %rsi
	movq	%rsi, %rdx
	shlq	$4, %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	%ebx, 4(%rdi,%rdx)
	cmpl	$76, %r14d
	je	LBB0_8
## %bb.9:
	cmpl	$84, %r14d
	je	LBB0_15
## %bb.10:
	movl	$-2, %ecx
	cmpl	$108, %r14d
	jne	LBB0_14
## %bb.11:
	movq	_rw_func_linear@GOTPCREL(%rip), %rcx
	movq	_rw_func_linear_reverse@GOTPCREL(%rip), %rbx
	jmp	LBB0_12
LBB0_6:
	movl	$-1, %ecx
	jmp	LBB0_14
LBB0_8:
	movq	_rw_func_log@GOTPCREL(%rip), %rcx
	movq	_rw_func_log_reverse@GOTPCREL(%rip), %rbx
LBB0_12:
	testl	%eax, %r8d
	cmoveq	%rcx, %rbx
	movq	(%rbx), %rax
	movq	%rax, 8(%rdi,%rdx)
	incq	%rsi
	movq	%rsi, (%r15)
	jmp	LBB0_13
LBB0_15:
	movq	_QRT@GOTPCREL(%rip), %rsi
	movl	%ecx, (%rsi)
	movq	_M_LN2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ebx
	negl	%eax
	movl	%eax, 4(%rsi)
	movq	_now@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shll	$3, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movslq	%ecx, %rcx
	subq	%rcx, %rax
	movq	_QRT_min_creation_time@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_13:
	xorl	%ecx, %ecx
LBB0_14:
	movl	%ecx, %eax
	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	_FLAG_REVERSE_SEARCH,4,2        ## @FLAG_REVERSE_SEARCH
	.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
	.comm	_QRT,8,2                        ## @QRT
	.comm	_M_LN2,4,2                      ## @M_LN2
	.comm	_now,8,3                        ## @now
	.comm	_QRT_min_creation_time,8,3      ## @QRT_min_creation_time
	.no_dead_strip	_rate_weight_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rate_weight_add
_rate_weight_add:                       ; @rate_weight_add
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmp	w2, #1
	b.lt	LBB0_5
; %bb.1:
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
	b.hs	LBB0_6
; %bb.2:
	mov	x19, x2
	mov	x20, x0
	cmp	w1, #80
	b.ne	LBB0_8
; %bb.3:
	cmp	w20, #108
	b.ne	LBB0_13
; %bb.4:
	mov	w0, #0
Lloh5:
	adrp	x9, _QRP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QRP@GOTPAGEOFF]
	str	xzr, [x9, #8]
Lloh7:
	adrp	x10, _QRW@GOTPAGE
Lloh8:
	ldr	x10, [x10, _QRW@GOTPAGEOFF]
	str	w19, [x9]
Lloh9:
	ldr	x9, [x10]
	add	x8, x9, x8, lsl #4
	str	xzr, [x8, #8]
Lloh10:
	adrp	x8, _FLAG_ENTRY_SORT_SEARCH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FLAG_ENTRY_SORT_SEARCH@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _Q_order@GOTPAGE
Lloh14:
	ldr	x9, [x9, _Q_order@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_7
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w0, #-3
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x1
	bl	_get_sorting_mode
	tbnz	w0, #31, LBB0_14
; %bb.9:
	mov	x8, x0
Lloh15:
	adrp	x9, _FLAG_REVERSE_SEARCH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FLAG_REVERSE_SEARCH@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x9]
	and	w12, w0, #0xf
Lloh18:
	adrp	x9, _QRW@GOTPAGE
Lloh19:
	ldr	x9, [x9, _QRW@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x9]
	ldr	x9, [x21]
	add	x11, x11, x9, lsl #4
	stp	w12, w19, [x11]
	cmp	w20, #76
	b.eq	LBB0_15
; %bb.10:
	cmp	w20, #84
	b.eq	LBB0_17
; %bb.11:
	cmp	w20, #108
	b.ne	LBB0_18
; %bb.12:
Lloh21:
	adrp	x12, _rw_func_linear@GOTPAGE
Lloh22:
	ldr	x12, [x12, _rw_func_linear@GOTPAGEOFF]
Lloh23:
	adrp	x13, _rw_func_linear_reverse@GOTPAGE
Lloh24:
	ldr	x13, [x13, _rw_func_linear_reverse@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	mov	w0, #-4
	b	LBB0_7
LBB0_14:
	mov	w0, #-1
	b	LBB0_7
LBB0_15:
Lloh25:
	adrp	x12, _rw_func_log@GOTPAGE
Lloh26:
	ldr	x12, [x12, _rw_func_log@GOTPAGEOFF]
Lloh27:
	adrp	x13, _rw_func_log_reverse@GOTPAGE
Lloh28:
	ldr	x13, [x13, _rw_func_log_reverse@GOTPAGEOFF]
LBB0_16:
	mov	w0, #0
	and	w8, w10, w8
	cmp	w8, #0
	csel	x8, x12, x13, eq
	ldr	x8, [x8]
	str	x8, [x11, #8]
	add	x8, x9, #1
	str	x8, [x21]
	b	LBB0_7
LBB0_17:
	mov	w0, #0
Lloh29:
	adrp	x8, _QRT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _QRT@GOTPAGEOFF]
Lloh31:
	adrp	x9, _M_LN2@GOTPAGE
Lloh32:
	ldr	x9, [x9, _M_LN2@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	sdiv	w9, w9, w19
	neg	w9, w9
	stp	w12, w9, [x8]
Lloh34:
	adrp	x8, _now@GOTPAGE
Lloh35:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	add	w9, w19, w19, lsl #2
	lsl	w9, w9, #3
	sub	x8, x8, w9, sxtw
Lloh37:
	adrp	x9, _QRT_min_creation_time@GOTPAGE
Lloh38:
	ldr	x9, [x9, _QRT_min_creation_time@GOTPAGEOFF]
Lloh39:
	str	x8, [x9]
	b	LBB0_7
LBB0_18:
	mov	w0, #-2
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.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	_FLAG_REVERSE_SEARCH,4,2        ; @FLAG_REVERSE_SEARCH
	.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
	.comm	_QRT,8,2                        ; @QRT
	.comm	_M_LN2,4,2                      ; @M_LN2
	.comm	_now,8,3                        ; @now
	.comm	_QRT_min_creation_time,8,3      ; @QRT_min_creation_time
	.no_dead_strip	_rate_weight_add
.subsections_via_symbols
