// Inverse S-Box 4
480127
func sb4Inv(r0, r1, r2, r3 *uint32) {
	r4 := *r2
	*r2 &= *r3
	*r2 ^= *r1
	*r1 |= *r3
	*r1 &= *r0
	r4 ^= *r2
	r4 ^= *r1
	*r1 &= *r2
	*r0 = ^*r0
	*r3 ^= r4
	*r1 ^= *r3
	*r3 &= *r0
	*r3 ^= *r2
	*r0 ^= *r1
	*r2 &= *r0
	*r3 ^= *r0
	*r2 ^= r4
	*r2 |= *r3
	*r3 ^= *r0
	*r2 ^= *r1
	//return *r0, *r3, *r2, r4
	*r1 = *r3
	*r3 = r4
}
1314209
func Reverse(list cty.Value) (cty.Value, error) {
	return ReverseFunc.Call([]cty.Value{list})
}
1210828
func reverseBits(i int) int {
	i = ((i << 2) & 0xc) | ((i >> 2) & 0x3)
	i = ((i << 1) & 0xa) | ((i >> 1) & 0x5)
	return i
}
674028
func Convert_config_SecretboxConfiguration_To_v1_SecretboxConfiguration(in *config.SecretboxConfiguration, out *SecretboxConfiguration, s conversion.Scope) error {
	return autoConvert_config_SecretboxConfiguration_To_v1_SecretboxConfiguration(in, out, s)
}
623358
func ReverseSlice(slice interface{}) interface{} {
	switch reflect.TypeOf(slice).Kind() {
	case reflect.Slice, reflect.Ptr:
		values := reflect.Indirect(reflect.ValueOf(slice))
		if values.Len() == 0 {
			return slice
		}

		reversedSlice := reflect.MakeSlice(reflect.SliceOf(reflect.Indirect(values.Index(0)).Type()), values.Len(), values.Len())

		k := 0
		for i := values.Len() - 1; i >= 0; i-- {
			reversedSlice.Index(k).Set(copyElement(values.Index(i)))
			k++
		}

		return reversedSlice.Interface()
	default:
		panic(fmt.Sprintf("Type not allowed: %v", reflect.TypeOf(slice).Kind()))
	}
}
588236
func (e *Etcd) Reverse(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error) {
	return e.Services(state, exact, opt)
}
77284
func (c *Crypto) Box(ctx context.Context, plaintext []byte, teamSpec keybase1.TeamIDWithVisibility) (*keybase1.EncryptedGitMetadata, error) {
	team, err := c.loadTeam(ctx, teamSpec, 0)
	if err != nil {
		return nil, err
	}

	public := teamSpec.Visibility == keybase1.TLFVisibility_PUBLIC

	key := publicCryptKey
	if !public {
		key, err = team.GitMetadataKey(ctx)
		if err != nil {
			return nil, err
		}
	}

	nonce, err := libkb.RandomNaclDHNonce()
	if err != nil {
		return nil, err
	}

	var encKey [libkb.NaclSecretBoxKeySize]byte = key.Key
	sealed := secretbox.Seal(nil, plaintext, &nonce, &encKey)

	return &keybase1.EncryptedGitMetadata{
		V:   libkb.CurrentGitMetadataEncryptionVersion,
		E:   sealed,
		N:   nonce,
		Gen: key.KeyGeneration,
	}, nil
}
893589
func (nc *Conn) NewRespInbox() string {
	nc.mu.Lock()
	s := nc.newRespInbox()
	nc.mu.Unlock()
	return s
}
1334660
func gfInverse(a gfElement) gfElement {
	if a == gfZero {
		log.Panicln("No multiplicative inverse of 0")
	}

	return gfExpTable[255-gfLogTable[a]]
}
319508
func Reverse(in interface{}) interface{} {
	value := reflect.ValueOf(in)
	valueType := value.Type()

	kind := value.Kind()

	if kind == reflect.String {
		return ReverseString(in.(string))
	}

	if kind == reflect.Array || kind == reflect.Slice {
		length := value.Len()

		resultSlice := makeSlice(value, length)

		j := 0
		for i := length - 1; i >= 0; i-- {
			resultSlice.Index(j).Set(value.Index(i))
			j++
		}

		return resultSlice.Interface()
	}

	panic(fmt.Sprintf("Type %s is not supported by Reverse", valueType.String()))
}
551392
func (bc BoxCorners) Box() Box {
	return Box{
		Top:    util.Math.MinInt(bc.TopLeft.Y, bc.TopRight.Y),
		Left:   util.Math.MinInt(bc.TopLeft.X, bc.BottomLeft.X),
		Right:  util.Math.MaxInt(bc.TopRight.X, bc.BottomRight.X),
		Bottom: util.Math.MaxInt(bc.BottomLeft.Y, bc.BottomRight.Y),
	}
}
1230262
func (vind *ReverseBits) ReverseMap(_ VCursor, ksids [][]byte) ([]sqltypes.Value, error) {
	reverseIds := make([]sqltypes.Value, 0, len(ksids))
	for _, keyspaceID := range ksids {
		val, err := unreverse(keyspaceID)
		if err != nil {
			return reverseIds, err
		}
		reverseIds = append(reverseIds, sqltypes.NewUint64(val))
	}
	return reverseIds, nil
}
377923
func NewInverseBloomFilter(capacity uint) *InverseBloomFilter {
	return &InverseBloomFilter{
		array:    make([]*[]byte, capacity),
		hashPool: &sync.Pool{New: func() interface{} { return fnv.New32() }},
		capacity: capacity,
	}
}
805478
func ReverseInt32(s []int32) []int32 {
	for i, j := 0, len(s)-1; i < len(s)/2; i, j = i+1, j-1 {
		s[i], s[j] = s[j], s[i]
	}
	return s
}
1109314
func reverse(u []byte) []byte {
	// Special-case 16 bit UUIDS for speed.
	l := len(u)
	if l == 2 {
		return []byte{u[1], u[0]}
	}
	b := make([]byte, l)
	for i := 0; i < l/2+1; i++ {
		b[i], b[l-i-1] = u[l-i-1], u[i]
	}
	return b
}
1352419
func (p *parser) parseInverse() *ast.BlockStatement {
	// openInverse
	result, blockParams := p.parseOpenBlock()

	// program
	program := p.parseProgram()

	program.BlockParams = blockParams
	result.Inverse = program

	// inverseAndProgram?
	if p.isInverse() {
		result.Program = p.parseInverseAndProgram()
	}

	// closeBlock
	p.parseCloseBlock(result)

	setBlockInverseStrip(result)

	return result
}
1080769
func (mat *T) Invert() *T {
	initialDet := mat.Determinant()
	mat.Adjugate()
	mat.Mul(1 / initialDet)
	return mat
}