#include "lidia_elf.h"

	.text
	.align 4
	.globl USCORE(DigitVecMultAdd)
USCORE(DigitVecMultAdd):
	pushl %ebp
	pushl %edi
	pushl %esi
	pushl %ebx
	movl 20(%esp),%ebx
	movl 24(%esp),%edi
	movl 28(%esp),%esi
	movl 32(%esp),%ecx
	xorl %ebp,%ebp
	jecxz L2
	clc
L1:
	movl (%edi),%eax
	mull %esi
	addl %ebp,%eax
	movl %edx,%ebp
	adcl $0,%ebp
	addl %eax,(%ebx)
	adcl $0,%ebp
	addl $4,%edi
	addl $4,%ebx
	loop L1
L2:
	movl %ebp,%eax
	popl %ebx
	popl %esi
	popl %edi
	popl %ebp
	ret
