// UserTokenEqual returns true if the two options are equal.
// In case of one option being nil, the value of the other must be nil as well
// or be set to the default value of this option.
173051
func UserTokenEqual(o1, o2 *UserTokenOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
716848
func (o *DistinctOption) Equal(o2 *DistinctOption) bool {
	if o2 == nil {
		return o.value == 0
	}
	return o.value == o2.value
}
1082874
func AllowTyposOnNumericTokensEqual(o1, o2 *AllowTyposOnNumericTokensOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
570732
func SafeEqual(o1, o2 *SafeOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1058213
func AreEqual(first, second api.Toleration) bool {
	if first.Key == second.Key &&
		first.Operator == second.Operator &&
		first.Value == second.Value &&
		first.Effect == second.Effect &&
		AreTolerationSecondsEqual(first.TolerationSeconds, second.TolerationSeconds) {
		return true
	}
	return false
}
328686
func (pk PubKeyMultisigThreshold) Equals(other crypto.PubKey) bool {
	otherKey, sameType := other.(PubKeyMultisigThreshold)
	if !sameType {
		return false
	}
	if pk.K != otherKey.K || len(pk.PubKeys) != len(otherKey.PubKeys) {
		return false
	}
	for i := 0; i < len(pk.PubKeys); i++ {
		if !pk.PubKeys[i].Equals(otherKey.PubKeys[i]) {
			return false
		}
	}
	return true
}
1285198
func OffsetEqual(o1, o2 *OffsetOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1321987
func CreateIfNotExistsEqual(o1, o2 *CreateIfNotExistsOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1169558
func PublicKeyEqual(k1, k2 BasePublicKey) bool {
	return hmac.Equal(k1.ToKID(), k2.ToKID())
}
293880
func compareToken(requestToken, token string) bool {
	// ConstantTimeCompare will panic if the []byte aren't the same length
	if len(requestToken) != len(token) {
		return false
	}
	return subtle.ConstantTimeCompare([]byte(requestToken), []byte(token)) == 1
}
1100570
func (v *CredentialAuthority) CompareUserKeys(ctx context.Context, uid keybase1.UID, sibkeys, subkeys []keybase1.KID) (
	err error) {
	retCh := make(chan error, 1) // buffered in case the ctx is canceled
	v.checkCh <- checkArg{uid: uid, sibkeys: sibkeys, subkeys: subkeys, retCh: retCh}
	select {
	case <-ctx.Done():
		err = ctx.Err()
	case err = <-retCh:
	}
	return err
}
530551
func checkUIDEquality(a, b []keybase1.UserOrTeamID) bool {
	aMap := make(map[keybase1.UserOrTeamID]bool)
	for _, u := range a {
		aMap[u] = true
	}
	for _, u := range b {
		if !aMap[u] {
			return false
		}
		delete(aMap, u)
	}
	return len(aMap) == 0
}
1197292
func (o *MinProximityOption) Equal(o2 *MinProximityOption) bool {
	if o2 == nil {
		return o.value == 1
	}
	return o.value == o2.value
}
330036
func (o *Origin) Equal(b Origin) bool {
	if o.Username != b.Username {
		return false
	}
	if o.SessionID != b.SessionID {
		return false
	}
	if o.SessionVersion != b.SessionVersion {
		return false
	}
	if o.NetworkType != b.NetworkType {
		return false
	}
	if o.AddressType != b.AddressType {
		return false
	}
	if o.Address != b.Address {
		return false
	}
	return true
}
1151524
func (r OauthStateReference) Equal(u convert.Equaler) bool {
	other, ok := u.(OauthStateReference)
	if !ok {
		return false
	}
	if r.ID != other.ID {
		return false
	}
	if r.State != other.State {
		return false
	}
	if r.Referrer != other.Referrer {
		return false
	}

	if r.ResponseMode == nil {
		if other.ResponseMode != nil {
			return false
		}
	} else {
		if other.ResponseMode == nil {
			return false
		} else if *r.ResponseMode != *other.ResponseMode {
			return false
		}
	}
	return true
}
622556
func (e *Invocation) isEqual(other *Invocation) bool {
	return e == other || (e.ID == other.ID &&
		e.MutationsCount == other.MutationsCount && // compare it first, it changes most often
		e.JobID == other.JobID &&
		e.IndexedJobID == other.IndexedJobID &&
		e.Started.Equal(other.Started) &&
		e.Finished.Equal(other.Finished) &&
		e.TriggeredBy == other.TriggeredBy &&
		bytes.Equal(e.PropertiesRaw, other.PropertiesRaw) &&
		equalSortedLists(e.Tags, other.Tags) &&
		bytes.Equal(e.IncomingTriggersRaw, other.IncomingTriggersRaw) &&
		bytes.Equal(e.OutgoingTriggersRaw, other.OutgoingTriggersRaw) &&
		bytes.Equal(e.PendingTimersRaw, other.PendingTimersRaw) &&
		e.Revision == other.Revision &&
		e.RevisionURL == other.RevisionURL &&
		bytes.Equal(e.Task, other.Task) &&
		equalSortedLists(e.TriggeredJobIDs, other.TriggeredJobIDs) &&
		e.DebugLog == other.DebugLog &&
		e.RetryCount == other.RetryCount &&
		e.Status == other.Status &&
		e.ViewURL == other.ViewURL &&
		bytes.Equal(e.TaskData, other.TaskData))
}
400126
func AdvancedSyntaxEqual(o1, o2 *AdvancedSyntaxOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}