	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_get_sample_rate
_minstrel_get_sample_rate:              ## @minstrel_get_sample_rate
	.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
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	decq	%rax
	movq	%rax, (%rbx)
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$-1, %r14d
	cmpl	$0, 40(%rbx)
	je	LBB0_13
## %bb.3:
	movq	8(%rbx), %r12
	movq	48(%rbx), %rax
	movq	_sample_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%r12,%r12,2), %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	8(%rax,%rdx,8), %rdi
	movq	(%rcx,%rsi,8), %rcx
	movslq	(%rcx,%rdi,4), %r13
	movq	16(%rax,%rdx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	imull	%r12d, %r15d
	addl	%r13d, %r15d
	movq	%rbx, %rdi
	callq	_minstrel_next_sample_idx
	cmpl	16(%rbx), %r15d
	je	LBB0_13
## %bb.4:
	cmpl	20(%rbx), %r15d
	je	LBB0_13
## %bb.5:
	cmpl	24(%rbx), %r15d
	je	LBB0_13
## %bb.6:
	shlq	$4, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$95, %edi
	movl	$100, %esi
	callq	_MINSTREL_FRAC
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jg	LBB0_13
## %bb.7:
	movl	%r15d, %edi
	callq	_minstrel_get_duration
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	20(%rbx), %edi
	callq	_minstrel_get_duration
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jae	LBB0_8
LBB0_12:
	decl	40(%rbx)
	movl	%r15d, %r14d
	jmp	LBB0_13
LBB0_8:
	movq	32(%rbx), %rax
	movq	_minstrel_mcs_groups@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r12d, %edx
	cmpq	(%rcx,%rdx,8), %rax
	jl	LBB0_10
## %bb.9:
	movl	24(%rbx), %edi
	callq	_minstrel_get_duration
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jb	LBB0_12
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$20, 8(%rax,%r13)
	jl	LBB0_13
## %bb.11:
	movl	44(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 44(%rbx)
	cmpl	$2, %eax
	jg	LBB0_13
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_sample_table,8,3               ## @sample_table
	.comm	_MCS_GROUP_RATES,4,2            ## @MCS_GROUP_RATES
	.comm	_minstrel_mcs_groups,8,3        ## @minstrel_mcs_groups
	.no_dead_strip	_minstrel_get_sample_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_get_sample_rate
_minstrel_get_sample_rate:              ; @minstrel_get_sample_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	ldr	x8, [x1]
	subs	x8, x8, #1
	b.lt	LBB0_4
; %bb.1:
	str	x8, [x20]
LBB0_2:
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_2
; %bb.5:
	ldr	x8, [x20, #48]
	ldr	x24, [x20, #8]
Lloh0:
	adrp	x9, _sample_table@GOTPAGE
Lloh1:
	ldr	x9, [x9, _sample_table@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	w10, #24
	madd	x8, x24, x10, x8
	ldp	x10, x11, [x8]
	ldr	x9, [x9, x10, lsl #3]
	ldrsw	x22, [x9, x11, lsl #2]
	ldr	x23, [x8, #16]
Lloh3:
	adrp	x8, _MCS_GROUP_RATES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCS_GROUP_RATES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	madd	w19, w8, w24, w22
	mov	x0, x20
	bl	_minstrel_next_sample_idx
	ldr	w8, [x20, #16]
	cmp	w19, w8
	b.eq	LBB0_2
; %bb.6:
	ldr	w8, [x20, #20]
	cmp	w19, w8
	b.eq	LBB0_2
; %bb.7:
	ldr	w8, [x20, #24]
	cmp	w19, w8
	b.eq	LBB0_2
; %bb.8:
	lsl	x8, x22, #4
	ldr	x21, [x23, x8]
	mov	w0, #95
	mov	w1, #100
	bl	_MINSTREL_FRAC
	cmp	x21, x0
	b.gt	LBB0_2
; %bb.9:
	mov	x0, x19
	bl	_minstrel_get_duration
	mov	x21, x0
	ldr	w0, [x20, #20]
	bl	_minstrel_get_duration
	cmp	w21, w0
	b.hs	LBB0_11
LBB0_10:
	ldr	w8, [x20, #40]
	sub	w8, w8, #1
	str	w8, [x20, #40]
	b	LBB0_3
LBB0_11:
	ldr	x8, [x20, #32]
Lloh6:
	adrp	x9, _minstrel_mcs_groups@GOTPAGE
Lloh7:
	ldr	x9, [x9, _minstrel_mcs_groups@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x9, [x9, w24, uxtw #3]
	cmp	x8, x9
	b.lt	LBB0_13
; %bb.12:
	ldr	w0, [x20, #24]
	bl	_minstrel_get_duration
	cmp	w21, w0
	b.lo	LBB0_10
LBB0_13:
	add	x8, x23, x22, lsl #4
	ldr	w8, [x8, #8]
	cmp	w8, #20
	b.lt	LBB0_2
; %bb.14:
	ldr	w8, [x20, #44]
	add	w9, w8, #1
	str	w9, [x20, #44]
	cmp	w8, #2
	b.gt	LBB0_2
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sample_table,8,3               ; @sample_table
	.comm	_MCS_GROUP_RATES,4,2            ; @MCS_GROUP_RATES
	.comm	_minstrel_mcs_groups,8,3        ; @minstrel_mcs_groups
	.no_dead_strip	_minstrel_get_sample_rate
.subsections_via_symbols
