// REQUIRE: Left and Right children must be present
504225
func moveRedLeft(h *Node) *Node {
	flip(h)
	if isRed(h.Right.Left) {
		h.Right = rotateRight(h.Right)
		h = rotateLeft(h)
		flip(h)
	}
	return h
}
302330
func (c *ContextTemplateData) MustValidate(name string) bool {
	return c.Params.IsRequired(name) && !c.IsPathParam(name)
}
1073654
func validateAttachRequired(attachRequired *bool, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}
	if attachRequired == nil {
		allErrs = append(allErrs, field.Required(fldPath, ""))
	}

	return allErrs
}
846751
func Required(val interface{}) error {
	// the reflect value of the result
	value := reflect.ValueOf(val)

	// if the value passed in is the zero value of the appropriate type
	if isZero(value) && value.Kind() != reflect.Bool {
		return errors.New("Value is required")
	}
	return nil
}
1165730
func (d *Dependencies) requireStarted(needle string) bool {
	if needle == d.Net || needle == d.IPC {
		return true
	}
	for _, name := range d.Requires {
		if name == needle {
			return true
		}
	}
	for _, name := range d.Link {
		if name == needle {
			return true
		}
	}
	return false
}
662422
func (sd structDef) needFmt() bool {
	// array type min items and max items
	if sd.T.MinItems > 0 || sd.T.MaxItems > 0 {
		return true
	}

	// unique items
	for _, f := range sd.Fields {
		if f.UniqueItems {
			return true
		}
	}
	return false
}
1330197
func childAddrOf(child, parent string) bool {
	cs := strings.Split(child, ".")
	ps := strings.Split(parent, ".")
	if len(ps) > len(cs) {
		return false
	}
	return reflect.DeepEqual(ps, cs[:len(ps)])
}
1174522
func (d *Context) RequireContext(index int) *Context {
	return contextFromPointer(C.duk_require_context(d.duk_context, C.duk_idx_t(index)))
}
611399
func (o *ObjectConstraint) Required(l ...string) *ObjectConstraint {
	o.reqlock.Lock()
	defer o.reqlock.Unlock()

	for _, pname := range l {
		o.required[pname] = struct{}{}
	}
	return o
}
370464
func (p *Parameter) Required(required bool) *Parameter {
	p.data.Required = required
	return p
}
830553
func (d *Context) RequireBuffer(index int) (rawPtr unsafe.Pointer, outSize uint) {
	rawPtr = C.duk_require_buffer(d.duk_context, C.duk_idx_t(index), (*C.duk_size_t)(unsafe.Pointer(&outSize)))
	return rawPtr, outSize
}
700285
func (d *Context) RequireInt(index int) int {
	return int(C.duk_require_int(d.duk_context, C.duk_idx_t(index)))
}
1189863
func (p PaddedCell) ChildIJ(pos int) (i, j int) {
	ij := posToIJ[p.orientation][pos]
	return ij >> 1, ij & 1
}
146604
func (d *Context) RequireBoolean(index int) bool {
	return int(C.duk_require_boolean(d.duk_context, C.duk_idx_t(index))) == 1
}
524394
func (t *Tab) requestChildNodes(nodeId, depth int) {
	_, err := t.DOM.RequestChildNodes(nodeId, depth, false)
	if err != nil {
		t.debugf("error requesting child nodes: %s\n", err)
	}
}
1022034
func (rule *Rule) AddChildRule(childRule *Rule) {
	for key, existingChildRule := range rule.Children {
		if existingChildRule.Name == childRule.Name {
			rule.Children[key] = childRule

			return
		}
	}

	rule.Children = append(rule.Children, childRule)
}
872096
func MustSub(b []uint32, rh []uint32) {
	if len(b) != len(rh) {
		panic(ErrUnequallySizedSlices)
	}

	noborrow := true

	for i := range b {
		v, c := FullAdd(b[i], ^rh[i], noborrow)
		b[i] = uint32(v)
		noborrow = c
	}

	if !noborrow {
		panic(ErrSubtractionWithLeftovers)
	}
}