	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_hostapd_add_sta
_prism2_hostapd_add_sta:                ## @prism2_hostapd_add_sta
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_spin_lock_bh
	movl	12(%r14), %esi
	movq	%r15, %rdi
	callq	_ap_get_sta
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$16, %rdi
	callq	_atomic_inc
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	jmp	LBB0_2
LBB0_15:
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movl	12(%r14), %esi
	movq	%r15, %rdi
	callq	_ap_add_sta
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_16
LBB0_2:
	movl	(%rbx), %eax
	movq	_WLAN_STA_ASSOC@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%eax, %ecx
	jne	LBB0_6
## %bb.3:
	cmpl	$0, 40(%rbx)
	jne	LBB0_6
## %bb.4:
	movq	32(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.5:
	movl	(%rdx), %edi
	movq	%rbx, %rsi
	callq	_hostap_event_new_sta
	movl	(%r15), %ecx
	movl	(%rbx), %eax
LBB0_6:
	movq	_WLAN_STA_AUTH@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	orl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	_WLAN_RATE_1M@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	8(%rbx), %rax
	movl	$2, (%rax)
	movl	4(%rbx), %eax
LBB0_8:
	movq	_WLAN_RATE_2M@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	8(%rbx), %rax
	movl	$4, 4(%rax)
	movl	4(%rbx), %eax
LBB0_10:
	movq	_WLAN_RATE_5M5@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movq	8(%rbx), %rax
	movl	$11, 8(%rax)
	movl	4(%rbx), %eax
LBB0_12:
	movq	_WLAN_RATE_11M@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	8(%rbx), %rax
	movl	$22, 12(%rax)
LBB0_14:
	movq	%rbx, %rdi
	callq	_prism2_check_tx_rates
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_atomic_dec
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$-1, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_STA_ASSOC,4,2             ## @WLAN_STA_ASSOC
	.comm	_WLAN_STA_AUTH,4,2              ## @WLAN_STA_AUTH
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_WLAN_RATE_1M,4,2               ## @WLAN_RATE_1M
	.comm	_WLAN_RATE_2M,4,2               ## @WLAN_RATE_2M
	.comm	_WLAN_RATE_5M5,4,2              ## @WLAN_RATE_5M5
	.comm	_WLAN_RATE_11M,4,2              ## @WLAN_RATE_11M
	.no_dead_strip	_prism2_hostapd_add_sta
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_hostapd_add_sta
_prism2_hostapd_add_sta:                ; @prism2_hostapd_add_sta
	.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, x1
	mov	x21, x0
	bl	_spin_lock_bh
	ldr	w1, [x20, #12]
	mov	x0, x21
	bl	_ap_get_sta
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	add	x0, x0, #16
	bl	_atomic_inc
	mov	x0, x21
	bl	_spin_unlock_bh
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_spin_unlock_bh
	ldr	w1, [x20, #12]
	mov	x0, x21
	bl	_ap_add_sta
	mov	x19, x0
	cbz	x0, LBB0_17
LBB0_3:
	ldr	w8, [x19]
Lloh0:
	adrp	x21, _WLAN_STA_ASSOC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WLAN_STA_ASSOC@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.4:
	ldr	w10, [x19, #40]
	cbnz	w10, LBB0_7
; %bb.5:
	ldr	x10, [x19, #32]
	cbz	x10, LBB0_7
; %bb.6:
	ldr	w0, [x10]
	mov	x1, x19
	bl	_hostap_event_new_sta
	ldr	w9, [x21]
	ldr	w8, [x19]
LBB0_7:
Lloh2:
	adrp	x10, _WLAN_STA_AUTH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _WLAN_STA_AUTH@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	orr	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x19]
Lloh5:
	adrp	x8, _jiffies@GOTPAGE
Lloh6:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldur	d0, [x20, #4]
	stur	d0, [x19, #20]
	ldr	w8, [x20]
	str	w8, [x19, #4]
Lloh8:
	adrp	x9, _WLAN_RATE_1M@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WLAN_RATE_1M@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x19, #8]
	mov	w9, #2
	str	w9, [x8]
	ldr	w8, [x19, #4]
LBB0_9:
Lloh11:
	adrp	x9, _WLAN_RATE_2M@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WLAN_RATE_2M@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
	mov	w9, #4
	str	w9, [x8, #4]
	ldr	w8, [x19, #4]
LBB0_11:
Lloh14:
	adrp	x9, _WLAN_RATE_5M5@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WLAN_RATE_5M5@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	x8, [x19, #8]
	mov	w9, #11
	str	w9, [x8, #8]
	ldr	w8, [x19, #4]
LBB0_13:
Lloh17:
	adrp	x9, _WLAN_RATE_11M@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WLAN_RATE_11M@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
	mov	w9, #22
	str	w9, [x8, #12]
LBB0_15:
	mov	x0, x19
	bl	_prism2_check_tx_rates
	add	x0, x19, #16
	bl	_atomic_dec
	mov	w0, #0
LBB0_16:
	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
LBB0_17:
	mov	w0, #-1
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_STA_ASSOC,4,2             ; @WLAN_STA_ASSOC
	.comm	_WLAN_STA_AUTH,4,2              ; @WLAN_STA_AUTH
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_WLAN_RATE_1M,4,2               ; @WLAN_RATE_1M
	.comm	_WLAN_RATE_2M,4,2               ; @WLAN_RATE_2M
	.comm	_WLAN_RATE_5M5,4,2              ; @WLAN_RATE_5M5
	.comm	_WLAN_RATE_11M,4,2              ; @WLAN_RATE_11M
	.no_dead_strip	_prism2_hostapd_add_sta
.subsections_via_symbols
