	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_sta_remove              ## -- Begin function rt2800_sta_remove
	.p2align	4, 0x90
_rt2800_sta_remove:                     ## @rt2800_sta_remove
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	(%rdi), %r14
	movq	(%r14), %r12
	movq	%rdx, %rdi
	callq	_sta_to_rt2x00_sta
	movslq	(%rax), %r15
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	16(%r12), %rax
	movl	(%rbx), %ecx
	andl	$3, %ecx
	decl	(%rax,%rcx,4)
	movq	%r14, %rdi
	callq	_rt2800_set_max_psdu_len
LBB0_2:
	movq	_WCID_END@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jg	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_rt2800_config_wcid
	movq	8(%r12), %rax
	movq	_WCID_START@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	subq	%rcx, %r15
	movq	$0, (%rax,%r15,8)
	movl	(%r12), %esi
	movl	%r15d, %edi
	callq	___clear_bit
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCID_END,4,2                   ## @WCID_END
	.comm	_WCID_START,4,2                 ## @WCID_START
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_sta_remove              ; -- Begin function rt2800_sta_remove
	.p2align	2
_rt2800_sta_remove:                     ; @rt2800_sta_remove
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	ldr	x19, [x0]
	ldr	x22, [x19]
	mov	x0, x2
	bl	_sta_to_rt2x00_sta
	ldr	w20, [x0]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x22, #16]
	ldr	w9, [x21]
	and	x9, x9, #0x3
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	sub	w10, w10, #1
	str	w10, [x8, x9]
	mov	x0, x19
	bl	_rt2800_set_max_psdu_len
LBB0_2:
Lloh0:
	adrp	x8, _WCID_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCID_END@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	bl	_rt2800_config_wcid
Lloh3:
	adrp	x8, _WCID_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WCID_START@GOTPAGEOFF]
	ldr	x9, [x22, #8]
Lloh5:
	ldr	w8, [x8]
	sub	w0, w20, w8
	str	xzr, [x9, w0, sxtw #3]
	ldr	w1, [x22]
	bl	___clear_bit
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WCID_END,4,2                   ; @WCID_END
	.comm	_WCID_START,4,2                 ; @WCID_START
.subsections_via_symbols
