	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_ht_set_rate
_minstrel_ht_set_rate:                  ## @minstrel_ht_set_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_minstrel_mcs_groups@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rcx
	movl	%r8d, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rdi
	movl	%r8d, %esi
	callq	_minstrel_get_ratestats
	movq	%rax, %r13
	cmpl	$0, 16(%rax)
	jne	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_minstrel_calc_retransmit
LBB0_2:
	movq	(%r13), %rbx
	movl	$20, %edi
	movl	$100, %esi
	callq	_MINSTREL_FRAC
	movslq	%r15d, %r8
	cmpq	%rax, %rbx
	movl	%r15d, %edi
	jl	LBB0_4
## %bb.3:
	movl	8(%r13), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rcx
	leaq	(%r8,%r8,4), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	%eax, 8(%rcx,%rdx,4)
	movl	12(%r13), %eax
	movl	%eax, 4(%rcx,%rdx,4)
	jmp	LBB0_6
LBB0_4:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	leaq	(%r8,%r8,4), %rcx
	movabsq	$8589934594, %rdx               ## imm = 0x200000002
	movq	%rdx, (%rax,%rcx,4)
	movl	$2, 8(%rax,%rcx,4)
LBB0_6:
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %eax
	cltd
	idivl	%esi
	movq	_MINSTREL_CCK_GROUP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r12
	movl	%edi, %r13d
	movq	%r12, %rdi
	movq	%r8, %rbx
	callq	_ARRAY_SIZE
	movq	%rbx, %r8
	movl	%r13d, %edi
	movl	%eax, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	movl	(%r12,%rax,4), %eax
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_8:
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%rcx,8), %eax
	movl	4(%rbx,%rcx,8), %ecx
	decl	%eax
	imull	%esi, %eax
	addl	%edx, %eax
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
LBB0_9:
	movq	(%r15), %rdx
	testl	%edi, %edi
	jle	LBB0_11
## %bb.10:
	movl	%edi, %esi
	leaq	(%rsi,%rsi,4), %rsi
	movl	4(%rdx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	movq	_IEEE80211_TX_RC_USE_RTS_CTS@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
LBB0_11:
	leaq	(%r8,%r8,4), %rsi
	movl	%eax, 12(%rdx,%rsi,4)
	movl	%ecx, 16(%rdx,%rsi,4)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_minstrel_mcs_groups,8,3        ## @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,4,2            ## @MCS_GROUP_RATES
	.comm	_MINSTREL_CCK_GROUP,4,2         ## @MINSTREL_CCK_GROUP
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.comm	_IEEE80211_TX_RC_USE_RTS_CTS,4,2 ## @IEEE80211_TX_RC_USE_RTS_CTS
	.no_dead_strip	_minstrel_ht_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_ht_set_rate
_minstrel_ht_set_rate:                  ; @minstrel_ht_set_rate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x19, x3
	mov	x20, x2
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _minstrel_mcs_groups@GOTPAGE
Lloh1:
	ldr	x8, [x8, _minstrel_mcs_groups@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x27, _MCS_GROUP_RATES@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MCS_GROUP_RATES@GOTPAGEOFF]
	ldr	w26, [x27]
	mov	x0, x1
	mov	x1, x4
	bl	_minstrel_get_ratestats
	mov	x23, x0
	ldr	w8, [x0, #16]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x24
	mov	x2, x21
	bl	_minstrel_calc_retransmit
LBB0_2:
	ldr	x28, [x23]
	mov	w24, #20
	mov	w0, #20
	mov	w1, #100
	bl	_MINSTREL_FRAC
	cmp	x28, x0
	b.lt	LBB0_5
; %bb.3:
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	x9, [x20]
	mov	w10, #20
	smaddl	x9, w19, w10, x9
	str	w8, [x9, #8]
	ldr	w10, [x23, #12]
	stp	w8, w10, [x9]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20]
	smaddl	x8, w19, w24, x8
	movi.2s	v0, #2
	str	d0, [x8]
	mov	w9, #2
	str	w9, [x8, #8]
LBB0_6:
	ldr	w8, [x27]
	sdiv	w9, w21, w8
Lloh5:
	adrp	x10, _MINSTREL_CCK_GROUP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MINSTREL_CCK_GROUP@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.7:
	ldr	x22, [x22]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	w8, #0
	sdiv	w9, w21, w0
	msub	w9, w9, w0, w21
	ldr	w9, [x22, w9, sxtw #2]
	b	LBB0_9
LBB0_8:
	sdiv	w10, w21, w26
	sxtw	x10, w10
	msub	w9, w9, w8, w21
	add	x10, x25, x10, lsl #3
	ldp	w11, w10, [x10]
	sub	w11, w11, #1
	madd	w9, w11, w8, w9
Lloh8:
	adrp	x8, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w8, w10, w8
LBB0_9:
	ldr	x10, [x20]
	cmp	w19, #1
	b.lt	LBB0_11
; %bb.10:
	mov	w11, #20
	umaddl	x11, w19, w11, x10
	ldr	w12, [x11, #4]
	str	w12, [x11]
Lloh11:
	adrp	x11, _IEEE80211_TX_RC_USE_RTS_CTS@GOTPAGE
Lloh12:
	ldr	x11, [x11, _IEEE80211_TX_RC_USE_RTS_CTS@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	orr	w8, w11, w8
LBB0_11:
	mov	w11, #20
	smaddl	x10, w19, w11, x10
	stp	w9, w8, [x10, #12]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_minstrel_mcs_groups,8,3        ; @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,4,2            ; @MCS_GROUP_RATES
	.comm	_MINSTREL_CCK_GROUP,4,2         ; @MINSTREL_CCK_GROUP
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.comm	_IEEE80211_TX_RC_USE_RTS_CTS,4,2 ; @IEEE80211_TX_RC_USE_RTS_CTS
	.no_dead_strip	_minstrel_ht_set_rate
.subsections_via_symbols
