	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_tx_complete             ## -- Begin function wl1251_tx_complete
	.p2align	4, 0x90
_wl1251_tx_complete:                    ## @wl1251_tx_complete
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FW_TX_CMPLT_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%r14), %rax
	movq	_WL1251_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movq	16(%r14), %rax
	movq	(%rax), %rsi
	shll	$3, %ebx
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_wl1251_mem_read
	movl	8(%r14), %r13d
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r13d, %rbx
	cmpl	$1, (%r15,%rbx,8)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, 4(%r15,%rbx,8)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_wl1251_tx_packet_cb
	movq	$0, (%r15,%rbx,8)
	incl	%ebx
	movq	_FW_TX_CMPLT_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	decl	%r13d
	andl	%ebx, %r13d
	incl	%r12d
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r12d
	jl	LBB0_2
LBB0_5:
	leaq	36(%r14), %rdi
	callq	_skb_queue_len
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.6:
	testl	%ebx, %ebx
	jle	LBB0_8
## %bb.7:
	movq	_DEBUG_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wl1251_debug
	movl	28(%r14), %edi
	leaq	32(%r14), %rsi
	callq	_ieee80211_queue_work
LBB0_8:
	cmpl	$0, 12(%r14)
	je	LBB0_11
## %bb.9:
	movq	_WL1251_TX_QUEUE_LOW_WATERMARK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_11
## %bb.10:
	movq	_DEBUG_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wl1251_debug
	leaq	24(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	28(%r14), %edi
	callq	_ieee80211_wake_queues
	movl	$0, 12(%r14)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_11:
	testl	%r12d, %r12d
	je	LBB0_19
## %bb.12:
	movslq	8(%r14), %rax
	cmpl	%eax, %r13d
	jle	LBB0_15
## %bb.13:
	movq	16(%r14), %rcx
	leaq	(,%rax,8), %rsi
	addq	(%rcx), %rsi
	leaq	(%r15,%rax,8), %rdx
	shll	$3, %r12d
	movq	%r14, %rdi
	movl	%r12d, %ecx
	jmp	LBB0_18
LBB0_15:
	movq	16(%r14), %rcx
	movq	(%rcx), %rsi
	cmpl	%eax, %r13d
	jge	LBB0_17
## %bb.16:
	leaq	(%rsi,%rax,8), %rsi
	leaq	(%r15,%rax,8), %rdx
	movq	_FW_TX_CMPLT_BLOCK_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	subl	%eax, %ecx
	shll	$3, %ecx
	movq	%r14, %rdi
	callq	_wl1251_mem_write
	movq	16(%r14), %rax
	subl	(%rbx), %r12d
	movq	(%rax), %rsi
	addl	8(%r14), %r12d
	shll	$3, %r12d
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	jmp	LBB0_18
LBB0_17:
	movq	_FW_TX_CMPLT_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	$3, %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
LBB0_18:
	callq	_wl1251_mem_write
LBB0_19:
	movl	%r13d, 8(%r14)
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_TX_CMPLT_BLOCK_SIZE,4,2     ## @FW_TX_CMPLT_BLOCK_SIZE
	.comm	_WL1251_STATE_ON,8,3            ## @WL1251_STATE_ON
	.comm	_DEBUG_TX,4,2                   ## @DEBUG_TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx_complete: reschedule tx_work"

	.comm	_WL1251_TX_QUEUE_LOW_WATERMARK,4,2 ## @WL1251_TX_QUEUE_LOW_WATERMARK
L_.str.1:                               ## @.str.1
	.asciz	"tx_complete: waking queues"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_tx_complete             ; -- Begin function wl1251_tx_complete
	.p2align	2
_wl1251_tx_complete:                    ; @wl1251_tx_complete
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _FW_TX_CMPLT_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _FW_TX_CMPLT_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w21, [x22]
	lsl	x8, x21, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x0]
Lloh7:
	adrp	x9, _WL1251_STATE_ON@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WL1251_STATE_ON@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_22
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	lsl	w3, w21, #3
	mov	x0, x19
	mov	x2, x20
	bl	_wl1251_mem_read
	ldr	w23, [x19, #8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.2:
	mov	w24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x20, w23, sxtw #3
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w23
	add	x8, x20, x8, lsl #3
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_wl1251_tx_packet_cb
	str	xzr, [x21]
	add	w8, w23, #1
	ldr	w9, [x22]
	sub	w9, w9, #1
	and	w23, w9, w8
	add	w24, w24, #1
	mov	x0, x20
	bl	_ARRAY_SIZE
	cmp	w24, w0
	b.lt	LBB0_3
	b	LBB0_7
LBB0_6:
	mov	w24, #0
LBB0_7:
	add	x0, x19, #36
	bl	_skb_queue_len
	mov	x21, x0
	cbz	w24, LBB0_10
; %bb.8:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.9:
Lloh10:
	adrp	x8, _DEBUG_TX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DEBUG_TX@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1251_debug
	ldr	w0, [x19, #28]
	add	x1, x19, #32
	bl	_ieee80211_queue_work
LBB0_10:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_13
; %bb.11:
Lloh15:
	adrp	x8, _WL1251_TX_QUEUE_LOW_WATERMARK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WL1251_TX_QUEUE_LOW_WATERMARK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w21, w8
	b.gt	LBB0_13
; %bb.12:
Lloh18:
	adrp	x8, _DEBUG_TX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DEBUG_TX@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1251_debug
	add	x21, x19, #24
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w0, [x19, #28]
	bl	_ieee80211_wake_queues
	str	wzr, [x19, #12]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_13:
	cbz	w24, LBB0_21
; %bb.14:
	ldrsw	x8, [x19, #8]
	cmp	w23, w8
	b.le	LBB0_16
; %bb.15:
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	lsl	x8, x8, #3
	add	x1, x9, x8
	add	x2, x20, x8
	lsl	w3, w24, #3
	mov	x0, x19
	b	LBB0_20
LBB0_16:
	ldr	x9, [x19, #16]
	ldr	x1, [x9]
	cmp	w23, w8
	b.ge	LBB0_18
; %bb.17:
	lsl	x9, x8, #3
	add	x1, x1, x9
	add	x2, x20, x9
	ldr	w9, [x22]
	sub	w8, w9, w8
	lsl	w3, w8, #3
	mov	x0, x19
	bl	_wl1251_mem_write
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	ldr	w8, [x22]
	ldr	w9, [x19, #8]
	sub	w8, w24, w8
	add	w8, w8, w9
	b	LBB0_19
LBB0_18:
	ldr	w8, [x22]
LBB0_19:
	lsl	w3, w8, #3
	mov	x0, x19
	mov	x2, x20
LBB0_20:
	bl	_wl1251_mem_write
LBB0_21:
	str	w23, [x19, #8]
LBB0_22:
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	sub	sp, x29, #48
	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
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_TX_CMPLT_BLOCK_SIZE,4,2     ; @FW_TX_CMPLT_BLOCK_SIZE
	.comm	_WL1251_STATE_ON,8,3            ; @WL1251_STATE_ON
	.comm	_DEBUG_TX,4,2                   ; @DEBUG_TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx_complete: reschedule tx_work"

	.comm	_WL1251_TX_QUEUE_LOW_WATERMARK,4,2 ; @WL1251_TX_QUEUE_LOW_WATERMARK
l_.str.1:                               ; @.str.1
	.asciz	"tx_complete: waking queues"

.subsections_via_symbols
