	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_init_hw_rate_table      ## -- Begin function il3945_init_hw_rate_table
	.p2align	4, 0x90
_il3945_init_hw_rate_table:             ## @il3945_init_hw_rate_table
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	$0, -32(%rbp)
	movq	_il3945_rates@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	4(%rax,%rbx,8), %edi
	callq	_cpu_to_le16
	movl	%ebx, %edi
	callq	_il3945_get_prev_ieee_rate
	movq	(%r15), %rdi
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_18
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_D_RATE
	movq	_RATE_1M_IDX_TBL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	_RATE_11M_IDX_TBL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%eax, %edx
	jg	LBB0_19
## %bb.6:
	leaq	-1(%rdx), %rcx
	shlq	$2, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rcx
	addq	$12, %rdx
	cmpq	%rax, %rcx
	jl	LBB0_7
	jmp	LBB0_19
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_D_RATE
	movq	_IL_OFDM_RATES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	jne	LBB0_19
## %bb.9:
	movq	%r14, %rdi
	callq	_il_is_associated
	testl	%eax, %eax
	je	LBB0_19
## %bb.10:
	movq	_RATE_6M_IDX_TBL@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_RATE_54M_IDX_TBL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%ecx, %eax
	jl	LBB0_19
## %bb.11:
	movslq	%ecx, %rcx
	movl	%eax, %esi
	subl	%ecx, %esi
	incl	%esi
	movq	%rax, %rdx
	subq	%rcx, %rdx
	andq	$3, %rsi
	je	LBB0_15
## %bb.12:
	leaq	(,%rcx,4), %rdi
	leaq	(%rdi,%rdi,2), %rdi
	negq	%rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	decq	%rbx
	addq	$12, %rdi
	cmpq	%rbx, %rsi
	jne	LBB0_13
## %bb.14:
	subq	%rbx, %rcx
LBB0_15:
	cmpq	$3, %rdx
	jb	LBB0_19
## %bb.16:
	leaq	-1(%rcx), %rdx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	addq	$4, %rdx
	addq	$48, %rcx
	cmpq	%rax, %rdx
	jl	LBB0_17
	jmp	LBB0_19
LBB0_18:
	movl	$1, %edi
	callq	_WARN_ON
LBB0_19:
	movl	$0, -48(%rbp)
	movq	_C_RATE_SCALE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	$24, %edx
	callq	_il_send_cmd_pdu
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movl	$1, -48(%rbp)
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	$24, %edx
	callq	_il_send_cmd_pdu
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_il3945_rates,8,3               ## @il3945_rates
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Select A mode rate scale\n"

	.comm	_RATE_1M_IDX_TBL,4,2            ## @RATE_1M_IDX_TBL
	.comm	_RATE_11M_IDX_TBL,4,2           ## @RATE_11M_IDX_TBL
	.comm	_IL_FIRST_OFDM_RATE,8,3         ## @IL_FIRST_OFDM_RATE
	.comm	_RATE_9M_IDX_TBL,4,2            ## @RATE_9M_IDX_TBL
	.comm	_RATE_12M_IDX_TBL,8,3           ## @RATE_12M_IDX_TBL
	.comm	_RATE_6M_IDX_TBL,8,3            ## @RATE_6M_IDX_TBL
L_.str.1:                               ## @.str.1
	.asciz	"Select B/G mode rate scale\n"

	.comm	_IL_OFDM_RATES_MASK,4,2         ## @IL_OFDM_RATES_MASK
	.comm	_IL_FIRST_CCK_RATE,4,2          ## @IL_FIRST_CCK_RATE
	.comm	_RATE_54M_IDX_TBL,4,2           ## @RATE_54M_IDX_TBL
	.comm	_RATE_5M_IDX_TBL,4,2            ## @RATE_5M_IDX_TBL
	.comm	_C_RATE_SCALE,4,2               ## @C_RATE_SCALE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_init_hw_rate_table      ; -- Begin function il3945_init_hw_rate_table
	.p2align	2
_il3945_init_hw_rate_table:             ; @il3945_init_hw_rate_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x21, _il3945_rates@GOTPAGE
Lloh1:
	ldr	x21, [x21, _il3945_rates@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x8, x8, x22
	ldr	w0, [x8, #4]
	bl	_cpu_to_le16
	mov	x0, x20
	bl	_il3945_get_prev_ieee_rate
	ldr	x0, [x21]
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #8
	cmp	x20, w0, sxtw
	b.lt	LBB0_2
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_21
; %bb.5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_RATE
Lloh4:
	adrp	x8, _RATE_1M_IDX_TBL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RATE_1M_IDX_TBL@GOTPAGEOFF]
Lloh6:
	ldrsw	x11, [x8]
Lloh7:
	adrp	x8, _RATE_11M_IDX_TBL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RATE_11M_IDX_TBL@GOTPAGEOFF]
Lloh9:
	ldrsw	x8, [x8]
	cmp	w11, w8
	b.gt	LBB0_22
; %bb.6:
	cmp	x11, x8
	csel	x9, x11, x8, gt
	sub	x9, x9, x11
	add	x10, x9, #1
	mov	x9, x11
	cmp	x10, #4
	b.lo	LBB0_10
; %bb.7:
	and	x12, x10, #0xfffffffffffffffc
	add	x9, x12, x11
	mov	w13, #12
	orr	x14, xzr, #0x18
	madd	x11, x11, x13, x14
	mov	x13, x12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x11, #48
	subs	x13, x13, #4
	b.ne	LBB0_8
; %bb.9:
	cmp	x10, x12
	b.eq	LBB0_22
LBB0_10:
	sub	x10, x9, #1
	add	x9, x9, x9, lsl #1
	lsl	x9, x9, #2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x10, x10, #1
	add	x9, x9, #12
	cmp	x10, x8
	b.lt	LBB0_11
	b	LBB0_22
LBB0_12:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_RATE
	ldr	w8, [x19, #4]
Lloh12:
	adrp	x9, _IL_OFDM_RATES_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IL_OFDM_RATES_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_22
; %bb.13:
	mov	x0, x19
	bl	_il_is_associated
	cbz	w0, LBB0_22
; %bb.14:
Lloh15:
	adrp	x8, _RATE_6M_IDX_TBL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RATE_6M_IDX_TBL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x8]
Lloh18:
	adrp	x8, _RATE_54M_IDX_TBL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RATE_54M_IDX_TBL@GOTPAGEOFF]
Lloh20:
	ldrsw	x8, [x8]
	cmp	w8, w9
	b.lt	LBB0_22
; %bb.15:
	sxtw	x12, w9
	sub	x9, x8, x12
	add	x10, x9, #1
	mov	x9, x12
	cmp	x10, #4
	b.lo	LBB0_19
; %bb.16:
	and	x11, x10, #0xfffffffffffffffc
	add	x9, x12, x11
	mov	w13, #12
	orr	x14, xzr, #0x18
	madd	x12, x12, x13, x14
	mov	x13, x11
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	add	x12, x12, #48
	subs	x13, x13, #4
	b.ne	LBB0_17
; %bb.18:
	cmp	x10, x11
	b.eq	LBB0_22
LBB0_19:
	sub	x10, x9, #1
	add	x9, x9, x9, lsl #1
	lsl	x9, x9, #2
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x10, x10, #1
	add	x9, x9, #12
	cmp	x10, x8
	b.lt	LBB0_20
	b	LBB0_22
LBB0_21:
	mov	w0, #1
	bl	_WARN_ON
LBB0_22:
	str	wzr, [sp, #8]
Lloh21:
	adrp	x20, _C_RATE_SCALE@GOTPAGE
Lloh22:
	ldr	x20, [x20, _C_RATE_SCALE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #24
	bl	_il_send_cmd_pdu
	cbnz	w0, LBB0_24
; %bb.23:
	mov	w8, #1
	str	w8, [sp, #8]
	ldr	w1, [x20]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #24
	bl	_il_send_cmd_pdu
LBB0_24:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_il3945_rates,8,3               ; @il3945_rates
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Select A mode rate scale\n"

	.comm	_RATE_1M_IDX_TBL,4,2            ; @RATE_1M_IDX_TBL
	.comm	_RATE_11M_IDX_TBL,4,2           ; @RATE_11M_IDX_TBL
	.comm	_IL_FIRST_OFDM_RATE,8,3         ; @IL_FIRST_OFDM_RATE
	.comm	_RATE_9M_IDX_TBL,4,2            ; @RATE_9M_IDX_TBL
	.comm	_RATE_12M_IDX_TBL,8,3           ; @RATE_12M_IDX_TBL
	.comm	_RATE_6M_IDX_TBL,8,3            ; @RATE_6M_IDX_TBL
l_.str.1:                               ; @.str.1
	.asciz	"Select B/G mode rate scale\n"

	.comm	_IL_OFDM_RATES_MASK,4,2         ; @IL_OFDM_RATES_MASK
	.comm	_IL_FIRST_CCK_RATE,4,2          ; @IL_FIRST_CCK_RATE
	.comm	_RATE_54M_IDX_TBL,4,2           ; @RATE_54M_IDX_TBL
	.comm	_RATE_5M_IDX_TBL,4,2            ; @RATE_5M_IDX_TBL
	.comm	_C_RATE_SCALE,4,2               ; @C_RATE_SCALE
.subsections_via_symbols
