	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_allocate_sta
_wl1271_allocate_sta:                   ## @wl1271_allocate_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	jge	LBB0_1
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdx), %r15
	movq	%r15, %rdx
	callq	_wl12xx_allocate_link
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	8(%r15), %eax
	movq	16(%rbx), %rcx
	movq	(%r15), %rdi
	movl	%eax, 4(%rcx,%rdi,8)
	movl	(%r12), %esi
	callq	_set_bit
	movq	16(%rbx), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,8), %edi
	movl	(%r14), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	incq	(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_wl1271_warning
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate HLID - too much stations"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"could not allocate HLID - too many links"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.no_dead_strip	_wl1271_allocate_sta
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_allocate_sta
_wl1271_allocate_sta:                   ; @wl1271_allocate_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
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x2, #8]
	mov	x2, x22
	bl	_wl12xx_allocate_link
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w8, [x22, #8]
	ldr	x9, [x19, #16]
	ldr	x0, [x22]
	add	x9, x9, x0, lsl #3
	str	w8, [x9, #4]
	ldr	w1, [x21]
	bl	_set_bit
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	lsl	x9, x9, #3
	ldr	w0, [x8, x9]
	ldr	w1, [x20]
Lloh0:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_memcpy
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_wl1271_warning
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate HLID - too much stations"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"could not allocate HLID - too many links"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.no_dead_strip	_wl1271_allocate_sta
.subsections_via_symbols
