	.file	"extr_main.c_brcms_c_rate_lookup_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"brcms_c_rate_lookup_init: invalid rate 0x%X in rate set\n"
	.text
	.p2align 4
	.type	brcms_c_rate_lookup_init, @function
brcms_c_rate_lookup_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rdi]
	mov	r12, QWORD PTR [rax]
	mov	eax, DWORD PTR BRCM_MAXRATE[rip]
	mov	rdi, r12
	lea	edx, 1[rax]
	call	memset@PLT
	cmp	QWORD PTR 0[rbp], 0
	je	.L2
	xor	ebx, ebx
	lea	r14, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movsx	rdx, eax
	mov	DWORD PTR [r12+rdx*4], eax
.L3:
	add	rbx, 1
	cmp	QWORD PTR 0[rbp], rbx
	jbe	.L2
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR [rax+rbx*4]
	test	DWORD PTR BRCMS_RATE_FLAG[rip], edx
	je	.L3
	mov	eax, DWORD PTR BRCMS_RATE_MASK[rip]
	and	eax, edx
	cmp	DWORD PTR BRCM_MAXRATE[rip], eax
	jge	.L4
	mov	rax, QWORD PTR 8[r13]
	mov	rsi, r14
	add	rbx, 1
	mov	edi, DWORD PTR [rax]
	call	brcms_err@PLT
	cmp	QWORD PTR 0[rbp], rbx
	ja	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 0[r13]
	cmp	QWORD PTR 8[rax], 0
	je	.L1
	mov	DWORD PTR 12[rsp], 0
	xor	ebp, ebp
	xor	r14d, r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	call	is_ofdm_rate@PLT
	test	rax, rax
	mov	eax, DWORD PTR 12[rsp]
	cmove	eax, r14d
	mov	DWORD PTR [r15], eax
	test	eax, eax
	jne	.L8
	mov	edi, ebx
	call	is_ofdm_rate@PLT
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR BRCM_RATE_24M[rip]
	cmp	eax, ebx
	jle	.L14
	mov	eax, DWORD PTR BRCM_RATE_12M[rip]
	cmp	eax, ebx
	cmovg	eax, DWORD PTR BRCM_RATE_6M[rip]
	mov	ebx, eax
.L10:
	mov	DWORD PTR [r15], ebx
.L8:
	mov	rax, QWORD PTR 0[r13]
	add	rbp, 1
	cmp	QWORD PTR 8[rax], rbp
	jbe	.L1
.L11:
	mov	rax, QWORD PTR 16[rax]
	movsx	rax, DWORD PTR [rax+rbp*4]
	lea	r15, [r12+rax*4]
	mov	rbx, rax
	mov	edi, eax
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	je	.L7
	call	is_ofdm_rate@PLT
	test	rax, rax
	mov	rax, QWORD PTR 0[r13]
	cmove	r14d, ebx
	cmove	ebx, DWORD PTR 12[rsp]
	add	rbp, 1
	mov	DWORD PTR 12[rsp], ebx
	cmp	QWORD PTR 8[rax], rbp
	ja	.L11
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	ebx, eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	brcms_c_rate_lookup_init, .-brcms_c_rate_lookup_init
	.comm	BRCM_RATE_6M,4,4
	.comm	BRCM_RATE_24M,4,4
	.comm	BRCM_RATE_12M,4,4
	.comm	BRCM_MAXRATE,4,4
	.comm	BRCMS_RATE_MASK,4,4
	.comm	BRCMS_RATE_FLAG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_main.c_brcms_c_rate_lookup_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"brcms_c_rate_lookup_init: invalid rate 0x%X in rate"
	.ascii	" set\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	brcms_c_rate_lookup_init, %function
brcms_c_rate_lookup_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r3, [r0]
	ldr	r8, .L34
	ldr	r10, [r3]
	ldr	r2, [r8]
	mov	r5, r0
	mov	r1, #0
	mov	r0, r10
	add	r2, r2, #1
	bl	memset
	ldr	ip, [r6]
	cmp	ip, #0
	beq	.L2
	mov	r4, #0
	ldr	r7, .L34+4
	ldr	r9, .L34+8
	ldr	fp, .L34+12
	b	.L5
.L3:
	add	r4, r4, #1
	cmp	ip, r4
	bls	.L2
.L5:
	ldr	r2, [r6, #4]
	ldr	r1, [r7]
	ldr	r2, [r2, r4, lsl #2]
	tst	r2, r1
	beq	.L3
	ldr	r0, [r9]
	ldr	r1, [r8]
	and	r0, r0, r2
	cmp	r1, r0
	strge	r0, [r10, r0, lsl #2]
	bge	.L3
	ldr	r1, [r5, #4]
	add	r4, r4, #1
	ldr	r0, [r1]
	mov	r1, fp
	bl	brcms_err
	ldr	ip, [r6]
	cmp	ip, r4
	bhi	.L5
.L2:
	ldr	r1, [r5]
	ldr	r2, [r1, #4]
	cmp	r2, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	fp, #0
	mov	r7, fp
	mov	r6, fp
	ldr	r9, .L34+16
.L11:
	ldr	r1, [r1, #8]
	ldr	r4, [r1, fp, lsl #2]
	ldr	r1, [r10, r4, lsl #2]
	mov	r0, r4
	cmp	r1, #0
	lsl	r8, r4, #2
	bne	.L32
	bl	is_ofdm_rate
	cmp	r0, #0
	movne	r0, r7
	moveq	r0, r6
	cmp	r0, #0
	str	r0, [r10, r4, lsl #2]
	bne	.L8
	mov	r0, r4
	bl	is_ofdm_rate
	cmp	r0, #0
	beq	.L10
	ldr	r1, [r9]
	cmp	r1, r4
	ble	.L15
	ldr	r3, .L34+20
	ldr	r1, [r3]
	cmp	r1, r4
	bgt	.L33
.L15:
	mov	r4, r1
.L10:
	str	r4, [r10, r8]
.L8:
	ldr	r1, [r5]
	add	fp, fp, #1
	ldr	r0, [r1, #4]
	cmp	r0, fp
	bhi	.L11
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	bl	is_ofdm_rate
	cmp	r0, #0
	moveq	r6, r4
	movne	r7, r4
	b	.L8
.L33:
	ldr	r3, .L34+24
	ldr	r4, [r3]
	b	.L10
.L35:
	.align	2
.L34:
	.word	BRCM_MAXRATE
	.word	BRCMS_RATE_FLAG
	.word	BRCMS_RATE_MASK
	.word	.LC0
	.word	BRCM_RATE_24M
	.word	BRCM_RATE_12M
	.word	BRCM_RATE_6M
	.size	brcms_c_rate_lookup_init, .-brcms_c_rate_lookup_init
	.comm	BRCM_RATE_6M,4,4
	.comm	BRCM_RATE_24M,4,4
	.comm	BRCM_RATE_12M,4,4
	.comm	BRCM_MAXRATE,4,4
	.comm	BRCMS_RATE_MASK,4,4
	.comm	BRCMS_RATE_FLAG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
