//line ucl.rl:61
352625
func parse_number(data []rune, p int, pe int) (Value, int, error) {
	var (
		cs int
		eof = pe
		ret Value
		start = p
	)
	_ = eof

//line ucl.go:100
	{
	cs = number_start
	}

//line ucl.rl:72

//line ucl.go:107
	{
	var _klen int
	var _trans int
	var _acts int
	var _nacts uint
	var _keys int
	if p == pe {
		goto _test_eof
	}
	if cs == 0 {
		goto _out
	}
_resume:
	_keys = int(_number_key_offsets[cs])
	_trans = int(_number_index_offsets[cs])

	_klen = int(_number_single_lengths[cs])
	if _klen > 0 {
		_lower := int(_keys)
		var _mid int
		_upper := int(_keys + _klen - 1)
		for {
			if _upper < _lower {
				break
			}

			_mid = _lower + ((_upper - _lower) >> 1)
			switch {
			case data[p] < _number_trans_keys[_mid]:
				_upper = _mid - 1
			case data[p] > _number_trans_keys[_mid]:
				_lower = _mid + 1
			default:
				_trans += int(_mid - int(_keys))
				goto _match
			}
		}
		_keys += _klen
		_trans += _klen
	}

	_klen = int(_number_range_lengths[cs])
	if _klen > 0 {
		_lower := int(_keys)
		var _mid int
		_upper := int(_keys + (_klen << 1) - 2)
		for {
			if _upper < _lower {
				break
			}

			_mid = _lower + (((_upper - _lower) >> 1) & ^1)
			switch {
			case data[p] < _number_trans_keys[_mid]:
				_upper = _mid - 2
			case data[p] > _number_trans_keys[_mid + 1]:
				_lower = _mid + 2
			default:
				_trans += int((_mid - int(_keys)) >> 1)
				goto _match
			}
		}
		_trans += _klen
	}

_match:
	_trans = int(_number_indicies[_trans])
	cs = int(_number_trans_targs[_trans])

	if _number_trans_actions[_trans] == 0 {
		goto _again
	}

	_acts = int(_number_trans_actions[_trans])
	_nacts = uint(_number_actions[_acts]); _acts++
	for ; _nacts > 0; _nacts-- {
		_acts++
		switch _number_actions[_acts-1] {
		case 0:
//line ucl.rl:27
 p--
 p++; goto _out
 
		case 1:
//line ucl.rl:41

		if strings.IndexAny(string(data[start:p]), ".eE") >= 0 {
			v, err := strconv.ParseFloat(string(data[start:p]), 64)
			if err != nil {
				return nil, -1, err
			}
			ret = &Number{Value: v}
		} else {
			v, err := strconv.ParseInt(string(data[start:p]), 10, 64)
			if err != nil {
				return nil, -1, err
			}
			ret = &Integer{Value: v}
		}
	
//line ucl.go:208
		}
	}

_again:
	if cs == 0 {
		goto _out
	}
	p++
	if p != pe {
		goto _resume
	}
	_test_eof: {}
	_out: {}
	}

//line ucl.rl:73

	if cs >= number_first_final {
		return ret, p, nil
	}
	return nil, -1, parserError{machine: "number", offset: p, state: cs}
}
103232
func (nl *nl_NL) CardinalPluralRule(num float64, v uint64) locales.PluralRule {

	n := math.Abs(num)
	i := int64(n)

	if i == 1 && v == 0 {
		return locales.PluralRuleOne
	}

	return locales.PluralRuleOther
}
753279
func (c *Client) GetInlineGameHighScores(inlineMessageID string, userID int) ([]*GameHighScore, error) {
	req := url.Values{}
	req.Set("inline_message_id", inlineMessageID)
	req.Set("user_id", fmt.Sprint(userID))
	var scores []*GameHighScore
	err := c.doRequest("getGameHighScores", req, &scores)
	return scores, err
}
282505
func StrToUint(sc *stmtctx.StatementContext, str string) (uint64, error) {
	str = strings.TrimSpace(str)
	validPrefix, err := getValidIntPrefix(sc, str)
	if validPrefix[0] == '+' {
		validPrefix = validPrefix[1:]
	}
	uVal, err1 := strconv.ParseUint(validPrefix, 10, 64)
	if err1 != nil {
		return uVal, ErrOverflow.GenWithStackByArgs("BIGINT UNSIGNED", validPrefix)
	}
	return uVal, errors.Trace(err)
}
284652
func (u *UI) Line(format string, a ...interface{}) {
	u.LineIndent(0, format, a...)
}
649715
func linear(v0, v1, v2, v3 *uint32) {
	*v0 = ((*v0 << 13) | (*v0 >> (32 - 13)))
	*v2 = ((*v2 << 3) | (*v2 >> (32 - 3)))
	*v1 ^= *v0 ^ *v2
	*v3 ^= *v2 ^ (*v0 << 3)
	*v1 = (*v1 << 1) | (*v1 >> (32 - 1))
	*v3 = (*v3 << 7) | (*v3 >> (32 - 7))
	*v0 ^= *v1 ^ *v3
	*v2 ^= *v3 ^ (*v1 << 7)
	*v0 = (*v0 << 5) | (*v0 >> (32 - 5))
	*v2 = (*v2 << 22) | (*v2 >> (32 - 22))
}
985560
func (lu *lu_CD) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleUnknown
}
606703
func (ru *ru_UA) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
1097930
func (gl *gl) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
1311324
func (r *Lexer) fetchNull() {
	r.pos += 4
	if r.pos > len(r.Data) ||
		r.Data[r.pos-3] != 'u' ||
		r.Data[r.pos-2] != 'l' ||
		r.Data[r.pos-1] != 'l' ||
		(r.pos != len(r.Data) && !isTokenEnd(r.Data[r.pos])) {

		r.pos -= 4
		r.errSyntax()
	}
}
540152
func (usl *UnSmeList) Len() int {
	var ret int
	for i := range usl.Data {
		ret = ret + usl.Data[i].Len()
	}
	return ret
}
2380
func (c *Cell) Int64() (int64, error) {
	f, err := strconv.ParseInt(c.Value, 10, 64)
	if err != nil {
		return -1, err
	}
	return f, nil
}
1348271
func parseStatLine(line string) (name string, vals []uint64, err error) {
	fields := strings.Fields(line)
	totalVals := len(fields) - 1
	if totalVals <= 0 {
		err = fmt.Errorf("not enough fields in stat line (%d): %s", len(fields), line)
		return
	}
	name = fields[0]
	vals = make([]uint64, totalVals)
	var val uint64
	for i := 0; i < totalVals; i++ {
		if val, err = strconv.ParseUint(fields[i+1], 10, 64); err != nil {
			return name, nil, errors.New("could not parse stat line: " + err.Error())
		}
		vals[i] = val
	}
	return
}
1284306
func (de *de_LU) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
977108
func (pl *pl_PL) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
1232408
func TTL(secsFromCitrusLeafEpoc uint32) uint32 {
	switch secsFromCitrusLeafEpoc {
	// don't convert magic values
	case 0: // when set to don't expire, this value is returned
		return math.MaxUint32
	default:
		// Record may not have expired on server, but delay or clock differences may
		// cause it to look expired on client. Floor at 1, not 0, to avoid old
		// "never expires" interpretation.
		now := time.Now().Unix()
		expiration := int64(CITRUSLEAF_EPOCH + secsFromCitrusLeafEpoc)
		if expiration < 0 || expiration > now {
			return uint32(expiration - now)
		}
		return 1
	}
}
572664
func (id ID) GetEpochFromTeamTLF(tid keybase1.TeamID) (
	matches bool, epoch byte, err error) {
	tidBytes := tid.ToBytes()
	if len(tidBytes) != idByteLen {
		return false, 0, errors.Errorf(
			"The length of team ID %s doesn't match that of a TLF ID", tid)
	}

	epochIndex := idByteLen - 2
	if !bytes.Equal(tidBytes[:epochIndex], id.id[:epochIndex]) {
		return false, 0, nil
	}

	return true, id.id[epochIndex], nil
}