	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500pci_txdone
_rt2500pci_txdone:                      ## @rt2500pci_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_rt2x00queue_get_tx_queue
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_rt2x00queue_empty
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-48(%rbp), %r14
	movq	_TXD_W0_OWNER_NIC@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXDONE_FAILURE@GOTPCREL(%rip), %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %edi
	movq	%r14, %rsi
	callq	___set_bit
	movq	_TXD_W0_RETRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, -56(%rbp)
	movq	%r13, %rdi
	leaq	-56(%rbp), %rsi
	callq	_rt2x00lib_txdone
	movq	%r12, %rdi
	callq	_rt2x00queue_empty
	testl	%eax, %eax
	jne	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_Q_INDEX_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00queue_get_entry
	movq	%rax, %r13
	movq	(%rax), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_rt2x00_desc_read
	movl	%eax, %ebx
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field32
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXD_W0_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -48(%rbp)
	movq	_TXD_W0_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movq	_TXDONE_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	$2, %eax
	jb	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXDONE_EXCESSIVE_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	___set_bit
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_Q_INDEX_DONE,4,2               ## @Q_INDEX_DONE
	.comm	_TXD_W0_OWNER_NIC,4,2           ## @TXD_W0_OWNER_NIC
	.comm	_TXD_W0_VALID,4,2               ## @TXD_W0_VALID
	.comm	_TXD_W0_RESULT,4,2              ## @TXD_W0_RESULT
	.comm	_TXDONE_SUCCESS,4,2             ## @TXDONE_SUCCESS
	.comm	_TXDONE_EXCESSIVE_RETRY,4,2     ## @TXDONE_EXCESSIVE_RETRY
	.comm	_TXDONE_FAILURE,4,2             ## @TXDONE_FAILURE
	.comm	_TXD_W0_RETRY_COUNT,4,2         ## @TXD_W0_RETRY_COUNT
	.no_dead_strip	_rt2500pci_txdone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500pci_txdone
_rt2500pci_txdone:                      ; @rt2500pci_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
	bl	_rt2x00queue_get_tx_queue
	mov	x19, x0
	bl	_rt2x00queue_empty
	cbz	w0, LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x8, sp
	add	x20, x8, #8
Lloh0:
	adrp	x23, _Q_INDEX_DONE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _Q_INDEX_DONE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _TXD_W0_OWNER_NIC@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TXD_W0_OWNER_NIC@GOTPAGEOFF]
Lloh4:
	adrp	x25, _TXD_W0_VALID@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TXD_W0_VALID@GOTPAGEOFF]
Lloh6:
	adrp	x26, _TXD_W0_RESULT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _TXD_W0_RESULT@GOTPAGEOFF]
Lloh8:
	adrp	x27, _TXDONE_SUCCESS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _TXDONE_SUCCESS@GOTPAGEOFF]
Lloh10:
	adrp	x28, _TXD_W0_RETRY_COUNT@GOTPAGE
Lloh11:
	ldr	x28, [x28, _TXD_W0_RETRY_COUNT@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh12:
	adrp	x8, _TXDONE_FAILURE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TXDONE_FAILURE@GOTPAGEOFF]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x8]
	mov	x1, x20
	bl	___set_bit
	ldr	w1, [x28]
	mov	x0, x22
	bl	_rt2x00_get_field32
	str	w0, [sp]
	mov	x1, sp
	mov	x0, x21
	bl	_rt2x00lib_txdone
	mov	x0, x19
	bl	_rt2x00queue_empty
	cbnz	w0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_rt2x00queue_get_entry
	mov	x21, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_rt2x00_desc_read
	mov	x22, x0
	ldr	w1, [x24]
	bl	_rt2x00_get_field32
	cbnz	w0, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x25]
	mov	x0, x22
	bl	_rt2x00_get_field32
	cbz	w0, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [sp, #8]
	ldr	w1, [x26]
	mov	x0, x22
	bl	_rt2x00_get_field32
	mov	x8, x27
	cmp	w0, #2
	b.lo	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	b.ne	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _TXDONE_EXCESSIVE_RETRY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TXDONE_EXCESSIVE_RETRY@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x20
	bl	___set_bit
	b	LBB0_3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_Q_INDEX_DONE,4,2               ; @Q_INDEX_DONE
	.comm	_TXD_W0_OWNER_NIC,4,2           ; @TXD_W0_OWNER_NIC
	.comm	_TXD_W0_VALID,4,2               ; @TXD_W0_VALID
	.comm	_TXD_W0_RESULT,4,2              ; @TXD_W0_RESULT
	.comm	_TXDONE_SUCCESS,4,2             ; @TXDONE_SUCCESS
	.comm	_TXDONE_EXCESSIVE_RETRY,4,2     ; @TXDONE_EXCESSIVE_RETRY
	.comm	_TXDONE_FAILURE,4,2             ; @TXDONE_FAILURE
	.comm	_TXD_W0_RETRY_COUNT,4,2         ; @TXD_W0_RETRY_COUNT
	.no_dead_strip	_rt2500pci_txdone
.subsections_via_symbols
