// Lpush is an unshift. Returns the new length.
191064
func (m *Miniredis) Lpush(k, v string) (int, error) {
	return m.DB(m.selectedDB).Lpush(k, v)
}
334526
func (c *asyncClient) Brpoplpush(arg0 string, arg1 string, timeout int) (result FutureBytesArray, err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := []byte(arg1)
	arg2bytes := []byte(fmt.Sprint(timeout))

	var resp *PendingResponse
	resp, err = c.conn.QueueRequest(&BRPOPLPUSH, [][]byte{arg0bytes, arg1bytes, arg2bytes})
	if err == nil {
		result = resp.future.(FutureBytesArray)
	}
	return result, err

}
1045612
func (z *ConstNumber) Lsh(x *ConstNumber, count uint) *ConstNumber {
	z.Type = ConstShiftedInt
	z.Value.Lsh(&x.Value, count)
	return z
}
585060
func NewHash(pos int, line int) *Hash {
	return &Hash{
		NodeType: NodeHash,
		Loc:      Loc{pos, line},
	}
}
535707
func (h *interfaces) TopNPush(x interface{}) {
	if len(h.list) < cap(h.list)-1 {
		h.Push(x)
		return
	}
	h.list = append(h.list, x)
	if h.less(0, cap(h.list)-1) {
		h.list[0], h.list[cap(h.list)-1] = x, nil
		FixF(cap(h.list)-1, h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] }, 0)
	}
	h.list = h.list[:cap(h.list)-1]
}
644563
func (c *syncClient) Brpoplpush(arg0 string, arg1 string, timeout int) (result [][]byte, err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := []byte(arg1)
	arg2bytes := []byte(fmt.Sprint(timeout))

	var resp Response
	resp, err = c.conn.ServiceRequest(&BRPOPLPUSH, [][]byte{arg0bytes, arg1bytes, arg2bytes})
	if err == nil {
		result = resp.GetMultiBulkData()
	}
	return result, err

}
104487
func unhashList(ksids [][]byte) ([]sqltypes.Value, error) {
	values := make([]sqltypes.Value, 0, len(ksids))
	for _, ksid := range ksids {
		v, err := vunhash(ksid)
		if err != nil {
			return nil, err
		}
		values = append(values, sqltypes.NewUint64(v))
	}
	return values, nil
}
853205
func (s *Sensu) GetStashesSlice(limit int, offset int) ([]interface{}, error) {
	return s.getList(fmt.Sprintf("stashes"), limit, offset)
}
562997
func DoHash(alg string, d []byte) []byte {
	switch alg {
	case "sha256":
		digest := sha256.Sum256(d)
		return digest[:]
	case "sha512":
		digest := sha512.Sum512(d)
		return digest[:]
	}
	return nil
}
733580
func SumTruncated(bz []byte) []byte {
	hash := sha256.Sum256(bz)
	return hash[:TruncatedSize]
}
1208008
func (p *Hash) Sum(b []byte) []byte {
	var out [TagSize]byte
	h := p.h

	if p.off > 0 {
		var buf [TagSize]byte
		copy(buf[:], p.buf[:p.off])
		buf[p.off] = 1 // invariant: p.off < TagSize

		update(buf[:], finalBlock, &h, &(p.r))
	}

	finalize(&out, &h, &(p.s))
	p.done = true
	return append(b, out[:]...)
}
790333
func (s *summary) asyncFlush(now time.Time) {
	s.mtx.Lock()
	s.swapBufs(now)

	// Unblock the original goroutine that was responsible for the mutation
	// that triggered the compaction.  But hold onto the global non-buffer
	// state mutex until the operation finishes.
	go func() {
		s.flushColdBuf()
		s.mtx.Unlock()
	}()
}
587267
func (a *ACLToken) SetHash() []byte {
	// Initialize a 256bit Blake2 hash (32 bytes)
	hash, err := blake2b.New256(nil)
	if err != nil {
		panic(err)
	}

	// Write all the user set fields
	hash.Write([]byte(a.Name))
	hash.Write([]byte(a.Type))
	for _, policyName := range a.Policies {
		hash.Write([]byte(policyName))
	}
	if a.Global {
		hash.Write([]byte("global"))
	} else {
		hash.Write([]byte("local"))
	}

	// Finalize the hash
	hashVal := hash.Sum(nil)

	// Set and return the hash
	a.Hash = hashVal
	return hashVal
}
1327361
func appendFlush(rb *reorderBuffer) bool {
	for i := 0; i < rb.nrune; i++ {
		start := rb.rune[i].pos
		end := start + rb.rune[i].size
		rb.out = append(rb.out, rb.byte[start:end]...)
	}
	return true
}
808371
func (imo *ImoHash) Sum(data []byte) [Size]byte {
	sr := io.NewSectionReader(bytes.NewReader(data), 0, int64(len(data)))

	return imo.hashCore(sr)
}
216943
func ConfigPush(appID string, fileName string) error {
	contents, err := ioutil.ReadFile(fileName)

	if err != nil {
		return err
	}

	config := strings.Split(string(contents), "\n")
	return ConfigSet(appID, config[:len(config)-1])
}
783572
func (ncc *SeesawNCC) IPVSFlush(in int, out *int) error {
	ipvsMutex.Lock()
	defer ipvsMutex.Unlock()
	return ipvs.Flush()
}