/* Check if reduced-form input >= 2^255-19
590
private static final boolean is_overflow(long10 x) {
		return (
			((x._0 > P26-19)) &&
			((x._1 & x._3 & x._5 & x._7 & x._9) == P25) &&
			((x._2 & x._4 & x._6 & x._8) == P26)
			) || (x._9 > P25);
	}
1234405
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
806248
function lessThan(xs, ys) {
    for (let i = 0; i < Math.min(xs.length, ys.length); i++) {
        if (xs[i] < ys[i])
            return true;
        if (xs[i] > ys[i])
            return false;
    }
    return xs.length < ys.length;
}
730166
function isNumeric(input) {
  return input !== undefined
    && input !== null
    && (typeof input === 'number' || parseInt(input, 10) == input);
}
813054
function(dec) {
         var r = parseInt(dec,10).toString(16);
         if (r.length == 1) r = "0"+r;
         return r;
      }
1362311
function checkDeclaration2(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkPropertyDelim(i)) i++;
  else return 0;

  if (l = checkProperty(i)) i += l;
  else return 0;

  if (l = checkValue(i)) return i + l - start;

  if (l = checkSC(i)) i += l;

  if (l = checkValue(i)) i += l;
  else return 0;

  return i - start;
}
1162105
function calcWeak32(data, prev, start, end) {
  var a = 0;
  var b = 0;
  var M = 1 << 16;
  var N = 65521;

  if (!prev) {
    var len = (start >= 0 && end >= 0) ? (end - start + 1) : data.length;
    var datai;
    for (var i = 0; i < len; i++) {
      datai = data[i];
      a += datai;
      b += ((len - i) * datai);
    }

    a %= N;
    b %= N;
  } else {
    var k = start;
    var l = end - 1;
    var prev_k = k - 1;
    var prev_l = l - 1;
    var prev_first = data[prev_k];
    var curr_last = data[l];

    a = (prev.a - prev_first + curr_last) % N;
    b = (prev.b - (prev_l - prev_k + 1) * prev_first + a) % N;
  }
  return { a: a, b: b, sum: a + b * M };
}
1231810
function isIntegerBuffer(buf) {
  var sign = '-'.charCodeAt(0)
    , i;

  // empty string is not an integer
  if(!buf.length) return false;

  for(i = 0;i < buf.length;i++) {
    if(!i && buf[i] === sign) continue;
    if(!~NUMBERS.indexOf(buf[i])) return false;
  }

  return true;
}
3525
function isDelimiter(code) {
  return code === 0x22                // '"'
    || code === 0x28                  // '('
    || code === 0x29                  // ')'
    || code === 0x2C                  // ','
    || code === 0x2F                  // '/'
    || code >= 0x3A && code <= 0x40   // ':', ';', '<', '=', '>', '?' '@'
    || code >= 0x5B && code <= 0x5D   // '[', '\', ']'
    || code === 0x7B                  // '{'
    || code === 0x7D;                 // '}'
}
1178233
function checkPseudoClass2(i) {
  const start = i;
  let l;

  // Skip `:`.
  i++;

  if (i >= tokensLength) return 0;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (i >= tokensLength ||
      tokens[i].type !== TokenType.LeftParenthesis) return 0;

  const right = tokens[i].right;

  // Skip `(`.
  i++;

  if (l = checkSC(i)) i += l;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (i !== right) return 0;

  // Skip `)`.
  i++;

  return i - start;
}
663735
function checkLengths(k, n) {
  if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');
  if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');
}
1275373
function parseIntValue(input) {

    let value = input.buf.readInt32LE(input.i);
    input.i += 4;
    return value;
}
1022787
public boolean verify(JComponent input) {
        JTextField tf = (JTextField) input;
        try {
            int inputInt = Integer.parseInt(tf.getText());
            return (inputInt >= min && inputInt <= max);
        } catch (NumberFormatException e) {
            return false;
        }
    }
648578
function getCzechForm (c) {
    if (c === 1) {
      return 0
    } else if (Math.floor(c) !== c) {
      return 1
    } else if (c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10) {
      return 2
    } else {
      return 3
    }
  }
1000318
function checkNum(nums, min, max){
  if(nums == null)
    return false;

  if(nums == -1)
    return true;

  for(let i = 0; i < nums.length; i++){
    if(nums[i]<min || nums[i]>max)
      return false;
  }

  return true;
}
615309
function checkdigits(rhs, dig) {
  if (dig==0)
   return; // don't check if digits=0
  // first check lhs...
  if (this.mant.length>dig)
   if ((!(this.allzero(this.mant,dig))))
    throw "Too many digits: "+this.toString();
  if (rhs==null)
   return; // monadic
  if (rhs.mant.length>dig)
   if ((!(this.allzero(rhs.mant,dig))))
    throw "Too many digits: "+rhs.toString();
  return;
  }
563890
function isPositiveFiniteInteger(value, errorMessage) {
        value = Number(value);
        if (isNaN(value) || !isFinite(value) || value < 0 || value % 1 !== 0) {
            throw new RangeError(errorMessage.replace('$', value));
        }
        return value;
    }