// u32 converts n to an uint32, or panics if n is out of range
176148
func u32(n int64) uint32 {
	if n < 0 || n > math.MaxUint32 {
		panic("bad size " + fmt.Sprint(n))
	}
	return uint32(n)
}
914441
func UInt32s(input []uint32) []uint32 {
	u := make([]uint32, 0, len(input))
	m := make(map[uint32]bool)

	for _, val := range input {
		if _, ok := m[val]; !ok {
			m[val] = true
			u = append(u, val)
		}
	}

	return u
}
1356270
func (f *Forms) Uint32(key string) (uint32, error) {
	v, err := strconv.ParseUint((*http.Request)(f).FormValue(key), 10, 32)
	return uint32(v), err
}
19546
func (m *MT19937) Int32() uint32 {
	var y uint32

	m.left--
	if m.left == 0 {
		m.NextState()
	}

	m.nptr++
	y = uint32(m.next[m.nptr])

	// Tempering
	y ^= (y >> 11)
	y ^= (y << 7) & 0x9d2c5680
	y ^= (y << 15) & 0xefc60000
	y ^= (y >> 18)

	return y
}
484994
func uint32FromNetwork(u uint32) uint32 {
	b := *(*[4]byte)(unsafe.Pointer(&u))
	return binary.BigEndian.Uint32(b[:])
}
165632
func (p *parserMixin) Uint32() (target *uint32) {
	target = new(uint32)
	p.Uint32Var(target)
	return
}
924787
func swap32(i uint32) uint32 {
	if Native == binary.BigEndian {
		return i
	}
	return (i&0xff000000)>>24 | (i&0xff0000)>>8 | (i&0xff00)<<8 | (i&0xff)<<24
}
1205751
func (e *Event) Uints32(key string, i []uint32) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendUints32(enc.AppendKey(e.buf, key), i)
	return e
}
577523
func WriteUint32(w io.Writer, value uint32) error {
	return binary.Write(w, binary.BigEndian, value)
}
135280
func Uint32(v uint32) *uint32 {
	p := new(uint32)
	*p = v
	return p
}
1027779
func RandN32(n int) []uint32 {
	b := make([]byte, 4*n)
	if _, err := rand.Read(b); err != nil {
		panic("unable to get random numbers: " + err.Error())
	}
	r := make([]uint32, n)
	for i := range r {
		r[i] = binary.LittleEndian.Uint32(b[4*i : (4*i + 4)])
	}
	return r
}
46515
func WriteVarUint32(w io.Writer, u uint32) error {
	var b []byte
	_, err := w.Write(appendUleb128(b, uint64(u)))
	return err
}
1179327
func BytesToInt32(buf []byte, offset int) int32 {
	return int32(binary.BigEndian.Uint32(buf[offset : offset+uint32sz]))
}
996770
func (ix *Index) uint32(off uint32) uint32 {
	return binary.BigEndian.Uint32(ix.slice(off, 4))
}
58737
func (e *Encoder) EncodeUint32(n uint32) error {
	return e.write4(codes.Uint32, n)
}
1360978
func (dec *Decoder) Uint32(v *uint32) error {
	err := dec.decodeUint32(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
557622
func Uint32Bytes(v uint32) []byte {
	b := make([]byte, 4)
	PutUint32(b, v)
	return b
}