	.file	"extr_octeon_mgmt.c_octeon_mgmt_xmit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	octeon_mgmt_xmit, @function
octeon_mgmt_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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	call	netdev_priv@PLT
	mov	rdi, rbx
	mov	r14, rax
	mov	eax, DWORD PTR NETDEV_TX_BUSY[rip]
	lea	r12, 32[r14]
	mov	DWORD PTR [rsp], eax
	call	skb_shinfo@PLT
	mov	r13d, DWORD PTR [rbx]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR SKBTX_HW_TSTAMP[rip], eax
	setne	al
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 28[r14]
	mov	edx, r13d
	movzx	eax, al
	mov	DWORD PTR 20[rsp], r13d
	mov	DWORD PTR 16[rsp], eax
	call	dma_map_single@PLT
	xor	esi, esi
	mov	rdi, r12
	mov	DWORD PTR 4[rsp], eax
	call	spin_lock_irqsave@PLT
	mov	edi, DWORD PTR OCTEON_MGMT_TX_RING_SIZE[rip]
	mov	r15d, DWORD PTR [r14]
	call	ring_max_fill@PLT
	xor	edi, edi
	sub	eax, 1
	cmp	r15d, eax
	setge	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L10
.L2:
	mov	edi, DWORD PTR OCTEON_MGMT_TX_RING_SIZE[rip]
	mov	r15d, DWORD PTR [r14]
	call	ring_max_fill@PLT
	xor	edi, edi
	cmp	r15d, eax
	setge	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L11
	mov	rdi, r12
	mov	rsi, rbx
	call	__skb_queue_tail@PLT
	mov	rdx, QWORD PTR 8[r14]
	mov	rax, QWORD PTR 40[r14]
	xor	esi, esi
	mov	rcx, QWORD PTR 16[rsp]
	mov	rdi, r12
	mov	QWORD PTR [rax+rdx*8], rcx
	mov	rax, QWORD PTR 8[r14]
	xor	edx, edx
	movsx	rcx, DWORD PTR OCTEON_MGMT_TX_RING_SIZE[rip]
	add	DWORD PTR [r14], 1
	add	rax, 1
	div	rcx
	mov	QWORD PTR 8[r14], rdx
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR OCTEON_MGMT_TX_RING_SIZE[rip]
	mov	r12d, DWORD PTR DMA_BIDIRECTIONAL[rip]
	call	ring_size_to_bytes@PLT
	mov	esi, DWORD PTR 24[r14]
	mov	edi, DWORD PTR 28[r14]
	mov	ecx, r12d
	mov	edx, eax
	call	dma_sync_single_for_device@PLT
	mov	eax, DWORD PTR [rbx]
	add	DWORD PTR 4[rbp], 1
	mov	esi, 1
	add	DWORD PTR 0[rbp], eax
	mov	rdi, QWORD PTR MIX_ORING2[rip]
	add	rdi, QWORD PTR 16[r14]
	call	cvmx_write_csr@PLT
	mov	rdi, rbp
	call	netif_trans_update@PLT
	mov	eax, DWORD PTR NETDEV_TX_OK[rip]
	mov	DWORD PTR [rsp], eax
.L4:
	mov	rdi, rbp
	call	octeon_mgmt_update_tx_stats@PLT
	mov	eax, DWORD PTR [rsp]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L11:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR 28[r14]
	mov	esi, DWORD PTR 4[rsp]
	mov	edx, r13d
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	call	dma_unmap_single@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	xor	esi, esi
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], rsi
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	netif_stop_queue@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r12
	call	spin_lock_irqsave@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	octeon_mgmt_xmit, .-octeon_mgmt_xmit
	.comm	SKBTX_HW_TSTAMP,4,4
	.comm	OCTEON_MGMT_TX_RING_SIZE,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	MIX_ORING2,8,8
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.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_octeon_mgmt.c_octeon_mgmt_xmit.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	octeon_mgmt_xmit, %function
octeon_mgmt_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	r6, r0
	sub	sp, sp, #20
	mov	r0, r1
	mov	r5, r1
	bl	netdev_priv
	ldr	r3, .L12
	mov	r4, r0
	mov	r0, r6
	ldr	r9, [r3]
	bl	skb_shinfo
	mov	lr, r0
	ldr	ip, .L12+4
	ldr	r10, [r6]
	ldr	r3, .L12+8
	ldr	lr, [lr]
	ldr	ip, [ip]
	mov	r2, r10
	ldr	r3, [r3]
	ldr	r1, [r6, #4]
	ldr	r0, [r4, #16]
	str	lr, [sp, #4]
	str	ip, [sp, #8]
	bl	dma_map_single
	mov	r8, r0
	ldr	r7, .L12+12
	add	fp, r4, #20
	mov	r1, #0
	mov	r0, fp
	str	r8, [sp, #12]
	bl	spin_lock_irqsave
	ldr	r0, [r7]
	ldr	r8, [r4]
	bl	ring_max_fill
	sub	r0, r0, #1
	cmp	r8, r0
	movlt	r0, #0
	movge	r0, #1
	bl	unlikely
	cmp	r0, #0
	bne	.L10
.L2:
	ldr	r0, [r7]
	ldr	r8, [r4]
	bl	ring_max_fill
	cmp	r8, r0
	movlt	r0, #0
	movge	r0, #1
	bl	unlikely
	cmp	r0, #0
	bne	.L11
	mov	r1, r6
	mov	r0, fp
	bl	__skb_queue_tail
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r0, [r4, #4]
	tst	r3, r2
	movne	ip, #1
	moveq	ip, #0
	ldr	r2, [r4, #24]
	ldr	r1, [r7]
	str	ip, [r2, r0, lsl #2]
	ldr	r0, [r4, #4]
	add	r0, r0, #1
	bl	__aeabi_uidivmod
	ldr	r2, [r4]
	str	r1, [r4, #4]
	add	r2, r2, #1
	mov	r1, #0
	str	r2, [r4]
	mov	r0, fp
	bl	spin_unlock_irqrestore
	ldr	r0, [r7]
	ldr	r8, [r4, #12]
	ldr	r7, [r4, #16]
	bl	ring_size_to_bytes
	ldr	r3, .L12+16
	mov	r2, r0
	mov	r1, r8
	ldr	r3, [r3]
	mov	r0, r7
	bl	dma_sync_single_for_device
	ldm	r5, {r2, r3}
	ldr	r1, .L12+20
	ldr	ip, [r6]
	ldr	r0, [r4, #8]
	ldr	r1, [r1]
	add	r3, r3, #1
	add	r2, r2, ip
	str	r3, [r5, #4]
	str	r2, [r5]
	add	r0, r0, r1
	mov	r1, #1
	bl	cvmx_write_csr
	mov	r0, r5
	bl	netif_trans_update
	ldr	r3, .L12+24
	ldr	r9, [r3]
.L4:
	mov	r0, r5
	bl	octeon_mgmt_update_tx_stats
	mov	r0, r9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r0, fp
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L12+8
	mov	r2, r10
	ldr	r3, [r3]
	ldr	r1, [sp, #12]
	ldr	r0, [r4, #16]
	bl	dma_unmap_single
	b	.L4
.L10:
	mov	r8, #0
	mov	r0, fp
	mov	r1, r8
	bl	spin_unlock_irqrestore
	mov	r0, r5
	bl	netif_stop_queue
	mov	r1, r8
	mov	r0, fp
	bl	spin_lock_irqsave
	b	.L2
.L13:
	.align	2
.L12:
	.word	NETDEV_TX_BUSY
	.word	SKBTX_HW_TSTAMP
	.word	DMA_TO_DEVICE
	.word	OCTEON_MGMT_TX_RING_SIZE
	.word	DMA_BIDIRECTIONAL
	.word	MIX_ORING2
	.word	NETDEV_TX_OK
	.size	octeon_mgmt_xmit, .-octeon_mgmt_xmit
	.comm	SKBTX_HW_TSTAMP,4,4
	.comm	OCTEON_MGMT_TX_RING_SIZE,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	MIX_ORING2,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
