	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_legacy_rate_to_mac80211_idx ## -- Begin function iwl_mvm_legacy_rate_to_mac80211_idx
	.p2align	4, 0x90
_iwl_mvm_legacy_rate_to_mac80211_idx:   ## @iwl_mvm_legacy_rate_to_mac80211_idx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	xorl	%r8d, %r8d
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_IWL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_2:
	movq	_IWL_RATE_COUNT_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %eax
	cmpl	%ecx, %r8d
	jge	LBB0_7
## %bb.3:
	movq	_RATE_LEGACY_RATE_MSK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %edi
	movq	_fw_rate_idx_to_plcp@GOTPCREL(%rip), %rsi
	movslq	%r8d, %rdx
	shlq	$2, %rdx
	addq	(%rsi), %rdx
	subl	%r8d, %ecx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edi, (%rdx,%rsi,4)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rsi
	cmpl	%esi, %ecx
	jne	LBB0_4
LBB0_7:
	popq	%rbp
	retq
LBB0_5:
	movl	%esi, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_LEGACY_RATE_MSK,4,2       ## @RATE_LEGACY_RATE_MSK
	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
	.comm	_IWL_FIRST_OFDM_RATE,4,2        ## @IWL_FIRST_OFDM_RATE
	.comm	_IWL_RATE_COUNT_LEGACY,4,2      ## @IWL_RATE_COUNT_LEGACY
	.comm	_fw_rate_idx_to_plcp,8,3        ## @fw_rate_idx_to_plcp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_legacy_rate_to_mac80211_idx ; -- Begin function iwl_mvm_legacy_rate_to_mac80211_idx
	.p2align	2
_iwl_mvm_legacy_rate_to_mac80211_idx:   ; @iwl_mvm_legacy_rate_to_mac80211_idx
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _IWL_FIRST_OFDM_RATE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IWL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w1
	csel	w10, w10, wzr, eq
Lloh6:
	adrp	x9, _IWL_RATE_COUNT_LEGACY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IWL_RATE_COUNT_LEGACY@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x9]
	cmp	w10, w11
	b.ge	LBB0_4
; %bb.1:
	mov	x8, x0
	mov	x0, #0
Lloh9:
	adrp	x9, _RATE_LEGACY_RATE_MSK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RATE_LEGACY_RATE_MSK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh12:
	adrp	x9, _fw_rate_idx_to_plcp@GOTPAGE
Lloh13:
	ldr	x9, [x9, _fw_rate_idx_to_plcp@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x9, x9, w10, sxtw #2
	sub	w10, w11, w10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x0, lsl #2]
	cmp	w11, w8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #1
	cmp	w10, w0
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #-1
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_LEGACY_RATE_MSK,4,2       ; @RATE_LEGACY_RATE_MSK
	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
	.comm	_IWL_FIRST_OFDM_RATE,4,2        ; @IWL_FIRST_OFDM_RATE
	.comm	_IWL_RATE_COUNT_LEGACY,4,2      ; @IWL_RATE_COUNT_LEGACY
	.comm	_fw_rate_idx_to_plcp,8,3        ; @fw_rate_idx_to_plcp
.subsections_via_symbols
