Initial version ("pseudo-code") of the ff_multiply function.