	.file	"extr_rate.c_brcms_c_rate_hwrs_filter_sort_validate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	brcms_c_rate_hwrs_filter_sort_validate
	.type	brcms_c_rate_hwrs_filter_sort_validate, @function
brcms_c_rate_hwrs_filter_sort_validate:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbx
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR BRCM_MAXRATE[rip]
	mov	rdi, rsp
	lea	edx, 1[rax]
	movsx	rax, edx
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L34:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L34
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L35
.L4:
	mov	r14, rsp
	sal	edx, 2
	xor	esi, esi
	mov	rdi, r14
	call	memset@PLT
	mov	rax, QWORD PTR [r12]
	test	rax, rax
	je	.L5
	mov	rdx, QWORD PTR 8[r12]
	mov	r8d, DWORD PTR BRCMS_RATE_MASK[rip]
	mov	edi, DWORD PTR BRCM_MAXRATE[rip]
	mov	r9, QWORD PTR rate_info[rip]
	lea	rsi, [rdx+rax*4]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	ecx, DWORD PTR [rdx]
	mov	eax, ecx
	and	eax, r8d
	cmp	edi, eax
	jl	.L6
	cdqe
	cmp	QWORD PTR [r9+rax*8], 0
	je	.L6
	mov	DWORD PTR [r14+rax*4], ecx
.L6:
	add	rdx, 4
	cmp	rsi, rdx
	jne	.L7
.L5:
	mov	rcx, QWORD PTR [rbx]
	test	rcx, rcx
	je	.L8
	mov	rdx, QWORD PTR 8[rbx]
	lea	rsi, [rdx+rcx*4]
	xor	ecx, ecx
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR [rdx]
	and	eax, DWORD PTR BRCMS_RATE_MASK[rip]
	cdqe
	mov	eax, DWORD PTR [r14+rax*4]
	test	eax, eax
	je	.L9
	mov	rdi, QWORD PTR 8[r12]
	mov	DWORD PTR [rdi+rcx*4], eax
	add	rcx, 1
.L9:
	add	rdx, 4
	cmp	rsi, rdx
	jne	.L10
.L8:
	mov	rsi, QWORD PTR MCSSET_LEN[rip]
	mov	QWORD PTR [r12], rcx
	test	rsi, rsi
	je	.L11
	mov	rdx, QWORD PTR 16[r12]
	mov	rdi, QWORD PTR 16[rbx]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L12:
	mov	ecx, DWORD PTR [rdi+rax*4]
	and	DWORD PTR [rdx+rax*4], ecx
	add	rax, 1
	cmp	rax, rsi
	jne	.L12
.L11:
	mov	esi, r13d
	mov	rdi, r12
	call	brcms_c_rateset_valid@PLT
	test	rax, rax
	setne	al
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	movzx	eax, al
	jne	.L36
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	brcms_c_rate_hwrs_filter_sort_validate, .-brcms_c_rate_hwrs_filter_sort_validate
	.comm	rate_info,8,8
	.comm	MCSSET_LEN,8,8
	.comm	BRCM_MAXRATE,4,4
	.comm	BRCMS_RATE_MASK,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_rate.c_brcms_c_rate_hwrs_filter_sort_validate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	brcms_c_rate_hwrs_filter_sort_validate
	.syntax unified
	.arm
	.fpu softvfp
	.type	brcms_c_rate_hwrs_filter_sort_validate, %function
brcms_c_rate_hwrs_filter_sort_validate:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #8
	ldr	r3, .L32
	mov	r6, r1
	ldr	r8, [r3]
	mov	r4, r0
	add	r3, r8, #1
	lsl	r3, r3, #2
	add	r1, r3, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	mov	r7, sp
	mov	r5, r2
	mov	r2, r3
	ldr	r3, .L32+4
	mov	r0, r7
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	memset
	ldr	r2, [r4]
	cmp	r2, #0
	beq	.L2
	ldr	r3, [r4, #4]
	ldr	r1, .L32+8
	ldr	r0, .L32+12
	add	r2, r3, r2, lsl #2
	ldr	lr, [r1]
	ldr	ip, [r0]
	sub	r3, r3, #4
	sub	r0, r2, #4
.L4:
	ldr	r1, [r3, #4]!
	and	r2, r1, ip
	cmp	r8, r2
	blt	.L3
	ldr	r9, [lr, r2, lsl #2]
	cmp	r9, #0
	strne	r1, [r7, r2, lsl #2]
.L3:
	cmp	r3, r0
	bne	.L4
.L2:
	ldr	r1, [r6]
	cmp	r1, #0
	beq	.L5
	ldr	r2, [r6, #4]
	ldr	r0, .L32+12
	add	lr, r2, r1, lsl #2
	mov	r1, #0
	sub	lr, lr, #4
	sub	r2, r2, #4
.L7:
	ldr	r3, [r2, #4]!
	ldr	ip, [r0]
	and	r3, r3, ip
	ldr	r3, [r7, r3, lsl #2]
	cmp	r3, #0
	ldrne	ip, [r4, #4]
	strne	r3, [ip, r1, lsl #2]
	addne	r1, r1, #1
	cmp	r2, lr
	bne	.L7
.L5:
	ldr	r3, .L32+16
	str	r1, [r4]
	ldr	ip, [r3]
	cmp	ip, #0
	beq	.L8
	ldr	r3, [r4, #8]
	ldr	r2, [r6, #8]
	add	ip, r3, ip, lsl #2
	sub	r2, r2, #4
	sub	ip, ip, #4
	sub	r3, r3, #4
.L9:
	ldr	r1, [r3, #4]!
	ldr	r0, [r2, #4]!
	cmp	ip, r3
	and	r1, r1, r0
	str	r1, [r3]
	bne	.L9
.L8:
	mov	r1, r5
	mov	r0, r4
	bl	brcms_c_rateset_valid
	ldr	r3, .L32+4
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	BRCM_MAXRATE
	.word	.LC0
	.word	rate_info
	.word	BRCMS_RATE_MASK
	.word	MCSSET_LEN
	.size	brcms_c_rate_hwrs_filter_sort_validate, .-brcms_c_rate_hwrs_filter_sort_validate
	.comm	rate_info,4,4
	.comm	MCSSET_LEN,4,4
	.comm	BRCM_MAXRATE,4,4
	.comm	BRCMS_RATE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
