	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_hwrate_to_tx_rate      ## -- Begin function iwl_mvm_hwrate_to_tx_rate
	.p2align	4, 0x90
_iwl_mvm_hwrate_to_tx_rate:             ## @iwl_mvm_hwrate_to_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movl	%edi, %edx
	movq	_RATE_HT_MCS_GF_MSK@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_IEEE80211_TX_RC_GREEN_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_2:
	movq	_RATE_MCS_CHAN_WIDTH_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	cmpl	$131, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.6:
	movq	_IEEE80211_TX_RC_80_MHZ_WIDTH@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_IEEE80211_TX_RC_160_MHZ_WIDTH@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_9:
	movq	_RATE_MCS_SGI_MSK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_IEEE80211_TX_RC_SHORT_GI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_11:
	movq	_RATE_MCS_HT_MSK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	_RATE_HT_MCS_INDEX_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movl	%edx, (%rbx)
	jmp	LBB0_16
LBB0_13:
	movq	_RATE_MCS_VHT_MSK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_RATE_VHT_MCS_RATE_CODE_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%edx, %esi
	movq	_RATE_VHT_MCS_NSS_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	_RATE_VHT_MCS_NSS_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	incl	%edx
	movq	%rbx, %rdi
	callq	_ieee80211_rate_set_vht
	movq	_IEEE80211_TX_RC_VHT_MCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	jmp	LBB0_16
LBB0_15:
	movl	%edx, %edi
	callq	_iwl_mvm_legacy_rate_to_mac80211_idx
	movl	%eax, (%rbx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_HT_MCS_GF_MSK,4,2         ## @RATE_HT_MCS_GF_MSK
	.comm	_IEEE80211_TX_RC_GREEN_FIELD,4,2 ## @IEEE80211_TX_RC_GREEN_FIELD
	.comm	_RATE_MCS_CHAN_WIDTH_MSK,4,2    ## @RATE_MCS_CHAN_WIDTH_MSK
	.comm	_IEEE80211_TX_RC_40_MHZ_WIDTH,4,2 ## @IEEE80211_TX_RC_40_MHZ_WIDTH
	.comm	_IEEE80211_TX_RC_80_MHZ_WIDTH,4,2 ## @IEEE80211_TX_RC_80_MHZ_WIDTH
	.comm	_IEEE80211_TX_RC_160_MHZ_WIDTH,4,2 ## @IEEE80211_TX_RC_160_MHZ_WIDTH
	.comm	_RATE_MCS_SGI_MSK,4,2           ## @RATE_MCS_SGI_MSK
	.comm	_IEEE80211_TX_RC_SHORT_GI,4,2   ## @IEEE80211_TX_RC_SHORT_GI
	.comm	_RATE_MCS_HT_MSK,4,2            ## @RATE_MCS_HT_MSK
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.comm	_RATE_HT_MCS_INDEX_MSK,4,2      ## @RATE_HT_MCS_INDEX_MSK
	.comm	_RATE_MCS_VHT_MSK,4,2           ## @RATE_MCS_VHT_MSK
	.comm	_RATE_VHT_MCS_RATE_CODE_MSK,4,2 ## @RATE_VHT_MCS_RATE_CODE_MSK
	.comm	_RATE_VHT_MCS_NSS_MSK,4,2       ## @RATE_VHT_MCS_NSS_MSK
	.comm	_RATE_VHT_MCS_NSS_POS,4,2       ## @RATE_VHT_MCS_NSS_POS
	.comm	_IEEE80211_TX_RC_VHT_MCS,4,2    ## @IEEE80211_TX_RC_VHT_MCS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_hwrate_to_tx_rate      ; -- Begin function iwl_mvm_hwrate_to_tx_rate
	.p2align	2
_iwl_mvm_hwrate_to_tx_rate:             ; @iwl_mvm_hwrate_to_tx_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
Lloh0:
	adrp	x8, _RATE_HT_MCS_GF_MSK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RATE_HT_MCS_GF_MSK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _IEEE80211_TX_RC_GREEN_FIELD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_TX_RC_GREEN_FIELD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_2:
Lloh6:
	adrp	x8, _RATE_MCS_CHAN_WIDTH_MSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RATE_MCS_CHAN_WIDTH_MSK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	w8, #131
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.5:
Lloh9:
	adrp	x8, _IEEE80211_TX_RC_80_MHZ_WIDTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IEEE80211_TX_RC_80_MHZ_WIDTH@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _IEEE80211_TX_RC_160_MHZ_WIDTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IEEE80211_TX_RC_160_MHZ_WIDTH@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_9:
Lloh15:
	adrp	x8, _RATE_MCS_SGI_MSK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RATE_MCS_SGI_MSK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
Lloh18:
	adrp	x8, _IEEE80211_TX_RC_SHORT_GI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IEEE80211_TX_RC_SHORT_GI@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_11:
Lloh21:
	adrp	x8, _RATE_MCS_HT_MSK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RATE_MCS_HT_MSK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.12:
Lloh24:
	adrp	x8, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _RATE_HT_MCS_INDEX_MSK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _RATE_HT_MCS_INDEX_MSK@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	and	w9, w9, w0
	stp	w9, w8, [x19]
	b	LBB0_16
LBB0_13:
Lloh30:
	adrp	x8, _RATE_MCS_VHT_MSK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RATE_MCS_VHT_MSK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.14:
Lloh33:
	adrp	x8, _RATE_VHT_MCS_RATE_CODE_MSK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RATE_VHT_MCS_RATE_CODE_MSK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	and	w1, w8, w0
Lloh36:
	adrp	x8, _RATE_VHT_MCS_NSS_MSK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RATE_VHT_MCS_NSS_MSK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh39:
	adrp	x9, _RATE_VHT_MCS_NSS_POS@GOTPAGE
Lloh40:
	ldr	x9, [x9, _RATE_VHT_MCS_NSS_POS@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	w2, w8, #1
	mov	x0, x19
	bl	_ieee80211_rate_set_vht
Lloh42:
	adrp	x8, _IEEE80211_TX_RC_VHT_MCS@GOTPAGE
Lloh43:
	ldr	x8, [x8, _IEEE80211_TX_RC_VHT_MCS@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_16
LBB0_15:
	bl	_iwl_mvm_legacy_rate_to_mac80211_idx
	str	w0, [x19]
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_HT_MCS_GF_MSK,4,2         ; @RATE_HT_MCS_GF_MSK
	.comm	_IEEE80211_TX_RC_GREEN_FIELD,4,2 ; @IEEE80211_TX_RC_GREEN_FIELD
	.comm	_RATE_MCS_CHAN_WIDTH_MSK,4,2    ; @RATE_MCS_CHAN_WIDTH_MSK
	.comm	_IEEE80211_TX_RC_40_MHZ_WIDTH,4,2 ; @IEEE80211_TX_RC_40_MHZ_WIDTH
	.comm	_IEEE80211_TX_RC_80_MHZ_WIDTH,4,2 ; @IEEE80211_TX_RC_80_MHZ_WIDTH
	.comm	_IEEE80211_TX_RC_160_MHZ_WIDTH,4,2 ; @IEEE80211_TX_RC_160_MHZ_WIDTH
	.comm	_RATE_MCS_SGI_MSK,4,2           ; @RATE_MCS_SGI_MSK
	.comm	_IEEE80211_TX_RC_SHORT_GI,4,2   ; @IEEE80211_TX_RC_SHORT_GI
	.comm	_RATE_MCS_HT_MSK,4,2            ; @RATE_MCS_HT_MSK
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.comm	_RATE_HT_MCS_INDEX_MSK,4,2      ; @RATE_HT_MCS_INDEX_MSK
	.comm	_RATE_MCS_VHT_MSK,4,2           ; @RATE_MCS_VHT_MSK
	.comm	_RATE_VHT_MCS_RATE_CODE_MSK,4,2 ; @RATE_VHT_MCS_RATE_CODE_MSK
	.comm	_RATE_VHT_MCS_NSS_MSK,4,2       ; @RATE_VHT_MCS_NSS_MSK
	.comm	_RATE_VHT_MCS_NSS_POS,4,2       ; @RATE_VHT_MCS_NSS_POS
	.comm	_IEEE80211_TX_RC_VHT_MCS,4,2    ; @IEEE80211_TX_RC_VHT_MCS
.subsections_via_symbols
