	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_ops_sta_add
_rtw_ops_sta_add:                       ## @rtw_ops_sta_add
	.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, %r14
	movq	%rsi, %r12
	movq	(%rdi), %r15
	movq	8(%rdx), %rbx
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_rtw_acquire_macid
	movq	%rax, (%rbx)
	movq	_RTW_MAX_MAC_ID_NUM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movq	%r14, 24(%rbx)
	movq	%r12, 16(%rbx)
	movl	$1, 8(%rbx)
	leaq	12(%rbx), %rdi
	callq	_ewma_rssi_init
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rtw_update_sta_info
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_rtw_fw_media_status_report
	incl	4(%r15)
	movl	(%r14), %edx
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_rtw_info
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTW_MAX_MAC_ID_NUM,8,3         ## @RTW_MAX_MAC_ID_NUM
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sta %pM joined with macid %d\n"

	.no_dead_strip	_rtw_ops_sta_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_ops_sta_add
_rtw_ops_sta_add:                       ; @rtw_ops_sta_add
	.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	x20, x2
	mov	x22, x1
	ldr	x19, [x0]
	ldr	x21, [x2, #8]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_rtw_acquire_macid
	str	x0, [x21]
Lloh0:
	adrp	x8, _RTW_MAX_MAC_ID_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTW_MAX_MAC_ID_NUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_2
; %bb.1:
	stp	x22, x20, [x21, #16]
	mov	w8, #1
	str	w8, [x21, #8]
	add	x0, x21, #12
	bl	_ewma_rssi_init
	mov	x0, x19
	mov	x1, x21
	bl	_rtw_update_sta_info
	ldr	x1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_rtw_fw_media_status_report
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	ldr	w2, [x20]
	ldr	x3, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rtw_info
	mov	w20, #0
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RTW_MAX_MAC_ID_NUM,8,3         ; @RTW_MAX_MAC_ID_NUM
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sta %pM joined with macid %d\n"

	.no_dead_strip	_rtw_ops_sta_add
.subsections_via_symbols
