	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_add_station
_ipw_add_station:                       ## @ipw_add_station
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r15, %rsi
	callq	_ether_addr_equal
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_7:
	movq	_MAX_STATIONS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
## %bb.8:
	movq	_IPW_INVALID_STATION@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_IPW_DEBUG_SCAN
	xorps	%xmm0, %xmm0
	movups	%xmm0, -56(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r15, %rsi
	callq	_memcpy
	movq	8(%r14), %rax
	movl	%ebx, %r13d
	movl	(%rax,%r13,4), %edi
	movl	(%r12), %edx
	movq	%r15, %rsi
	callq	_memcpy
	movq	_IPW_STATION_TABLE_LOWER@GOTPCREL(%rip), %rax
	leaq	(,%r13,2), %rsi
	addq	%r13, %rsi
	shlq	$3, %rsi
	addq	(%rax), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	$24, %ecx
	callq	_ipw_write_direct
	incl	(%r14)
	jmp	LBB0_10
LBB0_4:
	movq	$0, 16(%r14)
	movl	4(%r14), %eax
	movq	_CFG_STATIC_CHANNEL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.5:
	movq	_CFG_ADHOC_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%r14)
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_STATIC_CHANNEL,4,2         ## @CFG_STATIC_CHANNEL
	.comm	_CFG_ADHOC_PERSIST,4,2          ## @CFG_ADHOC_PERSIST
	.comm	_MAX_STATIONS,4,2               ## @MAX_STATIONS
	.comm	_IPW_INVALID_STATION,4,2        ## @IPW_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adding AdHoc station: %pM\n"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_IPW_STATION_TABLE_LOWER,8,3    ## @IPW_STATION_TABLE_LOWER
	.no_dead_strip	_ipw_add_station
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_add_station
_ipw_add_station:                       ; @ipw_add_station
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x19, lsl #2]
	mov	x1, x21
	bl	_ether_addr_equal
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x20]
	cmp	x19, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
Lloh0:
	adrp	x8, _MAX_STATIONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_STATIONS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _IPW_INVALID_STATION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPW_INVALID_STATION@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_IPW_DEBUG_SCAN
	stp	xzr, xzr, [sp, #16]
Lloh8:
	adrp	x22, _ETH_ALEN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x1, x21
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	w0, [x8, w19, uxtw #2]
	ldr	w2, [x22]
	mov	x1, x21
	bl	_memcpy
Lloh10:
	adrp	x8, _IPW_STATION_TABLE_LOWER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IPW_STATION_TABLE_LOWER@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	mov	w9, #24
	umaddl	x1, w19, w9, x8
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #24
	bl	_ipw_write_direct
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	b	LBB0_10
LBB0_8:
	str	xzr, [x20, #16]
	ldr	w8, [x20, #4]
Lloh13:
	adrp	x9, _CFG_STATIC_CHANNEL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CFG_STATIC_CHANNEL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
Lloh16:
	adrp	x9, _CFG_ADHOC_PERSIST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CFG_ADHOC_PERSIST@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x20, #4]
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_STATIC_CHANNEL,4,2         ; @CFG_STATIC_CHANNEL
	.comm	_CFG_ADHOC_PERSIST,4,2          ; @CFG_ADHOC_PERSIST
	.comm	_MAX_STATIONS,4,2               ; @MAX_STATIONS
	.comm	_IPW_INVALID_STATION,4,2        ; @IPW_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adding AdHoc station: %pM\n"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_IPW_STATION_TABLE_LOWER,8,3    ; @IPW_STATION_TABLE_LOWER
	.no_dead_strip	_ipw_add_station
.subsections_via_symbols
