	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8180_handle_tx
_rtl8180_handle_tx:                     ## @rtl8180_handle_tx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %eax
	leaq	(%rax,%rax,2), %rbx
	leaq	(%r14,%rbx,8), %r15
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_skb_queue_len
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	leaq	(%r14,%rbx,8), %r14
	addq	$16, %r14
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_skb_queue_len
	testl	%eax, %eax
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	movq	-16(%r14), %r12
	movl	4(%rbx,%r12,8), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movq	_RTL818X_TX_DESC_FLAG_OWN@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-16(%r14), %rax
	incq	%rax
	movslq	-8(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, -16(%r14)
	movq	%r15, %rdi
	callq	___skb_dequeue
	movq	%rax, %r15
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	movl	(%rbx,%r12,8), %edi
	callq	_le32_to_cpu
	movl	(%r15), %edx
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_pci_unmap_single
	movq	%r15, %rdi
	callq	_IEEE80211_SKB_CB
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_ieee80211_tx_info_clear_status
	movl	(%r14), %eax
	movq	_IEEE80211_TX_CTL_NO_ACK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_RTL818X_TX_DESC_FLAG_TX_OK@GOTPCREL(%rip), %rcx
	testl	%r13d, (%rcx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_IEEE80211_TX_STAT_ACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%r13b, %eax
	incl	%eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_ieee80211_tx_status_irqsafe
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-8(%r14), %ebx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_skb_queue_len
	subl	%eax, %ebx
	cmpl	$2, %ebx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ieee80211_wake_queue
	jmp	LBB0_11
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL818X_TX_DESC_FLAG_OWN,4,2   ## @RTL818X_TX_DESC_FLAG_OWN
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ## @IEEE80211_TX_CTL_NO_ACK
	.comm	_RTL818X_TX_DESC_FLAG_TX_OK,4,2 ## @RTL818X_TX_DESC_FLAG_TX_OK
	.comm	_IEEE80211_TX_STAT_ACK,4,2      ## @IEEE80211_TX_STAT_ACK
	.no_dead_strip	_rtl8180_handle_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8180_handle_tx
_rtl8180_handle_tx:                     ; @rtl8180_handle_tx
	.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
	mov	x20, x0
	ldr	x8, [x0]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x19, [x8, #8]
	mov	w8, #24
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
	umaddl	x22, w1, w8, x19
	add	x21, x22, #12
	mov	x0, x21
	bl	_skb_queue_len
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	mov	w8, w8
	add	x26, x22, #16
	mov	w9, #24
	madd	x27, x8, x9, x19
	add	x28, x27, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_skb_queue_len
	cbz	w0, LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x26]
	ldr	x25, [x27]
	add	x8, x19, x25, lsl #3
	ldr	w0, [x8, #4]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _RTL818X_TX_DESC_FLAG_OWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL818X_TX_DESC_FLAG_OWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldr	x8, [x27]
	add	x8, x8, #1
	ldrsw	x9, [x28]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x27]
	mov	x0, x21
	bl	___skb_dequeue
	mov	x23, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w24, [x8]
	lsl	x8, x25, #3
	ldr	w0, [x19, x8]
	bl	_le32_to_cpu
	mov	x1, x0
	ldr	w2, [x23]
Lloh3:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x24
	bl	_pci_unmap_single
	mov	x0, x23
	bl	_IEEE80211_SKB_CB
	mov	x24, x0
	bl	_ieee80211_tx_info_clear_status
	ldr	w8, [x24]
Lloh6:
	adrp	x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x9, _RTL818X_TX_DESC_FLAG_TX_OK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RTL818X_TX_DESC_FLAG_TX_OK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w22
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x9, _IEEE80211_TX_STAT_ACK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IEEE80211_TX_STAT_ACK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x24]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w22, #0xff
	add	w8, w8, #1
	ldr	x9, [x24, #8]
	str	w8, [x9]
	mov	x0, x20
	mov	x1, x23
	bl	_ieee80211_tx_status_irqsafe
	ldr	w19, [x28]
	mov	x0, x21
	bl	_skb_queue_len
	sub	w8, w19, w0
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
	bl	_ieee80211_wake_queue
	b	LBB0_2
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL818X_TX_DESC_FLAG_OWN,4,2   ; @RTL818X_TX_DESC_FLAG_OWN
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ; @IEEE80211_TX_CTL_NO_ACK
	.comm	_RTL818X_TX_DESC_FLAG_TX_OK,4,2 ; @RTL818X_TX_DESC_FLAG_TX_OK
	.comm	_IEEE80211_TX_STAT_ACK,4,2      ; @IEEE80211_TX_STAT_ACK
	.no_dead_strip	_rtl8180_handle_tx
.subsections_via_symbols
