	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt61pci_txdone
_rt61pci_txdone:                        ## @rt61pci_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
	movq	(%rdi), %rax
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.1:
	movq	%rdi, %rbx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	leaq	-64(%rbp), %rsi
	callq	_rt2x00lib_txdone
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movq	(%rbx), %rax
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	cmpl	(%rax), %ecx
	jge	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	_STA_CSR4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_read
	movl	%eax, %r14d
	movq	_STA_CSR4_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field32
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_STA_CSR4_PID_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field32
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rt2x00queue_get_tx_queue
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_STA_CSR4_PID_SUBTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field32
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	(%r13), %eax
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r15
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	8(%r13), %r14
	movslq	%r12d, %r12
	shlq	$4, %r12
	movq	8(%r14,%r12), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_rt2x00_desc_read
	movl	%eax, %edi
	movq	_TXD_W0_OWNER_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edi, %ebx
	callq	_rt2x00_get_field32
	testl	%eax, %eax
	jne	LBB0_18
## %bb.6:                               ##   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_18
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r12, %r14
	movq	_Q_INDEX_DONE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_rt2x00queue_get_entry
	cmpq	%rax, %r14
	leaq	L_.str(%rip), %rbx
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rt2x00_warn
	movq	_TXDONE_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00lib_txdone_noinfo
	movq	_Q_INDEX_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rt2x00queue_get_entry
	movq	%rax, %r12
	cmpq	%rax, %r14
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -56(%rbp)
	movq	_STA_CSR4_TX_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_rt2x00_get_field32
	movq	_TXDONE_SUCCESS@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	leaq	-56(%rbp), %rbx
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$6, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXDONE_EXCESSIVE_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	___set_bit
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXDONE_FAILURE@GOTPCREL(%rip), %rcx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %edi
	movq	%rbx, %rsi
	callq	___set_bit
	movq	_STA_CSR4_RETRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_rt2x00_get_field32
	movl	%eax, -64(%rbp)
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_TXDONE_FALLBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	___set_bit
	jmp	LBB0_16
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STA_CSR4,4,2                   ## @STA_CSR4
	.comm	_STA_CSR4_VALID,4,2             ## @STA_CSR4_VALID
	.comm	_STA_CSR4_PID_TYPE,4,2          ## @STA_CSR4_PID_TYPE
	.comm	_STA_CSR4_PID_SUBTYPE,4,2       ## @STA_CSR4_PID_SUBTYPE
	.comm	_TXD_W0_OWNER_NIC,4,2           ## @TXD_W0_OWNER_NIC
	.comm	_TXD_W0_VALID,4,2               ## @TXD_W0_VALID
	.comm	_Q_INDEX_DONE,4,2               ## @Q_INDEX_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX status report missed for entry %d\n"

	.comm	_TXDONE_UNKNOWN,4,2             ## @TXDONE_UNKNOWN
	.comm	_STA_CSR4_TX_RESULT,4,2         ## @STA_CSR4_TX_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	_STA_CSR4_RETRY_COUNT,4,2       ## @STA_CSR4_RETRY_COUNT
	.comm	_TXDONE_FALLBACK,4,2            ## @TXDONE_FALLBACK
	.no_dead_strip	_rt61pci_txdone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt61pci_txdone
_rt61pci_txdone:                        ; @rt61pci_txdone
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x19, x0
	mov	w26, #0
Lloh0:
	adrp	x28, _STA_CSR4_VALID@GOTPAGE
Lloh1:
	ldr	x28, [x28, _STA_CSR4_VALID@GOTPAGEOFF]
	add	x8, sp, #16
	add	x8, x8, #8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh2:
	adrp	x20, _Q_INDEX_DONE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _Q_INDEX_DONE@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
Lloh6:
	adrp	x27, _TXDONE_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x27, [x27, _TXDONE_UNKNOWN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #16
	mov	x0, x23
	bl	_rt2x00lib_txdone
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w26, w8
	b.ge	LBB0_19
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
Lloh8:
	adrp	x8, _STA_CSR4@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STA_CSR4@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	mov	x22, x0
	ldr	w1, [x28]
	bl	_rt2x00_get_field32
	cbz	w0, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x8, _STA_CSR4_PID_TYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STA_CSR4_PID_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_rt2x00_get_field32
	mov	x1, x0
	mov	x0, x19
	bl	_rt2x00queue_get_tx_queue
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _STA_CSR4_PID_SUBTYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STA_CSR4_PID_SUBTYPE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_rt2x00_get_field32
	mov	x23, x0
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w0, ge
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24, #8]
	add	x23, x8, w23, sxtw #4
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_rt2x00_desc_read
	mov	x25, x0
Lloh17:
	adrp	x8, _TXD_W0_OWNER_NIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TXD_W0_OWNER_NIC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_rt2x00_get_field32
	cbnz	w0, LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x8, _TXD_W0_VALID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TXD_W0_VALID@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_rt2x00_get_field32
	cbz	w0, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x20]
	mov	x0, x24
	bl	_rt2x00queue_get_entry
	cmp	x23, x0
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x21
	bl	_rt2x00_warn
	ldr	w1, [x27]
	mov	x0, x25
	bl	_rt2x00lib_txdone_noinfo
	ldr	w1, [x20]
	mov	x0, x24
	bl	_rt2x00queue_get_entry
	mov	x25, x0
	cmp	x23, x0
	b.ne	LBB0_11
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [sp, #24]
Lloh23:
	adrp	x8, _STA_CSR4_TX_RESULT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _STA_CSR4_TX_RESULT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_rt2x00_get_field32
	cbz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #6
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh26:
	adrp	x8, _TXDONE_EXCESSIVE_RETRY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TXDONE_EXCESSIVE_RETRY@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x24
	bl	___set_bit
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh29:
	adrp	x8, _TXDONE_FAILURE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TXDONE_FAILURE@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh31:
	adrp	x8, _TXDONE_SUCCESS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TXDONE_SUCCESS@GOTPAGEOFF]
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x8]
	mov	x1, x24
	bl	___set_bit
Lloh33:
	adrp	x8, _STA_CSR4_RETRY_COUNT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _STA_CSR4_RETRY_COUNT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_rt2x00_get_field32
	str	w0, [sp, #16]
	cbz	w0, LBB0_2
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh36:
	adrp	x8, _TXDONE_FALLBACK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TXDONE_FALLBACK@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	mov	x1, x24
	bl	___set_bit
	b	LBB0_2
LBB0_19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_STA_CSR4,4,2                   ; @STA_CSR4
	.comm	_STA_CSR4_VALID,4,2             ; @STA_CSR4_VALID
	.comm	_STA_CSR4_PID_TYPE,4,2          ; @STA_CSR4_PID_TYPE
	.comm	_STA_CSR4_PID_SUBTYPE,4,2       ; @STA_CSR4_PID_SUBTYPE
	.comm	_TXD_W0_OWNER_NIC,4,2           ; @TXD_W0_OWNER_NIC
	.comm	_TXD_W0_VALID,4,2               ; @TXD_W0_VALID
	.comm	_Q_INDEX_DONE,4,2               ; @Q_INDEX_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX status report missed for entry %d\n"

	.comm	_TXDONE_UNKNOWN,4,2             ; @TXDONE_UNKNOWN
	.comm	_STA_CSR4_TX_RESULT,4,2         ; @STA_CSR4_TX_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	_STA_CSR4_RETRY_COUNT,4,2       ; @STA_CSR4_RETRY_COUNT
	.comm	_TXDONE_FALLBACK,4,2            ; @TXDONE_FALLBACK
	.no_dead_strip	_rt61pci_txdone
.subsections_via_symbols
