	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_get_tx_rate
_iwl_mvm_get_tx_rate:                   ## @iwl_mvm_get_tx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rsi
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	(%rsi), %edi
	andl	%edx, %edi
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movq	8(%rbx), %rax
	movl	4(%rax), %eax
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_IWL_RATE_COUNT_LEGACY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_3
LBB0_2:
	movq	(%r15), %rax
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_rate_lowest_index
LBB0_3:
	movq	(%rbx), %rcx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$0, %ebx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	movq	_IWL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_5:
	addl	%eax, %ebx
	movq	_IWL_FIRST_CCK_RATE@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	$0, (%r15)
	setne	%dil
	callq	_BUILD_BUG_ON
	movl	%ebx, %edi
	callq	_iwl_mvm_mac80211_idx_to_hwrate
	movq	_IWL_LAST_CCK_RATE@GOTPCREL(%rip), %rdx
	movl	$0, %ecx
	cmpl	(%rdx), %ebx
	jg	LBB0_7
## %bb.6:
	movq	_RATE_MCS_CCK_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	cmpl	(%r15), %ebx
	cmovll	%r14d, %ecx
	orl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got an HT rate (flags:0x%x/mcs:%d) for a non data frame\n"

	.comm	_IWL_RATE_COUNT_LEGACY,4,2      ## @IWL_RATE_COUNT_LEGACY
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_IWL_FIRST_OFDM_RATE,8,3        ## @IWL_FIRST_OFDM_RATE
	.comm	_IWL_FIRST_CCK_RATE,4,2         ## @IWL_FIRST_CCK_RATE
	.comm	_IWL_LAST_CCK_RATE,4,2          ## @IWL_LAST_CCK_RATE
	.comm	_RATE_MCS_CCK_MSK,4,2           ## @RATE_MCS_CCK_MSK
	.no_dead_strip	_iwl_mvm_get_tx_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_get_tx_rate
_iwl_mvm_get_tx_rate:                   ; @iwl_mvm_get_tx_rate
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldp	w2, w3, [x8]
	and	w0, w9, w2
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _IWL_RATE_COUNT_LEGACY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IWL_RATE_COUNT_LEGACY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.lt	LBB0_3
LBB0_2:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x0, x8, x9, lsl #2
	mov	x1, x20
	bl	_rate_lowest_index
LBB0_3:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _IWL_FIRST_OFDM_RATE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IWL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w8, w10, wzr, eq
	add	w19, w8, w0
Lloh14:
	adrp	x20, _IWL_FIRST_CCK_RATE@GOTPAGE
Lloh15:
	ldr	x20, [x20, _IWL_FIRST_CCK_RATE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, ne
	bl	_BUILD_BUG_ON
	mov	x0, x19
	bl	_iwl_mvm_mac80211_idx_to_hwrate
	ldr	w8, [x20]
Lloh16:
	adrp	x9, _IWL_LAST_CCK_RATE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IWL_LAST_CCK_RATE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w19, w9
	ccmp	w19, w8, #8, le
Lloh19:
	adrp	x8, _RATE_MCS_CCK_MSK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RATE_MCS_CCK_MSK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	csel	w8, wzr, w8, lt
	orr	w0, w8, w0
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got an HT rate (flags:0x%x/mcs:%d) for a non data frame\n"

	.comm	_IWL_RATE_COUNT_LEGACY,4,2      ; @IWL_RATE_COUNT_LEGACY
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_IWL_FIRST_OFDM_RATE,8,3        ; @IWL_FIRST_OFDM_RATE
	.comm	_IWL_FIRST_CCK_RATE,4,2         ; @IWL_FIRST_CCK_RATE
	.comm	_IWL_LAST_CCK_RATE,4,2          ; @IWL_LAST_CCK_RATE
	.comm	_RATE_MCS_CCK_MSK,4,2           ; @RATE_MCS_CCK_MSK
	.no_dead_strip	_iwl_mvm_get_tx_rate
.subsections_via_symbols
