	.file	"extr_sunlance.c_lance_init_ring_dvma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lance_init_ring_dvma, @function
lance_init_ring_dvma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	mov	rdi, r13
	mov	r12, rax
	mov	rbx, QWORD PTR 40[rax]
	mov	rbp, QWORD PTR 32[rax]
	call	netif_stop_queue@PLT
	mov	rdx, QWORD PTR 0[r13]
	mov	QWORD PTR 16[r12], 0
	mov	rax, QWORD PTR 32[rbx]
	mov	QWORD PTR 24[r12], 0
	mov	ecx, DWORD PTR 4[rdx]
	mov	QWORD PTR [r12], 0
	mov	QWORD PTR 8[r12], 0
	mov	DWORD PTR [rax], ecx
	mov	ecx, DWORD PTR [rdx]
	mov	DWORD PTR 4[rax], ecx
	mov	ecx, DWORD PTR 12[rdx]
	mov	DWORD PTR 8[rax], ecx
	mov	ecx, DWORD PTR 8[rdx]
	mov	DWORD PTR 12[rax], ecx
	mov	ecx, DWORD PTR 20[rdx]
	mov	DWORD PTR 16[rax], ecx
	mov	edx, DWORD PTR 16[rdx]
	mov	DWORD PTR 20[rax], edx
	mov	edx, DWORD PTR TX_RING_SIZE[rip]
	test	edx, edx
	jle	.L2
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR tx_buf[rip]
	mov	esi, r12d
	call	libbuff_offset@PLT
	lea	rdi, [rax+rbp]
	call	LANCE_ADDR@PLT
	mov	rdx, r12
	add	r12, 1
	sal	rdx, 5
	add	rdx, QWORD PTR 24[rbx]
	mov	DWORD PTR [rdx], eax
	sar	eax, 16
	cmp	DWORD PTR TX_RING_SIZE[rip], r12d
	mov	DWORD PTR 4[rdx], eax
	mov	QWORD PTR 24[rdx], 0
	mov	DWORD PTR 8[rdx], 61440
	mov	QWORD PTR 16[rdx], 0
	jg	.L3
.L2:
	mov	eax, DWORD PTR RX_RING_SIZE[rip]
	test	eax, eax
	jle	.L4
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR rx_buf[rip]
	mov	esi, r12d
	call	libbuff_offset@PLT
	lea	rdi, [rax+rbp]
	call	LANCE_ADDR@PLT
	mov	rdx, r12
	add	r12, 1
	sal	rdx, 5
	add	rdx, QWORD PTR 16[rbx]
	mov	DWORD PTR [rdx], eax
	sar	eax, 16
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR LE_R1_OWN[rip]
	mov	QWORD PTR 16[rdx], 0
	mov	DWORD PTR 24[rdx], eax
	mov	eax, DWORD PTR RX_BUFF_SIZE[rip]
	neg	eax
	or	ah, -16
	cmp	DWORD PTR RX_RING_SIZE[rip], r12d
	mov	DWORD PTR 8[rdx], eax
	jg	.L5
.L4:
	mov	edi, DWORD PTR brx_ring[rip]
	xor	esi, esi
	call	libdesc_offset@PLT
	lea	rdi, [rax+rbp]
	call	LANCE_ADDR@PLT
	mov	edx, DWORD PTR LANCE_LOG_RX_BUFFERS[rip]
	mov	edi, DWORD PTR btx_ring[rip]
	xor	esi, esi
	mov	ecx, eax
	mov	DWORD PTR 4[rbx], eax
	sar	ecx, 16
	sal	edx, 13
	or	edx, ecx
	mov	DWORD PTR [rbx], edx
	call	libdesc_offset@PLT
	lea	rdi, [rax+rbp]
	call	LANCE_ADDR@PLT
	mov	edx, DWORD PTR LANCE_LOG_TX_BUFFERS[rip]
	mov	ecx, eax
	mov	DWORD PTR 12[rbx], eax
	sal	edx, 13
	sar	ecx, 16
	or	edx, ecx
	mov	DWORD PTR 8[rbx], edx
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	lance_init_ring_dvma, .-lance_init_ring_dvma
	.comm	tx_buf,4,4
	.comm	rx_buf,4,4
	.comm	btx_ring,4,4
	.comm	brx_ring,4,4
	.comm	TX_RING_SIZE,4,4
	.comm	RX_RING_SIZE,4,4
	.comm	RX_BUFF_SIZE,4,4
	.comm	LE_R1_OWN,4,4
	.comm	LANCE_LOG_TX_BUFFERS,4,4
	.comm	LANCE_LOG_RX_BUFFERS,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_sunlance.c_lance_init_ring_dvma.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lance_init_ring_dvma, %function
lance_init_ring_dvma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	bl	netdev_priv
	mov	r7, r0
	mov	r4, #0
	mov	r0, r8
	ldr	r5, [r7, #20]
	ldr	r6, [r7, #16]
	bl	netif_stop_queue
	ldr	r2, [r8]
	ldr	r3, [r5, #24]
	ldr	r1, [r2, #4]
	str	r4, [r7, #8]
	str	r4, [r7, #12]
	str	r4, [r7]
	str	r4, [r7, #4]
	str	r1, [r3]
	ldr	r1, [r2]
	ldr	r10, .L10
	str	r1, [r3, #4]
	ldr	r1, [r2, #12]
	ldr	r0, [r10]
	str	r1, [r3, #8]
	ldr	r1, [r2, #8]
	cmp	r0, r4
	str	r1, [r3, #12]
	ldr	r1, [r2, #20]
	str	r1, [r3, #16]
	ldr	r2, [r2, #16]
	str	r2, [r3, #20]
	ble	.L2
	mov	r8, #61440
	mov	fp, r4
	mov	r9, r4
	ldr	r7, .L10+4
.L3:
	mov	r1, fp
	ldr	r0, [r7]
	bl	libbuff_offset
	add	r0, r0, r6
	bl	LANCE_ADDR
	ldr	r2, [r5, #20]
	ldr	r3, [r10]
	add	fp, fp, #1
	cmp	r3, fp
	asr	r1, r0, #16
	add	r3, r2, r4
	str	r0, [r2, r4]
	str	r1, [r3, #4]
	str	r9, [r3, #16]
	str	r8, [r3, #8]
	str	r9, [r3, #12]
	add	r4, r4, #20
	bgt	.L3
.L2:
	ldr	r10, .L10+8
	ldr	r3, [r10]
	cmp	r3, #0
	ble	.L4
	mov	r4, #0
	mov	r7, r4
	mov	r9, r4
	ldr	r8, .L10+12
	ldr	fp, .L10+16
.L5:
	mov	r1, r7
	ldr	r0, [r8]
	bl	libbuff_offset
	add	r0, r0, r6
	bl	LANCE_ADDR
	ldr	r2, [fp]
	ldr	r1, .L10+20
	ldr	r3, [r5, #16]
	ldr	lr, [r10]
	ldr	ip, [r1]
	add	r7, r7, #1
	rsb	r2, r2, #0
	str	r0, [r3, r4]
	cmp	lr, r7
	add	r3, r3, r4
	asr	lr, r0, #16
	orr	r2, r2, #61440
	str	lr, [r3, #4]
	str	r9, [r3, #12]
	add	r4, r4, #20
	str	ip, [r3, #16]
	str	r2, [r3, #8]
	bgt	.L5
.L4:
	ldr	r3, .L10+24
	mov	r1, #0
	ldr	r0, [r3]
	bl	libdesc_offset
	add	r0, r0, r6
	bl	LANCE_ADDR
	ldr	r2, .L10+28
	asr	r3, r0, #16
	ldr	r1, [r2]
	ldr	r2, .L10+32
	orr	r3, r3, r1, lsl #13
	str	r3, [r5]
	mov	r1, #0
	str	r0, [r5, #4]
	ldr	r0, [r2]
	bl	libdesc_offset
	add	r0, r0, r6
	bl	LANCE_ADDR
	ldr	r2, .L10+36
	asr	r3, r0, #16
	ldr	r2, [r2]
	str	r0, [r5, #12]
	orr	r3, r3, r2, lsl #13
	str	r3, [r5, #8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	.align	2
.L10:
	.word	TX_RING_SIZE
	.word	tx_buf
	.word	RX_RING_SIZE
	.word	rx_buf
	.word	RX_BUFF_SIZE
	.word	LE_R1_OWN
	.word	brx_ring
	.word	LANCE_LOG_RX_BUFFERS
	.word	btx_ring
	.word	LANCE_LOG_TX_BUFFERS
	.size	lance_init_ring_dvma, .-lance_init_ring_dvma
	.comm	tx_buf,4,4
	.comm	rx_buf,4,4
	.comm	btx_ring,4,4
	.comm	brx_ring,4,4
	.comm	TX_RING_SIZE,4,4
	.comm	RX_RING_SIZE,4,4
	.comm	RX_BUFF_SIZE,4,4
	.comm	LE_R1_OWN,4,4
	.comm	LANCE_LOG_TX_BUFFERS,4,4
	.comm	LANCE_LOG_RX_BUFFERS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
