	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rate_control_apply_mask
_rate_control_apply_mask:               ## @rate_control_apply_mask
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IEEE80211_HT_MCS_MASK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	(%r14), %rdx
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rsi
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movb	(%rbx), %cl
	movl	$-1, %edi
	shll	%cl, %edi
	movl	(%rdx,%rax,4), %edx
	movl	(%rsi,%rax,4), %ecx
	notl	%edi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	cmpl	%edi, %edx
	jne	LBB0_2
## %bb.1:
	testl	%ecx, %ecx
	je	LBB0_26
LBB0_2:
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rcx
	movl	(%rcx,%rax,4), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leal	(,%rbx,4), %edx
	movq	%r15, %rdi
	callq	_memcpy
	jmp	LBB0_5
LBB0_4:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leal	(,%rbx,4), %edx
	movq	%r15, %rdi
	movl	$255, %esi
	callq	_memset
LBB0_5:
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.6:
	movq	(%rsi), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	andl	(%rax,%rcx,4), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.7:
	movq	8(%rsi), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpq	$2, %rdx
	movl	$1, %ecx
	cmovaeq	%rdx, %rcx
	cmpq	$8, %rcx
	jb	LBB0_8
## %bb.9:
	leaq	(%rax,%rcx,4), %rdx
	cmpq	%rdx, %r15
	jae	LBB0_12
## %bb.10:
	leaq	(%r15,%rcx,4), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_12
LBB0_8:
	xorl	%edx, %edx
LBB0_18:
	movq	%rdx, %rsi
	notq	%rsi
	addq	%rcx, %rsi
	movq	%rcx, %rdi
	andq	$1, %rdi
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %ebx
	andl	%ebx, (%r15,%rdx,4)
	incq	%rdx
	decq	%rdi
	jne	LBB0_19
LBB0_20:
	cmpq	$3, %rsi
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %esi
	andl	%esi, (%r15,%rdx,4)
	movl	4(%rax,%rdx,4), %esi
	andl	%esi, 4(%r15,%rdx,4)
	movl	8(%rax,%rdx,4), %esi
	andl	%esi, 8(%r15,%rdx,4)
	movl	12(%rax,%rdx,4), %esi
	andl	%esi, 12(%r15,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_12:
	movq	%rcx, %rdx
	andq	$-8, %rdx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.13:
	movq	%r8, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rsi,4), %xmm0
	movups	16(%rax,%rsi,4), %xmm1
	andps	(%r15,%rsi,4), %xmm0
	andps	16(%r15,%rsi,4), %xmm1
	movaps	%xmm0, (%r15,%rsi,4)
	movaps	%xmm1, 16(%r15,%rsi,4)
	movups	32(%rax,%rsi,4), %xmm0
	movups	48(%rax,%rsi,4), %xmm1
	andps	32(%r15,%rsi,4), %xmm0
	andps	48(%r15,%rsi,4), %xmm1
	movaps	%xmm0, 32(%r15,%rsi,4)
	movaps	%xmm1, 48(%r15,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_14
## %bb.15:
	testb	$1, %r8b
	je	LBB0_17
LBB0_16:
	movups	(%rax,%rsi,4), %xmm0
	movups	16(%rax,%rsi,4), %xmm1
	andps	(%r15,%rsi,4), %xmm0
	andps	16(%r15,%rsi,4), %xmm1
	movaps	%xmm0, (%r15,%rsi,4)
	movaps	%xmm1, 16(%r15,%rsi,4)
LBB0_17:
	cmpq	%rdx, %rcx
	jne	LBB0_18
LBB0_22:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_26
## %bb.23:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %r14d
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13)
	js	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%r13, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movl	%r14d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	%r15, %r8
	callq	_rate_idx_match_mask
	addq	$8, %r13
	decq	%rbx
	jne	LBB0_24
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	xorl	%esi, %esi
	testb	$1, %r8b
	jne	LBB0_16
	jmp	LBB0_17
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_HT_MCS_MASK_LEN,4,2  ## @IEEE80211_HT_MCS_MASK_LEN
	.no_dead_strip	_rate_control_apply_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rate_control_apply_mask
_rate_control_apply_mask:               ; @rate_control_apply_mask
	.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
	sub	sp, sp, #16
	mov	x23, x5
	mov	x19, x4
	mov	x26, x3
	mov	x20, x2
	mov	x25, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _IEEE80211_HT_MCS_MASK_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_HT_MCS_MASK_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w28, [x8]
	lsl	x27, x28, #2
	mov	x9, x27
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x27, #15
	and	x9, x9, #0x7fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	ldr	x8, [x3]
	lsl	x9, x8, #2
	ldp	x10, x11, [x0]
	ldr	w22, [x10, x9]
	ldr	w9, [x11, x9]
	ldr	w10, [x2]
	mov	w11, #-1
	lsl	w10, w11, w10
	mvn	w10, w10
	cmp	w22, w10
	ccmp	w9, #0, #0, eq
	b.eq	LBB0_17
; %bb.1:
	cbz	w9, LBB0_3
; %bb.2:
	ldr	x9, [x24, #24]
	ldr	w1, [x9, x8, lsl #2]
	lsl	w2, w28, #2
	mov	x0, x21
	bl	_memcpy
	cbnz	x25, LBB0_4
	b	LBB0_13
LBB0_3:
	lsl	w2, w28, #2
	mov	x0, x21
	mov	w1, #255
	bl	_memset
	cbz	x25, LBB0_13
LBB0_4:
	ldr	x8, [x25]
	ldr	x9, [x26]
	ldr	w8, [x8, x9, lsl #2]
	and	w22, w8, w22
	cbz	w28, LBB0_13
; %bb.5:
	ldr	x8, [x25, #8]
	cmp	x27, #1
	csinc	x9, x27, xzr, hi
	cmp	x9, #16
	b.lo	LBB0_10
; %bb.6:
	lsl	x10, x9, #2
	add	x11, x21, x10
	add	x10, x8, x10
	cmp	x21, x10
	ccmp	x8, x11, #2, lo
	b.lo	LBB0_10
; %bb.7:
	and	x10, x9, #0x3fffffff0
	add	x11, x21, #32
	add	x12, x8, #32
	mov	x13, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11]
	and.16b	v0, v4, v0
	and.16b	v1, v5, v1
	and.16b	v2, v6, v2
	and.16b	v3, v7, v3
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_8
; %bb.9:
	cmp	x9, x10
	b.ne	LBB0_11
	b	LBB0_13
LBB0_10:
	mov	x10, #0
LBB0_11:
	lsl	x12, x10, #2
	add	x11, x21, x12
	add	x8, x8, x12
	sub	x9, x9, x10
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8], #4
	ldr	w12, [x11]
	and	w10, w12, w10
	str	w10, [x11], #4
	subs	x9, x9, #1
	b.ne	LBB0_12
LBB0_13:
	cmp	w23, #1
	b.lt	LBB0_17
; %bb.14:
	ldr	w24, [x24, #16]
	mov	w23, w23
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	mov	x3, x22
	mov	x4, x21
	bl	_rate_idx_match_mask
	add	x19, x19, #8
	subs	x23, x23, #1
	b.ne	LBB0_15
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #80
	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
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_HT_MCS_MASK_LEN,4,2  ; @IEEE80211_HT_MCS_MASK_LEN
	.no_dead_strip	_rate_control_apply_mask
.subsections_via_symbols
