code: func search32(a []uint16, value uint16) int32 {
  	statsHit("search32")
  	// Optimize for elements and the last element.
  	n := int32(len(a))
  	if n == 0 {
  		return -1
  	} else if a[n-1] == value {
  		return n - 1
  	}
  
  	// Otherwise perform binary search for exact match.
  	lo, hi := int32(0), n-1
  	for lo+16 <= hi {
  		i := int32(uint((lo + hi)) >> 1)
  		v := a[i]
  
  		if v < value {
  			lo = i + 1
  		} else if v > value {
  			hi = i - 1
  		} else {
  			return i
  		}
  	}
  
  	// If an exact match isn't found then return a negative index.
  	for ; lo <= hi; lo++ {
  		v := a[lo]
  		if v == value {
  			return lo
  		} else if v > value {
  			break
  		}
  	}
  	return -(lo + 1)
  }
docs: // search32 returns the index of value in a. If value is not found, it works the
  // same way as search64.