	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_free_link               ## -- Begin function wl12xx_free_link
	.p2align	4, 0x90
_wl12xx_free_link:                      ## @wl12xx_free_link
	.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	(%rdx), %rax
	movq	_WL12XX_INVALID_LINK_ID@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_1
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	20(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rdi
	movl	24(%r14), %esi
	callq	___clear_bit
	movq	(%rbx), %rdi
	movl	32(%r15), %esi
	callq	___clear_bit
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%r14), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	$0, 40(%rax,%rcx)
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	$0, 32(%rax,%rcx)
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	$0, 24(%rax,%rcx)
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movl	16(%rax,%rcx), %edi
	callq	_eth_zero_addr
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_wl1271_tx_reset_link_queues
	movq	8(%r14), %rax
	movq	(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rcx
	shlq	$4, %rcx
	movq	$0, 8(%rax,%rcx)
	movq	(%r15), %rsi
	movq	_BSS_TYPE_AP_BSS@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_5
## %bb.2:
	cmpq	24(%r15), %rdx
	jne	LBB0_5
## %bb.3:
	movq	_WL1271_TX_SQN_POST_RECOVERY_PADDING@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	movq	(%rax,%rcx), %rax
	movq	%rax, 16(%r15)
	movq	8(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_KEY_GEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_WL1271_FLAG_RECOVERY_IN_PROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -64(%rbp)                 ## 8-byte Folded Reload
	cmoveq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	addq	%r12, 16(%r15)
LBB0_5:
	movq	8(%r14), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	$0, (%rax,%rcx)
	movq	(%r13), %rax
	movq	%rax, (%rbx)
	movq	(%r14), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r14)
	xorl	%edi, %edi
	testq	%rax, %rax
	setle	%dil
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON_ONCE                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ## @WL12XX_INVALID_LINK_ID
	.comm	_BSS_TYPE_AP_BSS,8,3            ## @BSS_TYPE_AP_BSS
	.comm	_WL1271_TX_SQN_POST_RECOVERY_PADDING,8,3 ## @WL1271_TX_SQN_POST_RECOVERY_PADDING
	.comm	_KEY_GEM,8,3                    ## @KEY_GEM
	.comm	_WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM,8,3 ## @WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM
	.comm	_WL1271_FLAG_RECOVERY_IN_PROGRESS,4,2 ## @WL1271_FLAG_RECOVERY_IN_PROGRESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_free_link               ; -- Begin function wl12xx_free_link
	.p2align	2
_wl12xx_free_link:                      ; @wl12xx_free_link
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x2]
Lloh0:
	adrp	x23, _WL12XX_INVALID_LINK_ID@GOTPAGE
Lloh1:
	ldr	x23, [x23, _WL12XX_INVALID_LINK_ID@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x22, x0, #20
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x0, [x20]
	ldr	w1, [x19, #24]
	bl	___clear_bit
	ldr	x0, [x20]
	ldr	w1, [x21, #32]
	bl	___clear_bit
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	mov	w22, #48
	madd	x9, x9, x22, x8
	str	xzr, [x9, #40]
	ldr	x9, [x20]
	madd	x9, x9, x22, x8
	str	xzr, [x9, #32]
	ldr	x9, [x20]
	madd	x9, x9, x22, x8
	str	xzr, [x9, #24]
	ldr	x9, [x20]
	madd	x8, x9, x22, x8
	ldr	w0, [x8, #16]
	bl	_eth_zero_addr
	ldr	x1, [x20]
	mov	x0, x19
	bl	_wl1271_tx_reset_link_queues
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	madd	x10, x9, x22, x8
	str	xzr, [x10, #8]
	ldr	x10, [x21]
Lloh2:
	adrp	x11, _BSS_TYPE_AP_BSS@GOTPAGE
Lloh3:
	ldr	x11, [x11, _BSS_TYPE_AP_BSS@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_6
; %bb.3:
	ldr	x10, [x21, #24]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.4:
Lloh5:
	adrp	x10, _WL1271_TX_SQN_POST_RECOVERY_PADDING@GOTPAGE
Lloh6:
	ldr	x10, [x10, _WL1271_TX_SQN_POST_RECOVERY_PADDING@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x10]
	mov	w10, #48
	mul	x9, x9, x10
	ldr	x8, [x8, x9]
	str	x8, [x21, #16]
	ldr	x24, [x21, #8]
Lloh8:
	adrp	x8, _KEY_GEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KEY_GEM@GOTPAGEOFF]
Lloh10:
	adrp	x9, _WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM@GOTPAGEOFF]
Lloh12:
	ldr	x26, [x8]
Lloh13:
	ldr	x25, [x9]
Lloh14:
	adrp	x8, _WL1271_FLAG_RECOVERY_IN_PROGRESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WL1271_FLAG_RECOVERY_IN_PROGRESS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.5:
	cmp	x24, x26
	csel	x8, x25, x22, eq
	ldr	x9, [x21, #16]
	add	x8, x9, x8
	str	x8, [x21, #16]
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	mov	w10, #48
	mul	x9, x9, x10
	str	xzr, [x8, x9]
	ldr	x8, [x23]
	str	x8, [x20]
	ldr	x8, [x19]
	subs	x8, x8, #1
	str	x8, [x19]
	cset	w0, lt
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_WARN_ON_ONCE
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ; @WL12XX_INVALID_LINK_ID
	.comm	_BSS_TYPE_AP_BSS,8,3            ; @BSS_TYPE_AP_BSS
	.comm	_WL1271_TX_SQN_POST_RECOVERY_PADDING,8,3 ; @WL1271_TX_SQN_POST_RECOVERY_PADDING
	.comm	_KEY_GEM,8,3                    ; @KEY_GEM
	.comm	_WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM,8,3 ; @WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM
	.comm	_WL1271_FLAG_RECOVERY_IN_PROGRESS,4,2 ; @WL1271_FLAG_RECOVERY_IN_PROGRESS
.subsections_via_symbols
