// search32 returns the index of value in a. If value is not found, it works the
// same way as search64.
558080
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)
}
1216219
func ContainsFloat32(s []float32, v float32) bool {
	for _, vv := range s {
		if vv == v {
			return true
		}
	}
	return false
}
1225128
func (dec *Decoder) Int32(v *int32) error {
	err := dec.decodeInt32(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
99330
func (ctx *Context) QueryFloat32(key string, defaults ...float32) float32 {
	return (*Queries)(ctx.req).MustFloat32(key, defaults...)
}
1300533
func ParseUint32(valueString string) (uint32, error) {
	if valueString == "" {
		return 0, nil
	}
	valueString = strings.Replace(valueString, ",", "", -1)
	value, err := strconv.ParseUint(valueString, 10, 32)
	if err != nil {
		return 0, err
	}
	return uint32(value), nil
}
283605
func (p *Params) Int32(key string) (int32, error) {
	v, err := strconv.ParseInt(p.Get(key), 10, 32)
	return int32(v), err
}
1071124
func QueryGetUint32(request *http.Request, key string) (uint32, error) {
	return ParseUint32(QueryGet(request, key))
}
196736
func atoi32(s string) (int32, error) {
	n, err := strconv.ParseInt(s, 0, 32)
	if err != nil {
		return 0, err
	}
	return int32(n), nil
}
1344752
func (c *cookies) Int32(key string) (int32, error) {
	ck, err := c.req.Cookie(key)
	if err != nil {
		return 0, err
	}
	v, err := strconv.ParseInt(ck.Value, 10, 32)
	return int32(v), err
}
1354361
func (dec *Decoder) Float32(v *float32) error {
	err := dec.decodeFloat32(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
281550
func (s *DeleteByQueryService) SearchType(searchType string) *DeleteByQueryService {
	s.searchType = searchType
	return s
}
879464
func (b *Buffer) Read32() uint32 {
	v, ok := b.consume(4)
	if !ok {
		return 0
	}
	return order.Uint32(v)
}
916719
func (p *Buffer) DecodeFixed32() (x uint64, err error) {
	// x, err already 0
	i := p.index + 4
	if i < 0 || i > len(p.buf) {
		err = io.ErrUnexpectedEOF
		return
	}
	p.index = i

	x = uint64(p.buf[i-4])
	x |= uint64(p.buf[i-3]) << 8
	x |= uint64(p.buf[i-2]) << 16
	x |= uint64(p.buf[i-1]) << 24
	return
}
1321066
func ConvertFloat32(str string) (float32, error) {
	f, err := strconv.ParseFloat(str, 32)
	if err != nil {
		return 0, err
	}
	return float32(f), nil
}
420774
func Hash32(in []byte, seed uint32) uint32 {
    hash1, hash2 := uint64(seed),  uint64(seed)
    hash3, _ := SpookyHash128(in, hash1, hash2)
    return uint32(hash3)
}
1106545
func Float32(val string) (float32, error) {
	f, err := strconv.ParseFloat(val, 32)
	if err != nil {
		return 0, err
	}
	return float32(f), nil
}
858971
func (a *Int32Array) Scan(value interface{}) error {
	if value == nil {
		*a = nil
		return nil
	}

	var b []byte
	switch v := value.(type) {
	case []byte:
		b = v
	case string:
		b = []byte(v)
	default:
		return fmt.Errorf("Int32Array.Scan: expected []byte or string, got %T (%q)", value, value)
	}

	if len(b) < 2 || b[0] != '{' || b[len(b)-1] != '}' {
		return fmt.Errorf("Int32Array.Scan: unexpected data %q", b)
	}

	p := strings.Split(string(b[1:len(b)-1]), ",")

	// reuse underlying array if present
	if *a == nil {
		*a = make(Int32Array, 0, len(p))
	}
	*a = (*a)[:0]

	for _, s := range p {
		if s == "" {
			continue
		}
		i, err := strconv.Atoi(s)
		if err != nil {
			return err
		}
		*a = append(*a, int32(i))
	}

	return nil
}