code: func uint64Log2(v uint64) uint {
  	log := uint(0)
  	for i, m := range paddingMasks {
  		if v&m != 0 {
  			shift := uint(1<<uint(len(paddingMasks)-2)) >> uint(i)
  			v >>= shift
  			log |= shift
  		}
  	}
  	return log + 1
  }
docs: // Calculate the log2 of the unsigned value v.
  //
  // This is used to find the position of the highest-set bit in v.
  //
  // from https://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
  // 32 bit implementation extended to 64 bits