code: func clamp(x int64) uint64 {
  	if x < 0 {
  		return 0
  	}
  	if x > math.MaxInt64 {
  		return math.MaxUint64
  	}
  	return uint64(x)
  }
docs: // clamp clamps the given "x" within the acceptable domain of the uint64 integer
  // type, so as to prevent over- and underflow.