	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_txdone                  ## -- Begin function rt2800_txdone
	.p2align	4, 0x90
_rt2800_txdone:                         ## @rt2800_txdone
	.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
	testl	%esi, %esi
	je	LBB0_10
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	leaq	-44(%rbp), %rsi
	callq	_kfifo_get
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edi
	movq	_TX_STA_FIFO_PID_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rt2x00_get_field32
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rt2x00queue_get_tx_queue
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rt2x00queue_empty
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_Q_INDEX_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00queue_get_entry
	movq	%rax, %rbx
	movq	_ENTRY_OWNER_DEVICE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %r15
	movq	%r15, %rsi
	callq	_test_bit
	movb	$1, %cl
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENTRY_DATA_STATUS_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	sete	%cl
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%r13d
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rt2800_txdone_entry_check
	movl	%eax, %r15d
	movl	-44(%rbp), %r12d
	movq	%rbx, %rdi
	callq	_rt2800_drv_get_txwi
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%r15d, %ecx
	callq	_rt2800_txdone_entry
	testl	%r13d, %r13d
	jne	LBB0_2
	jmp	LBB0_10
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_rt2x00_dbg
	jmp	LBB0_10
LBB0_8:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %ecx
	callq	_rt2x00_warn
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_STA_FIFO_PID_QUEUE,4,2      ## @TX_STA_FIFO_PID_QUEUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got TX status for an empty queue %u, dropping\n"

	.comm	_Q_INDEX_DONE,4,2               ## @Q_INDEX_DONE
	.comm	_ENTRY_OWNER_DEVICE_DATA,4,2    ## @ENTRY_OWNER_DEVICE_DATA
	.comm	_ENTRY_DATA_STATUS_PENDING,4,2  ## @ENTRY_DATA_STATUS_PENDING
L_.str.1:                               ## @.str.1
	.asciz	"Data pending for entry %u in queue %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_txdone                  ; -- Begin function rt2800_txdone
	.p2align	2
_rt2800_txdone:                         ; @rt2800_txdone
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	w1, LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _TX_STA_FIFO_PID_QUEUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TX_STA_FIFO_PID_QUEUE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _Q_INDEX_DONE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _Q_INDEX_DONE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ENTRY_OWNER_DEVICE_DATA@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ENTRY_OWNER_DEVICE_DATA@GOTPAGEOFF]
Lloh6:
	adrp	x27, _ENTRY_DATA_STATUS_PENDING@GOTPAGE
Lloh7:
	ldr	x27, [x27, _ENTRY_DATA_STATUS_PENDING@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_kfifo_get
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #12]
	ldr	w1, [x24]
	bl	_rt2x00_get_field32
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_rt2x00queue_get_tx_queue
	mov	x22, x0
	bl	_rt2x00queue_empty
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x25]
	mov	x0, x22
	bl	_rt2x00queue_get_entry
	mov	x22, x0
	ldr	w0, [x26]
	add	x23, x22, #4
	mov	x1, x23
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_unlikely
	cbz	x0, LBB0_7
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x27]
	mov	x1, x23
	bl	_test_bit
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w20, w20, #1
	ldr	w1, [sp, #12]
	mov	x0, x22
	bl	_rt2800_txdone_entry_check
	mov	x21, x0
	ldr	w23, [sp, #12]
	mov	x0, x22
	bl	_rt2800_drv_get_txwi
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	mov	x3, x21
	bl	_rt2800_txdone_entry
	cbnz	w20, LBB0_2
	b	LBB0_10
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_rt2x00_dbg
	b	LBB0_10
LBB0_9:
	ldr	w2, [x22]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_rt2x00_warn
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_STA_FIFO_PID_QUEUE,4,2      ; @TX_STA_FIFO_PID_QUEUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got TX status for an empty queue %u, dropping\n"

	.comm	_Q_INDEX_DONE,4,2               ; @Q_INDEX_DONE
	.comm	_ENTRY_OWNER_DEVICE_DATA,4,2    ; @ENTRY_OWNER_DEVICE_DATA
	.comm	_ENTRY_DATA_STATUS_PENDING,4,2  ; @ENTRY_DATA_STATUS_PENDING
l_.str.1:                               ; @.str.1
	.asciz	"Data pending for entry %u in queue %u\n"

.subsections_via_symbols
