text:
#ifndef PYTHONIC_TYPES_SLICE_HPP
#define PYTHONIC_TYPES_SLICE_HPP

#include "pythonic/include/types/slice.hpp"

#include "pythonic/__builtin__/None.hpp"

#ifndef NDEBUG
#include <nt2/include/functions/bitofsign.hpp>
#endif

#include <cassert>
#include <stdexcept>
#include <iostream>

namespace pythonic
{

  namespace types
  {

    struct contiguous_slice;

    namespace details
    {

      long roundup_divide(long a, long b)
      {
        if (b > 0)
          return (a + b - 1) / b;
        else
          return (a + b + 1) / b;
      }
    }

    normalized_slice::normalized_slice()
    {
    }
    normalized_slice::normalized_slice(long lower, long upper, long step)
        : lower(lower), upper(upper), step(step)
    {
    }

    template <class S>
    normalized_slice normalized_slice::operator*(S const &other) const
    {
      return S(lower + step * other.lower, lower + step * other.upper,
               step * other.step);
    }

    long normalized_slice::size() const
    {
      return std::max(0L, details::roundup_divide(upper - lower, step));
    }

    long normalized_slice::get(long i) const
    {
      return lower + i * step;
    }

    slice::slice(none<long> lower, none<long> upper, none<long> step)
        : lower(lower), upper(upper), step(step.is_none ? 1 : (long)step)
    {
    }

    slice::slice()
    {
    }

    slice slice::operator*(slice const &other) const
    {
      // We do not implement these because it requires to know the "end"
      // value of the slice which is not possible if it is not "step == 1" slice
      // TODO: We can skip these constraints if we know begin, end and step.
      if ((other.step < 0 or static_cast<long>(other.upper) < 0 or
           static_cast<long>(other.lower) < 0) and
          step != 1 and step != -1)
        throw std::runtime_error("not implemented");

      none<long> new_lower;
      if (other.lower.is_none or (long)other.lower == 0) {
        if (other.step > 0)
          new_lower = lower;
        else if (step > 0) {
          if (upper.is_none or (long)upper == 0)
            // 0 means the first value and not the last value
            new_lower = none_type{};
          else
            new_lower = (long)upper - 1;
        } else {
          if (upper.is_none or (long)upper == -1)
            new_lower = none_type{};
          else
            new_lower = (long)upper + 1;
        }
      } else {
        none<long> ref = ((long)other.lower > 0) ? lower : upper;
        if (ref.is_none) {
          if (step > 0)
            new_lower = (long)other.lower * step;
          else
            new_lower = (long)other.lower * step - 1;
        } else
          new_lower = (long)ref + (long)other.lower * step;
      }

      long new_step = step * other.step;

      none<long> new_upper;
      if (other.upper.is_none) {
        if (other.step > 0)
          new_upper = upper;
        else if (step > 0) {
          if (lower.is_none or (long)lower == 0)
            new_upper = none_type{};
          else
            new_upper = (long)lower - 1;
        } else {
          if (lower.is_none or (long)lower == -1)
            // 0 means the first value and not the last value
            new_upper = none_type{};
          else
            new_upper = (long)lower + 1;
        }
      } else {
        none<long> ref = ((long)other.upper > 0) ? lower : upper;
        if (ref.is_none) {
          if (step > 0)
            new_upper = (long)other.upper * step;
          else
            new_upper = (long)other.upper * step - 1;
        } else
          new_upper = (long)ref + (long)other.upper * step;
      }
      return {new_lower, new_upper, new_step};
    }

    /*
       Normalize change a[:-1] to a[:len(a)-1] to have positif index.
       It also check for value bigger than len(a) to fit the size of the
       container
       */
    normalized_slice slice::normalize(long max_size) const
    {
      long normalized_upper;
      if (upper.is_none) {
        if (step > 0L)
          normalized_upper = max_size;
        else
          normalized_upper = -1L;
      } else {
        if (upper < 0L)
          normalized_upper = std::max(-1L, max_size + upper);
        else if (upper > max_size)
          normalized_upper = max_size;
        else
          normalized_upper = (long)upper;
      }

      long normalized_lower;
      if (lower.is_none and step > 0L)
        normalized_lower = 0L;
      else if (lower.is_none and step < 0L)
        normalized_lower = max_size - 1L;
      else if (lower < 0L)
        normalized_lower = std::max(0L, max_size + lower);
      else if (lower > max_size)
        normalized_lower = max_size - 1L;
      else
        normalized_lower = (long)lower;

      return {normalized_lower, normalized_upper, step};
    }

    /*
     * An assert is raised when we can't compute the size without more
     * informations.
     */
    long slice::size() const
    {
      assert(not(upper.is_none and lower.is_none));
      long len;
      if (upper.is_none) {
        assert(nt2::bitofsign(step) != nt2::bitofsign(lower));
        len = -(long)lower;
      } else if (lower.is_none) {
        assert(nt2::bitofsign(step) == nt2::bitofsign(upper));
        len = upper;
      } else
        len = upper - lower;
      return std::max(0L, details::roundup_divide(len, step));
    }

    long slice::get(long i) const
    {
      assert(not upper.is_none and not lower.is_none);
      return (long)lower + i * (long)step;
    }

    contiguous_normalized_slice::contiguous_normalized_slice()
    {
    }

    contiguous_normalized_slice::contiguous_normalized_slice(long lower,
                                                             long upper)
        : lower(lower), upper(upper)
    {
    }

    contiguous_normalized_slice contiguous_normalized_slice::
    operator*(contiguous_normalized_slice const &other) const
    {
      return contiguous_normalized_slice(lower + other.lower,
                                         upper + other.upper);
    }

    normalized_slice contiguous_normalized_slice::
    operator*(normalized_slice const &other) const
    {
      return normalized_slice(lower + step * other.lower,
                              lower + step * other.upper, step * other.step);
    }

    long contiguous_normalized_slice::size() const
    {
      return std::max(0L, upper - lower);
    }

    inline long contiguous_normalized_slice::get(long i) const
    {
      return lower + i;
    }

    contiguous_slice::contiguous_slice(none<long> lower, none<long> upper)
        : lower(lower.is_none ? 0 : (long)lower), upper(upper)
    {
    }

    contiguous_slice::contiguous_slice()
    {
    }

    contiguous_slice contiguous_slice::
    operator*(contiguous_slice const &other) const
    {
      long new_lower;
      if (other.lower < 0)
        new_lower = upper + other.lower * step;
      else
        new_lower = lower + other.lower * step;

      none<long> new_upper;
      if (other.upper.is_none)
        new_upper = upper;
      else if ((long)other.upper < 0) {
        if (upper.is_none)
          new_upper = (long)other.upper * step;
        else
          new_upper = upper + (long)other.upper * step;
      } else
        new_upper = lower + (long)other.upper * step;

      return {new_lower, new_upper};
    }

    slice contiguous_slice::operator*(slice const &other) const
    {
      none<long> new_lower;
      if (other.lower.is_none or (long)other.lower == 0) {
        if (other.step > 0)
          new_lower = lower;
        else if (upper.is_none or (long)upper == 0)
          // 0 means the first value and not the last value
          new_lower = none_type{};
        else
          new_lower = (long)upper - 1;
      } else {
        if ((long)other.lower > 0)
          new_lower = lower + (long)other.lower * step;
        else if (upper.is_none)
          new_lower = (long)other.lower * step;
        else
          new_lower = (long)upper + (long)other.lower * step;
      }

      long new_step = other.step;

      none<long> new_upper;
      if (other.upper.is_none) {
        if (other.step > 0)
          new_upper = upper;
        else if ((long)lower == 0)
          new_upper = none_type{};
        else
          new_upper = (long)lower - 1;
      } else {
        if ((long)other.upper > 0)
          new_upper = lower + (long)other.upper * step;
        else if (upper.is_none)
          new_upper = (long)other.upper * step;
        else
          new_upper = (long)upper + (long)other.upper * step;
      }
      return {new_lower, new_upper, new_step};
    }

    /*
       Normalize change a[:-1] to a[:len(a)-1] to have positif index.
       It also check for value bigger than len(a) to fit the size of the
       container
       */
    contiguous_normalized_slice contiguous_slice::normalize(long max_size) const
    {
      long normalized_upper;
      if (upper.is_none)
        normalized_upper = max_size;
      else if (upper < 0L)
        normalized_upper = std::max(-1L, max_size + upper);
      else if (upper > max_size)
        normalized_upper = max_size;
      else
        normalized_upper = (long)upper;

      long normalized_lower = (long)lower;
      if (lower < 0L)
        normalized_lower = std::max(0L, max_size + lower);
      else if (lower > max_size)
        normalized_lower = max_size - 1L;
      else
        normalized_lower = (long)lower;

      return contiguous_normalized_slice(normalized_lower, normalized_upper);
    }

    long contiguous_slice::size() const
    {
      long len;
      if (upper.is_none) {
        assert(lower < 0);
        len = -lower;
      } else
        len = upper - lower;
      return std::max(0L, len);
    }

    inline long contiguous_slice::get(long i) const
    {
      return int(lower) + i;
    }

    slice slice::operator*(contiguous_slice const &other) const
    {
      // We do not implement these because it requires to know the "end"
      // value of the slice which is not possible if it is not "step == 1" slice
      // TODO: We can skip these constraints if we know begin, end and step.
      if ((static_cast<long>(other.upper) < 0 or
           static_cast<long>(other.lower) < 0) and
          step != 1 and step != -1)
        throw std::runtime_error("not implemented");

      none<long> new_lower;
      if ((long)other.lower == 0)
        new_lower = lower;
      else {
        none<long> ref = ((long)other.lower > 0) ? lower : upper;
        if (ref.is_none) {
          if (step > 0)
            new_lower = (long)other.lower * step;
          else
            new_lower = (long)other.lower * step - 1;
        } else
          new_lower = (long)ref + (long)other.lower * step;
      }

      long new_step = step;

      none<long> new_upper;
      if (other.upper.is_none)
        new_upper = upper;
      else {
        none<long> ref = ((long)other.upper > 0) ? lower : upper;
        if (ref.is_none) {
          if (step > 0)
            new_upper = (long)other.upper * step;
          else
            new_upper = (long)other.upper * step - 1;
        } else
          new_upper = (long)ref + (long)other.upper * step;
      }
      return {new_lower, new_upper, new_step};
    }
  }
}

#endif


text:
<?php

namespace iim\BlogBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Validator\Constraints as Assert;
use Vich\UploaderBundle\Mapping\Annotation as Vich;

/**
 * @ORM\Entity
 * @Vich\Uploadable
 */
class Image {
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @Assert\File(
     *     maxSize="1M",
     *     mimeTypes={"image/png", "image/jpeg", "image/pjpeg"}
     * )
     * @Vich\UploadableField(mapping="product_image", fileNameProperty="imageName")
     *
     * @var File $image
     */
    protected $image;

    /**
     * @ORM\Column(type="string", length=255, name="image_name")
     *
     * @var string $imageName
     */
    protected $imageName;

    /**
     * @var integer
     *
     * @ORM\ManyToOne(targetEntity="User")
     */
    private $author;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set imageName
     *
     * @param string $imageName
     * @return Image
     */
    public function setImageName($imageName)
    {
        $this->imageName = $imageName;

        return $this;
    }

    /**
     * Get imageName
     *
     * @return string
     */
    public function getImageName()
    {
        return $this->imageName;
    }

    /**
     * @param \Symfony\Component\HttpFoundation\File\File $image
     */
    public function setImage($image)
    {
        $this->image = $image;
    }

    /**
     * @return \Symfony\Component\HttpFoundation\File\File
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * @param int $author
     */
    public function setAuthor($author)
    {
        $this->author = $author;
    }

    /**
     * @return int
     */
    public function getAuthor()
    {
        return $this->author;
    }

}

redpajama_set_name: RedPajamaGithub


text:
set -e

# we require utilities
source "${DATA_DIR}/utils.sh"

# script variables
LOG_TITLE="build"

# build
log "building site" 0
BUILD_NUMBER=${TRAVIS_BUILD_NUMBER} \
BUILD_HASH=$(git rev-parse HEAD) \
    jekyll build \
        --destination "${OUT_DIR}"


text:
package org.xbib.elasticsearch.knapsack;

public interface KnapsackParameter {

    /**
     * The indices used for knapsack
     */
    String INDEX_PARAM = "index";

    /**
     * The type used for knapsack
     */
    String TYPE_PARAM = "type";

    /**
     * The archive file path parameter name for the knapsack archive
     */
    String PATH_PARAM = "archivepath";

    /**
     * The parameter for configuring archive location
     */
    String KNAPSACK_PATH = "path.knapsack";

    /**
     * The default archives are read.written into this path
     */
    String KNAPSACK_DEFAULT_PATH = "path.logs";

    /**
     * the Elasticsearch host for knapsack push/pull
     */
    String HOST_PARAM = "host";

    /**
     * The knapsack port
     */
    String PORT_PARAM = "port";

    /**
     * The Elasticsearch cluster name for knapsack push/pull
     */
    String CLUSTER_PARAM = "cluster";

    /**
     * Should knapsack sniff for nodes in the Elasticsearch cluster
     */
    String SNIFF_PARAM = "sniff";

    /**
     * Timeout for connections that Knapsack uses
     */
    String TIMEOUT_PARAM = "timeout";

    /**
     * Is knapsack allowed to overwrite archive files or not
     */
    String OVERWRITE_PARAM = "overwrite";

    /**
     * Bulk indexing setting, maximum actions per bulk request
     */
    String MAX_BULK_ACTIONS_PER_REQUEST_PARAM = "max_bulk_actions_per_request";

    /**
     * Bulk indexing setting, maximum concurrecny for bulk requests
     */
    String MAX_BULK_CONCURRENCY_PARAM = "max_bulk_concurrency";

    /**
     * A map for renaming indices/types
     */
    String MAP_PARAM = "map";

    /**
     * Should knapsack consider index metadata (mappings, aliases) or not
     */
    String WITH_METADATA_PARAM = "with_metadata";

    String BYTES_PARAM = "bytes";

    String WITH_ALIASES = "with_aliases";

}


text:
#if !defined(_UHS_host_h_) || defined(USBCORE_H)
#error "Never include UHS_UsbCore.h directly; include UHS_Host.h instead"
#else
#define USBCORE_H

#ifndef UHS_HOST_MAX_INTERFACE_DRIVERS
#define                UHS_HOST_MAX_INTERFACE_DRIVERS 0x10U // Default maximum number of USB interface drivers
#endif

#ifndef SYSTEM_OR_SPECIAL_YIELD
#define SYSTEM_OR_SPECIAL_YIELD(...) VOID0
#endif

#ifndef SYSTEM_OR_SPECIAL_YIELD_FROM_ISR
#define SYSTEM_OR_SPECIAL_YIELD_FROM_ISR(...) SYSTEM_OR_SPECIAL_YIELD
#endif

// As we make extensions to a target interface add to UHS_HOST_MAX_INTERFACE_DRIVERS
// This offset gets calculated for supporting wide subclasses, such as HID, BT, etc.
#define                                 UHS_HID_INDEX (UHS_HOST_MAX_INTERFACE_DRIVERS + 1)

/* Common setup data constant combinations  */
//get descriptor request type
#define                           UHS_bmREQ_GET_DESCR (USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_DEVICE)

//set request type for all but 'set feature' and 'set interface'
#define                                 UHS_bmREQ_SET (USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_DEVICE)

//get interface request type
#define                         UHS_bmREQ_CL_GET_INTF (USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE)

// D7           data transfer direction (0 - host-to-device, 1 - device-to-host)
// D6-5         Type (0- standard, 1 - class, 2 - vendor, 3 - reserved)
// D4-0         Recipient (0 - device, 1 - interface, 2 - endpoint, 3 - other, 4..31 - reserved)

// TO-DO: Use the python script to generate these.
// TO-DO: Add _all_ subclasses here.
// USB Device Classes, Subclasses and Protocols
////////////////////////////////////////////////////////////////////////////////
// Use Class Info in the Interface Descriptors
#define                  UHS_USB_CLASS_USE_CLASS_INFO 0x00U

////////////////////////////////////////////////////////////////////////////////
// Audio
#define                           UHS_USB_CLASS_AUDIO 0x01U
// Subclasses
#define                 UHS_USB_SUBCLASS_AUDIOCONTROL 0x01U
#define               UHS_USB_SUBCLASS_AUDIOSTREAMING 0x02U
#define                UHS_USB_SUBCLASS_MIDISTREAMING 0x03U

////////////////////////////////////////////////////////////////////////////////
// Communications and CDC Control
#define                UHS_USB_CLASS_COM_AND_CDC_CTRL 0x02U

////////////////////////////////////////////////////////////////////////////////
// HID
#define                             UHS_USB_CLASS_HID 0x03U
// Subclasses
#define                         UHS_HID_BOOT_SUBCLASS 0x01U
// Protocols
#define             UHS_HID_PROTOCOL_HIDBOOT_KEYBOARD 0x01U
#define                UHS_HID_PROTOCOL_HIDBOOT_MOUSE 0x02U
////////////////////////////////////////////////////////////////////////////////
// Physical
#define                        UHS_USB_CLASS_PHYSICAL 0x05U

////////////////////////////////////////////////////////////////////////////////
// Image
#define                           UHS_USB_CLASS_IMAGE 0x06U

////////////////////////////////////////////////////////////////////////////////
// Printer
#define                         UHS_USB_CLASS_PRINTER 0x07U

////////////////////////////////////////////////////////////////////////////////
// Mass Storage
#define                    UHS_USB_CLASS_MASS_STORAGE 0x08
// Subclasses
#define           UHS_BULK_SUBCLASS_SCSI_NOT_REPORTED 0x00U   // De facto use
#define                         UHS_BULK_SUBCLASS_RBC 0x01U
#define                       UHS_BULK_SUBCLASS_ATAPI 0x02U   // MMC-5 (ATAPI)
#define                   UHS_BULK_SUBCLASS_OBSOLETE1 0x03U   // Was QIC-157
#define                         UHS_BULK_SUBCLASS_UFI 0x04U   // Specifies how to interface Floppy Disk Drives to USB
#define                   UHS_BULK_SUBCLASS_OBSOLETE2 0x05U   // Was SFF-8070i
#define                        UHS_BULK_SUBCLASS_SCSI 0x06U   // SCSI Transparent Command Set
#define                       UHS_BULK_SUBCLASS_LSDFS 0x07U   // Specifies how host has to negotiate access before trying SCSI
#define                    UHS_BULK_SUBCLASS_IEEE1667 0x08U
// Protocols
#define                            UHS_STOR_PROTO_CBI 0x00U   // CBI (with command completion interrupt)
#define                     UHS_STOR_PROTO_CBI_NO_INT 0x01U   // CBI (without command completion interrupt)
#define                       UHS_STOR_PROTO_OBSOLETE 0x02U
#define                            UHS_STOR_PROTO_BBB 0x50U   // Bulk Only Transport
#define                            UHS_STOR_PROTO_UAS 0x62U

////////////////////////////////////////////////////////////////////////////////
// Hub
#define                             UHS_USB_CLASS_HUB 0x09U

////////////////////////////////////////////////////////////////////////////////
// CDC-Data
#define                        UHS_USB_CLASS_CDC_DATA 0x0AU

////////////////////////////////////////////////////////////////////////////////
// Smart-Card
#define                      UHS_USB_CLASS_SMART_CARD 0x0BU

////////////////////////////////////////////////////////////////////////////////
// Content Security
#define                UHS_USB_CLASS_CONTENT_SECURITY 0x0DU

////////////////////////////////////////////////////////////////////////////////
// Video
#define                           UHS_USB_CLASS_VIDEO 0x0EU

////////////////////////////////////////////////////////////////////////////////
// Personal Healthcare
#define                 UHS_USB_CLASS_PERSONAL_HEALTH 0x0FU

////////////////////////////////////////////////////////////////////////////////
// Diagnostic Device
#define               UHS_USB_CLASS_DIAGNOSTIC_DEVICE 0xDCU

////////////////////////////////////////////////////////////////////////////////
// Wireless Controller
#define                   UHS_USB_CLASS_WIRELESS_CTRL 0xE0U

////////////////////////////////////////////////////////////////////////////////
// Miscellaneous
#define                            UHS_USB_CLASS_MISC 0xEFU

////////////////////////////////////////////////////////////////////////////////
// Application Specific
#define                    UHS_USB_CLASS_APP_SPECIFIC 0xFEU

////////////////////////////////////////////////////////////////////////////////
// Vendor Specific
#define                 UHS_USB_CLASS_VENDOR_SPECIFIC 0xFFU

////////////////////////////////////////////////////////////////////////////////

/* USB state machine states */
#define                       UHS_USB_HOST_STATE_MASK 0xF0U

// Configure states, MSN == 0 --------------------------V
#define                   UHS_USB_HOST_STATE_DETACHED 0x00U
#define                   UHS_USB_HOST_STATE_DEBOUNCE 0x01U
#define      UHS_USB_HOST_STATE_DEBOUNCE_NOT_COMPLETE 0x02U
#define         UHS_USB_HOST_STATE_RESET_NOT_COMPLETE 0x03U
#define                   UHS_USB_HOST_STATE_WAIT_SOF 0x04U
#define             UHS_USB_HOST_STATE_WAIT_BUS_READY 0x05U
#define               UHS_USB_HOST_STATE_RESET_DEVICE 0x0AU
#define                UHS_USB_HOST_STATE_CONFIGURING 0x0CU // Looks like "CO"nfig (backwards)
#define           UHS_USB_HOST_STATE_CONFIGURING_DONE 0x0DU // Looks like "DO"one (backwards)
#define                      UHS_USB_HOST_STATE_CHECK 0x0EU
#define                    UHS_USB_HOST_STATE_ILLEGAL 0x0FU // Foo

// Run states, MSN != 0 --------------------------------V
#define                    UHS_USB_HOST_STATE_RUNNING 0x60U // Looks like "GO"
#define                       UHS_USB_HOST_STATE_IDLE 0x1DU // Looks like "ID"le
#define                      UHS_USB_HOST_STATE_ERROR 0xF0U // Looks like "FO"o
#define                 UHS_USB_HOST_STATE_INITIALIZE 0x10U // Looks like "I"nit

// Host SE result codes.
// Common SE results are stored in the low nybble, all interface drivers understand these plus 0x1F.
// Extended SE results are 0x10-0x1E. SE code only understands these internal to the hardware.
// Values > 0x1F are driver or other internal error conditions.
// Return these result codes from your host controller driver to match the error condition
// ALL Non-zero values are errors.
// Values not listed in this table are not handled in the base class, or any host driver.

#define                           UHS_HOST_ERROR_NONE 0x00U // No error
#define                           UHS_HOST_ERROR_BUSY 0x01U // transfer pending
#define                         UHS_HOST_ERROR_BADREQ 0x02U // Transfer Launch Request was bad
#define                            UHS_HOST_ERROR_DMA 0x03U // DMA was too short, or too long
#define                            UHS_HOST_ERROR_NAK 0x04U // Peripheral returned NAK
#define                          UHS_HOST_ERROR_STALL 0x05U // Peripheral returned STALL
#define                         UHS_HOST_ERROR_TOGERR 0x06U // Toggle error/ISO over-underrun
#define                       UHS_HOST_ERROR_WRONGPID 0x07U // Received wrong Packet ID
#define                          UHS_HOST_ERROR_BADBC 0x08U // Byte count is bad
#define                         UHS_HOST_ERROR_PIDERR 0x09U // Received Packet ID is corrupted
#define                          UHS_HOST_ERROR_BADRQ 0x0AU // Packet error. Increase max packet.
#define                            UHS_HOST_ERROR_CRC 0x0BU // USB CRC was incorrect
#define                           UHS_HOST_ERROR_KERR 0x0CU // K-state instead of response, usually indicates wrong speed
#define                           UHS_HOST_ERROR_JERR 0x0DU // J-state instead of response, usually indicates wrong speed
#define                        UHS_HOST_ERROR_TIMEOUT 0x0EU // Device did not respond in time
#define                         UHS_HOST_ERROR_BABBLE 0x0FU // Line noise/unexpected data
#define                        UHS_HOST_ERROR_MEM_LAT 0x10U // Error caused by memory latency.
#define                           UHS_HOST_ERROR_NYET 0x11U // OUT transfer accepted with NYET

// Addressing error codes
#define                      ADDR_ERROR_INVALID_INDEX 0xA0U
#define                    ADDR_ERROR_INVALID_ADDRESS 0xA1U

// Common Interface Driver error codes
#define           UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED 0xD1U // Driver doesn't support the device or interfaces
#define         UHS_HOST_ERROR_DEVICE_INIT_INCOMPLETE 0xD2U // Init partially finished, but died.
#define     UHS_HOST_ERROR_CANT_REGISTER_DEVICE_CLASS 0xD3U // There was no driver for the interface requested.
#define              UHS_HOST_ERROR_ADDRESS_POOL_FULL 0xD4U // No addresses left in the address pool.
#define           UHS_HOST_ERROR_HUB_ADDRESS_OVERFLOW 0xD5U // No hub addresses left. The maximum is 7.
#define             UHS_HOST_ERROR_NO_ADDRESS_IN_POOL 0xD6U // Address was not allocated in the pool, thus not found.
#define                    UHS_HOST_ERROR_NULL_EPINFO 0xD7U // The supplied endpoint was NULL, indicates a bug or other problem.
#define                   UHS_HOST_ERROR_BAD_ARGUMENT 0xD8U // Indicates a range violation bug.
#define             UHS_HOST_ERROR_DEVICE_DRIVER_BUSY 0xD9U // The interface driver is busy or out buffer is full, try again later.
#define            UHS_HOST_ERROR_BAD_MAX_PACKET_SIZE 0xDAU // The maximum packet size was exceeded. Try again with smaller size.
#define           UHS_HOST_ERROR_NO_ENDPOINT_IN_TABLE 0xDBU // The endpoint could not be found in the endpoint table.
#define                      UHS_HOST_ERROR_UNPLUGGED 0xDEU // Someone removed the USB device, or Vbus was turned off.
#define                          UHS_HOST_ERROR_NOMEM 0xDFU // Out Of Memory.

// Control request stream errors
#define                UHS_HOST_ERROR_FailGetDevDescr 0xE1U
#define             UHS_HOST_ERROR_FailSetDevTblEntry 0xE2U
#define               UHS_HOST_ERROR_FailGetConfDescr 0xE3U
#define                  UHS_HOST_ERROR_END_OF_STREAM 0xEFU

// Host base class specific Error codes
#define                UHS_HOST_ERROR_NOT_IMPLEMENTED 0xFEU
#define               UHS_HOST_ERROR_TRANSFER_TIMEOUT 0xFFU

// SEI interaction defaults
#define                      UHS_HOST_TRANSFER_MAX_MS 10000 // USB transfer timeout in ms, per section 9.2.6.1 of USB 2.0 spec
#define               UHS_HOST_TRANSFER_RETRY_MAXIMUM 3     // 3 retry limit for a transfer
#define                    UHS_HOST_DEBOUNCE_DELAY_MS 500   // settle delay in milliseconds
#define                        UHS_HUB_RESET_DELAY_MS 20    // hub port reset delay, 10ms recommended, but can be up to 20ms

//
// We only provide the minimum needed information for enumeration.
// Interface drivers should be able to set up what is needed with nothing more.
// A driver needs to know the following information:
// 1: address on the USB network, parent and port (aka UsbDeviceAddress)
// 2: endpoints
// 3: vid:pid, class, subclass, protocol
//

struct ENDPOINT_INFO {
        uint8_t bEndpointAddress;       // Endpoint address. Bit 7 indicates direction (0=OUT, 1=IN).
        uint8_t bmAttributes;           // Endpoint transfer type.
        uint16_t wMaxPacketSize;        // Maximum packet size.
        uint8_t bInterval;              // Polling interval in frames.
} __attribute__((packed));

struct INTERFACE_INFO {
        uint8_t bInterfaceNumber;
        uint8_t bAlternateSetting;
        uint8_t numep;
        uint8_t klass;
        uint8_t subklass;
        uint8_t protocol;
        ENDPOINT_INFO epInfo[16];
} __attribute__((packed));

struct ENUMERATION_INFO {
        uint16_t vid;
        uint16_t pid;
        uint16_t bcdDevice;
        uint8_t klass;
        uint8_t subklass;
        uint8_t protocol;
        uint8_t bMaxPacketSize0;
        uint8_t currentconfig;
        uint8_t parent;
        uint8_t port;
        uint8_t address;
        INTERFACE_INFO interface;
} __attribute__((packed));

/* USB Setup Packet Structure   */
typedef struct {
        // offset   description
        //   0      Bit-map of request type
         union {
                uint8_t bmRequestType;

                struct {
                        uint8_t recipient : 5;  // Recipient of the request
                        uint8_t type : 2;       // Type of request
                        uint8_t direction : 1;  // Direction of data transfer
                } __attribute__((packed));
        } ReqType_u;

        //   1      Request
        uint8_t bRequest;

        //   2      Depends on bRequest
        union {
                uint16_t wValue;

                struct {
                        uint8_t wValueLo;
                        uint8_t wValueHi;
                } __attribute__((packed));
        } wVal_u;
        //   4      Depends on bRequest
        uint16_t wIndex;
        //   6      Depends on bRequest
        uint16_t wLength;
        // 8 bytes total
} __attribute__((packed)) SETUP_PKT, *PSETUP_PKT;

// little endian :-)                                                                             8                                8                          8                         8                          16                      16
#define mkSETUP_PKT8(bmReqType, bRequest, wValLo, wValHi, wInd, total) ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wValLo))<<16)|(((uint64_t)(wValHi))<<24)|(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48)))
#define mkSETUP_PKT16(bmReqType, bRequest, wVal, wInd, total)          ((uint64_t)(((uint64_t)(bmReqType)))|(((uint64_t)(bRequest))<<8)|(((uint64_t)(wVal  ))<<16)                           |(((uint64_t)(wInd))<<32)|(((uint64_t)(total)<<48)))

// Big endian -- but we aren't able to use this :-/
//#define mkSETUP_PKT8(bmReqType, bRequest, wValLo, wValHi, wInd, total) ((uint64_t)(((uint64_t)(bmReqType))<<56)|(((uint64_t)(bRequest))<<48)|(((uint64_t)(wValLo))<<40)|(((uint64_t)(wValHi))<<32)|(((uint64_t)(wInd))<<16)|((uint64_t)(total)))
//#define mkSETUP_PKT16(bmReqType, bRequest, wVal, wInd, total)          ((uint64_t)(((uint64_t)(bmReqType))<<56)|(((uint64_t)(bRequest))<<48)                           |(((uint64_t)(wVal))<<32)  |(((uint64_t)(wInd))<<16)|((uint64_t)(total)))

#endif /* USBCORE_H */


text:
using System;
using System.Collections.Generic;
using System.Linq;

namespace _05.Parking_Validation
{
    public class Program
    {
        public static void Main()
        {
            var n = int.Parse(Console.ReadLine());
            var carResult = new Dictionary<string, string>();
            for (int i = 0; i < n; i++)
            {
                var input = Console.ReadLine().Split().ToList();
                var command = input[0];
                switch (command)
                {
                    case "register":
                        Register(carResult, input);
                        break;
                    case "unregister":
                        Unreagister(carResult, input);
                        break;
                }
            }
            foreach (var userAndPlate in carResult)
            {
                Console.WriteLine($"{userAndPlate.Key} => {userAndPlate.Value}");
            }
        }

        private static void Unreagister(Dictionary<string, string> carResult, List<string> input)
        {
            var username = input[1];
            if (!carResult.ContainsKey(username))
            {
                Console.WriteLine($"ERROR: user {username} not found");
            }
            else
            {
                carResult.Remove(username);
                Console.WriteLine($"user {username} unregistered successfully");
            }
        }

        private static void Register(Dictionary<string, string> carResult, List<string> input)
        {
            var username = input[1];
            var licensePlateNumber = input[2];
            bool isValid = false;
            isValid = ValidatePlateNumber(licensePlateNumber, isValid);
            if (isValid)
            {

                if (carResult.ContainsKey(username))
                {
                    Console.WriteLine($"ERROR: already registered with plate number {carResult.Values.Last()}");
                }
                else if (carResult.Values.Contains(licensePlateNumber))
                {
                    Console.WriteLine($"ERROR: license plate {licensePlateNumber} is busy");
                }
                else
                {
                    carResult.Add(username, licensePlateNumber);
                    Console.WriteLine($"{username} registered {licensePlateNumber} successfully");
                }
            }
            else
            {
                Console.WriteLine($"ERROR: invalid license plate {licensePlateNumber}");
            }

        }

        private static bool ValidatePlateNumber(string licensePlateNumber, bool isValid)
        {
            if (licensePlateNumber.Length == 8)
            {
                var licensePlateParts = licensePlateNumber.ToCharArray();
                if ((licensePlateParts[0] >= 65 && licensePlateParts[0] <= 90)
                    && (licensePlateParts[1] >= 65
                    && licensePlateParts[1] <= 90)
                    && (licensePlateParts[licensePlateParts.Length - 2] >= 65
                    && licensePlateParts[licensePlateParts.Length - 2] <= 90)
                    && (licensePlateParts[licensePlateParts.Length - 1] >= 65)
                    && (licensePlateParts[licensePlateParts.Length - 1] <= 90))
                {
                    for (int i = 2; i < licensePlateParts.Length - 2; i++)
                    {
                        if (int.TryParse(licensePlateParts[i].ToString(), out _))
                        {
                            isValid = true;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
            return isValid;
        }
    }
}


text:
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/kernels/mlir_generated/base_cpu_op.h"

namespace tensorflow {

GENERATE_AND_REGISTER_UNARY_CPU_KERNEL(Ceil, DT_HALF);
GENERATE_AND_REGISTER_UNARY_CPU_KERNEL(Ceil, DT_FLOAT);
GENERATE_AND_REGISTER_UNARY_CPU_KERNEL(Ceil, DT_DOUBLE);

}  // namespace tensorflow


text:
@implementation CustomFullScreenAnimatedTransitioning

- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext
{
    return 1;
}

- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
{
    UIViewController *from = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
    UIViewController *to   = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];

    to.view.alpha = 0.f;
    to.view.frame = [transitionContext finalFrameForViewController:to];

    // [transitionContext containerView] is UITransitionView
    [[transitionContext containerView] addSubview:to.view];

    [UIView animateWithDuration:1
                          delay:0
                        options:UIViewAnimationOptionCurveEaseIn
                     animations:^{
                         from.view.transform = CGAffineTransformMakeRotation(M_PI);
                         from.view.transform = CGAffineTransformMakeScale(0.1, 0.1);
                         to.view.alpha = 1.f;
                     }
                     completion:^(BOOL finished) {
                         from.view.transform = CGAffineTransformIdentity;
                         [transitionContext completeTransition:YES];
                     }];
}

@end


text:
import { Component, Input, OnInit } from '@angular/core';
import { Hero } from './hero';
import { HeroService } from './hero.service';

import { Router } from '@angular/router';

@Component({
  selector: 'my-heroes',
  styleUrls:['./heroes.component.css'],
  templateUrl: './heroes.component.html'
})
export class HeroesComponent  implements OnInit {
  heroes: Hero[];
  title = 'Tour of Heroes';

  selectedHero: Hero;

  constructor(
    private router: Router,
    private heroService: HeroService
  ) { }

  ngOnInit(): void{
    this.getHeroes();
  }

  onSelect(hero: Hero): void {
    this.selectedHero = hero;
  }

  getHeroes(): void {
    this.heroService.getHeroesSlowly().then(heroes => this.heroes = heroes);
  }

  gotoDetail(): void {
    this.router.navigate(['/detail', this.selectedHero.id]);
  }
}


text:
layout: post
title: How to add/edit a post in your jekyll blog?
---

This post describes how to make changes to your jekyll blog. It can be done locally, where the github pages repo is local to your machine. Or, changes can also can done directly on github. The preview feature on github while adding a post makes it very easy to verify the format before it goes live in github.io website.

###Local Development

1. Clone your github pages repo on your local machine `git clone https://github.com/yourusername/yourusername.github.io.git`
2. Create you page under posts directory `_posts/2016-3-3-Hello-World.md`
3. Serve the site using this command jekyll serve
4. View local website at http://0.0.0.0:4000
5. Once the changes are done, use regular git commands to push the changes to github pages repo.

###Remote - Github / Thirdparty Content Editor

1. Visit `https://github.com/yourusername/yourusername.github.io/tree/master/_posts`
2. Click on Create New File button to create a new post with the same format `yyyy-mm-dd-Title.mld`
3. You can preview the page before you commit the changes.


text:
package codegen

import (
	"fmt"
	"go/token"
	"math"
	"strings"
)

type InstrOpType int

const (
	OP_INVALID InstrOpType = iota
	OP_DATA                // int8/uint8,,..., int64/uint64
	OP_XMM                 // f32/f64, packed f32, packed f64
	OP_PACKED              // packed int8/uint8,....,int63/uint64
)

type OpDataType struct {
	op InstrOpType
	InstrData
	xmmvariant XmmData
}

func (optype OpDataType) String() string {
	return fmt.Sprintf("OpDataType{Op:%v, InstrData: %v, Xmm: %v}", optype.op, optype.InstrData, optype.xmmvariant)
}

type InstrData struct {
	size   uint
	signed bool
}

type XmmData int

const (
	XMM_INVALID XmmData = iota
	XMM_F32
	XMM_F64
	XMM_4X_F32
	XMM_2X_F64
	XMM_F128  = XMM_2X_F64
	XMM_M128  = XMM_F128 // [4]float32
	XMM_M128i = XMM_F128 // [16]byte
	XMM_M128d = XMM_F128 // [2]float64

	XMM_I8X16 = XMM_F32
	XMM_U8X16 = XMM_I8X16

	XMM_I16X8 = XMM_F64
	XMM_U16X8 = XMM_I16X8

	XMM_I32X4 = XMM_4X_F32
	XMM_U32X4 = XMM_I32X4

	XMM_I64X2 = XMM_2X_F64
	XMM_U64X2 = XMM_I64X2
)

type Instruction int
type DataInstruction struct {
	TInstr InstructionType

	// integer forms
	ByteSized Instruction
	WordSized Instruction
	LongSized Instruction
	QuadSized Instruction
	OctSized  Instruction

	// xmm forms
	/*SingleF32 Instr
	SingleF64 Instr
	PackedF32 Instr // operates on four packed f32
	PackedF64 Instr // operate on two packed f64*/

}

type XmmInstruction struct {
	XmmInstr InstructionType
	F32      Instruction // operates on single f32
	F64      Instruction // operates on single f64
	F32x4    Instruction // operates on four packed f32
	F64x2    Instruction // operate on two packed f64
}

func (inst DataInstruction) GetSized(size uint) Instruction {
	var instr Instruction
	switch size {
	case 1:
		instr = inst.ByteSized
	case 2:
		instr = inst.WordSized
	case 4:
		instr = inst.LongSized
	case 8:
		instr = inst.QuadSized
	case 16:
		instr = inst.OctSized
	}

	if instr == NONE {
		msgstr := "invalid size(%v), for instr (%v)"
		ice(fmt.Sprintf(msgstr, size, inst.TInstr))
	}

	return instr

}

type InstructionType int

const (
	I_INVALID InstructionType = iota
	I_ADD
	I_AND
	I_CMP

	// convert f32/64 to a uint8/int8, ..., uint64/int64
	I_CVT_FLOAT2INT
	// convert f32/f64 to a uint8/int8, ..., uint64/int64
	I_CVT_INT2FLOAT

	// convert f32/f64 to f64/f32
	I_CVT_FLOAT2FLOAT

	I_DIV
	I_IMUL
	I_IDIV
	I_LEA
	I_MOV

	// mov byte, sign extend
	I_MOVBSX
	// mov word, sign extend
	I_MOVWSX
	// mov long, sign extend
	I_MOVLSX

	// mov byte, zero extend
	I_MOVBZX
	// mov word, zero extend
	I_MOVWZX
	// mov long, zero extend
	I_MOVLZX
	I_MUL

	I_OR

	// instructions for packed integers
	I_PADD
	I_PAND
	I_PANDN
	I_PCMPEQ
	I_PCMPGT
	I_PIMUL
	I_PMUL
	I_POR
	I_PSLL //packed shift left logical
	I_PSRA // packed shift right arithmetic
	I_PSRL //packed shift right logical
	I_PSUB
	I_PXOR
	I_PMOV

	I_SAL
	I_SAR

	I_SHL
	I_SHR
	I_SUB
	I_XOR
)

var Insts = []DataInstruction{
	{I_ADD, ADDB, ADDW, ADDL, ADDQ, NONE},
	{I_SUB, SUBB, SUBW, SUBL, SUBQ, NONE},
	{I_MOV, MOVB, MOVW, MOVL, MOVQ, MOVOU},

	// byte register sign extend to xxx register
	{I_MOVBSX, NONE, MOVBWSX, MOVBLSX, MOVBQSX, NONE},
	// word register sign extend to xxx register
	{I_MOVWSX, NONE, NONE, MOVWLSX, MOVWQSX, NONE},
	// long register sign extend to xxx register
	{I_MOVLSX, NONE, NONE, NONE, MOVLQSX, NONE},

	// mov byte, zero extend to xxx register
	{I_MOVBZX, NONE, MOVBWZX, MOVBLZX, MOVBQZX, NONE},
	// mov word, zero extend to xxx register
	{I_MOVWZX, NONE, NONE, MOVWLZX, MOVWQZX, NONE},
	// mov long, zero extend to xxx register
	{I_MOVLZX, NONE, NONE, NONE, MOVLQZX, NONE},

	{I_XOR, XORB, XORW, XORL, XORQ, NONE},
	{I_LEA, NONE, LEAW, LEAL, LEAQ, NONE},
	{I_MUL, MULB, MULW, MULL, MULQ, NONE},

	// signed multiplication
	{I_IMUL, IMULB, IMULW, IMULL, IMULQ, NONE},

	{I_DIV, DIVB, DIVW, DIVL, DIVQ, NONE},

	// signed division
	{I_IDIV, IDIVB, IDIVW, IDIVL, IDIVQ, NONE},

	{I_AND, ANDB, ANDW, ANDL, ANDQ, NONE},
	{I_OR, ORB, ORW, ORL, ORQ, NONE},
	{I_SHL, SHLB, SHLW, SHLL, SHLQ, NONE},
	{I_SHR, SHRB, SHRW, SHRL, SHRQ, NONE},

	// arithmetic shift left (signed left shift)
	{I_SAL, SALB, SHLW, SHLL, SHLQ, NONE},
	// arithmetic shift right (signed right shift)
	{I_SAR, SARB, SARW, SARL, SARQ, NONE},

	{I_CMP, CMPB, CMPW, CMPL, CMPQ, NONE},
}

var XmmInsts = []XmmInstruction{
	// floating point
	{I_ADD, ADDSS, ADDSD, ADDPS, ADDPD},
	{I_CMP, UCOMISS, UCOMISD, NONE, NONE},
	{I_DIV, DIVSS, DIVSD, DIVPS, DIVPD},
	{I_MOV, MOVSS, MOVSD, MOVUPS, MOVUPD},
	{I_MUL, MULSS, MULSD, MULPS, MULPD},
	{I_SUB, SUBSS, SUBSD, SUBPS, SUBPD},
	{I_XOR, NONE, NONE, XORPS, XORPD},

	// Add packed integer
	//
	// From 64-IA-32-Architectures-Software-Developer-Instruction-Set-Reference-Manual:
	//
	// Adds the packed byte, word, doubleword, or quadword integers in the
	// first source operand to the second source operand and stores the result
	// in the destination operand (which is usually the second source operand).
	//
	// When a result is too large to be represented
	// in the 8/16/32 integer (overflow), the result is wrapped around and the
	// low bits are written to the destination element (that is, the carry is ignored).
	// Note that these instructions can operate on either unsigned or signed
	// (two's complement notation) integers; however, it does not set bits in
	// the EFLAGS register to indicate overflow and/or a carry. To prevent
	// undetected overflow conditions, software must control the ranges of
	// the values operated on .
	{I_PADD, PADDB, PADDW, PADDL, PADDQ},

	{I_PAND, PANDB, PANDW, PANDL, PAND},
	// bitwise logical and not (&^)
	{I_PANDN, NONE, NONE, NONE, PANDN},
	{I_PCMPEQ, PCMPEQB, PCMPEQW, PCMPEQL, NONE},
	{I_PCMPGT, PCMPGTB, PCMPGTW, PCMPGTL, NONE},

	// packed signed multiplication
	{I_PIMUL, NONE, PMULLW, NONE, NONE},

	// mov packed integers
	{I_PMOV, MOVOU, MOVOU, MOVOU, MOVOU},

	// bitwise logical, operates on full register width, so same version used for all
	// op types
	{I_POR, POR, POR, POR, POR},

	// packed shift left logical
	{I_PSLL, NONE, PSLLW, PSLLL, PSLLQ},

	// packed shift right arithmetic
	{I_PSRA, NONE, PSRAW, PSRAL, NONE},

	// packed shift right logical
	{I_PSRL, NONE, PSRLW, PSRLL, PSRLQ},

	// packed unsigned multiplication
	{I_PMUL, NONE, NONE, PMULULQ, NONE},

	// Subtract packed integers
	//
	// From 64-IA-32-Architectures-Software-Developer-Instruction-Set-Reference-Manual:
	// Performs a SIMD subtract of the packed integers of the source operand
	// (second operand) from the packed integers of the destination operand
	// (first operand), and stores the packed integer results in the
	// destination operand (which is usually the second source operand).
	// When an individual result is too large or too small to be represented,
	// the result is wrapped around and the low bits are written to the
	// destination element.
	{I_PSUB, PSUBB, PSUBW, PSUBL, PSUBQ},

	{I_PXOR, NONE, NONE, NONE, PXOR},
}

func GetInstruction(tinst InstructionType) DataInstruction {
	for _, inst := range Insts {
		if inst.TInstr == tinst {
			return inst
		}
	}
	ice("couldn't get instruction")
	return DataInstruction{}
}

func GetXmmInstruction(tinst InstructionType) XmmInstruction {
	for _, inst := range XmmInsts {
		if inst.XmmInstr == tinst {
			return inst
		}
	}
	ice(fmt.Sprintf("Couldn't get xmm instruction (%v)", tinst))
	return XmmInstruction{}
}

func (xinstr XmmInstruction) Select(variant XmmData) Instruction {
	var instr Instruction
	switch variant {
	case XMM_F32:
		instr = xinstr.F32
	case XMM_F64:
		instr = xinstr.F64
	case XMM_4X_F32:
		instr = xinstr.F32x4
	case XMM_2X_F64:
		instr = xinstr.F64x2
	}
	if instr == NONE {
		s := fmt.Sprintf("unrecognized variant \"%v\" for \"%v\"", variant, xinstr.XmmInstr)
		panic(ice(s))
	}
	return instr
}

func GetConvertInstruction(tinst InstructionType, fromsize, tosize uint) Instruction {
	if tinst == I_CVT_FLOAT2INT {
		if fromsize == 4 && tosize <= 4 {
			// f32 to int32 with truncation
			return CVTTSS2SL
		} else if fromsize == 4 && tosize == 8 {
			// f32 to int64 with truncation
			return CVTTSS2SQ
		} else if fromsize == 8 && tosize <= 4 {
			// f64 to int32 with truncation
			return CVTTSD2SL
		} else if fromsize == 8 && tosize == 8 {
			// f64 to int64 with truncation
			return CVTTSD2SQ
		}
	} else if tinst == I_CVT_INT2FLOAT {
		if fromsize == 4 && tosize == 4 {
			// int32 to f32
			return CVTSL2SS
		} else if fromsize == 4 && tosize == 8 {
			// int32 to f64
			return CVTSL2SD
		} else if fromsize == 8 && tosize == 4 {
			// int64 to f32
			return CVTSQ2SS
		} else if fromsize == 8 && tosize == 8 {
			// int64 to f64
			return CVTSQ2SD
		}
	} else if tinst == I_CVT_FLOAT2FLOAT {
		if fromsize == 4 && tosize == 8 {
			return CVTSS2SD
		} else if fromsize == 8 && tosize == 4 {
			return CVTSD2SS
		}
	}
	ice(fmt.Sprintf("numeric type conversion instruction (%v)", tinst))
	return NONE
}

// GetInstr, the size is in bytes
func GetInstr(tinst InstructionType, datatype OpDataType) Instruction {
	if datatype.op == OP_XMM || datatype.op == OP_PACKED {
		return GetXmmInstruction(tinst).Select(datatype.xmmvariant)
	} else {
		return GetInstruction(tinst).GetSized(datatype.size)
	}
}

// ZeroMemory generates "MOVQ $0, name+offset(REG)" instructions,
// size is in bytes
func ZeroMemory(ctx context, name string, offset int, size uint, reg *register) string {
	chunk := uint(1)
	if size%8 == 0 {
		chunk = 8
	} else if size%4 == 0 {

		chunk = 4
	} else if size%2 == 0 {

		chunk = 2
	} else {

		chunk = 1
	}
	asm := ""
	if size/chunk == 0 {
		return asm
	}
	datatype := OpDataType{OP_DATA, InstrData{signed: false, size: chunk}, XMM_INVALID}
	mov := GetInstr(I_MOV, datatype)
	for i := uint(0); i < size/chunk; i++ {
		ioffset := int(i*chunk) + offset
		asm += instrImmMem(ctx, mov, 0, reg, name, ioffset)
	}
	return asm
}

func instrReg(ctx context, instr Instruction, reg *register, spill bool) string {
	if _, ok := instrTable[instr]; !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := instrTable[instr].Flags
	asm := ""
	if flags&RightRdwr != 0 || flags&RightWrite != 0 {
		asm += reg.modified(ctx, spill)
	}
	asm += fmt.Sprintf("%-9v    %v\n", instr, reg.name)
	return asm
}

func instrRegReg(ctx context, instr Instruction, src, dst *register, spill bool) string {
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags
	asm := ""
	if flags&LeftRdwr != 0 {
		asm += src.modified(ctx, spill)
	}
	if (flags&RightRdwr != 0) || (flags&RightWrite != 0) {
		asm += dst.modified(ctx, spill)
	}
	asm += fmt.Sprintf("%-9v    %v, %v\n", instr, src.name, dst.name)
	return asm
}

func instrRegMem(ctx context, instr Instruction, src, dst *register, dstName string, dstOffset int, spill bool) string {
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags

	var asm string
	if flags&LeftRdwr != 0 {
		asm += src.modified(ctx, spill)
	}
	if dstName != "" || dstOffset != 0 {
		asm += fmt.Sprintf("%-9v    %v, %v+%v(%v)\n", instr, src.name, dstName, dstOffset, dst.name)
	} else {
		asm += fmt.Sprintf("%-9v    %v, (%v)\n", instr, src.name, dst.name)
	}
	return strings.Replace(asm, "+-", "-", -1)
}

func instrMemReg(ctx context, instr Instruction, srcName string, srcOffset int, src, dst *register, spill bool) string {
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags

	var asm string
	if (flags&RightRdwr != 0) || (flags&RightWrite != 0) {
		asm += dst.modified(ctx, spill)
	}
	if srcName != "" || srcOffset != 0 {
		asm += fmt.Sprintf("%-9v    %v+%v(%v), %v\n", instr, srcName, srcOffset, src.name, dst.name)
	} else {
		asm += fmt.Sprintf("%-9v    (%v), %v\n", instr, src.name, dst.name)
	}
	return strings.Replace(asm, "+-", "-", -1)
}

// instrImmReg outputs instr with imm, reg after converting imm to int8/16/32/64 if size=1/2/4/8.
func instrImmReg(ctx context, instr Instruction, imm int64, size uint, dst *register, spill bool) string {
	if dst.width < 8*size {
		ice("Invalid register width")
	}
	switch size {
	case 1:
		imm = int64(int8(imm))
	case 2:
		imm = int64(int16(imm))
	case 4:
		imm = int64(int32(imm))
	}
	var asm string
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags
	if (flags&RightRdwr != 0) || (flags&RightWrite != 0) {
		asm += dst.modified(ctx, spill)
	}
	asm += fmt.Sprintf("%-9v    $%v, %v\n", instr, imm, dst.name)
	return asm
}

// instrImmReg outputs instr with imm, reg after converting imm to int8/16/32/64 if size=1/2/4/8.
func instrImmMem(ctx context, instr Instruction, imm int64, dst *register, dstName string, dstOffset int) string {
	asm := fmt.Sprintf("%-9v    $%v, %v+%v(%v)\n", instr, imm, dstName, dstOffset, dst.name)
	return strings.Replace(asm, "+-", "-", -1)
}

// instrImmUnsignedReg outputs instr with imm64, reg
func instrImmUnsignedReg(ctx context, instr Instruction, imm64 uint64, size uint, r *register, spill bool) string {
	if r.width < 8*size {
		ice("Invalid register width")
	}
	var asm string
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags
	if (flags&RightRdwr != 0) || (flags&RightWrite != 0) {
		asm += r.modified(ctx, spill)
	}
	asm += fmt.Sprintf("%-9v    $%v, %v\n", instr, imm64, r.name)
	return asm
}

func instrMemImm32(instr Instruction, name string, offset int32, r *register, imm32 uint32, size uint) string {
	if r.width != 64 {
		ice("Invalid register width")
	}
	asm := fmt.Sprintf("%-9v    %v+%v(%v), $%v\n", instr, name, offset, r.name, imm32)
	return strings.Replace(asm, "+-", "-", -1)

}

func instrRegImm32(ctx context, instr Instruction, r *register, imm32 uint32, size uint, spill bool) string {
	if r.width < 8*size {
		ice("Invalid register width")
	}
	var asm string
	info, ok := instrTable[instr]
	if !ok {
		ice(fmt.Sprintf("couldn't look up instruction (%v) information", instr))
	}
	flags := info.Flags
	if flags&LeftRdwr != 0 {
		asm += r.modified(ctx, spill)
	}
	asm += fmt.Sprintf("%-9v    %v, $%v\n", instr, r.name, imm32)
	return asm
}

// instrImmRegReg outputs instr with imm, reg, reg after converting imm to int8/16/32 if size=1/2/4.
func instrImmRegReg(ctx context, instr Instruction, imm int64, size uint, src, dst *register, spill bool) string {
	if dst.width < 8*size {
		ice("Invalid register width")
	}
	switch size {
	case 1:
		imm = int64(int8(imm))
	case 2:
		imm = int64(int16(imm))
	case 4:
		imm = int64(int32(imm))
	}

	// HACK! should lookup flags
	asm := dst.modified(ctx, spill)

	asm += fmt.Sprintf("%-9v    $%v, %v, %v\n", instr, imm, src.name, dst.name)
	return asm
}

func instrImmFloatReg(ctx context, instr Instruction, f64 float64, isf32 bool, dst, tmp *register, spill bool) string {
	if dst.typ != XMM_REG {
		ice("Unexpected non xmm register")
	}
	var fbits uint64
	if isf32 {
		fbits = uint64(math.Float32bits(float32(f64)))
	} else {
		fbits = math.Float64bits(f64)
	}
	var descrip string
	if isf32 {
		descrip = "float32"
	} else {
		descrip = "float64"
	}
	asm := fmt.Sprintf("//%-9v  $%v = %016x = %v(%v)\n", " ", fbits, fbits, f64, descrip)
	asm += fmt.Sprintf("%-9v    $%v, %v\n", instr, fbits, tmp.name)

	data := OpDataType{OP_DATA, InstrData{signed: false, size: 8}, XMM_INVALID}
	asm += instrRegReg(ctx, GetInstr(I_MOV, data), tmp, dst, spill)

	return asm
}

// ZeroReg generates "XORQ reg, reg" instructions
func ZeroReg(ctx context, reg *register) string {
	var dt OpDataType
	if reg.typ == XMM_REG {
		dt = OpDataType{OP_XMM, InstrData{}, XMM_2X_F64}

	} else {
		dt = OpDataType{OP_DATA, InstrData{signed: false, size: reg.width / 8}, XMM_INVALID}
	}
	return instrRegReg(ctx, GetInstr(I_XOR, dt), reg, reg, false)
}

func MovRegReg(ctx context, datatype OpDataType, src, dst *register, spill bool) string {
	if src.width != dst.width && src.typ == dst.typ {
		msg := "src (%v) width (%v) != (%v) dst (%v) width or invalid size"
		ice(fmt.Sprintf(msg, src.name, src.width, dst.width, dst.name))
	}
	var mov Instruction
	if src.typ == XMM_REG && dst.typ == XMM_REG {
		mov = MOVO
	} else if src.typ == XMM_REG || dst.typ == XMM_REG {
		mov = MOVQ
	} else {
		mov = GetInstr(I_MOV, datatype)
	}
	return instrRegReg(ctx, mov, src, dst, spill)
}

func MovRegMem(ctx context, datatype OpDataType, src *register, dstName string, dst *register, dstOffset int) string {
	var mov Instruction
	if datatype.op == OP_PACKED {
		mov = GetInstr(I_PMOV, datatype)
	} else {
		mov = GetInstr(I_MOV, datatype)
	}
	return instrRegMem(ctx, mov, src, dst, dstName, dstOffset, false)
}

func MovRegIndirectMem(ctx context, datatype OpDataType, src *register, dstName string, dstOffset int, dst *register, size uint, tmpAddr, tmpData *register) string {
	if size <= DataRegSize {
		return MovRegIndirectMemSmall(ctx, datatype, src, dstName, dstOffset, dst, size, tmpData)
	}
	if tmpAddr.width/8 < sizePtr() {
		ice("register width smaller than ptr size ")
	}
	if size > tmpData.width/8 && size%(tmpData.width/8) != 0 {
		ice(fmt.Sprintf("Invalid size (%v), reg width/8 (%v)", size, tmpAddr.width/8))
	}
	addrdatatype := OpDataType{OP_DATA,
		InstrData{signed: false, size: sizePtr()}, XMM_INVALID}

	mov := GetInstr(I_MOV, datatype)
	movaddr := GetInstr(I_MOV, addrdatatype)
	asm := ""
	var count uint
	var chunk uint
	if size <= tmpData.width/8 {
		count = 1
		chunk = size
	} else {
		chunk = (tmpData.width / 8)
		count = size / chunk
	}
	if count == 0 {
		return asm
	}
	asm += instrRegReg(ctx, movaddr, src, tmpAddr, false)
	for i := uint(0); i < count; i++ {
		asm += instrMemReg(ctx, mov, "", 0, tmpAddr, tmpData, false)
		asm += instrRegMem(ctx, mov, tmpData, dst, dstName, dstOffset, false)
		dstOffset += int(chunk)
		if i < count-1 {
			asm += AddImm32Reg(ctx, uint32(chunk), tmpAddr, false)
		}
	}
	return asm
}

func MovRegIndirectMemSmall(ctx context, datatype OpDataType, src *register, dstName string, dstOffset int, dst *register, size uint, tmpData *register) string {
	if size > tmpData.width/8 && size%(tmpData.width/8) != 0 {
		ice(fmt.Sprintf("Invalid size (%v), reg width/8 (%v)", size, src.size()))
	}
	mov := GetInstr(I_MOV, datatype)
	asm := ""
	if size > tmpData.width/8 {
		ice("size too large")
	}
	if size == 0 {
		return asm
	}
	asm += instrMemReg(ctx, mov, "", 0, src, tmpData, false)
	asm += instrRegMem(ctx, mov, tmpData, dst, dstName, dstOffset, false)
	return asm
}

func MovMemMem(ctx context, optype InstrOpType, srcName string, srcOffset int, src *register, dstName string, dstOffset int, dst *register, size uint, tmp *register) string {
	if src.width != 64 || dst.width != 64 {
		ice("Invalid register width")
	}
	if size%8 != 0 {
		ice("Invalid size")
	}
	var mov Instruction
	if optype == OP_PACKED {
		mov = GetInstr(I_PMOV, OpDataType{OP_PACKED, InstrData{16, false}, XMM_F64})
	} else {
		mov = GetInstr(I_MOV, GetIntegerOpDataType(false, size))
	}
	asm := instrMemReg(ctx, mov, srcName, srcOffset, src, tmp, false)
	asm += instrRegMem(ctx, mov, tmp, dst, dstName, dstOffset, false)
	return asm
}

func MovMemReg(ctx context, datatype OpDataType, srcName string, srcOffset int, src, dst *register, spill bool) string {
	var mov Instruction
	if datatype.op == OP_PACKED {
		mov = GetInstr(I_PMOV, datatype)
	} else {
		var itype InstructionType
		if datatype.size >= dst.size() || datatype.op == OP_XMM {
			itype = I_MOV
		} else {
			switch datatype.size {
			case 1:
				itype = I_MOVBZX
			case 2:
				itype = I_MOVWZX
			case 4:
				itype = I_MOVLZX
			default:
				ice("Invalid size")
			}
		}
		tmpdatatype := datatype
		tmpdatatype.size = dst.size()
		mov = GetInstr(itype, tmpdatatype)
	}
	return instrMemReg(ctx, mov, srcName, srcOffset, src, dst, spill)
}

func MovMemIndirectMem(ctx context, datatype OpDataType, srcName string, srcOffset int, src *register, dstName string, dstOffset int, dst *register, size uint, tmpAddr, tmpData *register) string {
	if tmpAddr.width/8 < sizePtr() {
		ice("register width smaller than ptr size ")
	}
	if size > tmpData.width/8 && size%(tmpData.width/8) != 0 {
		ice(fmt.Sprintf("Invalid size (%v), reg width/8 (%v)", size, tmpAddr.width/8))
	}
	addrdatatype := OpDataType{OP_DATA,
		InstrData{signed: false, size: sizePtr()}, XMM_INVALID}

	mov := GetInstr(I_MOV, datatype)
	movaddr := GetInstr(I_MOV, addrdatatype)
	asm := ""
	var count uint
	var chunk uint
	if size <= tmpData.width/8 {
		count = 1
		chunk = size
	} else {
		chunk = (tmpData.width / 8)
		count = size / chunk
	}
	if count == 0 {
		return asm
	}
	asm += instrMemReg(ctx, movaddr, srcName, srcOffset, src, tmpAddr, false)
	for i := uint(0); i < count; i++ {
		asm += instrMemReg(ctx, mov, "", 0, tmpAddr, tmpData, false)
		asm += instrRegMem(ctx, mov, tmpData, dst, dstName, dstOffset, false)
		dstOffset += int(chunk)
		if i < count-1 {
			asm += AddImm32Reg(ctx, uint32(chunk), tmpAddr, false)
		}
	}
	return asm
}

func MovIntegerSimdMemIndirectMem(ctx context, datatype OpDataType, srcName string, srcOffset int, src *register, dstName string, dstOffset int, dst *register, size uint, tmp1, tmp2 *register) string {
	if tmp1.width/8 < sizePtr() {
		ice("register width smaller than ptr size ")
	}
	if size > tmp2.width/8 && size%(tmp2.width/8) != 0 {
		ice(fmt.Sprintf("Invalid size (%v), reg width/8 (%v)", size, tmp1.width/8))
	}
	addrdatatype := OpDataType{OP_DATA,
		InstrData{signed: false, size: sizePtr()}, XMM_INVALID}

	mov := GetInstr(I_PMOV, datatype)
	movaddr := GetInstr(I_MOV, addrdatatype)
	asm := ""
	var count uint
	var chunk uint
	if size <= tmp2.width/8 {
		count = 1
		chunk = size
	} else {
		chunk = (tmp2.width / 8)
		count = size / chunk
	}
	if count == 0 {
		return asm
	}
	asm += instrMemReg(ctx, movaddr, srcName, srcOffset, src, tmp1, false)
	for i := uint(0); i < count; i++ {
		asm += instrMemReg(ctx, mov, "", 0, tmp1, tmp2, false)
		asm += instrRegMem(ctx, mov, tmp2, dst, dstName, dstOffset, false)
		dstOffset += int(chunk)
		if i < count-1 {
			asm += AddImm32Reg(ctx, uint32(chunk), tmp1, false)
		}
	}
	return asm
}

// asmMovImmReg moves imm to reg after converting it to int8/16/32 if size=1/2/4.
func MovImmReg(ctx context, imm int64, size uint, dst *register, spill bool) string {
	if dst.width < 8*size {
		ice("Invalid register width")
	}
	switch size {
	case 1:
		imm = int64(int8(imm))
	case 2:
		imm = int64(int16(imm))
	case 4:
		imm = int64(int32(imm))
	}
	data := OpDataType{OP_DATA, InstrData{signed: true, size: size}, XMM_INVALID}
	mov := GetInstr(I_MOV, data)
	return instrImmReg(ctx, mov, imm, size, dst, spill)
}

func MovImmFloatReg(ctx context, f64 float64, isf32 bool, tmp, dst *register, spill bool) string {
	data := OpDataType{OP_DATA, InstrData{signed: false, size: tmp.width / 8}, XMM_INVALID}
	mov := GetInstr(I_MOV, data)
	return instrImmFloatReg(ctx, mov, f64, isf32, dst, tmp, spill)
}

func MovImmf32Reg(ctx context, f32 float32, tmp, dst *register, spill bool) string {
	return MovImmFloatReg(ctx, float64(f32), true, tmp, dst, spill)
}

func MovImmf64Reg(ctx context, f64 float64, tmp, dst *register, spill bool) string {
	return MovImmFloatReg(ctx, f64, false, tmp, dst, spill)
}

func MovImm8Reg(ctx context, imm8 int8, dst *register, spill bool) string {
	return MovImmReg(ctx, int64(imm8), 1, dst, spill)
}

func MovImm32Reg(ctx context, imm32 int32, dst *register, spill bool) string {
	return MovImmReg(ctx, int64(imm32), 4, dst, spill)

}

// CMovCCRegReg conditionally moves the src reg to the dst reg if the carry
// flag is clear (ie the previous compare had its src greater than its sub reg).
func CMovCCRegReg(ctx context, src, dst *register, size uint, spill bool) string {
	var cmov Instruction
	if size == 1 {
		// there is conditional byte move
		cmov = CMOVWCC
	} else if size == 2 {
		cmov = CMOVWCC
	} else if size == 4 {
		cmov = CMOVLCC
	} else if size == 8 {
		cmov = CMOVQCC
	}
	return instrRegReg(ctx, cmov, src, dst, spill)
}

func Lea(ctx context, srcName string, srcOffset int, src, dst *register, spill bool) string {
	if src.width != dst.width {
		ice("Invalid register width")
	}
	data := OpDataType{OP_DATA, InstrData{signed: false, size: src.width / 8}, XMM_INVALID}
	lea := GetInstr(I_LEA, data)
	return instrMemReg(ctx, lea, srcName, srcOffset, src, dst, spill)
}

func AddImm32Reg(ctx context, imm32 uint32, dst *register, spill bool) string {
	if dst.width < 32 {
		ice("Invalid register width")
	}
	return instrImmReg(ctx, ADDQ, int64(imm32), 8, dst, spill)
}

func SubImm32Reg(ctx context, imm32 uint32, dst *register, spill bool) string {
	if dst.width < 32 {
		ice("Invalid register width")
	}
	return instrImmReg(ctx, SUBQ, int64(imm32), 8, dst, spill)
}

func AddRegReg(ctx context, datatype OpDataType, src, dst *register, spill bool) string {
	if dst.width != src.width {
		ice("Invalid register width")
	}
	return instrRegReg(ctx, GetInstr(I_ADD, datatype), src, dst, spill)
}

func SubRegReg(ctx context, datatype OpDataType, src, dst *register, spill bool) string {
	if dst.width != src.width {
		ice("Invalid register width")
	}
	return instrRegReg(ctx, GetInstr(I_SUB, datatype), src, dst, spill)
}

func MulImm32RegReg(ctx context, imm32 uint32, src, dst *register, spill bool) string {
	if dst.width < 32 {
		ice("Invalid register width")
	}
	return instrImmRegReg(ctx, IMUL3Q, int64(imm32), 8, src, dst, spill)
}

// MulRegReg multiplies the src register by the dst register and stores
// the result in the dst register. Overflow is discarded
func MulRegReg(ctx context, datatype OpDataType, src, dst *register, spill bool) string {
	if dst.width != src.width {
		ice("Invalid register width")
	}
	asm := ""
	if datatype.op == OP_DATA {
		rax := getRegister(REG_AX)
		rdx := getRegister(REG_DX)
		if rax.width != 64 || rdx.width != 64 {
			ice("Invalid rax or rdx register width")
		}
		// rax is the implicit destination for MULQ
		asm = MovRegReg(ctx, datatype, dst, rax, false)
		// the low order part of the result is stored in rax and the high order part
		// is stored in rdx
		var tinstr InstructionType
		if datatype.signed {
			tinstr = I_IMUL
		} else {
			tinstr = I_MUL
		}
		mul := GetInstr(tinstr, datatype)
		asm += instrReg(ctx, mul, src, false)
		asm += MovRegReg(ctx, datatype, rax, dst, spill)
		return asm
	}
	if datatype.op == OP_XMM {
		asm += instrRegReg(ctx, GetInstr(I_MUL, datatype), src, dst, spill)
	}
	return asm
}

// DivRegReg divides the "dividend" register by the "divisor" register and stores
// the quotient in rax and the remainder in rdx. DivRegReg is only for integer division.
func DivRegReg(ctx context, signed bool, datatype InstrOpType, dividend, divisor *register, size uint) (asm string, rax *register, rdx *register) {
	if dividend.width != divisor.width || divisor.width < size*8 {
		ice("Invalid register width for DivRegReg")
	}
	if datatype != OP_DATA {
		ice("Unsupported arithmetic data type")
	}
	rax = getRegister(REG_AX)
	if size > 1 {
		rdx = getRegister(REG_DX)
	}
	if rax.width != 64 || (size > 1 && rdx.width != 64) {
		ice("Invalid rax or rdx register width")
	}

	// rdx:rax are the upper and lower parts of the dividend respectively,
	// and rdx:rax are the implicit destination of DIVQ
	asm = ""
	asm += ZeroReg(ctx, rax)
	if size > 1 {
		asm += ZeroReg(ctx, rdx)
	}
	dt := OpDataType{datatype, InstrData{signed: signed, size: size}, XMM_INVALID}
	asm += MovRegReg(ctx, dt, dividend, rax, false)

	// the low order part of the result is stored in rax and the high order part
	// is stored in rdx
	var tinstr InstructionType
	if signed {
		tinstr = I_IDIV
	} else {
		tinstr = I_DIV
	}

	asm += instrReg(ctx, GetInstr(tinstr, dt), divisor, false)
	return asm, rax, rdx
}

// DivFloatRegReg performs floating point division by dividing the dividend register
// by the divisor register and stores the quotient in the dividend register
func DivFloatRegReg(ctx context, datatype OpDataType, dividend, divisor *register, spill bool) string {
	if dividend.width != divisor.width {
		ice("Invalid register width")
	}
	if datatype.op != OP_XMM {
		ice("Unsupported data type for floating point division")
	}
	return instrRegReg(ctx, GetInstr(I_DIV, datatype), divisor, dividend, true)
}

func ArithOp(ctx context, datatype OpDataType, op token.Token, x, y, result *register) string {
	if x.width != y.width || x.width != result.width {
		ice("Invalid register width")
	}
	asm := ""
	switch op {
	default:
		ice(fmt.Sprintf("Unknown Op token (%v)", op))
	case token.ADD:
		asm += MovRegReg(ctx, datatype, x, result, false)
		asm += AddRegReg(ctx, datatype, y, result, false)
	case token.SUB:
		asm += MovRegReg(ctx, datatype, x, result, false)
		asm += SubRegReg(ctx, datatype, y, result, false)
	case token.MUL:
		asm += MovRegReg(ctx, datatype, x, result, false)
		asm += MulRegReg(ctx, datatype, y, result, false)
	case token.QUO, token.REM:
		if datatype.op == OP_DATA {
			// the quotient is stored in rax and
			// the remainder is stored in rdx.
			var rax, rdx *register
			a, rax, rdx := DivRegReg(ctx, datatype.signed, datatype.op, x, y, datatype.size)
			asm += a
			if op == token.QUO {
				asm += MovRegReg(ctx, datatype, rax, result, false)
			} else {
				asm += MovRegReg(ctx, datatype, rdx, result, false)
			}
		} else {
			// assume quotient operation,
			// since modulus isn't defined for floats
			asm += MovRegReg(ctx, datatype, x, result, false)
			asm += DivFloatRegReg(ctx, datatype, result, y, false)
		}
	}
	return asm
}

// AndRegReg AND's the src register by the dst register and stores
// the result in the dst register.
func AndRegReg(ctx context, src, dst *register, size uint, spill bool) string {
	if src.width != dst.width {
		ice("Invalid register width")
	}
	dt := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	and := GetInstr(I_AND, dt)
	return instrRegReg(ctx, and, src, dst, spill)
}

func OrRegReg(ctx context, src, dst *register, spill bool) string {
	if src.width != dst.width {
		ice("Invalid register width")
	}
	dt := OpDataType{OP_DATA, InstrData{signed: false, size: src.width / 8}, XMM_INVALID}
	return instrRegReg(ctx, GetInstr(I_OR, dt), src, dst, spill)
}

func XorRegReg(ctx context, src, dst *register, spill bool) string {
	if src.width != dst.width {
		ice("Invalid register width")
	}
	dt := OpDataType{OP_DATA, InstrData{signed: false, size: src.width / 8}, XMM_INVALID}
	return instrRegReg(ctx, GetInstr(I_XOR, dt), src, dst, spill)
}

func XorImm32Reg(ctx context, imm32 int32, dst *register, size uint, spill bool) string {
	data := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	xor := GetInstr(I_XOR, data)
	return instrImmReg(ctx, xor, int64(imm32), size, dst, spill)
}

func XorImm64Reg(ctx context, imm64 int64, dst *register, size uint, spill bool) string {
	data := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	xor := GetInstr(I_XOR, data)
	return instrImmReg(ctx, xor, imm64, size, dst, spill)
}

func NotReg(ctx context, reg *register, size uint, spill bool) string {
	return XorImm32Reg(ctx, -1, reg, size, spill)
}

const (
	SHIFT_LEFT = iota
	SHIFT_RIGHT
)

func MovZeroExtend(ctx context, src, dst *register, srcSize, dstSize uint, spill bool) string {
	var movzx InstructionType
	switch srcSize {
	default:
		ice(fmt.Sprintf("Internal error, bad zero extend size (%v)", srcSize))
	case 1:
		movzx = I_MOVBZX
	case 2:
		movzx = I_MOVWZX
	case 4:
		movzx = I_MOVLZX
	}
	if dstSize <= srcSize || (dstSize != 1 && dstSize != 2 && dstSize != 4 && dstSize != 8) {
		ice(fmt.Sprintf("Bad dstSize (%v) for zero extend result", dstSize))
	}
	dt := OpDataType{OP_DATA, InstrData{signed: false, size: dstSize}, XMM_INVALID}
	return instrRegReg(ctx, GetInstr(movzx, dt), src, dst, spill)
}

func MovSignExtend(ctx context, src, dst *register, srcSize, dstSize uint, spill bool) string {
	var movsx InstructionType
	switch srcSize {
	default:
		ice(fmt.Sprintf("Internal error, bad sign extend size (%v)", srcSize))
	case 1:
		movsx = I_MOVBSX
	case 2:
		movsx = I_MOVWSX
	case 4:
		movsx = I_MOVLSX
	}
	dt := OpDataType{OP_DATA, InstrData{signed: false, size: dstSize}, XMM_INVALID}
	asm := instrRegReg(ctx, GetInstr(movsx, dt), src, dst, spill)
	return asm
}

// ShiftRegReg shifts src by shiftReg amount and stores the result in src.
// The tmp reg is used for intermediates (if shifting right 64 times then SHR
// isn't used directly)
func ShiftRegReg(ctx context, signed bool, direction int, src, shiftReg, tmp *register, size uint, spill bool) string {
	cl := getRegister(REG_CL)
	cx := getRegister(REG_CX)
	regCl := cx

	var opcode InstructionType
	if direction == SHIFT_LEFT {
		opcode = I_SHL
	} else if !signed && direction == SHIFT_RIGHT {
		opcode = I_SHR
	} else if signed && direction == SHIFT_RIGHT {
		opcode = I_SAR
	}
	data := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	shift := GetInstr(opcode, data)
	asm := ""

	if size == 1 {
		regCl = cl
	}

	maxShift := 8 * uint32(size)
	completeShift := int32(maxShift)
	// the shl/shr instructions mast the shift count to either
	// 5 or 6 bits (5 if not operating on a 64bit value)
	if completeShift == 32 || completeShift == 64 {
		completeShift--
	}
	instrdata := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	asm += MovRegReg(ctx, instrdata, shiftReg, cx, false)

	asm += MovImm32Reg(ctx, completeShift, tmp, false)
	// compare only first byte of shift reg,
	// since useful shift can be at most 64
	asm += CmpRegImm32(ctx, shiftReg, maxShift, 1)
	asm += CMovCCRegReg(ctx, tmp, cx, size, false)

	var zerosize uint = 1
	asm += MovZeroExtend(ctx, cl, cx, zerosize, cx.width/8, false)
	asm += instrRegReg(ctx, shift, regCl, src, spill)

	if maxShift == 64 || maxShift == 32 {
		asm += MovImm32Reg(ctx, 1, tmp, false)
		// compare only first byte of shift reg,
		// since useful shift can be at most 64
		asm += XorRegReg(ctx, cx, cx, false)
		asm += CmpRegImm32(ctx, shiftReg, maxShift, 1)
		asm += CMovCCRegReg(ctx, tmp, cx, size, false)
		var zerosize uint = 1
		asm += MovZeroExtend(ctx, cl, cx, zerosize, cx.width/8, false)
		asm += instrRegReg(ctx, shift, regCl, src, spill)
	}
	return asm
}

func ShiftImm8Reg(ctx context, signed bool, direction int, count uint8, reg *register) string {
	var opcode InstructionType
	if direction == SHIFT_LEFT {
		opcode = I_SHL
	} else if !signed && direction == SHIFT_RIGHT {
		opcode = I_SHR
	} else if signed && direction == SHIFT_RIGHT {
		opcode = I_SAR
	}
	data := OpDataType{OP_DATA, InstrData{signed: false, size: reg.size()}, XMM_INVALID}
	shift := GetInstr(opcode, data)
	asm := ""
	// the shl/shr instructions mast the shift count to either
	// 5 or 6 bits (5 if not operating on a 64bit value)
	if (reg.width == 32 && count >= 32) || (reg.width == 64 && count >= 64) {
		asm += ZeroReg(ctx, reg)
	} else {
		asm += fmt.Sprintf("%-9v    $%v, %v\n", shift, count, reg.name)
	}
	return asm
}

func AndNotRegReg(ctx context, src, dst *register, size uint, spill bool) string {
	if src.width != dst.width {
		ice("Invalid register width")
	}
	asm := NotReg(ctx, dst, size, spill)
	asm += AndRegReg(ctx, src, dst, size, spill)
	return asm
}

func BitwiseOp(ctx context, op token.Token, signed bool, x, y, result *register, size uint) string {
	if x.width != y.width || x.width != result.width {
		ice("Invalid register width")
	}
	asm := ""
	instrdata := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	switch op {
	default:
		ice(fmt.Sprintf("Unknown Op token (%v)", op))
	case token.AND:
		asm = MovRegReg(ctx, instrdata, y, result, false)
		asm += AndRegReg(ctx, x, result, size, false)
	case token.OR:
		asm = MovRegReg(ctx, instrdata, y, result, false)
		asm += OrRegReg(ctx, x, result, false)
	case token.XOR:
		asm = MovRegReg(ctx, instrdata, y, result, false)
		asm += XorRegReg(ctx, x, result, false)
	case token.SHL:
		asm = MovRegReg(ctx, instrdata, x, result, false)
		tmp := x
		asm += ShiftRegReg(ctx, signed, SHIFT_LEFT, result, y, tmp, size, false)
	case token.SHR:
		asm = MovRegReg(ctx, instrdata, x, result, false)
		tmp := x
		asm += ShiftRegReg(ctx, signed, SHIFT_RIGHT, result, y, tmp, size, false)
	case token.AND_NOT:
		asm = MovRegReg(ctx, instrdata, y, result, false)
		asm += AndNotRegReg(ctx, x, result, size, false)
	}
	return asm
}

func CmpRegReg(ctx context, odt OpDataType, x, y *register) string {
	if x.width != y.width {
		ice("Invalid register width")
	}
	return instrRegReg(ctx, GetInstr(I_CMP, odt), x, y, false)
}

func CmpRegImm32(ctx context, r *register, imm32 uint32, size uint) string {
	if r.width != 64 {
		ice("Invalid register width")
	}
	data := OpDataType{OP_DATA, InstrData{signed: false, size: size}, XMM_INVALID}
	cmp := GetInstr(I_CMP, data)
	return instrRegImm32(ctx, cmp, r, imm32, size, false)
}

// CmpOp compares x to y, storing the op comparison flag (EQ, NEQ, ...) in result
func CmpOp(ctx context, data OpDataType, op token.Token, x *register, y *register, result *register) string {
	if x.width != y.width {
		ice(fmt.Sprintf("Invalid register width, x.width (%v), y.width (%v), result.width (%v)", x.width, y.width, result.width))
	}
	asm := ""
	asm += CmpRegReg(ctx, data, x, y)
	switch op {
	default:
		ice(fmt.Sprintf("Unknown Op token (%v)", op))
	case token.EQL:
		asm += instrReg(ctx, SETEQ, result, false)
	case token.NEQ:
		asm += instrReg(ctx, SETNE, result, false)
	case token.LEQ:
		// for some reason the SETXX are flipped for xmm compares
		if data.op == OP_XMM {
			asm += instrReg(ctx, SETCC, result, false)
		} else {
			if data.signed {
				asm += instrReg(ctx, SETLE, result, false)
			} else {
				asm += instrReg(ctx, SETLS, result, false)
			}
		}
	case token.GEQ:
		// for some reason the SETXX are flipped for xmm compares
		if data.op == OP_XMM {
			asm += instrReg(ctx, SETLS, result, false)
		} else {
			if data.signed {
				asm += instrReg(ctx, SETGE, result, false)
			} else {
				asm += instrReg(ctx, SETCC, result, false)
			}
		}
	case token.LSS:
		// for some reason the SETXX are flipped for xmm compares
		if data.op == OP_XMM {
			asm += instrReg(ctx, SETHI, result, false)
		} else {
			if data.signed {
				asm += instrReg(ctx, SETLT, result, false)
			} else {
				asm += instrReg(ctx, SETCS, result, false)
			}
		}
	case token.GTR:
		// for some reason the SETXX are flipped for xmm compares
		if data.op == OP_XMM {
			asm += instrReg(ctx, SETCS, result, false)
		} else {
			if data.signed {
				asm += instrReg(ctx, SETGT, result, false)
			} else {
				asm += instrReg(ctx, SETHI, result, false)
			}
		}
	}
	return asm
}

func isIntegerOp(datatype OpDataType) bool {
	return datatype.op == OP_DATA
}

func isFloatOp(datatype OpDataType) bool {
	return datatype.op == OP_XMM
}

func ConvertOp(ctx context, from *register, fromtype OpDataType, to *register, totype OpDataType, tmp *register) string {
	if isIntegerOp(fromtype) && isIntegerOp(totype) {
		return IntegerToInteger(ctx, from, to, fromtype, totype)
	} else if isIntegerOp(fromtype) && isFloatOp(totype) {
		return IntegerToFloat(ctx, from, to, fromtype, totype, tmp)
	} else if isFloatOp(fromtype) && isIntegerOp(totype) {
		return FloatToInteger(ctx, from, to, fromtype, totype)
	} else if isFloatOp(fromtype) && isFloatOp(totype) {
		return FloatToFloat(ctx, from, to, fromtype, totype)
	} else {
		ice(fmt.Sprintf("Internal error, converting betwen type %v and %v", fromtype.op, totype.op))
	}
	return ""
}

func IntegerToInteger(ctx context, from, to *register, ftype, totype OpDataType) string {
	if ftype.size < totype.size {
		if ftype.signed {
			// From Go Spec:
			// If the value is a signed integer, it is sign extended to implicit infinite precision;
			// It is then truncated to fit in the result type's size.
			return MovSignExtend(ctx, from, to, ftype.size, totype.size, false)
		} else {
			return MovZeroExtend(ctx, from, to, ftype.size, totype.size, false)
		}
	}
	return MovRegReg(ctx, totype, from, to, false)
}

func XmmInstrDataSize(xmmtype XmmData) uint {
	if xmmtype == XMM_F32 {
		return 4
	} else if xmmtype == XMM_F64 {
		return 8
	} else if xmmtype == XMM_4X_F32 {
		return 16
	} else if xmmtype == XMM_2X_F64 {
		return 16
	}
	ice("Internal error getting floating point instr size")
	return uint(math.MaxUint64)
}

func IntegerToFloat(ctx context, from, to *register, ftype, totype OpDataType, tmp *register) string {
	tosize := XmmInstrDataSize(totype.xmmvariant)
	fromsize := ftype.size
	fromreg := from
	// no direct conversion from int8/int16 to float32/float64
	if ftype.size < 4 {
		fromsize = 4
		fromreg = tmp
		if ftype.signed {
			MovSignExtend(ctx, from, tmp, ftype.size, fromsize, false)
		} else {
			MovZeroExtend(ctx, from, tmp, ftype.size, fromsize, false)
		}
	} else if ftype.size == 4 && !ftype.signed {
		fromsize = 8
		fromreg = tmp
		MovZeroExtend(ctx, from, tmp, ftype.size, fromsize, false)
	}
	cvt := GetConvertInstruction(I_CVT_INT2FLOAT, fromsize, tosize)
	return instrRegReg(ctx, cvt, fromreg, to, false)
}

func FloatToInteger(ctx context, from, to *register, ftype, totype OpDataType) string {
	// From Go Spec:
	// When converting a floating-point number to an integer,
	// the fraction is discarded (truncation towards zero).
	fromsize := XmmInstrDataSize(ftype.xmmvariant)
	cvt := GetConvertInstruction(I_CVT_FLOAT2INT, fromsize, totype.size)
	return instrRegReg(ctx, cvt, from, to, false)
}

func FloatToFloat(ctx context, from, to *register, ftype, totype OpDataType) string {
	fromsize := XmmInstrDataSize(ftype.xmmvariant)
	cvt := GetConvertInstruction(I_CVT_FLOAT2FLOAT, fromsize, totype.size)
	return instrRegReg(ctx, cvt, from, to, false)
}

func Ret() string {
	return fmt.Sprintf("RET\n")
}


text:
metalsmith-sitemap
==========================
This provides a [metalsmith](http://www.metalsmith.io/) plugin to generate a sitemap according to the
[Sitemaps Protocol](http://www.sitemaps.org/protocol.html). There are four pieces of information possible for on any page.
The URL of the page (loc), the last modified date (lastmod), the change frequency (changefreq) and the priority. loc is
the only value that is required.

###Options
```
var Sitemap = require('metalsmith-sitemap');

Sitemap({
    ignoreFiles: [/test.xml/], // Matched files will be ignored
    output: 'sitemap.xml', // The location where the final sitemap should be placed
    urlProperty: 'seo.canonical', // Key for URL property
    hostname: 'http://www.metalsmith.io', // hostname to use for URL, if needed
    modifiedProperty: 'modified', // Key for last modified property
    defaults: { // You can provide default values for any property in here
        priority: 0.5,
        changefreq: 'daily'
    }
})
```
Note that the property keys (`urlProperty`, `modifiedProperty`) can use the dot syntax to traverse the front matter
object for any given page.

###Front Matter
There are a few properties that Sitemap will use from a files front matter. The first two, mentioned above, are
configurable. The next two are expected to be at a set location. These are page specific values for `priority` and
`changefreq` which should be at `sitemap.priority` and `sitemap.changefreq` respectively.

The last piece of front matter that the sitemap pays attention to is another way of ignoring files. If a file has
`private` set to true in the front matter it will be skipped in the sitemap`private` set to true in the front matter it
will be skipped inthe sitemap.


text:
<?php
/** @noinspection PhpDocSignatureInspection */

namespace App\Tests\Unit\Services\TaskTypePreparer;

use App\Entity\Task\Task;
use App\Event\TaskEvent;
use App\Services\TaskTypePreparer\FinalTaskPreparer;
use Doctrine\ORM\EntityManagerInterface;

class FinalTaskPreparerTest extends \PHPUnit\Framework\TestCase
{
    public function testInvokeEventPropagationStopped()
    {
        $task = new Task();
        $taskEvent = new TaskEvent($task);
        $taskEvent->stopPropagation();

        $entityManager = \Mockery::mock(EntityManagerInterface::class);
        $entityManager
            ->shouldNotReceive('persist');
        $entityManager
            ->shouldNotReceive('flush');

        $finalTaskPreparer = new FinalTaskPreparer($entityManager);
        $finalTaskPreparer->__invoke($taskEvent);

        $this->addToAssertionCount(\Mockery::getContainer()->mockery_getExpectationCount());
    }

    public function testInvokeEventPropagationNotStopped()
    {
        $task = new Task();
        $taskEvent = new TaskEvent($task);

        $entityManager = \Mockery::mock(EntityManagerInterface::class);
        $entityManager
            ->shouldReceive('persist')
            ->once()
            ->with($task);

        $entityManager
            ->shouldReceive('flush')
            ->once();

        $finalTaskPreparer = new FinalTaskPreparer($entityManager);
        $finalTaskPreparer->__invoke($taskEvent);

        $this->addToAssertionCount(\Mockery::getContainer()->mockery_getExpectationCount());
    }

    protected function tearDown()
    {
        parent::tearDown();

        \Mockery::close();
    }
}


text:
//
// Resource Limits
//

#pragma once

#include "glslang/Include/ResourceLimits.h"

const TBuiltInResource DefaultTBuiltInResource = {
  /* .MaxLights = */ 32,
  /* .MaxClipPlanes = */ 6,
  /* .MaxTextureUnits = */ 32,
  /* .MaxTextureCoords = */ 32,
  /* .MaxVertexAttribs = */ 64,
  /* .MaxVertexUniformComponents = */ 4096,
  /* .MaxVaryingFloats = */ 64,
  /* .MaxVertexTextureImageUnits = */ 32,
  /* .MaxCombinedTextureImageUnits = */ 80,
  /* .MaxTextureImageUnits = */ 32,
  /* .MaxFragmentUniformComponents = */ 4096,
  /* .MaxDrawBuffers = */ 32,
  /* .MaxVertexUniformVectors = */ 128,
  /* .MaxVaryingVectors = */ 8,
  /* .MaxFragmentUniformVectors = */ 16,
  /* .MaxVertexOutputVectors = */ 16,
  /* .MaxFragmentInputVectors = */ 15,
  /* .MinProgramTexelOffset = */ -8,
  /* .MaxProgramTexelOffset = */ 7,
  /* .MaxClipDistances = */ 8,
  /* .MaxComputeWorkGroupCountX = */ 65535,
  /* .MaxComputeWorkGroupCountY = */ 65535,
  /* .MaxComputeWorkGroupCountZ = */ 65535,
  /* .MaxComputeWorkGroupSizeX = */ 1024,
  /* .MaxComputeWorkGroupSizeY = */ 1024,
  /* .MaxComputeWorkGroupSizeZ = */ 64,
  /* .MaxComputeUniformComponents = */ 1024,
  /* .MaxComputeTextureImageUnits = */ 16,
  /* .MaxComputeImageUniforms = */ 8,
  /* .MaxComputeAtomicCounters = */ 8,
  /* .MaxComputeAtomicCounterBuffers = */ 1,
  /* .MaxVaryingComponents = */ 60,
  /* .MaxVertexOutputComponents = */ 64,
  /* .MaxGeometryInputComponents = */ 64,
  /* .MaxGeometryOutputComponents = */ 128,
  /* .MaxFragmentInputComponents = */ 128,
  /* .MaxImageUnits = */ 8,
  /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
  /* .MaxCombinedShaderOutputResources = */ 8,
  /* .MaxImageSamples = */ 0,
  /* .MaxVertexImageUniforms = */ 0,
  /* .MaxTessControlImageUniforms = */ 0,
  /* .MaxTessEvaluationImageUniforms = */ 0,
  /* .MaxGeometryImageUniforms = */ 0,
  /* .MaxFragmentImageUniforms = */ 8,
  /* .MaxCombinedImageUniforms = */ 8,
  /* .MaxGeometryTextureImageUnits = */ 16,
  /* .MaxGeometryOutputVertices = */ 256,
  /* .MaxGeometryTotalOutputComponents = */ 1024,
  /* .MaxGeometryUniformComponents = */ 1024,
  /* .MaxGeometryVaryingComponents = */ 64,
  /* .MaxTessControlInputComponents = */ 128,
  /* .MaxTessControlOutputComponents = */ 128,
  /* .MaxTessControlTextureImageUnits = */ 16,
  /* .MaxTessControlUniformComponents = */ 1024,
  /* .MaxTessControlTotalOutputComponents = */ 4096,
  /* .MaxTessEvaluationInputComponents = */ 128,
  /* .MaxTessEvaluationOutputComponents = */ 128,
  /* .MaxTessEvaluationTextureImageUnits = */ 16,
  /* .MaxTessEvaluationUniformComponents = */ 1024,
  /* .MaxTessPatchComponents = */ 120,
  /* .MaxPatchVertices = */ 32,
  /* .MaxTessGenLevel = */ 64,
  /* .MaxViewports = */ 16,
  /* .MaxVertexAtomicCounters = */ 0,
  /* .MaxTessControlAtomicCounters = */ 0,
  /* .MaxTessEvaluationAtomicCounters = */ 0,
  /* .MaxGeometryAtomicCounters = */ 0,
  /* .MaxFragmentAtomicCounters = */ 8,
  /* .MaxCombinedAtomicCounters = */ 8,
  /* .MaxAtomicCounterBindings = */ 1,
  /* .MaxVertexAtomicCounterBuffers = */ 0,
  /* .MaxTessControlAtomicCounterBuffers = */ 0,
  /* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
  /* .MaxGeometryAtomicCounterBuffers = */ 0,
  /* .MaxFragmentAtomicCounterBuffers = */ 1,
  /* .MaxCombinedAtomicCounterBuffers = */ 1,
  /* .MaxAtomicCounterBufferSize = */ 16384,
  /* .MaxTransformFeedbackBuffers = */ 4,
  /* .MaxTransformFeedbackInterleavedComponents = */ 64,
  /* .MaxCullDistances = */ 8,
  /* .MaxCombinedClipAndCullDistances = */ 8,
  /* .MaxSamples = */ 4,
  /* .maxMeshOutputVerticesNV = */ 256,
  /* .maxMeshOutputPrimitivesNV = */ 512,
  /* .maxMeshWorkGroupSizeX_NV = */ 32,
  /* .maxMeshWorkGroupSizeY_NV = */ 1,
  /* .maxMeshWorkGroupSizeZ_NV = */ 1,
  /* .maxTaskWorkGroupSizeX_NV = */ 32,
  /* .maxTaskWorkGroupSizeY_NV = */ 1,
  /* .maxTaskWorkGroupSizeZ_NV = */ 1,
  /* .maxMeshViewCountNV = */ 4,

  /* .limits = */ {
      /* .nonInductiveForLoops = */ 1,
      /* .whileLoops = */ 1,
      /* .doWhileLoops = */ 1,
      /* .generalUniformIndexing = */ 1,
      /* .generalAttributeMatrixVectorIndexing = */ 1,
      /* .generalVaryingIndexing = */ 1,
      /* .generalSamplerIndexing = */ 1,
      /* .generalVariableIndexing = */ 1,
      /* .generalConstantMatrixVectorIndexing = */ 1,
  }};


text:
<?xml version="1.0"?>
<package>
  <name>bridge</name>
  <version>0.0.0</version>
  <description>The bridge package containing a utility for sending a msg over a standard multicasting port</description>
  <maintainer email="dksteele@captechu.edu">Daniel Steele</maintainer>
  <author email="dksteele@captechu.edu">Daniel Steele</author>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>topic_tools</build_depend>
  <build_depend>rosconsole</build_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>topic_tools</run_depend>
  <run_depend>message_runtime</run_depend>
  <run_depend>rosconsole</run_depend>

  <export>
  </export>
</package>