// Precondition: max >= 0.
428916
func rsplitspace(s string, max int) []string {
	res := make([]string, 0, max+1)
	end := -1 // index of field end, or -1 in a region of spaces.
	for i := len(s); i > 0; {
		r, sz := utf8.DecodeLastRuneInString(s[:i])
		if unicode.IsSpace(r) {
			if end >= 0 {
				if len(res) == max {
					break // let this field run to the start
				}
				res = append(res, s[i:end])
				end = -1
			}
		} else if end < 0 {
			end = i
		}
		i -= sz
	}
	if end >= 0 {
		res = append(res, s[:end])
	}

	resLen := len(res)
	for i := 0; i < resLen/2; i++ {
		res[i], res[resLen-1-i] = res[resLen-1-i], res[i]
	}

	return res
}
266838
func (ic *IntegerConstraint) ExclusiveMaximum(b bool) *IntegerConstraint {
	ic.NumberConstraint.ExclusiveMaximum(b)
	return ic
}
113168
func hasNodeCondition(inputs []v1.NodeConditionType, item v1.NodeConditionType) bool {
	for _, input := range inputs {
		if input == item {
			return true
		}
	}
	return false
}
527648
func Convert_core_Preconditions_To_v1_Preconditions(in *core.Preconditions, out *v1.Preconditions, s conversion.Scope) error {
	return autoConvert_core_Preconditions_To_v1_Preconditions(in, out, s)
}
99405
func interpolationFuncMax() ast.Function {
	return ast.Function{
		ArgTypes:     []ast.Type{ast.TypeFloat},
		ReturnType:   ast.TypeFloat,
		Variadic:     true,
		VariadicType: ast.TypeFloat,
		Callback: func(args []interface{}) (interface{}, error) {
			max := args[0].(float64)

			for i := 1; i < len(args); i++ {
				max = math.Max(max, args[i].(float64))
			}

			return max, nil
		},
	}
}
735475
func (r *DateRule) Max(max time.Time) *DateRule {
	r.max = max
	return r
}
489325
func (nc *NumberConstraint) Maximum(n float64) *NumberConstraint {
	nc.applyMaximum = true
	nc.maximum = n
	return nc
}
845707
func Max(data Interface) (max float64, max_index int) {
	Len := data.Len()
	max = data.Get(0)

	for i := 0; i < Len; i++ {
		xi := data.Get(i)

		if xi > max {
			max = xi
			max_index = i
		}

		if math.IsNaN(xi) {
			max = xi
			max_index = i
			return
		}
	}

	return
}
711879
func (n *NodeInfo) DiskPressureCondition() v1.ConditionStatus {
	if n == nil {
		return v1.ConditionUnknown
	}
	return n.diskPressureCondition
}
194559
func (s *IndicesRolloverService) AddMaxIndexDocsCondition(docs int64) *IndicesRolloverService {
	s.conditions["max_docs"] = docs
	return s
}
744325
func max(values ...int) int {
	v := 0
	for _, i := range values {
		if i > v {
			v = i
		}
	}
	return v
}
485203
func Max(v1, v2 Value) (Value, error) {
	return minmax(v1, v2, false)
}
191919
func (o *ObjectConstraint) MaxProperties(n int) *ObjectConstraint {
	o.maxProperties = n
	return o
}
525668
func NewEqualCondition(column string, value interface{}) *Condition {
	expr := column + " = ?"
	return NewCondition(expr, value)
}
99248
func (p *Parser) parseCondition() (Expr, error) {
	// Check if the WHERE token exists.
	if tok, _, _ := p.ScanIgnoreWhitespace(); tok != WHERE {
		p.Unscan()
		return nil, nil
	}

	// Scan the identifier for the source.
	expr, err := p.ParseExpr()
	if err != nil {
		return nil, err
	}

	return expr, nil
}
1231053
func (m mathUtil) MaxInt(values ...int) int {
	max := math.MinInt32
	for _, v := range values {
		if v > max {
			max = v
		}
	}
	return max
}
955656
func (r *RuntimeStatus) GetRuntimeCondition(t RuntimeConditionType) *RuntimeCondition {
	for i := range r.Conditions {
		c := &r.Conditions[i]
		if c.Type == t {
			return c
		}
	}
	return nil
}