def _GenerateAndClearAggregators(emitter, registers, count):
  """Prepare aggregators and emit aggregator clear code."""
  emitter.EmitNewline()
  emitter.EmitComment('Clear aggregators.')
  aggregators = [registers.QuadRegister() for unused_i in range(count)]
  for i in range(count):
    if i < 3:
      emitter.EmitVMov('i32', aggregators[i], emitter.ImmediateConstant(0))
    else:
      emitter.EmitVMov('i32', aggregators[i], aggregators[i - 3])
  return aggregators