	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltq_etop_tx
_ltq_etop_tx:                           ## @ltq_etop_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	%rsi, %r13
	movq	%rdi, %r12
	callq	_skb_get_queue_mapping
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_netdev_get_tx_queue
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_netdev_priv
	movq	16(%rax), %rdi
	leal	(%rbx,%rbx), %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rdi,%rcx,8), %r14
	movl	(%r12), %edx
	movq	_ETH_ZLEN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	cmpl	%ebx, %edx
	cmovgl	%edx, %ebx
	movq	8(%rdi,%rcx,8), %r15
	movq	_LTQ_DMA_OWN@GOTPCREL(%rip), %rsi
	movq	_LTQ_DMA_C@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rsi), %edx
	testl	%edx, (%r15,%r14,8)
	jne	LBB0_2
## %bb.1:
	movq	16(%rdi,%rcx,8), %rdx
	cmpq	$0, (%rdx,%r14,8)
	je	LBB0_3
LBB0_2:
	movq	%r12, %rdi
	callq	_dev_kfree_skb_any
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_err
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rbx
LBB0_7:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_tx_stop_queue
LBB0_8:
	movl	(%rbx), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	(%rdi,%rcx,8), %rcx
	addq	$8, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %edi
	callq	_CPHYSADDR
                                        ## kill: def $eax killed $eax def $rax
	leal	15(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$-16, %ecx
	subl	%ecx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	-8(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	%r13, %rdi
	callq	_netif_trans_update
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r13), %rdi
	movl	4(%r12), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edx
	callq	_dma_map_single
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	subl	%r13d, %eax
	movl	%eax, 4(%r15,%r14,8)
	xorl	%eax, %eax
	callq	_wmb
	movq	_LTQ_DMA_SOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_LTQ_DMA_OWN@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_LTQ_DMA_EOP@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	%r13d, %edi
	callq	_LTQ_DMA_TX_OFFSET
	orl	%r12d, %eax
	movq	_LTQ_DMA_SIZE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	orl	%eax, %ebx
	movl	%ebx, (%r15,%r14,8)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-8(%rbx), %rax
	incq	%rax
	movq	%rax, -8(%rbx)
	movq	_LTQ_DESC_NUM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:
	movq	%rdx, -8(%rbx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	(%rbx), %rax
	movq	-8(%rbx), %rcx
	movq	_LTQ_DMA_OWN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rbx
	testl	%edx, (%rax,%rcx,8)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ZLEN,4,2                   ## @ETH_ZLEN
	.comm	_LTQ_DMA_OWN,4,2                ## @LTQ_DMA_OWN
	.comm	_LTQ_DMA_C,4,2                  ## @LTQ_DMA_C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx ring full\n"

	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_LTQ_DMA_SOP,4,2                ## @LTQ_DMA_SOP
	.comm	_LTQ_DMA_EOP,4,2                ## @LTQ_DMA_EOP
	.comm	_LTQ_DMA_SIZE_MASK,4,2          ## @LTQ_DMA_SIZE_MASK
	.comm	_LTQ_DESC_NUM,8,3               ## @LTQ_DESC_NUM
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_ltq_etop_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltq_etop_tx
_ltq_etop_tx:                           ; @ltq_etop_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	x23, x1
	mov	x21, x0
	bl	_skb_get_queue_mapping
	mov	x22, x0
	mov	x0, x23
	mov	x1, x22
	bl	_netdev_get_tx_queue
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x23
	bl	_netdev_priv
	ldr	x8, [x0, #16]
	lsl	w9, w22, #1
	sxtw	x9, w9
	orr	x9, x9, #0x1
	mov	w10, #24
	madd	x25, x9, x10, x8
	mov	x26, x25
	ldr	x24, [x26, #8]!
	ldr	x27, [x25]
	ldr	w10, [x21]
Lloh0:
	adrp	x11, _ETH_ZLEN@GOTPAGE
Lloh1:
	ldr	x11, [x11, _ETH_ZLEN@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	cmp	w10, w11
	csel	w22, w10, w11, gt
	add	x28, x24, x27, lsl #3
	ldr	w10, [x28]
Lloh3:
	adrp	x11, _LTQ_DMA_OWN@GOTPAGE
Lloh4:
	ldr	x11, [x11, _LTQ_DMA_OWN@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _LTQ_DMA_C@GOTPAGE
Lloh7:
	ldr	x12, [x12, _LTQ_DMA_C@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	orr	w11, w12, w11
	tst	w11, w10
	b.ne	LBB0_2
; %bb.1:
	mov	w10, #24
	madd	x19, x9, x10, x8
	ldr	x8, [x19, #16]!
	ldr	x8, [x8, x27, lsl #3]
	cbz	x8, LBB0_5
LBB0_2:
	mov	x0, x21
	bl	_dev_kfree_skb_any
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_netdev_err
Lloh11:
	adrp	x19, _NETDEV_TX_BUSY@GOTPAGE
Lloh12:
	ldr	x19, [x19, _NETDEV_TX_BUSY@GOTPAGEOFF]
LBB0_3:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_netif_tx_stop_queue
LBB0_4:
	ldr	w0, [x19]
	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_5:
	mov	x20, x0
	ldr	w0, [x21, #4]
	bl	_CPHYSADDR
	negs	w8, w0
	and	w8, w8, #0xf
	and	w9, w0, #0xf
	csneg	w8, w9, w8, mi
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	ldr	x8, [x19]
	ldr	x9, [x25]
	str	x21, [x8, x9, lsl #3]
	mov	x0, x23
	bl	_netif_trans_update
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x0, [x20, #8]
	ldr	w1, [x21, #4]
Lloh13:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x2, x22
	bl	_dma_map_single
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
	sub	w8, w0, w23
	add	x9, x24, x27, lsl #3
	str	w8, [x9, #4]
	bl	_wmb
Lloh16:
	adrp	x21, _LTQ_DMA_OWN@GOTPAGE
Lloh17:
	ldr	x21, [x21, _LTQ_DMA_OWN@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh18:
	adrp	x9, _LTQ_DMA_SOP@GOTPAGE
Lloh19:
	ldr	x9, [x9, _LTQ_DMA_SOP@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _LTQ_DMA_EOP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _LTQ_DMA_EOP@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w19, w8, w9
	mov	x0, x23
	bl	_LTQ_DMA_TX_OFFSET
	orr	w8, w19, w0
Lloh24:
	adrp	x9, _LTQ_DMA_SIZE_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LTQ_DMA_SIZE_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	and	w9, w9, w22
	orr	w8, w8, w9
	str	w8, [x28]
	ldr	x8, [x25]
	add	x8, x8, #1
	str	x8, [x25]
Lloh27:
	adrp	x9, _LTQ_DESC_NUM@GOTPAGE
Lloh28:
	ldr	x9, [x9, _LTQ_DESC_NUM@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x25]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x26]
	ldr	x9, [x25]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	ldr	w9, [x21]
Lloh30:
	adrp	x19, _NETDEV_TX_OK@GOTPAGE
Lloh31:
	ldr	x19, [x19, _NETDEV_TX_OK@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ZLEN,4,2                   ; @ETH_ZLEN
	.comm	_LTQ_DMA_OWN,4,2                ; @LTQ_DMA_OWN
	.comm	_LTQ_DMA_C,4,2                  ; @LTQ_DMA_C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx ring full\n"

	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_LTQ_DMA_SOP,4,2                ; @LTQ_DMA_SOP
	.comm	_LTQ_DMA_EOP,4,2                ; @LTQ_DMA_EOP
	.comm	_LTQ_DMA_SIZE_MASK,4,2          ; @LTQ_DMA_SIZE_MASK
	.comm	_LTQ_DESC_NUM,8,3               ; @LTQ_DESC_NUM
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_ltq_etop_tx
.subsections_via_symbols
