// Int16s hamming distance of two int16 buffers, of which the size of b0
// is used for both (panics if b1 < b0, does not compare b1 beyond length of b0)
343624
func Int16s(b0, b1 []int16) int {
	d := 0
	for i, x := range b0 {
		d += Int16(x, b1[i])
	}
	return d
}
980483
func (g *Group) Int16() *Statement {
	// notest
	s := Int16()
	g.items = append(g.items, s)
	return s
}
463713
func (a *Array) Uint16(i uint16) *Array {
	a.buf = enc.AppendUint16(enc.AppendArrayDelim(a.buf), i)
	return a
}
1341776
func (Encoder) AppendInt16(dst []byte, val int16) []byte {
	return strconv.AppendInt(dst, int64(val), 10)
}
212478
func Len16(x uint16) (n int) {
	if x >= 1<<8 {
		x >>= 8
		n = 8
	}
	return n + int(len8tab[x])
}
880844
func (ed *eventData) writeUint16(value uint16) {
	binary.Write(&ed.buffer, binary.LittleEndian, value)
}
1268502
func swap16(i uint16) uint16 {
	if Native == binary.BigEndian {
		return i
	}
	return (i&0xff00)>>8 | (i&0xff)<<8
}
122246
func (b *Buffer) Read16() uint16 {
	v, ok := b.consume(2)
	if !ok {
		return 0
	}
	return order.Uint16(v)
}
574376
func decodeUint16(b []byte) (uint16, error) {
	// Check the length of the slice of bytes.
	if len(b) != 2 {
		return 0, ErrInvalidByteLen
	}

	return uint16(b[0])<<8 | uint16(b[1]), nil
}
1166367
func (p *parserMixin) Uint16() (target *uint16) {
	target = new(uint16)
	p.Uint16Var(target)
	return
}
455472
func (ed *eventData) writeInt16(value int16) {
	binary.Write(&ed.buffer, binary.LittleEndian, value)
}
836849
func Uint32(b []byte) uint32 {
	if l := len(b); l != 4 {
		panic(fmt.Sprintf("Uint32: unexpected byte slice length: %d", l))
	}

	return *(*uint32)(unsafe.Pointer(&b[0]))
}
148097
func (bigEndian) ReadUint16(b io.ByteReader) (uint16, error) {
	var b1, b2 uint8
	var err error
	if b2, err = b.ReadByte(); err != nil {
		return 0, err
	}
	if b1, err = b.ReadByte(); err != nil {
		return 0, err
	}
	return uint16(b1) + uint16(b2)<<8, nil
}
145461
func Int16(name rune, value int16, helpvalue ...string) *int16 {
	return CommandLine.Int16(name, value, helpvalue...)
}
1252241
func Int16ToString(from int16) (string, error) {
	return strconv.FormatInt(int64(from), DefeultNumericBase), nil
}
762349
func (vb *packer) WriteInt16(num int16) (int, error) {
	return vb.WriteUint16(uint16(num))
}
99635
func (Encoder) AppendUints16(dst []byte, vals []uint16) []byte {
	if len(vals) == 0 {
		return append(dst, '[', ']')
	}
	dst = append(dst, '[')
	dst = strconv.AppendUint(dst, uint64(vals[0]), 10)
	if len(vals) > 1 {
		for _, val := range vals[1:] {
			dst = strconv.AppendUint(append(dst, ','), uint64(val), 10)
		}
	}
	dst = append(dst, ']')
	return dst
}