	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_rate_hwrs_filter_sort_validate ## -- Begin function brcms_c_rate_hwrs_filter_sort_validate
	.p2align	4, 0x90
_brcms_c_rate_hwrs_filter_sort_validate: ## @brcms_c_rate_hwrs_filter_sort_validate
	.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
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BRCM_MAXRATE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	leal	1(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leal	4(,%rbx,4), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	(%r12), %r8
	testq	%r8, %r8
	je	LBB0_7
## %bb.1:
	movq	8(%r12), %rsi
	movq	_BRCMS_RATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %edi
	movq	_rate_info@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	cmpq	$1, %r8
	jne	LBB0_17
## %bb.2:
	xorl	%edx, %edx
LBB0_3:
	testb	$1, %r8b
	je	LBB0_7
## %bb.4:
	movl	(%rsi,%rdx,4), %eax
	andl	%eax, %ecx
	cmpl	%edi, %ecx
	jg	LBB0_7
## %bb.5:
	movslq	%ecx, %rcx
	cmpq	$0, (%r9,%rcx,8)
	je	LBB0_7
## %bb.6:
	movl	%eax, (%r14,%rcx,4)
LBB0_7:
	movq	(%r15), %r8
	testq	%r8, %r8
	je	LBB0_13
## %bb.8:
	movq	8(%r15), %rcx
	cmpq	$1, %r8
	jne	LBB0_25
## %bb.9:
	xorl	%esi, %esi
	xorl	%eax, %eax
LBB0_10:
	testb	$1, %r8b
	je	LBB0_14
## %bb.11:
	movq	_BRCMS_RATE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rcx,%rsi,4), %edx
	movslq	%edx, %rcx
	movl	(%r14,%rcx,4), %ecx
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.12:
	movq	8(%r12), %rdx
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	movq	%rax, (%r12)
	movq	_MCSSET_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	testq	%r9, %r9
	je	LBB0_44
## %bb.15:
	movq	16(%r12), %rcx
	movq	16(%r15), %rdx
	cmpq	$8, %r9
	jb	LBB0_16
## %bb.31:
	leaq	(%rdx,%r9,4), %rax
	cmpq	%rax, %rcx
	jae	LBB0_34
## %bb.32:
	leaq	(%rcx,%r9,4), %rax
	cmpq	%rax, %rdx
	jae	LBB0_34
LBB0_16:
	xorl	%esi, %esi
LBB0_40:
	movq	%rsi, %rdi
	notq	%rdi
	addq	%r9, %rdi
	movq	%r9, %rax
	andq	$3, %rax
	je	LBB0_42
	.p2align	4, 0x90
LBB0_41:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %ebx
	andl	%ebx, (%rcx,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_41
LBB0_42:
	cmpq	$3, %rdi
	jb	LBB0_44
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %eax
	andl	%eax, (%rcx,%rsi,4)
	movl	4(%rdx,%rsi,4), %eax
	andl	%eax, 4(%rcx,%rsi,4)
	movl	8(%rdx,%rsi,4), %eax
	andl	%eax, 8(%rcx,%rsi,4)
	movl	12(%rdx,%rsi,4), %eax
	andl	%eax, 12(%rcx,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_43
	jmp	LBB0_44
LBB0_17:
	movq	%r8, %r10
	andq	$-2, %r10
	xorl	%edx, %edx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %r10
	je	LBB0_3
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rdx,4), %ebx
	movl	%ecx, %eax
	andl	%ebx, %eax
	cmpl	%edi, %eax
	jg	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	cltq
	cmpq	$0, (%r9,%rax,8)
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, (%r14,%rax,4)
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	4(%rsi,%rdx,4), %ebx
	movl	%ecx, %eax
	andl	%ebx, %eax
	cmpl	%edi, %eax
	jg	LBB0_18
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	cltq
	cmpq	$0, (%r9,%rax,8)
	je	LBB0_18
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, (%r14,%rax,4)
	jmp	LBB0_18
LBB0_25:
	movq	%r8, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	movq	_BRCMS_RATE_MASK@GOTPCREL(%rip), %r9
	xorl	%eax, %eax
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_27 Depth=1
	addq	$2, %rsi
	cmpq	%rsi, %rdi
	je	LBB0_10
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r9), %ebx
	andl	(%rcx,%rsi,4), %ebx
	movslq	%ebx, %rbx
	movl	(%r14,%rbx,4), %ebx
	testl	%ebx, %ebx
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movq	8(%r12), %rdx
	movl	%ebx, (%rdx,%rax,4)
	incq	%rax
LBB0_29:                                ##   in Loop: Header=BB0_27 Depth=1
	movl	(%r9), %edx
	andl	4(%rcx,%rsi,4), %edx
	movslq	%edx, %rdx
	movl	(%r14,%rdx,4), %ebx
	testl	%ebx, %ebx
	je	LBB0_26
## %bb.30:                              ##   in Loop: Header=BB0_27 Depth=1
	movq	8(%r12), %rdx
	movl	%ebx, (%rdx,%rax,4)
	incq	%rax
	jmp	LBB0_26
LBB0_34:
	movq	%r9, %rsi
	andq	$-8, %rsi
	leaq	-8(%rsi), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_46
## %bb.35:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rdx,%rdi,4), %xmm0
	movups	16(%rdx,%rdi,4), %xmm1
	movups	(%rcx,%rdi,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%rcx,%rdi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	32(%rcx,%rdi,4), %xmm1
	movups	48(%rcx,%rdi,4), %xmm3
	movups	%xmm2, (%rcx,%rdi,4)
	movups	%xmm0, 16(%rcx,%rdi,4)
	movups	32(%rdx,%rdi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	48(%rdx,%rdi,4), %xmm1
	andps	%xmm3, %xmm1
	movups	%xmm0, 32(%rcx,%rdi,4)
	movups	%xmm1, 48(%rcx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_36
## %bb.37:
	testb	$1, %r8b
	je	LBB0_39
LBB0_38:
	movups	(%rcx,%rdi,4), %xmm0
	movups	16(%rcx,%rdi,4), %xmm1
	movups	(%rdx,%rdi,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%rdx,%rdi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	%xmm2, (%rcx,%rdi,4)
	movups	%xmm0, 16(%rcx,%rdi,4)
LBB0_39:
	cmpq	%rsi, %r9
	jne	LBB0_40
LBB0_44:
	movq	%r12, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_brcms_c_rateset_valid
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	setne	%cl
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	-48(%rbp), %rdx
	jne	LBB0_47
## %bb.45:
	movb	%cl, %al
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_46:
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_38
	jmp	LBB0_39
LBB0_47:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCM_MAXRATE,4,2               ## @BRCM_MAXRATE
	.comm	_BRCMS_RATE_MASK,4,2            ## @BRCMS_RATE_MASK
	.comm	_rate_info,8,3                  ## @rate_info
	.comm	_MCSSET_LEN,8,3                 ## @MCSSET_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_rate_hwrs_filter_sort_validate ; -- Begin function brcms_c_rate_hwrs_filter_sort_validate
	.p2align	2
_brcms_c_rate_hwrs_filter_sort_validate: ; @brcms_c_rate_hwrs_filter_sort_validate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _BRCM_MAXRATE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BRCM_MAXRATE@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w12, w8, #1
	lsl	x8, x12, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	lsl	w2, w12, #2
	mov	x0, x22
	mov	w1, #0
	bl	_memset
	ldr	x9, [x20]
Lloh7:
	adrp	x8, _BRCMS_RATE_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BRCMS_RATE_MASK@GOTPAGEOFF]
	cbz	x9, LBB0_6
; %bb.1:
	ldr	x10, [x20, #8]
	ldr	w11, [x8]
	ldr	w12, [x23]
Lloh9:
	adrp	x13, _rate_info@GOTPAGE
Lloh10:
	ldr	x13, [x13, _rate_info@GOTPAGEOFF]
Lloh11:
	ldr	x13, [x13]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #4
	subs	x9, x9, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10]
	and	w15, w11, w14
	cmp	w15, w12
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x16, [x13, w15, sxtw #3]
	cbz	x16, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x15, w15
	str	w14, [x22, x15, lsl #2]
	b	LBB0_2
LBB0_6:
	ldr	x10, [x21]
	cbz	x10, LBB0_11
; %bb.7:
	mov	x9, #0
	ldr	x11, [x21, #8]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x11, x11, #4
	subs	x10, x10, #1
	b.eq	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	ldr	w13, [x8]
	and	w12, w13, w12
	ldr	w12, [x22, w12, sxtw #2]
	cbz	w12, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x13, [x20, #8]
	str	w12, [x13, x9, lsl #2]
	add	x9, x9, #1
	b	LBB0_8
LBB0_11:
	mov	x9, #0
LBB0_12:
	str	x9, [x20]
Lloh12:
	adrp	x8, _MCSSET_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MCSSET_LEN@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x8]
	cbz	x9, LBB0_21
; %bb.13:
	ldr	x8, [x20, #16]
	ldr	x10, [x21, #16]
	cmp	x9, #16
	b.lo	LBB0_18
; %bb.14:
	lsl	x11, x9, #2
	add	x12, x8, x11
	add	x11, x10, x11
	cmp	x8, x11
	ccmp	x10, x12, #2, lo
	b.lo	LBB0_18
; %bb.15:
	and	x11, x9, #0xfffffffffffffff0
	add	x12, x8, #32
	add	x13, x10, #32
	mov	x14, x11
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12]
	ldp	q4, q5, [x13, #-32]
	ldp	q6, q7, [x13], #64
	and.16b	v0, v4, v0
	and.16b	v1, v5, v1
	and.16b	v2, v6, v2
	and.16b	v3, v7, v3
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	subs	x14, x14, #16
	b.ne	LBB0_16
; %bb.17:
	cmp	x9, x11
	b.ne	LBB0_19
	b	LBB0_21
LBB0_18:
	mov	x11, #0
LBB0_19:
	sub	x9, x9, x11
	lsl	x11, x11, #2
	add	x10, x10, x11
	add	x8, x8, x11
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8]
	ldr	w12, [x10], #4
	and	w11, w12, w11
	str	w11, [x8], #4
	subs	x9, x9, #1
	b.ne	LBB0_20
LBB0_21:
	mov	x0, x20
	mov	x1, x19
	bl	_brcms_c_rateset_valid
	cmp	x0, #0
	cset	w0, ne
	ldur	x8, [x29, #-56]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCM_MAXRATE,4,2               ; @BRCM_MAXRATE
	.comm	_BRCMS_RATE_MASK,4,2            ; @BRCMS_RATE_MASK
	.comm	_rate_info,8,3                  ; @rate_info
	.comm	_MCSSET_LEN,8,3                 ; @MCSSET_LEN
.subsections_via_symbols
