// Int64 returns the value associated with the key as a int64.
14653
func (s *Session) Int64(key string) int64 {
	s.RLock()
	defer s.RUnlock()

	v, ok := s.data[key]
	if !ok {
		return 0
	}

	value, ok := v.(int64)
	if !ok {
		return 0
	}
	return value
}
60148
func (s StringStringMap) GetInt64(key string) (int64, error) {
	return s.getInt64(key, false)
}
932572
func (l *Literal) Int64() (int64, error) {
	if l.t != Int64 {
		return 0, fmt.Errorf("literal.Int64: literal is of type %v; cannot be converted to a int64", l.t)
	}
	return l.v.(int64), nil
}
593301
func Int64(names []string, value int64, usage string) *int64 {
	return CommandLine.Int64(names, value, usage)
}
174512
func (v *Value) Int64() (int64, error) {
	n, err := v.Number()

	if err != nil {
		return 0, err
	}

	return n.Int64()
}
110153
func (d *Decoder) DecodeInt64() (int64, error) {
	c, err := d.readCode()
	if err != nil {
		return 0, err
	}
	return d.int(c)
}
1086695
func Int64(short string, long string, value int64, usage string) *int64 {
	flagVar := value
	return Int64Var(&flagVar, short, long, value, usage)
}
889492
func (s *Session) GetInt64(key string) (int64, error) {
	v := s.Get(key)

	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}

	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}

	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}

	return -1, fmt.Errorf(errFindParse, "int64", key)
}
1304740
func (context *BaseContext) SetInt64(key string, value int64) {
	context.userData[key] = value
}
1349110
func (context *BaseContext) GetInt64(
	key string, defaultValue ...int64) int64 {
	if value, ok := context.userData[key]; ok {
		if value, ok := value.(int64); ok {
			return value
		}
	}
	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return 0
}
690097
func (c Context) Uint64(key string, i uint64) Context {
	c.l.context = enc.AppendUint64(enc.AppendKey(c.l.context, key), i)
	return c
}
203671
func (ec *Envcfg) GetInt64(key string, base, bitSize int) int64 {
	i, _ := strconv.ParseInt(ec.GetKey(key), base, bitSize)
	return i
}
499250
func ToInt64(in interface{}) (int64, error) {
	if val, err := ToInt64E(in); err == nil {
		return val, nil
	}
	return 0, ErrBadType
}
198746
func (db *nodeDB) fetchInt64(key []byte) int64 {
	blob, err := db.lvl.Get(key, nil)
	if err != nil {
		return 0
	}
	val, read := binary.Varint(blob)
	if read <= 0 {
		return 0
	}
	return val
}
119645
func (vb *keyWriter) WriteInt64(num int64) (int, error) {
	return vb.WriteUint64(uint64(num))
}
488875
func Int64s(input []int64) []int64 {
	u := make([]int64, 0, len(input))
	m := make(map[int64]bool)

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

	return u
}
1227676
func (w *ByteWriter) WriteInt64(val int64, offset int) (int, error) {
	return w.WriteVal(val, offset)
}