	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_alloc_link_id           ## -- Begin function cw1200_alloc_link_id
	.p2align	4, 0x90
_cw1200_alloc_link_id:                  ## @cw1200_alloc_link_id
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	callq	_spin_lock_bh
	movq	_CW1200_MAX_STA_IN_AP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movq	24(%r12), %r15
	movq	_CW1200_LINK_HARD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	xorl	%r14d, %r14d
	xorl	%r8d, %r8d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdi
	movq	%rdi, %rdx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %rsi
	shlq	$5, %rsi
	movq	(%r15,%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rdx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r12), %rbx
	leaq	1(%rdi), %rdx
	cmpl	$0, 4(%rbx,%rdi,4)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	subq	8(%r15,%rsi), %rdi
	cmpq	%r8, %rdi
	cmovaq	%rdi, %r8
	cmovael	%edx, %r14d
	jmp	LBB0_8
LBB0_3:
	incl	%edi
	movl	%edi, %r14d
	jmp	LBB0_11
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.10:
	movq	24(%r12), %r15
LBB0_11:
	movslq	%r14d, %rsi
	movq	%rsi, %r13
	shlq	$5, %r13
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_pr_debug
	movq	_CW1200_LINK_RESERVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%r13,%r15)
	leaq	(%r15,%r13), %rdi
	addq	$-8, %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	leaq	(%r15,%r13), %rdi
	addq	$-12, %rdi
	movq	_CW1200_MAX_TID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	leaq	(%r15,%r13), %rdi
	addq	$-16, %rdi
	callq	_skb_queue_head_init
	movq	%r12, %rdi
	callq	_wsm_lock_tx_async
	movl	20(%r12), %edi
	leaq	16(%r12), %rsi
	callq	_queue_work
	testq	%rax, %rax
	jg	LBB0_14
## %bb.12:
	movq	%r12, %rdi
	callq	_wsm_unlock_tx
	jmp	LBB0_14
LBB0_13:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wiphy_info
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CW1200_MAX_STA_IN_AP_MODE,4,2  ## @CW1200_MAX_STA_IN_AP_MODE
	.comm	_CW1200_LINK_HARD,8,3           ## @CW1200_LINK_HARD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[AP] STA added, link_id: %d\n"

	.comm	_CW1200_LINK_RESERVE,8,3        ## @CW1200_LINK_RESERVE
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_CW1200_MAX_TID,4,2             ## @CW1200_MAX_TID
L_.str.1:                               ## @.str.1
	.asciz	"[AP] Early: no more link IDs available.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_alloc_link_id           ; -- Begin function cw1200_alloc_link_id
	.p2align	2
_cw1200_alloc_link_id:                  ; @cw1200_alloc_link_id
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	bl	_spin_lock_bh
Lloh3:
	adrp	x8, _CW1200_MAX_STA_IN_AP_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CW1200_MAX_STA_IN_AP_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x11, #0
	mov	w20, #0
	mov	x9, #0
	ldr	x22, [x19, #24]
Lloh6:
	adrp	x10, _CW1200_LINK_HARD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CW1200_LINK_HARD@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x12, x11, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x11, x12
	cmp	x12, x8
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x11, #5
	ldr	x12, [x22, x12]
	cbz	x12, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x12, x10
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x19, #32]
	add	x12, x11, #1
	ldr	w13, [x13, x12, lsl #2]
	cbnz	w13, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x22, x11, lsl #5
	ldr	x11, [x11, #8]
	sub	x11, x23, x11
	cmp	x11, x9
	csel	x9, x11, x9, hi
	csel	w20, w20, w12, lo
	b	LBB0_3
LBB0_8:
	add	w20, w11, #1
	b	LBB0_11
LBB0_9:
	cbz	w20, LBB0_13
; %bb.10:
	ldr	x22, [x19, #24]
LBB0_11:
	sxtw	x23, w20
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
Lloh11:
	adrp	x8, _CW1200_LINK_RESERVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CW1200_LINK_RESERVE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x22, x22, x23, lsl #5
	stur	x8, [x22, #-32]
	sub	x0, x22, #8
Lloh14:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_memcpy
	sub	x0, x22, #12
Lloh17:
	adrp	x8, _CW1200_MAX_TID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CW1200_MAX_TID@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	sub	x0, x22, #16
	bl	_skb_queue_head_init
	mov	x0, x19
	bl	_wsm_lock_tx_async
	ldr	w0, [x19, #20]
	add	x1, x19, #16
	bl	_queue_work
	cmp	x0, #0
	b.gt	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_wsm_unlock_tx
	b	LBB0_14
LBB0_13:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_info
	mov	w20, #0
LBB0_14:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CW1200_MAX_STA_IN_AP_MODE,4,2  ; @CW1200_MAX_STA_IN_AP_MODE
	.comm	_CW1200_LINK_HARD,8,3           ; @CW1200_LINK_HARD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[AP] STA added, link_id: %d\n"

	.comm	_CW1200_LINK_RESERVE,8,3        ; @CW1200_LINK_RESERVE
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_CW1200_MAX_TID,4,2             ; @CW1200_MAX_TID
l_.str.1:                               ; @.str.1
	.asciz	"[AP] Early: no more link IDs available.\n"

.subsections_via_symbols
