code: func (s *asmState) Write(b []byte) (int, error) {
  	if s.state != spongeAbsorbing {
  		panic("sha3: write to sponge after read")
  	}
  	length := len(b)
  	for len(b) > 0 {
  		if len(s.buf) == 0 && len(b) >= cap(s.buf) {
  			// Hash the data directly and push any remaining bytes
  			// into the buffer.
  			remainder := len(s.buf) % s.rate
  			kimd(s.function, &s.a, b[:len(b)-remainder])
  			if remainder != 0 {
  				s.copyIntoBuf(b[len(b)-remainder:])
  			}
  			return length, nil
  		}
  
  		if len(s.buf) == cap(s.buf) {
  			// flush the buffer
  			kimd(s.function, &s.a, s.buf)
  			s.buf = s.buf[:0]
  		}
  
  		// copy as much as we can into the buffer
  		n := len(b)
  		if len(b) > cap(s.buf)-len(s.buf) {
  			n = cap(s.buf) - len(s.buf)
  		}
  		s.copyIntoBuf(b[:n])
  		b = b[n:]
  	}
  	return length, nil
  }
docs: // Write (via the embedded io.Writer interface) adds more data to the running hash.
  // It never returns an error.