/* -----------------------------------------------------------------------------
 *
 * Giada - Your Hardcore Loopmachine
 *
 * -----------------------------------------------------------------------------
 *
 * Copyright (C) 2010-2020 Giovanni A. Zuliani | Monocasual
 *
 * This file is part of Giada - Your Hardcore Loopmachine.
 *
 * Giada - Your Hardcore Loopmachine is free software: you can
 * redistribute it and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * Giada - Your Hardcore Loopmachine is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Giada - Your Hardcore Loopmachine. If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * -------------------------------------------------------------------------- */

#ifndef GD_MIDI_INPUT_BASE_H
#define GD_MIDI_INPUT_BASE_H

#include "gui/dialogs/window.h"
#include "gui/elems/midiIO/midiLearner.h"

class geButton;
class geCheck;

namespace giada {
namespace v
{
class geChoice;
class gdMidiInputBase : public gdWindow
{
public:

	virtual ~gdMidiInputBase();

protected:

	gdMidiInputBase(int x, int y, int w, int h, const char* title="");

	static void cb_close(Fl_Widget* w, void* p);
	void cb_close();

	geButton* m_ok;
	geCheck*  m_enable;
	geChoice* m_channel;
};
}} // giada::v::

#endif

{'repo_name': 'monocasual/giada', 'stars': '697', 'repo_language': 'C++', 'file_name': 'before_script.sh', 'mime_type': 'text/x-shellscript', 'hash': -1805755941347067738, 'source_dataset': 'data'}


import java.util.*;

/**
 * Library for `libdoc.py` testing purposes.
 *
 * This library is only used in an example and it doesn't do anything useful.
 *
 */
public class Example {
    public static final String ROBOT_LIBRARY_VERSION = "1.0 <alpha>";
    public static final String ROBOT_LIBRARY_SCOPE = "GLOBAL";

    /**
     * Creates new Example test library 1
     */
    public Example() {
    }

    /**
     * Creates new Example test library 2
     */
    public Example(String arg) {
    }

    /**
     * Creates new Example test library 3
     */
    public Example(int i) {
    }

    /**
     * Should not be visible in library documentation
     */
    private Example(double dontShowMe) {
    }

    /**
     * Does nothing & <doc> has "stuff" to 'escape'!!
     *     We also got some
     *         indentation
     *         here.
     * Back in the normal indentation level.
     *
     * Tags: foo, bar
     */
    public void myKeyword() {
    }

    /**
     * Takes one `arg` and *does nothing* with it.
     *
     * Example:
     * | Your Keyword | xxx |
     * | Your Keyword | yyy |
     *
     * See `My Keyword` for no more information.
     */
    public void keyword(String arg) {
    }

    /**
     * Creating varargs using `type[]`.
     */
    public void varargs1(String[] varargs) {
    }

    /**
     * Creating varargs using `type...`.
     */
    public void varargs2(int normal, int... varargs) {
    }

    /**
     * Creating varargs using `List`.
     */
    public void varargsList(List<String> varargsList) {
    }

    /**
     * Only last array or list is kwargs.
     */
    public void varargsLast(String[] normalArray, String[] varargs) {
    }

    /**
     * Only last arguments overrides.
     */
    public void lastArgument(String[] normalArray, Map<String, Object> normalMap, String normal) {
    }

    /**
     * Creating kwargs.
     */
    public void kwargs(int normal, String[] varargs, Map<String, Object> kwargs) {
    }

    /**
     * Only last map is kwargs.
     */
    public void kwargsLast(Map<String, Object> normal, Map<String, Object> kwargs) {
    }

    /**
     * Hyv\u00e4\u00e4 y\u00f6t\u00e4.
     *
     * \u0421\u043f\u0430\u0441\u0438\u0431\u043e!
     */
    public void nonAsciiDoc() {
    }

    /**
     * *DEPRECATED!?!?!!*
     */
    public void deprecation() {
    }

    /**
     * Should not be visible in library documentation
     */
    private void notAKeyword(String foobar) {
    }
}

{'repo_name': 'robotframework/robotframework', 'stars': '4817', 'repo_language': 'Python', 'file_name': 'check_test_times.py', 'mime_type': 'text/x-python', 'hash': -4635051754301781493, 'source_dataset': 'data'}


Makefile: allow recursion

When crosstool-NG is used standalone, we completely avoid recursion,
because the Makefile calls itself only once.

But when used as the buildroot toolchain backend, there is already
one level of make recursion when we first call the crosstool-NG
Makefile. And when buildroot is used out-of-tree, we are already
at the second level of recursion when calling the crosstool-NG
Makefile.

So, to cope with the situation, just get rid of the recursion test.

This probably won't go upstream.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

diff -du crosstool-ng-1.12.0/Makefile.in host-crosstool-ng-1.12.0/Makefile.in
--- crosstool-ng-1.12.0/Makefile.in     2011-08-01 01:21:34.000000000 +0200
+++ host-crosstool-ng-1.12.0/Makefile.in        2011-08-07 21:39:16.055958219 +0200
@@ -101,9 +101,14 @@
 # level.
 # This has the side effect of only showing the real targets, and hiding our
 # internal ones. :-)
-ifneq ($(MAKELEVEL),0)
-$(error Recursion detected, bailing out...)
-endif
+#
+# NB: For buildroot, this has no importance:
+# - crosstool-NG should never ever be called manually
+# - thus auto-completion would never ever be attempted
+# - so we shouldn't have to detect it
+#ifneq ($(MAKELEVEL),0)
+#$(error Recursion detected, bailing out...)
+#endif

 MAKEFLAGS += $(CT_MAKEFLAGS)
 build install clean distclean uninstall:

{'repo_name': 'nezticle/RaspberryPi-BuildRoot', 'stars': '211', 'repo_language': 'C', 'file_name': 'Config.in', 'mime_type': 'text/plain', 'hash': -1849500466816081528, 'source_dataset': 'data'}


/*
 *
 * (C) COPYRIGHT 2013-2014, 2018 ARM Limited. All rights reserved.
 *
 * This program is free software and is provided to you under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation, and any use by you of this program is subject to the terms
 * of such GNU licence.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you can access it online at
 * http://www.gnu.org/licenses/gpl-2.0.html.
 *
 * SPDX-License-Identifier: GPL-2.0
 *
 */

#ifndef _KBASE_10969_WORKAROUND_
#define _KBASE_10969_WORKAROUND_

/**
 * kbasep_10969_workaround_clamp_coordinates - Apply the WA to clamp the restart indices
 * @katom: atom representing the fragment job for which the WA has to be applied
 *
 * This workaround is used to solve an HW issue with single iterator GPUs.
 * If a fragment job is soft-stopped on the edge of its bounding box, it can happen
 * that the restart index is out of bounds and the rerun causes a tile range
 * fault. If this happens we try to clamp the restart index to a correct value.
 */
int kbasep_10969_workaround_clamp_coordinates(struct kbase_jd_atom *katom);

#endif /* _KBASE_10969_WORKAROUND_ */

{'repo_name': 'rockchip-linux/kernel', 'stars': '369', 'repo_language': 'C', 'file_name': 'rtw_io.c', 'mime_type': 'text/x-c', 'hash': 2561582642833895653, 'source_dataset': 'data'}


// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you 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.

// +build !integration

package kafka

import (
	"encoding/json"
	"fmt"
	"testing"
	"time"

	"github.com/Shopify/sarama"
	"github.com/stretchr/testify/assert"

	"github.com/elastic/beats/v7/libbeat/beat"
	"github.com/elastic/beats/v7/libbeat/common"
	"github.com/elastic/beats/v7/libbeat/logp"
	"github.com/elastic/beats/v7/libbeat/publisher"
)

type partTestScenario func(*testing.T, bool, sarama.Partitioner) error

func TestPartitioners(t *testing.T) {
	type obj map[string]interface{}
	type arr []interface{}

	nonHashScenarios := []partTestScenario{
		partTestSimple(100, false),
	}

	hashScenarios := []partTestScenario{
		partTestSimple(100, true),
		partTestHashInvariant(1),
	}

	tests := []struct {
		title         string
		reachableOnly bool
		scenarios     []partTestScenario
		config        obj
	}{
		{
			"random every event, non-consistent ",
			true,
			nonHashScenarios,
			obj{"partition.random": obj{
				"reachable_only": true,
				"group_events":   1,
			}},
		},
		{
			"random every event, consistent",
			false,
			nonHashScenarios,
			obj{"partition.random": obj{
				"reachable_only": false,
				"group_events":   1,
			}},
		},
		{
			"random every 3rd event, non-consistent",
			true,
			nonHashScenarios,
			obj{"partition.random": obj{
				"reachable_only": true,
				"group_events":   3,
			}},
		},
		{
			"random every 3rd event, consistent",
			false,
			nonHashScenarios,
			obj{"partition.random": obj{
				"reachable_only": false,
				"group_events":   3,
			}},
		},
		{
			"round-robin every event, non-consistent",
			true,
			nonHashScenarios,
			obj{"partition.round_robin": obj{
				"reachable_only": true,
				"group_events":   1,
			}},
		},
		{
			"round-robin every event, consistent",
			false,
			nonHashScenarios,
			obj{"partition.round_robin": obj{
				"reachable_only": false,
				"group_events":   1,
			}},
		},
		{
			"round-robin every 3rd event, non-consistent",
			true,
			nonHashScenarios,
			obj{"partition.round_robin": obj{
				"reachable_only": true,
				"group_events":   3,
			}},
		},
		{
			"round-robin every 3rd event, consistent",
			false,
			nonHashScenarios,
			obj{"partition.round_robin": obj{
				"reachable_only": false,
				"group_events":   3,
			}},
		},
		{
			"hash without key, fallback random, non-consistent",
			true,
			nonHashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": true,
			}},
		},
		{
			"hash without key, fallback random, consistent",
			false,
			nonHashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": false,
			}},
		},
		{
			"hash with key, consistent",
			true,
			hashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": true,
			}},
		},
		{
			"hash with key, non-consistent",
			false,
			hashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": false,
			}},
		},
		{
			"hash message field, non-consistent",
			true,
			hashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": true,
				"hash":           arr{"message"},
			}},
		},
		{
			"hash message field, consistent",
			false,
			hashScenarios,
			obj{"partition.hash": obj{
				"reachable_only": false,
				"hash":           arr{"message"},
			}},
		},
	}

	for i, test := range tests {
		t.Logf("run test(%v): %v", i, test.title)

		cfg, err := common.NewConfigFrom(test.config)
		if err != nil {
			t.Error(err)
			continue
		}

		pcfg := struct {
			Partition map[string]*common.Config `config:"partition"`
		}{}
		err = cfg.Unpack(&pcfg)
		if err != nil {
			t.Error(err)
			continue
		}

		constr, err := makePartitioner(logp.L(), pcfg.Partition)
		if err != nil {
			t.Error(err)
			continue
		}

		for _, runner := range test.scenarios {
			partitioner := constr("test")
			err := runner(t, test.reachableOnly, partitioner)
			if err != nil {
				t.Error(err)
				break
			}
		}
	}
}

func partTestSimple(N int, makeKey bool) partTestScenario {
	numPartitions := int32(15)

	return func(t *testing.T, reachableOnly bool, part sarama.Partitioner) error {
		t.Logf("  simple test with %v partitions", numPartitions)

		partitions := make([]int, numPartitions)

		requiresConsistency := !reachableOnly
		assert.Equal(t, requiresConsistency, part.RequiresConsistency())

		for i := 0; i <= N; i++ {
			ts := time.Now()

			event := common.MapStr{
				"@timestamp": common.Time(ts),
				"message":    randString(20),
			}

			jsonEvent, err := json.Marshal(event)
			if err != nil {
				return fmt.Errorf("json encoding failed with %v", err)
			}

			msg := &message{partition: -1}
			msg.data = publisher.Event{Content: beat.Event{Fields: event}}
			msg.topic = "test"
			if makeKey {
				msg.key = randASCIIBytes(10)
			}
			msg.value = jsonEvent
			msg.ts = ts
			msg.initProducerMessage()

			p, err := part.Partition(&msg.msg, numPartitions)
			if err != nil {
				return err
			}

			assert.True(t, 0 <= p && p < numPartitions)
			partitions[p]++
		}

		// count number of partitions being used
		nPartitions := 0
		for _, p := range partitions {
			if p > 0 {
				nPartitions++
			}
		}
		t.Logf("    partitions used: %v/%v", nPartitions, numPartitions)
		assert.True(t, nPartitions > 3)

		return nil
	}
}

func partTestHashInvariant(N int) partTestScenario {
	numPartitions := int32(15)

	return func(t *testing.T, reachableOnly bool, part sarama.Partitioner) error {
		t.Logf("  hash invariant test with %v partitions", numPartitions)

		for i := 0; i <= N; i++ {
			ts := time.Now()

			event := common.MapStr{
				"@timestamp": common.Time(ts),
				"message":    randString(20),
			}

			jsonEvent, err := json.Marshal(event)
			if err != nil {
				return fmt.Errorf("json encoding failed with %v", err)
			}

			msg := &message{partition: -1}
			msg.data = publisher.Event{Content: beat.Event{Fields: event}}
			msg.topic = "test"
			msg.key = randASCIIBytes(10)
			msg.value = jsonEvent
			msg.ts = ts
			msg.initProducerMessage()

			p1, err := part.Partition(&msg.msg, numPartitions)
			if err != nil {
				return err
			}

			// reset message state
			msg.hash = 0
			msg.partition = -1

			p2, err := part.Partition(&msg.msg, numPartitions)
			if err != nil {
				return err
			}

			assert.True(t, 0 <= p1 && p1 < numPartitions)
			assert.True(t, 0 <= p2 && p2 < numPartitions)
			assert.Equal(t, p1, p2)
		}

		return nil
	}
}

{'repo_name': 'elastic/beats', 'stars': '9014', 'repo_language': 'Go', 'file_name': 'generate.go', 'mime_type': 'text/plain', 'hash': -204893616486799423, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 7f96e38292883d645b9d5857b32bd6c0
timeCreated: 1502920244
licenseType: Pro
ComputeShaderImporter:
  currentAPIMask: 131076
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'sonicether/SEGI', 'stars': '1030', 'repo_language': 'C#', 'file_name': 'SEGICascadedEditor.cs.meta', 'mime_type': 'text/plain', 'hash': 8216472789691051912, 'source_dataset': 'data'}


<title>Form with a textarea that goes back on submit</title>

<form id="form" method="get" action="data:text/html,">

  <textarea name="text" rows="3" cols="10" id="textarea">123</textarea>

  <input type="submit" />
  <input type="reset" />

</form>

{'repo_name': 'trevorlinton/webkit.js', 'stars': '1804', 'repo_language': 'None', 'file_name': 'ProgramBinary.cpp', 'mime_type': 'text/x-c++', 'hash': 6926742132998637293, 'source_dataset': 'data'}


<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Debug\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Debug\ExceptionHandler;
use Symfony\Component\Debug\Exception\OutOfMemoryException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;

require_once __DIR__.'/HeaderMock.php';

class ExceptionHandlerTest extends TestCase
{
    protected function setUp()
    {
        testHeader();
    }

    protected function tearDown()
    {
        testHeader();
    }

    public function testDebug()
    {
        $handler = new ExceptionHandler(false);

        ob_start();
        $handler->sendPhpResponse(new \RuntimeException('Foo'));
        $response = ob_get_clean();

        $this->assertContains('Whoops, looks like something went wrong.', $response);
        $this->assertNotContains('
', $response);

        $handler = new ExceptionHandler(true);

        ob_start();
        $handler->sendPhpResponse(new \RuntimeException('Foo'));
        $response = ob_get_clean();

        $this->assertContains('Whoops, looks like something went wrong.', $response);
        $this->assertContains('
', $response);
    }

    public function testStatusCode()
    {
        $handler = new ExceptionHandler(false, 'iso8859-1');

        ob_start();
        $handler->sendPhpResponse(new NotFoundHttpException('Foo'));
        $response = ob_get_clean();

        $this->assertContains('Sorry, the page you are looking for could not be found.', $response);

        $expectedHeaders = array(
            array('HTTP/1.0 404', true, null),
            array('Content-Type: text/html; charset=iso8859-1', true, null),
        );

        $this->assertSame($expectedHeaders, testHeader());
    }

    public function testHeaders()
    {
        $handler = new ExceptionHandler(false, 'iso8859-1');

        ob_start();
        $handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST')));
        $response = ob_get_clean();

        $expectedHeaders = array(
            array('HTTP/1.0 405', true, null),
            array('Allow: POST', false, null),
            array('Content-Type: text/html; charset=iso8859-1', true, null),
        );

        $this->assertSame($expectedHeaders, testHeader());
    }

    public function testNestedExceptions()
    {
        $handler = new ExceptionHandler(true);
        ob_start();
        $handler->sendPhpResponse(new \RuntimeException('Foo', 0, new \RuntimeException('Bar')));
        $response = ob_get_clean();

        $this->assertStringMatchesFormat('%A
Foo
%A
Bar
%A', $response);
    }

    public function testHandle()
    {
        $exception = new \Exception('foo');

        $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock();
        $handler
            ->expects($this->exactly(2))
            ->method('sendPhpResponse');

        $handler->handle($exception);

        $handler->setHandler(function ($e) use ($exception) {
            $this->assertSame($exception, $e);
        });

        $handler->handle($exception);
    }

    public function testHandleOutOfMemoryException()
    {
        $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__);

        $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock();
        $handler
            ->expects($this->once())
            ->method('sendPhpResponse');

        $handler->setHandler(function ($e) {
            $this->fail('OutOfMemoryException should bypass the handler');
        });

        $handler->handle($exception);
    }
}

{'repo_name': 'laravel-dojo/wagon', 'stars': '187', 'repo_language': 'Perl', 'file_name': 'config.txt', 'mime_type': 'text/plain', 'hash': 6244711772123539739, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 0230daf0f7d90144ab78148d394ad757
PrefabImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Sandrem/FlyCasual', 'stars': '322', 'repo_language': 'C#', 'file_name': 'PackageManagerSettings.asset', 'mime_type': 'text/plain', 'hash': 3292618582920781171, 'source_dataset': 'data'}


// Copyright 2017 JanusGraph 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.

package org.janusgraph.core.attribute;

import com.google.common.base.Preconditions;
import org.janusgraph.diskstorage.ScanBuffer;
import org.janusgraph.diskstorage.WriteBuffer;

/**
 * Allows custom serializer definitions for attribute values.
 *

 * For most data types (i.e. classes) used with properties, using the default serializer when registering the type with the
 * JanusGraph will be sufficient and efficient in practice. However, for certain data types, it can be more
 * efficient to provide custom serializers implementing this interface.
 * Such custom serializers are registered in the configuration file by specifying their path and loaded when
 * the database is initialized. Hence, the serializer must be on the classpath.
 *

 *

 * When a {@link org.janusgraph.core.PropertyKey} is defined using a data type specified via {@link org.janusgraph.core.schema.PropertyKeyMaker} for which a custom serializer
 * is configured, then it will use this custom serializer for persistence operations.
 *
 * @param <V> Type of the attribute associated with the AttributeSerializer
 * @author Matthias Bröcheler (http://www.matthiasb.com)
 * @see org.janusgraph.core.schema.RelationTypeMaker
 * @see
 *      "Datatype and Attribute Serializer Configuration" manual chapter
 */
public interface AttributeSerializer<V> {

    /**
     * Reads an attribute from the given ReadBuffer.
     *

     * It is expected that this read operation adjusts the position in the ReadBuffer to after the attribute value.
     *
     * @param buffer ReadBuffer to read attribute from
     * @return Read attribute
     */
    V read(ScanBuffer buffer);

    /**
     * Writes the attribute value to the given WriteBuffer.
     *

     * It is expected that this write operation adjusts the position in the WriteBuffer to after the attribute value.
     *
     * @param buffer    WriteBuffer to write attribute to
     * @param attribute Attribute to write to WriteBuffer
     */
    void write(WriteBuffer buffer, V attribute);

    /**
     * Verifies the given (not-null) attribute value is valid.
     * Throws an {@link IllegalArgumentException} if the value is invalid,
     * otherwise simply returns.
     *
     * @param value to verify
     */
    default void verifyAttribute(V value) {
        Preconditions.checkNotNull(value,"Provided value cannot be null");
    }

    /**
     * Converts the given (not-null) value to the expected data type V.
     * The given object will NOT be of type V.
     * Throws an {@link IllegalArgumentException} if it cannot be converted.
     *
     * @param value to convert
     * @return converted to expected data type
     */
    default V convert(Object value) {
        try {
            return (V) value;
        } catch (ClassCastException e) {
            return null;
        }
    }

}

{'repo_name': 'JanusGraph/janusgraph', 'stars': '3457', 'repo_language': 'Java', 'file_name': 'TestLockerManager.java', 'mime_type': 'text/x-java', 'hash': -4187526858424998177, 'source_dataset': 'data'}


--TEST--
Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
--FILE--
<?php
class A {
    public function __wakeup() {
        throw new Exception("Failed");
    }
}

spl_autoload_register(
    function($class) {
        throw new Exception("Failed");
    }
);

try {
    var_dump(unserialize('a:2:{i:0;O:1:"A":0:{}i:1;O:1:"B":0:{}}'));
} catch (Exception $e) {
    var_dump($e->getMessage());
}
?>
--EXPECTF--
string(6) "Failed"

{'repo_name': 'hoohack/read-php-src', 'stars': '668', 'repo_language': 'C', 'file_name': 'socket_strerror.phpt', 'mime_type': 'text/plain', 'hash': -6481946272297640909, 'source_dataset': 'data'}


/*
  Copyright (C) 2016-201t David Anderson. All Rights Reserved.

  This program is free software; you can redistribute it and/or modify it
  under the terms of version 2 of the GNU General Public License as
  published by the Free Software Foundation.

  This program is distributed in the hope that it would be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  Further, this software is distributed without any warranty that it is
  free of the rightful claim of any third person regarding infringement
  or the like.  Any license provided herein, whether implied or
  otherwise, applies only to this software file.  Patent licenses, if
  any, provided herein do not apply to combinations of this program with
  other software, or any other product whatsoever.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write the Free Software Foundation, Inc., 51
  Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
*/
#ifndef WARNINGCONTROL_H
#define WARNINGCONTROL_H

#ifdef HAVE_UNUSED_ATTRIBUTE
#define  UNUSEDARG __attribute__ ((unused))
#else
#define  UNUSEDARG
#endif

#endif /* WARNINGCONTROL_H */

{'repo_name': 'thalium/icebox', 'stars': '373', 'repo_language': 'C++', 'file_name': 'randr.h', 'mime_type': 'text/x-c', 'hash': -8859267643195133738, 'source_dataset': 'data'}


// RUN: %clang_cc1 %s -verify -pedantic
typedef int unary_int_func(int arg);
unary_int_func *func;

unary_int_func *set_func(void *p) {
 func = p; // expected-warning {{converts between void pointer and function pointer}}
 p = func; // expected-warning {{converts between void pointer and function pointer}}

 return p; // expected-warning {{converts between void pointer and function pointer}}
}

{'repo_name': 'GoSSIP-SJTU/Armariris', 'stars': '756', 'repo_language': 'C++', 'file_name': 'a1.h', 'mime_type': 'text/plain', 'hash': -3247516462922674484, 'source_dataset': 'data'}


// Description: Entity Framework Bulk Operations & Utilities (EF Bulk SaveChanges, Insert, Update, Delete, Merge | LINQ Query Cache, Deferred, Filter, IncludeFilter, IncludeOptimize | Audit)
// Website & Documentation: https://github.com/zzzprojects/Entity-Framework-Plus
// Forum & Issues: https://github.com/zzzprojects/EntityFramework-Plus/issues
// License: https://github.com/zzzprojects/EntityFramework-Plus/blob/master/LICENSE
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.

using System;
using System.Linq;
using System.Linq.Expressions;

namespace Z.EntityFramework.Plus
{
    public static partial class QueryDeferredExtensions
    {
        public static QueryDeferred<TSource> DeferredAggregate<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> func)
        {
            if (source == null)
                throw Error.ArgumentNull("source");
            if (func == null)
                throw Error.ArgumentNull("func");

            return new QueryDeferred<TSource>(
#if EF5 || EF6
                source.GetObjectQuery(),
#elif EFCORE
                source,
#endif
                Expression.Call(
                    null,
                    GetMethodInfo(Queryable.Aggregate, source, func),
                    new[] {source.Expression, Expression.Quote(func)}
                    ));
        }

        public static QueryDeferred<TAccumulate> DeferredAggregate<TSource, TAccumulate>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func)
        {
            if (source == null)
                throw Error.ArgumentNull("source");
            if (func == null)
                throw Error.ArgumentNull("func");

            return new QueryDeferred<TAccumulate>(
#if EF5 || EF6
                source.GetObjectQuery(),
#elif EFCORE
                source,
#endif
                Expression.Call(
                    null,
                    GetMethodInfo(Queryable.Aggregate, source, seed, func),
                    new[] {source.Expression, Expression.Constant(seed), Expression.Quote(func)}
                    ));
        }

        public static QueryDeferred<TResult> DeferredAggregate<TSource, TAccumulate, TResult>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, Expression<Func<TAccumulate, TResult>> selector)
        {
            if (source == null)
                throw Error.ArgumentNull("source");
            if (func == null)
                throw Error.ArgumentNull("func");
            if (selector == null)
                throw Error.ArgumentNull("selector");

            return new QueryDeferred<TResult>(
#if EF5 || EF6
                source.GetObjectQuery(),
#elif EFCORE
                source,
#endif
                Expression.Call(
                    null,
                    GetMethodInfo(Queryable.Aggregate, source, seed, func, selector),
                    source.Expression,
                    Expression.Constant(seed),
                    Expression.Quote(func),
                    Expression.Quote(selector)
                    ));
        }
    }
}

{'repo_name': 'zzzprojects/EntityFramework-Plus', 'stars': '1478', 'repo_language': 'C#', 'file_name': 'ef-core-query-filter-multi-tenancy.md', 'mime_type': 'text/plain', 'hash': 6935009660620578688, 'source_dataset': 'data'}


#!/usr/bin/env python3
# coding: utf-8
# File: crime_law.py.py
# Author: lhy<lhy_in_blcu@126.com,https://huangyong.github.io>
# Date: 18-8-11
import re
import os

class LawGraph:
    def __init__(self):
        cur = '/'.join(os.path.realpath(__file__).split('/')[:-1])
        self.crimelaw = os.path.join(cur, 'crime_law.txt')

    def build_lawdict(self):
        tuples = []
        cases = [i for i in open(self.crimelaw).read().split('@') if '【' in i and '罪' in i]
        for case in cases:
            datas = self.extract_law(case)
            if datas:
                tuples+=datas
        return tuples

    def extract_law(self, case):
        datas = []
        crime_name = case.split('【')[1].split('】')[0]
        if '罪' not in crime_name or '的' in crime_name:
            return
        if '下列情形之一' not in case.split('】')[1]:
            datas += self.extract_law_2(case, crime_name)
        else:
            tmp = [i.replace('\u3000', '').split('）')[1] for i in case.split('：')[1].split('\n') if '）' in i]
            case = case.replace('下列情形之一，',''.join(tmp)).replace('有下列情形之一的',''.join(tmp)).split('：')[0]
            datas += self.extract_law_2(case, crime_name)
        return datas

    def extract_law_2(self, case, crime_name):
        datas = []
        detail = [i for i in re.split(r'[。；]', case.split('】')[1]) if i and '\n' not in i]
        for i in detail:
            data = {}
            data['crime_name'] = re.split(r'[。；，]', crime_name)
            data['cause'] = re.split(r'[。；，]', i.split('，处')[0])
            data['crime'] = i.split('，处')[-1]
            datas.append(data)
        return datas

handler = LawGraph()
tuples = handler.build_lawdict()
for tuple in tuples:
    print(tuple)

{'repo_name': 'liuhuanyong/LawCrimeMining', 'stars': '129', 'repo_language': 'Python', 'file_name': 'courtlaw_spider.py', 'mime_type': 'text/x-python', 'hash': 6229290978442317056, 'source_dataset': 'data'}


/**
 * \file
 *
 * \brief Component description for WDT
 *
 * Copyright (c) 2018 Microchip Technology Inc.
 *
 * \asf_license_start
 *
 * \page License
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * 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 Licence 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.
 *
 * \asf_license_stop
 *
 */

#ifndef _SAMD20_WDT_COMPONENT_
#define _SAMD20_WDT_COMPONENT_

/* ========================================================================== */
/**  SOFTWARE API DEFINITION FOR WDT */
/* ========================================================================== */
/** \addtogroup SAMD20_WDT Watchdog Timer */
/*@{*/

#define WDT_U2203
#define REV_WDT                     0x200

/* -------- WDT_CTRL : (WDT Offset: 0x0) (R/W  8) Control -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  :1;               /*!< bit:      0  Reserved                           */
    uint8_t  ENABLE:1;         /*!< bit:      1  Enable                             */
    uint8_t  WEN:1;            /*!< bit:      2  Watchdog Timer Window Mode Enable  */
    uint8_t  :4;               /*!< bit:  3.. 6  Reserved                           */
    uint8_t  ALWAYSON:1;       /*!< bit:      7  Always-On                          */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_CTRL_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_CTRL_OFFSET             0x0          /**< \brief (WDT_CTRL offset) Control */
#define WDT_CTRL_RESETVALUE         _U_(0x00)    /**< \brief (WDT_CTRL reset_value) Control */

#define WDT_CTRL_ENABLE_Pos         1            /**< \brief (WDT_CTRL) Enable */
#define WDT_CTRL_ENABLE             (_U_(0x1) << WDT_CTRL_ENABLE_Pos)
#define WDT_CTRL_WEN_Pos            2            /**< \brief (WDT_CTRL) Watchdog Timer Window Mode Enable */
#define WDT_CTRL_WEN                (_U_(0x1) << WDT_CTRL_WEN_Pos)
#define WDT_CTRL_ALWAYSON_Pos       7            /**< \brief (WDT_CTRL) Always-On */
#define WDT_CTRL_ALWAYSON           (_U_(0x1) << WDT_CTRL_ALWAYSON_Pos)
#define WDT_CTRL_MASK               _U_(0x86)    /**< \brief (WDT_CTRL) MASK Register */

/* -------- WDT_CONFIG : (WDT Offset: 0x1) (R/W  8) Configuration -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  PER:4;            /*!< bit:  0.. 3  Time-Out Period                    */
    uint8_t  WINDOW:4;         /*!< bit:  4.. 7  Window Mode Time-Out Period        */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_CONFIG_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_CONFIG_OFFSET           0x1          /**< \brief (WDT_CONFIG offset) Configuration */
#define WDT_CONFIG_RESETVALUE       _U_(0xBB)    /**< \brief (WDT_CONFIG reset_value) Configuration */

#define WDT_CONFIG_PER_Pos          0            /**< \brief (WDT_CONFIG) Time-Out Period */
#define WDT_CONFIG_PER_Msk          (_U_(0xF) << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER(value)       (WDT_CONFIG_PER_Msk & ((value) << WDT_CONFIG_PER_Pos))
#define   WDT_CONFIG_PER_8_Val            _U_(0x0)   /**< \brief (WDT_CONFIG) 8 clock cycles */
#define   WDT_CONFIG_PER_16_Val           _U_(0x1)   /**< \brief (WDT_CONFIG) 16 clock cycles */
#define   WDT_CONFIG_PER_32_Val           _U_(0x2)   /**< \brief (WDT_CONFIG) 32 clock cycles */
#define   WDT_CONFIG_PER_64_Val           _U_(0x3)   /**< \brief (WDT_CONFIG) 64 clock cycles */
#define   WDT_CONFIG_PER_128_Val          _U_(0x4)   /**< \brief (WDT_CONFIG) 128 clock cycles */
#define   WDT_CONFIG_PER_256_Val          _U_(0x5)   /**< \brief (WDT_CONFIG) 256 clock cycles */
#define   WDT_CONFIG_PER_512_Val          _U_(0x6)   /**< \brief (WDT_CONFIG) 512 clock cycles */
#define   WDT_CONFIG_PER_1K_Val           _U_(0x7)   /**< \brief (WDT_CONFIG) 1024 clock cycles */
#define   WDT_CONFIG_PER_2K_Val           _U_(0x8)   /**< \brief (WDT_CONFIG) 2048 clock cycles */
#define   WDT_CONFIG_PER_4K_Val           _U_(0x9)   /**< \brief (WDT_CONFIG) 4096 clock cycles */
#define   WDT_CONFIG_PER_8K_Val           _U_(0xA)   /**< \brief (WDT_CONFIG) 8192 clock cycles */
#define   WDT_CONFIG_PER_16K_Val          _U_(0xB)   /**< \brief (WDT_CONFIG) 16384 clock cycles */
#define WDT_CONFIG_PER_8            (WDT_CONFIG_PER_8_Val          << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_16           (WDT_CONFIG_PER_16_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_32           (WDT_CONFIG_PER_32_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_64           (WDT_CONFIG_PER_64_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_128          (WDT_CONFIG_PER_128_Val        << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_256          (WDT_CONFIG_PER_256_Val        << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_512          (WDT_CONFIG_PER_512_Val        << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_1K           (WDT_CONFIG_PER_1K_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_2K           (WDT_CONFIG_PER_2K_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_4K           (WDT_CONFIG_PER_4K_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_8K           (WDT_CONFIG_PER_8K_Val         << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_PER_16K          (WDT_CONFIG_PER_16K_Val        << WDT_CONFIG_PER_Pos)
#define WDT_CONFIG_WINDOW_Pos       4            /**< \brief (WDT_CONFIG) Window Mode Time-Out Period */
#define WDT_CONFIG_WINDOW_Msk       (_U_(0xF) << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW(value)    (WDT_CONFIG_WINDOW_Msk & ((value) << WDT_CONFIG_WINDOW_Pos))
#define   WDT_CONFIG_WINDOW_8_Val         _U_(0x0)   /**< \brief (WDT_CONFIG) 8 clock cycles */
#define   WDT_CONFIG_WINDOW_16_Val        _U_(0x1)   /**< \brief (WDT_CONFIG) 16 clock cycles */
#define   WDT_CONFIG_WINDOW_32_Val        _U_(0x2)   /**< \brief (WDT_CONFIG) 32 clock cycles */
#define   WDT_CONFIG_WINDOW_64_Val        _U_(0x3)   /**< \brief (WDT_CONFIG) 64 clock cycles */
#define   WDT_CONFIG_WINDOW_128_Val       _U_(0x4)   /**< \brief (WDT_CONFIG) 128 clock cycles */
#define   WDT_CONFIG_WINDOW_256_Val       _U_(0x5)   /**< \brief (WDT_CONFIG) 256 clock cycles */
#define   WDT_CONFIG_WINDOW_512_Val       _U_(0x6)   /**< \brief (WDT_CONFIG) 512 clock cycles */
#define   WDT_CONFIG_WINDOW_1K_Val        _U_(0x7)   /**< \brief (WDT_CONFIG) 1024 clock cycles */
#define   WDT_CONFIG_WINDOW_2K_Val        _U_(0x8)   /**< \brief (WDT_CONFIG) 2048 clock cycles */
#define   WDT_CONFIG_WINDOW_4K_Val        _U_(0x9)   /**< \brief (WDT_CONFIG) 4096 clock cycles */
#define   WDT_CONFIG_WINDOW_8K_Val        _U_(0xA)   /**< \brief (WDT_CONFIG) 8192 clock cycles */
#define   WDT_CONFIG_WINDOW_16K_Val       _U_(0xB)   /**< \brief (WDT_CONFIG) 16384 clock cycles */
#define WDT_CONFIG_WINDOW_8         (WDT_CONFIG_WINDOW_8_Val       << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_16        (WDT_CONFIG_WINDOW_16_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_32        (WDT_CONFIG_WINDOW_32_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_64        (WDT_CONFIG_WINDOW_64_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_128       (WDT_CONFIG_WINDOW_128_Val     << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_256       (WDT_CONFIG_WINDOW_256_Val     << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_512       (WDT_CONFIG_WINDOW_512_Val     << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_1K        (WDT_CONFIG_WINDOW_1K_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_2K        (WDT_CONFIG_WINDOW_2K_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_4K        (WDT_CONFIG_WINDOW_4K_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_8K        (WDT_CONFIG_WINDOW_8K_Val      << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_WINDOW_16K       (WDT_CONFIG_WINDOW_16K_Val     << WDT_CONFIG_WINDOW_Pos)
#define WDT_CONFIG_MASK             _U_(0xFF)    /**< \brief (WDT_CONFIG) MASK Register */

/* -------- WDT_EWCTRL : (WDT Offset: 0x2) (R/W  8) Early Warning Interrupt Control -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  EWOFFSET:4;       /*!< bit:  0.. 3  Early Warning Interrupt Time Offset */
    uint8_t  :4;               /*!< bit:  4.. 7  Reserved                           */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_EWCTRL_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_EWCTRL_OFFSET           0x2          /**< \brief (WDT_EWCTRL offset) Early Warning Interrupt Control */
#define WDT_EWCTRL_RESETVALUE       _U_(0x0B)    /**< \brief (WDT_EWCTRL reset_value) Early Warning Interrupt Control */

#define WDT_EWCTRL_EWOFFSET_Pos     0            /**< \brief (WDT_EWCTRL) Early Warning Interrupt Time Offset */
#define WDT_EWCTRL_EWOFFSET_Msk     (_U_(0xF) << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET(value)  (WDT_EWCTRL_EWOFFSET_Msk & ((value) << WDT_EWCTRL_EWOFFSET_Pos))
#define   WDT_EWCTRL_EWOFFSET_8_Val       _U_(0x0)   /**< \brief (WDT_EWCTRL) 8 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_16_Val      _U_(0x1)   /**< \brief (WDT_EWCTRL) 16 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_32_Val      _U_(0x2)   /**< \brief (WDT_EWCTRL) 32 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_64_Val      _U_(0x3)   /**< \brief (WDT_EWCTRL) 64 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_128_Val     _U_(0x4)   /**< \brief (WDT_EWCTRL) 128 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_256_Val     _U_(0x5)   /**< \brief (WDT_EWCTRL) 256 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_512_Val     _U_(0x6)   /**< \brief (WDT_EWCTRL) 512 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_1K_Val      _U_(0x7)   /**< \brief (WDT_EWCTRL) 1024 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_2K_Val      _U_(0x8)   /**< \brief (WDT_EWCTRL) 2048 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_4K_Val      _U_(0x9)   /**< \brief (WDT_EWCTRL) 4096 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_8K_Val      _U_(0xA)   /**< \brief (WDT_EWCTRL) 8192 clock cycles */
#define   WDT_EWCTRL_EWOFFSET_16K_Val     _U_(0xB)   /**< \brief (WDT_EWCTRL) 16384 clock cycles */
#define WDT_EWCTRL_EWOFFSET_8       (WDT_EWCTRL_EWOFFSET_8_Val     << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_16      (WDT_EWCTRL_EWOFFSET_16_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_32      (WDT_EWCTRL_EWOFFSET_32_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_64      (WDT_EWCTRL_EWOFFSET_64_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_128     (WDT_EWCTRL_EWOFFSET_128_Val   << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_256     (WDT_EWCTRL_EWOFFSET_256_Val   << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_512     (WDT_EWCTRL_EWOFFSET_512_Val   << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_1K      (WDT_EWCTRL_EWOFFSET_1K_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_2K      (WDT_EWCTRL_EWOFFSET_2K_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_4K      (WDT_EWCTRL_EWOFFSET_4K_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_8K      (WDT_EWCTRL_EWOFFSET_8K_Val    << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_EWOFFSET_16K     (WDT_EWCTRL_EWOFFSET_16K_Val   << WDT_EWCTRL_EWOFFSET_Pos)
#define WDT_EWCTRL_MASK             _U_(0x0F)    /**< \brief (WDT_EWCTRL) MASK Register */

/* -------- WDT_INTENCLR : (WDT Offset: 0x4) (R/W  8) Interrupt Enable Clear -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  EW:1;             /*!< bit:      0  Early Warning Interrupt Enable     */
    uint8_t  :7;               /*!< bit:  1.. 7  Reserved                           */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_INTENCLR_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_INTENCLR_OFFSET         0x4          /**< \brief (WDT_INTENCLR offset) Interrupt Enable Clear */
#define WDT_INTENCLR_RESETVALUE     _U_(0x00)    /**< \brief (WDT_INTENCLR reset_value) Interrupt Enable Clear */

#define WDT_INTENCLR_EW_Pos         0            /**< \brief (WDT_INTENCLR) Early Warning Interrupt Enable */
#define WDT_INTENCLR_EW             (_U_(0x1) << WDT_INTENCLR_EW_Pos)
#define WDT_INTENCLR_MASK           _U_(0x01)    /**< \brief (WDT_INTENCLR) MASK Register */

/* -------- WDT_INTENSET : (WDT Offset: 0x5) (R/W  8) Interrupt Enable Set -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  EW:1;             /*!< bit:      0  Early Warning Interrupt Enable     */
    uint8_t  :7;               /*!< bit:  1.. 7  Reserved                           */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_INTENSET_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_INTENSET_OFFSET         0x5          /**< \brief (WDT_INTENSET offset) Interrupt Enable Set */
#define WDT_INTENSET_RESETVALUE     _U_(0x00)    /**< \brief (WDT_INTENSET reset_value) Interrupt Enable Set */

#define WDT_INTENSET_EW_Pos         0            /**< \brief (WDT_INTENSET) Early Warning Interrupt Enable */
#define WDT_INTENSET_EW             (_U_(0x1) << WDT_INTENSET_EW_Pos)
#define WDT_INTENSET_MASK           _U_(0x01)    /**< \brief (WDT_INTENSET) MASK Register */

/* -------- WDT_INTFLAG : (WDT Offset: 0x6) (R/W  8) Interrupt Flag Status and Clear -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union { // __I to avoid read-modify-write on write-to-clear register
  struct {
    __I uint8_t  EW:1;             /*!< bit:      0  Early Warning                      */
    __I uint8_t  :7;               /*!< bit:  1.. 7  Reserved                           */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_INTFLAG_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_INTFLAG_OFFSET          0x6          /**< \brief (WDT_INTFLAG offset) Interrupt Flag Status and Clear */
#define WDT_INTFLAG_RESETVALUE      _U_(0x00)    /**< \brief (WDT_INTFLAG reset_value) Interrupt Flag Status and Clear */

#define WDT_INTFLAG_EW_Pos          0            /**< \brief (WDT_INTFLAG) Early Warning */
#define WDT_INTFLAG_EW              (_U_(0x1) << WDT_INTFLAG_EW_Pos)
#define WDT_INTFLAG_MASK            _U_(0x01)    /**< \brief (WDT_INTFLAG) MASK Register */

/* -------- WDT_STATUS : (WDT Offset: 0x7) (R/   8) Status -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  :7;               /*!< bit:  0.. 6  Reserved                           */
    uint8_t  SYNCBUSY:1;       /*!< bit:      7  Synchronization Busy               */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_STATUS_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_STATUS_OFFSET           0x7          /**< \brief (WDT_STATUS offset) Status */
#define WDT_STATUS_RESETVALUE       _U_(0x00)    /**< \brief (WDT_STATUS reset_value) Status */

#define WDT_STATUS_SYNCBUSY_Pos     7            /**< \brief (WDT_STATUS) Synchronization Busy */
#define WDT_STATUS_SYNCBUSY         (_U_(0x1) << WDT_STATUS_SYNCBUSY_Pos)
#define WDT_STATUS_MASK             _U_(0x80)    /**< \brief (WDT_STATUS) MASK Register */

/* -------- WDT_CLEAR : (WDT Offset: 0x8) ( /W  8) Clear -------- */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef union {
  struct {
    uint8_t  CLEAR:8;          /*!< bit:  0.. 7  Watchdog Clear                     */
  } bit;                       /*!< Structure used for bit  access                  */
  uint8_t reg;                 /*!< Type      used for register access              */
} WDT_CLEAR_Type;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#define WDT_CLEAR_OFFSET            0x8          /**< \brief (WDT_CLEAR offset) Clear */
#define WDT_CLEAR_RESETVALUE        _U_(0x00)    /**< \brief (WDT_CLEAR reset_value) Clear */

#define WDT_CLEAR_CLEAR_Pos         0            /**< \brief (WDT_CLEAR) Watchdog Clear */
#define WDT_CLEAR_CLEAR_Msk         (_U_(0xFF) << WDT_CLEAR_CLEAR_Pos)
#define WDT_CLEAR_CLEAR(value)      (WDT_CLEAR_CLEAR_Msk & ((value) << WDT_CLEAR_CLEAR_Pos))
#define   WDT_CLEAR_CLEAR_KEY_Val         _U_(0xA5)   /**< \brief (WDT_CLEAR) Clear Key */
#define WDT_CLEAR_CLEAR_KEY         (WDT_CLEAR_CLEAR_KEY_Val       << WDT_CLEAR_CLEAR_Pos)
#define WDT_CLEAR_MASK              _U_(0xFF)    /**< \brief (WDT_CLEAR) MASK Register */

/** \brief WDT hardware registers */
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
typedef struct {
  __IO WDT_CTRL_Type             CTRL;        /**< \brief Offset: 0x0 (R/W  8) Control */
  __IO WDT_CONFIG_Type           CONFIG;      /**< \brief Offset: 0x1 (R/W  8) Configuration */
  __IO WDT_EWCTRL_Type           EWCTRL;      /**< \brief Offset: 0x2 (R/W  8) Early Warning Interrupt Control */
       RoReg8                    Reserved1[0x1];
  __IO WDT_INTENCLR_Type         INTENCLR;    /**< \brief Offset: 0x4 (R/W  8) Interrupt Enable Clear */
  __IO WDT_INTENSET_Type         INTENSET;    /**< \brief Offset: 0x5 (R/W  8) Interrupt Enable Set */
  __IO WDT_INTFLAG_Type          INTFLAG;     /**< \brief Offset: 0x6 (R/W  8) Interrupt Flag Status and Clear */
  __I  WDT_STATUS_Type           STATUS;      /**< \brief Offset: 0x7 (R/   8) Status */
  __O  WDT_CLEAR_Type            CLEAR;       /**< \brief Offset: 0x8 ( /W  8) Clear */
} Wdt;
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

/*@}*/

#endif /* _SAMD20_WDT_COMPONENT_ */

{'repo_name': 'ataradov/mcu-starter-projects', 'stars': '102', 'repo_language': 'C', 'file_name': 'samda1j16.ld', 'mime_type': 'text/x-asm', 'hash': -4596788033521735597, 'source_dataset': 'data'}


// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a < %s 2> %t | FileCheck %s --check-prefix=CHECK
// RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+tlb-rmi < %s 2> %t | FileCheck %s --check-prefix=CHECK
// RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-v8.4a < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a,-tlb-rmi < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-V84

// Outer shareable TLB maintenance instructions:
tlbi vmalle1os
tlbi vae1os, xzr
tlbi vae1os, x0
tlbi aside1os, x1
tlbi vaae1os, x2
tlbi vale1os, x3
tlbi vaale1os, x4
tlbi ipas2e1os, x5
tlbi ipas2le1os, x6
tlbi vae2os, x7
tlbi vale2os, x8
tlbi vmalls12e1os
tlbi vae3os, x9
tlbi vale3os, x10
tlbi alle2os
tlbi alle1os
tlbi alle3os

//CHECK:       tlbi  vmalle1os               // encoding: [0x1f,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  vae1os, xzr             // encoding: [0x3f,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  vae1os, x0              // encoding: [0x20,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  aside1os, x1            // encoding: [0x41,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  vaae1os, x2             // encoding: [0x62,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  vale1os, x3             // encoding: [0xa3,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  vaale1os, x4            // encoding: [0xe4,0x81,0x08,0xd5]
//CHECK-NEXT:  tlbi  ipas2e1os, x5           // encoding: [0x05,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ipas2le1os, x6          // encoding: [0x86,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  vae2os, x7              // encoding: [0x27,0x81,0x0c,0xd5]
//CHECK-NEXT:  tlbi  vale2os, x8             // encoding: [0xa8,0x81,0x0c,0xd5]
//CHECK-NEXT:  tlbi  vmalls12e1os            // encoding: [0xdf,0x81,0x0c,0xd5]
//CHECK-NEXT:  tlbi  vae3os, x9              // encoding: [0x29,0x81,0x0e,0xd5]
//CHECK-NEXT:  tlbi  vale3os, x10            // encoding: [0xaa,0x81,0x0e,0xd5]
//CHECK-NEXT:  tlbi  alle2os                 // encoding: [0x1f,0x81,0x0c,0xd5]
//CHECK-NEXT:  tlbi  alle1os                 // encoding: [0x9f,0x81,0x0c,0xd5]
//CHECK-NEXT:  tlbi  alle3os                 // encoding: [0x1f,0x81,0x0e,0xd5]

tlbi vae1os, sp

//CHECK-ERROR:      error: invalid operand for instruction
//CHECK-ERROR-NEXT: tlbi vae1os, sp
//CHECK-ERROR-NEXT:              ^

//CHECK-NO-V84:      error: TLBI VMALLE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vmalle1os
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vae1os, xzr
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vae1os, x0
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI ASIDE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi aside1os, x1
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAAE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vaae1os, x2
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VALE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vale1os, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAALE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vaale1os, x4
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI IPAS2E1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ipas2e1os, x5
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI IPAS2LE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ipas2le1os, x6
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAE2OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vae2os, x7
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VALE2OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vale2os, x8
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VMALLS12E1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vmalls12e1os
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VAE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vae3os, x9
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI VALE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi vale3os, x10
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI ALLE2OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi alle2os
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI ALLE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi alle1os
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI ALLE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi alle3os
//CHECK-NO-V84-NEXT:      ^

// TLB Range maintenance instructions:
tlbi rvae1, x3
tlbi rvaae1, x3
tlbi rvale1, x3
tlbi rvaale1, x3
tlbi rvae1is, x3
tlbi rvaae1is, x3
tlbi rvale1is, x3
tlbi rvaale1is, x3
tlbi rvae1os, x3
tlbi rvaae1os, x3
tlbi rvale1os, x3
tlbi rvaale1os, x3
tlbi ripas2e1is, x3
tlbi ripas2le1is, x3
tlbi ripas2e1, X3
tlbi ripas2le1, X3
tlbi ripas2e1os, X3
tlbi ripas2le1os, X3
tlbi rvae2, X3
tlbi rvale2, X3
tlbi rvae2is, X3
tlbi rvale2is, X3
tlbi rvae2os, X3
tlbi rvale2os, X3
tlbi rvae3, X3
tlbi rvale3, X3
tlbi rvae3is, X3
tlbi rvale3is, X3
tlbi rvae3os, X3
tlbi rvale3os, X3
tlbi rvale3os, XZR

//CHECK:       tlbi  rvae1, x3               // encoding: [0x23,0x86,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaae1, x3              // encoding: [0x63,0x86,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvale1, x3              // encoding: [0xa3,0x86,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaale1, x3             // encoding: [0xe3,0x86,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvae1is, x3             // encoding: [0x23,0x82,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaae1is, x3            // encoding: [0x63,0x82,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvale1is, x3            // encoding: [0xa3,0x82,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaale1is, x3           // encoding: [0xe3,0x82,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvae1os, x3             // encoding: [0x23,0x85,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaae1os, x3            // encoding: [0x63,0x85,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvale1os, x3            // encoding: [0xa3,0x85,0x08,0xd5]
//CHECK-NEXT:  tlbi  rvaale1os, x3           // encoding: [0xe3,0x85,0x08,0xd5]
//CHECK-NEXT:  tlbi  ripas2e1is, x3          // encoding: [0x43,0x80,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ripas2le1is, x3         // encoding: [0xc3,0x80,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ripas2e1, x3            // encoding: [0x43,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ripas2le1, x3           // encoding: [0xc3,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ripas2e1os, x3          // encoding: [0x63,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  ripas2le1os, x3         // encoding: [0xe3,0x84,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvae2, x3               // encoding: [0x23,0x86,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvale2, x3              // encoding: [0xa3,0x86,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvae2is, x3             // encoding: [0x23,0x82,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvale2is, x3            // encoding: [0xa3,0x82,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvae2os, x3             // encoding: [0x23,0x85,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvale2os, x3            // encoding: [0xa3,0x85,0x0c,0xd5]
//CHECK-NEXT:  tlbi  rvae3, x3               // encoding: [0x23,0x86,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvale3, x3              // encoding: [0xa3,0x86,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvae3is, x3             // encoding: [0x23,0x82,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvale3is, x3            // encoding: [0xa3,0x82,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvae3os, x3             // encoding: [0x23,0x85,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvale3os, x3            // encoding: [0xa3,0x85,0x0e,0xd5]
//CHECK-NEXT:  tlbi  rvale3os, xzr           // encoding: [0xbf,0x85,0x0e,0xd5]

tlbi rvae1, sp

//CHECK-ERROR:      error: invalid operand for instruction
//CHECK-ERROR-NEXT: tlbi rvae1, sp
//CHECK-ERROR-NEXT:             ^

//CHECK-NO-V84:      error: TLBI RVAE1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae1, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAAE1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaae1, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale1, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAALE1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaale1, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT:  error: TLBI RVAE1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAAE1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaae1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAALE1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaale1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae1os, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAAE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaae1os, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale1os, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAALE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvaale1os, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2E1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2e1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2LE1IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2le1is, x3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2E1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2e1, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2LE1 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2le1, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2E1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2e1os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RIPAS2LE1OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi ripas2le1os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE2 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae2, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE2 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale2, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE2IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae2is, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE2IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale2is, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE2OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae2os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE2OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale2os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE3 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae3, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE3 requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale3, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE3IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae3is, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE3IS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale3is, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVAE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvae3os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale3os, X3
//CHECK-NO-V84-NEXT:      ^
//CHECK-NO-V84-NEXT: error: TLBI RVALE3OS requires tlb-rmi
//CHECK-NO-V84-NEXT: tlbi rvale3os, XZR
//CHECK-NO-V84-NEXT:      ^

{'repo_name': 'earl/llvm-mirror', 'stars': '122', 'repo_language': 'LLVM', 'file_name': 'registers_readonly.s', 'mime_type': 'text/plain', 'hash': 3544282436508968472, 'source_dataset': 'data'}


CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Pushwoosh
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Pushwoosh/Framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "Security" -framework "StoreKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Pushwoosh
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

{'repo_name': 'mapsme/omim', 'stars': '3312', 'repo_language': 'C++', 'file_name': 'CMakeLists.txt', 'mime_type': 'text/plain', 'hash': -5092740731469620768, 'source_dataset': 'data'}


<?php
namespace Aws;

use Aws\Api\Parser\Exception\ParserException;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\FulfilledPromise;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

/**
 * Converts an HTTP handler into a Command HTTP handler.
 *
 * HTTP handlers have the following signature:
 *     function(RequestInterface $request, array $options) : PromiseInterface
 *
 * The promise returned form an HTTP handler must resolve to a PSR-7 response
 * object when fulfilled or an error array when rejected. The error array
 * can contain the following data:
 *
 * - exception: (required, Exception) Exception that was encountered.
 * - response: (ResponseInterface) PSR-7 response that was received (if a
 *   response) was received.
 * - connection_error: (bool) True if the error is the result of failing to
 *   connect.
 */
class WrappedHttpHandler
{
    private $httpHandler;
    private $parser;
    private $errorParser;
    private $exceptionClass;
    private $collectStats;

    /**
     * @param callable $httpHandler    Function that accepts a request and array
     *                                 of request options and returns a promise
     *                                 that fulfills with a response or rejects
     *                                 with an error array.
     * @param callable $parser         Function that accepts a response object
     *                                 and returns an AWS result object.
     * @param callable $errorParser    Function that parses a response object
     *                                 into AWS error data.
     * @param string   $exceptionClass Exception class to throw.
     * @param bool     $collectStats   Whether to collect HTTP transfer
     *                                 information.
     */
    public function __construct(
        callable $httpHandler,
        callable $parser,
        callable $errorParser,
        $exceptionClass = 'Aws\Exception\AwsException',
        $collectStats = false
    ) {
        $this->httpHandler = $httpHandler;
        $this->parser = $parser;
        $this->errorParser = $errorParser;
        $this->exceptionClass = $exceptionClass;
        $this->collectStats = $collectStats;
    }

    /**
     * Calls the simpler HTTP specific handler and wraps the returned promise
     * with AWS specific values (e.g., a result object or AWS exception).
     *
     * @param CommandInterface $command Command being executed.
     * @param RequestInterface $request Request to send.
     *
     * @return Promise\PromiseInterface
     */
    public function __invoke(
        CommandInterface $command,
        RequestInterface $request
    ) {
        $fn = $this->httpHandler;
        $options = $command['@http'] ?: [];
        $stats = [];
        if ($this->collectStats) {
            $options['http_stats_receiver'] = static function (
                array $transferStats
            ) use (&$stats) {
                $stats = $transferStats;
            };
        } elseif (isset($options['http_stats_receiver'])) {
            throw new \InvalidArgumentException('Providing a custom HTTP stats'
                . ' receiver to Aws\WrappedHttpHandler is not supported.');
        }

        return Promise\promise_for($fn($request, $options))
            ->then(
                function (
                    ResponseInterface $res
                ) use ($command, $request, &$stats) {
                    return $this->parseResponse($command, $request, $res, $stats);
                },
                function ($err) use ($request, $command, &$stats) {
                    if (is_array($err)) {
                        $err = $this->parseError(
                            $err,
                            $request,
                            $command,
                            $stats
                        );
                    }
                    return new Promise\RejectedPromise($err);
                }
            );
    }

    /**
     * @param CommandInterface  $command
     * @param RequestInterface  $request
     * @param ResponseInterface $response
     * @param array             $stats
     *
     * @return ResultInterface
     */
    private function parseResponse(
        CommandInterface $command,
        RequestInterface $request,
        ResponseInterface $response,
        array $stats
    ) {
        $parser = $this->parser;
        $status = $response->getStatusCode();
        $result = $status < 300
            ? $parser($command, $response)
            : new Result();

        $metadata = [
            'statusCode'    => $status,
            'effectiveUri'  => (string) $request->getUri(),
            'headers'       => [],
            'transferStats' => [],
        ];
        if (!empty($stats)) {
            $metadata['transferStats']['http'] = [$stats];
        }

        // Bring headers into the metadata array.
        foreach ($response->getHeaders() as $name => $values) {
            $metadata['headers'][strtolower($name)] = $values[0];
        }

        $result['@metadata'] = $metadata;

        return $result;
    }

    /**
     * Parses a rejection into an AWS error.
     *
     * @param array            $err     Rejection error array.
     * @param RequestInterface $request Request that was sent.
     * @param CommandInterface $command Command being sent.
     * @param array            $stats   Transfer statistics
     *
     * @return \Exception
     */
    private function parseError(
        array $err,
        RequestInterface $request,
        CommandInterface $command,
        array $stats
    ) {
        if (!isset($err['exception'])) {
            throw new \RuntimeException('The HTTP handler was rejected without an "exception" key value pair.');
        }

        $serviceError = "AWS HTTP error: " . $err['exception']->getMessage();

        if (!isset($err['response'])) {
            $parts = ['response' => null];
        } else {
            try {
                $parts = call_user_func($this->errorParser, $err['response']);
                $serviceError .= " {$parts['code']} ({$parts['type']}): "
                    . "{$parts['message']} - " . $err['response']->getBody();
            } catch (ParserException $e) {
                $parts = [];
                $serviceError .= ' Unable to parse error information from '
                    . "response - {$e->getMessage()}";
            }

            $parts['response'] = $err['response'];
        }

        $parts['exception'] = $err['exception'];
        $parts['request'] = $request;
        $parts['connection_error'] = !empty($err['connection_error']);
        $parts['transfer_stats'] = $stats;

        return new $this->exceptionClass(
            sprintf(
                'Error executing "%s" on "%s"; %s',
                $command->getName(),
                $request->getUri(),
                $serviceError
            ),
            $command,
            $parts,
            $err['exception']
        );
    }
}

{'repo_name': 'mmmxcc/mod', 'stars': '137', 'repo_language': 'JavaScript', 'file_name': 'ProxyBase.conf', 'mime_type': 'text/plain', 'hash': 2317915582201743258, 'source_dataset': 'data'}


<?php declare(strict_types=1);

namespace Shopware\Core\Content\Cms\Command;

use Faker\Factory;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Framework\Uuid\Uuid;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class CreatePageCommand extends Command
{
    protected static $defaultName = 'cms:page:create';

    /**
     * @var EntityRepositoryInterface
     */
    private $cmsPageRepository;

    /**
     * @var EntityRepositoryInterface
     */
    private $productRepository;

    /**
     * @var string[]
     */
    private $products;

    /**
     * @var string[]
     */
    private $categories;

    /**
     * @var EntityRepositoryInterface
     */
    private $categoryRepository;

    /**
     * @var string[]
     */
    private $media;

    /**
     * @var EntityRepositoryInterface
     */
    private $mediaRepository;

    public function __construct(
        EntityRepositoryInterface $cmsPageRepository,
        EntityRepositoryInterface $productRepository,
        EntityRepositoryInterface $categoryRepository,
        EntityRepositoryInterface $mediaRepository
    ) {
        parent::__construct();
        $this->cmsPageRepository = $cmsPageRepository;
        $this->productRepository = $productRepository;
        $this->categoryRepository = $categoryRepository;
        $this->mediaRepository = $mediaRepository;
    }

    protected function configure(): void
    {
        $this->addOption('reset', null, InputOption::VALUE_NONE, 'Reset all pages');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        if ($input->getOption('reset')) {
            $this->resetPages();
        }

        $faker = Factory::create();

        $page = [
            'id' => Uuid::randomHex(),
            'name' => $faker->company,
            'type' => 'landing_page',
            'blocks' => [
                [
                    'type' => 'image-text',
                    'slots' => [
                        ['type' => 'product-box', 'slot' => 'left', 'config' => ['productId' => $this->getRandomProductId()]],
                        ['type' => 'image', 'slot' => 'right', 'config' => ['url' => $this->getRandomImageUrl()]],
                    ],
                ],
                [
                    'type' => 'image-text',
                    'slots' => [
                        ['type' => 'text', 'slot' => 'left', 'config' => ['content' => $faker->realText()]],
                        ['type' => 'product-box', 'slot' => 'right', 'config' => ['productId' => $this->getRandomProductId()]],
                    ],
                ],
                [
                    'type' => 'image-text',
                    'slots' => [
                        ['type' => 'text', 'slot' => 'right', 'config' => ['content' => $faker->realText()]],
                        ['type' => 'image', 'slot' => 'left', 'config' => ['mediaId' => $this->getRandomMediaId()]],
                    ],
                ],
                [
                    'type' => 'listing',
                    'slots' => [
                        ['type' => 'product-listing', 'slot' => 'listing', 'config' => ['categoryId' => $this->getRandomCategoryId()]],
                    ],
                ],
            ],
        ];

        $this->cmsPageRepository->create([$page], Context::createDefaultContext());

        $output->writeln('ID: ' . $page['id']);

        return 0;
    }

    private function resetPages(): void
    {
        $criteria = new Criteria();
        $criteria->setLimit(999);

        $context = Context::createDefaultContext();
        $pages = $this->cmsPageRepository->searchIds($criteria, $context);

        if ($pages->getTotal() === 0) {
            return;
        }

        $keys = array_map(function ($id) {
            return ['id' => $id];
        }, $pages->getIds());

        $this->cmsPageRepository->delete($keys, $context);
    }

    private function getRandomImageUrl(): string
    {
        return 'https://source.unsplash.com/random?t=' . random_int(1, 9999);
    }

    private function getRandomProductId(): string
    {
        if (empty($this->products)) {
            $criteria = new Criteria();
            $criteria->setLimit(100);

            $this->products = $this->productRepository->searchIds($criteria, Context::createDefaultContext())->getIds();
        }

        return $this->products[array_rand($this->products, 1)];
    }

    private function getRandomCategoryId(): string
    {
        if (empty($this->categories)) {
            $criteria = new Criteria();
            $criteria->setLimit(100);

            $this->categories = $this->categoryRepository->searchIds($criteria, Context::createDefaultContext())->getIds();
        }

        return $this->categories[array_rand($this->categories, 1)];
    }

    private function getRandomMediaId(): string
    {
        if (empty($this->media)) {
            $criteria = new Criteria();
            $criteria->setLimit(100);

            $this->media = $this->mediaRepository->searchIds($criteria, Context::createDefaultContext())->getIds();
        }

        return $this->media[array_rand($this->media, 1)];
    }
}

{'repo_name': 'shopware/platform', 'stars': '936', 'repo_language': 'PHP', 'file_name': '2020-09-11-update-jest-and-vue-test-utils.md', 'mime_type': 'text/plain', 'hash': 8191492410851034970, 'source_dataset': 'data'}