// Part of sort.Interface
161560
func (h vaultDataHeapImp) Less(i, j int) bool {
	// Two zero times should return false.
	// Otherwise, zero is "greater" than any other time.
	// (To sort it at the end of the list.)
	// Sort such that zero times are at the end of the list.
	iZero, jZero := h[i].next.IsZero(), h[j].next.IsZero()
	if iZero && jZero {
		return false
	} else if iZero {
		return false
	} else if jZero {
		return true
	}

	return h[i].next.Before(h[j].next)
}
377158
func quickSort(s Sortable, from, to int) {
	if to-from > 1 {
		pivot := partition(s, from, to)
		quickSort(s, from, pivot)
		quickSort(s, pivot+1, to)
	}
}
1053643
func Sort(g Iterator) *Immutable {
	if g, ok := g.(*Immutable); ok {
		return g
	}
	return build(g, false)
}
273614
func (a AddressPairList) Sort() {
	sort.Slice(a, func(i, j int) bool {
		if a[i].IPV4 < a[j].IPV4 {
			return true
		} else if a[i].IPV4 == a[j].IPV4 {
			return a[i].IPV6 < a[j].IPV6
		}
		return false
	})
}
170062
func IndexSort(data sort.Interface) []int {
	indexes := make([]int, data.Len())
	for i := range indexes {
		indexes[i] = i
	}
	sort.Sort(InterfaceStruct{
		LenF: data.Len,
		LessF: func(i, j int) bool {
			return data.Less(indexes[i], indexes[j])
		},
		SwapF: func(i, j int) {
			indexes[i], indexes[j] = indexes[j], indexes[i]
		},
	})
	return indexes
}
1283420
func (v VarBinds) Sort() VarBinds {
	c := make(VarBinds, len(v))
	copy(c, v)
	sort.Sort(sortableVarBinds{c})
	return c
}
898708
func Bipartition(g Iterator) (part []int, ok bool) {
	type color byte
	const (
		none color = iota
		white
		black
	)
	colors := make([]color, g.Order())
	whiteCount := 0
	for v := range colors {
		if colors[v] != none {
			continue
		}
		colors[v] = white
		whiteCount++
		for queue := []int{v}; len(queue) > 0; {
			v := queue[0]
			queue = queue[1:]
			if g.Visit(v, func(w int, _ int64) (skip bool) {
				switch {
				case colors[w] != none:
					if colors[v] == colors[w] {
						skip = true
					}
					return
				case colors[v] == white:
					colors[w] = black
				default:
					colors[w] = white
					whiteCount++
				}
				queue = append(queue, w)
				return
			}) {
				return []int{}, false
			}
		}
	}
	part = make([]int, 0, whiteCount)
	for v, color := range colors {
		if color == white {
			part = append(part, v)
		}
	}
	return part, true
}
258402
func SortF(Len int, Less func(i, j int) bool, Swap func(i, j int)) {
	sort.Sort(InterfaceStruct{
		LenF: func() int {
			return Len
		},
		LessF: Less,
		SwapF: Swap,
	})
}
169330
func (v Versions) Sort() {
	sort.Slice(v, func(i, j int) bool {
		return v[i].NewerThan(v[j])
	})
}
641695
func (ms *multiAddrSorter) Sort(sockAddrs SockAddrs) {
	ms.addrs = sockAddrs
	sort.Sort(ms)
}
275891
func (fs *FileSorter) ReduceParts() []int {
	parts := make([]int, 0, len(fs.mapOuts))
	for part, _ := range fs.mapOuts {
		parts = append(parts, part)
	}
	// fmt.Println("FileSorter ReduceParts", parts)
	return parts
}
407885
func (h *TermsHashPerFieldImpl) sortPostings(termComp func(a, b []byte) bool) []int {
	return h.bytesHash.Sort(termComp)
}
695014
func (d *ClientDigestsFile) Sort() {
	sort.Slice(d.entries, func(i, j int) bool {
		l, r := d.entries[i], d.entries[j]
		if l.plat != r.plat {
			return l.plat < r.plat
		}
		return l.ref.HashAlgo > r.ref.HashAlgo // more recent algos first
	})
}
643561
func Sorter(v interface{}) sort.Interface {
	switch v := v.(type) {
	case []int:
		return sort.IntSlice(v)
	case []float64:
		return sort.Float64Slice(v)
	case []string:
		return sort.StringSlice(v)
	case []time.Time:
		return sortTimeSlice(v)
	case sort.Interface:
		return v
	}

	rv := reflectSlice(v)
	switch rv.Type().Elem().Kind() {
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return sortIntSlice{rv}
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
		return sortUintSlice{rv}
	case reflect.Float32, reflect.Float64:
		return sortFloatSlice{rv}
	case reflect.String:
		return sortStringSlice{rv}
	}
	panic(&generic.TypeError{rv.Type().Elem(), nil, "is not orderable"})
}
533582
func Sort(less, xs interface{}) {
	chk := ty.Check(
		new(func(func(ty.A, ty.A) bool, []ty.A)),
		less, xs)

	vless, vxs := chk.Args[0], chk.Args[1]
	sort.Sort(&sortable{vless, vxs, swapperOf(vxs.Type().Elem())})
}
216946
func (c *TasksListCall) Sort(sort string) *TasksListCall {
	c.urlParams_.Set("sort", sort)
	return c
}
1351456
func (s Sortable) Less(i, j int) bool {
	return len(s[i].Pointers) > len(s[j].Pointers)

}