code: func (s *asmState) resetBuf() {
  	max := (cap(s.storage) / s.rate) * s.rate
  	s.buf = s.storage[:0:max]
  }
docs: // resetBuf points buf at storage, sets the length to 0 and sets cap to be a
  // multiple of the rate.