'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
  n = n + '';
  var i = n.indexOf('.');
  return (i == -1) ? 0 : n.length - i - 1;
}

function getVF(n, opt_precision) {
  var v = opt_precision;

  if (undefined === v) {
    v = Math.min(getDecimals(n), 3);
  }

  var base = Math.pow(10, v);
  var f = ((n * base) | 0) % base;
  return {v: v, f: f};
}

$provide.value("$locale", {
  "DATETIME_FORMATS": {
    "AMPMS": [
      "\u092b\u0941\u0902",
      "\u092c\u0947\u0932\u093e\u0938\u0947"
    ],
    "DAY": [
      "\u0930\u092c\u093f\u092c\u093e\u0930",
      "\u0938\u092e\u092c\u093e\u0930",
      "\u092e\u0902\u0917\u0932\u092c\u093e\u0930",
      "\u092c\u0941\u0926\u092c\u093e\u0930",
      "\u092c\u093f\u0938\u0925\u093f\u092c\u093e\u0930",
      "\u0938\u0941\u0916\u0941\u0930\u092c\u093e\u0930",
      "\u0938\u0941\u0928\u093f\u092c\u093e\u0930"
    ],
    "ERANAMES": [
      "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
      "\u0938\u0928"
    ],
    "ERAS": [
      "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
      "\u0938\u0928"
    ],
    "FIRSTDAYOFWEEK": 0,
    "MONTH": [
      "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
      "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
      "\u092e\u093e\u0930\u094d\u0938",
      "\u090f\u092b\u094d\u0930\u093f\u0932",
      "\u092e\u0947",
      "\u091c\u0941\u0928",
      "\u091c\u0941\u0932\u093e\u0907",
      "\u0906\u0917\u0938\u094d\u0925",
      "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
      "\u0905\u0916\u0925\u092c\u0930",
      "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
      "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
    ],
    "SHORTDAY": [
      "\u0930\u092c\u093f",
      "\u0938\u092e",
      "\u092e\u0902\u0917\u0932",
      "\u092c\u0941\u0926",
      "\u092c\u093f\u0938\u0925\u093f",
      "\u0938\u0941\u0916\u0941\u0930",
      "\u0938\u0941\u0928\u093f"
    ],
    "SHORTMONTH": [
      "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
      "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
      "\u092e\u093e\u0930\u094d\u0938",
      "\u090f\u092b\u094d\u0930\u093f\u0932",
      "\u092e\u0947",
      "\u091c\u0941\u0928",
      "\u091c\u0941\u0932\u093e\u0907",
      "\u0906\u0917\u0938\u094d\u0925",
      "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
      "\u0905\u0916\u0925\u092c\u0930",
      "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
      "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
    ],
    "WEEKENDRANGE": [
      5,
      6
    ],
    "fullDate": "EEEE, MMMM d, y",
    "longDate": "MMMM d, y",
    "medium": "MMM d, y h:mm:ss a",
    "mediumDate": "MMM d, y",
    "mediumTime": "h:mm:ss a",
    "short": "M/d/yy h:mm a",
    "shortDate": "M/d/yy",
    "shortTime": "h:mm a"
  },
  "NUMBER_FORMATS": {
    "CURRENCY_SYM": "\u20b9",
    "DECIMAL_SEP": ".",
    "GROUP_SEP": ",",
    "PATTERNS": [
      {
        "gSize": 2,
        "lgSize": 3,
        "maxFrac": 3,
        "minFrac": 0,
        "minInt": 1,
        "negPre": "-",
        "negSuf": "",
        "posPre": "",
        "posSuf": ""
      },
      {
        "gSize": 2,
        "lgSize": 3,
        "maxFrac": 2,
        "minFrac": 2,
        "minInt": 1,
        "negPre": "\u00a4\u00a0-",
        "negSuf": "",
        "posPre": "\u00a4\u00a0",
        "posSuf": ""
      }
    ]
  },
  "id": "brx-in",
  "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (i == 1 && vf.v == 0) {    return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}
});
}]);

{'repo_name': 'aspnetboilerplate/aspnetboilerplate-samples', 'stars': '649', 'repo_language': 'JavaScript', 'file_name': 'ui-utils-ieshiv.js', 'mime_type': 'text/html', 'hash': 5039128649249068565, 'source_dataset': 'data'}


/* 7zCrc.h -- CRC32 calculation
2009-11-21 : Igor Pavlov : Public domain */

#ifndef __7Z_CRC_H
#define __7Z_CRC_H

#include "Types.h"

EXTERN_C_BEGIN

extern const UInt32 g_CrcTable[];

#define CRC_INIT_VAL 0xFFFFFFFF
#define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL)
#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))

UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);

EXTERN_C_END

#endif

{'repo_name': 'Cisco-Talos/clamav-devel', 'stars': '1103', 'repo_language': 'C++', 'file_name': 'Makefile.am', 'mime_type': 'text/plain', 'hash': -2420051466061913392, 'source_dataset': 'data'}


/****************************************************************************
 * arch/mips/src/mips32/mips_blocktask.c
 *
 *   Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved.
 *   Author: Gregory Nutt <gnutt@nuttx.org>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name NuttX nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

#include <stdbool.h>
#include <sched.h>
#include <syscall.h>
#include <debug.h>

#include <nuttx/arch.h>
#include <nuttx/sched.h>

#include "sched/sched.h"
#include "group/group.h"
#include "mips_internal.h"

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: up_block_task
 *
 * Description:
 *   The currently executing task at the head of the ready to run list must
 *   be stopped.  Save its context and move it to the inactive list
 *   specified by task_state.
 *
 * Input Parameters:
 *   tcb: Refers to a task in the ready-to-run list (normally the task at
 *     the head of the list).  It must be stopped, its context saved and
 *     moved into one of the waiting task lists.  If it was the task at the
 *     head of the ready-to-run list, then a context switch to the new
 *     ready to run task must be performed.
 *   task_state: Specifies which waiting task list should hold the blocked
 *     task TCB.
 *
 ****************************************************************************/

void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
  struct tcb_s *rtcb = this_task();
  bool switch_needed;

  /* Verify that the context switch can be performed */

  DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
              (tcb->task_state <= LAST_READY_TO_RUN_STATE));

  /* Remove the tcb task from the ready-to-run list.  If we are blocking the
   * task at the head of the task list (the most likely case), then a
   * context switch to the next ready-to-run task is needed. In this case,
   * it should also be true that rtcb == tcb.
   */

  switch_needed = nxsched_remove_readytorun(tcb);

  /* Add the task to the specified blocked task list */

  nxsched_add_blocked(tcb, (tstate_t)task_state);

  /* If there are any pending tasks, then add them to the ready-to-run
   * task list now
   */

  if (g_pendingtasks.head)
    {
      switch_needed |= nxsched_merge_pending();
    }

  /* Now, perform the context switch if one is needed */

  if (switch_needed)
    {
      /* Update scheduler parameters */

      nxsched_suspend_scheduler(rtcb);

      /* Are we in an interrupt handler? */

      if (CURRENT_REGS)
        {
          /* Yes, then we have to do things differently.
           * Just copy the g_current_regs into the OLD rtcb.
           */

          up_savestate(rtcb->xcp.regs);

          /* Restore the exception context of the rtcb at the (new) head
           * of the ready-to-run task list.
           */

          rtcb = this_task();

          /* Reset scheduler parameters */

          nxsched_resume_scheduler(rtcb);

          /* Then switch contexts.  Any necessary address environment
           * changes will be made when the interrupt returns.
           */

          up_restorestate(rtcb->xcp.regs);
        }

      /* No, then we will need to perform the user context switch */

      else
        {
          /* Get the context of the task at the head of the ready to
           * run list.
           */

          struct tcb_s *nexttcb = this_task();

#ifdef CONFIG_ARCH_ADDRENV
          /* Make sure that the address environment for the previously
           * running task is closed down gracefully (data caches dump,
           * MMU flushed) and set up the address environment for the new
           * thread at the head of the ready-to-run list.
           */

          group_addrenv(nexttcb);
#endif
          /* Reset scheduler parameters */

          nxsched_resume_scheduler(nexttcb);

          /* Then switch contexts */

          up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);

          /* up_switchcontext forces a context switch to the task at the
           * head of the ready-to-run list.  It does not 'return' in the
           * normal sense.  When it does return, it is because the blocked
           * task is again ready to run and has execution priority.
           */
        }
    }
}

{'repo_name': 'apache/incubator-nuttx', 'stars': '181', 'repo_language': 'C', 'file_name': 'nrf52_uid.c', 'mime_type': 'text/x-c', 'hash': -6009482159773205554, 'source_dataset': 'data'}


/*
Copyright 2015 The Kubernetes Authors All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cm

import (
	"k8s.io/kubernetes/pkg/api"
)

// Manages the containers running on a machine.
type ContainerManager interface {
	// Runs the container manager's housekeeping.
	// - Ensures that the Docker daemon is in a container.
	// - Creates the system container where all non-containerized processes run.
	Start() error

	// Returns resources allocated to system cgroups in the machine.
	// These cgroups include the system and Kubernetes services.
	SystemCgroupsLimit() api.ResourceList

	// Returns a NodeConfig that is being used by the container manager.
	GetNodeConfig() NodeConfig

	// Returns internal Status.
	Status() Status
}

type NodeConfig struct {
	RuntimeCgroupsName string
	SystemCgroupsName  string
	KubeletCgroupsName string
	ContainerRuntime   string
}

type Status struct {
	// Any soft requirements that were unsatisfied.
	SoftRequirements error
}

{'repo_name': 'redspread/localkube', 'stars': '179', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -366990411608723591, 'source_dataset': 'data'}


// +build !ignore_autogenerated

/*
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// This file was autogenerated by deepcopy-gen. Do not edit it manually!

package apps

import (
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
	api "k8s.io/client-go/pkg/api"
	reflect "reflect"
)

func init() {
	SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
	return scheme.AddGeneratedDeepCopyFuncs(
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
	)
}

func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StatefulSet)
		out := out.(*StatefulSet)
		*out = *in
		if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
			return err
		} else {
			out.ObjectMeta = *newVal.(*v1.ObjectMeta)
		}
		if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
			return err
		}
		if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StatefulSetList)
		out := out.(*StatefulSetList)
		*out = *in
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]StatefulSet, len(*in))
			for i := range *in {
				if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		}
		return nil
	}
}

func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StatefulSetSpec)
		out := out.(*StatefulSetSpec)
		*out = *in
		if in.Selector != nil {
			in, out := &in.Selector, &out.Selector
			if newVal, err := c.DeepCopy(*in); err != nil {
				return err
			} else {
				*out = newVal.(*v1.LabelSelector)
			}
		}
		if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if in.VolumeClaimTemplates != nil {
			in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
			*out = make([]api.PersistentVolumeClaim, len(*in))
			for i := range *in {
				if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		}
		return nil
	}
}

func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*StatefulSetStatus)
		out := out.(*StatefulSetStatus)
		*out = *in
		if in.ObservedGeneration != nil {
			in, out := &in.ObservedGeneration, &out.ObservedGeneration
			*out = new(int64)
			**out = **in
		}
		return nil
	}
}

{'repo_name': 'elastos/Elastos', 'stars': '101', 'repo_language': 'Go', 'file_name': 'codereview.cfg', 'mime_type': 'text/plain', 'hash': 1608487334118733717, 'source_dataset': 'data'}


/* Helloworld module -- A few examples of the Redis Modules API in the form
 * of commands showing how to accomplish common tasks.
 *
 * This module does not do anything useful, if not for a few commands. The
 * examples are designed in order to show the API.
 *
 * -----------------------------------------------------------------------------
 *
 * Copyright (c) 2016, Salvatore Sanfilippo <antirez at gmail dot com>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   * Redistributions of source code must retain the above copyright notice,
 *     this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *   * Neither the name of Redis nor the names of its contributors may be used
 *     to endorse or promote products derived from this software without
 *     specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include "../redismodule.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

/* HELLO.SIMPLE is among the simplest commands you can implement.
 * It just returns the currently selected DB id, a functionality which is
 * missing in Redis. The command uses two important API calls: one to
 * fetch the currently selected DB, the other in order to send the client
 * an integer reply as response. */
int HelloSimple_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    REDISMODULE_NOT_USED(argv);
    REDISMODULE_NOT_USED(argc);
    RedisModule_ReplyWithLongLong(ctx,RedisModule_GetSelectedDb(ctx));
    return REDISMODULE_OK;
}

/* HELLO.PUSH.NATIVE re-implements RPUSH, and shows the low level modules API
 * where you can "open" keys, make low level operations, create new keys by
 * pushing elements into non-existing keys, and so forth.
 *
 * You'll find this command to be roughly as fast as the actual RPUSH
 * command. */
int HelloPushNative_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
{
    if (argc != 3) return RedisModule_WrongArity(ctx);

    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);

    RedisModule_ListPush(key,REDISMODULE_LIST_TAIL,argv[2]);
    size_t newlen = RedisModule_ValueLength(key);
    RedisModule_CloseKey(key);
    RedisModule_ReplyWithLongLong(ctx,newlen);
    return REDISMODULE_OK;
}

/* HELLO.PUSH.CALL implements RPUSH using an higher level approach, calling
 * a Redis command instead of working with the key in a low level way. This
 * approach is useful when you need to call Redis commands that are not
 * available as low level APIs, or when you don't need the maximum speed
 * possible but instead prefer implementation simplicity. */
int HelloPushCall_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
{
    if (argc != 3) return RedisModule_WrongArity(ctx);

    RedisModuleCallReply *reply;

    reply = RedisModule_Call(ctx,"RPUSH","ss",argv[1],argv[2]);
    long long len = RedisModule_CallReplyInteger(reply);
    RedisModule_FreeCallReply(reply);
    RedisModule_ReplyWithLongLong(ctx,len);
    return REDISMODULE_OK;
}

/* HELLO.PUSH.CALL2
 * This is exaxctly as HELLO.PUSH.CALL, but shows how we can reply to the
 * client using directly a reply object that Call() returned. */
int HelloPushCall2_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
{
    if (argc != 3) return RedisModule_WrongArity(ctx);

    RedisModuleCallReply *reply;

    reply = RedisModule_Call(ctx,"RPUSH","ss",argv[1],argv[2]);
    RedisModule_ReplyWithCallReply(ctx,reply);
    RedisModule_FreeCallReply(reply);
    return REDISMODULE_OK;
}

/* HELLO.LIST.SUM.LEN returns the total length of all the items inside
 * a Redis list, by using the high level Call() API.
 * This command is an example of the array reply access. */
int HelloListSumLen_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
{
    if (argc != 2) return RedisModule_WrongArity(ctx);

    RedisModuleCallReply *reply;

    reply = RedisModule_Call(ctx,"LRANGE","sll",argv[1],(long long)0,(long long)-1);
    size_t strlen = 0;
    size_t items = RedisModule_CallReplyLength(reply);
    size_t j;
    for (j = 0; j < items; j++) {
        RedisModuleCallReply *ele = RedisModule_CallReplyArrayElement(reply,j);
        strlen += RedisModule_CallReplyLength(ele);
    }
    RedisModule_FreeCallReply(reply);
    RedisModule_ReplyWithLongLong(ctx,strlen);
    return REDISMODULE_OK;
}

/* HELLO.LIST.SPLICE srclist dstlist count
 * Moves 'count' elements from the tail of 'srclist' to the head of
 * 'dstlist'. If less than count elements are available, it moves as much
 * elements as possible. */
int HelloListSplice_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (argc != 4) return RedisModule_WrongArity(ctx);

    RedisModuleKey *srckey = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    RedisModuleKey *dstkey = RedisModule_OpenKey(ctx,argv[2],
        REDISMODULE_READ|REDISMODULE_WRITE);

    /* Src and dst key must be empty or lists. */
    if ((RedisModule_KeyType(srckey) != REDISMODULE_KEYTYPE_LIST &&
         RedisModule_KeyType(srckey) != REDISMODULE_KEYTYPE_EMPTY) ||
        (RedisModule_KeyType(dstkey) != REDISMODULE_KEYTYPE_LIST &&
         RedisModule_KeyType(dstkey) != REDISMODULE_KEYTYPE_EMPTY))
    {
        RedisModule_CloseKey(srckey);
        RedisModule_CloseKey(dstkey);
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    long long count;
    if ((RedisModule_StringToLongLong(argv[3],&count) != REDISMODULE_OK) ||
        (count < 0)) {
        RedisModule_CloseKey(srckey);
        RedisModule_CloseKey(dstkey);
        return RedisModule_ReplyWithError(ctx,"ERR invalid count");
    }

    while(count-- > 0) {
        RedisModuleString *ele;

        ele = RedisModule_ListPop(srckey,REDISMODULE_LIST_TAIL);
        if (ele == NULL) break;
        RedisModule_ListPush(dstkey,REDISMODULE_LIST_HEAD,ele);
        RedisModule_FreeString(ctx,ele);
    }

    size_t len = RedisModule_ValueLength(srckey);
    RedisModule_CloseKey(srckey);
    RedisModule_CloseKey(dstkey);
    RedisModule_ReplyWithLongLong(ctx,len);
    return REDISMODULE_OK;
}

/* Like the HELLO.LIST.SPLICE above, but uses automatic memory management
 * in order to avoid freeing stuff. */
int HelloListSpliceAuto_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (argc != 4) return RedisModule_WrongArity(ctx);

    RedisModule_AutoMemory(ctx);

    RedisModuleKey *srckey = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    RedisModuleKey *dstkey = RedisModule_OpenKey(ctx,argv[2],
        REDISMODULE_READ|REDISMODULE_WRITE);

    /* Src and dst key must be empty or lists. */
    if ((RedisModule_KeyType(srckey) != REDISMODULE_KEYTYPE_LIST &&
         RedisModule_KeyType(srckey) != REDISMODULE_KEYTYPE_EMPTY) ||
        (RedisModule_KeyType(dstkey) != REDISMODULE_KEYTYPE_LIST &&
         RedisModule_KeyType(dstkey) != REDISMODULE_KEYTYPE_EMPTY))
    {
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    long long count;
    if ((RedisModule_StringToLongLong(argv[3],&count) != REDISMODULE_OK) ||
        (count < 0))
    {
        return RedisModule_ReplyWithError(ctx,"ERR invalid count");
    }

    while(count-- > 0) {
        RedisModuleString *ele;

        ele = RedisModule_ListPop(srckey,REDISMODULE_LIST_TAIL);
        if (ele == NULL) break;
        RedisModule_ListPush(dstkey,REDISMODULE_LIST_HEAD,ele);
    }

    size_t len = RedisModule_ValueLength(srckey);
    RedisModule_ReplyWithLongLong(ctx,len);
    return REDISMODULE_OK;
}

/* HELLO.RAND.ARRAY <count>
 * Shows how to generate arrays as commands replies.
 * It just outputs <count> random numbers. */
int HelloRandArray_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (argc != 2) return RedisModule_WrongArity(ctx);
    long long count;
    if (RedisModule_StringToLongLong(argv[1],&count) != REDISMODULE_OK ||
        count < 0)
        return RedisModule_ReplyWithError(ctx,"ERR invalid count");

    /* To reply with an array, we call RedisModule_ReplyWithArray() followed
     * by other "count" calls to other reply functions in order to generate
     * the elements of the array. */
    RedisModule_ReplyWithArray(ctx,count);
    while(count--) RedisModule_ReplyWithLongLong(ctx,rand());
    return REDISMODULE_OK;
}

/* This is a simple command to test replication. Because of the "!" modified
 * in the RedisModule_Call() call, the two INCRs get replicated.
 * Also note how the ECHO is replicated in an unexpected position (check
 * comments the function implementation). */
int HelloRepl1_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
{
    REDISMODULE_NOT_USED(argv);
    REDISMODULE_NOT_USED(argc);
    RedisModule_AutoMemory(ctx);

    /* This will be replicated *after* the two INCR statements, since
     * the Call() replication has precedence, so the actual replication
     * stream will be:
     *
     * MULTI
     * INCR foo
     * INCR bar
     * ECHO c foo
     * EXEC
     */
    RedisModule_Replicate(ctx,"ECHO","c","foo");

    /* Using the "!" modifier we replicate the command if it
     * modified the dataset in some way. */
    RedisModule_Call(ctx,"INCR","c!","foo");
    RedisModule_Call(ctx,"INCR","c!","bar");

    RedisModule_ReplyWithLongLong(ctx,0);

    return REDISMODULE_OK;
}

/* Another command to show replication. In this case, we call
 * RedisModule_ReplicateVerbatim() to mean we want just the command to be
 * propagated to slaves / AOF exactly as it was called by the user.
 *
 * This command also shows how to work with string objects.
 * It takes a list, and increments all the elements (that must have
 * a numerical value) by 1, returning the sum of all the elements
 * as reply.
 *
 * Usage: HELLO.REPL2 <list-key> */
int HelloRepl2_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (argc != 2) return RedisModule_WrongArity(ctx);

    RedisModule_AutoMemory(ctx); /* Use automatic memory management. */
    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);

    if (RedisModule_KeyType(key) != REDISMODULE_KEYTYPE_LIST)
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);

    size_t listlen = RedisModule_ValueLength(key);
    long long sum = 0;

    /* Rotate and increment. */
    while(listlen--) {
        RedisModuleString *ele = RedisModule_ListPop(key,REDISMODULE_LIST_TAIL);
        long long val;
        if (RedisModule_StringToLongLong(ele,&val) != REDISMODULE_OK) val = 0;
        val++;
        sum += val;
        RedisModuleString *newele = RedisModule_CreateStringFromLongLong(ctx,val);
        RedisModule_ListPush(key,REDISMODULE_LIST_HEAD,newele);
    }
    RedisModule_ReplyWithLongLong(ctx,sum);
    RedisModule_ReplicateVerbatim(ctx);
    return REDISMODULE_OK;
}

/* This is an example of strings DMA access. Given a key containing a string
 * it toggles the case of each character from lower to upper case or the
 * other way around.
 *
 * No automatic memory management is used in this example (for the sake
 * of variety).
 *
 * HELLO.TOGGLE.CASE key */
int HelloToggleCase_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (argc != 2) return RedisModule_WrongArity(ctx);

    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);

    int keytype = RedisModule_KeyType(key);
    if (keytype != REDISMODULE_KEYTYPE_STRING &&
        keytype != REDISMODULE_KEYTYPE_EMPTY)
    {
        RedisModule_CloseKey(key);
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    if (keytype == REDISMODULE_KEYTYPE_STRING) {
        size_t len, j;
        char *s = RedisModule_StringDMA(key,&len,REDISMODULE_WRITE);
        for (j = 0; j < len; j++) {
            if (isupper(s[j])) {
                s[j] = tolower(s[j]);
            } else {
                s[j] = toupper(s[j]);
            }
        }
    }

    RedisModule_CloseKey(key);
    RedisModule_ReplyWithSimpleString(ctx,"OK");
    RedisModule_ReplicateVerbatim(ctx);
    return REDISMODULE_OK;
}

/* HELLO.MORE.EXPIRE key milliseconds.
 *
 * If they key has already an associated TTL, extends it by "milliseconds"
 * milliseconds. Otherwise no operation is performed. */
int HelloMoreExpire_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    RedisModule_AutoMemory(ctx); /* Use automatic memory management. */
    if (argc != 3) return RedisModule_WrongArity(ctx);

    mstime_t addms, expire;

    if (RedisModule_StringToLongLong(argv[2],&addms) != REDISMODULE_OK)
        return RedisModule_ReplyWithError(ctx,"ERR invalid expire time");

    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    expire = RedisModule_GetExpire(key);
    if (expire != REDISMODULE_NO_EXPIRE) {
        expire += addms;
        RedisModule_SetExpire(key,expire);
    }
    return RedisModule_ReplyWithSimpleString(ctx,"OK");
}

/* HELLO.ZSUMRANGE key startscore endscore
 * Return the sum of all the scores elements between startscore and endscore.
 *
 * The computation is performed two times, one time from start to end and
 * another time backward. The two scores, returned as a two element array,
 * should match.*/
int HelloZsumRange_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    double score_start, score_end;
    if (argc != 4) return RedisModule_WrongArity(ctx);

    if (RedisModule_StringToDouble(argv[2],&score_start) != REDISMODULE_OK ||
        RedisModule_StringToDouble(argv[3],&score_end) != REDISMODULE_OK)
    {
        return RedisModule_ReplyWithError(ctx,"ERR invalid range");
    }

    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    if (RedisModule_KeyType(key) != REDISMODULE_KEYTYPE_ZSET) {
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    double scoresum_a = 0;
    double scoresum_b = 0;

    RedisModule_ZsetFirstInScoreRange(key,score_start,score_end,0,0);
    while(!RedisModule_ZsetRangeEndReached(key)) {
        double score;
        RedisModuleString *ele = RedisModule_ZsetRangeCurrentElement(key,&score);
        RedisModule_FreeString(ctx,ele);
        scoresum_a += score;
        RedisModule_ZsetRangeNext(key);
    }
    RedisModule_ZsetRangeStop(key);

    RedisModule_ZsetLastInScoreRange(key,score_start,score_end,0,0);
    while(!RedisModule_ZsetRangeEndReached(key)) {
        double score;
        RedisModuleString *ele = RedisModule_ZsetRangeCurrentElement(key,&score);
        RedisModule_FreeString(ctx,ele);
        scoresum_b += score;
        RedisModule_ZsetRangePrev(key);
    }

    RedisModule_ZsetRangeStop(key);

    RedisModule_CloseKey(key);

    RedisModule_ReplyWithArray(ctx,2);
    RedisModule_ReplyWithDouble(ctx,scoresum_a);
    RedisModule_ReplyWithDouble(ctx,scoresum_b);
    return REDISMODULE_OK;
}

/* HELLO.LEXRANGE key min_lex max_lex min_age max_age
 * This command expects a sorted set stored at key in the following form:
 * - All the elements have score 0.
 * - Elements are pairs of "<name>:<age>", for example "Anna:52".
 * The command will return all the sorted set items that are lexicographically
 * between the specified range (using the same format as ZRANGEBYLEX)
 * and having an age between min_age and max_age. */
int HelloLexRange_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    RedisModule_AutoMemory(ctx); /* Use automatic memory management. */

    if (argc != 6) return RedisModule_WrongArity(ctx);

    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    if (RedisModule_KeyType(key) != REDISMODULE_KEYTYPE_ZSET) {
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    if (RedisModule_ZsetFirstInLexRange(key,argv[2],argv[3]) != REDISMODULE_OK) {
        return RedisModule_ReplyWithError(ctx,"invalid range");
    }

    int arraylen = 0;
    RedisModule_ReplyWithArray(ctx,REDISMODULE_POSTPONED_ARRAY_LEN);
    while(!RedisModule_ZsetRangeEndReached(key)) {
        double score;
        RedisModuleString *ele = RedisModule_ZsetRangeCurrentElement(key,&score);
        RedisModule_ReplyWithString(ctx,ele);
        RedisModule_FreeString(ctx,ele);
        RedisModule_ZsetRangeNext(key);
        arraylen++;
    }
    RedisModule_ZsetRangeStop(key);
    RedisModule_ReplySetArrayLength(ctx,arraylen);
    RedisModule_CloseKey(key);
    return REDISMODULE_OK;
}

/* HELLO.HCOPY key srcfield dstfield
 * This is just an example command that sets the hash field dstfield to the
 * same value of srcfield. If srcfield does not exist no operation is
 * performed.
 *
 * The command returns 1 if the copy is performed (srcfield exists) otherwise
 * 0 is returned. */
int HelloHCopy_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    RedisModule_AutoMemory(ctx); /* Use automatic memory management. */

    if (argc != 4) return RedisModule_WrongArity(ctx);
    RedisModuleKey *key = RedisModule_OpenKey(ctx,argv[1],
        REDISMODULE_READ|REDISMODULE_WRITE);
    int type = RedisModule_KeyType(key);
    if (type != REDISMODULE_KEYTYPE_HASH &&
        type != REDISMODULE_KEYTYPE_EMPTY)
    {
        return RedisModule_ReplyWithError(ctx,REDISMODULE_ERRORMSG_WRONGTYPE);
    }

    /* Get the old field value. */
    RedisModuleString *oldval;
    RedisModule_HashGet(key,REDISMODULE_HASH_NONE,argv[2],&oldval,NULL);
    if (oldval) {
        RedisModule_HashSet(key,REDISMODULE_HASH_NONE,argv[3],oldval,NULL);
    }
    RedisModule_ReplyWithLongLong(ctx,oldval != NULL);
    return REDISMODULE_OK;
}

/* HELLO.LEFTPAD str len ch
 * This is an implementation of the infamous LEFTPAD function, that
 * was at the center of an issue with the npm modules system in March 2016.
 *
 * LEFTPAD is a good example of using a Redis Modules API called
 * "pool allocator", that was a famous way to allocate memory in yet another
 * open source project, the Apache web server.
 *
 * The concept is very simple: there is memory that is useful to allocate
 * only in the context of serving a request, and must be freed anyway when
 * the callback implementing the command returns. So in that case the module
 * does not need to retain a reference to these allocations, it is just
 * required to free the memory before returning. When this is the case the
 * module can call RedisModule_PoolAlloc() instead, that works like malloc()
 * but will automatically free the memory when the module callback returns.
 *
 * Note that PoolAlloc() does not necessarily require AutoMemory to be
 * active. */
int HelloLeftPad_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    RedisModule_AutoMemory(ctx); /* Use automatic memory management. */
    long long padlen;

    if (argc != 4) return RedisModule_WrongArity(ctx);

    if ((RedisModule_StringToLongLong(argv[2],&padlen) != REDISMODULE_OK) ||
        (padlen< 0)) {
        return RedisModule_ReplyWithError(ctx,"ERR invalid padding length");
    }
    size_t strlen, chlen;
    const char *str = RedisModule_StringPtrLen(argv[1], &strlen);
    const char *ch = RedisModule_StringPtrLen(argv[3], &chlen);

    /* If the string is already larger than the target len, just return
     * the string itself. */
    if (strlen >= (size_t)padlen)
        return RedisModule_ReplyWithString(ctx,argv[1]);

    /* Padding must be a single character in this simple implementation. */
    if (chlen != 1)
        return RedisModule_ReplyWithError(ctx,
            "ERR padding must be a single char");

    /* Here we use our pool allocator, for our throw-away allocation. */
    padlen -= strlen;
    char *buf = RedisModule_PoolAlloc(ctx,padlen+strlen);
    for (long long j = 0; j < padlen; j++) buf[j] = *ch;
    memcpy(buf+padlen,str,strlen);

    RedisModule_ReplyWithStringBuffer(ctx,buf,padlen+strlen);
    return REDISMODULE_OK;
}

/* This function must be present on each Redis module. It is used in order to
 * register the commands into the Redis server. */
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
    if (RedisModule_Init(ctx,"helloworld",1,REDISMODULE_APIVER_1)
        == REDISMODULE_ERR) return REDISMODULE_ERR;

    /* Log the list of parameters passing loading the module. */
    for (int j = 0; j < argc; j++) {
        const char *s = RedisModule_StringPtrLen(argv[j],NULL);
        printf("Module loaded with ARGV[%d] = %s\n", j, s);
    }

    if (RedisModule_CreateCommand(ctx,"hello.simple",
        HelloSimple_RedisCommand,"readonly",0,0,0) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.push.native",
        HelloPushNative_RedisCommand,"write deny-oom",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.push.call",
        HelloPushCall_RedisCommand,"write deny-oom",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.push.call2",
        HelloPushCall2_RedisCommand,"write deny-oom",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.list.sum.len",
        HelloListSumLen_RedisCommand,"readonly",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.list.splice",
        HelloListSplice_RedisCommand,"write deny-oom",1,2,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.list.splice.auto",
        HelloListSpliceAuto_RedisCommand,
        "write deny-oom",1,2,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.rand.array",
        HelloRandArray_RedisCommand,"readonly",0,0,0) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.repl1",
        HelloRepl1_RedisCommand,"write",0,0,0) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.repl2",
        HelloRepl2_RedisCommand,"write",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.toggle.case",
        HelloToggleCase_RedisCommand,"write",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.more.expire",
        HelloMoreExpire_RedisCommand,"write",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.zsumrange",
        HelloZsumRange_RedisCommand,"readonly",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.lexrange",
        HelloLexRange_RedisCommand,"readonly",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.hcopy",
        HelloHCopy_RedisCommand,"write deny-oom",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    if (RedisModule_CreateCommand(ctx,"hello.leftpad",
        HelloLeftPad_RedisCommand,"",1,1,1) == REDISMODULE_ERR)
        return REDISMODULE_ERR;

    return REDISMODULE_OK;
}

{'repo_name': 'chenyahui/AnnotatedCode', 'stars': '317', 'repo_language': 'C', 'file_name': 'BoundedBlockingQueue_test.cc', 'mime_type': 'text/x-c++', 'hash': -3987201554966416224, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<debug-info version="2">
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123140:jetbrains.mps.baseLanguage.structure.ConstructorDeclaration" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123155:jetbrains.mps.baseLanguage.structure.ExpressionStatement" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068390468200:jetbrains.mps.baseLanguage.structure.FieldDeclaration" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123165:jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068581242864:jetbrains.mps.baseLanguage.structure.LocalVariableDeclarationStatement" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1068581242878:jetbrains.mps.baseLanguage.structure.ReturnStatement" />
  <concept fqn="c:f3061a53-9226-4cc5-a443-f952ceaf5816/1081236700938:jetbrains.mps.baseLanguage.structure.StaticMethodDeclaration" />
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/1751004816843423273">
    <file name="fixpoint.java">
      <node id="1751004816843423273" at="12,42,13,33" concept="1" />
      <node id="1751004816843423273" at="15,31,16,46" concept="5" />
      <node id="1751004816843424603" at="19,0,20,0" concept="2" trace="myOuterVars" />
      <node id="1751004816843424603" at="20,43,21,47" concept="1" />
      <node id="1751004816843424603" at="23,57,24,47" concept="1" />
      <node id="1751004816843424603" at="24,47,25,36" concept="1" />
      <node id="1751004816843424603" at="27,26,28,16" concept="4" />
      <node id="1751004816843424603" at="28,16,29,16" concept="4" />
      <node id="1751004816843424605" at="29,16,30,46" concept="4" />
      <node id="1751004816843424603" at="30,46,31,85" concept="5" />
      <node id="1751004816843424603" at="33,33,34,15" concept="5" />
      <node id="1751004816843424603" at="36,28,37,59" concept="5" />
      <node id="1751004816843561803" at="40,0,41,0" concept="2" trace="myOuterVars" />
      <node id="1751004816843561803" at="41,55,42,49" concept="1" />
      <node id="1751004816843424605" at="42,49,43,27" concept="1" />
      <node id="1751004816843561803" at="45,59,46,49" concept="1" />
      <node id="1751004816843561803" at="46,49,47,38" concept="1" />
      <node id="1751004816843561803" at="49,28,50,18" concept="4" />
      <node id="1751004816843561803" at="50,18,51,18" concept="4" />
      <node id="1751004816843424605" at="51,18,52,53" concept="4" />
      <node id="1751004816843561804" at="52,53,53,48" concept="4" />
      <node id="1751004816843561803" at="53,48,54,79" concept="5" />
      <node id="1751004816843561803" at="56,35,57,17" concept="5" />
      <node id="1751004816843561803" at="59,30,60,61" concept="5" />
      <node id="1751004816843561372" at="63,82,64,77" concept="5" />
      <node id="1751004816843423273" at="10,0,12,0" concept="0" trace="fixpoint#()V" />
      <node id="1751004816843423273" at="12,0,15,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="1751004816843423273" at="15,0,18,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="1751004816843424603" at="20,0,23,0" concept="0" trace="Function_1751004816843424603#()V" />
      <node id="1751004816843424603" at="33,0,36,0" concept="3" trace="getParamsCount#()I" />
      <node id="1751004816843424603" at="36,0,39,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="1751004816843561803" at="56,0,59,0" concept="3" trace="getParamsCount#()I" />
      <node id="1751004816843561803" at="59,0,62,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="1751004816843561372" at="63,0,66,0" concept="6" trace="lambdaAbstr_1751004816843424696#(Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;)Ljava/lang/Object;" />
      <node id="1751004816843424603" at="23,0,27,0" concept="0" trace="Function_1751004816843424603#(Ljava/util/List;)V" />
      <node id="1751004816843561803" at="41,0,45,0" concept="0" trace="Function_1751004816843561803#(Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;)V" />
      <node id="1751004816843561803" at="45,0,49,0" concept="0" trace="Function_1751004816843561803#(Ljava/util/List;)V" />
      <node id="1751004816843424603" at="27,0,33,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <node id="1751004816843561803" at="49,0,56,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <scope id="1751004816843423273" at="10,21,10,21" />
      <scope id="1751004816843423273" at="12,42,13,33" />
      <scope id="1751004816843423273" at="15,31,16,46" />
      <scope id="1751004816843424603" at="20,43,21,47" />
      <scope id="1751004816843424603" at="33,33,34,15" />
      <scope id="1751004816843424603" at="36,28,37,59" />
      <scope id="1751004816843561803" at="56,35,57,17" />
      <scope id="1751004816843561803" at="59,30,60,61" />
      <scope id="1751004816843561372" at="63,82,64,77" />
      <scope id="1751004816843423273" at="10,0,12,0" />
      <scope id="1751004816843424603" at="23,57,25,36" />
      <scope id="1751004816843561803" at="41,55,43,27" />
      <scope id="1751004816843561803" at="45,59,47,38" />
      <scope id="1751004816843423273" at="12,0,15,0">
        <var name="args" id="1751004816843423273" />
      </scope>
      <scope id="1751004816843423273" at="15,0,18,0" />
      <scope id="1751004816843424603" at="20,0,23,0" />
      <scope id="1751004816843424603" at="33,0,36,0" />
      <scope id="1751004816843424603" at="36,0,39,0" />
      <scope id="1751004816843561803" at="56,0,59,0" />
      <scope id="1751004816843561803" at="59,0,62,0" />
      <scope id="1751004816843561372" at="63,0,66,0">
        <var name="f" id="1751004816843424605" />
        <var name="x" id="1751004816843424698" />
      </scope>
      <scope id="1751004816843424603" at="23,0,27,0">
        <var name="outerVars" id="1751004816843424603" />
      </scope>
      <scope id="1751004816843424603" at="27,26,31,85">
        <var name="f" id="1751004816843424605" />
        <var name="i" id="1751004816843424603" />
        <var name="j" id="1751004816843424603" />
      </scope>
      <scope id="1751004816843561803" at="41,0,45,0">
        <var name="f" id="1751004816843424605" />
      </scope>
      <scope id="1751004816843561803" at="45,0,49,0">
        <var name="outerVars" id="1751004816843561803" />
      </scope>
      <scope id="1751004816843561803" at="49,28,54,79">
        <var name="f" id="1751004816843424605" />
        <var name="i" id="1751004816843561803" />
        <var name="j" id="1751004816843561803" />
        <var name="x" id="1751004816843561804" />
      </scope>
      <scope id="1751004816843424603" at="27,0,33,0" />
      <scope id="1751004816843561803" at="49,0,56,0" />
      <unit id="1751004816843561803" at="39,0,63,0" name="sandboxModel.fixpoint$Function_1751004816843424603$Function_1751004816843561803" />
      <unit id="1751004816843424603" at="18,0,67,0" name="sandboxModel.fixpoint$Function_1751004816843424603" />
      <unit id="1751004816843423273" at="9,0,68,0" name="sandboxModel.fixpoint" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/1751004816843565387">
    <file name="minimalTypeTest.java">
      <node id="1751004816843565387" at="12,42,13,33" concept="1" />
      <node id="1751004816843565387" at="15,31,16,46" concept="5" />
      <node id="1751004816843568058" at="19,0,20,0" concept="2" trace="myOuterVars" />
      <node id="1751004816843568058" at="20,43,21,47" concept="1" />
      <node id="1751004816843568058" at="23,57,24,47" concept="1" />
      <node id="1751004816843568058" at="24,47,25,36" concept="1" />
      <node id="1751004816843568058" at="27,26,28,16" concept="4" />
      <node id="1751004816843568058" at="28,16,29,16" concept="4" />
      <node id="1751004816843568060" at="29,16,30,46" concept="4" />
      <node id="1751004816843568058" at="30,46,31,46" concept="5" />
      <node id="1751004816843568058" at="33,33,34,15" concept="5" />
      <node id="1751004816843568058" at="36,28,37,59" concept="5" />
      <node id="1751004816843565387" at="10,0,12,0" concept="0" trace="minimalTypeTest#()V" />
      <node id="1751004816843565387" at="12,0,15,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="1751004816843565387" at="15,0,18,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="1751004816843568058" at="20,0,23,0" concept="0" trace="Function_1751004816843568058#()V" />
      <node id="1751004816843568058" at="33,0,36,0" concept="3" trace="getParamsCount#()I" />
      <node id="1751004816843568058" at="36,0,39,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="1751004816843568058" at="23,0,27,0" concept="0" trace="Function_1751004816843568058#(Ljava/util/List;)V" />
      <node id="1751004816843568058" at="27,0,33,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <scope id="1751004816843565387" at="10,28,10,28" />
      <scope id="1751004816843565387" at="12,42,13,33" />
      <scope id="1751004816843565387" at="15,31,16,46" />
      <scope id="1751004816843568058" at="20,43,21,47" />
      <scope id="1751004816843568058" at="33,33,34,15" />
      <scope id="1751004816843568058" at="36,28,37,59" />
      <scope id="1751004816843565387" at="10,0,12,0" />
      <scope id="1751004816843568058" at="23,57,25,36" />
      <scope id="1751004816843565387" at="12,0,15,0">
        <var name="args" id="1751004816843565387" />
      </scope>
      <scope id="1751004816843565387" at="15,0,18,0" />
      <scope id="1751004816843568058" at="20,0,23,0" />
      <scope id="1751004816843568058" at="33,0,36,0" />
      <scope id="1751004816843568058" at="36,0,39,0" />
      <scope id="1751004816843568058" at="23,0,27,0">
        <var name="outerVars" id="1751004816843568058" />
      </scope>
      <scope id="1751004816843568058" at="27,26,31,46">
        <var name="i" id="1751004816843568058" />
        <var name="j" id="1751004816843568058" />
        <var name="x" id="1751004816843568060" />
      </scope>
      <scope id="1751004816843568058" at="27,0,33,0" />
      <unit id="1751004816843568058" at="18,0,40,0" name="sandboxModel.minimalTypeTest$Function_1751004816843568058" />
      <unit id="1751004816843565387" at="9,0,41,0" name="sandboxModel.minimalTypeTest" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/1751004816843669401">
    <file name="biggerTypeTest1.java">
      <node id="1751004816843669401" at="12,42,13,33" concept="1" />
      <node id="1751004816843669401" at="15,31,16,46" concept="5" />
      <node id="1751004816843669402" at="19,0,20,0" concept="2" trace="myOuterVars" />
      <node id="1751004816843669402" at="20,43,21,80" concept="1" />
      <node id="1751004816843669402" at="23,57,24,80" concept="1" />
      <node id="1751004816843669402" at="24,80,25,36" concept="1" />
      <node id="1751004816843669402" at="27,26,28,16" concept="4" />
      <node id="1751004816843669402" at="28,16,29,16" concept="4" />
      <node id="1751004816843669403" at="29,16,30,46" concept="4" />
      <node id="1751004816843897735" at="30,46,31,46" concept="4" />
      <node id="1751004816843669402" at="31,46,32,77" concept="5" />
      <node id="1751004816843669402" at="34,33,35,15" concept="5" />
      <node id="1751004816843669402" at="37,28,38,59" concept="5" />
      <node id="1751004816843669401" at="10,0,12,0" concept="0" trace="biggerTypeTest1#()V" />
      <node id="1751004816843669401" at="12,0,15,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="1751004816843669401" at="15,0,18,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="1751004816843669402" at="20,0,23,0" concept="0" trace="Function_1751004816843669402#()V" />
      <node id="1751004816843669402" at="34,0,37,0" concept="3" trace="getParamsCount#()I" />
      <node id="1751004816843669402" at="37,0,40,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="1751004816843669402" at="23,0,27,0" concept="0" trace="Function_1751004816843669402#(Ljava/util/List;)V" />
      <node id="1751004816843669402" at="27,0,34,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <scope id="1751004816843669401" at="10,28,10,28" />
      <scope id="1751004816843669401" at="12,42,13,33" />
      <scope id="1751004816843669401" at="15,31,16,46" />
      <scope id="1751004816843669402" at="20,43,21,80" />
      <scope id="1751004816843669402" at="34,33,35,15" />
      <scope id="1751004816843669402" at="37,28,38,59" />
      <scope id="1751004816843669401" at="10,0,12,0" />
      <scope id="1751004816843669402" at="23,57,25,36" />
      <scope id="1751004816843669401" at="12,0,15,0">
        <var name="args" id="1751004816843669401" />
      </scope>
      <scope id="1751004816843669401" at="15,0,18,0" />
      <scope id="1751004816843669402" at="20,0,23,0" />
      <scope id="1751004816843669402" at="34,0,37,0" />
      <scope id="1751004816843669402" at="37,0,40,0" />
      <scope id="1751004816843669402" at="23,0,27,0">
        <var name="outerVars" id="1751004816843669402" />
      </scope>
      <scope id="1751004816843669402" at="27,26,32,77">
        <var name="i" id="1751004816843669402" />
        <var name="j" id="1751004816843669402" />
        <var name="x" id="1751004816843669403" />
        <var name="y" id="1751004816843897735" />
      </scope>
      <scope id="1751004816843669402" at="27,0,34,0" />
      <unit id="1751004816843669402" at="18,0,41,0" name="sandboxModel.biggerTypeTest1$Function_1751004816843669402" />
      <unit id="1751004816843669401" at="9,0,42,0" name="sandboxModel.biggerTypeTest1" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/1751004816844298779">
    <file name="biggerTypeTest2.java">
      <node id="1751004816844298779" at="12,42,13,33" concept="1" />
      <node id="1751004816844298779" at="15,31,16,46" concept="5" />
      <node id="1751004816844298780" at="19,0,20,0" concept="2" trace="myOuterVars" />
      <node id="1751004816844298780" at="20,43,21,80" concept="1" />
      <node id="1751004816844298780" at="23,57,24,80" concept="1" />
      <node id="1751004816844298780" at="24,80,25,36" concept="1" />
      <node id="1751004816844298780" at="27,26,28,16" concept="4" />
      <node id="1751004816844298780" at="28,16,29,16" concept="4" />
      <node id="1751004816844298781" at="29,16,30,46" concept="4" />
      <node id="1751004816844299683" at="30,46,31,46" concept="4" />
      <node id="1751004816844298780" at="31,46,32,77" concept="5" />
      <node id="1751004816844298780" at="34,33,35,15" concept="5" />
      <node id="1751004816844298780" at="37,28,38,59" concept="5" />
      <node id="1751004816844298779" at="10,0,12,0" concept="0" trace="biggerTypeTest2#()V" />
      <node id="1751004816844298779" at="12,0,15,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="1751004816844298779" at="15,0,18,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="1751004816844298780" at="20,0,23,0" concept="0" trace="Function_1751004816844298780#()V" />
      <node id="1751004816844298780" at="34,0,37,0" concept="3" trace="getParamsCount#()I" />
      <node id="1751004816844298780" at="37,0,40,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="1751004816844298780" at="23,0,27,0" concept="0" trace="Function_1751004816844298780#(Ljava/util/List;)V" />
      <node id="1751004816844298780" at="27,0,34,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <scope id="1751004816844298779" at="10,28,10,28" />
      <scope id="1751004816844298779" at="12,42,13,33" />
      <scope id="1751004816844298779" at="15,31,16,46" />
      <scope id="1751004816844298780" at="20,43,21,80" />
      <scope id="1751004816844298780" at="34,33,35,15" />
      <scope id="1751004816844298780" at="37,28,38,59" />
      <scope id="1751004816844298779" at="10,0,12,0" />
      <scope id="1751004816844298780" at="23,57,25,36" />
      <scope id="1751004816844298779" at="12,0,15,0">
        <var name="args" id="1751004816844298779" />
      </scope>
      <scope id="1751004816844298779" at="15,0,18,0" />
      <scope id="1751004816844298780" at="20,0,23,0" />
      <scope id="1751004816844298780" at="34,0,37,0" />
      <scope id="1751004816844298780" at="37,0,40,0" />
      <scope id="1751004816844298780" at="23,0,27,0">
        <var name="outerVars" id="1751004816844298780" />
      </scope>
      <scope id="1751004816844298780" at="27,26,32,77">
        <var name="i" id="1751004816844298780" />
        <var name="j" id="1751004816844298780" />
        <var name="x" id="1751004816844298781" />
        <var name="y" id="1751004816844299683" />
      </scope>
      <scope id="1751004816844298780" at="27,0,34,0" />
      <unit id="1751004816844298780" at="18,0,41,0" name="sandboxModel.biggerTypeTest2$Function_1751004816844298780" />
      <unit id="1751004816844298779" at="9,0,42,0" name="sandboxModel.biggerTypeTest2" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/2167053794906818090">
    <file name="sim.java">
      <node id="2167053794906818090" at="12,42,13,33" concept="1" />
      <node id="2167053794906818090" at="15,31,16,81" concept="5" />
      <node id="2167053794906818092" at="19,0,20,0" concept="2" trace="myOuterVars" />
      <node id="2167053794906818092" at="20,43,21,34" concept="1" />
      <node id="2167053794906818092" at="23,57,24,34" concept="1" />
      <node id="2167053794906818092" at="24,34,25,36" concept="1" />
      <node id="2167053794906818092" at="27,26,28,16" concept="4" />
      <node id="2167053794906818092" at="28,16,29,16" concept="4" />
      <node id="2167053794906818093" at="29,16,30,44" concept="4" />
      <node id="2167053794906818092" at="30,44,31,19" concept="5" />
      <node id="2167053794906818092" at="33,33,34,15" concept="5" />
      <node id="2167053794906818092" at="36,28,37,59" concept="5" />
      <node id="2167053794906818091" at="40,61,41,95" concept="5" />
      <node id="2167053794906818090" at="10,0,12,0" concept="0" trace="sim#()V" />
      <node id="2167053794906818090" at="12,0,15,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="2167053794906818090" at="15,0,18,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="2167053794906818092" at="20,0,23,0" concept="0" trace="Function_2167053794906818092#()V" />
      <node id="2167053794906818092" at="33,0,36,0" concept="3" trace="getParamsCount#()I" />
      <node id="2167053794906818092" at="36,0,39,0" concept="3" trace="copy#()Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;" />
      <node id="2167053794906818091" at="40,0,43,0" concept="6" trace="let_2167053794906818091#(Ljetbrains/mps/samples/lambdaCalculus/runtime/Function;)Ljava/lang/Object;" />
      <node id="2167053794906818092" at="23,0,27,0" concept="0" trace="Function_2167053794906818092#(Ljava/util/List;)V" />
      <node id="2167053794906818092" at="27,0,33,0" concept="3" trace="eval#()Ljava/lang/Object;" />
      <scope id="2167053794906818090" at="10,16,10,16" />
      <scope id="2167053794906818090" at="12,42,13,33" />
      <scope id="2167053794906818090" at="15,31,16,81" />
      <scope id="2167053794906818092" at="20,43,21,34" />
      <scope id="2167053794906818092" at="33,33,34,15" />
      <scope id="2167053794906818092" at="36,28,37,59" />
      <scope id="2167053794906818091" at="40,61,41,95" />
      <scope id="2167053794906818090" at="10,0,12,0" />
      <scope id="2167053794906818092" at="23,57,25,36" />
      <scope id="2167053794906818090" at="12,0,15,0">
        <var name="args" id="2167053794906818090" />
      </scope>
      <scope id="2167053794906818090" at="15,0,18,0" />
      <scope id="2167053794906818092" at="20,0,23,0" />
      <scope id="2167053794906818092" at="33,0,36,0" />
      <scope id="2167053794906818092" at="36,0,39,0" />
      <scope id="2167053794906818091" at="40,0,43,0">
        <var name="sq" id="2167053794906818091" />
      </scope>
      <scope id="2167053794906818092" at="23,0,27,0">
        <var name="outerVars" id="2167053794906818092" />
      </scope>
      <scope id="2167053794906818092" at="27,26,31,19">
        <var name="i" id="2167053794906818092" />
        <var name="j" id="2167053794906818092" />
        <var name="x" id="2167053794906818093" />
      </scope>
      <scope id="2167053794906818092" at="27,0,33,0" />
      <unit id="2167053794906818092" at="18,0,40,0" name="sandboxModel.sim$Function_2167053794906818092" />
      <unit id="2167053794906818090" at="9,0,44,0" name="sandboxModel.sim" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/5277476162361142416">
    <file name="test2.java">
      <node id="5277476162361142416" at="9,42,10,33" concept="1" />
      <node id="5277476162361142416" at="12,31,13,46" concept="5" />
      <node id="5277476162361142445" at="15,68,16,13" concept="5" />
      <node id="5277476162361142416" at="7,0,9,0" concept="0" trace="test2#()V" />
      <node id="5277476162361142416" at="9,0,12,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="5277476162361142416" at="12,0,15,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="5277476162361142445" at="15,0,18,0" concept="6" trace="lambdaAbstr_5277476162361142418#(Ljava/lang/Integer;)Ljava/lang/Integer;" />
      <scope id="5277476162361142416" at="7,18,7,18" />
      <scope id="5277476162361142416" at="9,42,10,33" />
      <scope id="5277476162361142416" at="12,31,13,46" />
      <scope id="5277476162361142445" at="15,68,16,13" />
      <scope id="5277476162361142416" at="7,0,9,0" />
      <scope id="5277476162361142416" at="9,0,12,0">
        <var name="args" id="5277476162361142416" />
      </scope>
      <scope id="5277476162361142416" at="12,0,15,0" />
      <scope id="5277476162361142445" at="15,0,18,0">
        <var name="x" id="5277476162361142419" />
      </scope>
      <unit id="5277476162361142416" at="6,0,19,0" name="sandboxModel.test2" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/816130369292750457">
    <file name="sumsq.java">
      <node id="816130369292750457" at="9,42,10,33" concept="1" />
      <node id="816130369292750457" at="12,31,13,48" concept="5" />
      <node id="816130369292750664" at="15,78,16,57" concept="5" />
      <node id="816130369292750468" at="18,82,19,62" concept="5" />
      <node id="816130369292750496" at="21,96,22,58" concept="5" />
      <node id="816130369292750539" at="24,94,25,28" concept="5" />
      <node id="816130369292750457" at="7,0,9,0" concept="0" trace="sumsq#()V" />
      <node id="816130369292750457" at="9,0,12,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="816130369292750457" at="12,0,15,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="816130369292750664" at="15,0,18,0" concept="6" trace="lambdaAbstr_816130369292750642#(Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Integer;" />
      <node id="816130369292750468" at="18,0,21,0" concept="6" trace="let_816130369292750468#(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Object;" />
      <node id="816130369292750496" at="21,0,24,0" concept="6" trace="let_816130369292750496#(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Object;" />
      <node id="816130369292750539" at="24,0,27,0" concept="6" trace="lambdaAbstr_816130369292750515#(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Integer;" />
      <scope id="816130369292750457" at="7,18,7,18" />
      <scope id="816130369292750457" at="9,42,10,33" />
      <scope id="816130369292750457" at="12,31,13,48" />
      <scope id="816130369292750664" at="15,78,16,57" />
      <scope id="816130369292750468" at="18,82,19,62" />
      <scope id="816130369292750496" at="21,96,22,58" />
      <scope id="816130369292750539" at="24,94,25,28" />
      <scope id="816130369292750457" at="7,0,9,0" />
      <scope id="816130369292750457" at="9,0,12,0">
        <var name="args" id="816130369292750457" />
      </scope>
      <scope id="816130369292750457" at="12,0,15,0" />
      <scope id="816130369292750664" at="15,0,18,0">
        <var name="x" id="816130369292750460" />
        <var name="y" id="816130369292750464" />
      </scope>
      <scope id="816130369292750468" at="18,0,21,0">
        <var name="sum" id="816130369292750468" />
        <var name="x" id="816130369292750460" />
        <var name="y" id="816130369292750464" />
      </scope>
      <scope id="816130369292750496" at="21,0,24,0">
        <var name="mult" id="816130369292750496" />
        <var name="sum" id="816130369292750478" />
        <var name="x" id="816130369292750460" />
        <var name="y" id="816130369292750464" />
      </scope>
      <scope id="816130369292750539" at="24,0,27,0">
        <var name="mult" id="816130369292750499" />
        <var name="sum" id="816130369292750478" />
        <var name="z" id="816130369292750516" />
      </scope>
      <unit id="816130369292750457" at="6,0,28,0" name="sandboxModel.sumsq" />
    </file>
  </root>
  <root nodeRef="r:19bf018c-b5e7-418d-8415-b23921421325(sandboxModel)/816130369292806252">
    <file name="letlet.java">
      <node id="816130369292806252" at="9,42,10,33" concept="1" />
      <node id="816130369292806252" at="12,31,13,47" concept="5" />
      <node id="816130369292806253" at="15,59,16,51" concept="5" />
      <node id="816130369292806255" at="18,71,19,19" concept="5" />
      <node id="816130369292806252" at="7,0,9,0" concept="0" trace="letlet#()V" />
      <node id="816130369292806252" at="9,0,12,0" concept="6" trace="main#([Ljava/lang/String;)V" />
      <node id="816130369292806252" at="12,0,15,0" concept="6" trace="eval#()Ljava/lang/Object;" />
      <node id="816130369292806253" at="15,0,18,0" concept="6" trace="let_816130369292806253#(Ljava/lang/Integer;)Ljava/lang/Object;" />
      <node id="816130369292806255" at="18,0,21,0" concept="6" trace="let_816130369292806255#(Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/Object;" />
      <scope id="816130369292806252" at="7,19,7,19" />
      <scope id="816130369292806252" at="9,42,10,33" />
      <scope id="816130369292806252" at="12,31,13,47" />
      <scope id="816130369292806253" at="15,59,16,51" />
      <scope id="816130369292806255" at="18,71,19,19" />
      <scope id="816130369292806252" at="7,0,9,0" />
      <scope id="816130369292806252" at="9,0,12,0">
        <var name="args" id="816130369292806252" />
      </scope>
      <scope id="816130369292806252" at="12,0,15,0" />
      <scope id="816130369292806253" at="15,0,18,0">
        <var name="q1" id="816130369292806253" />
      </scope>
      <scope id="816130369292806255" at="18,0,21,0">
        <var name="q1" id="816130369292806261" />
        <var name="q2" id="816130369292806255" />
      </scope>
      <unit id="816130369292806252" at="6,0,22,0" name="sandboxModel.letlet" />
    </file>
  </root>
</debug-info>

{'repo_name': 'JetBrains/MPS', 'stars': '1070', 'repo_language': 'Java', 'file_name': 'LanguageAspectsEP_extension.java', 'mime_type': 'text/x-java', 'hash': -2157467870124693778, 'source_dataset': 'data'}


package water

// PlatformSpecificParams defines parameters in Config that are specific to
// Windows. A zero-value of such type is valid.
type PlatformSpecificParams struct {
	// ComponentID associates with the virtual adapter that exists in Windows.
	// This is usually configured when driver for the adapter is installed. A
	// zero-value of this field, i.e., an empty string, causes the interface to
	// use the default ComponentId. The default ComponentId is set to tap0901,
	// the one used by OpenVPN.
	ComponentID string
	// InterfaceName is a friendly name of the network adapter as set in Control Panel.
	// Of course, you may have multiple tap0901 adapters on the system, in which
	// case we need a friendlier way to identify them.
	InterfaceName string
	// Network is required when creating a TUN interface. The library will call
	// net.ParseCIDR() to parse this string into LocalIP, RemoteNetaddr,
	// RemoteNetmask. The underlying driver will need those to generate ARP
	// response to Windows kernel, to emulate an TUN interface.
	// Please note that it cannot perceive the IP changes caused by DHCP, user
	// configuration to the adapter and etc,. If IP changed, please reconfigure
	// the adapter using syscall, just like openDev().
	// For detail, please refer
	// https://github.com/OpenVPN/tap-windows6/blob/master/src/device.c#L431
	// and https://github.com/songgao/water/pull/13#issuecomment-270341777
	Network string
}

func defaultPlatformSpecificParams() PlatformSpecificParams {
	return PlatformSpecificParams{
		ComponentID: "tap0901",
		Network:     "192.168.1.10/24",
	}
}

{'repo_name': 'OpenIoTHub/gateway-go', 'stars': '118', 'repo_language': 'Go', 'file_name': 'gateway-go.service', 'mime_type': 'text/plain', 'hash': 164518666387019407, 'source_dataset': 'data'}


/*
 *
 * Hardware accelerated Matrox Millennium I, II, Mystique, G100, G200, G400 and G450
 *
 * (c) 1998-2002 Petr Vandrovec <vandrove@vc.cvut.cz>
 *
 */
#ifndef __MATROXFB_H__
#define __MATROXFB_H__

/* general, but fairly heavy, debugging */
#undef MATROXFB_DEBUG

/* heavy debugging: */
/* -- logs putc[s], so every time a char is displayed, it's logged */
#undef MATROXFB_DEBUG_HEAVY

/* This one _could_ cause infinite loops */
/* It _does_ cause lots and lots of messages during idle loops */
#undef MATROXFB_DEBUG_LOOP

/* Debug register calls, too? */
#undef MATROXFB_DEBUG_REG

/* Guard accelerator accesses with spin_lock_irqsave... */
#undef MATROXFB_USE_SPINLOCKS

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/console.h>
#include <linux/selection.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/kd.h>

#include <asm/io.h>
#include <asm/unaligned.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif

#if defined(CONFIG_PPC_PMAC)
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include "../macmodes.h"
#endif

#ifdef MATROXFB_DEBUG

#define DEBUG
#define DBG(x)		printk(KERN_DEBUG "matroxfb: %s\n", (x));

#ifdef MATROXFB_DEBUG_HEAVY
#define DBG_HEAVY(x)	DBG(x)
#else /* MATROXFB_DEBUG_HEAVY */
#define DBG_HEAVY(x)	/* DBG_HEAVY */
#endif /* MATROXFB_DEBUG_HEAVY */

#ifdef MATROXFB_DEBUG_LOOP
#define DBG_LOOP(x)	DBG(x)
#else /* MATROXFB_DEBUG_LOOP */
#define DBG_LOOP(x)	/* DBG_LOOP */
#endif /* MATROXFB_DEBUG_LOOP */

#ifdef MATROXFB_DEBUG_REG
#define DBG_REG(x)	DBG(x)
#else /* MATROXFB_DEBUG_REG */
#define DBG_REG(x)	/* DBG_REG */
#endif /* MATROXFB_DEBUG_REG */

#else /* MATROXFB_DEBUG */

#define DBG(x)		/* DBG */
#define DBG_HEAVY(x)	/* DBG_HEAVY */
#define DBG_REG(x)	/* DBG_REG */
#define DBG_LOOP(x)	/* DBG_LOOP */

#endif /* MATROXFB_DEBUG */

#ifdef DEBUG
#define dprintk(X...)	printk(X)
#else
#define dprintk(X...)
#endif

#ifndef PCI_SS_VENDOR_ID_SIEMENS_NIXDORF
#define PCI_SS_VENDOR_ID_SIEMENS_NIXDORF	0x110A
#endif
#ifndef PCI_SS_VENDOR_ID_MATROX
#define PCI_SS_VENDOR_ID_MATROX		PCI_VENDOR_ID_MATROX
#endif

#ifndef PCI_SS_ID_MATROX_PRODUCTIVA_G100_AGP
#define PCI_SS_ID_MATROX_GENERIC		0xFF00
#define PCI_SS_ID_MATROX_PRODUCTIVA_G100_AGP	0xFF01
#define PCI_SS_ID_MATROX_MYSTIQUE_G200_AGP	0xFF02
#define PCI_SS_ID_MATROX_MILLENIUM_G200_AGP	0xFF03
#define PCI_SS_ID_MATROX_MARVEL_G200_AGP	0xFF04
#define PCI_SS_ID_MATROX_MGA_G100_PCI		0xFF05
#define PCI_SS_ID_MATROX_MGA_G100_AGP		0x1001
#define PCI_SS_ID_MATROX_MILLENNIUM_G400_MAX_AGP	0x2179
#define PCI_SS_ID_SIEMENS_MGA_G100_AGP		0x001E /* 30 */
#define PCI_SS_ID_SIEMENS_MGA_G200_AGP		0x0032 /* 50 */
#endif

#define MX_VISUAL_TRUECOLOR	FB_VISUAL_DIRECTCOLOR
#define MX_VISUAL_DIRECTCOLOR	FB_VISUAL_TRUECOLOR
#define MX_VISUAL_PSEUDOCOLOR	FB_VISUAL_PSEUDOCOLOR

#define CNVT_TOHW(val,width) ((((val)<<(width))+0x7FFF-(val))>>16)

/* G-series and Mystique have (almost) same DAC */
#undef NEED_DAC1064
#if defined(CONFIG_FB_MATROX_MYSTIQUE) || defined(CONFIG_FB_MATROX_G)
#define NEED_DAC1064 1
#endif

typedef struct {
	void __iomem*	vaddr;
} vaddr_t;

static inline unsigned int mga_readb(vaddr_t va, unsigned int offs) {
	return readb(va.vaddr + offs);
}

static inline void mga_writeb(vaddr_t va, unsigned int offs, u_int8_t value) {
	writeb(value, va.vaddr + offs);
}

static inline void mga_writew(vaddr_t va, unsigned int offs, u_int16_t value) {
	writew(value, va.vaddr + offs);
}

static inline u_int32_t mga_readl(vaddr_t va, unsigned int offs) {
	return readl(va.vaddr + offs);
}

static inline void mga_writel(vaddr_t va, unsigned int offs, u_int32_t value) {
	writel(value, va.vaddr + offs);
}

static inline void mga_memcpy_toio(vaddr_t va, const void* src, int len) {
#if defined(__alpha__) || defined(__i386__) || defined(__x86_64__)
	/*
	 * iowrite32_rep works for us if:
	 *  (1) Copies data as 32bit quantities, not byte after byte,
	 *  (2) Performs LE ordered stores, and
	 *  (3) It copes with unaligned source (destination is guaranteed to be page
	 *      aligned and length is guaranteed to be multiple of 4).
	 */
	iowrite32_rep(va.vaddr, src, len >> 2);
#else
        u_int32_t __iomem* addr = va.vaddr;

	if ((unsigned long)src & 3) {
		while (len >= 4) {
			fb_writel(get_unaligned((u32 *)src), addr);
			addr++;
			len -= 4;
			src += 4;
		}
	} else {
		while (len >= 4) {
			fb_writel(*(u32 *)src, addr);
			addr++;
			len -= 4;
			src += 4;
		}
	}
#endif
}

static inline void vaddr_add(vaddr_t* va, unsigned long offs) {
	va->vaddr += offs;
}

static inline void __iomem* vaddr_va(vaddr_t va) {
	return va.vaddr;
}

#define MGA_IOREMAP_NORMAL	0
#define MGA_IOREMAP_NOCACHE	1

#define MGA_IOREMAP_FB		MGA_IOREMAP_NOCACHE
#define MGA_IOREMAP_MMIO	MGA_IOREMAP_NOCACHE
static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags, vaddr_t* virt) {
	if (flags & MGA_IOREMAP_NOCACHE)
		virt->vaddr = ioremap_nocache(phys, size);
	else
		virt->vaddr = ioremap(phys, size);
	return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */
}

static inline void mga_iounmap(vaddr_t va) {
	iounmap(va.vaddr);
}

struct my_timming {
	unsigned int pixclock;
	int mnp;
	unsigned int crtc;
	unsigned int HDisplay;
	unsigned int HSyncStart;
	unsigned int HSyncEnd;
	unsigned int HTotal;
	unsigned int VDisplay;
	unsigned int VSyncStart;
	unsigned int VSyncEnd;
	unsigned int VTotal;
	unsigned int sync;
	int	     dblscan;
	int	     interlaced;
	unsigned int delay;	/* CRTC delay */
};

enum { M_SYSTEM_PLL, M_PIXEL_PLL_A, M_PIXEL_PLL_B, M_PIXEL_PLL_C, M_VIDEO_PLL };

struct matrox_pll_cache {
	unsigned int	valid;
	struct {
		unsigned int	mnp_key;
		unsigned int	mnp_value;
		      } data[4];
};

struct matrox_pll_limits {
	unsigned int	vcomin;
	unsigned int	vcomax;
};

struct matrox_pll_features {
	unsigned int	vco_freq_min;
	unsigned int	ref_freq;
	unsigned int	feed_div_min;
	unsigned int	feed_div_max;
	unsigned int	in_div_min;
	unsigned int	in_div_max;
	unsigned int	post_shift_max;
};

struct matroxfb_par
{
	unsigned int	final_bppShift;
	unsigned int	cmap_len;
	struct {
		unsigned int bytes;
		unsigned int pixels;
		unsigned int chunks;
		      } ydstorg;
};

struct matrox_fb_info;

struct matrox_DAC1064_features {
	u_int8_t	xvrefctrl;
	u_int8_t	xmiscctrl;
};

/* current hardware status */
struct mavenregs {
	u_int8_t regs[256];
	int	 mode;
	int	 vlines;
	int	 xtal;
	int	 fv;

	u_int16_t htotal;
	u_int16_t hcorr;
};

struct matrox_crtc2 {
	u_int32_t ctl;
};

struct matrox_hw_state {
	u_int32_t	MXoptionReg;
	unsigned char	DACclk[6];
	unsigned char	DACreg[80];
	unsigned char	MiscOutReg;
	unsigned char	DACpal[768];
	unsigned char	CRTC[25];
	unsigned char	CRTCEXT[9];
	unsigned char	SEQ[5];
	/* unused for MGA mode, but who knows... */
	unsigned char	GCTL[9];
	/* unused for MGA mode, but who knows... */
	unsigned char	ATTR[21];

	/* TVOut only */
	struct mavenregs	maven;

	struct matrox_crtc2	crtc2;
};

struct matrox_accel_data {
#ifdef CONFIG_FB_MATROX_MILLENIUM
	unsigned char	ramdac_rev;
#endif
	u_int32_t	m_dwg_rect;
	u_int32_t	m_opmode;
};

struct v4l2_queryctrl;
struct v4l2_control;

struct matrox_altout {
	const char	*name;
	int		(*compute)(void* altout_dev, struct my_timming* input);
	int		(*program)(void* altout_dev);
	int		(*start)(void* altout_dev);
	int		(*verifymode)(void* altout_dev, u_int32_t mode);
	int		(*getqueryctrl)(void* altout_dev,
					struct v4l2_queryctrl* ctrl);
	int		(*getctrl)(void* altout_dev,
				   struct v4l2_control* ctrl);
	int		(*setctrl)(void* altout_dev,
				   struct v4l2_control* ctrl);
};

#define MATROXFB_SRC_NONE	0
#define MATROXFB_SRC_CRTC1	1
#define MATROXFB_SRC_CRTC2	2

enum mga_chip { MGA_2064, MGA_2164, MGA_1064, MGA_1164, MGA_G100, MGA_G200, MGA_G400, MGA_G450, MGA_G550 };

struct matrox_bios {
	unsigned int	bios_valid : 1;
	unsigned int	pins_len;
	unsigned char	pins[128];
	struct {
		unsigned char vMaj, vMin, vRev;
		      } version;
	struct {
		unsigned char state, tvout;
		      } output;
};

struct matrox_switch;
struct matroxfb_driver;
struct matroxfb_dh_fb_info;

struct matrox_vsync {
	wait_queue_head_t	wait;
	unsigned int		cnt;
};

struct matrox_fb_info {
	struct fb_info		fbcon;

	struct list_head	next_fb;

	int			dead;
	int                     initialized;
	unsigned int		usecount;

	unsigned int		userusecount;
	unsigned long		irq_flags;

	struct matroxfb_par	curr;
	struct matrox_hw_state	hw;

	struct matrox_accel_data accel;

	struct pci_dev*		pcidev;

	struct {
		struct matrox_vsync	vsync;
		unsigned int	pixclock;
		int		mnp;
		int		panpos;
			      } crtc1;
	struct {
		struct matrox_vsync	vsync;
		unsigned int 	pixclock;
		int		mnp;
	struct matroxfb_dh_fb_info*	info;
	struct rw_semaphore	lock;
			      } crtc2;
	struct {
	struct rw_semaphore	lock;
	struct {
		int brightness, contrast, saturation, hue, gamma;
		int testout, deflicker;
				} tvo_params;
			      } altout;
#define MATROXFB_MAX_OUTPUTS		3
	struct {
	unsigned int		src;
	struct matrox_altout*	output;
	void*			data;
	unsigned int		mode;
	unsigned int		default_src;
			      } outputs[MATROXFB_MAX_OUTPUTS];

#define MATROXFB_MAX_FB_DRIVERS		5
	struct matroxfb_driver* (drivers[MATROXFB_MAX_FB_DRIVERS]);
	void*			(drivers_data[MATROXFB_MAX_FB_DRIVERS]);
	unsigned int		drivers_count;

	struct {
	unsigned long	base;	/* physical */
	vaddr_t		vbase;	/* CPU view */
	unsigned int	len;
	unsigned int	len_usable;
	unsigned int	len_maximum;
		      } video;

	struct {
	unsigned long	base;	/* physical */
	vaddr_t		vbase;	/* CPU view */
	unsigned int	len;
		      } mmio;

	unsigned int	max_pixel_clock;
	unsigned int	max_pixel_clock_panellink;

	struct matrox_switch*	hw_switch;

	struct {
		struct matrox_pll_features pll;
		struct matrox_DAC1064_features DAC1064;
			      } features;
	struct {
		spinlock_t	DAC;
		spinlock_t	accel;
			      } lock;

	enum mga_chip		chip;

	int			interleave;
	int			millenium;
	int			milleniumII;
	struct {
		int		cfb4;
		const int*	vxres;
		int		cross4MB;
		int		text;
		int		plnwt;
		int		srcorg;
			      } capable;
#ifdef CONFIG_MTRR
	struct {
		int		vram;
		int		vram_valid;
			      } mtrr;
#endif
	struct {
		int		precise_width;
		int		mga_24bpp_fix;
		int		novga;
		int		nobios;
		int		nopciretry;
		int		noinit;
		int		sgram;
		int		support32MB;

		int		accelerator;
		int		text_type_aux;
		int		video64bits;
		int		crtc2;
		int		maven_capable;
		unsigned int	vgastep;
		unsigned int	textmode;
		unsigned int	textstep;
		unsigned int	textvram;	/* character cells */
		unsigned int	ydstorg;	/* offset in bytes from video start to usable memory */
						/* 0 except for 6MB Millenium */
		int		memtype;
		int		g450dac;
		int		dfp_type;
		int		panellink;	/* G400 DFP possible (not G450/G550) */
		int		dualhead;
		unsigned int	fbResource;
			      } devflags;
	struct fb_ops		fbops;
	struct matrox_bios	bios;
	struct {
		struct matrox_pll_limits	pixel;
		struct matrox_pll_limits	system;
		struct matrox_pll_limits	video;
			      } limits;
	struct {
		struct matrox_pll_cache	pixel;
		struct matrox_pll_cache	system;
		struct matrox_pll_cache	video;
				      } cache;
	struct {
		struct {
			unsigned int	video;
			unsigned int	system;
				      } pll;
		struct {
			u_int32_t	opt;
			u_int32_t	opt2;
			u_int32_t	opt3;
			u_int32_t	mctlwtst;
			u_int32_t	mctlwtst_core;
			u_int32_t	memmisc;
			u_int32_t	memrdbk;
			u_int32_t	maccess;
				      } reg;
		struct {
			unsigned int	ddr:1,
			                emrswen:1,
					dll:1;
				      } memory;
			      } values;
	u_int32_t cmap[16];
};

#define info2minfo(info) container_of(info, struct matrox_fb_info, fbcon)

struct matrox_switch {
	int	(*preinit)(struct matrox_fb_info *minfo);
	void	(*reset)(struct matrox_fb_info *minfo);
	int	(*init)(struct matrox_fb_info *minfo, struct my_timming*);
	void	(*restore)(struct matrox_fb_info *minfo);
};

struct matroxfb_driver {
	struct list_head	node;
	char*			name;
	void*			(*probe)(struct matrox_fb_info* info);
	void			(*remove)(struct matrox_fb_info* info, void* data);
};

int matroxfb_register_driver(struct matroxfb_driver* drv);
void matroxfb_unregister_driver(struct matroxfb_driver* drv);

#define PCI_OPTION_REG	0x40
#define   PCI_OPTION_ENABLE_ROM		0x40000000

#define PCI_MGA_INDEX	0x44
#define PCI_MGA_DATA	0x48
#define PCI_OPTION2_REG	0x50
#define PCI_OPTION3_REG	0x54
#define PCI_MEMMISC_REG	0x58

#define M_DWGCTL	0x1C00
#define M_MACCESS	0x1C04
#define M_CTLWTST	0x1C08

#define M_PLNWT		0x1C1C

#define M_BCOL		0x1C20
#define M_FCOL		0x1C24

#define M_SGN		0x1C58
#define M_LEN		0x1C5C
#define M_AR0		0x1C60
#define M_AR1		0x1C64
#define M_AR2		0x1C68
#define M_AR3		0x1C6C
#define M_AR4		0x1C70
#define M_AR5		0x1C74
#define M_AR6		0x1C78

#define M_CXBNDRY	0x1C80
#define M_FXBNDRY	0x1C84
#define M_YDSTLEN	0x1C88
#define M_PITCH		0x1C8C
#define M_YDST		0x1C90
#define M_YDSTORG	0x1C94
#define M_YTOP		0x1C98
#define M_YBOT		0x1C9C

/* mystique only */
#define M_CACHEFLUSH	0x1FFF

#define M_EXEC		0x0100

#define M_DWG_TRAP	0x04
#define M_DWG_BITBLT	0x08
#define M_DWG_ILOAD	0x09

#define M_DWG_LINEAR	0x0080
#define M_DWG_SOLID	0x0800
#define M_DWG_ARZERO	0x1000
#define M_DWG_SGNZERO	0x2000
#define M_DWG_SHIFTZERO	0x4000

#define M_DWG_REPLACE	0x000C0000
#define M_DWG_REPLACE2	(M_DWG_REPLACE | 0x40)
#define M_DWG_XOR	0x00060010

#define M_DWG_BFCOL	0x04000000
#define M_DWG_BMONOWF	0x08000000

#define M_DWG_TRANSC	0x40000000

#define M_FIFOSTATUS	0x1E10
#define M_STATUS	0x1E14
#define M_ICLEAR	0x1E18
#define M_IEN		0x1E1C

#define M_VCOUNT	0x1E20

#define M_RESET		0x1E40
#define M_MEMRDBK	0x1E44

#define M_AGP2PLL	0x1E4C

#define M_OPMODE	0x1E54
#define     M_OPMODE_DMA_GEN_WRITE	0x00
#define     M_OPMODE_DMA_BLIT		0x04
#define     M_OPMODE_DMA_VECTOR_WRITE	0x08
#define     M_OPMODE_DMA_LE		0x0000		/* little endian - no transformation */
#define     M_OPMODE_DMA_BE_8BPP	0x0000
#define     M_OPMODE_DMA_BE_16BPP	0x0100
#define     M_OPMODE_DMA_BE_32BPP	0x0200
#define     M_OPMODE_DIR_LE		0x000000	/* little endian - no transformation */
#define     M_OPMODE_DIR_BE_8BPP	0x000000
#define     M_OPMODE_DIR_BE_16BPP	0x010000
#define     M_OPMODE_DIR_BE_32BPP	0x020000

#define M_ATTR_INDEX	0x1FC0
#define M_ATTR_DATA	0x1FC1

#define M_MISC_REG	0x1FC2
#define M_3C2_RD	0x1FC2

#define M_SEQ_INDEX	0x1FC4
#define M_SEQ_DATA	0x1FC5
#define     M_SEQ1		0x01
#define        M_SEQ1_SCROFF		0x20

#define M_MISC_REG_READ	0x1FCC

#define M_GRAPHICS_INDEX 0x1FCE
#define M_GRAPHICS_DATA	0x1FCF

#define M_CRTC_INDEX	0x1FD4

#define M_ATTR_RESET	0x1FDA
#define M_3DA_WR	0x1FDA
#define M_INSTS1	0x1FDA

#define M_EXTVGA_INDEX	0x1FDE
#define M_EXTVGA_DATA	0x1FDF

/* G200 only */
#define M_SRCORG	0x2CB4
#define M_DSTORG	0x2CB8

#define M_RAMDAC_BASE	0x3C00

/* fortunately, same on TVP3026 and MGA1064 */
#define M_DAC_REG	(M_RAMDAC_BASE+0)
#define M_DAC_VAL	(M_RAMDAC_BASE+1)
#define M_PALETTE_MASK	(M_RAMDAC_BASE+2)

#define M_X_INDEX	0x00
#define M_X_DATAREG	0x0A

#define DAC_XGENIOCTRL		0x2A
#define DAC_XGENIODATA		0x2B

#define M_C2CTL		0x3C10

#define MX_OPTION_BSWAP         0x00000000

#ifdef __LITTLE_ENDIAN
#define M_OPMODE_4BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
#define M_OPMODE_8BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
#define M_OPMODE_16BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
#define M_OPMODE_24BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
#define M_OPMODE_32BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
#else
#ifdef __BIG_ENDIAN
#define M_OPMODE_4BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE       | M_OPMODE_DMA_BLIT)	/* TODO */
#define M_OPMODE_8BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_BE_8BPP  | M_OPMODE_DMA_BLIT)
#define M_OPMODE_16BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_BE_16BPP | M_OPMODE_DMA_BLIT)
#define M_OPMODE_24BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_BE_8BPP  | M_OPMODE_DMA_BLIT)	/* TODO, ?32 */
#define M_OPMODE_32BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_BE_32BPP | M_OPMODE_DMA_BLIT)
#else
#error "Byte ordering have to be defined. Cannot continue."
#endif
#endif

#define mga_inb(addr)		mga_readb(minfo->mmio.vbase, (addr))
#define mga_inl(addr)		mga_readl(minfo->mmio.vbase, (addr))
#define mga_outb(addr,val)	mga_writeb(minfo->mmio.vbase, (addr), (val))
#define mga_outw(addr,val)	mga_writew(minfo->mmio.vbase, (addr), (val))
#define mga_outl(addr,val)	mga_writel(minfo->mmio.vbase, (addr), (val))
#define mga_readr(port,idx)	(mga_outb((port),(idx)), mga_inb((port)+1))
#define mga_setr(addr,port,val)	mga_outw(addr, ((val)<<8) | (port))

#define mga_fifo(n)	do {} while ((mga_inl(M_FIFOSTATUS) & 0xFF) < (n))

#define WaitTillIdle()	do {} while (mga_inl(M_STATUS) & 0x10000)

/* code speedup */
#ifdef CONFIG_FB_MATROX_MILLENIUM
#define isInterleave(x)	 (x->interleave)
#define isMillenium(x)	 (x->millenium)
#define isMilleniumII(x) (x->milleniumII)
#else
#define isInterleave(x)  (0)
#define isMillenium(x)	 (0)
#define isMilleniumII(x) (0)
#endif

#define matroxfb_DAC_lock()                   spin_lock(&minfo->lock.DAC)
#define matroxfb_DAC_unlock()                 spin_unlock(&minfo->lock.DAC)
#define matroxfb_DAC_lock_irqsave(flags)      spin_lock_irqsave(&minfo->lock.DAC, flags)
#define matroxfb_DAC_unlock_irqrestore(flags) spin_unlock_irqrestore(&minfo->lock.DAC, flags)
extern void matroxfb_DAC_out(const struct matrox_fb_info *minfo, int reg,
			     int val);
extern int matroxfb_DAC_in(const struct matrox_fb_info *minfo, int reg);
extern void matroxfb_var2my(struct fb_var_screeninfo* fvsi, struct my_timming* mt);
extern int matroxfb_wait_for_sync(struct matrox_fb_info *minfo, u_int32_t crtc);
extern int matroxfb_enable_irq(struct matrox_fb_info *minfo, int reenable);

#ifdef MATROXFB_USE_SPINLOCKS
#define CRITBEGIN  spin_lock_irqsave(&minfo->lock.accel, critflags);
#define CRITEND	   spin_unlock_irqrestore(&minfo->lock.accel, critflags);
#define CRITFLAGS  unsigned long critflags;
#else
#define CRITBEGIN
#define CRITEND
#define CRITFLAGS
#endif

#endif	/* __MATROXFB_H__ */

{'repo_name': 'franciscofranco/hammerhead', 'stars': '122', 'repo_language': 'C', 'file_name': 'impa7.c', 'mime_type': 'text/x-c', 'hash': 9034542611466636032, 'source_dataset': 'data'}