// seqNum returns the sequence number of an internal key.
// seqNum may panic if k is not valid.
183741
func (k internalKey) seqNum() uint64 {
	i := len(k) - 7
	n := uint64(k[i+0])
	n |= uint64(k[i+1]) << 8
	n |= uint64(k[i+2]) << 16
	n |= uint64(k[i+3]) << 24
	n |= uint64(k[i+4]) << 32
	n |= uint64(k[i+5]) << 40
	n |= uint64(k[i+6]) << 48
	return n
}
1328926
func alphanum(r rune) bool {
	return r == '_' || r == '.' || unicode.IsLetter(r) || unicode.IsDigit(r)
}
276494
func (s *StartingPosition) SetSequenceNumber(v string) *StartingPosition {
	s.SequenceNumber = &v
	return s
}
1060423
func ParseToNumber(numberToParse, defaultRegion string, phoneNumber *PhoneNumber) error {
	return parseHelper(numberToParse, defaultRegion, false, true, phoneNumber)
}
1147841
func (c *DialContext) NextSeq(db string, collection string, id string) (int, error) {
	s := c.Ref()
	defer c.UnRef(s)

	var res struct {
		Seq int
	}
	_, err := s.DB(db).C(collection).FindId(id).Apply(mgo.Change{
		Update:    bson.M{"$inc": bson.M{"seq": 1}},
		ReturnNew: true,
	}, &res)

	return res.Seq, err
}
693691
func (m *DummyMailbox) MessageBySequenceNumber(seqno uint32) Message {
	if seqno > uint32(len(m.messages)) {
		return nil
	}
	return m.messages[seqno-1]
}
882659
func numberFunc(q query, t iterator) interface{} {
	v := q.Evaluate(t)
	return asNumber(t, v)
}
962711
func (p *gc_parser) parse_number() {
	p.parse_int()
	if p.lit == "p" {
		p.next()
		p.parse_int()
	}
}
183288
func (b *BlockGen) Number() *big.Int {
	return new(big.Int).Set(b.header.Number)
}
1367530
func (s *SendMessageOutput) SetSequenceNumber(v string) *SendMessageOutput {
	s.SequenceNumber = &v
	return s
}
649334
func makeSortedSequences(sequences map[uint64]int64) []uint64 {
	results := make([]uint64, 0, len(sequences))
	for seq := range sequences {
		results = append(results, seq)
	}
	sort.Sort(bySeq(results))
	return results
}
314375
func (ss *SQLSubStore) addSeq(subid, seqno uint64) bool {
	ap := ss.getOrCreateAcksPending(subid, seqno)
	ap.msgs[seqno] = struct{}{}
	return len(ap.msgs) >= sqlMaxPendingAcks
}
624033
func (s Seq) Array() (output []float64) {
	if s.Len() == 0 {
		return
	}

	output = make([]float64, s.Len())
	for i := 0; i < s.Len(); i++ {
		output[i] = s.GetValue(i)
	}
	return
}
521263
func (gms *genericMsgStore) FirstSequence() (uint64, error) {
	gms.RLock()
	first := gms.first
	gms.RUnlock()
	return first, nil
}
807278
func DecryptRequestWithSequenceNumber(client io.Writer, r *http.Request, bucket, object string, seqNumber uint32, metadata map[string]string) (io.WriteCloser, error) {
	if crypto.S3.IsEncrypted(metadata) {
		return newDecryptWriter(client, nil, bucket, object, seqNumber, metadata)
	}

	key, err := ParseSSECustomerRequest(r)
	if err != nil {
		return nil, err
	}
	return newDecryptWriter(client, key, bucket, object, seqNumber, metadata)
}
1021273
func (s *PutRecordOutput) SetSequenceNumber(v string) *PutRecordOutput {
	s.SequenceNumber = &v
	return s
}
1321402
func RandAlphaNumSeq(n int) string {
	b := make([]rune, n)
	for i := range b {
		b[i] = alphaNum[rand.Intn(len(alphaNum))]
	}
	return string(b)
}