// Int returns a random, non-negative int.
4534
func (m *MT19937) Int() int {
	u := uint(m.Int32())
	return int(u << 1 >> 1)
}
1284122
func NewInt(val int, p *int) *Int {
	*p = val
	return (*Int)(p)
}
76434
func (g *Generator) Int(lo, hi int) int {
	if lo == hi {
		return lo
	}
	if lo > hi {
		lo, hi = hi, lo
	}
	n := g.rand.Intn(hi - lo + 1)
	return lo + n
}
559997
func Int32() (i int32) {
	randomBits(r)
	buf := bytes.NewBuffer(r)
	binary.Read(buf, binary.LittleEndian, &i)
	return i
}
1080461
func RandomInt(n int) int {
	if n <= 0 {
		panic(fmt.Sprintf("Got invalid (non positive) value: %d", n))
	}
	m := int(RandomUInt64()) % n
	if m < 0 {
		return n + m
	}
	return m
}
437669
func (g *Group) Int() *Statement {
	// notest
	s := Int()
	g.items = append(g.items, s)
	return s
}
245588
func (h *HCL) Int(name string) (int, error) {
	v, err := h.value(name)
	if err != nil {
		return 0, err
	}

	f, ok := v.(float64)
	if !ok {
		i, ok := v.(int)
		if !ok {
			return v.(int), errors.New(fmt.Sprintf("%T unable", v))
		}

		return i, nil
	}

	return int(f), nil
}
1048160
func (k *Key) Int() (int, error) {
	v, err := strconv.ParseInt(k.String(), 0, 64)
	return int(v), err
}
293641
func Int() gopter.Gen {
	return Int64Range(math.MinInt32, math.MaxInt32).
		Map(int64ToInt).
		WithShrinker(IntShrinker)
}
255068
func (m *MT19937) Int() int {
	u := uint(m.Int64())
	return int(u << 1 >> 1)
}
805106
func (c *Context) Int(name string) int {
	return lookupInt(name, c.flagSet)
}
181380
func (j *JSON) Int(name string) (int, error) {
	v, err := j.value(name)
	if err != nil {
		return 0, err
	}

	f, ok := v.(float64)
	if !ok {
		return 0, errors.New(fmt.Sprintf("%T unable", v))
	}

	return int(f), nil
}
135769
func (fs *FlagSet) Int(names []string, value int, usage string) *int {
	p := new(int)
	fs.IntVar(p, names, value, usage)
	return p
}
425649
func (c Flags) Int(name string) int {
	f := c.Get(name)
	if f == nil {
		return -1
	}
	return *f.Value.(*int)
}
24344
func Int(key string, def int) int {
	val := os.Getenv(key)
	if val == "" {
		return def
	}

	i, err := strconv.Atoi(val)
	if err != nil {
		return def
	}
	return i
}
271800
func (c *JSONConfigContainer) Int(key string) (int, error) {
	val := c.getData(key)
	if val != nil {
		if v, ok := val.(float64); ok {
			return int(v), nil
		}
		return 0, errors.New("not int value")
	}
	return 0, errors.New("not exist key:" + key)
}
399611
func RandomInt(min, max int) int {
	return min + rand.Intn(max-min)
}