	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_downgrade_rate
_minstrel_downgrade_rate:               ## @minstrel_downgrade_rate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edx, %r8d
	movl	(%rsi), %eax
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movq	(%rdi), %r10
	movq	_minstrel_mcs_groups@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r11
	movl	%eax, %r9d
	movq	%r9, %rcx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%rcx), %rdx
	cmpq	$1, %rcx
	movq	%rdx, %rcx
	jle	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	decl	%eax
	leaq	(%rax,%rax,2), %rdx
	cmpl	$0, 8(%r10,%rdx,4)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r11,%rax,8), %rdi
	cmpq	(%r11,%r9,8), %rdi
	jg	LBB0_3
## %bb.5:
	testl	%r8d, %r8d
	leaq	(%r10,%rdx,4), %rax
	leaq	4(%r10,%rdx,4), %rcx
	cmovneq	%rax, %rcx
	movl	(%rcx), %eax
	movl	%eax, (%rsi)
LBB0_6:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCS_GROUP_RATES,4,2            ## @MCS_GROUP_RATES
	.comm	_minstrel_mcs_groups,8,3        ## @minstrel_mcs_groups
	.no_dead_strip	_minstrel_downgrade_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_downgrade_rate
_minstrel_downgrade_rate:               ; @minstrel_downgrade_rate
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MCS_GROUP_RATES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MCS_GROUP_RATES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	udiv	w8, w8, w9
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	ldr	x9, [x0]
Lloh3:
	adrp	x10, _minstrel_mcs_groups@GOTPAGE
Lloh4:
	ldr	x10, [x10, _minstrel_mcs_groups@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	mov	w12, #12
	mov	x13, x8
	mov	x11, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	x13, x13, #1
	b.le	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w11, w11, #1
	umaddl	x14, w11, w12, x9
	ldr	w14, [x14, #8]
	cbz	w14, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x14, [x10, x11, lsl #3]
	ldr	x15, [x10, x8, lsl #3]
	cmp	x14, x15
	b.gt	LBB0_2
; %bb.5:
	mov	w8, #12
	madd	x8, x11, x8, x9
	add	x9, x8, #4
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x1]
LBB0_6:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MCS_GROUP_RATES,4,2            ; @MCS_GROUP_RATES
	.comm	_minstrel_mcs_groups,8,3        ; @minstrel_mcs_groups
	.no_dead_strip	_minstrel_downgrade_rate
.subsections_via_symbols
