// Int32 creates a random 32 bit integer using crypto.rand
559997
func Int32() (i int32) {
	randomBits(r)
	buf := bytes.NewBuffer(r)
	binary.Read(buf, binary.LittleEndian, &i)
	return i
}
1363430
func readInt32(r io.Reader) (int, error) {
	var value int32
	err := binary.Read(r, binary.LittleEndian, &value)
	return int(value), err
}
477082
func (w *ByteWriter) WriteUint32(val uint32, offset int) (int, error) {
	return w.WriteVal(val, offset)
}
200706
func (w *Writer) WriteInt32(sample int32) error {
	err := binary.Write(w.sampleBuf, binary.LittleEndian, sample)
	if err != nil {
		return err
	}

	w.bytesWritten += 4

	return err
}
529913
func (r *Encoder) EncodeInt32(x int32) error {
	_, err := r.w.Write([]byte{CHR_INT4})
	if err != nil {
		return err
	}
	return binary.Write(r.w, binary.BigEndian, x)
}
1181492
func (a *Array) Int32(i int32) *Array {
	a.buf = enc.AppendInt32(enc.AppendArrayDelim(a.buf), i)
	return a
}
685308
func (r *MockResult) Int32(i int) int32 {
	if r.Contains(i) {
		return r.Result[i].(int32)
	} else {
		return 0
	}
}
268205
func (c Context) Ints32(key string, i []int32) Context {
	c.l.context = enc.AppendInts32(enc.AppendKey(c.l.context, key), i)
	return c
}
1188118
func (dec *Decoder) Int32Null(v **int32) error {
	err := dec.decodeInt32Null(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
346113
func (w *ByteWriter) MustWriteInt32(val int32, offset int) int {
	return w.MustWriteVal(val, offset)
}
796356
func (e *Event) Uint32(key string, i uint32) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendUint32(enc.AppendKey(e.buf, key), i)
	return e
}
947535
func Uint32(val string) (uint32, error) {
	i, err := strconv.ParseUint(val, 0, 32)
	if err != nil {
		return 0, err
	}
	return uint32(i), nil
}
77484
func (r *Rand) Int() int {
	u := uint(r.Int63())
	return int(u << 1 >> 1) // clear sign bit if int == int32
}
770727
func (vb *keyWriter) WriteInt32(num int32) (int, error) {
	return vb.WriteUint32(uint32(num))
}
632336
func encodeInt32(buf *bytes.Buffer, name string, val Int32) error {
	// type
	if err := buf.WriteByte(_32BIT_INTEGER); err != nil {
		return err
	}

	// name
	if err := writeCstring(buf, name); err != nil {
		return err
	}

	// value
	return binary.Write(buf, binary.LittleEndian, val)
}
479311
func (ed *eventData) writeInt32(value int32) {
	binary.Write(&ed.buffer, binary.LittleEndian, value)
}
864483
func (l *Locking) Uint32() (v uint32) {
	l.Lock()
	v = l.R.Uint32()
	l.Unlock()
	return
}