	.file	"extr_bcmgenet.c_bcmgenet_init_tx_ring.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bcmgenet_init_tx_ring, @function
bcmgenet_init_tx_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	eax, esi
	mov	r15d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	lea	rdx, [rax+rax*4]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	rdx, [rax+rdx*2]
	mov	r12, rax
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 16[rdi]
	mov	DWORD PTR 8[rsp], r8d
	lea	rbx, [rax+rdx*8]
	call	WORDS_PER_BD@PLT
	lea	rdi, 80[rbx]
	mov	r14d, eax
	call	spin_lock_init@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	QWORD PTR 72[rbx], rbp
	mov	eax, r15d
	cmp	DWORD PTR DESC_INDEX[rip], r12d
	mov	DWORD PTR [rbx], r12d
	lea	edx, -1[rsi]
	je	.L6
	lea	ecx, 1[r12]
	add	rax, QWORD PTR 8[rbp]
	mov	r8d, DWORD PTR ENET_MAX_MTU_SIZE[rip]
	mov	DWORD PTR 28[rbx], edx
	mov	DWORD PTR 4[rbx], ecx
	mov	ecx, DWORD PTR bcmgenet_tx_ring_int_enable[rip]
	mov	QWORD PTR 56[rbx], rax
	sal	r8d, 16
	mov	DWORD PTR 68[rbx], ecx
	mov	ecx, DWORD PTR bcmgenet_tx_ring_int_disable[rip]
	mov	DWORD PTR 8[rbx], r13d
	mov	DWORD PTR 64[rbx], ecx
	mov	DWORD PTR 12[rbx], r15d
	mov	QWORD PTR 48[rbx], 0
	mov	DWORD PTR 16[rbx], r13d
	mov	DWORD PTR 20[rbx], r15d
	mov	DWORD PTR 24[rbx], r15d
	mov	QWORD PTR 40[rbx], 0
.L3:
	mov	ecx, DWORD PTR TDMA_PROD_INDEX[rip]
	mov	esi, r12d
	mov	rdi, rbp
	xor	edx, edx
	mov	DWORD PTR 12[rsp], r8d
	imul	r15d, r14d
	call	bcmgenet_tdma_ring_writel@PLT
	mov	ecx, DWORD PTR TDMA_CONS_INDEX[rip]
	mov	esi, r12d
	xor	edx, edx
	mov	rdi, rbp
	call	bcmgenet_tdma_ring_writel@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, 1
	mov	ecx, DWORD PTR DMA_MBUF_DONE_THRESH[rip]
	call	bcmgenet_tdma_ring_writel@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR TDMA_FLOW_PERIOD[rip]
	mov	edx, r8d
	call	bcmgenet_tdma_ring_writel@PLT
	mov	edx, r13d
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR DMA_RING_SIZE_SHIFT[rip]
	sal	edx, cl
	mov	ecx, DWORD PTR DMA_RING_BUF_SIZE[rip]
	or	edx, DWORD PTR RX_BUF_LENGTH[rip]
	call	bcmgenet_tdma_ring_writel@PLT
	mov	edx, r15d
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR DMA_START_ADDR[rip]
	call	bcmgenet_tdma_ring_writel@PLT
	mov	edx, r15d
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR TDMA_READ_PTR[rip]
	call	bcmgenet_tdma_ring_writel@PLT
	mov	edx, r15d
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR TDMA_WRITE_PTR[rip]
	call	bcmgenet_tdma_ring_writel@PLT
	imul	r14d, DWORD PTR 8[rsp]
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR DMA_END_ADDR[rip]
	lea	edx, -1[r14]
	call	bcmgenet_tdma_ring_writel@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	ecx, DWORD PTR NAPI_POLL_WEIGHT[rip]
	lea	rsi, 32[rbx]
	mov	edx, DWORD PTR bcmgenet_tx_poll[rip]
	add	rsp, 24
	.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
	jmp	netif_napi_add@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	ecx, DWORD PTR bcmgenet_tx_ring16_int_enable[rip]
	add	rax, QWORD PTR 8[rbp]
	mov	DWORD PTR 4[rbx], 0
	xor	r8d, r8d
	mov	QWORD PTR 56[rbx], rax
	mov	DWORD PTR 68[rbx], ecx
	mov	ecx, DWORD PTR bcmgenet_tx_ring16_int_disable[rip]
	mov	DWORD PTR 8[rbx], r13d
	mov	DWORD PTR 64[rbx], ecx
	mov	DWORD PTR 12[rbx], r15d
	mov	QWORD PTR 48[rbx], 0
	mov	DWORD PTR 16[rbx], r13d
	mov	DWORD PTR 20[rbx], r15d
	mov	DWORD PTR 24[rbx], r15d
	mov	DWORD PTR 28[rbx], edx
	mov	QWORD PTR 40[rbx], 0
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	bcmgenet_init_tx_ring, .-bcmgenet_init_tx_ring
	.comm	bcmgenet_tx_ring_int_enable,4,4
	.comm	bcmgenet_tx_ring_int_disable,4,4
	.comm	bcmgenet_tx_ring16_int_enable,4,4
	.comm	bcmgenet_tx_ring16_int_disable,4,4
	.comm	bcmgenet_tx_poll,4,4
	.comm	TDMA_WRITE_PTR,4,4
	.comm	TDMA_READ_PTR,4,4
	.comm	TDMA_PROD_INDEX,4,4
	.comm	TDMA_FLOW_PERIOD,4,4
	.comm	TDMA_CONS_INDEX,4,4
	.comm	RX_BUF_LENGTH,4,4
	.comm	NAPI_POLL_WEIGHT,4,4
	.comm	ENET_MAX_MTU_SIZE,4,4
	.comm	DMA_START_ADDR,4,4
	.comm	DMA_RING_SIZE_SHIFT,4,4
	.comm	DMA_RING_BUF_SIZE,4,4
	.comm	DMA_MBUF_DONE_THRESH,4,4
	.comm	DMA_END_ADDR,4,4
	.comm	DESC_INDEX,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_bcmgenet.c_bcmgenet_init_tx_ring.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcmgenet_init_tx_ring, %function
bcmgenet_init_tx_ring:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	sub	sp, sp, #4
	mov	r10, r2
	mov	r7, r3
	ldr	r9, [r0, #8]
	mov	r5, r0
	ldr	fp, [sp, #40]
	bl	WORDS_PER_BD
	add	r6, r9, r4, lsl #6
	mov	r8, r0
	add	r0, r6, #60
	bl	spin_lock_init
	ldr	r3, .L7
	str	r5, [r6, #56]
	ldr	r3, [r3]
	sub	r2, fp, #1
	cmp	r3, r4
	str	r4, [r9, r4, lsl #6]
	beq	.L6
	mov	r1, #0
	ldr	r3, .L7+4
	ldr	r0, .L7+8
	ldr	r3, [r3]
	ldr	ip, .L7+12
	str	r3, [r6, #52]
	ldr	r3, [r5, #4]
	ldr	r0, [r0]
	add	r3, r3, r7
	ldr	r9, [ip]
	str	r3, [r6, #44]
	add	r3, r4, #1
	str	r0, [r6, #48]
	lsl	r9, r9, #16
	str	r10, [r6, #8]
	str	r7, [r6, #12]
	str	r10, [r6, #16]
	str	r7, [r6, #20]
	str	r7, [r6, #24]
	str	r2, [r6, #28]
	str	r1, [r6, #40]
	str	r1, [r6, #36]
	str	r3, [r6, #4]
.L3:
	ldr	r3, .L7+16
	mov	r1, r4
	mov	r2, #0
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+20
	mov	r1, r4
	mov	r2, #0
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+24
	mov	r1, r4
	mov	r2, #1
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+28
	mov	r2, r9
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r2, .L7+32
	ldr	r3, .L7+36
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L7+40
	mul	r7, r8, r7
	orr	r2, r2, r10, lsl r1
	mov	r0, r5
	mov	r1, r4
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+44
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+48
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+52
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	bl	bcmgenet_tdma_ring_writel
	mul	r2, fp, r8
	ldr	r3, .L7+56
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	sub	r2, r2, #1
	bl	bcmgenet_tdma_ring_writel
	ldr	r3, .L7+60
	ldr	r2, .L7+64
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r1, r6, #32
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	netif_napi_add
.L6:
	mov	r9, #0
	ldr	r3, .L7+68
	ldr	r1, .L7+72
	ldr	r3, [r3]
	ldr	r1, [r1]
	str	r3, [r6, #52]
	ldr	r3, [r5, #4]
	str	r1, [r6, #48]
	add	r3, r3, r7
	str	r3, [r6, #44]
	str	r10, [r6, #8]
	str	r7, [r6, #12]
	str	r10, [r6, #16]
	str	r7, [r6, #20]
	str	r7, [r6, #24]
	str	r2, [r6, #28]
	str	r9, [r6, #4]
	str	r9, [r6, #40]
	str	r9, [r6, #36]
	b	.L3
.L8:
	.align	2
.L7:
	.word	DESC_INDEX
	.word	bcmgenet_tx_ring_int_enable
	.word	bcmgenet_tx_ring_int_disable
	.word	ENET_MAX_MTU_SIZE
	.word	TDMA_PROD_INDEX
	.word	TDMA_CONS_INDEX
	.word	DMA_MBUF_DONE_THRESH
	.word	TDMA_FLOW_PERIOD
	.word	DMA_RING_SIZE_SHIFT
	.word	RX_BUF_LENGTH
	.word	DMA_RING_BUF_SIZE
	.word	DMA_START_ADDR
	.word	TDMA_READ_PTR
	.word	TDMA_WRITE_PTR
	.word	DMA_END_ADDR
	.word	NAPI_POLL_WEIGHT
	.word	bcmgenet_tx_poll
	.word	bcmgenet_tx_ring16_int_enable
	.word	bcmgenet_tx_ring16_int_disable
	.size	bcmgenet_init_tx_ring, .-bcmgenet_init_tx_ring
	.comm	bcmgenet_tx_ring_int_enable,4,4
	.comm	bcmgenet_tx_ring_int_disable,4,4
	.comm	bcmgenet_tx_ring16_int_enable,4,4
	.comm	bcmgenet_tx_ring16_int_disable,4,4
	.comm	bcmgenet_tx_poll,4,4
	.comm	TDMA_WRITE_PTR,4,4
	.comm	TDMA_READ_PTR,4,4
	.comm	TDMA_PROD_INDEX,4,4
	.comm	TDMA_FLOW_PERIOD,4,4
	.comm	TDMA_CONS_INDEX,4,4
	.comm	RX_BUF_LENGTH,4,4
	.comm	NAPI_POLL_WEIGHT,4,4
	.comm	ENET_MAX_MTU_SIZE,4,4
	.comm	DMA_START_ADDR,4,4
	.comm	DMA_RING_SIZE_SHIFT,4,4
	.comm	DMA_RING_BUF_SIZE,4,4
	.comm	DMA_MBUF_DONE_THRESH,4,4
	.comm	DMA_END_ADDR,4,4
	.comm	DESC_INDEX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
