	.file	"extr_bcmsysport.c_bcm_sysport_xmit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"queue %d awake and ring full!\n"
	.align 8
.LC1:
	.string	"DMA map failed at %p (len=%d)\n"
	.align 8
.LC2:
	.string	"ring=%d desc_count=%d, curr_desc=%d\n"
	.text
	.p2align 4
	.type	bcm_sysport_xmit, @function
bcm_sysport_xmit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	rdi, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	call	netdev_priv@PLT
	mov	rdi, r13
	mov	rbp, rax
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR 8[rsp], rax
	call	skb_get_queue_mapping@PLT
	mov	rdi, r12
	mov	rsi, rax
	mov	r15, rax
	call	netdev_get_tx_queue@PLT
	lea	rcx, [r15+r15*4]
	xor	esi, esi
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR 16[rbp]
	lea	rbx, [rax+rcx*8]
	lea	r14, 24[rbx]
	mov	rdi, r14
	call	spin_lock_irqsave@PLT
	xor	edi, edi
	cmp	QWORD PTR [rbx], 0
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L12
	cmp	QWORD PTR 8[rbp], 0
	je	.L4
	mov	rdi, r13
	mov	rsi, r12
	call	bcm_sysport_insert_tsb@PLT
	mov	r13, rax
	test	rax, rax
	je	.L10
.L4:
	mov	r9d, DWORD PTR 0[r13]
	mov	r15, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 16[r13]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edx, r9d
	mov	rdi, r15
	mov	DWORD PTR 20[rsp], r9d
	call	dma_map_single@PLT
	mov	rdi, r15
	mov	esi, eax
	mov	DWORD PTR 8[rsp], eax
	call	dma_mapping_error@PLT
	mov	r10d, DWORD PTR 8[rsp]
	mov	r9d, DWORD PTR 20[rsp]
	test	rax, rax
	jne	.L13
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 32[rbx]
	mov	DWORD PTR 8[rsp], r10d
	mov	esi, DWORD PTR dma_addr[rip]
	mov	DWORD PTR 20[rsp], r9d
	lea	r15, [rax+rdx*8]
	mov	edx, r10d
	mov	QWORD PTR [r15], r13
	mov	rdi, r15
	call	dma_unmap_addr_set@PLT
	mov	r9d, DWORD PTR 20[rsp]
	mov	esi, DWORD PTR dma_len[rip]
	mov	rdi, r15
	mov	edx, r9d
	call	dma_unmap_len_set@PLT
	mov	r10d, DWORD PTR 8[rsp]
	mov	edi, r10d
	call	lower_32_bits@PLT
	mov	r10d, DWORD PTR 8[rsp]
	mov	r15d, eax
	mov	edi, r10d
	call	upper_32_bits@PLT
	mov	edi, DWORD PTR DESC_STATUS_SHIFT[rip]
	mov	r9d, DWORD PTR 20[rsp]
	mov	edx, DWORD PTR DESC_SOP[rip]
	or	edx, DWORD PTR DESC_EOP[rip]
	mov	ecx, edi
	or	edx, DWORD PTR TX_STATUS_APP_CRC[rip]
	mov	esi, r9d
	and	eax, DWORD PTR DESC_ADDR_HI_MASK[rip]
	sal	edx, cl
	mov	ecx, DWORD PTR DESC_LEN_SHIFT[rip]
	sal	esi, cl
	or	esi, edx
	or	esi, eax
	mov	rax, QWORD PTR CHECKSUM_PARTIAL[rip]
	cmp	QWORD PTR 8[r13], rax
	jne	.L6
	mov	eax, DWORD PTR DESC_L4_CSUM[rip]
	mov	ecx, edi
	sal	eax, cl
	or	esi, eax
.L6:
	mov	rax, QWORD PTR 8[rbx]
	add	rax, 1
	mov	QWORD PTR 8[rbx], rax
	cmp	rax, QWORD PTR 16[rbx]
	jne	.L7
	mov	QWORD PTR 8[rbx], 0
.L7:
	sub	QWORD PTR [rbx], 1
	mov	edi, DWORD PTR 28[rbx]
	mov	DWORD PTR 8[rsp], esi
	call	TDMA_WRITE_PORT_HI@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, rbp
	mov	edx, eax
	call	tdma_writel@PLT
	mov	edi, DWORD PTR 28[rbx]
	call	TDMA_WRITE_PORT_LO@PLT
	mov	esi, r15d
	mov	rdi, rbp
	mov	edx, eax
	call	tdma_writel@PLT
	mov	r9, QWORD PTR [rbx]
	test	r9, r9
	je	.L14
.L8:
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	r8d, DWORD PTR 28[rbx]
	push	QWORD PTR 8[rbx]
	.cfi_def_cfa_offset 112
	mov	rdx, r12
	mov	esi, DWORD PTR tx_queued[rip]
	lea	rcx, .LC2[rip]
	mov	rdi, rbp
	call	netif_dbg@PLT
	pop	rax
	.cfi_def_cfa_offset 104
	mov	r12d, DWORD PTR NETDEV_TX_OK[rip]
	pop	rdx
	.cfi_def_cfa_offset 96
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	add	DWORD PTR 0[rbp], 1
	mov	r8d, DWORD PTR 16[r13]
	mov	rdx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR tx_err[rip]
	lea	rcx, .LC1[rip]
	call	netif_err@PLT
.L10:
	mov	r12d, DWORD PTR NETDEV_TX_OK[rip]
.L3:
	mov	rdi, r14
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, QWORD PTR 24[rsp]
	call	netif_tx_stop_queue@PLT
	mov	rdi, r12
	mov	rdx, r15
	lea	rsi, .LC0[rip]
	call	netdev_err@PLT
	mov	r12d, DWORD PTR NETDEV_TX_BUSY[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, QWORD PTR 24[rsp]
	call	netif_tx_stop_queue@PLT
	mov	r9, QWORD PTR [rbx]
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	bcm_sysport_xmit, .-bcm_sysport_xmit
	.comm	tx_queued,4,4
	.comm	tx_err,4,4
	.comm	dma_len,4,4
	.comm	dma_addr,4,4
	.comm	TX_STATUS_APP_CRC,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DESC_STATUS_SHIFT,4,4
	.comm	DESC_SOP,4,4
	.comm	DESC_LEN_SHIFT,4,4
	.comm	DESC_L4_CSUM,4,4
	.comm	DESC_EOP,4,4
	.comm	DESC_ADDR_HI_MASK,4,4
	.comm	CHECKSUM_PARTIAL,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bcmsysport.c_bcm_sysport_xmit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"queue %d awake and ring full!\012\000"
	.align	2
.LC1:
	.ascii	"DMA map failed at %p (len=%d)\012\000"
	.align	2
.LC2:
	.ascii	"ring=%d desc_count=%d, curr_desc=%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm_sysport_xmit, %function
bcm_sysport_xmit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	sub	sp, sp, #36
	mov	r0, r1
	mov	r8, r1
	bl	netdev_priv
	mov	r5, r0
	ldr	r3, [r5, #12]
	mov	r0, r4
	str	r3, [sp, #24]
	bl	skb_get_queue_mapping
	mov	fp, r0
	mov	r0, r8
	mov	r1, fp
	bl	netdev_get_tx_queue
	mov	r3, r0
	ldr	r9, [r5, #8]
	add	r6, fp, fp, lsl #1
	add	r7, r9, r6, lsl #3
	add	r10, r7, #12
	mov	r1, #0
	mov	r0, r10
	lsl	r6, r6, #3
	str	r3, [sp, #28]
	bl	spin_lock_irqsave
	ldr	r0, [r9, r6]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	bne	.L15
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L4
	mov	r0, r4
	mov	r1, r8
	bl	bcm_sysport_insert_tsb
	subs	r4, r0, #0
	beq	.L13
.L4:
	ldr	r3, [r4]
	ldr	fp, [sp, #24]
	mov	r2, r3
	str	r3, [sp, #20]
	ldr	r3, .L18
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	mov	r0, fp
	bl	dma_map_single
	mov	r3, r0
	mov	r0, fp
	mov	r1, r3
	str	r3, [sp, #24]
	bl	dma_mapping_error
	cmp	r0, #0
	ldr	r3, [sp, #24]
	bne	.L16
	ldr	r1, [r7, #4]
	ldr	r2, [r7, #20]
	ldr	ip, .L18+4
	add	fp, r2, r1, lsl #2
	str	r4, [r2, r1, lsl #2]
	mov	r0, fp
	ldr	r1, [ip]
	mov	r2, r3
	str	r3, [sp, #24]
	bl	dma_unmap_addr_set
	ldr	r2, .L18+8
	mov	r0, fp
	ldr	r1, [r2]
	ldr	r2, [sp, #20]
	bl	dma_unmap_len_set
	ldr	r3, [sp, #24]
	mov	r0, r3
	bl	lower_32_bits
	mov	r2, r0
	ldr	r3, [sp, #24]
	str	r2, [sp, #24]
	mov	r0, r3
	bl	upper_32_bits
	mov	fp, r0
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	ldr	r1, .L18+20
	ldr	lr, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, lr
	orr	r3, r3, r1
	ldr	r2, .L18+24
	ldr	r1, .L18+28
	ldr	lr, .L18+32
	ldr	ip, [r2]
	ldr	r2, [r4, #4]
	ldr	r4, [r1]
	ldr	r1, [sp, #20]
	ldr	lr, [lr]
	ldr	r0, .L18+36
	cmp	r2, r4
	lsl	ip, r1, ip
	orr	ip, ip, r3, lsl lr
	ldr	r0, [r0]
	ldreq	r3, .L18+40
	and	r0, r0, fp
	ldreq	r3, [r3]
	orr	fp, ip, r0
	orreq	fp, fp, r3, lsl lr
	ldr	r3, [r7, #4]
	ldr	r2, [r7, #8]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r7, #4]
	moveq	r3, #0
	streq	r3, [r7, #4]
	ldr	r3, [r9, r6]
	ldr	r0, [r7, #16]
	sub	r3, r3, #1
	str	r3, [r9, r6]
	bl	TDMA_WRITE_PORT_HI
	mov	r1, fp
	mov	r2, r0
	mov	r0, r5
	bl	tdma_writel
	ldr	r0, [r7, #16]
	bl	TDMA_WRITE_PORT_LO
	ldr	r1, [sp, #24]
	mov	r2, r0
	mov	r0, r5
	bl	tdma_writel
	ldr	r3, [r9, r6]
	cmp	r3, #0
	beq	.L17
.L8:
	ldr	r2, [r7, #4]
	str	r3, [sp, #4]
	str	r2, [sp, #8]
	ldr	r1, [r7, #16]
	ldr	r3, .L18+44
	str	r1, [sp]
	ldr	r1, [r3]
	mov	r2, r8
	mov	r0, r5
	ldr	r3, .L18+48
	bl	netif_dbg
.L13:
	ldr	r3, .L18+52
	ldr	r4, [r3]
.L3:
	mov	r0, r10
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r4
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, [r5]
	mov	r2, r8
	add	r3, r3, #1
	str	r3, [r5]
	ldr	r3, [sp, #20]
	mov	r0, r5
	str	r3, [sp, #4]
	ldr	r1, [r4, #8]
	ldr	r3, .L18+56
	str	r1, [sp]
	ldr	r1, [r3]
	ldr	r3, .L18+60
	bl	netif_err
	ldr	r3, .L18+52
	ldr	r4, [r3]
	b	.L3
.L15:
	ldr	r0, [sp, #28]
	bl	netif_tx_stop_queue
	mov	r2, fp
	mov	r0, r8
	ldr	r1, .L18+64
	bl	netdev_err
	ldr	r3, .L18+68
	ldr	r4, [r3]
	b	.L3
.L17:
	ldr	r0, [sp, #28]
	bl	netif_tx_stop_queue
	ldr	r3, [r9, r6]
	b	.L8
.L19:
	.align	2
.L18:
	.word	DMA_TO_DEVICE
	.word	dma_addr
	.word	dma_len
	.word	DESC_EOP
	.word	DESC_SOP
	.word	TX_STATUS_APP_CRC
	.word	DESC_LEN_SHIFT
	.word	CHECKSUM_PARTIAL
	.word	DESC_STATUS_SHIFT
	.word	DESC_ADDR_HI_MASK
	.word	DESC_L4_CSUM
	.word	tx_queued
	.word	.LC2
	.word	NETDEV_TX_OK
	.word	tx_err
	.word	.LC1
	.word	.LC0
	.word	NETDEV_TX_BUSY
	.size	bcm_sysport_xmit, .-bcm_sysport_xmit
	.comm	tx_queued,4,4
	.comm	tx_err,4,4
	.comm	dma_len,4,4
	.comm	dma_addr,4,4
	.comm	TX_STATUS_APP_CRC,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DESC_STATUS_SHIFT,4,4
	.comm	DESC_SOP,4,4
	.comm	DESC_LEN_SHIFT,4,4
	.comm	DESC_L4_CSUM,4,4
	.comm	DESC_EOP,4,4
	.comm	DESC_ADDR_HI_MASK,4,4
	.comm	CHECKSUM_PARTIAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
