	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_rs_rate_scale_perform
_il4965_rs_rate_scale_perform:          ## @il4965_rs_rate_scale_perform
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_IEEE80211_SKB_CB
	movq	%rax, %r12
	movq	(%rbx), %r13
	movq	_IL_INVALID_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_D_RATE
	movl	(%r13), %edi
	callq	_ieee80211_is_data
	testl	%eax, %eax
	je	LBB0_83
## %bb.1:
	movq	_IEEE80211_TX_CTL_NO_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
LBB0_83:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_il4965_rs_tl_add_packet
	movq	_MAX_TID_COUNT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	je	LBB0_5
## %bb.3:
	movl	16(%r15), %ecx
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.4:
	movq	(%r14), %rdx
	movq	56(%r15), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movslq	%eax, %rcx
	movq	(%rdx,%rcx,8), %rdx
	movq	_IL_AGG_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_26
LBB0_5:
	movl	$0, 20(%r15)
LBB0_6:
	movl	24(%r15), %eax
	movl	$1, %r12d
	subl	%eax, %r12d
	cmpq	$0, 80(%r15)
	cmovel	%eax, %r12d
	movq	64(%r15), %rcx
	movslq	%r12d, %rax
	leaq	(%rax,%rax,4), %rax
	leaq	24(%rcx,%rax,8), %r14
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	24(%rcx,%rax,8), %rdi
	callq	_is_legacy
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_il4965_rs_use_green
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, 28(%r15)
	movl	32(%r15), %esi
	movq	(%r14), %rdx
	leaq	L_.str.1(%rip), %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_D_RATE
	movq	(%r14), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_il4965_rs_get_supported_rates
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_D_RATE
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	8(%r15), %rcx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	movl	(%r15), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.10:
	movq	_IL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
LBB0_11:
	andl	%r13d, %eax
	jmp	LBB0_13
LBB0_12:
	movl	%r13d, %eax
LBB0_13:
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	testl	%eax, %eax
	cmovnel	%eax, %r13d
	btl	%r8d, %r13d
	jae	LBB0_20
## %bb.14:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rdx
	movq	(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.15:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	36(%r15), %ebx
	cmpl	$-1, %ebx
	je	LBB0_23
## %bb.16:
	cmpl	%r8d, %ebx
	jge	LBB0_23
## %bb.17:
	movb	$1, %al
	movl	%eax, -104(%rbp)                ## 4-byte Spill
LBB0_18:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_19:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, %ecx
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r8d
	callq	_il4965_rs_update_rate_tbl
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_il4965_rs_stay_in_table
	movl	%ebx, %edx
	cmpb	$0, -104(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_34
	jmp	LBB0_82
LBB0_20:
	movl	%ebx, %r12d
	leaq	L_.str.3(%rip), %rdi
	callq	_IL_ERR
	cmpq	$0, 80(%r15)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_83
## %bb.21:
	movq	_LQ_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	$0, 80(%r15)
	movq	64(%r15), %rax
	movslq	24(%r15), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,8), %r14
	movl	16(%rax,%rcx,8), %edi
	callq	_il4965_hwrate_to_plcp_idx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	movl	%r12d, %r8d
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_il4965_rs_update_rate_tbl      ## TAILCALL
LBB0_22:
	leaq	L_.str.4(%rip), %rdi
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IL_ERR                         ## TAILCALL
LBB0_23:
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movslq	%r8d, %r9
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	movq	32(%rcx,%rdx,8), %r14
	leaq	(%r9,%r9,2), %rbx
	movq	(%r14,%rbx,8), %rdx
	movslq	16(%r14,%rbx,8), %rsi
	movq	%rdx, %rcx
	subq	%rsi, %rcx
	movq	_RATE_MIN_FAILURE_TH@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	jge	LBB0_27
## %bb.24:
	movq	_RATE_MIN_SUCCESS_TH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jge	LBB0_27
## %bb.25:
	leaq	L_.str.5(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r8d, %ecx
	xorl	%eax, %eax
	callq	_D_RATE
	movq	_IL_INVALID_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14,%rbx,8)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_il4965_rs_stay_in_table
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_82
LBB0_26:
	movl	$1, 20(%r15)
	jmp	LBB0_6
LBB0_27:
	leaq	(%r14,%rbx,8), %rdi
	addq	$8, %rdi
	movl	8(%r14,%rbx,8), %edx
	movl	12(%r14,%rbx,8), %esi
	movl	(%rax,%r9,4), %eax
	imull	%esi, %eax
	leal	64(%rax), %ecx
	addl	$191, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$7, %eax
	cmpl	%eax, %edx
	je	LBB0_29
## %bb.28:
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	leaq	L_.str.6(%rip), %rdi
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	callq	_IL_ERR
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	4(%rdi), %esi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	(%rax,%rcx,4), %edx
	imull	%esi, %edx
	leal	64(%rdx), %eax
	addl	$191, %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$7, %edx
	movl	%edx, (%rdi)
LBB0_29:
	cmpq	$0, 80(%r15)
	je	LBB0_42
## %bb.30:
	movl	40(%r15), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_53
## %bb.31:
	leaq	L_.str.7(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_D_RATE
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_is_legacy
	testq	%rax, %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_33
## %bb.32:
	movl	$1, 44(%r15)
LBB0_33:
	movl	%r12d, 24(%r15)
	movq	$0, 80(%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_il4965_rs_stay_in_table
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_34:
	cmpl	$0, 72(%r15)
	jne	LBB0_82
## %bb.35:
	movl	%edx, %r13d
	movq	%r14, %r12
	movq	64(%r15), %r14
	movslq	24(%r15), %rax
	leaq	(%rax,%rax,4), %rbx
	movq	24(%r14,%rbx,8), %rdi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_39
## %bb.36:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_conf_is_ht
	testl	%eax, %eax
	jne	LBB0_39
## %bb.37:
	movq	48(%r15), %rax
	cmpq	8(%r14,%rbx,8), %rax
	jle	LBB0_39
## %bb.38:
	leaq	L_.str.13(%rip), %rdi
	xorl	%eax, %eax
	callq	_D_RATE
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_il4965_rs_set_stay_in_table
LBB0_39:
	cmpl	$0, 44(%r15)
	movl	%r13d, %edx
	je	LBB0_41
## %bb.40:
	movq	48(%r15), %rax
	cmpq	8(%r14,%rbx,8), %rax
	jge	LBB0_54
LBB0_41:
	movq	%r12, %r14
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_82
LBB0_42:
	movq	%rdi, %r12
	movq	%rbx, -144(%rbp)                ## 8-byte Spill
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	movb	$1, %al
	movl	%eax, -104(%rbp)                ## 4-byte Spill
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	leaq	32(%rax,%rcx,8), %rbx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r8d, %esi
	movl	%r13d, %edx
	callq	_il4965_rs_get_adjacent_rate
	movzbl	%al, %r10d
	movzbl	%ah, %ecx
	movl	36(%r15), %edx
	cmpl	%ecx, %edx
	movq	_RATE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ecx, %r8d
	cmovll	%eax, %r8d
	cmpl	$-1, %edx
	cmovel	%ecx, %r8d
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%eax, %r10d
	je	LBB0_44
## %bb.43:
	movq	(%rbx), %rcx
	movl	%r10d, %edx
	leaq	(%rdx,%rdx,2), %rdx
	movl	8(%rcx,%rdx,8), %ecx
LBB0_44:
	movl	4(%r12), %r11d
	cmpl	%eax, %r8d
	je	LBB0_46
## %bb.45:
	movq	(%rbx), %rdx
	movslq	%r8d, %rsi
	leaq	(%rsi,%rsi,2), %rsi
	movl	8(%rdx,%rsi,8), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
LBB0_46:
	movl	(%r12), %ebx
	movq	_RATE_DECREASE_TH@GOTPCREL(%rip), %rdx
	leaq	L_.str.9(%rip), %rdi
	cmpl	(%rdx), %r11d
	jle	LBB0_60
## %bb.47:
	testl	%ebx, %ebx
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_61
## %bb.48:
	movq	_IL_INVALID_VALUE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	cmpl	%edi, %ecx
	jne	LBB0_66
## %bb.49:
	cmpl	%edi, -52(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_66
## %bb.50:
	xorl	%edx, %edx
	cmpl	%eax, %r8d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_77
LBB0_51:
	movq	_RATE_INCREASE_TH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r11d
	jl	LBB0_77
LBB0_52:
	cmpl	%eax, %r8d
	setne	%r14b
	cmovnel	%r8d, %esi
	movl	$1, %edx
	jmp	LBB0_78
LBB0_53:
	leaq	L_.str.8(%rip), %rdi
	movl	$0, -104(%rbp)                  ## 4-byte Folded Spill
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_D_RATE
	movq	_LQ_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movslq	24(%r15), %rax
	movq	64(%r15), %rcx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,8), %rbx
	movl	16(%rcx,%rax,8), %edi
	callq	_il4965_hwrate_to_plcp_idx
	movq	%rbx, %rdx
	movl	%eax, %ebx
	movq	$0, 80(%r15)
	jmp	LBB0_18
LBB0_54:
	movl	40(%r15), %eax
	movq	_IL_AGG_TPT_THREHOLD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	%r12, %r14
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-132(%rbp), %ebx                ## 4-byte Reload
	jle	LBB0_59
## %bb.55:
	movl	16(%r15), %eax
	btl	%ebx, %eax
	jae	LBB0_59
## %bb.56:
	movq	_MAX_TID_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_59
## %bb.57:
	movq	(%r14), %rax
	movq	56(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_IL_AGG_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_59
## %bb.58:
	leaq	L_.str.14(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_D_RATE
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_il4965_rs_tl_turn_on_agg
LBB0_59:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_il4965_rs_set_stay_in_table
	jmp	LBB0_81
LBB0_60:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
LBB0_61:
	movl	%r11d, -112(%rbp)               ## 4-byte Spill
	movl	%ebx, %r13d
	movl	%r8d, %r14d
	xorl	%eax, %eax
	movl	%r10d, %ebx
	callq	_D_RATE
	movl	%ebx, %r10d
	movq	_RATE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jne	LBB0_64
## %bb.62:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %ebx
LBB0_63:
	cmpl	%eax, %r10d
	setne	%r14b
	movl	$-1, %edx
	movl	%ecx, %esi
	jmp	LBB0_78
LBB0_64:
	movq	_RATE_HIGH_TH@GOTPCREL(%rip), %rcx
	movl	-112(%rbp), %edx                ## 4-byte Reload
	cmpl	(%rcx), %edx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %ebx
	jle	LBB0_95
## %bb.65:
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	jmp	LBB0_78
LBB0_66:
	cmpl	%edi, %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_70
## %bb.67:
	cmpl	%edi, -52(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_70
## %bb.68:
	cmpl	%ebx, %ecx
	jge	LBB0_70
## %bb.69:
	xorl	%edx, %edx
	cmpl	%ebx, -52(%rbp)                 ## 4-byte Folded Reload
	jge	LBB0_70
LBB0_77:
	xorl	%r14d, %r14d
LBB0_78:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r9
	leaq	L_.str.11(%rip), %rdi
	movl	%r10d, %ecx
	movl	%esi, %r13d
	xorl	%eax, %eax
	callq	_D_RATE
	testb	%r14b, %r14b
	je	LBB0_80
## %bb.79:
	movl	%r13d, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_80:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_il4965_rs_stay_in_table
	cmpl	$0, 72(%r15)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_84
LBB0_81:
	movl	%r13d, %edx
LBB0_82:
	movq	%r14, %rdi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %ecx
	movl	%edx, %r14d
	callq	_il4965_rate_n_flags_from_tbl
	movl	%eax, 16(%rbx)
	movl	%r14d, 32(%r15)
	jmp	LBB0_83
LBB0_84:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rax
	cmpq	$0, (%rax)
	je	LBB0_81
## %bb.85:
	movl	%ebx, 40(%r15)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_87
## %bb.86:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_il4965_rs_move_legacy_other
	jmp	LBB0_90
LBB0_95:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%r10d, %edx
	imull	$100, (%rcx,%rdx,4), %edi
	xorl	%edx, %edx
	movl	%r10d, %ecx
	movl	$0, %r14d
	cmpl	%edi, %ebx
	jle	LBB0_63
	jmp	LBB0_78
LBB0_70:
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	xorl	%edx, %edx
	cmpl	%edi, %r9d
	jne	LBB0_74
## %bb.71:
	cmpl	%edi, %ecx
	je	LBB0_77
## %bb.72:
	cmpl	%ebx, %ecx
	jle	LBB0_76
## %bb.73:
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_61
LBB0_74:
	cmpl	%ebx, %r9d
	jg	LBB0_51
	jmp	LBB0_77
LBB0_87:
	movq	(%rbx), %rdi
	callq	_is_siso
	movq	%r14, %rdi
	movq	%r15, %rsi
	testq	%rax, %rax
	je	LBB0_89
## %bb.88:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_il4965_rs_move_siso_to_other
	jmp	LBB0_90
LBB0_89:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_il4965_rs_move_mimo2_to_other
LBB0_90:
	cmpq	$0, 80(%r15)
	movl	%r13d, %edx
	je	LBB0_34
## %bb.91:
	movq	64(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	24(%r15), %rax
	movl	$1, %ecx
	subq	%rax, %rcx
	leaq	(%rcx,%rcx,4), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_RATE_COUNT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_94
## %bb.92:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rbx
	addq	$32, %rbx
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_93:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_il4965_rs_rate_scale_clear_win
	incq	%r12
	movslq	(%r13), %rax
	addq	$24, %r14
	cmpq	%rax, %r12
	jl	LBB0_93
LBB0_94:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%r14,%rbx,8), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	16(%r14,%rbx,8), %edi
	callq	_il4965_hwrate_to_plcp_idx
	movl	%eax, %r12d
	movl	16(%r14,%rbx,8), %esi
	leaq	L_.str.12(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_D_RATE
	movl	16(%r14,%rbx,8), %edx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_il4965_rs_fill_link_cmd
	leaq	56(%r15), %rsi
	movq	_CMD_ASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_il_send_lq_cmd
	movl	%r12d, %edx
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_82
LBB0_76:
	movq	_RATE_INCREASE_TH@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %r11d
	jge	LBB0_52
	jmp	LBB0_77
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_INVALID,4,2               ## @RATE_INVALID
	.comm	_IL_INVALID_VALUE,4,2           ## @IL_INVALID_VALUE
	.comm	_MAX_TID_COUNT,4,2              ## @MAX_TID_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rate scale calculate new rate for skb\n"

	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ## @IEEE80211_TX_CTL_NO_ACK
	.comm	_IL_AGG_OFF,8,3                 ## @IL_AGG_OFF
L_.str.1:                               ## @.str.1
	.asciz	"Rate scale idx %d for type %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"mask 0x%04X\n"

	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_IL_FIRST_OFDM_RATE,4,2         ## @IL_FIRST_OFDM_RATE
L_.str.3:                               ## @.str.3
	.asciz	"Current Rate is not valid\n"

	.comm	_LQ_NONE,8,3                    ## @LQ_NONE
L_.str.4:                               ## @.str.4
	.asciz	"tbl->expected_tpt is NULL\n"

	.comm	_RATE_MIN_FAILURE_TH,8,3        ## @RATE_MIN_FAILURE_TH
	.comm	_RATE_MIN_SUCCESS_TH,4,2        ## @RATE_MIN_SUCCESS_TH
L_.str.5:                               ## @.str.5
	.asciz	"LQ: still below TH. succ=%d total=%d for idx %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"expected_tpt should have been calculated by now\n"

L_.str.7:                               ## @.str.7
	.asciz	"LQ: SWITCHING TO NEW TBL suc=%d cur-tpt=%d old-tpt=%d\n"

L_.str.8:                               ## @.str.8
	.asciz	"LQ: GOING BACK TO THE OLD TBL suc=%d cur-tpt=%d old-tpt=%d\n"

	.comm	_RATE_DECREASE_TH,4,2           ## @RATE_DECREASE_TH
L_.str.9:                               ## @.str.9
	.asciz	"decrease rate because of low success_ratio\n"

	.comm	_RATE_INCREASE_TH,4,2           ## @RATE_INCREASE_TH
L_.str.10:                              ## @.str.10
	.asciz	"decrease rate because of low tpt\n"

	.comm	_RATE_HIGH_TH,4,2               ## @RATE_HIGH_TH
L_.str.11:                              ## @.str.11
	.asciz	"choose rate scale idx %d action %d low %d high %d type %d\n"

	.comm	_RATE_COUNT,4,2                 ## @RATE_COUNT
L_.str.12:                              ## @.str.12
	.asciz	"Switch current  mcs: %X idx: %d\n"

	.comm	_CMD_ASYNC,4,2                  ## @CMD_ASYNC
L_.str.13:                              ## @.str.13
	.asciz	"LQ: STAY in legacy table\n"

	.comm	_IL_AGG_TPT_THREHOLD,4,2        ## @IL_AGG_TPT_THREHOLD
L_.str.14:                              ## @.str.14
	.asciz	"try to aggregate tid %d\n"

	.no_dead_strip	_il4965_rs_rate_scale_perform
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_rs_rate_scale_perform
_il4965_rs_rate_scale_perform:          ; @il4965_rs_rate_scale_perform
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x25, [x0, #8]
	mov	x0, x1
	bl	_IEEE80211_SKB_CB
	mov	x21, x0
	ldr	x27, [x22]
Lloh0:
	adrp	x28, _IL_INVALID_VALUE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _IL_INVALID_VALUE@GOTPAGEOFF]
	ldr	w24, [x28]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_RATE
	ldr	w0, [x27]
	bl	_ieee80211_is_data
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x21]
Lloh4:
	adrp	x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_3:
	ldr	x8, [x23]
	ldr	x9, [x19, #8]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x27
	bl	_il4965_rs_tl_add_packet
                                        ; kill: def $w0 killed $w0 def $x0
Lloh7:
	adrp	x8, _MAX_TID_COUNT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_TID_COUNT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	str	x0, [sp, #64]                   ; 8-byte Folded Spill
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [x19, #16]
	lsr	w8, w8, w0
	tbz	w8, #0, LBB0_6
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x19, #56]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, w0, sxtw #3]
Lloh10:
	adrp	x9, _IL_AGG_OFF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IL_AGG_OFF@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_45
LBB0_6:
	str	wzr, [x19, #20]
LBB0_7:
	ldr	x8, [x19, #80]
	ldr	w9, [x19, #24]
	mov	w10, #1
	sub	w10, w10, w9
	cmp	x8, #0
	csel	w21, w9, w10, eq
	ldr	x26, [x19, #64]
	mov	w8, #40
	smaddl	x22, w21, w8, x26
	str	x22, [sp, #88]                  ; 8-byte Folded Spill
	ldr	x0, [x22, #24]!
	bl	_is_legacy
	str	x25, [sp, #72]                  ; 8-byte Folded Spill
	cbz	x0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	mov	x1, x23
	bl	_il4965_rs_use_green
LBB0_10:
	str	w0, [sp, #84]                   ; 4-byte Folded Spill
	str	w0, [x19, #28]
	ldrsw	x25, [x19, #32]
	ldr	x8, [x22]
	stp	x25, x8, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_RATE
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x27
	bl	_il4965_rs_get_supported_rates
	mov	x27, x0
	str	x27, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_D_RATE
	ldr	x0, [x22]
	bl	_is_legacy
	cbz	x0, LBB0_14
; %bb.11:
	ldr	x9, [x19, #8]
Lloh17:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x8]
	ldr	w8, [x19]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.12:
Lloh20:
	adrp	x9, _IL_FIRST_OFDM_RATE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsl	w8, w8, w9
LBB0_13:
	and	w8, w8, w27
	b	LBB0_15
LBB0_14:
	mov	x8, x27
LBB0_15:
	cmp	w8, #0
	csel	w27, w27, w8, eq
	lsr	w8, w27, w25
	tbz	w8, #0, LBB0_34
; %bb.16:
	ldr	x8, [sp, #88]                   ; 8-byte Folded Reload
	ldr	x9, [x8]
	cbz	x9, LBB0_36
; %bb.17:
	ldr	w8, [x19, #36]
	cmn	w8, #1
	b.eq	LBB0_37
; %bb.18:
	cmp	w8, w25
	b.ge	LBB0_37
; %bb.19:
	mov	w21, #1
	mov	x25, x8
LBB0_20:
	mov	x0, x20
	mov	x1, x19
	ldr	x2, [sp, #88]                   ; 8-byte Folded Reload
	mov	x3, x25
	ldr	w4, [sp, #84]                   ; 4-byte Folded Reload
	bl	_il4965_rs_update_rate_tbl
	mov	x0, x19
	mov	w1, #0
	bl	_il4965_rs_stay_in_table
	tbnz	w21, #0, LBB0_47
LBB0_21:
	ldr	w8, [x19, #72]
	cbnz	w8, LBB0_47
; %bb.22:
	ldr	x21, [x19, #64]
	ldrsw	x22, [x19, #24]
	mov	w8, #40
	madd	x8, x22, x8, x21
	ldr	x0, [x8, #24]
	bl	_is_legacy
	cbz	x0, LBB0_26
; %bb.23:
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	_conf_is_ht
	cbnz	w0, LBB0_26
; %bb.24:
	ldr	x8, [x19, #48]
	mov	w9, #40
	madd	x9, x22, x9, x21
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.le	LBB0_26
; %bb.25:
Lloh23:
	adrp	x0, l_.str.13@PAGE
Lloh24:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_D_RATE
	mov	x0, x20
	mov	w1, #1
	mov	x2, x19
	bl	_il4965_rs_set_stay_in_table
LBB0_26:
	ldr	w8, [x19, #44]
	cbz	w8, LBB0_47
; %bb.27:
	ldr	x8, [x19, #48]
	mov	w9, #40
	madd	x9, x22, x9, x21
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.lt	LBB0_47
; %bb.28:
	ldr	w8, [x19, #40]
Lloh25:
	adrp	x9, _IL_AGG_TPT_THREHOLD@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IL_AGG_TPT_THREHOLD@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w8, w9
	ldr	x21, [sp, #64]                  ; 8-byte Folded Reload
	b.le	LBB0_33
; %bb.29:
	ldr	w8, [x19, #16]
	lsr	w8, w8, w21
	tbz	w8, #0, LBB0_33
; %bb.30:
Lloh28:
	adrp	x8, _MAX_TID_COUNT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MAX_TID_COUNT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_33
; %bb.31:
	ldr	x8, [x20]
	ldr	x9, [x19, #56]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, w21, sxtw #3]
Lloh31:
	adrp	x9, _IL_AGG_OFF@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IL_AGG_OFF@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_33
; %bb.32:
	str	x21, [sp]
Lloh34:
	adrp	x0, l_.str.14@PAGE
Lloh35:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_D_RATE
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_il4965_rs_tl_turn_on_agg
LBB0_33:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_il4965_rs_set_stay_in_table
	b	LBB0_47
LBB0_34:
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IL_ERR
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_2
; %bb.35:
Lloh38:
	adrp	x8, _LQ_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _LQ_NONE@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	str	x8, [x22]
	str	xzr, [x19, #80]
	ldr	x8, [x19, #64]
	ldrsw	x9, [x19, #24]
	mov	w10, #40
	madd	x22, x9, x10, x8
	ldr	w0, [x22, #16]
	bl	_il4965_hwrate_to_plcp_idx
	mov	x3, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	ldr	w4, [sp, #84]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	b	_il4965_rs_update_rate_tbl
LBB0_36:
Lloh41:
	adrp	x0, l_.str.4@PAGE
Lloh42:
	add	x0, x0, l_.str.4@PAGEOFF
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	b	_IL_ERR
LBB0_37:
	sxtw	x8, w21
	mov	w10, #40
	madd	x15, x8, x10, x26
	ldr	x26, [x15, #32]!
	mov	w8, #24
	madd	x14, x25, x8, x26
	ldr	x8, [x14]
	ldrsw	x10, [x14, #16]
Lloh43:
	adrp	x11, _RATE_MIN_FAILURE_TH@GOTPAGE
Lloh44:
	ldr	x11, [x11, _RATE_MIN_FAILURE_TH@GOTPAGEOFF]
Lloh45:
	ldr	x11, [x11]
Lloh46:
	adrp	x12, _RATE_MIN_SUCCESS_TH@GOTPAGE
Lloh47:
	ldr	x12, [x12, _RATE_MIN_SUCCESS_TH@GOTPAGEOFF]
Lloh48:
	ldr	w12, [x12]
	sub	x13, x8, x10
	cmp	x13, x11
	ccmp	w10, w12, #0, lt
	b.lt	LBB0_46
; %bb.38:
	mov	w8, #24
	madd	x12, x25, x8, x26
	ldr	w10, [x12, #8]!
	mov	x26, x12
	ldr	w8, [x26, #4]!
	ldr	w9, [x9, x25, lsl #2]
	mul	w9, w9, w8
	add	w11, w9, #64
	add	w9, w9, #191
	cmp	w11, #0
	csel	w9, w9, w11, lt
	cmp	w10, w9, asr #7
	stp	x14, x15, [sp, #48]             ; 16-byte Folded Spill
	b.eq	LBB0_40
; %bb.39:
Lloh49:
	adrp	x0, l_.str.6@PAGE
Lloh50:
	add	x0, x0, l_.str.6@PAGEOFF
	str	x12, [sp, #40]                  ; 8-byte Folded Spill
	bl	_IL_ERR
	ldr	x12, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w8, [x26]
	ldr	x9, [sp, #88]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	ldr	w9, [x9, x25, lsl #2]
	mul	w9, w9, w8
	add	w10, w9, #64
	add	w9, w9, #191
	cmp	w10, #0
	csel	w9, w9, w10, lt
	asr	w10, w9, #7
	str	w10, [x12]
LBB0_40:
	ldr	x9, [x19, #80]
	cbz	x9, LBB0_48
; %bb.41:
	ldr	w9, [x19, #40]
	cmp	w10, w9
	b.le	LBB0_59
; %bb.42:
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh51:
	adrp	x0, l_.str.7@PAGE
Lloh52:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_D_RATE
	ldr	x0, [x22]
	bl	_is_legacy
	cbnz	x0, LBB0_44
; %bb.43:
	mov	w8, #1
	str	w8, [x19, #44]
LBB0_44:
	str	w21, [x19, #24]
	str	xzr, [x19, #80]
	mov	x0, x19
	mov	w1, #0
	bl	_il4965_rs_stay_in_table
	b	LBB0_21
LBB0_45:
	mov	w8, #1
	str	w8, [x19, #20]
	b	LBB0_7
LBB0_46:
	mov	x9, x25
	stp	x8, x9, [sp, #8]
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	str	x10, [sp]
Lloh53:
	adrp	x0, l_.str.5@PAGE
Lloh54:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_D_RATE
	ldr	w8, [x28]
	mov	w9, #24
	madd	x9, x25, x9, x26
	str	w8, [x9, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_il4965_rs_stay_in_table
LBB0_47:
	mov	x0, x20
	ldr	x20, [sp, #88]                  ; 8-byte Folded Reload
	mov	x1, x20
	mov	x2, x25
	ldr	w3, [sp, #84]                   ; 4-byte Folded Reload
	bl	_il4965_rate_n_flags_from_tbl
	str	w0, [x20, #16]
	str	w25, [x19, #32]
	b	LBB0_2
LBB0_48:
	str	x26, [sp, #40]                  ; 8-byte Folded Spill
	mov	x21, x12
	ldr	x3, [x22]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x27
	bl	_il4965_rs_get_adjacent_rate
	and	w27, w0, #0xff
	ubfx	w9, w0, #8, #8
	ldr	w8, [x19, #36]
	cmp	w8, w9
	mov	w10, #-1
	ccmp	w8, w10, #4, lt
Lloh55:
	adrp	x14, _RATE_INVALID@GOTPAGE
Lloh56:
	ldr	x14, [x14, _RATE_INVALID@GOTPAGEOFF]
	ldr	w8, [x14]
	csel	w13, w8, w9, ne
	mov	x9, x24
	cmp	w27, w8
	ldr	x26, [sp, #56]                  ; 8-byte Folded Reload
	b.eq	LBB0_50
; %bb.49:
	ldr	x9, [x26]
	mov	w10, #24
	umaddl	x9, w27, w10, x9
	ldr	w9, [x9, #8]
LBB0_50:
	ldr	w12, [x21]
	ldr	x10, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w21, [x10]
	cmp	w13, w8
	b.eq	LBB0_52
; %bb.51:
	ldr	x10, [x26]
	mov	w11, #24
	smaddl	x10, w13, w11, x10
	ldr	w24, [x10, #8]
LBB0_52:
Lloh57:
	adrp	x10, _RATE_DECREASE_TH@GOTPAGE
Lloh58:
	ldr	x10, [x10, _RATE_DECREASE_TH@GOTPAGEOFF]
Lloh59:
	ldr	w10, [x10]
Lloh60:
	adrp	x0, l_.str.9@PAGE
Lloh61:
	add	x0, x0, l_.str.9@PAGEOFF
	cmp	w21, w10
	b.le	LBB0_69
; %bb.53:
	cbz	w12, LBB0_69
; %bb.54:
	ldr	w10, [x28]
	cmp	w9, w10
	b.ne	LBB0_60
; %bb.55:
	cmp	w24, w10
	b.ne	LBB0_60
; %bb.56:
	mov	x28, x12
	mov	w9, #0
	cmp	w13, w8
	b.eq	LBB0_76
LBB0_57:
Lloh62:
	adrp	x10, _RATE_INCREASE_TH@GOTPAGE
Lloh63:
	ldr	x10, [x10, _RATE_INCREASE_TH@GOTPAGEOFF]
Lloh64:
	ldr	w10, [x10]
	cmp	w21, w10
	b.lt	LBB0_76
LBB0_58:
	cmp	w13, w8
	csel	w25, w25, w13, eq
	cset	w21, ne
	mov	w9, #1
	b	LBB0_77
LBB0_59:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh65:
	adrp	x0, l_.str.8@PAGE
Lloh66:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_D_RATE
Lloh67:
	adrp	x8, _LQ_NONE@GOTPAGE
Lloh68:
	ldr	x8, [x8, _LQ_NONE@GOTPAGEOFF]
Lloh69:
	ldr	x8, [x8]
	str	x8, [x22]
	ldrsw	x8, [x19, #24]
	ldr	x9, [x19, #64]
	mov	w10, #40
	madd	x8, x8, x10, x9
	str	x8, [sp, #88]                   ; 8-byte Folded Spill
	ldr	w0, [x8, #16]
	bl	_il4965_hwrate_to_plcp_idx
	mov	x25, x0
	mov	w21, #0
	str	xzr, [x19, #80]
	b	LBB0_20
LBB0_60:
	cmp	w9, w10
	b.eq	LBB0_65
; %bb.61:
	cmp	w24, w10
	b.eq	LBB0_65
; %bb.62:
	cmp	w9, w12
	b.ge	LBB0_65
; %bb.63:
	cmp	w24, w12
	b.ge	LBB0_65
LBB0_64:
	mov	x28, x12
	b	LBB0_74
LBB0_65:
	cmp	w24, w10
	b.ne	LBB0_75
; %bb.66:
	cmp	w9, w10
	b.eq	LBB0_64
; %bb.67:
	cmp	w9, w12
	b.le	LBB0_85
; %bb.68:
Lloh70:
	adrp	x0, l_.str.10@PAGE
Lloh71:
	add	x0, x0, l_.str.10@PAGEOFF
LBB0_69:
	mov	x24, x13
	mov	x28, x12
	mov	x26, x14
	bl	_D_RATE
	ldr	w8, [x26]
	cmp	w27, w8
	b.ne	LBB0_72
; %bb.70:
	mov	x0, x25
	mov	x13, x24
LBB0_71:
	cmp	w27, w8
	cset	w21, ne
	mov	w9, #-1
	mov	x25, x0
	b	LBB0_77
LBB0_72:
Lloh72:
	adrp	x9, _RATE_HIGH_TH@GOTPAGE
Lloh73:
	ldr	x9, [x9, _RATE_HIGH_TH@GOTPAGEOFF]
Lloh74:
	ldr	w9, [x9]
	cmp	w21, w9
	mov	x13, x24
	b.gt	LBB0_74
; %bb.73:
	ldr	x9, [sp, #88]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	ldr	w9, [x9, w27, uxtw #2]
	mov	w10, #100
	mul	w9, w9, w10
	mov	x0, x27
	cmp	w28, w9
	b.le	LBB0_71
LBB0_74:
	mov	w9, #0
	mov	w21, #0
	b	LBB0_77
LBB0_75:
	mov	w9, #0
	mov	x28, x12
	cmp	w24, w12
	b.gt	LBB0_57
LBB0_76:
	mov	x21, x9
LBB0_77:
	ldr	x8, [x22]
	stp	x13, x8, [sp, #24]
	stp	x9, x27, [sp, #8]
	mov	x8, x25
	str	x8, [sp]
Lloh75:
	adrp	x0, l_.str.11@PAGE
Lloh76:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_D_RATE
	tbz	w21, #0, LBB0_79
; %bb.78:
	mov	w21, #1
	b	LBB0_20
LBB0_79:
	mov	x0, x19
	mov	w1, #0
	bl	_il4965_rs_stay_in_table
	ldr	w8, [x19, #72]
	cbnz	w8, LBB0_47
; %bb.80:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	cbz	x8, LBB0_47
; %bb.81:
	str	w28, [x19, #40]
	ldr	x0, [x22]
	bl	_is_legacy
	cbz	x0, LBB0_83
; %bb.82:
	mov	x0, x20
	mov	x1, x19
	ldr	x2, [sp, #72]                   ; 8-byte Folded Reload
	mov	x3, x23
	mov	x4, x25
	bl	_il4965_rs_move_legacy_other
	b	LBB0_87
LBB0_83:
	ldr	x0, [x22]
	bl	_is_siso
	cbz	x0, LBB0_86
; %bb.84:
	mov	x0, x20
	mov	x1, x19
	ldr	x2, [sp, #72]                   ; 8-byte Folded Reload
	mov	x3, x23
	mov	x4, x25
	bl	_il4965_rs_move_siso_to_other
	b	LBB0_87
LBB0_85:
	mov	x28, x12
Lloh77:
	adrp	x9, _RATE_INCREASE_TH@GOTPAGE
Lloh78:
	ldr	x9, [x9, _RATE_INCREASE_TH@GOTPAGEOFF]
Lloh79:
	ldr	w9, [x9]
	cmp	w21, w9
	b.ge	LBB0_58
	b	LBB0_74
LBB0_86:
	mov	x0, x20
	mov	x1, x19
	ldr	x2, [sp, #72]                   ; 8-byte Folded Reload
	mov	x3, x23
	mov	x4, x25
	bl	_il4965_rs_move_mimo2_to_other
LBB0_87:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_21
; %bb.88:
	ldr	x21, [x19, #64]
	ldrsw	x8, [x19, #24]
	mov	w9, #1
	sub	x22, x9, x8
	mov	w8, #40
	madd	x8, x22, x8, x21
	str	x8, [sp, #88]                   ; 8-byte Folded Spill
Lloh80:
	adrp	x23, _RATE_COUNT@GOTPAGE
Lloh81:
	ldr	x23, [x23, _RATE_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_91
; %bb.89:
	mov	x24, #0
	mov	x25, #0
	mov	w8, #40
	madd	x8, x22, x8, x21
	add	x26, x8, #32
LBB0_90:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	add	x0, x8, x24
	bl	_il4965_rs_rate_scale_clear_win
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #24
	cmp	x25, x8
	b.lt	LBB0_90
LBB0_91:
	mov	w8, #40
	madd	x21, x22, x8, x21
	ldr	w0, [x21, #16]
	bl	_il4965_hwrate_to_plcp_idx
	mov	x25, x0
	ldr	w8, [x21, #16]
	stp	x8, x25, [sp]
Lloh82:
	adrp	x0, l_.str.12@PAGE
Lloh83:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_D_RATE
	ldr	w2, [x21, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_il4965_rs_fill_link_cmd
	add	x1, x19, #56
Lloh84:
	adrp	x8, _CMD_ASYNC@GOTPAGE
Lloh85:
	ldr	x8, [x8, _CMD_ASYNC@GOTPAGEOFF]
Lloh86:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #0
	bl	_il_send_lq_cmd
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	b	LBB0_47
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpAdd	Lloh82, Lloh83
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_INVALID,4,2               ; @RATE_INVALID
	.comm	_IL_INVALID_VALUE,4,2           ; @IL_INVALID_VALUE
	.comm	_MAX_TID_COUNT,4,2              ; @MAX_TID_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rate scale calculate new rate for skb\n"

	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ; @IEEE80211_TX_CTL_NO_ACK
	.comm	_IL_AGG_OFF,8,3                 ; @IL_AGG_OFF
l_.str.1:                               ; @.str.1
	.asciz	"Rate scale idx %d for type %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"mask 0x%04X\n"

	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_IL_FIRST_OFDM_RATE,4,2         ; @IL_FIRST_OFDM_RATE
l_.str.3:                               ; @.str.3
	.asciz	"Current Rate is not valid\n"

	.comm	_LQ_NONE,8,3                    ; @LQ_NONE
l_.str.4:                               ; @.str.4
	.asciz	"tbl->expected_tpt is NULL\n"

	.comm	_RATE_MIN_FAILURE_TH,8,3        ; @RATE_MIN_FAILURE_TH
	.comm	_RATE_MIN_SUCCESS_TH,4,2        ; @RATE_MIN_SUCCESS_TH
l_.str.5:                               ; @.str.5
	.asciz	"LQ: still below TH. succ=%d total=%d for idx %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"expected_tpt should have been calculated by now\n"

l_.str.7:                               ; @.str.7
	.asciz	"LQ: SWITCHING TO NEW TBL suc=%d cur-tpt=%d old-tpt=%d\n"

l_.str.8:                               ; @.str.8
	.asciz	"LQ: GOING BACK TO THE OLD TBL suc=%d cur-tpt=%d old-tpt=%d\n"

	.comm	_RATE_DECREASE_TH,4,2           ; @RATE_DECREASE_TH
l_.str.9:                               ; @.str.9
	.asciz	"decrease rate because of low success_ratio\n"

	.comm	_RATE_INCREASE_TH,4,2           ; @RATE_INCREASE_TH
l_.str.10:                              ; @.str.10
	.asciz	"decrease rate because of low tpt\n"

	.comm	_RATE_HIGH_TH,4,2               ; @RATE_HIGH_TH
l_.str.11:                              ; @.str.11
	.asciz	"choose rate scale idx %d action %d low %d high %d type %d\n"

	.comm	_RATE_COUNT,4,2                 ; @RATE_COUNT
l_.str.12:                              ; @.str.12
	.asciz	"Switch current  mcs: %X idx: %d\n"

	.comm	_CMD_ASYNC,4,2                  ; @CMD_ASYNC
l_.str.13:                              ; @.str.13
	.asciz	"LQ: STAY in legacy table\n"

	.comm	_IL_AGG_TPT_THREHOLD,4,2        ; @IL_AGG_TPT_THREHOLD
l_.str.14:                              ; @.str.14
	.asciz	"try to aggregate tid %d\n"

	.no_dead_strip	_il4965_rs_rate_scale_perform
.subsections_via_symbols
