	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_sort_best_tp_rates
_minstrel_sort_best_tp_rates:           ## @minstrel_sort_best_tp_rates
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	_MAX_THR_RATES@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	movslq	%esi, %r14
	movl	%r8d, %r12d
	sarl	$31, %r12d
	andl	%r8d, %r12d
	movq	%r8, %rcx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rdi), %rdx
	movq	(%rdx,%r14,8), %rsi
	movq	-8(%rbx,%rcx,8), %rax
	decq	%rcx
	cmpq	(%rdx,%rax,8), %rsi
	jg	LBB0_1
## %bb.3:
	incl	%ecx
	movl	%ecx, %r12d
LBB0_4:
	leal	-1(%r8), %eax
	movslq	%r12d, %r13
	cmpl	%eax, %r12d
	jge	LBB0_6
## %bb.5:
	leaq	(%rbx,%r13,8), %rdi
	addq	$8, %rdi
	leaq	(%rbx,%r13,8), %rsi
	movl	%r13d, %edx
	notl	%edx
	addl	%r8d, %edx
	callq	_memmove
	movl	(%r15), %r8d
LBB0_6:
	cmpl	%r8d, %r12d
	jge	LBB0_8
## %bb.7:
	movq	%r14, (%rbx,%r13,8)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_THR_RATES,4,2              ## @MAX_THR_RATES
	.no_dead_strip	_minstrel_sort_best_tp_rates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_sort_best_tp_rates
_minstrel_sort_best_tp_rates:           ; @minstrel_sort_best_tp_rates
	.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
	mov	x19, x2
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x21, _MAX_THR_RATES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_THR_RATES@GOTPAGEOFF]
	ldr	w8, [x21]
	sxtw	x20, w1
	cmp	w8, #0
	csel	w22, w8, wzr, lt
	sub	x9, x2, #8
	mov	x10, x8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x12, [x0]
	ldr	x13, [x12, x20, lsl #3]
	sub	x11, x10, #1
	ldr	x10, [x9, x10, lsl #3]
	ldr	x12, [x12, x10, lsl #3]
	mov	x10, x11
	cmp	x13, x12
	b.gt	LBB0_1
; %bb.3:
	add	w22, w11, #1
LBB0_4:
	sub	w9, w8, #1
	cmp	w22, w9
	b.ge	LBB0_6
; %bb.5:
	sxtw	x9, w22
	add	x9, x9, #1
	add	x0, x19, x9, lsl #3
	add	x1, x19, w22, sxtw #3
	sub	w2, w8, w9
	bl	_memmove
	ldr	w8, [x21]
LBB0_6:
	cmp	w22, w8
	b.ge	LBB0_8
; %bb.7:
	str	x20, [x19, w22, sxtw #3]
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_THR_RATES,4,2              ; @MAX_THR_RATES
	.no_dead_strip	_minstrel_sort_best_tp_rates
.subsections_via_symbols
