	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucode_rate_from_rs_rate
_ucode_rate_from_rs_rate:               ## @ucode_rate_from_rs_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	%rsi, %r14
	movq	%rdi, %r12
	movl	4(%rsi), %ebx
	movq	_RATE_MCS_ANT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	(%rsi), %r15d
	movq	_RATE_MCS_ANT_ABC_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%rsi, %rdi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movslq	%r15d, %rax
	movq	_iwl_rates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rax,4), %rdx
	orl	(%rcx,%rdx,4), %ebx
	movq	_IWL_FIRST_CCK_RATE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setl	%dl
	movq	_IWL_LAST_CCK_RATE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setg	%cl
	orb	%dl, %cl
	movq	_RATE_MCS_CCK_MSK@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_2:
	movq	%r14, %rdi
	callq	_is_ht
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	_IWL_FIRST_HT_RATE@GOTPCREL(%rip), %rax
	movq	_IWL_LAST_HT_RATE@GOTPCREL(%rip), %r13
	cmpl	(%rax), %r15d
	jl	LBB0_5
## %bb.4:
	cmpl	(%r13), %r15d
	jle	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_IWL_ERR
	movl	(%r13), %r15d
LBB0_6:
	movq	_RATE_MCS_HT_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_is_ht_siso
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_iwl_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	orl	4(%rax,%rcx,4), %ebx
	jmp	LBB0_20
LBB0_10:
	movq	%r14, %rdi
	callq	_is_vht
	testq	%rax, %rax
	je	LBB0_19
## %bb.11:
	movq	_IWL_FIRST_VHT_RATE@GOTPCREL(%rip), %rax
	movq	_IWL_LAST_VHT_RATE@GOTPCREL(%rip), %r13
	cmpl	(%rax), %r15d
	jl	LBB0_13
## %bb.12:
	cmpl	(%r13), %r15d
	jle	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_IWL_ERR
	movl	(%r13), %r15d
LBB0_14:
	movq	_RATE_MCS_VHT_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_is_vht_siso
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_iwl_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	orl	12(%rax,%rcx,4), %ebx
	jmp	LBB0_20
LBB0_8:
	movq	%r14, %rdi
	callq	_is_ht_mimo2
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	movq	_iwl_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	orl	8(%rax,%rcx,4), %ebx
	jmp	LBB0_20
LBB0_19:
	movl	8(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
	jmp	LBB0_20
LBB0_16:
	movq	%r14, %rdi
	callq	_is_vht_mimo2
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_iwl_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	orl	16(%rax,%rcx,4), %ebx
	jmp	LBB0_20
LBB0_18:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_20:
	movq	%r14, %rdi
	callq	_is_siso
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	cmpq	$0, 32(%r14)
	je	LBB0_23
## %bb.22:
	movq	_RATE_MCS_ANT_AB_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_RATE_MCS_STBC_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_23:
	orl	12(%r14), %ebx
	xorl	%eax, %eax
	cmpq	$0, 24(%r14)
	je	LBB0_25
## %bb.24:
	movq	_RATE_MCS_SGI_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_25:
	orl	%eax, %ebx
	cmpq	$0, 16(%r14)
	sete	%cl
	movq	_RATE_MCS_LDPC_MSK@GOTPCREL(%rip), %rax
LBB0_26:
	xorl	%edx, %edx
	testb	%cl, %cl
	jne	LBB0_28
## %bb.27:
	movl	(%rax), %edx
LBB0_28:
	orl	%edx, %ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_MCS_ANT_POS,4,2           ## @RATE_MCS_ANT_POS
	.comm	_RATE_MCS_ANT_ABC_MSK,4,2       ## @RATE_MCS_ANT_ABC_MSK
	.comm	_iwl_rates,8,3                  ## @iwl_rates
	.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
	.comm	_IWL_FIRST_HT_RATE,4,2          ## @IWL_FIRST_HT_RATE
	.comm	_IWL_LAST_HT_RATE,4,2           ## @IWL_LAST_HT_RATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid HT rate index %d\n"

	.comm	_RATE_MCS_HT_MSK,4,2            ## @RATE_MCS_HT_MSK
	.comm	_IWL_FIRST_VHT_RATE,4,2         ## @IWL_FIRST_VHT_RATE
	.comm	_IWL_LAST_VHT_RATE,4,2          ## @IWL_LAST_VHT_RATE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid VHT rate index %d\n"

	.comm	_RATE_MCS_VHT_MSK,4,2           ## @RATE_MCS_VHT_MSK
L_.str.2:                               ## @.str.2
	.asciz	"Invalid rate->type %d\n"

	.comm	_RATE_MCS_ANT_AB_MSK,4,2        ## @RATE_MCS_ANT_AB_MSK
	.comm	_RATE_MCS_STBC_MSK,4,2          ## @RATE_MCS_STBC_MSK
	.comm	_RATE_MCS_SGI_MSK,4,2           ## @RATE_MCS_SGI_MSK
	.comm	_RATE_MCS_LDPC_MSK,4,2          ## @RATE_MCS_LDPC_MSK
	.no_dead_strip	_ucode_rate_from_rs_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucode_rate_from_rs_rate
_ucode_rate_from_rs_rate:               ; @ucode_rate_from_rs_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	x19, x1
	mov	x21, x0
	ldp	w20, w8, [x1]
Lloh0:
	adrp	x9, _RATE_MCS_ANT_POS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RATE_MCS_ANT_POS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh3:
	adrp	x9, _RATE_MCS_ANT_ABC_MSK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RATE_MCS_ANT_ABC_MSK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w22, w8, w9
	mov	x0, x1
	bl	_is_legacy
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _iwl_rates@GOTPAGE
Lloh7:
	ldr	x8, [x8, _iwl_rates@GOTPAGEOFF]
	sxtw	x9, w20
Lloh8:
	ldr	x8, [x8]
	mov	w10, #20
	mul	x9, x9, x10
	ldr	w8, [x8, x9]
	orr	w8, w8, w22
Lloh9:
	adrp	x9, _IWL_FIRST_CCK_RATE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IWL_FIRST_CCK_RATE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _IWL_LAST_CCK_RATE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IWL_LAST_CCK_RATE@GOTPAGEOFF]
	cmp	w20, w9
Lloh14:
	ldr	w9, [x10]
	ccmp	w20, w9, #0, ge
	cset	w9, gt
Lloh15:
	adrp	x10, _RATE_MCS_CCK_MSK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _RATE_MCS_CCK_MSK@GOTPAGEOFF]
	b	LBB0_22
LBB0_2:
	mov	x0, x19
	bl	_is_ht
	cbz	x0, LBB0_7
; %bb.3:
Lloh17:
	adrp	x8, _IWL_FIRST_HT_RATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IWL_FIRST_HT_RATE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x23, _IWL_LAST_HT_RATE@GOTPAGE
Lloh21:
	ldr	x23, [x23, _IWL_LAST_HT_RATE@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w20, w8
	ccmp	w20, w9, #0, ge
	b.le	LBB0_5
; %bb.4:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_ERR
	ldr	w20, [x23]
LBB0_5:
Lloh24:
	adrp	x8, _RATE_MCS_HT_MSK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RATE_MCS_HT_MSK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w22, w8, w22
	mov	x0, x19
	bl	_is_ht_siso
	cbz	x0, LBB0_12
; %bb.6:
Lloh27:
	adrp	x8, _iwl_rates@GOTPAGE
Lloh28:
	ldr	x8, [x8, _iwl_rates@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	mov	w9, #20
	smaddl	x8, w20, w9, x8
	ldr	w8, [x8, #4]
	orr	w22, w8, w22
	b	LBB0_18
LBB0_7:
	mov	x0, x19
	bl	_is_vht
	cbz	x0, LBB0_14
; %bb.8:
Lloh30:
	adrp	x8, _IWL_FIRST_VHT_RATE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IWL_FIRST_VHT_RATE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x23, _IWL_LAST_VHT_RATE@GOTPAGE
Lloh34:
	ldr	x23, [x23, _IWL_LAST_VHT_RATE@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w20, w8
	ccmp	w20, w9, #0, ge
	b.le	LBB0_10
; %bb.9:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_ERR
	ldr	w20, [x23]
LBB0_10:
Lloh37:
	adrp	x8, _RATE_MCS_VHT_MSK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RATE_MCS_VHT_MSK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	orr	w22, w8, w22
	mov	x0, x19
	bl	_is_vht_siso
	cbz	x0, LBB0_15
; %bb.11:
Lloh40:
	adrp	x8, _iwl_rates@GOTPAGE
Lloh41:
	ldr	x8, [x8, _iwl_rates@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	mov	w9, #20
	smaddl	x8, w20, w9, x8
	ldr	w8, [x8, #12]
	orr	w22, w8, w22
	b	LBB0_18
LBB0_12:
	mov	x0, x19
	bl	_is_ht_mimo2
	cbz	x0, LBB0_17
; %bb.13:
Lloh43:
	adrp	x8, _iwl_rates@GOTPAGE
Lloh44:
	ldr	x8, [x8, _iwl_rates@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	mov	w9, #20
	smaddl	x8, w20, w9, x8
	ldr	w8, [x8, #8]
	orr	w22, w8, w22
	b	LBB0_18
LBB0_14:
	ldr	w2, [x19, #8]
Lloh46:
	adrp	x1, l_.str.2@PAGE
Lloh47:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_IWL_ERR
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_is_vht_mimo2
	cbz	x0, LBB0_17
; %bb.16:
Lloh48:
	adrp	x8, _iwl_rates@GOTPAGE
Lloh49:
	ldr	x8, [x8, _iwl_rates@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	mov	w9, #20
	smaddl	x8, w20, w9, x8
	ldr	w8, [x8, #16]
	orr	w22, w8, w22
	b	LBB0_18
LBB0_17:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_18:
	mov	x0, x19
	bl	_is_siso
	cbz	x0, LBB0_21
; %bb.19:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_21
; %bb.20:
Lloh51:
	adrp	x8, _RATE_MCS_ANT_AB_MSK@GOTPAGE
Lloh52:
	ldr	x8, [x8, _RATE_MCS_ANT_AB_MSK@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	orr	w8, w8, w22
Lloh54:
	adrp	x9, _RATE_MCS_STBC_MSK@GOTPAGE
Lloh55:
	ldr	x9, [x9, _RATE_MCS_STBC_MSK@GOTPAGEOFF]
Lloh56:
	ldr	w9, [x9]
	orr	w22, w8, w9
LBB0_21:
	ldr	w8, [x19, #12]
	orr	w8, w8, w22
Lloh57:
	adrp	x9, _RATE_MCS_SGI_MSK@GOTPAGE
Lloh58:
	ldr	x9, [x9, _RATE_MCS_SGI_MSK@GOTPAGEOFF]
Lloh59:
	ldr	w9, [x9]
	ldp	x11, x10, [x19, #16]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
	cmp	x11, #0
	cset	w9, eq
Lloh60:
	adrp	x10, _RATE_MCS_LDPC_MSK@GOTPAGE
Lloh61:
	ldr	x10, [x10, _RATE_MCS_LDPC_MSK@GOTPAGEOFF]
LBB0_22:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, wzr, w10, ne
	orr	w0, w8, w9
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_MCS_ANT_POS,4,2           ; @RATE_MCS_ANT_POS
	.comm	_RATE_MCS_ANT_ABC_MSK,4,2       ; @RATE_MCS_ANT_ABC_MSK
	.comm	_iwl_rates,8,3                  ; @iwl_rates
	.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
	.comm	_IWL_FIRST_HT_RATE,4,2          ; @IWL_FIRST_HT_RATE
	.comm	_IWL_LAST_HT_RATE,4,2           ; @IWL_LAST_HT_RATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid HT rate index %d\n"

	.comm	_RATE_MCS_HT_MSK,4,2            ; @RATE_MCS_HT_MSK
	.comm	_IWL_FIRST_VHT_RATE,4,2         ; @IWL_FIRST_VHT_RATE
	.comm	_IWL_LAST_VHT_RATE,4,2          ; @IWL_LAST_VHT_RATE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid VHT rate index %d\n"

	.comm	_RATE_MCS_VHT_MSK,4,2           ; @RATE_MCS_VHT_MSK
l_.str.2:                               ; @.str.2
	.asciz	"Invalid rate->type %d\n"

	.comm	_RATE_MCS_ANT_AB_MSK,4,2        ; @RATE_MCS_ANT_AB_MSK
	.comm	_RATE_MCS_STBC_MSK,4,2          ; @RATE_MCS_STBC_MSK
	.comm	_RATE_MCS_SGI_MSK,4,2           ; @RATE_MCS_SGI_MSK
	.comm	_RATE_MCS_LDPC_MSK,4,2          ; @RATE_MCS_LDPC_MSK
	.no_dead_strip	_ucode_rate_from_rs_rate
.subsections_via_symbols
