	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_rate_n_flags_from_tbl
_il4965_rate_n_flags_from_tbl:          ## @il4965_rate_n_flags_from_tbl
	.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	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	16(%rsi), %edi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_il_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movl	(%rax,%rdx,4), %r12d
	movq	_IL_FIRST_CCK_RATE@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jg	LBB0_11
## %bb.2:
	movq	_IL_LAST_CCK_RATE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jl	LBB0_11
## %bb.3:
	movq	_RATE_MCS_CCK_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	jmp	LBB0_11
LBB0_4:
	movl	16(%r15), %edi
	callq	_is_Ht
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	_IL_LAST_OFDM_RATE@GOTPCREL(%rip), %r12
	cmpl	%ebx, (%r12)
	jge	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_IL_ERR
	movl	(%r12), %ebx
LBB0_7:
	movq	_RATE_MCS_HT_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	16(%r15), %edi
	callq	_is_siso
	movq	_il_rates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%ebx, %rdx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	(%rdx,%rdx,2), %rax
	orl	4(%rcx,%rax,4), %r12d
	jmp	LBB0_11
LBB0_10:
	movl	16(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_IL_ERR
	jmp	LBB0_11
LBB0_9:
	leaq	(%rdx,%rdx,2), %rax
	orl	8(%rcx,%rax,4), %r12d
LBB0_11:
	movq	_RATE_MCS_ANT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%r15), %ebx
	movl	16(%r15), %edi
	shll	%cl, %ebx
	movq	_RATE_MCS_ANT_ABC_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	orl	%r12d, %ebx
	callq	_is_Ht
	testq	%rax, %rax
	je	LBB0_24
## %bb.12:
	cmpq	$0, 32(%r15)
	je	LBB0_17
## %bb.13:
	cmpq	$0, 24(%r15)
	je	LBB0_15
## %bb.14:
	movq	_RATE_MCS_DUP_MSK@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_RATE_MCS_HT40_MSK@GOTPCREL(%rip), %rax
LBB0_16:
	orl	(%rax), %ebx
LBB0_17:
	xorl	%r12d, %r12d
	cmpq	$0, 8(%r15)
	movq	_RATE_MCS_SGI_MSK@GOTPCREL(%rip), %r13
	je	LBB0_19
## %bb.18:
	movl	(%r13), %r12d
LBB0_19:
	orl	%ebx, %r12d
	testq	%r14, %r14
	je	LBB0_23
## %bb.20:
	movq	_RATE_MCS_GF_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	16(%r15), %edi
	callq	_is_siso
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	cmpq	$0, 8(%r15)
	je	LBB0_23
## %bb.22:
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IL_ERR
LBB0_23:
	movl	%r12d, %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_il_rates,8,3                   ## @il_rates
	.comm	_IL_FIRST_CCK_RATE,4,2          ## @IL_FIRST_CCK_RATE
	.comm	_IL_LAST_CCK_RATE,4,2           ## @IL_LAST_CCK_RATE
	.comm	_RATE_MCS_CCK_MSK,4,2           ## @RATE_MCS_CCK_MSK
	.comm	_IL_LAST_OFDM_RATE,4,2          ## @IL_LAST_OFDM_RATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid HT rate idx %d\n"

	.comm	_RATE_MCS_HT_MSK,4,2            ## @RATE_MCS_HT_MSK
L_.str.1:                               ## @.str.1
	.asciz	"Invalid tbl->lq_type %d\n"

	.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	_RATE_MCS_DUP_MSK,4,2           ## @RATE_MCS_DUP_MSK
	.comm	_RATE_MCS_HT40_MSK,4,2          ## @RATE_MCS_HT40_MSK
	.comm	_RATE_MCS_SGI_MSK,4,2           ## @RATE_MCS_SGI_MSK
	.comm	_RATE_MCS_GF_MSK,4,2            ## @RATE_MCS_GF_MSK
L_.str.2:                               ## @.str.2
	.asciz	"GF was set with SGI:SISO\n"

	.no_dead_strip	_il4965_rate_n_flags_from_tbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_rate_n_flags_from_tbl
_il4965_rate_n_flags_from_tbl:          ; @il4965_rate_n_flags_from_tbl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	ldr	w0, [x1, #16]
	bl	_is_legacy
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _il_rates@GOTPAGE
Lloh1:
	ldr	x8, [x8, _il_rates@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, #12
	smull	x9, w21, w9
	ldr	w8, [x8, x9]
Lloh3:
	adrp	x9, _IL_FIRST_CCK_RATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IL_FIRST_CCK_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IL_LAST_CCK_RATE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IL_LAST_CCK_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w21
	ccmp	w10, w21, #8, le
	b.lt	LBB0_11
; %bb.2:
Lloh9:
	adrp	x9, _RATE_MCS_CCK_MSK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RATE_MCS_CCK_MSK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_11
LBB0_3:
	ldr	w0, [x19, #16]
	bl	_is_Ht
	cbz	x0, LBB0_8
; %bb.4:
Lloh12:
	adrp	x22, _IL_LAST_OFDM_RATE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _IL_LAST_OFDM_RATE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w21
	b.ge	LBB0_6
; %bb.5:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IL_ERR
	ldr	w21, [x22]
LBB0_6:
Lloh16:
	adrp	x8, _RATE_MCS_HT_MSK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RATE_MCS_HT_MSK@GOTPAGEOFF]
Lloh18:
	ldr	w22, [x8]
	ldr	w0, [x19, #16]
	bl	_is_siso
Lloh19:
	adrp	x8, _il_rates@GOTPAGE
Lloh20:
	ldr	x8, [x8, _il_rates@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	sxtw	x9, w21
	mov	w10, #12
	madd	x8, x9, x10, x8
	cbz	x0, LBB0_9
; %bb.7:
	ldr	w8, [x8, #4]
	b	LBB0_10
LBB0_8:
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IL_ERR
	mov	w8, #0
	b	LBB0_11
LBB0_9:
	ldr	w8, [x8, #8]
LBB0_10:
	orr	w8, w8, w22
LBB0_11:
	ldr	w9, [x19]
Lloh24:
	adrp	x10, _RATE_MCS_ANT_POS@GOTPAGE
Lloh25:
	ldr	x10, [x10, _RATE_MCS_ANT_POS@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh27:
	adrp	x10, _RATE_MCS_ANT_ABC_MSK@GOTPAGE
Lloh28:
	ldr	x10, [x10, _RATE_MCS_ANT_ABC_MSK@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w21, w9, w8
	ldr	w0, [x19, #16]
	bl	_is_Ht
	cbz	x0, LBB0_21
; %bb.12:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_17
; %bb.13:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_15
; %bb.14:
Lloh30:
	adrp	x8, _RATE_MCS_DUP_MSK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RATE_MCS_DUP_MSK@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh32:
	adrp	x8, _RATE_MCS_HT40_MSK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RATE_MCS_HT40_MSK@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_17:
	ldr	x8, [x19, #8]
Lloh34:
	adrp	x22, _RATE_MCS_SGI_MSK@GOTPAGE
Lloh35:
	ldr	x22, [x22, _RATE_MCS_SGI_MSK@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	orr	w21, w8, w21
	cbz	x20, LBB0_21
; %bb.18:
Lloh36:
	adrp	x8, _RATE_MCS_GF_MSK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RATE_MCS_GF_MSK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w0, [x19, #16]
	bl	_is_siso
	cbz	x0, LBB0_21
; %bb.19:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w8, [x22]
	bic	w21, w21, w8
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IL_ERR
LBB0_21:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_il_rates,8,3                   ; @il_rates
	.comm	_IL_FIRST_CCK_RATE,4,2          ; @IL_FIRST_CCK_RATE
	.comm	_IL_LAST_CCK_RATE,4,2           ; @IL_LAST_CCK_RATE
	.comm	_RATE_MCS_CCK_MSK,4,2           ; @RATE_MCS_CCK_MSK
	.comm	_IL_LAST_OFDM_RATE,4,2          ; @IL_LAST_OFDM_RATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid HT rate idx %d\n"

	.comm	_RATE_MCS_HT_MSK,4,2            ; @RATE_MCS_HT_MSK
l_.str.1:                               ; @.str.1
	.asciz	"Invalid tbl->lq_type %d\n"

	.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	_RATE_MCS_DUP_MSK,4,2           ; @RATE_MCS_DUP_MSK
	.comm	_RATE_MCS_HT40_MSK,4,2          ; @RATE_MCS_HT40_MSK
	.comm	_RATE_MCS_SGI_MSK,4,2           ; @RATE_MCS_SGI_MSK
	.comm	_RATE_MCS_GF_MSK,4,2            ; @RATE_MCS_GF_MSK
l_.str.2:                               ; @.str.2
	.asciz	"GF was set with SGI:SISO\n"

	.no_dead_strip	_il4965_rate_n_flags_from_tbl
.subsections_via_symbols
