	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_rate_lookup_init
_brcms_c_rate_lookup_init:              ## @brcms_c_rate_lookup_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movq	_BRCM_MAXRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	%edx
	movq	%rdi, %r14
	xorl	%esi, %esi
	callq	_memset
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_BRCMS_RATE_FLAG@GOTPCREL(%rip), %r13
	movq	_BRCMS_RATE_MASK@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, (%r14,%rcx,4)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rax, %rbx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	testl	%edx, (%r13)
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r12), %rcx
	andq	%rdx, %rcx
	movq	_BRCM_MAXRATE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	jle	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_brcms_err
	movq	(%r15), %rax
	jmp	LBB0_10
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_19
## %bb.6:
	movq	%r14, %r15
	xorl	%ebx, %ebx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	testq	%rax, %rax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmovel	%r13d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmovnel	%r13d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	8(%rax), %rbx
	jae	LBB0_19
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rax), %rax
	movl	(%rax,%rbx,4), %r13d
	movslq	%r13d, %r12
	movl	(%r15,%r12,4), %r14d
	movl	%r12d, %edi
	callq	_is_ofdm_rate
	testl	%r14d, %r14d
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%rax, %rax
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmovel	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, (%r15,%r12,4)
	testl	%eax, %eax
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %edi
	callq	_is_ofdm_rate
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_BRCM_RATE_24M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jge	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_BRCM_RATE_12M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jge	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_BRCM_RATE_6M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %eax
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, (%r15,%r12,4)
	jmp	LBB0_18
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCM_MAXRATE,4,2               ## @BRCM_MAXRATE
	.comm	_BRCMS_RATE_FLAG,4,2            ## @BRCMS_RATE_FLAG
	.comm	_BRCMS_RATE_MASK,4,2            ## @BRCMS_RATE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"brcms_c_rate_lookup_init: invalid rate 0x%X in rate set\n"

	.comm	_BRCM_RATE_24M,4,2              ## @BRCM_RATE_24M
	.comm	_BRCM_RATE_12M,4,2              ## @BRCM_RATE_12M
	.comm	_BRCM_RATE_6M,4,2               ## @BRCM_RATE_6M
	.no_dead_strip	_brcms_c_rate_lookup_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_rate_lookup_init
_brcms_c_rate_lookup_init:              ; @brcms_c_rate_lookup_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x23, _BRCM_MAXRATE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BRCM_MAXRATE@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w2, w8, #1
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x24, #0
Lloh2:
	adrp	x25, _BRCMS_RATE_FLAG@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BRCMS_RATE_FLAG@GOTPAGEOFF]
Lloh4:
	adrp	x26, _BRCMS_RATE_MASK@GOTPAGE
Lloh5:
	ldr	x26, [x26, _BRCMS_RATE_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	w9, [x20, w9, sxtw #2]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, x8
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldr	w2, [x9, x24, lsl #2]
	ldr	w9, [x25]
	tst	w9, w2
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	and	w9, w9, w2
	ldr	w10, [x23]
	cmp	w9, w10
	b.le	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_brcms_err
	ldr	x8, [x21]
	b	LBB0_3
LBB0_7:
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_17
; %bb.8:
	mov	x22, #0
	mov	w23, #0
	mov	w24, #0
Lloh8:
	adrp	x25, _BRCM_RATE_24M@GOTPAGE
Lloh9:
	ldr	x25, [x25, _BRCM_RATE_24M@GOTPAGEOFF]
Lloh10:
	adrp	x26, _BRCM_RATE_12M@GOTPAGE
Lloh11:
	ldr	x26, [x26, _BRCM_RATE_12M@GOTPAGEOFF]
Lloh12:
	adrp	x27, _BRCM_RATE_6M@GOTPAGE
Lloh13:
	ldr	x27, [x27, _BRCM_RATE_6M@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	cmp	x0, #0
	csel	w24, w21, w24, eq
	csel	w23, w23, w21, eq
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cmp	x22, x9
	b.hs	LBB0_17
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #16]
	ldr	w21, [x8, x22, lsl #2]
	ldr	w28, [x20, w21, sxtw #2]
	mov	x0, x21
	bl	_is_ofdm_rate
	cbnz	w28, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sxtw	x28, w21
	cmp	x0, #0
	csel	w8, w24, w23, eq
	str	w8, [x20, x28, lsl #2]
	cbnz	w8, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	bl	_is_ofdm_rate
	mov	x8, x21
	cbz	x0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x25]
	cmp	w21, w8
	b.ge	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x27]
	cmp	w21, w8
	csel	w8, w9, w8, lt
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	str	w8, [x20, x28, lsl #2]
	b	LBB0_10
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCM_MAXRATE,4,2               ; @BRCM_MAXRATE
	.comm	_BRCMS_RATE_FLAG,4,2            ; @BRCMS_RATE_FLAG
	.comm	_BRCMS_RATE_MASK,4,2            ; @BRCMS_RATE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brcms_c_rate_lookup_init: invalid rate 0x%X in rate set\n"

	.comm	_BRCM_RATE_24M,4,2              ; @BRCM_RATE_24M
	.comm	_BRCM_RATE_12M,4,2              ; @BRCM_RATE_12M
	.comm	_BRCM_RATE_6M,4,2               ; @BRCM_RATE_6M
	.no_dead_strip	_brcms_c_rate_lookup_init
.subsections_via_symbols
