Wrapper for call distribution to functions F, G, H and I.

    This replaces functions FF, GG, HH and II from "Appl. Crypto.
    Rotation is separate from addition to prevent recomputation
    (now summed-up in one function).
490566
def XX(func, a, b, c, d, x, s, ac):
    

    res = 0L
    res = res + a + func(b, c, d)
    res = res + x 
    res = res + ac
    res = res & 0xffffffffL
    res = _rotateLeft(res, s)
    res = res & 0xffffffffL
    res = res + b

    return res & 0xffffffffL
125460
function wrapGLCall(fn, callback) {
    const glFn = gl[fn]
    gl[fn] = function() {
      callback(arguments)
      return glFn.apply(this, arguments)
    }
  }
1345312
function(h_source, f_update) {

		// update or noop
		f_update = f_update || function(){};

		// construct gpd
		return function(z_id, z_value) {

			// solo argument
			if(arguments.length == 1) {

				// get
				if(typeof z_id == 'string') {
					return h_source[z_id];
				}
				// put entries from hash
				else if(typeof z_id == 'object') {
					for(var e in z_id) {
						h_source[e] = z_id[e];
					}
					f_update();
				}
			}
			// delete
			else if(!z_value) {
				delete h_source[z_id];
				f_update();
			}
			// put
			else {
				h_source[s_id] = z_value;
				f_update();
			}
		};
	}
92129
function makeFunctionWrapper(original, functionName) {
  //log("wrap fn: " + functionName);
  var f = original[functionName];
  return function() {
    //log("call: " + functionName);
    var result = f.apply(original, arguments);
    return result;
  };
}
868876
def _simplify_function(self):
        

        # Computing reaching definitions
        rd = self.project.analyses.ReachingDefinitions(func=self.function, func_graph=self.graph, observe_all=True)

        simp = self.project.analyses.AILSimplifier(self.function, func_graph=self.graph, reaching_definitions=rd)

        for key in list(self._blocks.keys()):
            old_block = self._blocks[key]
            if old_block in simp.blocks:
                self._blocks[key] = simp.blocks[old_block]

        self._update_graph()
120174
def _multiply(self, f1, f2, out):
        
        # Avoid infinite recursions by making a copy of the functions
        f1_copy = f1.copy()
        f2_copy = f2.copy()

        def product_oop(x, **kwargs):
            """Product out-of-place evaluation function."""
            return np.asarray(f1_copy(x, **kwargs) * f2_copy(x, **kwargs),
                              dtype=self.scalar_out_dtype)

        out._call_out_of_place = product_oop
        decorator = preload_first_arg(out, 'in-place')
        out._call_in_place = decorator(_default_in_place)
        out._call_has_out = out._call_out_optional = False
        return out
317554
def obfuscate_function(tokens, index, replace, replacement, *args):
    
    def return_replacement(replacement):
        FUNC_REPLACEMENTS[replacement] = replace
        return replacement
    tok = tokens[index]
    token_type = tok[0]
    token_string = tok[1]
    prev_tok = tokens[index-1]
    prev_tok_string = prev_tok[1]
    if token_type != tokenize.NAME:
        return None # Skip this token
    if token_string.startswith('__'):
        return None
    if token_string == replace:
        if prev_tok_string != '.':
            if token_string == replace:
                return return_replacement(replacement)
        else:
            parent_name = tokens[index-2][1]
            if parent_name in CLASS_REPLACEMENTS:
                # This should work for @classmethod methods
                return return_replacement(replacement)
            elif parent_name in VAR_REPLACEMENTS:
                # This covers regular ol' instance methods
                return return_replacement(replacement)
1278615
function toFunctions(cldr, pluralize, opts, paramsObj) {
  return Object.keys(cldr).reduce(function(acc, key) {
    if (key.indexOf('_') === 0) return acc;
    var value = cldr[key];
    if (typeof value !== 'string') return acc;
    var t = acc[key] = interpolate(value, opts);
    merge(paramsObj, t.params);
    return acc;
  }, {});
}
876195
function compose(fn1, fn2 /*, fn3, etc */) {
  if (!arguments.length) {
    throw new Error(
      'expected at least one (and probably more) function arguments'
    );
  }
  var fns = arguments;

  return function() {
    var result = fns[0].apply(this, arguments);
    var len = fns.length;
    for (var i = 1; i < len; i++) {
      result = fns[i].call(this, result);
    }
    return result;
  };
}
935725
function _gpfFuncUnsafe (params, source) {
    var args;
    if (!params.length) {
        return _GpfFunc(source);
    }
    args = [].concat(params);
    args.push(source);
    return _GpfFunc.apply(null, args);
}
719786
public static <T1, T2, T3, R> TriFunction<T1, T2, T3, R> memoize(final TriFunction<T1, T2, T3, R> threeFunc) {
    final Function<T1, Function<T2, Function<T3, R>>> transformed
        = Memoizer.memoize(x -> Memoizer.memoize(y -> Memoizer.memoize(z -> threeFunc.apply(x, y, z))));
    return Transformations
        .<T1, T2, T3, R>unCurryTriFunction()
        .apply(transformed);
//    return (x, y, z) -> transformed.apply(x).apply(y).apply(z);
  }
915860
def math_func(f):
    
    @wraps(f)
    def wrapper(*args, **kwargs):
        if len(args) > 0:
            return_type = type(args[0])
        if kwargs.has_key('return_type'):
            return_type = kwargs['return_type']
            kwargs.pop('return_type')
            return return_type(f(*args, **kwargs))
        args = list((setify(x) for x in args))
        return return_type(f(*args, **kwargs))
    return wrapper
674389
function fmt = function(s) {
  var i = 0, args = Array.prototype.slice.call(arguments, 1)
  return s.replace(/%s/g, function() { return args[i++] })
}
653871
function wrapFunctions(fns, file, files) {
  return Object.entries(fns)
    .reduce((obj1, [groupName, group]) => {
      return Object.assign(obj1, {
        [groupName]: Object.entries(group)
          .reduce((obj2, [fnName, fn]) => {
            return Object.assign(obj2, { [fnName]: fn(file, files) });
          }, {})
      });
    }, {});
}
1096750
def compose(*fs):
    
    # Pull the iterator out into a tuple so we can call `composed`
    # more than once.
    rs = tuple(reversed(fs))

    def composed(n):
        return reduce(lambda a, b: b(a), rs, n)

    # Attempt to make the function look pretty with
    # a fresh docstring and name.
    try:
        composed.__doc__ = 'lambda n: ' + _composed_doc(fs)
    except AttributeError:
        # One of our callables does not have a `__name__`, whatever.
        pass
    else:
        # We already know that for all `f` in `fs`, there exists `f.__name__`
        composed.__name__ = '_of_'.join(f.__name__ for f in fs)

    return composed
61742
public static <T1, T2, T3, T4, R> Function4<T1, T2, T3, T4, R> memoizeQuadFunction(final Function4<T1, T2, T3, T4, R> fn) {
      Function1<Tuple4<T1, T2, T3, T4>, R> memoise2 = memoizeFunction((final Tuple4<T1, T2, T3, T4> quad) -> fn.apply(quad._1(), quad._2(), quad._3(), quad._4()));
        return (t1, t2, t3, t4) -> memoise2.apply(tuple(t1, t2, t3, t4));
    }
1341003
boolean propagate(AmbiguatedFunctionSummary callee, AmbiguatedFunctionSummary caller) {
      int initialCallerFlags = caller.bitmask;

      if (callerIsAlias) {
        caller.setMask(callee.bitmask);
        return caller.bitmask != initialCallerFlags;
      }

      if (callee.mutatesGlobalState()) {
        // If the callee modifies global state then so does that caller.
        caller.setMutatesGlobalState();
      }
      if (callee.functionThrows()) {
        // If the callee throws an exception then so does the caller.
        caller.setFunctionThrows();
      }
      if (callee.mutatesArguments() && !allArgsUnescapedLocal) {
        // If the callee mutates its input arguments and the arguments escape the caller then it has
        // unbounded side effects.
        caller.setMutatesGlobalState();
      }
      if (callee.mutatesThis()) {
        if (invocation.isNew()) {
          // NEWing a constructor provide a unescaped "this" making side-effects impossible.
        } else if (calleeThisEqualsCallerThis) {
          caller.setMutatesThis();
        } else {
          caller.setMutatesGlobalState();
        }
      }

      return caller.bitmask != initialCallerFlags;
    }