// LCM computes the least common multiple of one Input and another.
426266
func (as ArraySpec) LCM(val Input) Input {
	return as.proc(func(i Input) Input {
		return i.LCM(val)
	})
}
1235185
func leafSum(h hash.Hash, data []byte) []byte {
	return sum(h, []byte{0}, data)
}
1187685
func (c Context) Rem(z, x, y *Big) *Big {
	if debug {
		x.validate()
		y.validate()
	}
	if z.invalidContext(c) {
		return z
	}

	if x.IsFinite() && y.IsFinite() {
		if y.isZero() {
			if x.isZero() {
				// 0 / 0
				return z.setNaN(InvalidOperation|DivisionUndefined, qnan, quo00)
			}
			// x / 0
			return z.setNaN(InvalidOperation|DivisionByZero, qnan, remx0)
		}
		if x.isZero() {
			// 0 / y
			return z.setZero(x.form&signbit, min(x.exp, y.exp))
		}
		// TODO(eric): See if we can get rid of tmp. See issue #72.
		var tmp Big
		_, z = c.quorem(&tmp, z, x, y)
		z.exp = min(x.exp, y.exp)
		tmp.exp = 0
		if tmp.Precision() > precision(c) {
			return z.setNaN(DivisionImpossible, qnan, quointprec)
		}
		return c.round(z)
	}

	// NaN / NaN
	// NaN / y
	// x / NaN
	if z.checkNaNs(x, y, division) {
		return z
	}

	if x.form&inf != 0 {
		if y.form&inf != 0 {
			// ±Inf / ±Inf
			return z.setNaN(InvalidOperation, qnan, quoinfinf)
		}
		// ±Inf / y
		return z.setNaN(InvalidOperation, qnan, reminfy)
	}
	// x / ±Inf
	return z.Set(x)
}
254818
func (c *aesCipherGCM) NewGCM(nonceSize int) (AEAD, error) {
	g := &gcmAsm{ks: c.enc, nonceSize: nonceSize}
	gcmAesInit(&g.productTable, g.ks)
	return g, nil
}
358609
func (as ArraySpec) GCD(val Input) Input {
	return as.proc(func(i Input) Input {
		return i.GCD(val)
	})
}
823277
func Checksum(input []byte, seed uint64) uint64 {
	n := len(input)
	var h64 uint64

	if n >= 32 {
		v1 := seed + prime64_1 + prime64_2
		v2 := seed + prime64_2
		v3 := seed
		v4 := seed - prime64_1
		p := 0
		for n := n - 32; p <= n; p += 32 {
			sub := input[p:][:32] //BCE hint for compiler
			v1 = rol31(v1+u64(sub[:])*prime64_2) * prime64_1
			v2 = rol31(v2+u64(sub[8:])*prime64_2) * prime64_1
			v3 = rol31(v3+u64(sub[16:])*prime64_2) * prime64_1
			v4 = rol31(v4+u64(sub[24:])*prime64_2) * prime64_1
		}

		h64 = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)

		v1 *= prime64_2
		v2 *= prime64_2
		v3 *= prime64_2
		v4 *= prime64_2

		h64 = (h64^(rol31(v1)*prime64_1))*prime64_1 + prime64_4
		h64 = (h64^(rol31(v2)*prime64_1))*prime64_1 + prime64_4
		h64 = (h64^(rol31(v3)*prime64_1))*prime64_1 + prime64_4
		h64 = (h64^(rol31(v4)*prime64_1))*prime64_1 + prime64_4

		h64 += uint64(n)

		input = input[p:]
		n -= p
	} else {
		h64 = seed + prime64_5 + uint64(n)
	}

	p := 0
	for n := n - 8; p <= n; p += 8 {
		sub := input[p : p+8]
		h64 ^= rol31(u64(sub)*prime64_2) * prime64_1
		h64 = rol27(h64)*prime64_1 + prime64_4
	}
	if p+4 <= n {
		sub := input[p : p+4]
		h64 ^= uint64(u32(sub)) * prime64_1
		h64 = rol23(h64)*prime64_2 + prime64_3
		p += 4
	}
	for ; p < n; p++ {
		h64 ^= uint64(input[p]) * prime64_5
		h64 = rol11(h64) * prime64_1
	}

	h64 ^= h64 >> 33
	h64 *= prime64_2
	h64 ^= h64 >> 29
	h64 *= prime64_3
	h64 ^= h64 >> 32

	return h64
}
992664
func crcCalculate(m *MAVLinkPacket) uint16 {
	crc := crcInit()

	for _, v := range m.Pack()[1 : m.Length+6] {
		crc = crcAccumulate(v, crc)
	}
	message, _ := m.MAVLinkMessage()
	crc = crcAccumulate(message.Crc(), crc)
	return crc
}
77317
func (q *Quantity) Cmp(y Quantity) int {
	num1 := q.Value()
	num2 := y.Value()
	if num1 < MaxMilliValue && num2 < MaxMilliValue {
		num1 = q.MilliValue()
		num2 = y.MilliValue()
	}
	if num1 < num2 {
		return -1
	} else if num1 > num2 {
		return 1
	}
	return 0
}
456426
func (c *UserStore) Num(ctx context.Context) (int, error) {
	all, err := c.All(ctx)
	if err != nil {
		return 0, err
	}

	return len(all), nil
}
1253895
func (l *Locking) Perm(n int) (v []int) {
	l.Lock()
	v = l.R.Perm(n)
	l.Unlock()
	return
}
975229
func (q *Quantity) Cmp(y Quantity) int {
	if q.d.Dec == nil && y.d.Dec == nil {
		return q.i.Cmp(y.i)
	}
	return q.AsDec().Cmp(y.AsDec())
}
1114048
func (g *gcm) mul(y *gcmFieldElement) {
	var z gcmFieldElement

	for i := 0; i < 2; i++ {
		word := y.high
		if i == 1 {
			word = y.low
		}

		// Multiplication works by multiplying z by 16 and adding in
		// one of the precomputed multiples of H.
		for j := 0; j < 64; j += 4 {
			msw := z.high & 0xf
			z.high >>= 4
			z.high |= z.low << 60
			z.low >>= 4
			z.low ^= uint64(gcmReductionTable[msw]) << 48

			// the values in |table| are ordered for
			// little-endian bit positions. See the comment
			// in NewGCMWithNonceSize.
			t := &g.productTable[word&0xf]

			z.low ^= t.low
			z.high ^= t.high
			word >>= 4
		}
	}

	*y = z
}
73265
func (l *lexer) lineNum() int {
	return 1 + strings.Count(l.input[:l.pos], "\n")
}
1197365
func MinusDm(high, low []float64, timePeriod int32) []float64 {
	var outBegIdx C.int
	var outNBElement C.int
	outReal := make([]float64, len(high))
	C.TA_MINUS_DM(0, C.int(len(high)-1), (*C.double)(unsafe.Pointer(&high[0])), (*C.double)(unsafe.Pointer(&low[0])), C.int(timePeriod), &outBegIdx, &outNBElement, (*C.double)(unsafe.Pointer(&outReal[0])))
	return outReal[:outNBElement]
}
738749
func (ls *LinearSeries) computeCoefficients() {
	ls.m, ls.b, ls.stdev, ls.avg = ls.InnerSeries.Coefficients()
}
1025355
func (f *MinhashLSH) Params() (k, l int) {
	return f.k, f.l
}
575096
func (c C) Rand() Input {
	return C(float32(math.Trunc(float64(rand.Float32() * float32(c)))))
}