	.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
	movq	_query_rate_weights@GOTPCREL(%rip), %r15
	movl	$-3, %ecx
	cmpl	$15, (%r15)
	jg	LBB0_8
## %bb.1:
	movl	%edx, %r14d
	movl	%edi, %ebx
	movl	%esi, %edi
	callq	_get_sorting_mode
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_FLAG_REVERSE_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %ecx
	andl	$15, %ecx
	movq	_QRW@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	(%r15), %rdi
	leaq	(%rdi,%rdi,2), %rdi
	movl	%ecx, (%rdx,%rdi,4)
	movslq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%r14d, 4(%rdx,%rcx,4)
	cmpl	$76, %ebx
	je	LBB0_4
## %bb.5:
	movl	$-2, %ecx
	cmpl	$108, %ebx
	jne	LBB0_8
## %bb.6:
	movq	_rw_func_linear@GOTPCREL(%rip), %rcx
	movq	_rw_func_linear_reverse@GOTPCREL(%rip), %rdi
	jmp	LBB0_7
LBB0_2:
	movl	$-1, %ecx
	jmp	LBB0_8
LBB0_4:
	movq	_rw_func_log@GOTPCREL(%rip), %rcx
	movq	_rw_func_log_reverse@GOTPCREL(%rip), %rdi
LBB0_7:
	testl	%eax, %esi
	cmoveq	%rcx, %rdi
	movl	(%rdi), %eax
	movslq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%eax, 8(%rdx,%rcx,4)
	incl	(%r15)
	xorl	%ecx, %ecx
LBB0_8:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_rate_weights,4,2         ## @query_rate_weights
	.comm	_FLAG_REVERSE_SEARCH,4,2        ## @FLAG_REVERSE_SEARCH
	.comm	_QRW,8,3                        ## @QRW
	.comm	_rw_func_log_reverse,4,2        ## @rw_func_log_reverse
	.comm	_rw_func_log,4,2                ## @rw_func_log
	.comm	_rw_func_linear_reverse,4,2     ## @rw_func_linear_reverse
	.comm	_rw_func_linear,4,2             ## @rw_func_linear
	.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
Lloh0:
	adrp	x21, _query_rate_weights@GOTPAGE
Lloh1:
	ldr	x21, [x21, _query_rate_weights@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #15
	b.le	LBB0_2
; %bb.1:
	mov	w8, #-3
	b	LBB0_10
LBB0_2:
	mov	x20, x2
	mov	x19, x0
	mov	x0, x1
	bl	_get_sorting_mode
	tbnz	w0, #31, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, _FLAG_REVERSE_SEARCH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLAG_REVERSE_SEARCH@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x8]
	and	w8, w0, #0xf
Lloh5:
	adrp	x9, _QRW@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QRW@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldrsw	x11, [x21]
	mov	w12, #12
	mul	x11, x11, x12
	str	w8, [x9, x11]
	ldrsw	x8, [x21]
	madd	x8, x8, x12, x9
	str	w20, [x8, #4]
	cmp	w19, #76
	b.eq	LBB0_7
; %bb.4:
	cmp	w19, #108
	b.ne	LBB0_9
; %bb.5:
Lloh8:
	adrp	x11, _rw_func_linear@GOTPAGE
Lloh9:
	ldr	x11, [x11, _rw_func_linear@GOTPAGEOFF]
Lloh10:
	adrp	x12, _rw_func_linear_reverse@GOTPAGE
Lloh11:
	ldr	x12, [x12, _rw_func_linear_reverse@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	w8, #-1
	b	LBB0_10
LBB0_7:
Lloh12:
	adrp	x11, _rw_func_log@GOTPAGE
Lloh13:
	ldr	x11, [x11, _rw_func_log@GOTPAGEOFF]
Lloh14:
	adrp	x12, _rw_func_log_reverse@GOTPAGE
Lloh15:
	ldr	x12, [x12, _rw_func_log_reverse@GOTPAGEOFF]
LBB0_8:
	mov	w8, #0
	and	w10, w10, w0
	cmp	w10, #0
	csel	x10, x11, x12, eq
	ldr	w10, [x10]
	ldrsw	x11, [x21]
	mov	w12, #12
	madd	x9, x11, x12, x9
	str	w10, [x9, #8]
	ldr	w9, [x21]
	add	w9, w9, #1
	str	w9, [x21]
	b	LBB0_10
LBB0_9:
	mov	w8, #-2
LBB0_10:
	mov	x0, x8
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_query_rate_weights,4,2         ; @query_rate_weights
	.comm	_FLAG_REVERSE_SEARCH,4,2        ; @FLAG_REVERSE_SEARCH
	.comm	_QRW,8,3                        ; @QRW
	.comm	_rw_func_log_reverse,4,2        ; @rw_func_log_reverse
	.comm	_rw_func_log,4,2                ; @rw_func_log
	.comm	_rw_func_linear_reverse,4,2     ; @rw_func_linear_reverse
	.comm	_rw_func_linear,4,2             ; @rw_func_linear
	.no_dead_strip	_rate_weight_add
.subsections_via_symbols
