// OrElse returns the uint8 value or a default value if the value is not present.
777665
func (u Uint8) OrElse(v uint8) uint8 {
	if u.Present() {
		return *u.value
	}
	return v
}
1065599
func Int64Slice(v []int64) []*int64 {
	out := make([]*int64, len(v))
	for i := range v {
		out[i] = &v[i]
	}
	return out
}
663190
func (se *se_FI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleUnknown
}
440980
func (b *builtinPISig) evalReal(_ chunk.Row) (float64, bool, error) {
	return float64(math.Pi), false, nil
}
1007015
func lpOleStrLen(p *uint16) (length int64) {
	if p == nil {
		return 0
	}

	ptr := unsafe.Pointer(p)

	for i := 0; ; i++ {
		if 0 == *(*uint16)(ptr) {
			length = int64(i)
			break
		}
		ptr = unsafe.Pointer(uintptr(ptr) + 2)
	}
	return
}
378226
func (c *Context) Int64Slice(name string) []int64 {
	return lookupInt64Slice(name, c.flagSet)
}
104373
func (e *Ethtool) MsglvlSet(intf string, valset uint32) (uint32, uint32, error) {
	edata := ethtoolValue{
		cmd: ETHTOOL_GMSGLVL,
	}

	var name [IFNAMSIZ]byte
	copy(name[:], []byte(intf))

	ifr := ifreq{
		ifr_name: name,
		ifr_data: uintptr(unsafe.Pointer(&edata)),
	}

	_, _, ep := syscall.Syscall(syscall.SYS_IOCTL, uintptr(e.fd),
		SIOCETHTOOL, uintptr(unsafe.Pointer(&ifr)))
	if ep != 0 {
		return 0, 0, syscall.Errno(ep)
	}

	readval := edata.data

	edata.cmd = ETHTOOL_SMSGLVL
	edata.data = valset

	_, _, ep = syscall.Syscall(syscall.SYS_IOCTL, uintptr(e.fd),
		SIOCETHTOOL, uintptr(unsafe.Pointer(&ifr)))
	if ep != 0 {
		return 0, 0, syscall.Errno(ep)
	}

	return readval, edata.data, nil
}
148698
func (d *Decoder) valueFromOtherSlice(mtype reflect.Type, tval []interface{}) (reflect.Value, error) {
	mval := reflect.MakeSlice(mtype, len(tval), len(tval))
	for i := 0; i < len(tval); i++ {
		val, err := d.valueFromToml(mtype.Elem(), tval[i])
		if err != nil {
			return mval, err
		}
		mval.Index(i).Set(val)
	}
	return mval, nil
}
693175
func Int64ValueSlice(src []*int64) []int64 {
	dst := make([]int64, len(src))
	for i := 0; i < len(src); i++ {
		if src[i] != nil {
			dst[i] = *(src[i])
		}
	}
	return dst
}
1057487
func (e *Encoder) marshalSlice(val reflect.Value, child bool) (string, bool) {
	var ok bool
	if ok = supportedBaseKind(val); !ok {
		return "", false
	}
	var sl, str string
	// check the type of slice and handle
	for j := 0; j < val.Len(); j++ {
		str = ""
		str, ok = e.stringify(val.Index(j), child)
		if !ok {
			return "", false
		}
		if j == 0 {
			sl = str
			continue
		}
		sl = fmt.Sprintf("%s,%s", sl, str)
	}
	if child {
		sl = fmt.Sprintf("%s%s%s", e.sepBeg, sl, e.sepEnd)
	}
	return sl, true
}
372569
func Uint32ValueSlice(src []*uint32) []uint32 {
	dst := make([]uint32, len(src))
	for i := 0; i < len(src); i++ {
		if src[i] != nil {
			dst[i] = *(src[i])
		}
	}
	return dst
}
812758
func Int64Slice(val, sep string) ([]int64, error) {
	s := strings.Split(val, sep)
	values := make([]int64, len(s))
	for i, v := range s {
		value, err := Int64(v)
		if err != nil {
			return values, err
		}
		values[i] = value
	}
	return values, nil
}
465697
func (cond *Condition) IntSliceValue() ([]int64, error) {
	val := cond.Value

	switch tval := val.(type) {
	case []interface{}:
		ret := make([]int64, len(tval))
		for i, v := range tval {
			switch tv := v.(type) {
			case int64:
				ret[i] = tv
			case uint64:
				ret[i] = int64(tv)
			default:
				return nil, fmt.Errorf("unexpected value type %T in IntSliceValue, val %v", tv, tv)
			}
		}
		return ret, nil
	default:
		return nil, fmt.Errorf("unexpected type %T in IntSliceValue, val %v", tval, tval)
	}
}
579173
func (te *te) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
990518
func (c Complex64) OrElse(v complex64) complex64 {
	if c.Present() {
		return *c.value
	}
	return v
}
1087304
func (s Uint8Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
1371564
func (val XMValue) UInt8() (v uint8) {
	encoding.ReadFrom(bytes.NewBuffer(val), &v)
	return
}