	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_tx_map
_mtk_tx_map:                            ## @mtk_tx_map
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r14
	movq	8(%rax), %r13
	movq	8(%r12), %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_qdma_to_pdma
	cmpq	16(%r12), %r15
	je	LBB0_27
## %bb.1:
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%rbx, -168(%rbp)                ## 8-byte Spill
	movq	%r14, -152(%rbp)                ## 8-byte Spill
	movl	(%r14), %edx
	incl	%edx
	movq	_TX_DMA_FPORT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mtk_desc_to_tx_buf
	xorl	%ebx, %ebx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_TX_DMA_TSO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_3:
	orl	-84(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_CHECKSUM_PARTIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_TX_DMA_CHKSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	orl	%ebx, %r14d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_skb_vlan_tag_present
	testq	%rax, %rax
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	je	LBB0_7
## %bb.6:
	movq	_TX_DMA_INS_VLAN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_skb_vlan_tag_get
	orl	%eax, %r14d
LBB0_7:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	8(%r13), %r15d
	movl	12(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_skb_headlen
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movl	8(%r13), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_47:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_WRITE_ONCE
	movq	_MTK_TX_FLAGS_SINGLE0@GOTPCREL(%rip), %rcx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	orl	(%rcx), %eax
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	cmpl	$0, (%rcx)
	jne	LBB0_9
## %bb.10:
	movq	_MTK_TX_FLAGS_FPORT0@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_MTK_TX_FLAGS_FPORT1@GOTPCREL(%rip), %rcx
LBB0_11:
	orl	(%rcx), %eax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 8(%rbx)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_headlen
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	movl	%r14d, %ecx
	movl	%eax, %r8d
	xorl	%r9d, %r9d
	callq	_setup_tx_buf
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_qdma_to_pdma
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_shinfo
	movl	(%rax), %eax
	testq	%rax, %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	je	LBB0_12
## %bb.13:
	decl	%eax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movl	$1, %eax
	xorl	%ebx, %ebx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	$1, -76(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, -184(%rbp)                ## 8-byte Spill
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	callq	_skb_shinfo
	leaq	(,%rbx,4), %rdi
	addq	8(%rax), %rdi
	movq	%rdi, -192(%rbp)                ## 8-byte Spill
	callq	_skb_frag_size
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$0, -88(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -160(%rbp)                ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_17 Depth=2
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	-128(%rbp), %r9                 ## 8-byte Reload
	leal	1(%r9), %eax
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movl	%r14d, %ecx
	movl	%eax, %r14d
	movl	%r12d, %r8d
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_setup_tx_buf
	addl	%r12d, -88(%rbp)                ## 4-byte Folded Spill
	movl	%r14d, %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	subl	%r12d, %eax
	movq	-120(%rbp), %r12                ## 8-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	-160(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_35
LBB0_17:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	andl	$1, %ebx
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MTK_HAS_CAPS
	orq	%rbx, %rax
	sete	%r14b
	movb	%r14b, -41(%rbp)                ## 1-byte Spill
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_mtk_qdma_phys_to_virt
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_qdma_to_pdma
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	cmpq	%rbx, 16(%r12)
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=2
	incl	-76(%rbp)                       ## 4-byte Folded Spill
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r14
	movl	-80(%rbp), %r15d                ## 4-byte Reload
	movq	_MTK_TX_DMA_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_min
	movl	%eax, %r12d
	movl	8(%r13), %edi
	movl	(%r14), %r8d
	movq	-192(%rbp), %rsi                ## 8-byte Reload
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_skb_frag_dma_map
	movl	%eax, %r14d
	movl	8(%r13), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_22
## %bb.28:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	(%rbx), %edi
	movl	%r14d, %esi
	callq	_WRITE_ONCE
	movl	8(%rbx), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_TX_DMA_SWC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_TX_DMA_PLEN0
	orl	%r13d, %eax
	xorl	%ecx, %ecx
	movl	$0, %edx
	cmpl	%r12d, %r15d
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	_TX_DMA_LS0@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_30:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	cmpq	-176(%rbp), %rsi                ## 8-byte Folded Reload
	cmovel	%edx, %ecx
	orl	%ecx, %eax
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_WRITE_ONCE
	movl	12(%rbx), %edi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_ONCE
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_mtk_desc_to_tx_buf
	movq	%rax, %rbx
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
LBB0_32:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	_MTK_DMA_DUMMY_DESC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	8(%rbx), %eax
	movq	_MTK_TX_FLAGS_PAGE0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	cmpl	$0, (%rcx)
	movq	_MTK_TX_FLAGS_FPORT1@GOTPCREL(%rip), %rcx
	movq	-184(%rbp), %r13                ## 8-byte Reload
	jne	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	_MTK_TX_FLAGS_FPORT0@GOTPCREL(%rip), %rcx
	jmp	LBB0_34
LBB0_15:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %r14d
LBB0_35:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movl	%r14d, %eax
	cmpq	-144(%rbp), %rbx                ## 8-byte Folded Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_14
	jmp	LBB0_36
LBB0_22:
	movq	-120(%rbp), %r12                ## 8-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
LBB0_23:
	movq	_TX_DMA_OWNER_CPU@GOTPCREL(%rip), %r14
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_mtk_qdma_phys_to_virt
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_qdma_to_pdma
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	cmpq	%r15, %rbx
	je	LBB0_27
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mtk_desc_to_tx_buf
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_mtk_tx_unmap
	movl	(%r14), %eax
	movq	_TX_DMA_LS0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%r15)
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MTK_HAS_CAPS
	testq	%rax, %rax
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	_TX_DMA_DESP2_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, 4(%rcx)
	jmp	LBB0_26
LBB0_12:
	movl	$1, -76(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %r14d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_36:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	%rdi, %rbx
	movl	12(%r15), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_ONCE
	movq	%rbx, %rdi
	movl	8(%r15), %r15d
	movq	_TX_DMA_SWC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_skb_headlen
	movl	%eax, %edi
	callq	_TX_DMA_PLEN0
	orl	%ebx, %eax
	movq	_TX_DMA_LS0@GOTPCREL(%rip), %rbx
	cmpq	$0, -144(%rbp)                  ## 8-byte Folded Reload
	movl	$0, %ecx
	jne	LBB0_38
## %bb.37:
	movl	(%rbx), %ecx
LBB0_38:
	orl	%ecx, %eax
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_MTK_HAS_CAPS
	testq	%rax, %rax
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	jne	LBB0_42
## %bb.39:
	testb	$1, %r14b
	jne	LBB0_41
## %bb.40:
	movq	_TX_DMA_LS1@GOTPCREL(%rip), %rbx
LBB0_41:
	movl	(%rbx), %eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	orl	%eax, 4(%rcx)
LBB0_42:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %esi
	movq	%rdx, %r14
	movq	%rdx, %rdi
	callq	_netdev_sent_queue
	movq	%rbx, %rdi
	callq	_skb_tx_timestamp
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_mtk_qdma_phys_to_virt
	movq	%rax, 8(%r12)
	leaq	4(%r12), %rsi
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_atomic_sub
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	movq	(%r13), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_MTK_HAS_CAPS
	testq	%rax, %rax
	je	LBB0_46
## %bb.43:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_netdev_get_tx_queue
	movl	%eax, %edi
	callq	_netif_xmit_stopped
	testq	%rax, %rax
	je	LBB0_44
LBB0_45:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	_MTK_QTX_CTX_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mtk_w32
	xorl	%ebx, %ebx
	jmp	LBB0_47
LBB0_46:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_txd_to_idx
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_NEXT_DESP_IDX
	movq	_MT7628_TX_CTX_IDX0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mtk_w32
	jmp	LBB0_47
LBB0_44:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_netdev_xmit_more
	testl	%eax, %eax
	jne	LBB0_47
	jmp	LBB0_45
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TX_DMA_FPORT_SHIFT,4,2         ## @TX_DMA_FPORT_SHIFT
	.comm	_TX_DMA_TSO,4,2                 ## @TX_DMA_TSO
	.comm	_CHECKSUM_PARTIAL,8,3           ## @CHECKSUM_PARTIAL
	.comm	_TX_DMA_CHKSUM,4,2              ## @TX_DMA_CHKSUM
	.comm	_TX_DMA_INS_VLAN,4,2            ## @TX_DMA_INS_VLAN
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MTK_TX_FLAGS_SINGLE0,4,2       ## @MTK_TX_FLAGS_SINGLE0
	.comm	_MTK_TX_FLAGS_FPORT0,4,2        ## @MTK_TX_FLAGS_FPORT0
	.comm	_MTK_TX_FLAGS_FPORT1,4,2        ## @MTK_TX_FLAGS_FPORT1
	.comm	_MTK_QDMA,4,2                   ## @MTK_QDMA
	.comm	_MTK_TX_DMA_BUF_LEN,4,2         ## @MTK_TX_DMA_BUF_LEN
	.comm	_TX_DMA_SWC,4,2                 ## @TX_DMA_SWC
	.comm	_TX_DMA_LS0,4,2                 ## @TX_DMA_LS0
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ## @MTK_DMA_DUMMY_DESC
	.comm	_MTK_TX_FLAGS_PAGE0,4,2         ## @MTK_TX_FLAGS_PAGE0
	.comm	_TX_DMA_LS1,4,2                 ## @TX_DMA_LS1
	.comm	_MTK_QTX_CTX_PTR,4,2            ## @MTK_QTX_CTX_PTR
	.comm	_MT7628_TX_CTX_IDX0,4,2         ## @MT7628_TX_CTX_IDX0
	.comm	_TX_DMA_OWNER_CPU,4,2           ## @TX_DMA_OWNER_CPU
	.comm	_TX_DMA_DESP2_DEF,4,2           ## @TX_DMA_DESP2_DEF
	.no_dead_strip	_mtk_tx_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_tx_map
_mtk_tx_map:                            ; @mtk_tx_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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	x21, x4
	mov	x24, x3
	mov	x25, x1
	mov	x26, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x28, x0
	ldr	x20, [x0, #8]
	ldr	x22, [x24, #8]
	mov	x0, x24
	mov	x1, x22
	bl	_qdma_to_pdma
	ldr	x8, [x24, #16]
	cmp	x22, x8
	b.eq	LBB0_5
; %bb.1:
	mov	x27, x0
	ldr	w8, [x28]
	add	w8, w8, #1
Lloh0:
	adrp	x9, _TX_DMA_FPORT_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TX_DMA_FPORT_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w19, w8, w9
	mov	x0, x24
	mov	x1, x22
	bl	_mtk_desc_to_tx_buf
	str	x0, [sp, #40]                   ; 8-byte Folded Spill
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh3:
	adrp	x8, _TX_DMA_TSO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TX_DMA_TSO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w8, wzr, w8, eq
	str	w19, [sp, #100]                 ; 4-byte Folded Spill
	orr	w8, w8, w19
	ldr	x9, [x26]
Lloh6:
	adrp	x10, _CHECKSUM_PARTIAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CHECKSUM_PARTIAL@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _TX_DMA_CHKSUM@GOTPAGE
Lloh10:
	ldr	x11, [x11, _TX_DMA_CHKSUM@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
	orr	w21, w8, w9
	mov	x0, x26
	bl	_skb_vlan_tag_present
	cbz	x0, LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _TX_DMA_INS_VLAN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TX_DMA_INS_VLAN@GOTPAGEOFF]
Lloh14:
	ldr	w19, [x8]
	mov	x0, x26
	bl	_skb_vlan_tag_get
	orr	w8, w19, w21
	orr	w8, w8, w0
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	b	LBB0_4
LBB0_3:
	str	w21, [sp, #36]                  ; 4-byte Folded Spill
LBB0_4:
	ldr	w21, [x20, #8]
	ldr	w23, [x26, #12]
	mov	x0, x26
	bl	_skb_headlen
	mov	x2, x0
Lloh15:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_dma_map_single
	mov	x21, x0
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_7
LBB0_5:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_7:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	ldr	w0, [x22]
	mov	x1, x21
	bl	_WRITE_ONCE
Lloh21:
	adrp	x8, _MTK_TX_FLAGS_SINGLE0@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTK_TX_FLAGS_SINGLE0@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
Lloh24:
	adrp	x10, _MTK_TX_FLAGS_FPORT0@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MTK_TX_FLAGS_FPORT0@GOTPAGEOFF]
Lloh26:
	adrp	x11, _MTK_TX_FLAGS_FPORT1@GOTPAGE
Lloh27:
	ldr	x11, [x11, _MTK_TX_FLAGS_FPORT1@GOTPAGEOFF]
	ldr	w9, [x28]
	cmp	w9, #0
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x26
	bl	_skb_headlen
	mov	x4, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x27
	mov	x3, x21
	mov	w5, #0
	bl	_setup_tx_buf
	stur	x24, [x29, #-96]                ; 8-byte Folded Spill
	mov	x0, x24
	mov	x1, x22
	bl	_qdma_to_pdma
	str	x0, [sp, #104]                  ; 8-byte Folded Spill
	mov	x0, x26
	bl	_skb_shinfo
	ldr	w8, [x0]
	str	x20, [sp, #72]                  ; 8-byte Folded Spill
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	cbz	w8, LBB0_21
; %bb.8:
	str	x27, [sp]                       ; 8-byte Folded Spill
	mov	x24, #0
	sub	w8, w8, #1
	stp	x8, x28, [sp, #48]              ; 16-byte Folded Spill
	mov	w21, #1
	mov	x25, x22
	mov	w8, #1
	str	w8, [sp, #84]                   ; 4-byte Folded Spill
Lloh28:
	adrp	x27, _MTK_QDMA@GOTPAGE
Lloh29:
	ldr	x27, [x27, _MTK_QDMA@GOTPAGEOFF]
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	mov	x0, x26
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x0, x8, x24, lsl #2
	str	x0, [sp, #88]                   ; 8-byte Folded Spill
	bl	_skb_frag_size
	cbz	w0, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x28, x0
	mov	w26, #0
	str	x24, [sp, #64]                  ; 8-byte Folded Spill
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
Lloh30:
	adrp	x8, _MTK_DMA_DUMMY_DESC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MTK_DMA_DUMMY_DESC@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x8, [x24]
Lloh33:
	adrp	x8, _MTK_TX_FLAGS_PAGE0@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MTK_TX_FLAGS_PAGE0@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x24, #8]
	orr	w8, w9, w8
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	ldr	w9, [x9]
	cmp	w9, #0
Lloh36:
	adrp	x9, _MTK_TX_FLAGS_FPORT0@GOTPAGE
Lloh37:
	ldr	x9, [x9, _MTK_TX_FLAGS_FPORT0@GOTPAGEOFF]
Lloh38:
	adrp	x10, _MTK_TX_FLAGS_FPORT1@GOTPAGE
Lloh39:
	ldr	x10, [x10, _MTK_TX_FLAGS_FPORT1@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x24, #8]
	ldur	w5, [x29, #-84]                 ; 4-byte Folded Reload
	add	w19, w5, #1
	ldr	x20, [sp, #72]                  ; 8-byte Folded Reload
	mov	x0, x20
	mov	x1, x24
	ldr	x2, [sp, #104]                  ; 8-byte Folded Reload
	mov	x3, x27
	mov	x4, x23
	bl	_setup_tx_buf
	add	w26, w23, w26
	mov	x21, x19
	subs	w28, w28, w23
Lloh40:
	adrp	x27, _MTK_QDMA@GOTPAGE
Lloh41:
	ldr	x27, [x27, _MTK_QDMA@GOTPAGEOFF]
	ldr	x24, [sp, #64]                  ; 8-byte Folded Reload
	b.eq	LBB0_19
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	x19, x24, #0x1
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w1, [x27]
	bl	_MTK_HAS_CAPS
	orr	x8, x0, x19
	cmp	x8, #0
	cset	w19, eq
	cbz	x8, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w1, [x25, #4]
	ldur	x23, [x29, #-96]                ; 8-byte Folded Reload
	mov	x0, x23
	bl	_mtk_qdma_phys_to_virt
	mov	x25, x0
	mov	x0, x23
	mov	x1, x25
	bl	_qdma_to_pdma
	str	x0, [sp, #104]                  ; 8-byte Folded Spill
	ldr	x8, [x23, #16]
	cmp	x8, x25
	b.eq	LBB0_27
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w8, [sp, #84]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #84]                   ; 4-byte Folded Spill
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=2
Lloh42:
	adrp	x8, _MTK_TX_DMA_BUF_LEN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MTK_TX_DMA_BUF_LEN@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_min
	mov	x23, x0
	ldr	w0, [x20, #8]
Lloh45:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh47:
	ldr	w4, [x8]
	ldr	x1, [sp, #88]                   ; 8-byte Folded Reload
	mov	x2, x26
	mov	x3, x23
	bl	_skb_frag_dma_map
	mov	x27, x0
	ldr	w0, [x20, #8]
	mov	x1, x27
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=2
	stur	w21, [x29, #-84]                ; 4-byte Folded Spill
	ldr	w0, [x25]
	mov	x1, x27
	bl	_WRITE_ONCE
	mov	x21, x19
	mov	x19, x25
	mov	x25, x24
	ldr	w24, [x19, #8]
Lloh48:
	adrp	x8, _TX_DMA_SWC@GOTPAGE
Lloh49:
	ldr	x8, [x8, _TX_DMA_SWC@GOTPAGEOFF]
Lloh50:
	ldr	w20, [x8]
	mov	x0, x23
	bl	_TX_DMA_PLEN0
	cmp	w28, w23
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ccmp	x25, x8, #0, eq
	mov	x25, x19
	orr	w8, w0, w20
Lloh51:
	adrp	x9, _TX_DMA_LS0@GOTPAGE
Lloh52:
	ldr	x9, [x9, _TX_DMA_LS0@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	csel	w9, w9, wzr, eq
	orr	w1, w8, w9
	mov	x0, x24
	bl	_WRITE_ONCE
	ldr	w0, [x19, #12]
	ldr	w1, [sp, #100]                  ; 4-byte Folded Reload
	bl	_WRITE_ONCE
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, x19
	bl	_mtk_desc_to_tx_buf
	mov	x24, x0
	tbnz	w21, #0, LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x24
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	b	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x19, x21
LBB0_19:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	mov	x21, x19
	ldp	x26, x8, [sp, #16]              ; 16-byte Folded Reload
	cmp	x24, x8
	b.ne	LBB0_9
	b	LBB0_22
LBB0_20:
	ldur	x23, [x29, #-96]                ; 8-byte Folded Reload
	ldr	x24, [sp]                       ; 8-byte Folded Reload
Lloh54:
	adrp	x27, _MTK_QDMA@GOTPAGE
Lloh55:
	ldr	x27, [x27, _MTK_QDMA@GOTPAGEOFF]
	b	LBB0_28
LBB0_21:
	mov	w8, #1
	str	w8, [sp, #84]                   ; 4-byte Folded Spill
	mov	w19, #1
	mov	x25, x22
Lloh56:
	adrp	x27, _MTK_QDMA@GOTPAGE
Lloh57:
	ldr	x27, [x27, _MTK_QDMA@GOTPAGEOFF]
LBB0_22:
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	str	x26, [x8]
	ldr	w0, [x22, #12]
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_WRITE_ONCE
	ldr	w21, [x22, #8]
Lloh58:
	adrp	x8, _TX_DMA_SWC@GOTPAGE
Lloh59:
	ldr	x8, [x8, _TX_DMA_SWC@GOTPAGEOFF]
Lloh60:
	ldr	w20, [x8]
	mov	x0, x26
	bl	_skb_headlen
	bl	_TX_DMA_PLEN0
	orr	w8, w0, w20
	ldr	x20, [sp, #72]                  ; 8-byte Folded Reload
Lloh61:
	adrp	x22, _TX_DMA_LS0@GOTPAGE
Lloh62:
	ldr	x22, [x22, _TX_DMA_LS0@GOTPAGEOFF]
	ldr	w9, [x22]
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	cmp	w10, #0
	csel	w9, w9, wzr, eq
	orr	w1, w8, w9
	mov	x0, x21
	bl	_WRITE_ONCE
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w1, [x27]
	bl	_MTK_HAS_CAPS
	cbnz	x0, LBB0_24
; %bb.23:
Lloh63:
	adrp	x8, _TX_DMA_LS1@GOTPAGE
Lloh64:
	ldr	x8, [x8, _TX_DMA_LS1@GOTPAGEOFF]
	tst	w19, #0x1
	csel	x8, x8, x22, eq
	ldr	w8, [x8]
	ldr	x10, [sp, #104]                 ; 8-byte Folded Reload
	ldr	w9, [x10, #4]
	orr	w8, w9, w8
	str	w8, [x10, #4]
LBB0_24:
	ldr	w1, [x26, #8]
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x21
	bl	_netdev_sent_queue
	mov	x0, x26
	bl	_skb_tx_timestamp
	ldr	w1, [x25, #4]
	ldur	x19, [x29, #-96]                ; 8-byte Folded Reload
	mov	x0, x19
	bl	_mtk_qdma_phys_to_virt
	str	x0, [x19, #8]
	add	x1, x19, #4
	ldr	w0, [sp, #84]                   ; 4-byte Folded Reload
	bl	_atomic_sub
	bl	_wmb
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w1, [x27]
	bl	_MTK_HAS_CAPS
	cbz	x0, LBB0_32
; %bb.25:
	mov	x0, x21
	mov	w1, #0
	bl	_netdev_get_tx_queue
	bl	_netif_xmit_stopped
	cbz	x0, LBB0_34
LBB0_26:
	ldr	w1, [x25, #4]
Lloh65:
	adrp	x8, _MTK_QTX_CTX_PTR@GOTPAGE
Lloh66:
	ldr	x8, [x8, _MTK_QTX_CTX_PTR@GOTPAGEOFF]
	b	LBB0_33
LBB0_27:
	ldur	x23, [x29, #-96]                ; 8-byte Folded Reload
	ldr	x24, [sp]                       ; 8-byte Folded Reload
LBB0_28:
Lloh67:
	adrp	x26, _TX_DMA_LS0@GOTPAGE
Lloh68:
	ldr	x26, [x26, _TX_DMA_LS0@GOTPAGEOFF]
Lloh69:
	adrp	x19, _TX_DMA_OWNER_CPU@GOTPAGE
Lloh70:
	ldr	x19, [x19, _TX_DMA_OWNER_CPU@GOTPAGEOFF]
Lloh71:
	adrp	x21, _TX_DMA_DESP2_DEF@GOTPAGE
Lloh72:
	ldr	x21, [x21, _TX_DMA_DESP2_DEF@GOTPAGEOFF]
	b	LBB0_30
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	ldr	w1, [x22, #4]
	mov	x0, x23
	bl	_mtk_qdma_phys_to_virt
	mov	x22, x0
	mov	x0, x23
	mov	x1, x22
	bl	_qdma_to_pdma
	mov	x24, x0
	cmp	x25, x22
	b.eq	LBB0_5
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_mtk_desc_to_tx_buf
	mov	x1, x0
	mov	x0, x20
	bl	_mtk_tx_unmap
	ldr	w8, [x26]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x22, #8]
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w1, [x27]
	bl	_MTK_HAS_CAPS
	cbnz	x0, LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	w8, [x21]
	str	w8, [x24, #4]
	b	LBB0_29
LBB0_32:
	mov	x0, x19
	mov	x1, x25
	bl	_txd_to_idx
	ldr	w1, [x19]
	bl	_NEXT_DESP_IDX
	mov	x1, x0
Lloh73:
	adrp	x8, _MT7628_TX_CTX_IDX0@GOTPAGE
Lloh74:
	ldr	x8, [x8, _MT7628_TX_CTX_IDX0@GOTPAGEOFF]
LBB0_33:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mtk_w32
	mov	w0, #0
	b	LBB0_6
LBB0_34:
	bl	_netdev_xmit_more
	cbz	w0, LBB0_26
; %bb.35:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGot	Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TX_DMA_FPORT_SHIFT,4,2         ; @TX_DMA_FPORT_SHIFT
	.comm	_TX_DMA_TSO,4,2                 ; @TX_DMA_TSO
	.comm	_CHECKSUM_PARTIAL,8,3           ; @CHECKSUM_PARTIAL
	.comm	_TX_DMA_CHKSUM,4,2              ; @TX_DMA_CHKSUM
	.comm	_TX_DMA_INS_VLAN,4,2            ; @TX_DMA_INS_VLAN
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MTK_TX_FLAGS_SINGLE0,4,2       ; @MTK_TX_FLAGS_SINGLE0
	.comm	_MTK_TX_FLAGS_FPORT0,4,2        ; @MTK_TX_FLAGS_FPORT0
	.comm	_MTK_TX_FLAGS_FPORT1,4,2        ; @MTK_TX_FLAGS_FPORT1
	.comm	_MTK_QDMA,4,2                   ; @MTK_QDMA
	.comm	_MTK_TX_DMA_BUF_LEN,4,2         ; @MTK_TX_DMA_BUF_LEN
	.comm	_TX_DMA_SWC,4,2                 ; @TX_DMA_SWC
	.comm	_TX_DMA_LS0,4,2                 ; @TX_DMA_LS0
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ; @MTK_DMA_DUMMY_DESC
	.comm	_MTK_TX_FLAGS_PAGE0,4,2         ; @MTK_TX_FLAGS_PAGE0
	.comm	_TX_DMA_LS1,4,2                 ; @TX_DMA_LS1
	.comm	_MTK_QTX_CTX_PTR,4,2            ; @MTK_QTX_CTX_PTR
	.comm	_MT7628_TX_CTX_IDX0,4,2         ; @MT7628_TX_CTX_IDX0
	.comm	_TX_DMA_OWNER_CPU,4,2           ; @TX_DMA_OWNER_CPU
	.comm	_TX_DMA_DESP2_DEF,4,2           ; @TX_DMA_DESP2_DEF
	.no_dead_strip	_mtk_tx_map
.subsections_via_symbols
