Merge "Add VTS tests for drm+crypto HALs" into oc-dev
diff --git a/audio/2.0/default/Device.cpp b/audio/2.0/default/Device.cpp
index 8a51cd7..5ced0bc 100644
--- a/audio/2.0/default/Device.cpp
+++ b/audio/2.0/default/Device.cpp
@@ -59,6 +59,14 @@
     }
 }
 
+void Device::closeInputStream(audio_stream_in_t* stream) {
+    mDevice->close_input_stream(mDevice, stream);
+}
+
+void Device::closeOutputStream(audio_stream_out_t* stream) {
+    mDevice->close_output_stream(mDevice, stream);
+}
+
 char* Device::halGetParameters(const char* keys) {
     return mDevice->get_parameters(mDevice, keys);
 }
@@ -160,7 +168,7 @@
     ALOGV("open_output_stream status %d stream %p", status, halStream);
     sp<IStreamOut> streamOut;
     if (status == OK) {
-        streamOut = new StreamOut(mDevice, halStream);
+        streamOut = new StreamOut(this, halStream);
     }
     AudioConfig suggestedConfig;
     HidlUtils::audioConfigFromHal(halConfig, &suggestedConfig);
@@ -196,7 +204,7 @@
     ALOGV("open_input_stream status %d stream %p", status, halStream);
     sp<IStreamIn> streamIn;
     if (status == OK) {
-        streamIn = new StreamIn(mDevice, halStream);
+        streamIn = new StreamIn(this, halStream);
     }
     AudioConfig suggestedConfig;
     HidlUtils::audioConfigFromHal(halConfig, &suggestedConfig);
diff --git a/audio/2.0/default/Device.h b/audio/2.0/default/Device.h
index 46177fc..7738361 100644
--- a/audio/2.0/default/Device.h
+++ b/audio/2.0/default/Device.h
@@ -98,6 +98,8 @@
 
     // Utility methods for extending interfaces.
     Result analyzeStatus(const char* funcName, int status);
+    void closeInputStream(audio_stream_in_t* stream);
+    void closeOutputStream(audio_stream_out_t* stream);
     audio_hw_device_t* device() const { return mDevice; }
 
   private:
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index b641e82..2745607 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -135,7 +135,7 @@
 
 }  // namespace
 
-StreamIn::StreamIn(audio_hw_device_t* device, audio_stream_in_t* stream)
+StreamIn::StreamIn(const sp<Device>& device, audio_stream_in_t* stream)
         : mIsClosed(false), mDevice(device), mStream(stream),
           mStreamCommon(new Stream(&stream->common)),
           mStreamMmap(new StreamMmap<audio_stream_in_t>(stream)),
@@ -154,9 +154,8 @@
         status_t status = EventFlag::deleteEventFlag(&mEfGroup);
         ALOGE_IF(status, "read MQ event flag deletion error: %s", strerror(-status));
     }
-    mDevice->close_input_stream(mDevice, mStream);
+    mDevice->closeInputStream(mStream);
     mStream = nullptr;
-    mDevice = nullptr;
 }
 
 // Methods from ::android::hardware::audio::V2_0::IStream follow.
diff --git a/audio/2.0/default/StreamIn.h b/audio/2.0/default/StreamIn.h
index b867387..950d68f 100644
--- a/audio/2.0/default/StreamIn.h
+++ b/audio/2.0/default/StreamIn.h
@@ -27,6 +27,7 @@
 #include <hidl/Status.h>
 #include <utils/Thread.h>
 
+#include "Device.h"
 #include "Stream.h"
 
 namespace android {
@@ -55,7 +56,7 @@
     typedef MessageQueue<uint8_t, kSynchronizedReadWrite> DataMQ;
     typedef MessageQueue<ReadStatus, kSynchronizedReadWrite> StatusMQ;
 
-    StreamIn(audio_hw_device_t* device, audio_stream_in_t* stream);
+    StreamIn(const sp<Device>& device, audio_stream_in_t* stream);
 
     // Methods from ::android::hardware::audio::V2_0::IStream follow.
     Return<uint64_t> getFrameSize()  override;
@@ -101,10 +102,10 @@
 
   private:
     bool mIsClosed;
-    audio_hw_device_t *mDevice;
+    const sp<Device> mDevice;
     audio_stream_in_t *mStream;
-    sp<Stream> mStreamCommon;
-    sp<StreamMmap<audio_stream_in_t>> mStreamMmap;
+    const sp<Stream> mStreamCommon;
+    const sp<StreamMmap<audio_stream_in_t>> mStreamMmap;
     std::unique_ptr<CommandMQ> mCommandMQ;
     std::unique_ptr<DataMQ> mDataMQ;
     std::unique_ptr<StatusMQ> mStatusMQ;
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index d820f3c..88045a0 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -135,7 +135,7 @@
 
 }  // namespace
 
-StreamOut::StreamOut(audio_hw_device_t* device, audio_stream_out_t* stream)
+StreamOut::StreamOut(const sp<Device>& device, audio_stream_out_t* stream)
         : mIsClosed(false), mDevice(device), mStream(stream),
           mStreamCommon(new Stream(&stream->common)),
           mStreamMmap(new StreamMmap<audio_stream_out_t>(stream)),
@@ -155,9 +155,8 @@
         ALOGE_IF(status, "write MQ event flag deletion error: %s", strerror(-status));
     }
     mCallback.clear();
-    mDevice->close_output_stream(mDevice, mStream);
+    mDevice->closeOutputStream(mStream);
     mStream = nullptr;
-    mDevice = nullptr;
 }
 
 // Methods from ::android::hardware::audio::V2_0::IStream follow.
diff --git a/audio/2.0/default/StreamOut.h b/audio/2.0/default/StreamOut.h
index bbe64a1..99352bc 100644
--- a/audio/2.0/default/StreamOut.h
+++ b/audio/2.0/default/StreamOut.h
@@ -27,6 +27,7 @@
 #include <fmq/MessageQueue.h>
 #include <utils/Thread.h>
 
+#include "Device.h"
 #include "Stream.h"
 
 namespace android {
@@ -57,7 +58,7 @@
     typedef MessageQueue<uint8_t, kSynchronizedReadWrite> DataMQ;
     typedef MessageQueue<WriteStatus, kSynchronizedReadWrite> StatusMQ;
 
-    StreamOut(audio_hw_device_t* device, audio_stream_out_t* stream);
+    StreamOut(const sp<Device>& device, audio_stream_out_t* stream);
 
     // Methods from ::android::hardware::audio::V2_0::IStream follow.
     Return<uint64_t> getFrameSize()  override;
@@ -112,10 +113,10 @@
 
   private:
     bool mIsClosed;
-    audio_hw_device_t *mDevice;
+    const sp<Device> mDevice;
     audio_stream_out_t *mStream;
-    sp<Stream> mStreamCommon;
-    sp<StreamMmap<audio_stream_out_t>> mStreamMmap;
+    const sp<Stream> mStreamCommon;
+    const sp<StreamMmap<audio_stream_out_t>> mStreamMmap;
     sp<IStreamOutCallback> mCallback;
     std::unique_ptr<CommandMQ> mCommandMQ;
     std::unique_ptr<DataMQ> mDataMQ;
diff --git a/automotive/evs/1.0/IEvsCamera.hal b/automotive/evs/1.0/IEvsCamera.hal
index 1b55d1f..dbcaf92 100644
--- a/automotive/evs/1.0/IEvsCamera.hal
+++ b/automotive/evs/1.0/IEvsCamera.hal
@@ -28,10 +28,10 @@
     /**
      * Returns the ID of this camera.
      *
-     * Returns the string id of this camera. This must be the same value as reported in
-     * the camera_id field of the CameraDesc structure by EvsEnumerator::getCamerList().
+     * Returns the description of this camera. This must be the same value as reported
+     * by EvsEnumerator::getCamerList().
      */
-    getId() generates (string cameraId);
+    getCameraInfo() generates (CameraDesc info);
 
     /**
      * Specifies the depth of the buffer chain the camera is asked to support.
diff --git a/automotive/evs/1.0/IEvsDisplay.hal b/automotive/evs/1.0/IEvsDisplay.hal
index bbad428..12541f3 100644
--- a/automotive/evs/1.0/IEvsDisplay.hal
+++ b/automotive/evs/1.0/IEvsDisplay.hal
@@ -27,7 +27,7 @@
     /**
      * Returns basic information about the EVS display provided by the system.
      *
-     * See the description of the DisplayDesc structure below for details.
+     * See the description of the DisplayDesc structure for details.
      */
      getDisplayInfo() generates (DisplayDesc info);
 
diff --git a/automotive/evs/1.0/IEvsEnumerator.hal b/automotive/evs/1.0/IEvsEnumerator.hal
index 334430b..98d117a 100644
--- a/automotive/evs/1.0/IEvsEnumerator.hal
+++ b/automotive/evs/1.0/IEvsEnumerator.hal
@@ -31,14 +31,14 @@
      */
     getCameraList() generates (vec<CameraDesc> cameras);
 
-
     /**
      * Get the IEvsCamera associated with a cameraId from a CameraDesc
      *
      * Given a camera's unique cameraId from ca CameraDesc, returns
-     * the ICamera interface assocaited with the specified camera.
-     * When done using the camera, it must be returned by calling
-     * closeCamera on the ICamera interface.
+     * the ICamera interface associated with the specified camera.
+     * When done using the camera, the caller may release it by calling closeCamera().
+     * TODO(b/36122635) Reliance on the sp<> going out of scope is not recommended because the
+     * resources may not be released right away due to asynchronos behavior in the hardware binder.
      */
     openCamera(string cameraId) generates (IEvsCamera carCamera);
 
@@ -57,6 +57,9 @@
      * There can be at most one EVS display object for the system and this function
      * requests access to it. If the EVS display is not available or is already in use,
      * a null pointer is returned.
+     * When done using the display, the caller may release it by calling closeDisplay().
+     * TODO(b/36122635) Reliance on the sp<> going out of scope is not recommended because the
+     * resources may not be released right away due to asynchronos behavior in the hardware binder.
      */
     openDisplay() generates (IEvsDisplay display);
 
@@ -64,7 +67,7 @@
      * Return the specified IEvsDisplay interface as no longer in use
      *
      * When the IEvsDisplay object is no longer required, it must be released.
-     * NOTE: All buffer must have been returned to the display before making this call.
+     * NOTE: All buffers must have been returned to the display before making this call.
      */
     closeDisplay(IEvsDisplay display);
 
diff --git a/automotive/evs/1.0/default/Android.bp b/automotive/evs/1.0/default/Android.bp
index 8b214e3..2574e86 100644
--- a/automotive/evs/1.0/default/Android.bp
+++ b/automotive/evs/1.0/default/Android.bp
@@ -23,4 +23,9 @@
         "liblog",
         "libutils",
     ],
+
+    cflags: [
+        "-O0",
+        "-g",
+    ],
 }
diff --git a/automotive/evs/1.0/default/EvsCamera.cpp b/automotive/evs/1.0/default/EvsCamera.cpp
index c4436ee..148b796 100644
--- a/automotive/evs/1.0/default/EvsCamera.cpp
+++ b/automotive/evs/1.0/default/EvsCamera.cpp
@@ -17,6 +17,7 @@
 #define LOG_TAG "android.hardware.automotive.evs@1.0-service"
 
 #include "EvsCamera.h"
+#include "EvsEnumerator.h"
 
 #include <ui/GraphicBufferAllocator.h>
 #include <ui/GraphicBufferMapper.h>
@@ -30,18 +31,15 @@
 namespace implementation {
 
 
-// These are the special camera names for which we'll initialize custom test data
+// Special camera names for which we'll initialize alternate test data
 const char EvsCamera::kCameraName_Backup[]    = "backup";
-const char EvsCamera::kCameraName_RightTurn[] = "Right Turn";
+
 
 // Arbitrary limit on number of graphics buffers allowed to be allocated
 // Safeguards against unreasonable resource consumption and provides a testable limit
 const unsigned MAX_BUFFERS_IN_FLIGHT = 100;
 
 
-// TODO(b/31632518):  Need to get notification when our client dies so we can close the camera.
-// As it stands, if the client dies suddenly, the buffer may be stranded.
-
 EvsCamera::EvsCamera(const char *id) :
         mFramesAllowed(0),
         mFramesInUse(0),
@@ -53,22 +51,14 @@
 
     // Set up dummy data for testing
     if (mDescription.cameraId == kCameraName_Backup) {
-        mDescription.hints                  = static_cast<uint32_t>(UsageHint::USAGE_HINT_REVERSE);
-        mDescription.vendorFlags            = 0xFFFFFFFF;   // Arbitrary value
-        mDescription.defaultHorResolution   = 320;          // 1/2 NTSC/VGA
-        mDescription.defaultVerResolution   = 240;          // 1/2 NTSC/VGA
-    } else if (mDescription.cameraId == kCameraName_RightTurn) {
-        // Nothing but the name and the usage hint
-        mDescription.hints                  = static_cast<uint32_t>(UsageHint::USAGE_HINT_RIGHT_TURN);
+        mWidth  = 640;          // full NTSC/VGA
+        mHeight = 480;          // full NTSC/VGA
+        mDescription.vendorFlags = 0xFFFFFFFF;   // Arbitrary value
     } else {
-        // Leave empty for a minimalist camera description without even a hint
+        mWidth  = 320;          // 1/2 NTSC/VGA
+        mHeight = 240;          // 1/2 NTSC/VGA
     }
 
-
-    // Set our buffer properties
-    mWidth  = (mDescription.defaultHorResolution) ? mDescription.defaultHorResolution : 640;
-    mHeight = (mDescription.defaultVerResolution) ? mDescription.defaultVerResolution : 480;
-
     mFormat = HAL_PIXEL_FORMAT_RGBA_8888;
     mUsage  = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE |
               GRALLOC_USAGE_SW_READ_RARELY | GRALLOC_USAGE_SW_WRITE_RARELY;
@@ -77,32 +67,49 @@
 
 EvsCamera::~EvsCamera() {
     ALOGD("EvsCamera being destroyed");
-    std::lock_guard<std::mutex> lock(mAccessLock);
+    forceShutdown();
+}
+
+
+//
+// This gets called if another caller "steals" ownership of the camera
+//
+void EvsCamera::forceShutdown()
+{
+    ALOGD("EvsCamera forceShutdown");
 
     // Make sure our output stream is cleaned up
     // (It really should be already)
     stopVideoStream();
 
+    // Claim the lock while we work on internal state
+    std::lock_guard <std::mutex> lock(mAccessLock);
+
     // Drop all the graphics buffers we've been using
-    GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
-    for (auto&& rec : mBuffers) {
-        if (rec.inUse) {
-            ALOGE("Error - releasing buffer despite remote ownership");
+    if (mBuffers.size() > 0) {
+        GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
+        for (auto&& rec : mBuffers) {
+            if (rec.inUse) {
+                ALOGE("Error - releasing buffer despite remote ownership");
+            }
+            alloc.free(rec.handle);
+            rec.handle = nullptr;
         }
-        alloc.free(rec.handle);
-        rec.handle = nullptr;
+        mBuffers.clear();
     }
 
-    ALOGD("EvsCamera destroyed");
+    // Put this object into an unrecoverable error state since somebody else
+    // is going to own the underlying camera now
+    mStreamState = DEAD;
 }
 
 
 // Methods from ::android::hardware::automotive::evs::V1_0::IEvsCamera follow.
-Return<void> EvsCamera::getId(getId_cb id_cb) {
-    ALOGD("getId");
+Return<void> EvsCamera::getCameraInfo(getCameraInfo_cb _hidl_cb) {
+    ALOGD("getCameraInfo");
 
-    id_cb(mDescription.cameraId);
-
+    // Send back our self description
+    _hidl_cb(mDescription);
     return Void();
 }
 
@@ -111,6 +118,12 @@
     ALOGD("setMaxFramesInFlight");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
+    // If we've been displaced by another owner of the camera, then we can't do anything else
+    if (mStreamState == DEAD) {
+        ALOGE("ignoring setMaxFramesInFlight call when camera has been lost.");
+        return EvsResult::OWNERSHIP_LOST;
+    }
+
     // We cannot function without at least one video buffer to send data
     if (bufferCount < 1) {
         ALOGE("Ignoring setMaxFramesInFlight with less than one buffer requested");
@@ -130,6 +143,11 @@
     ALOGD("startVideoStream");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
+    // If we've been displaced by another owner of the camera, then we can't do anything else
+    if (mStreamState == DEAD) {
+        ALOGE("ignoring startVideoStream call when camera has been lost.");
+        return EvsResult::OWNERSHIP_LOST;
+    }
     if (mStreamState != STOPPED) {
         ALOGE("ignoring startVideoStream call when a stream is already running.");
         return EvsResult::STREAM_ALREADY_RUNNING;
@@ -207,6 +225,7 @@
         lock.lock();
 
         mStreamState = STOPPED;
+        mStream = nullptr;
         ALOGD("Stream marked STOPPED.");
     }
 
@@ -232,6 +251,12 @@
     ALOGD("setExtendedInfo");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
+    // If we've been displaced by another owner of the camera, then we can't do anything else
+    if (mStreamState == DEAD) {
+        ALOGE("ignoring setExtendedInfo call when camera has been lost.");
+        return EvsResult::OWNERSHIP_LOST;
+    }
+
     // We don't store any device specific information in this implementation
     return EvsResult::INVALID_ARG;
 }
@@ -358,7 +383,9 @@
 
     while (true) {
         bool timeForFrame = false;
-        // Lock scope
+        nsecs_t startTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+        // Lock scope for updating shared state
         {
             std::lock_guard<std::mutex> lock(mAccessLock);
 
@@ -427,8 +454,15 @@
             }
         }
 
-        // We arbitrarily choose to generate frames at 10 fps (1/10 * uSecPerSec)
-        usleep(100000);
+        // We arbitrarily choose to generate frames at 12 fps to ensure we pass the 10fps test requirement
+        static const int kTargetFrameRate = 12;
+        static const nsecs_t kTargetFrameTimeUs = 1000*1000 / kTargetFrameRate;
+        const nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+        const nsecs_t workTimeUs = (now - startTime) / 1000;
+        const nsecs_t sleepDurationUs = kTargetFrameTimeUs - workTimeUs;
+        if (sleepDurationUs > 0) {
+            usleep(sleepDurationUs);
+        }
     }
 
     // If we've been asked to stop, send one last NULL frame to signal the actual end of stream
diff --git a/automotive/evs/1.0/default/EvsCamera.h b/automotive/evs/1.0/default/EvsCamera.h
index ee91ca4..ff6eb39 100644
--- a/automotive/evs/1.0/default/EvsCamera.h
+++ b/automotive/evs/1.0/default/EvsCamera.h
@@ -32,54 +32,50 @@
 namespace implementation {
 
 
+// From EvsEnumerator.h
+class EvsEnumerator;
+
+
 class EvsCamera : public IEvsCamera {
 public:
     // Methods from ::android::hardware::automotive::evs::V1_0::IEvsCamera follow.
-    Return<void> getId(getId_cb id_cb) override;
-
+    Return<void> getCameraInfo(getCameraInfo_cb _hidl_cb)  override;
     Return <EvsResult> setMaxFramesInFlight(uint32_t bufferCount) override;
-
     Return <EvsResult> startVideoStream(const ::android::sp<IEvsCameraStream>& stream) override;
-
     Return<void> doneWithFrame(const BufferDesc& buffer) override;
-
     Return<void> stopVideoStream() override;
-
     Return <int32_t> getExtendedInfo(uint32_t opaqueIdentifier) override;
-
     Return <EvsResult> setExtendedInfo(uint32_t opaqueIdentifier, int32_t opaqueValue) override;
 
     // Implementation details
-    EvsCamera(const char* id);
-
+    EvsCamera(const char *id);
     virtual ~EvsCamera() override;
+    void forceShutdown();   // This gets called if another caller "steals" ownership of the camera
 
     const CameraDesc& getDesc() { return mDescription; };
 
     static const char kCameraName_Backup[];
-    static const char kCameraName_RightTurn[];
 
 private:
     // These three functions are expected to be called while mAccessLock is held
     bool setAvailableFrames_Locked(unsigned bufferCount);
-
     unsigned increaseAvailableFrames_Locked(unsigned numToAdd);
-
     unsigned decreaseAvailableFrames_Locked(unsigned numToRemove);
 
     void generateFrames();
-
     void fillTestFrame(const BufferDesc& buff);
 
-    CameraDesc mDescription = {};  // The properties of this camera
+    sp<EvsEnumerator> mEnumerator;  // The enumerator object that created this camera
+
+    CameraDesc mDescription = {};   // The properties of this camera
 
     std::thread mCaptureThread;     // The thread we'll use to synthesize frames
 
-    uint32_t mWidth = 0;        // Horizontal pixel count in the buffers
-    uint32_t mHeight = 0;        // Vertical pixel count in the buffers
-    uint32_t mFormat = 0;        // Values from android_pixel_format_t [TODO: YUV?  Leave opaque?]
-    uint32_t mUsage = 0;        // Values from from Gralloc.h
-    uint32_t mStride = 0;        // Bytes per line in the buffers
+    uint32_t mWidth  = 0;       // Horizontal pixel count in the buffers
+    uint32_t mHeight = 0;       // Vertical pixel count in the buffers
+    uint32_t mFormat = 0;       // Values from android_pixel_format_t [TODO: YUV?  Leave opaque?]
+    uint32_t mUsage  = 0;       // Values from from Gralloc.h
+    uint32_t mStride = 0;       // Bytes per line in the buffers
 
     sp <IEvsCameraStream> mStream = nullptr;  // The callback used to deliver each frame
 
@@ -98,10 +94,11 @@
         STOPPED,
         RUNNING,
         STOPPING,
+        DEAD,
     };
     StreamStateValues mStreamState;
 
-    // Syncrhonization necessary to deconflict mCaptureThread from the main service thread
+    // Synchronization necessary to deconflict mCaptureThread from the main service thread
     std::mutex mAccessLock;
 };
 
diff --git a/automotive/evs/1.0/default/EvsDisplay.cpp b/automotive/evs/1.0/default/EvsDisplay.cpp
index a1a76d0..9ad332a 100644
--- a/automotive/evs/1.0/default/EvsDisplay.cpp
+++ b/automotive/evs/1.0/default/EvsDisplay.cpp
@@ -30,12 +30,6 @@
 namespace implementation {
 
 
-// TODO(b/31632518):  Need to get notification when our client dies so we can close the camera.
-// As it stands, if the client dies suddently, the buffer may be stranded.
-// As possible work around would be to give the client a HIDL object to exclusively hold
-// and use it's destructor to perform some work in the server side.
-
-
 EvsDisplay::EvsDisplay() {
     ALOGD("EvsDisplay instantiated");
 
@@ -43,34 +37,55 @@
     // NOTE:  These are arbitrary values chosen for testing
     mInfo.displayId             = "Mock Display";
     mInfo.vendorFlags           = 3870;
-    mInfo.defaultHorResolution  = 320;
-    mInfo.defaultVerResolution  = 240;
+
+    // Assemble the buffer description we'll use for our render target
+    mBuffer.width       = 320;
+    mBuffer.height      = 240;
+    mBuffer.format      = HAL_PIXEL_FORMAT_RGBA_8888;
+    mBuffer.usage       = GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER;
+    mBuffer.bufferId    = 0x3870;  // Arbitrary magic number for self recognition
+    mBuffer.pixelSize   = 4;
 }
 
 
 EvsDisplay::~EvsDisplay() {
     ALOGD("EvsDisplay being destroyed");
+    forceShutdown();
+}
+
+
+/**
+ * This gets called if another caller "steals" ownership of the display
+ */
+void EvsDisplay::forceShutdown()
+{
+    ALOGD("EvsDisplay forceShutdown");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
-    // Report if we're going away while a buffer is outstanding
-    if (mFrameBusy) {
-        ALOGE("EvsDisplay going down while client is holding a buffer");
-    }
-
-    // Make sure we release our frame buffer
+    // If the buffer isn't being held by a remote client, release it now as an
+    // optimization to release the resources more quickly than the destructor might
+    // get called.
     if (mBuffer.memHandle) {
+        // Report if we're going away while a buffer is outstanding
+        if (mFrameBusy) {
+            ALOGE("EvsDisplay going down while client is holding a buffer");
+        }
+
         // Drop the graphics buffer we've been using
         GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
         alloc.free(mBuffer.memHandle);
         mBuffer.memHandle = nullptr;
     }
-    ALOGD("EvsDisplay destroyed");
+
+    // Put this object into an unrecoverable error state since somebody else
+    // is going to own the display now.
+    mRequestedState = DisplayState::DEAD;
 }
 
 
 /**
  * Returns basic information about the EVS display provided by the system.
- * See the description of the DisplayDesc structure below for details.
+ * See the description of the DisplayDesc structure for details.
  */
 Return<void> EvsDisplay::getDisplayInfo(getDisplayInfo_cb _hidl_cb)  {
     ALOGD("getDisplayInfo");
@@ -94,6 +109,11 @@
     ALOGD("setDisplayState");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
+    if (mRequestedState == DisplayState::DEAD) {
+        // This object no longer owns the display -- it's been superceeded!
+        return EvsResult::OWNERSHIP_LOST;
+    }
+
     // Ensure we recognize the requested state so we don't go off the rails
     if (state < DisplayState::NUM_STATES) {
         // Record the requested state
@@ -119,10 +139,7 @@
     ALOGD("getDisplayState");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
-    // At the moment, we treat the requested state as immediately active
-    DisplayState currentState = mRequestedState;
-
-    return currentState;
+    return mRequestedState;
 }
 
 
@@ -137,15 +154,16 @@
     ALOGD("getTargetBuffer");
     std::lock_guard<std::mutex> lock(mAccessLock);
 
+    if (mRequestedState == DisplayState::DEAD) {
+        ALOGE("Rejecting buffer request from object that lost ownership of the display.");
+        BufferDesc nullBuff = {};
+        _hidl_cb(nullBuff);
+        return Void();
+    }
+
     // If we don't already have a buffer, allocate one now
     if (!mBuffer.memHandle) {
-        // Assemble the buffer description we'll use for our render target
-        mBuffer.width       = mInfo.defaultHorResolution;
-        mBuffer.height      = mInfo.defaultVerResolution;
-        mBuffer.format      = HAL_PIXEL_FORMAT_RGBA_8888;
-        mBuffer.usage       = GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER;
-        mBuffer.bufferId    = 0x3870;  // Arbitrary magic number for self recognition
-
+        // Allocate the buffer that will hold our displayable image
         buffer_handle_t handle = nullptr;
         GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
         status_t result = alloc.allocate(mBuffer.width, mBuffer.height,
@@ -220,6 +238,11 @@
 
     mFrameBusy = false;
 
+    // If we've been displaced by another owner of the display, then we can't do anything else
+    if (mRequestedState == DisplayState::DEAD) {
+        return EvsResult::OWNERSHIP_LOST;
+    }
+
     // If we were waiting for a new frame, this is it!
     if (mRequestedState == DisplayState::VISIBLE_ON_NEXT_FRAME) {
         mRequestedState = DisplayState::VISIBLE;
@@ -248,8 +271,8 @@
 
         // Check the test pixels
         bool frameLooksGood = true;
-        for (unsigned row = 0; row < mInfo.defaultVerResolution; row++) {
-            for (unsigned col = 0; col < mInfo.defaultHorResolution; col++) {
+        for (unsigned row = 0; row < mBuffer.height; row++) {
+            for (unsigned col = 0; col < mBuffer.width; col++) {
                 // Index into the row to check the pixel at this column.
                 // We expect 0xFF in the LSB channel, a vertical gradient in the
                 // second channel, a horitzontal gradient in the third channel, and
diff --git a/automotive/evs/1.0/default/EvsDisplay.h b/automotive/evs/1.0/default/EvsDisplay.h
index fcf4a06..ebd6446 100644
--- a/automotive/evs/1.0/default/EvsDisplay.h
+++ b/automotive/evs/1.0/default/EvsDisplay.h
@@ -27,6 +27,7 @@
 namespace V1_0 {
 namespace implementation {
 
+
 class EvsDisplay : public IEvsDisplay {
 public:
     // Methods from ::android::hardware::automotive::evs::V1_0::IEvsDisplay follow.
@@ -40,6 +41,8 @@
     EvsDisplay();
     virtual ~EvsDisplay() override;
 
+    void forceShutdown();   // This gets called if another caller "steals" ownership of the display
+
 private:
     DisplayDesc     mInfo           = {};
     BufferDesc      mBuffer         = {};       // A graphics buffer into which we'll store images
diff --git a/automotive/evs/1.0/default/EvsEnumerator.cpp b/automotive/evs/1.0/default/EvsEnumerator.cpp
index e54f699..731e21b 100644
--- a/automotive/evs/1.0/default/EvsEnumerator.cpp
+++ b/automotive/evs/1.0/default/EvsEnumerator.cpp
@@ -28,33 +28,36 @@
 namespace implementation {
 
 
-// TODO(b/31632518):  Need to get notification when our client dies so we can close the camera.
-// As it stands, if the client dies suddenly, the camera will be stuck "open".
-// NOTE:  Display should already be safe by virtue of holding only a weak pointer.
+// NOTE:  All members values are static so that all clients operate on the same state
+//        That is to say, this is effectively a singleton despite the fact that HIDL
+//        constructs a new instance for each client.
+std::list<EvsEnumerator::CameraRecord>   EvsEnumerator::sCameraList;
+wp<EvsDisplay>                           EvsEnumerator::sActiveDisplay;
 
 
 EvsEnumerator::EvsEnumerator() {
     ALOGD("EvsEnumerator created");
 
     // Add sample camera data to our list of cameras
-    // NOTE:  The id strings trigger special initialization inside the EvsCamera constructor
-    mCameraList.emplace_back( new EvsCamera(EvsCamera::kCameraName_Backup),    false );
-    mCameraList.emplace_back( new EvsCamera("LaneView"),                       false );
-    mCameraList.emplace_back( new EvsCamera(EvsCamera::kCameraName_RightTurn), false );
+    // In a real driver, this would be expected to can the available hardware
+    sCameraList.emplace_back(EvsCamera::kCameraName_Backup);
+    sCameraList.emplace_back("LaneView");
+    sCameraList.emplace_back("right turn");
 }
 
+
 // Methods from ::android::hardware::automotive::evs::V1_0::IEvsEnumerator follow.
 Return<void> EvsEnumerator::getCameraList(getCameraList_cb _hidl_cb)  {
     ALOGD("getCameraList");
 
-    const unsigned numCameras = mCameraList.size();
+    const unsigned numCameras = sCameraList.size();
 
     // Build up a packed array of CameraDesc for return
     // NOTE:  Only has to live until the callback returns
     std::vector<CameraDesc> descriptions;
     descriptions.reserve(numCameras);
-    for (const auto& cam : mCameraList) {
-        descriptions.push_back( cam.pCamera->getDesc() );
+    for (const auto& cam : sCameraList) {
+        descriptions.push_back( cam.desc );
     }
 
     // Encapsulate our camera descriptions in the HIDL vec type
@@ -68,97 +71,137 @@
     return Void();
 }
 
+
 Return<sp<IEvsCamera>> EvsEnumerator::openCamera(const hidl_string& cameraId) {
     ALOGD("openCamera");
 
     // Find the named camera
     CameraRecord *pRecord = nullptr;
-    for (auto &&cam : mCameraList) {
-        if (cam.pCamera->getDesc().cameraId == cameraId) {
+    for (auto &&cam : sCameraList) {
+        if (cam.desc.cameraId == cameraId) {
             // Found a match!
             pRecord = &cam;
             break;
         }
     }
 
+    // Is this a recognized camera id?
     if (!pRecord) {
         ALOGE("Requested camera %s not found", cameraId.c_str());
         return nullptr;
-    } else if (pRecord->inUse) {
-        ALOGE("Cannot open camera %s which is already in use", cameraId.c_str());
-        return nullptr;
-    } else {
-        pRecord->inUse = true;
-        return(pRecord->pCamera);
     }
+
+    // Has this camera already been instantiated by another caller?
+    sp<EvsCamera> pActiveCamera = pRecord->activeInstance.promote();
+    if (pActiveCamera != nullptr) {
+        ALOGW("Killing previous camera because of new caller");
+        closeCamera(pActiveCamera);
+    }
+
+    // Construct a camera instance for the caller
+    pActiveCamera = new EvsCamera(cameraId);
+    pRecord->activeInstance = pActiveCamera;
+    if (pActiveCamera == nullptr) {
+        ALOGE("Failed to allocate new EvsCamera object for %s\n", cameraId.c_str());
+    }
+
+    return pActiveCamera;
 }
 
-Return<void> EvsEnumerator::closeCamera(const ::android::sp<IEvsCamera>& camera) {
+
+Return<void> EvsEnumerator::closeCamera(const ::android::sp<IEvsCamera>& pCamera) {
     ALOGD("closeCamera");
 
-    if (camera == nullptr) {
-        ALOGE("Ignoring call to closeCamera with null camera pointer");
-    } else {
-        // Find this camera in our list
-        auto it = std::find_if(mCameraList.begin(),
-                               mCameraList.end(),
-                               [camera](const CameraRecord& rec) {
-                                   return (rec.pCamera == camera);
-                               });
-        if (it == mCameraList.end()) {
-            ALOGE("Ignoring close on unrecognized camera");
-        } else {
-            // Make sure the camera has stopped streaming
-            camera->stopVideoStream();
+    if (pCamera == nullptr) {
+        ALOGE("Ignoring call to closeCamera with null camera ptr");
+        return Void();
+    }
 
-            it->inUse = false;
+    // Get the camera id so we can find it in our list
+    std::string cameraId;
+    pCamera->getCameraInfo([&cameraId](CameraDesc desc) {
+// TODO(b/36532780) Should we able to just use a simple assignment?
+//                             cameraId = desc.cameraId;
+                               cameraId.assign(desc.cameraId.c_str());
+                           }
+    );
+
+    // Find the named camera
+    CameraRecord *pRecord = nullptr;
+    for (auto &&cam : sCameraList) {
+        if (cam.desc.cameraId == cameraId) {
+            // Found a match!
+            pRecord = &cam;
+            break;
+        }
+    }
+
+    // Is the display being destroyed actually the one we think is active?
+    if (!pRecord) {
+        ALOGE("Asked to close a camera who's name isn't recognized");
+    } else {
+        sp<EvsCamera> pActiveCamera = pRecord->activeInstance.promote();
+
+        if (pActiveCamera == nullptr) {
+            ALOGE("Somehow a camera is being destroyed when the enumerator didn't know one existed");
+        } else if (pActiveCamera != pCamera) {
+            // This can happen if the camera was aggressively reopened, orphaning this previous instance
+            ALOGW("Ignoring close of previously orphaned camera - why did a client steal?");
+        } else {
+            // Drop the active camera
+            pActiveCamera->forceShutdown();
+            pRecord->activeInstance = nullptr;
         }
     }
 
     return Void();
 }
 
+
 Return<sp<IEvsDisplay>> EvsEnumerator::openDisplay() {
     ALOGD("openDisplay");
 
-    // If we already have a display active, then this request must be denied
-    sp<IEvsDisplay> pActiveDisplay = mActiveDisplay.promote();
+    // If we already have a display active, then we need to shut it down so we can
+    // give exclusive access to the new caller.
+    sp<EvsDisplay> pActiveDisplay = sActiveDisplay.promote();
     if (pActiveDisplay != nullptr) {
-        ALOGW("Rejecting openDisplay request the display is already in use.");
-        return nullptr;
-    } else {
-        // Create a new display interface and return it
-        pActiveDisplay = new EvsDisplay();
-        mActiveDisplay = pActiveDisplay;
-        ALOGD("Returning new EvsDisplay object %p", pActiveDisplay.get());
-        return pActiveDisplay;
+        ALOGW("Killing previous display because of new caller");
+        closeDisplay(pActiveDisplay);
     }
+
+    // Create a new display interface and return it
+    pActiveDisplay = new EvsDisplay();
+    sActiveDisplay = pActiveDisplay;
+
+    ALOGD("Returning new EvsDisplay object %p", pActiveDisplay.get());
+    return pActiveDisplay;
 }
 
-Return<void> EvsEnumerator::closeDisplay(const ::android::sp<IEvsDisplay>& display) {
+
+Return<void> EvsEnumerator::closeDisplay(const ::android::sp<IEvsDisplay>& pDisplay) {
     ALOGD("closeDisplay");
 
     // Do we still have a display object we think should be active?
-    sp<IEvsDisplay> pActiveDisplay = mActiveDisplay.promote();
-
+    sp<EvsDisplay> pActiveDisplay = sActiveDisplay.promote();
     if (pActiveDisplay == nullptr) {
-        ALOGE("Ignoring closeDisplay when there is no active display.");
-    } else if (display != pActiveDisplay) {
-        ALOGE("Ignoring closeDisplay on a display we didn't issue");
-        ALOGI("Got %p while active display is %p.", display.get(), pActiveDisplay.get());
+        ALOGE("Somehow a display is being destroyed when the enumerator didn't know one existed");
+    } else if (sActiveDisplay != pDisplay) {
+        ALOGW("Ignoring close of previously orphaned display - why did a client steal?");
     } else {
         // Drop the active display
-        mActiveDisplay = nullptr;
+        pActiveDisplay->forceShutdown();
+        sActiveDisplay = nullptr;
     }
 
     return Void();
 }
 
+
 Return<DisplayState> EvsEnumerator::getDisplayState()  {
     ALOGD("getDisplayState");
 
     // Do we still have a display object we think should be active?
-    sp<IEvsDisplay> pActiveDisplay = mActiveDisplay.promote();
+    sp<IEvsDisplay> pActiveDisplay = sActiveDisplay.promote();
     if (pActiveDisplay != nullptr) {
         return pActiveDisplay->getDisplayState();
     } else {
diff --git a/automotive/evs/1.0/default/EvsEnumerator.h b/automotive/evs/1.0/default/EvsEnumerator.h
index 3d6e264..6b70f9b 100644
--- a/automotive/evs/1.0/default/EvsEnumerator.h
+++ b/automotive/evs/1.0/default/EvsEnumerator.h
@@ -22,7 +22,6 @@
 
 #include <list>
 
-#include "EvsCamera.h"
 
 namespace android {
 namespace hardware {
@@ -31,6 +30,11 @@
 namespace V1_0 {
 namespace implementation {
 
+
+class EvsCamera;    // from EvsCamera.h
+class EvsDisplay;   // from EvsDisplay.h
+
+
 class EvsEnumerator : public IEvsEnumerator {
 public:
     // Methods from ::android::hardware::automotive::evs::V1_0::IEvsEnumerator follow.
@@ -45,14 +49,18 @@
     EvsEnumerator();
 
 private:
+    // NOTE:  All members values are static so that all clients operate on the same state
+    //        That is to say, this is effectively a singleton despite the fact that HIDL
+    //        constructs a new instance for each client.
     struct CameraRecord {
-        sp<EvsCamera>   pCamera;
-        bool            inUse;
-        CameraRecord(EvsCamera* p, bool b) : pCamera(p), inUse(b) {}
-    };
-    std::list<CameraRecord> mCameraList;
+        CameraDesc          desc;
+        wp<EvsCamera>       activeInstance;
 
-    wp<IEvsDisplay>         mActiveDisplay; // Weak pointer -> object destructs if client dies
+        CameraRecord(const char *cameraId) : desc() { desc.cameraId = cameraId; }
+    };
+    static std::list<CameraRecord> sCameraList;
+
+    static wp<EvsDisplay>          sActiveDisplay; // Weak pointer. Object destructs if client dies.
 };
 
 } // namespace implementation
diff --git a/automotive/evs/1.0/types.hal b/automotive/evs/1.0/types.hal
index 0ce39d1..7cebf6d 100644
--- a/automotive/evs/1.0/types.hal
+++ b/automotive/evs/1.0/types.hal
@@ -18,40 +18,14 @@
 
 
 /**
- * Bit flags indicating suggested uses for a given EVS camera
- *
- * The values in the UsageHint bit field provide a generic expression of how a
- * given camera is intended to be used. The values for these flags support
- * existing use cases, and are used by the default EVS application to select
- * appropriate cameras for display based on observed vehicle state (such as
- * turn signal activation or selection of reverse gear). When implementing
- * their own specialized EVS Applications, OEMs are free to use these flags
- * and/or the opaque vendor_flags to drive their own vehicle specific logic.
- */
-enum UsageHint : uint32_t {
-    USAGE_HINT_REVERSE      = 0x00000001,
-    USAGE_HINT_LEFT_TURN    = 0x00000002,
-    USAGE_HINT_RIGHT_TURN   = 0x00000004,
-};
-
-
-/**
  * Structure describing the basic properties of an EVS camera
  *
  * The HAL is responsible for filling out this structure for each
- * EVS camera in the system. Attention should be given to the field
- * of view, direction of view, and location parameters as these may
- * be used to (if available) to project overlay graphics into the
- * scene by an EVS application.
- * Any of these values for which the HAL does not have reasonable values
- * should be set to ZERO.
+ * EVS camera in the system.
  */
 struct CameraDesc {
-    string              cameraId;
-    bitfield<UsageHint> hints;                  // Mask of usage hints
-    uint32_t            vendorFlags;            // Opaque value from driver
-    uint32_t            defaultHorResolution;   // Units of pixels
-    uint32_t            defaultVerResolution;   // Units of pixels
+    string      cameraId;
+    uint32_t    vendorFlags;    // Opaque value from driver
 };
 
 
@@ -65,9 +39,7 @@
  */
 struct DisplayDesc {
     string      displayId;
-    uint32_t    vendorFlags;                // Opaque value from driver
-    uint32_t    defaultHorResolution;       // Units of pixels
-    uint32_t    defaultVerResolution;       // Units of pixels
+    uint32_t    vendorFlags;    // Opaque value from driver
 };
 
 
@@ -86,7 +58,8 @@
 struct BufferDesc {
     uint32_t    width;      // Units of pixels
     uint32_t    height;     // Units of pixels
-    uint32_t    stride;     // Units of bytes
+    uint32_t    stride;     // Units of pixels to match gralloc
+    uint32_t    pixelSize;  // Units of bytes
     uint32_t    format;     // May contain values from android_pixel_format_t
     uint32_t    usage;      // May contain values from from Gralloc.h
     uint32_t    bufferId;   // Opaque value from driver
@@ -108,6 +81,7 @@
     NOT_VISIBLE,            // Display is inhibited
     VISIBLE_ON_NEXT_FRAME,  // Will become visible with next frame
     VISIBLE,                // Display is currently active
+    DEAD,                   // Driver is in an undefined state.  Interface should be closed.
     NUM_STATES              // Must be last
 };
 
@@ -118,5 +92,6 @@
     INVALID_ARG,
     STREAM_ALREADY_RUNNING,
     BUFFER_NOT_AVAILABLE,
+    OWNERSHIP_LOST,
     UNDERLYING_SERVICE_ERROR,
 };
diff --git a/drm/1.0/default/DrmPlugin.cpp b/drm/1.0/default/DrmPlugin.cpp
index 6f51e0e..c7428a5 100644
--- a/drm/1.0/default/DrmPlugin.cpp
+++ b/drm/1.0/default/DrmPlugin.cpp
@@ -77,7 +77,7 @@
             android::DrmPlugin::KeyRequestType legacyRequestType =
                     android::DrmPlugin::kKeyRequestType_Unknown;
 
-            status_t status = mLegacyPlugin->getKeyRequest(toVector(scope),
+            status = mLegacyPlugin->getKeyRequest(toVector(scope),
                     toVector(initData), String8(mimeType), legacyKeyType,
                     legacyOptionalParameters, legacyRequest, defaultUrl,
                     &legacyRequestType);
@@ -93,7 +93,7 @@
                 requestType = KeyRequestType::RELEASE;
                 break;
             case android::DrmPlugin::kKeyRequestType_Unknown:
-                status = android::BAD_VALUE;
+                requestType = KeyRequestType::UNKNOWN;
                 break;
             }
         }
diff --git a/dumpstate/1.0/default/service.cpp b/dumpstate/1.0/default/service.cpp
index 85bea12..4f276b7 100644
--- a/dumpstate/1.0/default/service.cpp
+++ b/dumpstate/1.0/default/service.cpp
@@ -24,11 +24,18 @@
 using ::android::hardware::dumpstate::V1_0::IDumpstateDevice;
 using ::android::hardware::dumpstate::V1_0::implementation::DumpstateDevice;
 using ::android::hardware::joinRpcThreadpool;
+using ::android::OK;
 using ::android::sp;
 
-int main (int /* argc */, char * /* argv */ []) {
+int main(int /* argc */, char* /* argv */ []) {
     sp<IDumpstateDevice> dumpstate = new DumpstateDevice;
-    configureRpcThreadpool(1, true);
-    dumpstate->registerAsService();
+    configureRpcThreadpool(1, true /* will join */);
+    if (dumpstate->registerAsService() != OK) {
+        ALOGE("Could not register service.");
+        return 1;
+    }
     joinRpcThreadpool();
+
+    ALOGE("Service exited!");
+    return 1;
 }
diff --git a/keymaster/3.0/vts/functional/Android.mk b/keymaster/3.0/vts/functional/Android.mk
index 1b29cde..4265b9f 100644
--- a/keymaster/3.0/vts/functional/Android.mk
+++ b/keymaster/3.0/vts/functional/Android.mk
@@ -34,4 +34,6 @@
 LOCAL_STATIC_LIBRARIES := \
         VtsHalHidlTargetTestBase \
 
+LOCAL_CFLAGS := -Wall -Werror
+
 include $(BUILD_NATIVE_TEST)
diff --git a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
index 92266b5..2382f0b 100644
--- a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -1957,7 +1957,6 @@
  * Verifies RSA signature/verification for all padding modes and digests.
  */
 TEST_F(VerificationOperationsTest, RsaAllPaddingsAndDigests) {
-    Digest digest = Digest::SHA_2_256;
     ASSERT_EQ(ErrorCode::OK,
               GenerateKey(AuthorizationSetBuilder()
                               .Authorization(TAG_NO_AUTH_REQUIRED)
@@ -3386,16 +3385,18 @@
  * Verifies that AES GCM mode fails correctly when the decryption key is incorrect.
  */
 TEST_F(EncryptionOperationsTest, AesGcmCorruptKey) {
-    string nonce = {
+    const uint8_t nonce_bytes[] = {
         0xb7, 0x94, 0x37, 0xae, 0x08, 0xff, 0x35, 0x5d, 0x7d, 0x8a, 0x4d, 0x0f,
     };
-    string ciphertext = {
+    string nonce = make_string(nonce_bytes);
+    const uint8_t ciphertext_bytes[] = {
         0xb3, 0xf6, 0x79, 0x9e, 0x8f, 0x93, 0x26, 0xf2, 0xdf, 0x1e, 0x80, 0xfc, 0xd2, 0xcb, 0x16,
         0xd7, 0x8c, 0x9d, 0xc7, 0xcc, 0x14, 0xbb, 0x67, 0x78, 0x62, 0xdc, 0x6c, 0x63, 0x9b, 0x3a,
         0x63, 0x38, 0xd2, 0x4b, 0x31, 0x2d, 0x39, 0x89, 0xe5, 0x92, 0x0b, 0x5d, 0xbf, 0xc9, 0x76,
         0x76, 0x5e, 0xfb, 0xfe, 0x57, 0xbb, 0x38, 0x59, 0x40, 0xa7, 0xa4, 0x3b, 0xdf, 0x05, 0xbd,
         0xda, 0xe3, 0xc9, 0xd6, 0xa2, 0xfb, 0xbd, 0xfc, 0xc0, 0xcb, 0xa0,
     };
+    string ciphertext = make_string(ciphertext_bytes);
 
     auto params = AuthorizationSetBuilder()
                       .BlockMode(BlockMode::GCM)
@@ -3412,10 +3413,11 @@
                              .Authorization(TAG_MIN_MAC_LENGTH, 128);
 
     // Import correct key and decrypt
-    string key = {
+    const uint8_t key_bytes[] = {
         0xba, 0x76, 0x35, 0x4f, 0x0a, 0xed, 0x6e, 0x8d,
         0x91, 0xf4, 0x5c, 0x4f, 0xf5, 0xa0, 0x62, 0xdb,
     };
+    string key = make_string(key_bytes);
     ASSERT_EQ(ErrorCode::OK, ImportKey(import_params, KeyFormat::RAW, key));
     string plaintext = DecryptMessage(ciphertext, params);
     EXPECT_EQ(ErrorCode::OK, DeleteKey());
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 24e3926..7808de1 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -44,3 +44,27 @@
         "-g",
     ],
 }
+
+cc_test {
+    name: "VtsHalSapV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["sap_callback.cpp",
+           "sap_hidl_hal_api.cpp",
+           "sap_hidl_hal_test.cpp",
+           "VtsHalSapV1_0TargetTest.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "libnativehelper",
+        "libutils",
+        "android.hardware.radio@1.0",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+    ],
+}
diff --git a/radio/1.0/vts/functional/VtsHalSapV1_0TargetTest.cpp b/radio/1.0/vts/functional/VtsHalSapV1_0TargetTest.cpp
new file mode 100644
index 0000000..f902588
--- /dev/null
+++ b/radio/1.0/vts/functional/VtsHalSapV1_0TargetTest.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include<sap_hidl_hal_utils.h>
+
+int main(int argc, char** argv) {
+    // Add Sim-access Profile Hidl Environment
+    ::testing::AddGlobalTestEnvironment(new SapHidlEnvironment);
+    ::testing::InitGoogleTest(&argc, argv);
+
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+
+    return status;
+}
diff --git a/radio/1.0/vts/functional/sap_callback.cpp b/radio/1.0/vts/functional/sap_callback.cpp
new file mode 100644
index 0000000..563d066
--- /dev/null
+++ b/radio/1.0/vts/functional/sap_callback.cpp
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include<sap_hidl_hal_utils.h>
+
+SapCallback::SapCallback(SapHidlTest& parent) : parent(parent) {
+}
+
+Return<void> SapCallback::connectResponse(int32_t token, SapConnectRsp /*sapConnectRsp*/,
+        int32_t /*maxMsgSize*/) {
+    sapResponseToken = token;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::disconnectResponse(int32_t token) {
+    sapResponseToken = token;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::disconnectIndication(int32_t /*token*/,
+        SapDisconnectType /*disconnectType*/) {
+    return Void();
+}
+
+Return<void> SapCallback::apduResponse(int32_t token, SapResultCode resultCode,
+        const ::android::hardware::hidl_vec<uint8_t>& /*apduRsp*/) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::transferAtrResponse(int32_t token, SapResultCode resultCode,
+        const ::android::hardware::hidl_vec<uint8_t>& /*atr*/) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::powerResponse(int32_t token, SapResultCode resultCode) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::resetSimResponse(int32_t token, SapResultCode resultCode) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::statusIndication(int32_t /*token*/, SapStatus /*status*/) {
+    return Void();
+}
+
+Return<void> SapCallback::transferCardReaderStatusResponse(int32_t token,
+            SapResultCode resultCode, int32_t /*cardReaderStatus*/) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
+
+Return<void> SapCallback::errorResponse(int32_t /*token*/) {
+    return Void();
+}
+
+Return<void> SapCallback::transferProtocolResponse(int32_t token,
+            SapResultCode resultCode) {
+    sapResponseToken = token;
+    sapResultCode = resultCode;
+    parent.notify();
+    return Void();
+}
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
new file mode 100644
index 0000000..e806bd7
--- /dev/null
+++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include<sap_hidl_hal_utils.h>
+
+/*
+ * Test ISap.connectReq() for the response returned.
+ */
+TEST_F(SapHidlTest, connectReq) {
+    int32_t token = 0;
+    int32_t maxMsgSize = 100;
+
+    sap->connectReq(++token, maxMsgSize);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+}
+
+/*
+ * Test IRadio.disconnectReq() for the response returned
+ */
+TEST_F(SapHidlTest, disconnectReq) {
+    int32_t token = 0;
+
+    sap->disconnectReq(++token);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+}
+
+/*
+ * Test IRadio.apduReq() for the response returned.
+ */
+TEST_F(SapHidlTest, apduReq) {
+    int32_t token = 0;
+    SapApduType sapApduType = SapApduType::APDU;
+    android::hardware::hidl_vec<uint8_t> command = {};
+
+    sap->apduReq(++token, sapApduType, command);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
+              SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
+              SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+}
+
+/*
+ * Test IRadio.transferAtrReq() for the response returned.
+ */
+TEST_F(SapHidlTest, transferAtrReq) {
+    int32_t token = 0;
+
+    sap->transferAtrReq(++token);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    ASSERT_TRUE(SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode ||
+              SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
+              SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+}
+
+/*
+ * Test IRadio.powerReq() for the response returned.
+ */
+TEST_F(SapHidlTest, powerReq) {
+    int32_t token = 0;
+    bool state = true;
+
+    sap->powerReq(++token, state);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
+              SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
+              SapResultCode::CARD_REMOVED == sapCb->sapResultCode ||
+              SapResultCode::CARD_ALREADY_POWERED_ON == sapCb->sapResultCode);
+}
+
+/*
+ * Test IRadio.resetSimReq() for the response returned.
+ */
+TEST_F(SapHidlTest, resetSimReq) {
+    int32_t token = 0;
+
+    sap->resetSimReq(++token);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    ASSERT_TRUE(SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
+              SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
+              SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+}
+
+/*
+ * Test IRadio.transferCardReaderStatusReq() for the response returned.
+ */
+TEST_F(SapHidlTest, transferCardReaderStatusReq) {
+    int32_t token = 0;
+
+    sap->transferCardReaderStatusReq(++token);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    EXPECT_EQ(SapResultCode::DATA_NOT_AVAILABLE, sapCb->sapResultCode);
+}
+
+/*
+ * Test IRadio.setTransferProtocolReq() for the response returned.
+ */
+TEST_F(SapHidlTest, setTransferProtocolReq) {
+    int32_t token = 0;
+    SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0;
+
+    sap->setTransferProtocolReq(++token, sapTransferProtocol);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(sapCb->sapResponseToken, token);
+
+    EXPECT_EQ(SapResultCode::NOT_SUPPORTED, sapCb->sapResultCode);
+}
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_test.cpp b/radio/1.0/vts/functional/sap_hidl_hal_test.cpp
new file mode 100644
index 0000000..a67c5b6
--- /dev/null
+++ b/radio/1.0/vts/functional/sap_hidl_hal_test.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include<sap_hidl_hal_utils.h>
+
+void SapHidlTest::SetUp() {
+    sap = ::testing::VtsHalHidlTargetTestBase::getService<ISap>(hidl_string("sap_uim_socket1"));
+    ASSERT_NE(sap, nullptr);
+
+    sapCb = new SapCallback(*this);
+    ASSERT_NE(sapCb, nullptr);
+
+    count = 0;
+
+    sap->setCallback(sapCb);
+}
+
+void SapHidlTest::TearDown() {
+}
+
+void SapHidlTest::notify() {
+    std::unique_lock<std::mutex> lock(mtx);
+    count++;
+    cv.notify_one();
+}
+
+std::cv_status SapHidlTest::wait() {
+    std::unique_lock<std::mutex> lock(mtx);
+
+    std::cv_status status = std::cv_status::no_timeout;
+    auto now = std::chrono::system_clock::now();
+    while (count == 0) {
+        status = cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+        if (status == std::cv_status::timeout) {
+            return status;
+        }
+    }
+    count--;
+    return status;
+}
+
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_utils.h b/radio/1.0/vts/functional/sap_hidl_hal_utils.h
new file mode 100644
index 0000000..e3efa50
--- /dev/null
+++ b/radio/1.0/vts/functional/sap_hidl_hal_utils.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+#include <android/hardware/radio/1.0/ISap.h>
+#include <android/hardware/radio/1.0/ISapCallback.h>
+#include <android/hardware/radio/1.0/types.h>
+
+using namespace ::android::hardware::radio::V1_0;
+
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+#define TIMEOUT_PERIOD 40
+
+class SapHidlTest;
+
+/* Callback class for sap response */
+class SapCallback : public ISapCallback {
+private:
+    SapHidlTest& parent;
+
+public:
+    SapResultCode sapResultCode;
+    int32_t sapResponseToken;
+
+    SapCallback(SapHidlTest& parent);
+
+    virtual ~SapCallback() = default;
+
+    Return<void> connectResponse(int32_t token, SapConnectRsp sapConnectRsp, int32_t maxMsgSize);
+
+    Return<void> disconnectResponse(int32_t token);
+
+    Return<void> disconnectIndication(int32_t token, SapDisconnectType disconnectType);
+
+    Return<void> apduResponse(int32_t token, SapResultCode resultCode,
+            const ::android::hardware::hidl_vec<uint8_t>& apduRsp);
+
+    Return<void> transferAtrResponse(int32_t token, SapResultCode resultCode,
+            const ::android::hardware::hidl_vec<uint8_t>& atr);
+
+    Return<void> powerResponse(int32_t token, SapResultCode resultCode);
+
+    Return<void> resetSimResponse(int32_t token, SapResultCode resultCode);
+
+    Return<void> statusIndication(int32_t token, SapStatus status);
+
+    Return<void> transferCardReaderStatusResponse(int32_t token, SapResultCode resultCode,
+            int32_t cardReaderStatus);
+
+    Return<void> errorResponse(int32_t token);
+
+    Return<void> transferProtocolResponse(int32_t token, SapResultCode resultCode);
+};
+
+// The main test class for Sap HIDL.
+class SapHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+private:
+    std::mutex mtx;
+    std::condition_variable cv;
+    int count;
+
+public:
+    virtual void SetUp() override;
+
+    virtual void TearDown() override;
+
+    /* Used as a mechanism to inform the test about data/event callback */
+    void notify();
+
+    /* Test code calls this function to wait for response */
+    std::cv_status wait();
+
+    /* Sap service */
+    sp<ISap> sap;
+
+    /* Sap Callback object */
+    sp<SapCallback> sapCb;
+};
+
+// A class for test environment setup
+class SapHidlEnvironment : public ::testing::Environment {
+public:
+    virtual void SetUp() {}
+    virtual void TearDown() {}
+};
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index ef17b463..389b6e7 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -63,7 +63,7 @@
 Return<void> Context::allocationAdapterOffset(Allocation alloc, const hidl_vec<uint32_t>& offsets) {
     RsAllocation _alloc = hidl_to_rs<RsAllocation>(alloc);
     const hidl_vec<uint32_t>& _offsets = offsets;
-    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size());
+    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size() * sizeof(uint32_t));
     return Void();
 }
 
@@ -552,7 +552,7 @@
     std::vector<RsScriptKernelID> _dstK    = hidl_to_rs<RsScriptKernelID>(dstK,    [](ScriptFieldID val) { return hidl_to_rs<RsScriptKernelID>(val); });
     std::vector<RsScriptFieldID>  _dstF    = hidl_to_rs<RsScriptFieldID>(dstF,     [](ScriptFieldID val) { return hidl_to_rs<RsScriptFieldID>(val); });
     std::vector<RsType>           _types   = hidl_to_rs<RsType>(types,             [](Type val) { return hidl_to_rs<RsType>(val); });
-    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size(), _srcK.data(), _srcK.size(), _dstK.data(), _dstK.size(), _dstF.data(), _dstF.size(), _types.data(), _types.size());
+    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size() * sizeof(RsScriptKernelID), _srcK.data(), _srcK.size() * sizeof(RsScriptKernelID), _dstK.data(), _dstK.size() * sizeof(RsScriptKernelID), _dstF.data(), _dstF.size() * sizeof(RsScriptFieldID), _types.data(), _types.size() * sizeof(RsType));
     return rs_to_hidl<ScriptGroup>(_scriptGroup);
 }
 
@@ -725,7 +725,7 @@
     size_t _len = data.size();
     RsElement _ve = hidl_to_rs<RsElement>(ve);
     const uint32_t* _dimsPtr = dims.data();
-    size_t _dimLen = dims.size();
+    size_t _dimLen = dims.size() * sizeof(uint32_t);
     Device::getHal().ScriptSetVarVE(mContext, _vs, _slot, _dataPtr, _len, _ve, _dimsPtr, _dimLen);
     return Void();
 }
diff --git a/renderscript/1.0/vts/functional/VtsCopyTests.cpp b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
index 77217cb..168e681 100644
--- a/renderscript/1.0/vts/functional/VtsCopyTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
@@ -43,9 +43,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     context->allocation1DRead(allocation, 0, 0, (uint32_t)dataOut.size(), (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -76,9 +74,7 @@
                                _data, 0);
     context->allocation2DRead(allocation, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 128, 128,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -108,9 +104,7 @@
     context->allocation3DWrite(allocation, 0, 0, 0, 0, 32, 32, 32, _data, 0);
     context->allocation3DRead(allocation, 0, 0, 0, 0, 32, 32, 32, (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -139,18 +133,14 @@
                                                                 AllocationMipmapControl::NONE,
                                                                 _data,
                                                                 (int)AllocationUsageType::SCRIPT);
-    EXPECT_NE(allocation, Allocation(0));
+    EXPECT_NE(Allocation(0), allocation);
 
     context->allocationCopyToBitmap(allocation, (Ptr)dataOut1.data(),
                                     (Size)dataOut1.size()*sizeof(float));
-    bool same1 = std::all_of(dataOut1.begin(), dataOut1.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same1);
+    EXPECT_EQ(dataIn, dataOut1);
 
     context->allocationRead(allocation, (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(float));
-    bool same2 = std::all_of(dataOut2.begin(), dataOut2.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same2);
+    EXPECT_EQ(dataIn, dataOut2);
 }
 
 /*
@@ -368,24 +358,20 @@
 /*
  * This test creates a complex element type (uint8_t, uint32_t) out of known
  * elements. It then verifies the element structure was created correctly.
- * Finally, the test creates a 128-wide, 1-dimension allocation of this type
- * and transfers memory to and from this structure.
+ * Finally, the test creates a 1-wide, 1-dimension allocation of this type
+ * and transfers memory to and from a single cell of this Allocation.
  *
  * Calls: elementCreate, elementComplexCreate, elementGetSubElements,
  * typeCreate, allocationCreateTyped, allocationElementWrite,
  * allocationElementRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ComplexElementTest) {
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     Element element2 = context->elementCreate(DataType::UNSIGNED_32, DataKind::USER, false, 1);
 
     hidl_vec<Element> eins = {element1, element2};
     hidl_vec<hidl_string> names = {hidl_string("first"), hidl_string("second")};
-    hidl_vec<Size> arraySizesPtr = {sizeof(uint8_t), sizeof(uint32_t)};
+    hidl_vec<Size> arraySizesPtr = {1, 1};
     Element element3 = context->elementComplexCreate(eins, names, arraySizesPtr);
     EXPECT_NE(Element(0), element3);
 
@@ -400,28 +386,25 @@
                                                         namesOut.push_back(_names[1]);
                                                         arraySizesOut = _arraySizes;
                                                     });
-    EXPECT_NE(Element(0), ids[0]);
-    EXPECT_NE(Element(0), ids[1]);
+    EXPECT_EQ(element1, ids[0]);
+    EXPECT_EQ(element2, ids[1]);
     EXPECT_EQ("first", namesOut[0]);
     EXPECT_EQ("second", namesOut[1]);
-    EXPECT_EQ(sizeof(uint8_t), arraySizesOut[0]);
-    EXPECT_EQ(sizeof(uint32_t), arraySizesOut[1]);
+    EXPECT_EQ(Size(1), arraySizesOut[0]);
+    EXPECT_EQ(Size(1), arraySizesOut[1]);
 
-    // 128 x (uint8_t, uint32_t)
-    Type type = context->typeCreate(element3, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 128 x (uint8_t, uint32_t)
+    // 1 x (uint8_t, uint32_t)
+    Type type = context->typeCreate(element3, 1, 0, 0, false, false, YuvFormat::YUV_NONE);
+    // 1 x (uint8_t, uint32_t)
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    std::vector<uint32_t> dataIn(128), dataOut(128);
+    std::vector<uint32_t> dataIn(1), dataOut(1);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
     context->allocationElementWrite(allocation, 0, 0, 0, 0, _data, 1);
     context->allocationElementRead(allocation, 0, 0, 0, 0, (Ptr)dataOut.data(),
                                    (Size)dataOut.size()*sizeof(uint32_t), 1);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint32_t x){ static uint32_t val = 0; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
index fc1b7e4..527fef0 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
@@ -32,6 +32,7 @@
 using ::android::hardware::renderscript::V1_0::AllocationCubemapFace;
 using ::android::hardware::renderscript::V1_0::AllocationMipmapControl;
 using ::android::hardware::renderscript::V1_0::AllocationUsageType;
+using ::android::hardware::renderscript::V1_0::Closure;
 using ::android::hardware::renderscript::V1_0::IContext;
 using ::android::hardware::renderscript::V1_0::IDevice;
 using ::android::hardware::renderscript::V1_0::ContextType;
@@ -62,7 +63,26 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
-// bitcode variables
+// bitcode slots
+extern const int mExportVarIdx_var_int;
+extern const int mExportVarIdx_var_long;
+extern const int mExportVarIdx_var_float;
+extern const int mExportVarIdx_var_double;
+extern const int mExportVarIdx_var_allocation;
+extern const int mExportVarIdx_var_uint32_t;
+extern const int mExportVarIdx_var_point2;
+extern const int mExportVarIdx_var_int_ptr;
+// bitcode invoke slots
+//extern const int mExportForEachIdx_root;
+extern const int mExportForEachIdx_increment;
+// bitcode reduce slots
+extern const int mExportReduceIdx_summation;
+// bitcode invoke slots
+extern const int mExportFuncIdx_function;
+extern const int mExportFuncIdx_functionV;
+extern const int mExportFuncIdx_setBuffer;
+extern const int mExportFuncIdx_setAllocation;
+// bitcode
 typedef signed char int8_t;
 extern const int8_t bitCode[];
 extern const int bitCodeLength;
diff --git a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
index c2b3354..39d63ca 100644
--- a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
+#include <system/window.h>
 
 /*
  * ContextCreateAndDestroy:
@@ -81,7 +82,7 @@
                                           elementMetadata = _metadata; });
     EXPECT_EQ(DataType::FLOAT_32, (DataType)elementMetadata[0]);
     EXPECT_EQ(DataKind::USER, (DataKind)elementMetadata[1]);
-    EXPECT_EQ(false, ((uint32_t)elementMetadata[2] == 1) ? true : false);
+    EXPECT_EQ(false, elementMetadata[2]);
     EXPECT_EQ(1u, (uint32_t)elementMetadata[3]);
     EXPECT_EQ(0u, (uint32_t)elementMetadata[4]);
 
@@ -134,21 +135,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
  * allocationGetNativeWindow, allocationSetNativeWindow, allocationIoSend,
  * allocationIoReceive, allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, NativeWindowIoTest) {
     // uint8x4
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
     // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
     std::vector<uint32_t> dataIn(512*512), dataOut(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (uint32_t)val++; });
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
-    // 512 x 512 x float1
+    // 512 x 512 x uint8x4
     Allocation allocationRecv = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_INPUT),
@@ -157,21 +154,20 @@
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_OUTPUT),
                                                                (Ptr)nullptr);
-    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
-                               _data, 0);
     NativeWindow nativeWindow = context->allocationGetNativeWindow(allocationRecv);
     EXPECT_NE(NativeWindow(0), nativeWindow);
 
+    ((ANativeWindow *)nativeWindow)->incStrong(nullptr);
+
     context->allocationSetNativeWindow(allocationSend, nativeWindow);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
     context->allocationIoSend(allocationSend);
     context->allocationIoReceive(allocationRecv);
     context->allocation2DRead(allocationRecv, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint32_t), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                             [](uint32_t x){ static int val = 0; return x == (uint32_t)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
 
 /*
  * Three allocations are created, two with IO_INPUT and one with IO_OUTPUT. The
@@ -180,21 +176,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped,
  * allocationCreateFromBitmap, allocationSetupBufferQueue,
  * allocationShareBufferQueue
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, BufferQueueTest) {
-    // float1
-    Element element = context->elementCreate(DataType::FLOAT_32, DataKind::USER, false, 1);
-    // 512 x 512 x float1
+    // uint8x4
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
+    // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<float> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (float)val++; });
+    std::vector<uint32_t> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(float));
-    // 512 x 512 x float1
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
+    // 512 x 512 x uint8x4
     Allocation allocationRecv1 = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
@@ -203,16 +195,37 @@
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
                                                                 (Ptr)nullptr);
-    Allocation allocationSend = context->allocationCreateFromBitmap(type,
-                                                                    AllocationMipmapControl::NONE,
-                                                                    _data,
-                                                                   (int)(AllocationUsageType::SCRIPT
-                                                                 | AllocationUsageType::IO_OUTPUT));
+    Allocation allocationSend  = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                                (int)(AllocationUsageType::SCRIPT
+                                                                | AllocationUsageType::IO_INPUT),
+                                                                (Ptr)nullptr);
     context->allocationSetupBufferQueue(allocationRecv1, 2);
-    context->allocationShareBufferQueue(allocationRecv1, allocationRecv2);
-    // TODO: test the buffer queue
+    context->allocationShareBufferQueue(allocationRecv2, allocationRecv1);
+
+    NativeWindow nativeWindow1 = context->allocationGetNativeWindow(allocationRecv1);
+    EXPECT_NE(NativeWindow(0), nativeWindow1);
+    NativeWindow nativeWindow2 = context->allocationGetNativeWindow(allocationRecv2);
+    EXPECT_EQ(nativeWindow2, nativeWindow1);
+
+    ((ANativeWindow *)nativeWindow1)->incStrong(nullptr);
+
+    context->allocationSetNativeWindow(allocationSend, nativeWindow1);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv1);
+    context->allocation2DRead(allocationRecv1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut1.data(), (Size)dataOut1.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut1);
+
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv2);
+    context->allocation2DRead(allocationRecv2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut2);
 }
-*/
 
 /*
  * This test sets up the message queue, sends a message, peeks at the message,
@@ -220,33 +233,29 @@
  *
  * Calls: contextInitToClient, contextSendMessage, contextPeekMessage,
  * contextGetMessage, contextDeinitToClient, contextLog
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ContextMessageTest) {
     context->contextInitToClient();
 
-    std::string messageOut = "correct";
+    const char * message = "correct";
+    std::vector<char> messageSend(message, message + sizeof(message));
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)const_cast<char*>(messageOut.c_str()), messageOut.length());
+    _data.setToExternal((uint8_t*)messageSend.data(), messageSend.size());
     context->contextSendMessage(0, _data);
     MessageToClientType messageType;
     size_t size;
     uint32_t subID;
     context->contextPeekMessage([&](MessageToClientType _type, Size _size, uint32_t _subID){
                                 messageType = _type; size = (uint32_t)_size; subID = _subID; });
-    std::vector<char> messageIn(size, '\0');
-    context->contextGetMessage(messageIn.data(), messageIn.size(),
+    std::vector<char> messageRecv(size, '\0');
+    context->contextGetMessage(messageRecv.data(), messageRecv.size(),
                                [&](MessageToClientType _type, Size _size){
                                messageType = _type; size = (uint32_t)_size; });
-    EXPECT_EQ(messageOut, messageIn.data());
+    EXPECT_EQ(messageSend, messageRecv);
 
     context->contextDeinitToClient();
     context->contextLog();
 }
-*/
 
 /*
  * Call through a bunch of APIs and make sure they don’t crash. Assign the name
diff --git a/renderscript/1.0/vts/functional/VtsScriptTests.cpp b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
index 9531e19..6bb375a 100644
--- a/renderscript/1.0/vts/functional/VtsScriptTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
@@ -46,27 +46,30 @@
     EXPECT_NE(Script(0), script);
 
     // arg tests
-    context->scriptSetVarI(script, 0, 100);
+    context->scriptSetVarI(script, mExportVarIdx_var_int, 100);
     int resultI = 0;
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
     EXPECT_EQ(100, resultI);
 
-    context->scriptSetVarJ(script, 1, 101l);
+    context->scriptSetVarJ(script, mExportVarIdx_var_long, 101l);
     int resultJ = 0;
-    context->scriptGetVarV(script, 1, sizeof(long), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultJ = *((long*)_data.data()); });
-    EXPECT_EQ(101, resultJ);
+    EXPECT_EQ(101l, resultJ);
 
-    context->scriptSetVarF(script, 2, 102.0f);
+    context->scriptSetVarF(script, mExportVarIdx_var_float, 102.0f);
     int resultF = 0.0f;
-    context->scriptGetVarV(script, 2, sizeof(float), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultF = *((float*)_data.data()); });
     EXPECT_EQ(102.0f, resultF);
 
-    context->scriptSetVarD(script, 3, 103.0);
+    context->scriptSetVarD(script, mExportVarIdx_var_double, 103.0);
     int resultD = 0.0;
-    context->scriptGetVarV(script, 3, sizeof(double), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultD = *((double*)_data.data()); });
     EXPECT_EQ(103.0, resultD);
 
@@ -79,23 +82,21 @@
                                                              (int)AllocationUsageType::SCRIPT,
                                                              (Ptr)nullptr);
     Allocation allocationOut = Allocation(0);
-    context->scriptSetVarObj(script, 4, (ObjectBase)allocationIn);
-    context->scriptGetVarV(script, 4, sizeof(ObjectBase), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptSetVarObj(script, mExportVarIdx_var_allocation, (ObjectBase)allocationIn);
+    context->scriptGetVarV(script, mExportVarIdx_var_allocation, sizeof(ObjectBase),
+                           [&](const hidl_vec<uint8_t>& _data){
                                allocationOut = (Allocation) *((ObjectBase*)_data.data()); });
     EXPECT_EQ(allocationOut, allocationIn);
 
-    std::vector<int> arrayIn = {500, 501, 502, 503};
-    std::vector<int> arrayOut(4);
-    hidl_vec<uint8_t> arrayData;
-    arrayData.setToExternal((uint8_t*)arrayIn.data(), arrayIn.size()*sizeof(int));
-    context->scriptSetVarV(script, 5, arrayData);
-    context->scriptGetVarV(script, 5, 4*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               arrayOut = std::vector<int>((int*)_data.data(),
-                                                           (int*)_data.data() + 4); });
-    EXPECT_EQ(500, arrayOut[0]);
-    EXPECT_EQ(501, arrayOut[1]);
-    EXPECT_EQ(502, arrayOut[2]);
-    EXPECT_EQ(503, arrayOut[3]);
+    uint32_t valueV = 104u;
+    hidl_vec<uint8_t> _dataV;
+    _dataV.setToExternal((uint8_t*)&valueV, sizeof(uint32_t));
+    context->scriptSetVarV(script, mExportVarIdx_var_uint32_t, _dataV);
+    uint32_t resultV = 0u;
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    EXPECT_EQ(104u, resultV);
 
     std::vector<int> dataVE = {1000, 1001};
     std::vector<uint32_t> dimsVE = {1};
@@ -104,12 +105,13 @@
     hidl_vec<uint32_t> _dimsVE;
     _dataVE.setToExternal((uint8_t*)dataVE.data(), dataVE.size()*sizeof(int));
     _dimsVE.setToExternal((uint32_t*)dimsVE.data(), dimsVE.size());
-    // intx2
+    // intx2 to represent point2 which is {int, int}
     Element elementVE = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 2);
-    context->scriptSetVarVE(script, 6, _dataVE, elementVE, _dimsVE);
-    context->scriptGetVarV(script, 6, 2*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               outVE = std::vector<int>((int*)_data.data(),
-                                                        (int*)_data.data() + 2); });
+    context->scriptSetVarVE(script, mExportVarIdx_var_point2, _dataVE, elementVE, _dimsVE);
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               outVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
     EXPECT_EQ(1000, outVE[0]);
     EXPECT_EQ(1001, outVE[1]);
 }
@@ -127,19 +129,47 @@
     EXPECT_NE(Script(0), script);
 
     // invoke test
-    int function_res = 0;
-    context->scriptInvoke(script, 0);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               function_res = *((int*)_data.data()); });
-    EXPECT_NE(100, function_res);
+    int resultI = 0;
+    long resultJ = 0l;
+    float resultF = 0.0f;
+    double resultD = 0.0;
+    uint32_t resultV = 0u;
+    std::vector<int> resultVE(2);
+    context->scriptInvoke(script, mExportFuncIdx_function);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultJ = *((long*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultF = *((float*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultD = *((double*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
+    EXPECT_EQ(1, resultI);
+    EXPECT_EQ(2l, resultJ);
+    EXPECT_EQ(3.0f, resultF);
+    EXPECT_EQ(4.0, resultD);
+    EXPECT_EQ(5u, resultV);
+    EXPECT_EQ(6, resultVE[0]);
+    EXPECT_EQ(7, resultVE[1]);
 
     // invokeV test
     int functionV_arg = 5;
     int functionV_res = 0;
     hidl_vec<uint8_t> functionV_data;
     functionV_data.setToExternal((uint8_t*)&functionV_arg, sizeof(int));
-    context->scriptInvokeV(script, 1, functionV_data);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptInvokeV(script, mExportFuncIdx_functionV, functionV_data);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
                                functionV_res = *((int*)_data.data()); });
     EXPECT_EQ(5, functionV_res);
 }
@@ -161,8 +191,9 @@
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     // 64 x uint8_t
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<uint8_t> dataIn(64), dataOut(64);
+    std::vector<uint8_t> dataIn(64), dataOut(64), expected(64);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint8_t val = 0; return val++; });
+    std::generate(expected.begin(), expected.end(), [](){ static uint8_t val = 1; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size());
     // 64 x float1
@@ -176,11 +207,9 @@
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
     hidl_vec<uint8_t> params;
-    context->scriptForEach(script, 1, vains, vout, params, nullptr);
+    context->scriptForEach(script, mExportForEachIdx_increment, vains, vout, params, nullptr);
     context->allocationRead(vout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint8_t x){ static uint8_t val = 1; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(expected, dataOut);
 }
 
 /*
@@ -215,7 +244,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
-    context->scriptReduce(script, 0, vains, vaout, nullptr);
+    context->scriptReduce(script, mExportReduceIdx_summation, vains, vaout, nullptr);
     context->contextFinish();
     context->allocationRead(vaout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
     // sum of 0, 1, 2, ..., 62, 63
@@ -228,38 +257,34 @@
  * RenderScript script, represented in the bitcode.
  *
  * Calls: scriptCCreate, elementCreate, typeCreate, allocationCreateTyped,
- * allocationGetPointer, scriptBindAllocation
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptSetVarV, scriptBindAllocation, allocationRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptBindTest) {
     hidl_vec<uint8_t> bitcode;
     bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
     Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
     EXPECT_NE(Script(0), script);
 
-    // uint8_t
+    // in32
     Element element = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 1);
-    // 64 x uint8_t
+    // 64 x int32
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 64 x float1
+    // 64 x int32
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    Ptr dataPtr1, dataPtr2;
-    Size stride;
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr1 = _dataPtr;
-                                      stride = _stride; });
-    context->scriptBindAllocation(script, allocation, 7);
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr2 = _dataPtr;
-                                      stride = _stride; });
-    EXPECT_NE(dataPtr1, dataPtr2);
+    std::vector<int> dataIn(64), dataOut(64), expected(64, 5);
+    hidl_vec<uint8_t> _data;
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(int));
+    context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
+    context->scriptBindAllocation(script, allocation, mExportVarIdx_var_int_ptr);
+    int dim = 64;
+    hidl_vec<uint8_t> _dim;
+    _dim.setToExternal((uint8_t*)&dim, sizeof(int));
+    context->scriptInvokeV(script, mExportFuncIdx_setBuffer, _dim);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
 
 /*
  * This test groups together two RenderScript intrinsic kernels to run one after
@@ -269,38 +294,25 @@
  * ScriptGroup.
  *
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
- * scriptIntrinsicCreate, scriptKernelIDCreate, scriptGroupCreate,
- * scriptGroupSetInput, scriptGroupSetOutput, scriptGroupExecute,
- * allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptIntrinsicCreate, scriptKernelIDCreate, scriptFieldIDCreate,
+ * scriptGroupCreate, scriptGroupSetOutput, scriptGroupExecute, allocation2DRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroupTest) {
-    //std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*3, 0);
-    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0);
+    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0), zeros(256*256*4, 0);
     hidl_vec<uint8_t> _dataIn, _dataOut;
     _dataIn.setToExternal(dataIn.data(), dataIn.size());
-    _dataOut.setToExternal(dataOut.data(), dataIn.size());
+    _dataOut.setToExternal(dataOut.data(), dataOut.size());
 
     // 256 x 256 YUV pixels
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_YUV, true, 1);
-    //Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
-    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_NV21);
+    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
     Allocation allocation1 = context->allocationCreateTyped(type1, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataIn, 0);
-    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
-    EXPECT_NE(Script(0), yuv2rgb);
 
-    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
-    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
-
-    // 256 x 256 RGB pixels
-    //Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGB, true, 3);
+    // 256 x 256 RGBA pixels
     Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGBA, true, 4);
     Type type2 = context->typeCreate(element2, 256, 256, 0, false, false, YuvFormat::YUV_NONE);
     Allocation allocation2 = context->allocationCreateTyped(type2, AllocationMipmapControl::NONE,
@@ -308,83 +320,170 @@
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataOut, 0);
+
+    // create scripts
+    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
+    EXPECT_NE(Script(0), yuv2rgb);
+
+    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
+    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
+
     Script blur = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLUR, element2);
     EXPECT_NE(Script(0), blur);
 
     ScriptKernelID blurKID = context->scriptKernelIDCreate(blur, 0, 2);
     EXPECT_NE(ScriptKernelID(0), blurKID);
+    ScriptFieldID blurFID = context->scriptFieldIDCreate(blur, 1);
+    EXPECT_NE(ScriptFieldID(0), blurFID);
 
     // ScriptGroup
     hidl_vec<ScriptKernelID> kernels = {yuv2rgbKID, blurKID};
     hidl_vec<ScriptKernelID> srcK = {yuv2rgbKID};
-    hidl_vec<ScriptKernelID> dstK = {blurKID};
-    hidl_vec<ScriptFieldID> dstF = {};
+    hidl_vec<ScriptKernelID> dstK = {ScriptKernelID(0)};
+    hidl_vec<ScriptFieldID> dstF = {blurFID};
     hidl_vec<Type> types = {type2};
     ScriptGroup scriptGroup = context->scriptGroupCreate(kernels, srcK, dstK, dstF, types);
     EXPECT_NE(ScriptGroup(0), scriptGroup);
 
-    context->scriptGroupSetInput(scriptGroup, yuv2rgbKID, allocation1);
+    context->scriptSetVarObj(yuv2rgb, 0, (ObjectBase)allocation1);
     context->scriptGroupSetOutput(scriptGroup, blurKID, allocation2);
     context->scriptGroupExecute(scriptGroup);
+    context->contextFinish();
 
     // verify contents were changed
     context->allocation2DRead(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                               (Ptr)dataOut.data(), (Size)dataOut.size(), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(), [](uint8_t x){ return x != 0; });
-    EXPECT_EQ(true, same);
+    EXPECT_NE(zeros, dataOut);
 }
-*/
 
 /*
  * Similar to the ScriptGroup test, this test verifies the execution flow of
  * RenderScript kernels and invokables.
  *
  * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
- * invokeClosureCreate, closureSetArg, closureSetGlobal, scriptGroup2Create,
- * scriptGroupExecute
- *
- * This test currently still a work in progress, and should be finished by 3/17.
- * TODO(butlermichael)
+ * invokeClosureCreate, closureSetGlobal, scriptGroup2Create, scriptGroupExecute
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroup2Test) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
 
-    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, slot);
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 7+1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, mExportVarIdx_var_allocation);
     EXPECT_NE(ScriptFieldID(0), fieldID);
+    ASSERT_NE(ScriptFieldID(0), fieldID);
 
-    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, slot, sig);
-    EXPECT_NE(ScriptKernelID(0), kernelID);
-
-    Allocation returnValue = 0;
-    hidl_vec<ScriptFieldID> fieldIDS = {};
-    hidl_vec<int64_t> values = {};
-    hidl_vec<int32_t> sizes = {};
-    hidl_veC<Closure> depClosures = {};
-    hidl_vec<ScriptFieldID> depFieldIDS = {};
-    Closure closure1 = context->closureCreate(kernelID, returnValue, fieldIDS, values, sizes,
-                                             depClosures, depFieldIDS);
-    EXPECT_NE(Closure(0), closure1);
-
-    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, slot);
+    // invoke
+    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, mExportFuncIdx_setAllocation);
     EXPECT_NE(ScriptInvokeID(0), invokeID);
+    ASSERT_NE(ScriptInvokeID(0), invokeID);
 
-    hidl_vec<uint8_t> params = {};
-    hidl_vec<ScriptFieldID> fieldsIDS2 = {};
-    hidl_vec<int64_t> values2 = {};
-    hidl_vec<int32_t> sizes2 = {};
-    Closure closure2 = context->invokeClosureCreate(invokeID, params, fieldIDS2, values2, sizes2);
+    int dim = 128;
+    hidl_vec<uint8_t> params;
+    params.setToExternal((uint8_t*)&dim, sizeof(dim));
+    hidl_vec<ScriptFieldID> fieldIDS1 = {fieldID};
+    hidl_vec<int64_t> values1 = {int64_t(0)};
+    hidl_vec<int32_t> sizes1 = {int32_t(0)};
+    Closure closure1 = context->invokeClosureCreate(invokeID, params, fieldIDS1, values1, sizes1);
+    EXPECT_NE(Closure(0), closure1);
+    ASSERT_NE(Closure(0), closure1);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS2 = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values2 = {(int64_t)(intptr_t)allocation};
+    hidl_vec<int32_t> sizes2 = {-1 /* allocation */};
+    hidl_vec<Closure> depClosures2 = {closure1};
+    hidl_vec<ScriptFieldID> depFieldIDS2 = {fieldID};
+    Closure closure2 = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS2,
+                                              values2, sizes2, depClosures2, depFieldIDS2);
     EXPECT_NE(Closure(0), closure2);
+    ASSERT_NE(Closure(0), closure2);
 
-    context->closureSetArg(closure, index, value, size);
-    context->closureSetGlobal(closure, fieldID, value, size);
+    // set argument
+    context->closureSetGlobal(closure1, fieldID, (int64_t)(intptr_t)allocation,
+                              -1 /* allocation */);
 
+    // execute
     hidl_string name = "script_group_2_test";
-    hidl_string cacheDir = "data/local/tmp/";
-    hidl_vec<Closures> closures;
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure1, closure2};
     ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
     EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
 
     context->scriptGroupExecute(scriptGroup2);
-    // verify script group launched...
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
+
+/*
+ * Similar to the ScriptGroup test, this test verifies a single kernel can be
+ * called by ScriptGroup with an unbound allocation specified before launch
+ *
+ * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
+ * invokeClosureCreate, closureSetArg, scriptGroup2Create, scriptGroupExecute
+ */
+TEST_F(RenderscriptHidlTest, ScriptGroup2KernelTest) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
+
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 128 + 1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values = {int64_t(0)};
+    hidl_vec<int32_t> sizes = {int32_t(0)};
+    hidl_vec<Closure> depClosures = {Closure(0)};
+    hidl_vec<ScriptFieldID> depFieldIDS = {ScriptFieldID(0)};
+    Closure closure = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS,
+                                              values, sizes, depClosures, depFieldIDS);
+    EXPECT_NE(Closure(0), closure);
+    ASSERT_NE(Closure(0), closure);
+
+    // set argument
+    context->closureSetArg(closure, 0 /* first argument */, (Ptr)allocation, -1);
+
+    // execute
+    hidl_string name = "script_group_2_test";
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure};
+    ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
+    EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
+
+    context->scriptGroupExecute(scriptGroup2);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
+}
diff --git a/renderscript/1.0/vts/functional/bitcode.cpp b/renderscript/1.0/vts/functional/bitcode.cpp
index 72143c9..8a7d542 100644
--- a/renderscript/1.0/vts/functional/bitcode.cpp
+++ b/renderscript/1.0/vts/functional/bitcode.cpp
@@ -15,169 +15,215 @@
  */
 
 /*
-#include "shared.rsh"
-
-// types
-typedef struct Point2 {
-    int x;
-    int y;
-} Point_2;
-
-// variables
-int var_int;
-long var_long;
-float var_float;
-double var_double;
-rs_allocation var_allocation;
-int var_array[4];
-Point_2 var_point2;
-Point_2 *var_point2_ptr;
-
-// invoke
-void function() {
-    var_int = 1;
-    var_long = 2;
-    var_float = 3.0f;
-    var_double = 4.0;
-
-    var_array[0] = 5;
-    var_array[1] = 6;
-    var_array[2] = 7;
-    var_array[3] = 8;
-
-    var_point2.x = 9;
-    var_point2.y = 10;
-}
-
-// invokeV
-void functionV(int arg) {
-    var_int = arg;
-}
-
-// forEach
-uchar RS_KERNEL increment(uchar in) {
-    return in+1;
-}
-
-// reduction
-#pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
-
-static void sumAccumulator(int* accum, int val) {
-    *accum += val;
-}
-
-static void sumCombiner(int* accum, const int *val) {
-    *accum += *val;
-}
-*/
+ * // This .rs code was used to generate the 32-bit and 64-bit versions of the
+ * // bitcode shown below. It is left in here for reference, as many of the
+ * // variables are used in the the script tests.
+ *
+ * #include "shared.rsh"
+ *
+ * // types
+ * typedef struct Point2 {
+ *     int x;
+ *     int y;
+ * } Point_2;
+ *
+ * // variables
+ * int var_int;
+ * long var_long;
+ * float var_float;
+ * double var_double;
+ * rs_allocation var_allocation;
+ * uint32_t var_uint32_t;
+ * Point_2 var_point2;
+ * int *var_int_ptr;
+ *
+ * // invoke
+ * void function() {
+ *     var_int = 1;
+ *     var_long = 2;
+ *     var_float = 3.0f;
+ *     var_double = 4.0;
+ *     var_uint32_t = 5;
+ *     var_point2.x = 6;
+ *     var_point2.y = 7;
+ * }
+ *
+ * // invokeV
+ * void functionV(int arg) {
+ *     var_int = arg;
+ * }
+ *
+ * // set bound buffer
+ * void setBuffer(int dim) {
+ *     int i;
+ *     for (i = 0; i < dim; ++i) {
+ *         var_int_ptr[i] = 5;
+ *     }
+ * }
+ *
+ * // set allocation
+ * void setAllocation(int dim) {
+ *     int x;
+ *     for (x = 0; x < dim; ++x) {
+ *         rsSetElementAt_uchar(var_allocation, 7, x);
+ *     }
+ * }
+ *
+ * // forEach
+ * uchar RS_KERNEL increment(uchar in) {
+ *     return in+1;
+ * }
+ *
+ * // reduction
+ * #pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
+ *
+ * static void sumAccumulator(int* accum, int val) {
+ *     *accum += val;
+ * }
+ *
+ * static void sumCombiner(int* accum, const int *val) {
+ *     *accum += *val;
+ * }
+ */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
 
+// bitcode slots
+const int mExportVarIdx_var_int = 0;
+const int mExportVarIdx_var_long = 1;
+const int mExportVarIdx_var_float = 2;
+const int mExportVarIdx_var_double = 3;
+const int mExportVarIdx_var_allocation = 4;
+const int mExportVarIdx_var_uint32_t = 5;
+const int mExportVarIdx_var_point2 = 6;
+const int mExportVarIdx_var_int_ptr = 7;
+// bitcode invoke slots
+//const int mExportForEachIdx_root = 0;
+const int mExportForEachIdx_increment = 1;
+// bitcode reduce slots
+const int mExportReduceIdx_summation = 0;
+// bitcode invoke slots
+const int mExportFuncIdx_function = 0;
+const int mExportFuncIdx_functionV = 1;
+const int mExportFuncIdx_setBuffer = 2;
+const int mExportFuncIdx_setAllocation = 3;
+
+// bitcode
 #ifndef __LP64__
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  -84,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,   -8,   12,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -88,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   59,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   25,    0,    0,    0,
-      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,    1,    4,   65,  -16,   -1,   -1,
-      -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,
-     127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,
-     -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,
-      22,    8,   -1,   -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,
-      -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,
-      96,    0,    0,    0, -119,   32,    0,    0,   33,    0,    0,    0,   50,   34, -120,    9,
-      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
-      18,   76, -116, -116,   11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,
-      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   92,   35,
-      77,   17,   37,   76,  126,  -22,   32,  -51,  100,   35,    1,    0,   72,  -71,   75, -102,
-      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -65,  115,
-      20,    4,  -60,  -48,   50,   71, -128,  -48,   67,  -48,    8,   64,    9,   36, -102, -118,
-      32,    1,   84,   21,  -31,  121,  -24,   42, -125,   20,    0, -108, -107,   65,   10,    2,
-     -38, -118,   32,   53,  -44, -103,    0,  -96,  -81,    8,   18,   72,  -31,   64,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   34,    0,    0,    0,
+      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
+      24,   44,   32, -124,  -32,   -1,   -1,   -1,   -1,    7,   96, -127,    1,    4,   65,  -16,
+      -1,   -1,   -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,
+      -1,   -1,  127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,
+       8, -126,  -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,
+       1,   88,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,   -1,   -1,   -1,    0, -122,
+     -62,    2,   34,    0,   65,   16,    4,   65,  -30,   -1,   -1,   -1,   -1,    7,   48,   20,
+      22,   16,   66,  -16,   -1,   -1,   -1,   -1,    3,   24,   44,   32,    2,  -32,   -1,   -1,
+      -1,   -1,    7,   48,    0,    0,    0,    0, -119,   32,    0,    0,   36,    0,    0,    0,
+      50,   34, -120,    9,   32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29,
+    -124,  -95, -112,   20,   18,   76, -116, -116,   11, -124,  -60,   76,   16, -100,  -63,   28,
+       1,   24,   16,   48,   71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   53,
+     -46,   20,   81,  -62,  -28,  -89,   14,  -46,   76,   54,   18,    0, -128,   16,   10,  -18,
+    -110,  -90, -120,   18,   38,   63, -110,  126,   96,   89,   28,    1, -104,   16,  -89,  -15,
+     -17,   28,    5,    1,   45,  115,    4,    8,   53,  -28, -116,    0, -108,    0,  -94,  -88,
+       8,   16,   64,   83,    6,    0, -123, -128,  -86,    6,   32,  -85,    8,   77,   67,   88,
+      25,  -96,    0,   32,  -83,   12,   80,   16,   16,   87,    4, -120,   33,  -49,    4,    0,
+    -127,   69, -128,   66,   18,    7,    2,  -26,    8, -126,   41,    0,    0,    0,    0,    0,
       19,  -80,  112, -112, -121,  118,  -80, -121,   59,  104,    3,  119,  120,    7,  119,   40,
     -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,  119,  -88, -121,
      114,    8,    7,  113,   72, -121,   13,  100,   80,   14,  109,    0,   15,  122,   48,    7,
      114,  -96,    7,  115,   32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,
      -48,    6,  -10,   16,    7,  114, -128,    7,  122,   96,    7,  116,  -96,    7,  113,   32,
        7,  120,  -48,    6,  -18,   48,    7,  114,  -48,    6,  -77,   96,    7,  116,  -96,  -13,
-      64, -118,    4,   50,   66,  100,    4,  -40,  -95,    4,  -64, -124,   12,    0,    0,    4,
-     -64,   14,  101,    0,   44, -124,    0,    0,   32,    0,  118,   40,    5,  112,   33,    3,
-       0,    0,    1,  -80,   67,   57,    0,   12,   33,    0,    0,    8, -128,   29,   74,    2,
-     100,  -56,    0,    0,   64,    0,  -20,   80,   22,   64,   67,    6,    0,    0,    2, -128,
-      13, -121,  -37,  -95,   56,  -64, -122,   12,    0,    0,    4,  -64,   14,   37,    2,   58,
-      96,    0,    0,   32,    0,  118,   40,   17,  -32,    1,    3,    0,    0,    1,   48,   68,
-     -95,    0,    0,    8,    0,    0,    0, -126,   33, -118,    5,    0,   64,    0,    0,    0,
-      16,   12,   81,   48,    0,    0,    4,    0,    0, -128,   96, -120,  -94,    1,  -64,   48,
-       0,    0,    0,    0,   67,   20,   14,    0,    6,    2,    0,    0,    0,   24,  -94,   80,
-       0,    0,   20,    0,    0,    0,  -63,   16,  -59,    3,    2,  -64,    0,    0,    0,    8,
-    -122,   40,   98,    0,    0,  -64,    1,    0,    0,   16,  100, -127,    0,    0,    0,    0,
-      13,    0,    0,    0,   50,   30, -104,   20,   25,   17,   76, -112, -116,    9,   38,   71,
-     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,   32,   98,    4, -128,
-    -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,    4, -128, -104,   17,    0,
-    -126,  108,  -75,    6,   91,  -50,    1,    0,  121,   24,    0,    0,  -30,    0,    0,    0,
-      26,    3,   76, -112,   70,    2,   19,   52,   68,    0,   38,   42,  119,   99,  104,   97,
-     114,   95,  115,  105,  122,  101,   67,    4, -128,   26,   98,    0,  -45,   24,    4,    0,
-     -59,  -90,   45,  -51,  -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,
-       1,   76,   99,   64,    0,   20,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100,
-    -116,   45,  -52,  -19,   12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,
-     -57,   69,  -26,  -90, -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,
-     -28,  -51,   13, -124, -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,
-       6,    7,   38,  101, -120,   48,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,
-       6,   49,   67, -120,   49,   64,  -58,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,
-      54,  -74,   22,  118,   86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,
-     -52, -115,   76,  -18,   45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,
-      49,    6,  -53,   24,   48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,
-      33,  -58,  -64,   25, -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3,
-    -101,   33,  -60,   24,   68,   99,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,
-     -93,   27,   66, -116,    1,   53,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,
-      49,  -74,   50,    6,   50,   67, -120,   49,  -80,  -58,  -32,  -94,   99,   23,   38,   -9,
-      21,  -58,  -58,  -10,   54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   49,
-       6,  -39,   24,  104,   76,  -20,  -62,  -28,  -66,  -62,  -28,  -28,  -62,  -14,   -8,  -16,
-      12,  -67,  -71,  -51,  -47, -123,  -71,  -47,    5,  -55,  -55, -123,  -27,   -7,   12,   33,
-     -58, -128,   27, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,   12,
-      13,  -88,  -73,   52,   55,   58, -103,   33,  -60,   24,  124,   99,    0,    6,  116,  -20,
-     -62,  -28,  -66,  -32,  -34,  -46,  -36,  -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,
-     -67,  -91,  -71,  -47,  -55,   12,   33,  -58,   64,   12,  -58,   96,   12,   24,  -48,   12,
-      17,  -58,  -96,   12, -120, -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -58,
-     -32,   12,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,
-     -91,  -67,  -71,   89,   13,   17,  -58,   32,   13,   72,  -56,  -67,  -67,  -47,   13,   17,
-     -58,   96,   13, -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -58,
-     -96,   13,   24,  -64,   12,   17,  -58,  -32,   13,   40,  -52,  -44,   12,   17,  -58,   32,
-      14, -104,  -52,  -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,
-      26,   27,  -85,  107,  -85,   99,   11,  -93,  123, -109,   27,   66, -116,    1,   29, -116,
-      65,  -62,  101,  -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   50,
-       6,  115,   48,    6,  101,   48,    6,  117,   32,    1,   99,   96,    7,   67, -124,   49,
-       0,    3,    6,  120,   28,  -46,  -36,  -24, -122,   16,   99, -112,    7,   99,  -96,    7,
-      12,  -14, -122,   16,   99,  -64,    7,   99,  -96,    7,  124,  -34,  -38,  -36,  -46,  -32,
-     -34,  -24,  -54,  -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79,
-    -107, -127,   12,  -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -58,  -32,
-      15, -122,    8,   66,   53,  -60,   24,    3,   63,   24,    3,   80,   16,  -86,   33,  -58,
-      24,  -24,  -63,   24, -120, -126,   80,   13,   49,  -58,   96,   20,  -58,   96,   20, -124,
-    -118,    4,  -37, -101,  -37,  -39,   16,   99,   12,   74,   97,   12,   68,   65,  -88, -122,
-      24,   99,   96,   10,   99,   96,   10,   66,  -59,  -62, -116,  -19,   45, -116,  110, -120,
-      49,    6,  -88,   48,    6,  -94,   32,   84,   67, -116,   49,   72, -123,   49,   72,    5,
-     -95,  -94,   65,  -10,   86,   39,  -58,   86,   54,  -60,   24, -125,   85,   24,    3,   81,
-      16,  -86,   33,  -58,   24,  -80,  -62,   24,  -80, -126,   80,   53,   98,   99,  -77,  107,
-     115,  105,  123,   35,  -85,   99,   43,  115,   49,   99,   11,   59, -101, -101,   34,   12,
-      69,   21,   54,   54,  -69,   54, -105,   52,  -78,   50,   55,  -70,   41,  -63,  -47,   99,
-       4,   78,   46,  -20,  -84,   45,  108, -118,  -96,   52,  117,   70,  -28,  -26,  -66,  -54,
-     -16,  -32,  -34,  -28,  -24,  -66,  -20,  -62,  -28,  -90,   32,  -48,   84,   97, -101,   23,
-       6,  100,   80,  104,   68,  110,  -18,  -21,   77,   76,  -83,  108, -116,  -18,  107, -114,
-     -19, -115,  110,  110,   74,   96,    6,  125,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,
-     -28,  -24,  -66,  -52,  -22,  -36,  -58,  -90,    8,  104,  -96,    6,  -67,   70,  -28,  -26,
-     -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -66,
-     -36,  -62,  -38,  -54,  -90,    8,  108,  -32,    6, -107,   70,  -28,  -26,  -66,  -54,  -16,
-     -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -90,    8,  112,   32,
-       7, -115,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -28,  -54,  -56,
-     -22,  -58,  -54,  -90,    4,  119,  -48,  103,   68,  110,  -18,  -85,   12,   15,  -18,   77,
-    -114,  -18, -117,   46,   15,  -82,  108,   74, -128,    7,   61,   74,  -96,  -34,  -46,  -36,
-     -24,  100,  -90,    8,  123,  -48,    7,    0,  121,   24,    0,    0,   92,    0,    0,    0,
+      64, -120,    4,   50,   66,  100,    4,  -40,  -95,    4,    0, -122,   12,    0,    0,    4,
+     -64,   14,  101,    0,   54, -124,    0,    0,   32,    0,  118,   40,    5,  -48,   33,    3,
+       0,    0,    1,  -80,   67,   57,    0,   15,   33,    0,    0,    8, -128,   29,   74,    0,
+      96,  -56,    0,    0,   64,    0,  -20,   80,   18,  -32,   67,    6,    0,    0,    2,   96,
+    -121,  -94,    0,   28,   50,    0,    0,   16,    0,  100,   96, -128,  -37,  -95,   60,   64,
+      24,    0,    3,    0,    0,    1,  -80,   67,  121,    0,   49,    0,    6,    0,    0,    2,
+      96, -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,
+       0,    0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,
+       0,   64,    0,    0,    0,    8, -122,   40,   23,   16,    0,    3,    0,    0,   64,   48,
+      68,  -55,    0,    0,   32,    0,    0,    0, -126,   33,  -54,    6,    0,   67,    1,    0,
+       0,    0,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,   34,    1,    0,
+      32,    0,    0,    0,    4,   67, -108,   15,    8, -128,    3,    0,    0,   32,   24,  -94,
+    -116,    1,    0,    0,    8,    0,    0,   64,   48,   68,   25,    3,    0,    0,   16,    0,
+       0, -128,   96, -120,   50,    6,    0,    0,   36,    0,    0,    0,   65,   22,    8,    0,
+      12,    0,    0,    0,   50,   30, -104,   24,   25,   17,   76, -112, -116,    9,   38,   71,
+     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,  -96,   96,    4, -128,
+    -120,   17,    0,   50,   70,    0,    8,   25,    1,  -96,  101,    4, -128,   28,  -37,   13,
+     -62,  -74, -117,    0,  121,   24,    0,    0,  -13,    0,    0,    0,   26,    3,   76, -112,
+      70,    2,   19,   52,   68,    0,   48,   42,  119,   99,  104,   97,  114,   95,  115,  105,
+     122,  101,   67,    4,   32,   27,   98,    0,   24,   25,    4,   64,  -58,  -90,   45,  -51,
+     -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,    1,   96,  100,   64,
+       0,   25,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100, -116,   45,  -52,  -19,
+      12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,  -57,   69,  -26,  -90,
+    -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,  -28,  -51,   13, -124,
+    -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,    6,    7,   38,  101,
+    -120,   64,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,    6,   49,   67,    8,
+      50,   64,  -56,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,   54,  -74,   22,  118,
+      86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,  -52, -115,   76,  -18,
+      45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,   65,    6,   11,   25,
+      48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,   33,  -56,  -64,   33,
+    -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3, -101,   33,    4,   25,
+      68,  100,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,  -93,   27,   66, -112,
+       1,   69,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,   49,  -74,   50,    6,
+      50,   67,    8,   50,  -80,  -56,  -32,  -94,   99,   23,   38,   -9,   21,  -58,  -58,  -10,
+      54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   65,    6,   25,   25,  104,
+     100,  -20,  -62,  -28,  -66,  -22,  -46,  -36,  -24,  102,  100,  -66,  -24,   24,  -28,   12,
+      33,  -56, -128,   35, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,
+      12,   13,  -88,  -73,   52,   55,   58, -103,   33,    4,   25,  124,  100,    0,    6,   92,
+     -20,  -62,  -28,  -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,
+      13,   33,  -56,   64,   12,  -56,   96,   12,   24,  -48,   12,   17,  -56,  -96,   12, -120,
+    -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -56,  -32,   12,   24,  -71,  -96,
+    -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,  -91,  -67,  -71,   89,   13,
+      17,  -56,   32,   13,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125,  -51, -107,  -47,
+       9,  -43, -103, -103, -107,  -55,   13,   17,  -56,   96,   13,   88,  -71,  -96, -107,  -79,
+     -63, -107,  -55,  125,  -51, -107,  -47,    5,  -79,  -79,  -67, -115, -123,  -47,  -91,  -67,
+     -71,   13,   17,  -56,  -96,   13,   72,  -56,  -67,  -67,  -47,   13,   17,  -56,  -32,   13,
+    -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -56,   32,   14,   24,
+     -64,   12,   17,  -56,   96,   14,   40,  -52,  -44,   12,   17,  -56,  -96,   14, -104,  -52,
+     -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,   26,   27,  -85,
+     107,  -85,   99,   11,  -93,  123, -109,   27,   66, -112,    1,   30, -112,   65,  -62,  101,
+     -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   66,    6,  119,   64,
+       6,  101,   64,    6,  121,    0,    1,  100,  -96,    7,   67,    4,   50,    0,    3,    6,
+     120,   28,  -46,  -36,  -24, -122,   16,  100,  -48,    7,  100,  -32,    7,   12,  -14, -122,
+      16,  100,    0,   10,  100,  -32,    7,  124,  -34,  -38,  -36,  -46,  -32,  -34,  -24,  -54,
+     -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79, -107, -127,   12,
+     -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -56,   96,   20, -122,    8,
+    -126,   54,  -60,   32,    3,   81,   32,    3,   82,   16,  -76,   33,    6,   25,   -8,    1,
+      25, -104, -126,  -96,   13,   49,  -56,  -32,   20,  -56,  -32,   20,    4, -115,    4,  -37,
+    -101,  -37,  -39,   16, -125,   12,   82, -127,   12,   76,   65,  -48, -122,   24,  100,  -96,
+      10,  100,  -96,   10, -126,  -58,  -62, -116,  -19,   45, -116,  110, -120,   65,    6,  -84,
+      64,    6,  -90,   32,  104,   67,   12,   50,  104,    5,   50,  104,    5,   65,  -93,   65,
+     -10,   86,   39,  -58,   86,   54,  -60,   32, -125,   87,   32,    3,   83,   16,  -76,   33,
+       6,   25,  -64,    2,   25,  -64, -126,  -96,  113,    9,  115,  -53,    3, -127,  123,   75,
+     115,  -93,   43, -109,   27,   98, -112, -127,   44, -112, -127,   41,    8,  -38,   16, -125,
+      12,  102, -127,   12,  102,   65,  -48,   26,  -79,  -79,  -39,  -75,  -71,  -76,  -67, -111,
+     -43,  -79, -107,  -71, -104,  -79, -123,  -99,  -51,   77,   17, -122,  -94,   10,   27, -101,
+      93, -101,   75,   26,   89, -103,   27,  -35, -108,  -32,  -24,   49,    2,   39,   23,  118,
+     -42,   22,   54,   69,   80, -102,   58,   35,  114,  115,   95,  101,  120,  112,  111,  114,
+     116,   95,  118,   97,  114,   83,   16,  104,  -86,  -80,  -51,   11,    3,   50,   40,   52,
+      34,   55,   -9,  -11,   38,  -90,   86,   54,   70,   -9,   53,  -57,  -10,   70,   55,   55,
+      37,   48, -125,   62,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  102,
+     117,  110,   99,   83,    8,   52,   80,    3,   54,  112, -125,   94,   35,  114,  115,   95,
+     101,  120,  112,  111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   95,  110,
+      97,  109,  101,   83,    4,   56, -112, -125,   74,   35,  114,  115,   95,  101,  120,  112,
+     111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   83,    4,   58,  -80, -125,
+      70,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  114,  101,  100,  117,
+      99,  101,   83, -126,   61,  -24,   51,   34,   55,   -9,   85, -122,    7,   -9,   38,   71,
+      -9,   69, -105,    7,   87,   54,   37,  -32, -125,   30,   37,   80,  111,  105,  110,  116,
+      50,   83, -124,   63,    8,    5,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
       51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
     -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
       14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
@@ -201,236 +247,309 @@
     -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
       67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
     -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   54,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   20,    0,    0,    0,    4, -108,   66,   49,
-    -108,   67,   17,   20,   68,   25, -108,   68,   81, -112,   80,    4,   20,   12,  101,   36,
-       4,   32,    1,  -45,   80,   70,   66,    0,   18,   16,    6,   67,   25,    9,    1,   72,
-     -64,   24,   12,  101,   44,    5,   32,    1,  -46,   80,  -58,   82,    0,   18,   48,   13,
-     101,   36,    4,   32,    1,   18,   17,   99,    4,   32,    8, -126,   36,   24, -112,   49,
-      70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,    0, -125,   17,  -64,   52,
-       0, -125,   17, -127,   25,   16,  -64,   96, -124,  -48,    6,    3,   48,   24,   49,  -72,
-       1,    1,   12,   70,  -80, -127,   55,    0, -125,   17,  103,  -16,   13,  -64,   96,    4,
-      26, -128,  -63,    0,   12,   70,  -92, -127,   24,   12,  -64,   96, -124,   26, -112,  -63,
-       0,   12,   70,  -84,   65,   25,   12,    0,    6,  -60,    0,    0,   13,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -100,  -62, -106,   65,    8,   84,   97,  -53,
-      48,    4,  -83,  -80,  101,   32,    2,   82,  -40,   50,   20,    1,   41,  108,   25, -116,
-    -128,   20,  -74,   12,   71,   64,   10,   91,    6,   36,   32, -123,   45,   67,   18, -112,
-       2,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   11,    0,    0,    0,
-      19,    4,  -63,   96,    4,  -32,   13,    0, -122,    3,    1,    0,    2,    0,    0,    0,
-     -26,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,    2,    0,    0,    0,
-      91,    6,   32,   32,    5,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,  121,   64,  -40,   55,  -63,  -32,  -64,  -32, -127,
-      12, -125,  112,   32,    5,    0,    0,    0,  -10,   65,    8,   78,   83, -103, -121, -128,
-      52,   22,   82,    8,   78,   83,  -43,    6,   50,    0,  -61,    0,    0,    0,    0,    0,
-      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1,  121,  -61,  -64,  -32,    3,
-     -63,   96, -124,   23,    6,    3, -128,  -31,   64,    0,    0,    0,    4,    0,    0,    0,
-     -10,   49,   84,  -64,   98,   30,    5,   32,    8,   20,   99,   33,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   32, -123,   45, -125,   16,
-    -112,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  125, -125,  -68,   97,   97,    0,    6,   32,   24, -116,  -16,  -60,   96,
-       0,   48,   28,    8,    4,    0,    0,    0,  -10,   49,   84,  -64,   98,   30,    5,   32,
-       8,   20,   99,   34,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -112,  -62, -106,   97,    8,   72,    1,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120, -125,   39,   73,  -12, -115,   17,    3,    2,    8,   22,   48,  -64,
-     112,   32,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
-       0,    0,    0,    0,    0,    0,    0,    0,
+     113,   32,    0,    0,   78,    0,    0,    0,   70,  -64,   84,   64,  -12,   83,   72,   51,
+     -35,  -10,   63,  -39, -128,   82,    1,  -47,   63,   56,   84,  -80,   16,  -90, -128,   20,
+      84,   35,   76, -120,  -45, -104,  -63,   82,    1,  -47, -113,   52,  -45,   -1,   76, -111,
+      53,   52,   18,   49,  105,  -53,  -30,    8,  -64, -124,   56, -115,    5,   32,   21,   16,
+      -3, -117,  -45,   24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,
+      -1,  108,  -45, -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,
+       1,   68,  -11,   29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   77,
+    -124,  -63,   63,  -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,
+     119,   36,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,   22, -107,  127,   16,  -53,
+      67,   68,  -65,   68,   76,  -38,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,
+      68,  127,  -79,   56,  -64,  100,    5,   74,    5,   68,   -1,  -29,   32,  -51,  100,  -37,
+      67, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,   21,    5,
+      17,   89,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   37,  100,  126,   36,
+      -7,   17,   49,   80,    2,  -15,   23, -115,   47,   81,   12,  -25,   48,    1,  -46,   16,
+    -111,   81,   68,   -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,
+      29,   56,   21,   16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,
+      73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,
+      11,   48,   57, -111,    1,   28,   21,   16,   -3,   72,   51,   89,   69,  -28,   31,  -60,
+     -14,   16,  -47,   47,   17,  -45,   70,   21,    5,   17,   25, -124,   35,   81, -116,   38,
+       8,   20,   67,   45,  -64,  -28,   68,   38, -127,   -8, -111,  -28,   15, -109,   19,    1,
+      97,   32,    0,    0,   37,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   66,   49, -108,    3,    9,   69,   64,  -63,   80,   70,
+      82,    0,   23, -128,   13,  101,   36,    5,  112,    1,   23,   17,   99,    4,   32,    8,
+    -126,   36,   24, -112,   49,   70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,
+       0,    0,    0,    0, -125,   17,    0,   54,    0, -125,   17,   65,   25,   16,  -64,   96,
+    -124, -128,    6,    3,   48,   24,   49,  -92,    1,    1,   12,   70,   16,   98,   48,    0,
+    -125,   17,  103,   48,    6,    3,   48,   24,   97,    6,  100,   48,    0,   24,   16,    3,
+       9,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -84,  -62, -106,   65,
+       8,   92,   97,  -53,   48,    4,  -79,  -80,  101,   32,    2,   84,  -40,   50,   20,    1,
+      42,  108,   25, -116,    0,   21,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      11,    0,    0,    0,   19,    4,  -63,   96,    4,   32,    6,    3, -128,  -31,   64,    0,
+       2,    0,    0,    0,   38,   50,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,   32,   64,    5,    0,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   68,   44,   16,    0,    0,    0,
+       1,    0,    0,    0,    4, -108,    2,    0,  -61,   13,   98,  112, -103,  -63,   44,   67,
+      48, -112,    1,   25,   99, -106,   64,   24,  -88,    0,  -82,    0,   13, -124,  -15, -124,
+      50,   48, -125,  -63, -120,   51,   24, -125,    1,   48,   51,  -64,   96,   48,  -36, -128,
+       6,   98,    0,    6,  -77,   12, -125, -112,    6,   24,   14,    4,   14,    0,    0,    0,
+      23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,   47,   68,  -56,  -12,   19, -125,
+      65,  -40,    9,    2,   68,   17, -128,   33,  -61,  101,   36, -124,  -64,   60,  -72, -119,
+      12,    3,  -62,   24,  -54, -128,   52, -126, -103,   16, -120,   79,  -25, -106, -126,   16,
+      23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,    3,    0,    0,    0,
+      91,    6,   33,  -96, -123,   45, -125,   17,  -96,    2,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   36,    0,    0,    0,   19,    4,   67,   44,   16,    0,    0,    0,
+       3,    0,    0,    0,  -44, -108,    3,    5,  -74,  -52,    1,   85,   51,    0,    0,    0,
+     -61,   13,   98,  112, -103,  -63,   44,   67,   32, -104,  -63,   64,    5,  -96,    6,  -63,
+       5,   16,   25, -116,  -39, -122,   50,   64,    3,   96,  -60,  -64,   80,    2,   39,   13,
+     -58,  -32,   12,  -20,   12,   48,   24,   12,   55,  -88, -127,   24, -128,  -63,   44, -125,
+      16,  -84,    1, -122,    3,    1,    0,    0,   14,    0,    0,    0, -122,  114,   -8,   84,
+     -13,    0, -126,  114,    1, -122,  -65,   68,   -2,  115, -100,  -64,  -30,   -1,   66, -124,
+      76,   63,   49,   24, -124, -103,   16,    2,  -13,  -32,   38,   50,   12,    8,   99,   42,
+       3,  -46,    8,  118,   66,   92,   62,  -99,  -37,   10,   66,   92,  -56,   36,   56,  -51,
+       0,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   12,    0,    0,    0,
+      19,    4,  -63, -119,    1,   16,   54,    6,   24,   12, -114,   12,   26,  -56,   50,    8,
+       7,    2,    0,    0,    5,    0,    0,    0,   54,   66,    8,   78,   83, -103, -120, -128,
+      52,   86,   82,    8,   78,   83,  -43,   70,   50,    0,  -61,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -119,  -63,   48,   50,   24,
+       3,   16,   12,   70, -120,   65,   25,   12,    0, -122,    3,    1,    4,    0,    0,    0,
+      54,   50,   84,  -64,   98,   34,    5,   32,    8,   20,   99,   37,    3,   48,   12,    0,
+       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   64, -123,   45, -125,   16,
+     -96,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   18,    0,    0,    0,
+      19,    4,    1, -115,  -63,   32,   49,   24,   86,    6,  100,    0, -126,  -63,    8,   49,
+      48, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,   54,   50,   84,  -64,
+      98,   34,    5,   32,    8,   20,   99,   38,    3,   48,   12,    0,    1,   49,    0,    0,
+       4,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -96,  -62, -106,   97,
+       8,   80,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,
+      19,    4,  -63, -120,    1,  -79,    4,  -45, -127,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,
+      32, -128,   96,   33,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128, -128,   33,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,
+    -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128,  -96,   33,    3,   12,    7,    2,
+       2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,
+       0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2776;
+const int bitCodeLength = 3364;
 
 #else
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0, -116,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  108,   13,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -96,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   88,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   24,    0,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   33,    0,    0,    0,
       11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
-      24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,  127,    0, -125,
-       5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,  -60,   -1,   -1,
-      -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,   22,    8,   -1,
-      -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,   -1,   -1,   -1,
-      -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,   96,    0,    0,
-    -119,   32,    0,    0,   34,    0,    0,    0,   50,   34, -120,    9,   32,  100, -123,    4,
-      19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,   18,   76, -116, -116,
-      11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,   71,    0,   10,   36,
-     -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   28,   36,   77,   17,   37,   76,
-     126,  -22,   32,  -51,  100,   -5,   61, -114,    4,    0,   32,  -27,   46,  105, -118,   40,
-      97,  -14,   35,  -23,    7, -106,  -59,   17, -128,    9,  113,   26,  -65,  -49,   17,   49,
-      12,  -61,   64,   12,   45,  115,    4,    8,   61,    4, -115,    0, -108,   64,  -94,  -87,
-       8,   18,   64,   85,   17,  -98, -121,  -82,   50,   72,    1,   64,   89,   25,  -92,   32,
-     -96,  -83,    8,   82,   67,  -99,    9,    0,   -6, -118,   32, -127,   20,   14,    4,    0,
-      19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,  104,    3,  119,  120,
-       7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,
-     119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,   14,  109,  -48,   14,
-     122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,  115,   32,    7,  109,
-    -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,   32,    7,  109, -112,
-      14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,    7,  114, -128,    7,
-     122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,  122,   96,    7,  116,
-     -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15,  -92,   72,   32,   35,   68,   70,
-    -128,   29,   74,    0,   76,  -56,    0,    0,   64,    0,  -20,   80,    6, -128,   66,    8,
-       0,    0,    2,   96, -121,   82,    0,   21,   50,    0,    0,   16,    0,   59, -108,    3,
-     -80,   16,    2,    0, -128,    0,  -40,  -95,   36,  -64, -123,   12,    0,    0,    4,  -64,
-      14,  101,    1,   48,  100,    0,    0,   32,    0,  -40,  104,  -56,   29, -118,    3,  100,
-       8,    1,    0,   64,    0,  -20,   80,   34,   96,    3,    8,    0,    0,    2,   96, -121,
-      18,    1,   28,   64,    0,    0,   16,    0,   67,   20,   10,    0, -128,    0,    0,    0,
-      32,   24,  -94,   88,    0,    0,    4,    0,    0,    0,  -63,   16,    5,    3,    0,   64,
-       0,    0,    0,    8, -122,   40,   26,    0,   12,    3,    0,    0,    0,   48,   68,  -31,
-       0,   96,   32,    0,    0,    0, -128,   33,   10,    5,    0,   64,    1,    0,    0,   16,
-      12,   81,   60,   32,    0,   12,    0,    0, -128,   96, -120,   34,    6,    0,    0,   28,
-       0,    0,    0,   65,   22,    8,    0,    0,   13,    0,    0,    0,   50,   30, -104,   20,
-      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   24,
-       1,   32,   98,    4, -128, -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,
-       4, -128, -104,   17,    0, -126,  108,  -75,    6,   91,  -50,    1,    0,    0,    0,    0,
-     121,   24,    0,    0,  -48,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
+      24,   44,   16,   -2,   -1,   -1,   -1,  127,    0,   22,   24,    1,    8, -126,   32,    8,
+      18,    2,    8, -126,   32,    8,   18,   -1,   -1,   -1,   -1,   63, -128,  -63,    2,  -31,
+      -1,   -1,   -1,   -1,    7,   48,   90,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,
+      -1,   -1,   -1,    0,    6,   11, -116,    0,    4,   65,   16,    4,    9,    1,    4,   65,
+      16,    4, -119,   -1,   -1,   -1,   -1,   31,  -64,   96,    1,   17, -128,   32,    8, -126,
+      32,  -15,   -1,   -1,   -1,   -1,    3,   24,   10,   11, -120,    0,    4,   65,   16,    4,
+    -119,   -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,
+      15,   96,    0,    0, -119,   32,    0,    0,   38,    0,    0,    0,   50,   34, -120,    9,
+      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
+      18,   76, -116, -116,   11, -124,  -60,   76,   16,  -96,  -63,   28,    1,   24,   16,   48,
+      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   65,  -46,   20,   81,  -62,
+     -28,  -89,   14,  -46,   76,  -74,  -33,  -29,   72,    0,    0,   66,   40,  -72,   75, -102,
+      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -17,  115,
+      68,   12,  -61,   48,  -48,   50,   71, -128,   80,   67,  -50,    8,   64,    9,   32, -118,
+    -118,    0,    1,   52,   21,    2,   98,   26, -128,  -86,   57, -126,  -96,   24, -112,  -29,
+       8,  -64,   69,   88,   17, -102, -122,  -76,   50,   64,    1,   64,   92,   25,  -96,   32,
+      32,  -81,    8,   16,   67,  -96,    9,    0,   18, -117,    0, -115,   68,   14,    4,   76,
+       1,    0,    0,    0,   19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,
+     104,    3,  119,  120,    7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64,
+    -121,   54,   56,    7,  119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,
+      14,  109,  -48,   14,  122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,
+     115,   32,    7,  109, -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,
+      32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,
+       7,  114, -128,    7,  122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,
+     122,   96,    7,  116,  -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15, -124,   72,
+      32,   35,   68,   70, -128,   29,   74,    0,  100,  -56,    0,    0,   64,    0,  -20,   80,
+       6,   96,   67,    8,    0,    0,    2,   96, -121,   82,    0,   31,   50,    0,    0,   16,
+       0,   59, -108,    3,    0,    3, -124,    0,    0,   32,    0,  118,   40,    1, -112,   33,
+       3,    0,    0,    1,  -80,   67,   73, -128,   48,   64,    6,    0,    0,    2,   96, -121,
+     -94,    0,   30,   66,    0,    0,   16,    0,  100,   98, -128,  -36,  -95,   60,  -64,   24,
+       0,    4,    0,    0,    1,  -80,   67,  121,    0,   50,    0,    8,    0,    0,    2,   96,
+    -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,    0,
+       0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,    0,
+      64,    0,    0,    0,    8, -122,   40,   22,   16,    0,    3,    0,    0,   64,   48,   68,
+     -55, -128,    0,   32,    0,    0,    0, -128,   33,  -54,    6,    0,   64,    1,    0,    0,
+      16,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,  -14,    1,  -64,  112,
+       0,    0,    0,    0,   67,   20,    9,    0,    0,    1,    0,    0,   32,   24,  -94, -124,
+       1,   16,    0,    3,    0,    0,   64,   48,   68,   41,    3,    0,    0,   16,    0,    0,
+    -128,   96, -120,   82,    6,    0,    0,   32,    0,    0,    0,  -63,   16,  -91,   12,    0,
+       0,   72,    0,    0,    0, -126,   44,   16,   13,    0,    0,    0,   50,   30, -104,   24,
+      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   40,
+    -104,   17, -128, -126,   40,   16,   10,   70,    0, -120,   24,    1,   32,   99,    4, -128,
+    -112,   17,    0,   90,   70,    0,  -56,  -79,  -19,   34,  108,   63,    9,    0,    0,    0,
+     121,   24,    0,    0,  -22,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
       62,    8,  114,   35, -109,  123,   75,   35,    3,   25,   99,   11,  115,   59,    3,  -79,
       43, -109, -101,   75,  123,  115,    3, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63,
     -127,    1,    1,   65,   17,   11, -101,   43,   35,    3,  121,  115,    3,   97,   98,  -78,
-     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -116,
-       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,   98,   12, -124,
-      49,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
+     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -104,
+       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,  -62,   12,    4,
+      51,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
      -71, -123,  -75, -107,  113,   26,  123,  107,  115,    9,  115,   35, -109,  123,   75,   35,
-     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -116,   65,   49,    6,    6,   15,
-     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67, -120,   49,   64,  -58,   32,   33,
-      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   49,    6,  -53,   24,
-      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,   99,  -32, -116,
+     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -104,   65,   97,    6,    6,   15,
+     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67,    8,   51,   64,  -52,   32,   33,
+      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   97,    6, -117,   25,
+      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,  102,  -32, -104,
      -63,   64,  -59,   46,   76,  -18, -117,  -20,  -83,   78, -116,  -83, -116, -127,  -52,   16,
-      98,   12,  -96,   49, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
-     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -116,  -63,   52,    6,   20,   19,  -69,
-      48,  -71,  -81,   48,   57,  -71,  -80,   60,   62,   60,   67,  111,  110,  115,  116,   97,
-     110,  116,   65,  114,  114,   97,  121,   62,   67, -120,   49,  -80,  -58,  -32,  -94,   98,
-      23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,  -22,   45,  -51, -115,   78,
-     102,    8,   49,    6,  -39,   24,  104,  116,  -20,  -62,  -28,  -66,  -32,  -34,  -46,  -36,
-     -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,  -67,  -91,  -71,  -47,  -55,   12,   33,
-     -58, -128,   27, -125, -114,    1,  -51,   16,   97,   12,   62,   34,  102,  117,  110,   99,
-     116,  105,  111,  110,   67, -124,   49,    8,    3,   70,   46,  104,  101,  108,  112,  101,
-     114,   95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67, -124,   49,   24,    3,
-      18,  114,  111,  111,  116,   67, -124,   49,   40,    3,   38,  105,  110,   99,  114,  101,
-     109,  101,  110,  116,   67, -124,   49,   56,    3,    6,   48,   67, -124,   49,   72,    3,
-      10,   51,   53,   67, -124,   49,   88,    3,   38,  115,  117,  109,  109,   97,  116,  105,
-     111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,  -34,
-     -28, -122,   16,   99,  -32,    6,   99,   48,  112, -103,  -85,  107,   27,  122,  107,   19,
-      75,  115,   43, -109,   27,  -94, -116,   65,   27, -116,  -63,   55,    6,  111,   32,    1,
-      99,    0,    7,   67, -124,   49,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66, -116,
-     -63,   28, -116,    1,   29,   48,  -56,   27,   66, -116, -127,   29, -116,    1,   29,  -16,
-     121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,   99,
-      52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,   20,
-      20,   52,   68,   24, -125,   60,   24,   34,    8,  -45,   16,   99,   12,  -16,   96,   12,
-     -12,   64, -104, -122,   24,   99,   64,    7,   99,  -64,    7,  -62,   52,  -60,   24, -125,
-      62,   24, -125,   62,   16,   38,   18,  108,  111,  110,  103,   67, -116,   49,   -8, -125,
-      49,  -32,    3,   97,   26,   98, -116,    1,   40, -116,    1,   40,    8,   19,   11,   51,
-     -74,  -73,   48,  -70,   33,  -58,   24, -120,  -62,   24,  -16, -127,   48,   13,   49,  -58,
-      96,   20,  -58,   96,   20, -124, -119,    6,  -39,   91,  -99,   24,   91,  -39,   16,   99,
-      12,   74,   97,   12,   -8,   64, -104, -122,   24,   99,   96,   10,   99,   96,   10,  -62,
-      84, -123, -115,  -51,  -82,  -51,   37, -115,  -84,  -52, -115,  110,   74,   16,  -12,   24,
-    -127, -109,   11,   59,  107,   11, -101,   34,   16,   71,  -99,   17,  -71,  -71,  -81,   50,
-      60,  -72,   55,   57,  -70,   47,  -69,   48,  -71,   41, -120,  -46,   60,   82, -123,  109,
-      94,  -95,   17,  -71,  -71,  -81,   55,   49,  -75,  -78,   49,  -70,  -81,   57,  -74,   55,
-     -70,  -71,   41,    1,   24,  -12,   25, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,
-      -5,   50,  -85,  115,   27, -101,   34, -120,    1,   25,  -12,   26, -111, -101,   -5,   42,
-     -61, -125,  123, -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67,   -5,  114,   11,
-     107,   43, -101,   34, -104,    1,   26,   84,   26, -111, -101,   -5,   42,  -61, -125,  123,
-    -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67, -101,   34,  -88,    1,   27,   52,
-      26, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,   -5, -110,   43,   35,  -85,   27,
-      43, -101,   18,  -60,   65,  -97,   17,  -71,  -71,  -81,   50,   60,  -72,   55,   57,  -70,
-      47,  -70,   60,  -72,  -78,   41, -127,   28,  -12,   40, -127,  122,   75,  115,  -93, -109,
-    -103,   34,  -44,  -63,   29,    0,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
-      51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
-    -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
-      14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
-       5,   61, -120,   67,   56, -124, -125,   27,  -52,    3,   61,  -56,   67,   61, -116,    3,
-      61,  -52,  120, -116,  116,  112,    7,  123,    8,    7,  121,   72, -121,  112,  112,    7,
-     122,  112,    3,  118,  120, -121,  112,   32, -121,   25,  -52,   17,   14,  -20, -112,   14,
-     -31,   48,   15,  110,   48,   15,  -29,  -16,   14,  -16,   80,   14,   51,   16,  -60,   29,
-     -34,   33,   28,  -40,   33,   29,  -62,   97,   30,  102,   48, -119,   59,  -68, -125,   59,
-     -48,   67,   57,  -76,    3,   60,  -68, -125,   60, -124,    3,   59,  -52,  -16,   20,  118,
-      96,    7,  123,  104,    7,   55,  104, -121,  114,  104,    7,   55, -128, -121,  112, -112,
-    -121,  112,   96,    7,  118,   40,    7,  118,   -8,    5,  118,  120, -121,  119, -128, -121,
-      95,    8, -121,  113,   24, -121,  114, -104, -121,  121, -104, -127,   44,  -18,  -16,   14,
-     -18,  -32,   14,  -11,  -64,   14,  -20,   48,    3,   98,  -56,  -95,   28,  -28,  -95,   28,
-     -52,  -95,   28,  -28,  -95,   28,  -36,   97,   28,  -54,   33,   28,  -60, -127,   29,  -54,
-      97,    6,  -42, -112,   67,   57,  -56,   67,   57, -104,   67,   57,  -56,   67,   57,  -72,
-     -61,   56, -108,   67,   56, -120,    3,   59, -108,  -61,   47,  -68, -125,   60,   -4, -126,
-      59,  -44,    3,   59,  -80,  -61,   12,  -57,  105, -121,  112,   88, -121,  114,  112, -125,
-     116,  104,    7,  120,   96, -121,  116,   24, -121,  116,  -96, -121,   25,  -50,   83,   15,
-     -18,    0,   15,  -14,   80,   14,  -28, -112,   14,  -29,   64,   15,  -31,   32,   14,  -20,
-      80,   14,   51,   32,   40,   29,  -36,  -63,   30,  -62,   65,   30,  -46,   33,   28,  -36,
-    -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
-      67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
-    -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   55,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   21,    0,    0,    0,    4, -108,   64,   41,
-      20,   67,   57,   20,   68,   73,   20,    5,    9,  101,   80,    2,   69,   64,  -63,   80,
-      70,   66,    8, -109,   48,    6,   67,   25,   75,   33,   76, -128,   52, -108,  -79,   20,
-     -62,    4,  112,   67,   25,    9,   33,   76,   66,   25,   12,  101,   36, -124,   48,    9,
-     100,   48, -108, -111,   16,  -62,   36,   76,   68, -116,   17, -128,   32,    8, -110,   96,
-      64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8, -110,   32,    1,    0,    0,
-    -125,   17,    0,   55,    0, -125,   17,   65,   25,   16,  -64,   96, -124,  -64,    6,    3,
-      48,   24,   49,  -76,    1,    1,   12,   70,  -84,   65,   55,    0, -125,   17,  106,  -32,
-      13,  -64,   96,   68,   26,  124,    3,   48,   24,   97,    6,   96,   48,    0, -125,   17,
-     103,   16,    6,    3,   48,   24, -127,    6,   98,   48,    0,   24,   16,    3,    0,    0,
-      13,    0,    0,    0,   91,    6,   32,  -16, -125,   45,   67,   16, -124,  -62, -106,   65,
-       8,   72,   97,  -53,   48,    4,  -89,  -80,  101,   32,    2,   63,  -40,   50,   20, -127,
-      31,  108,   25, -116,  -64,   15,  -74,   12,   71,  -32,    7,   91,    6,   36,  -16, -125,
-      45,   67,   18,   -8,    1,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,   96,    4,  -64,   13,    0, -122,    3,    1,    0,
-       2,    0,    0,    0,  -58,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
-       2,    0,    0,    0,   91,    6,   32,  -16,    3,    0,    0,    0,    0,    0,    0,    0,
+     -62,   12,   32,   51, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
+     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -104,  -63,  100,    6,   20,   25,  -69,
+      48,  -71,  -81,  -70,   52,   55,  -70,   25, -103,   47,   58,    6,   57,   67,    8,   51,
+     -80,  -52,  -32,  -94,   98,   23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,
+     -22,   45,  -51, -115,   78,  102,    8,   97,    6, -103,   25,  104,   92,  -20,  -62,  -28,
+     -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,   13,   33,  -52,
+    -128,   51, -125, -114,    1,  -51,   16,  -63,   12,   62,   34,  102,  117,  110,   99,  116,
+     105,  111,  110,   67,    4,   51,    8,    3,   70,   46,  104,  101,  108,  112,  101,  114,
+      95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67,    4,   51,   24,    3,   70,
+      46,  104,  101,  108,  112,  101,  114,   95,  115,  101,  116,   66,  117,  102,  102,  101,
+     114,   67,    4,   51,   40,    3,   86,   46,  104,  101,  108,  112,  101,  114,   95,  115,
+     101,  116,   65,  108,  108,  111,   99,   97,  116,  105,  111,  110,   67,    4,   51,   56,
+       3,   18,  114,  111,  111,  116,   67,    4,   51,   72,    3,   38,  105,  110,   99,  114,
+     101,  109,  101,  110,  116,   67,    4,   51,   88,    3,    6,   48,   67,    4,   51,  104,
+       3,   10,   51,   53,   67,    4,   51,  120,    3,   38,  115,  117,  109,  109,   97,  116,
+     105,  111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,
+     -34,  -28, -122,   16,  102,   32,    7,  102,   48,  112, -103,  -85,  107,   27,  122,  107,
+      19,   75,  115,   43, -109,   27,  -94, -104,   65,   28, -104,  -63,  103,    6,  115,    0,
+       1,  102,   64,    7,   67,    4,   51,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66,
+    -104,  -63,   29, -104,    1,   30,   48,  -56,   27,   66, -104, -127,   30, -104,    1,   30,
+     -16,  121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,
+      99,   52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,
+      20,   20,   52,   68,   48, -125,   62,   24,   34,    8,  -38,   16,  -61,   12,   -8,  -64,
+      12,   -4,   64,  -48, -122,   24,  102, -128,    7,  102,    0,   10, -126,   54,  -60,   48,
+    -125,   80,   48, -125,   80,   16,   52,   18,  108,  111,  110,  103,   67,   12,   51,   24,
+       5,   51,    0,    5,   65,   27,   98, -104,    1,   41, -104,    1,   41,    8,   26,   11,
+      51,  -74,  -73,   48,  -70,   33, -122,   25, -104, -126,   25, -128, -126,  -96,   13,   49,
+     -52,  -32,   20,  -52,  -32,   20,    4, -115,    6,  -39,   91,  -99,   24,   91,  -39,   16,
+     -61,   12,   82,  -63,   12,   64,   65,  -48, -122,   24,  102,  -96,   10,  102,  -96,   10,
+    -126,  -58,   37,  -52,   45,   15,    4,  -18,   45,  -51, -115,  -82,   76,  110, -120,   97,
+       6,  -84,   96,    6,  -96,   32,  104,   67,   12,   51,  104,    5,   51,  104,    5,   65,
+      27,   34,    8,  -37,   16,   65,  -32, -122,    8,   66,   54,    4,   19,   52,   97,   51,
+       3,   87,   16,   54,   97,   51,    3,   87,   16,   56,   97,   51,    3,   87,   16,   50,
+      97,   51,    3,   87,  -88,  -62,  -58,  102,  -41,  -26, -110,   70,   86,  -26,   70,   55,
+      37,    8,  122, -116,  -64,  -55, -123,  -99,  -75, -123,   77,   17, -120,  -93,  -50, -120,
+     -36,  -36,   87,   25,   30,  -36, -101,   28,  -35, -105,   93, -104,  -36,   20,   68,  105,
+      30,  -87,  -62,   54,  -81,  -48, -120,  -36,  -36,  -41, -101, -104,   90,  -39,   24,  -35,
+     -41,   28,  -37,   27,  -35,  -36, -108,    0,   12,   -6, -116,  -56,  -51,  125, -107,  -31,
+     -63,  -67,  -55,  -47,  125, -103,  -43,  -71, -115,   77,   33,  -60, -128,   12,  -52,    0,
+      13,  122, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55,
+    -107, -123, -115,  -95,  125,  -71, -123,  -75, -107,   77,   17,  -44, -128,   13,   42, -115,
+     -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55, -107, -123, -115,
+     -95,   77,   17,  -36,    0,   14,   26, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,
+     -47,  125,  -55, -107, -111,  -43, -115, -107,   77,    9,  -22,  -96,  -49, -120,  -36,  -36,
+      87,   25,   30,  -36, -101,   28,  -35,   23,   93,   30,   92,  -39, -108,  -64,   14,  122,
+    -108,   64,  -67,  -91,  -71,  -47,  -55,   76,   17,  -14,   96,   15,    0,    0,    0,    0,
+     121,   24,    0,    0,   92,    0,    0,    0,   51,    8, -128,   28,  -60,  -31,   28,  102,
+      20,    1,   61, -120,   67,   56, -124,  -61, -116,   66, -128,    7,  121,  120,    7,  115,
+    -104,  113,   12,  -26,    0,   15,  -19,   16,   14,  -12, -128,   14,   51,   12,   66,   30,
+     -62,  -63,   29,  -50,  -95,   28,  102,   48,    5,   61, -120,   67,   56, -124, -125,   27,
+     -52,    3,   61,  -56,   67,   61, -116,    3,   61,  -52,  120, -116,  116,  112,    7,  123,
+       8,    7,  121,   72, -121,  112,  112,    7,  122,  112,    3,  118,  120, -121,  112,   32,
+    -121,   25,  -52,   17,   14,  -20, -112,   14,  -31,   48,   15,  110,   48,   15,  -29,  -16,
+      14,  -16,   80,   14,   51,   16,  -60,   29,  -34,   33,   28,  -40,   33,   29,  -62,   97,
+      30,  102,   48, -119,   59,  -68, -125,   59,  -48,   67,   57,  -76,    3,   60,  -68, -125,
+      60, -124,    3,   59,  -52,  -16,   20,  118,   96,    7,  123,  104,    7,   55,  104, -121,
+     114,  104,    7,   55, -128, -121,  112, -112, -121,  112,   96,    7,  118,   40,    7,  118,
+      -8,    5,  118,  120, -121,  119, -128, -121,   95,    8, -121,  113,   24, -121,  114, -104,
+    -121,  121, -104, -127,   44,  -18,  -16,   14,  -18,  -32,   14,  -11,  -64,   14,  -20,   48,
+       3,   98,  -56,  -95,   28,  -28,  -95,   28,  -52,  -95,   28,  -28,  -95,   28,  -36,   97,
+      28,  -54,   33,   28,  -60, -127,   29,  -54,   97,    6,  -42, -112,   67,   57,  -56,   67,
+      57, -104,   67,   57,  -56,   67,   57,  -72,  -61,   56, -108,   67,   56, -120,    3,   59,
+    -108,  -61,   47,  -68, -125,   60,   -4, -126,   59,  -44,    3,   59,  -80,  -61,   12,  -57,
+     105, -121,  112,   88, -121,  114,  112, -125,  116,  104,    7,  120,   96, -121,  116,   24,
+    -121,  116,  -96, -121,   25,  -50,   83,   15,  -18,    0,   15,  -14,   80,   14,  -28, -112,
+      14,  -29,   64,   15,  -31,   32,   14,  -20,   80,   14,   51,   32,   40,   29,  -36,  -63,
+      30,  -62,   65,   30,  -46,   33,   28,  -36, -127,   30,  -36,  -32,   28,  -28,  -31,   29,
+     -22,    1,   30,  102,   24,   81,   56,  -80,   67,   58, -100, -125,   59,  -52,   80,   36,
+     118,   96,    7,  123,  104,    7,   55,   96, -121,  119,  120,    7,  120, -104,   81,   76,
+     -12, -112,   15,  -16,   80,   14,    0,    0,  113,   32,    0,    0,   84,    0,    0,    0,
+      70,  -64,   84,   64,  -12,   83,   72,   51,  -35,  -10,   63,  -39, -128,   82,    1,  -47,
+      63,   56,   84,  -80,   16,  -90, -128,   20,   84,   35,   76, -120,  -45, -104,  -63,   82,
+       1,  -47, -113,   52,  -45,   -1,   76, -111,   53,   52,   18,   49,  105,  -53,  -30,    8,
+     -64, -124,   56, -115,   61,  100,  -53,   82,   49,   62,   67,   48,  -62, -125,   -7,   15,
+    -115,  -16,   -2,   67,   35,  -68, -113,  -24,  -72,    5,   32,   21,   16,   -3, -117,  -45,
+      24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,   -1,  108,  -45,
+    -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,    1,   68,  -11,
+      29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   81, -124,  -63,   63,
+     -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,  119,   36,   -3,
+     -64,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,   68,  127,  -79,   56,  -64,
+     100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -61,
+      57,   76, -128,   52,   68,  100,   23, -107,  127,   16,  -53,   67,   68,  -65,   68,   76,
+     -38,  -78,   56,    2,   48,   33,   78,   99,    5,   74,    5,   68,   -1,  -29,   32,  -51,
+     100,   27,   68, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,
+      21,    5,   17, -103,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   85,   68,
+      -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,   29,   56,   21,
+      16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,   73,  126,   68,
+      12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,   11,   48,   57,
+    -111,    1,   28,   21,   16,   -3,   72,   51, -103,   69,  -28,   31,  -60,  -14,   16,  -47,
+      47,   17,  -45,   70,   21,    5,   17,   89, -124,   35,   81, -116,   38,    8,   20,   67,
+      45,  -64,  -28,   68,   54, -127,   -8, -111,  -28,   15, -109,   19,    1,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   64,   41,   20,   67,   57, -112,   80,    4,   20,   12,
+     101,   36, -123,  -96,    1,  100,   48, -108, -111,   20, -126,    6,   96,   68, -116,   17,
+    -128,   32,    8, -110,   96,   64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8,
+    -110,   32,    1,    0, -125,   17,    0,   25,   12,  -64,   96,   68, -128,    6,    4,   48,
+      24,   33,  -84,  -63,    0,   12,   70,   12,  108,   64,    0, -125,   17,   68,   25,   12,
+     -64,   96, -124,   26, -104,  -63,    0,   12,   70,  -92,  -63,   25,   12,    0,    6,  -60,
+       0,    0,    0,    0,    9,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -108,  -62, -106,   65,    8,   80,   97,  -53,   48,    4,  -85,  -80,  101,   32,    2,   81,
+     -40,   50,   20, -127,   40,  108,   25, -116,   64,   20,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   11,    0,    0,    0,   19,    4,  -63,   96,    4,   64,    6,    3,
+    -128,  -31,   64,    0,    2,    0,    0,    0,   70,   50,    0, -111,    1,    0,    0,    0,
+       1,   49,    0,    0,    2,    0,    0,    0,   91,    6,   32,   16,    5,    0,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   46,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    2,    0,    0,    0,    4, -108,    2,    9,   37,    0,    0,    0,
+     -61,   13,  100, -128, -103,  -63,   44,   67,   48, -100,    1,   25,  100, -106,   64,   24,
+     -88,   16,  -76,   96,   13, -124,  -15,    4,   52,   72, -125,  -63,    8,   53,   40, -125,
+       1,  -80,   52,   48,    3,   24,  -36,   26,    0,   48,  -36,  -64,    6,  100,    0,    6,
+     -77,   12, -125,  -48,    6,   24,   14,    4,   20,    0,    0,    0,  -90, -126,    0,   81,
+       4,   96,  -56,  112,   89, -118, -126,   52,   67,    5,   68, -110, -113,   84,  -58,  -78,
+      44,  -59,   20,   -7,   22,   50,   16,   72,  101,   43,   15,  -46,   12,   21,   16,   73,
+      62,   82,   -7,   13,  113,   77,   23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,
+      47,   68,  -56,  -12,   19, -125,   65,  -40,    9,   33,   48,   15,  110,   36,  -61, -128,
+      48,  -42, -126,   16,   23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,
+       3,    0,    0,    0,   91,    6,   33,  112, -123,   45, -125,   17, -120,    2,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   45,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    5,    0,    0,    0,    4, -108,   64,   65, -112,   80,   64,  -44,
+    -108,    3,   93,   35,    0,  -28,  -40,   50,    7,    0,    0,    0,   51,   17,   12,   80,
+       6,  -60,  112,    3,   25,   96,  102,   48,  -53,   16,   12,  108,  112,  107,  -32,  -20,
+      44, -127,   48,   80,    1,   96,  -63,   27,    8,   35,    6,    8,    0,   60,  109,  -96,
+       6,  103,   96,    6,  105,   48,   98,   96,   40, -128,  -77,    6,  104,  -32,    6,  -26,
+       6,  101,    0, -125,  -31, -122,   55,   32,    3,   48, -104,  101,   24,    4,   56,  -64,
+     112,   32,    0,    0,   13,    0,    0,    0,  -74,   50,   76,  -52,  115,    1, -122,  -65,
+      68,   -2,  115,  -36,  -64,  -30,   -1,   66, -124,   76,   63,   49,   24, -124,  -79,   16,
+       2,  -13,  -32,   70,   50,   12,    8,   99,   47,    3,  -46,    8,  -26,   66,   92,   62,
+     -99,   27,   12,   66,   92,  -56,   36,   56,  -51,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,  -93, -112,    5,    0,    0,    0,    0,    0,    0,    0,
       97,   32,    0,    0,   15,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
-       1,    0,    0,    0,    4, -108,    0,    0,  -57,    1,   97,   94,    7, -125,   -5,   30,
-      72,   48,    8,    7,    2,    0,    0,    0,    5,    0,    0,    0,  -26,   65,    8,   78,
-      83,   25, -121, -128,   52,    6,   82,    8,   78,   83,  -43,  -10,   49,    0,  -61,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,   15,    0,    0,    0,   19,    4,    1,  113,
-     -61,  -68,   14,    4, -125,   17,  -36,   55,    0,   24,   14,    4,    4,    0,    0,    0,
-     -42,   49,   84,  -64,   98,   28,    5,   32,    8,   20,   99,   31,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,  -16, -125,   45, -125,   16,
-      -8,    1,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  117, -125,  -72,   97,  -97,    7, -126,  -63,    8,   14,   12,    6,    0,
-     -61, -127,    0,    0,    4,    0,    0,    0,  -42,   49,   84,  -64,   98,   28,    5,   32,
-       8,   20,   99,   32,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,  -16, -125,   45,   67,   16,   -8,  -63, -106,   97,    8,   -4,    0,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120,    3,   55,   73,  -44, -115,   17,    3,    2,    8,   22,   15,  -61,
-    -127,    0,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       1,    0,    0,    0,    4, -108,    0,    0,   71,    6,   64, -104,   25, -108,    1,   12,
+     -18,   12,   26,   72,   52,    8,    7,    2,    5,    0,    0,    0,  102,   66,    8,   78,
+      83,   25, -119, -128,   52, -122,   82,    8,   78,   83,  -43,  118,   50,    0,  -61,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -111,
+     -63,   48,   51,   40,    3,   16,   12,   70, -112,  -63,   25,   12,    0, -122,    3,    1,
+       4,    0,    0,    0,   86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   39,
+       3,   48,   12,    0,    1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   16,
+    -123,   45, -125,   16, -120,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      18,    0,    0,    0,   19,    4,    1, -107,  -63,   32,   50,   24,  118,    6,  102,    0,
+    -126,  -63,    8,   50,   64, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,
+      86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   40,    3,   48,   12,    0,
+       1,   49,    0,    0,    4,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -120,  -62, -106,   97,    8,   68,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       3,    0,    0,    0,   19,    4,  -63, -120,    1,  -95,    4,  -44, -127,    0,    0,    0,
+      97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24,
+    -107,  -63,   24,   49,   32, -128,   96,   49,    3,   12,    7,    2,    2,    0,    0,    0,
+       7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,
+      32, -128, -128,   49,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,   32, -128,  -96,   49,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2744;
+const int bitCodeLength = 3480;
 
 #endif