	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_next_sample_idx
_minstrel_next_sample_idx:              ## @minstrel_next_sample_idx
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdx
	movq	_minstrel_mcs_groups@GOTPCREL(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edx, %edx
	divq	%rcx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rdx, (%r15)
	movq	8(%r15), %r12
	leaq	(%rdx,%rdx,2), %rbx
	cmpl	$0, 16(%r12,%rbx,8)
	jne	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rdx
	movq	%rdx, (%r15)
	movl	(%r14), %edi
	callq	_ARRAY_SIZE
	movq	%rax, %rcx
	movq	(%r15), %rax
	movq	%rcx, %rdx
	orq	%rax, %rdx
	shrq	$32, %rdx
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_4
LBB0_5:
	movq	(%r12,%rbx,8), %rax
	incq	%rax
	movq	%rax, (%r12,%rbx,8)
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_8
## %bb.6:
	leaq	(%r12,%rbx,8), %rax
	movq	$0, (%rax)
	movq	8(%r12,%rbx,8), %r14
	incq	%r14
	movq	%r14, 8(%r12,%rbx,8)
	movq	_sample_table@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r14
	jb	LBB0_8
## %bb.7:
	leaq	(%r12,%rbx,8), %rax
	addq	$8, %rax
	movq	$0, (%rax)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_minstrel_mcs_groups,4,2        ## @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,8,3            ## @MCS_GROUP_RATES
	.comm	_sample_table,4,2               ## @sample_table
	.no_dead_strip	_minstrel_next_sample_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_next_sample_idx
_minstrel_next_sample_idx:              ; @minstrel_next_sample_idx
	.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, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _minstrel_mcs_groups@GOTPAGE
Lloh1:
	ldr	x20, [x20, _minstrel_mcs_groups@GOTPAGEOFF]
	mov	w21, #24
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, #1
	str	x8, [x19]
	ldr	w0, [x20]
	bl	_ARRAY_SIZE
	ldp	x8, x9, [x19]
	udiv	x10, x8, x0
	msub	x8, x10, x0, x8
	str	x8, [x19]
	madd	x10, x8, x21, x9
	ldr	w10, [x10, #16]
	cbz	w10, LBB0_1
; %bb.2:
	mov	w10, #24
	madd	x10, x8, x10, x9
	ldr	x11, [x10]
	add	x11, x11, #1
	str	x11, [x10]
Lloh2:
	adrp	x12, _MCS_GROUP_RATES@GOTPAGE
Lloh3:
	ldr	x12, [x12, _MCS_GROUP_RATES@GOTPAGEOFF]
Lloh4:
	ldr	x12, [x12]
	cmp	x11, x12
	b.lt	LBB0_5
; %bb.3:
	mov	w11, #24
	madd	x19, x8, x11, x9
	ldr	x8, [x19, #8]!
	str	xzr, [x10]
	add	x20, x8, #1
	str	x20, [x19]
Lloh5:
	adrp	x8, _sample_table@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sample_table@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	cmp	x20, x0
	b.lo	LBB0_5
; %bb.4:
	str	xzr, [x19]
LBB0_5:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_minstrel_mcs_groups,4,2        ; @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,8,3            ; @MCS_GROUP_RATES
	.comm	_sample_table,4,2               ; @sample_table
	.no_dead_strip	_minstrel_next_sample_idx
.subsections_via_symbols
