	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_get_rate
_minstrel_get_rate:                     ## @minstrel_get_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	16(%rcx), %rdi
	callq	_IEEE80211_SKB_CB
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_rate_control_send_low
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$4, %eax
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.3:
	cmpl	$0, 8(%rbx)
	je	LBB0_6
LBB0_5:
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_6:
	movq	(%rbx), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	setne	%al
	sete	%r13b
	shlq	$2, %rax
LBB0_7:
	movl	(%r12), %ecx
	movl	8(%r12), %esi
	leal	1(%rcx), %edx
	movl	(%r15,%rax), %eax
	imull	%edx, %eax
	movl	%edx, (%r12)
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$37, %rax
	addl	%edx, %eax
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	movl	%eax, %esi
	subl	4(%r12), %esi
	sarl	%edx
	subl	%edx, %esi
	movl	12(%r12), %edi
	movl	$0, 12(%r12)
	js	LBB0_1
## %bb.8:
	testb	%r13b, %r13b
	jne	LBB0_10
## %bb.9:
	testl	%edi, %edi
	jne	LBB0_1
LBB0_10:
	cmpl	$9999, %ecx                     ## imm = 0x270F
	jl	LBB0_12
## %bb.11:
	movl	$0, 8(%r12)
	movq	$0, (%r12)
	jmp	LBB0_14
LBB0_12:
	movl	16(%r12), %ecx
	addl	%ecx, %ecx
	cmpl	%ecx, %esi
	jle	LBB0_14
## %bb.13:
	negl	%edx
	addl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, 4(%r12)
LBB0_14:
	movq	%r12, %rdi
	callq	_minstrel_get_next_sample
	movq	32(%r12), %rcx
	movl	%eax, %eax
	leaq	(%rax,%rax,4), %rbx
	testb	%r13b, %r13b
	je	LBB0_18
## %bb.15:
	movq	24(%r12), %rax
	movq	(%rax), %rax
	movq	(%rcx,%rbx,8), %rdx
	leaq	(%rax,%rax,4), %rax
	cmpq	(%rcx,%rax,8), %rdx
	jle	LBB0_18
## %bb.16:
	cmpl	$19, 8(%rcx,%rbx,8)
	jg	LBB0_18
## %bb.17:
	movq	_IEEE80211_TX_CTL_RATE_CTRL_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	addq	$8, %r15
	incl	8(%r12)
	jmp	LBB0_25
LBB0_18:
	movq	16(%rcx,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.19:
	incl	4(%r12)
	testq	%rax, %rax
	jle	LBB0_21
## %bb.20:
	leaq	(%rcx,%rbx,8), %rdx
	addq	$16, %rdx
	decq	%rax
	movq	%rax, (%rdx)
LBB0_21:
	testb	%r13b, %r13b
	jne	LBB0_24
## %bb.22:
	movq	24(%rcx,%rbx,8), %r15
	movl	$95, %edi
	movl	$100, %esi
	callq	_MINSTREL_FRAC
	cmpq	%rax, %r15
	jg	LBB0_1
## %bb.23:
	movq	32(%r12), %rcx
LBB0_24:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_25:
	movl	$1, 12(%r12)
	leaq	(%rcx,%rbx,8), %rdi
	movl	32(%rcx,%rbx,8), %eax
	movl	%eax, 4(%r15)
	movq	%r14, %rsi
	callq	_minstrel_get_retry_count
	movl	%eax, (%r15)
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_TX_CTL_RATE_CTRL_PROBE,4,2 ## @IEEE80211_TX_CTL_RATE_CTRL_PROBE
	.no_dead_strip	_minstrel_get_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_rate
_minstrel_get_rate:                     ; @minstrel_get_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	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	ldr	x0, [x3, #16]
	bl	_IEEE80211_SKB_CB
	mov	x19, x0
	ldr	x24, [x0, #8]
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_rate_control_send_low
	cbz	x0, LBB0_2
LBB0_1:
	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_2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_5
LBB0_4:
	mov	w22, #0
	mov	w8, #4
	b	LBB0_6
LBB0_5:
	ldr	x8, [x22]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w8, ne
	cset	w22, eq
	lsl	x8, x8, #2
LBB0_6:
	ldr	w9, [x21, x8]
	ldp	w8, w11, [x20]
	add	w10, w8, #1
	str	w10, [x20]
	mul	w9, w10, w9
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x13, x9, #63
	asr	x9, x9, #37
	ldp	w10, w12, [x20, #8]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	add	w9, w9, w13
	sub	w11, w9, w11
	str	wzr, [x20, #12]
	subs	w11, w11, w10
	b.mi	LBB0_1
; %bb.7:
	tbnz	w22, #0, LBB0_9
; %bb.8:
	cbnz	w12, LBB0_1
LBB0_9:
	mov	w12, #9999
	cmp	w8, w12
	b.lt	LBB0_11
; %bb.10:
	str	wzr, [x20, #8]
	str	xzr, [x20]
	b	LBB0_13
LBB0_11:
	ldr	w8, [x20, #16]
	lsl	w8, w8, #1
	cmp	w11, w8
	b.le	LBB0_13
; %bb.12:
	neg	w10, w10
	add	w9, w9, w10
	sub	w8, w9, w8
	str	w8, [x20, #4]
LBB0_13:
	mov	x0, x20
	bl	_minstrel_get_next_sample
	ldr	x8, [x20, #32]
	mov	w21, w0
	cbz	w22, LBB0_17
; %bb.14:
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
	mov	w10, #40
	mul	x11, x21, x10
	ldr	x11, [x8, x11]
	mul	x9, x9, x10
	ldr	x9, [x8, x9]
	cmp	x11, x9
	b.le	LBB0_17
; %bb.15:
	mov	w9, #40
	madd	x9, x21, x9, x8
	ldr	w9, [x9, #8]
	cmp	w9, #19
	b.gt	LBB0_17
; %bb.16:
Lloh0:
	adrp	x9, _IEEE80211_TX_CTL_RATE_CTRL_PROBE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_TX_CTL_RATE_CTRL_PROBE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w10, [x19]
	orr	w9, w10, w9
	str	w9, [x19]
	add	x24, x24, #8
	ldr	w9, [x20, #8]
	add	w9, w9, #1
	str	w9, [x20, #8]
	b	LBB0_23
LBB0_17:
	mov	w9, #40
	madd	x9, x21, x9, x8
	ldr	x10, [x9, #16]!
	cbz	x10, LBB0_1
; %bb.18:
	ldr	w11, [x20, #4]
	add	w11, w11, #1
	str	w11, [x20, #4]
	subs	x10, x10, #1
	b.lt	LBB0_20
; %bb.19:
	str	x10, [x9]
LBB0_20:
	tbnz	w22, #0, LBB0_23
; %bb.21:
	mov	w9, #40
	madd	x8, x21, x9, x8
	ldr	x22, [x8, #24]
	mov	w0, #95
	mov	w1, #100
	bl	_MINSTREL_FRAC
	cmp	x22, x0
	b.gt	LBB0_1
; %bb.22:
	ldr	x8, [x20, #32]
LBB0_23:
	mov	w9, #1
	str	w9, [x20, #12]
	mov	w9, #40
	madd	x0, x21, x9, x8
	ldr	w8, [x0, #32]
	str	w8, [x24, #4]
	mov	x1, x19
	bl	_minstrel_get_retry_count
	str	w0, [x24]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_TX_CTL_RATE_CTRL_PROBE,4,2 ; @IEEE80211_TX_CTL_RATE_CTRL_PROBE
	.no_dead_strip	_minstrel_get_rate
.subsections_via_symbols
