[
  {
    "path": ".gitignore",
    "content": "\n# ignore these types\n\n*.cache\n*.log\n*.suo\n*.sdf\n*.opensdf\n*.pdb\n*.user\n*.tmp_proj\n*.bsc\n*.ilk\n\n# intel compiler generated\n*_ispc*.h\n\n#ignore these folders\n\nDebug/\nRelease/\nbin/\nobj/\nipch/\n\t\n*.DS_Store\n\n*.pipl\nPlugins/\n*.dds\n*.aps\n*.zip\n*.tmp\n"
  },
  {
    "path": "3rdParty/DirectXTex/.gitignore",
    "content": "*.psess\n*.vsp\n*.log\n*.err\n*.wrn\n*.suo\n*.sdf\n*.user\n*.i\n*.vspscc\n*.opensdf\n*.ipch\n*.cache\n*.tlog\n*.lastbuildstate\n*.ilk\nBin\n/ipch\nDebug\nProfile\nRelease\nx64\n/Tests\n/wiki"
  },
  {
    "path": "3rdParty/DirectXTex/DDSTextureLoader/DDSTextureLoader.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: DDSTextureLoader.cpp\n//\n// Functions for loading a DDS texture and creating a Direct3D 11 runtime resource for it\n//\n// Note these functions are useful as a light-weight runtime loader for DDS files. For\n// a full-featured DDS file reader, writer, and texture processing pipeline see\n// the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n#include <assert.h>\n#include <algorithm>\n#include <memory>\n\n#include \"DDSTextureLoader.h\"\n\n#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )\n#pragma comment(lib,\"dxguid.lib\")\n#endif\n\nusing namespace DirectX;\n\n//--------------------------------------------------------------------------------------\n// Macros\n//--------------------------------------------------------------------------------------\n#ifndef MAKEFOURCC\n    #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \\\n                ((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) |       \\\n                ((uint32_t)(uint8_t)(ch2) << 16) | ((uint32_t)(uint8_t)(ch3) << 24 ))\n#endif /* defined(MAKEFOURCC) */\n\n//--------------------------------------------------------------------------------------\n// DDS file structure definitions\n//\n// See DDS.h in the 'Texconv' sample and the 'DirectXTex' library\n//--------------------------------------------------------------------------------------\n#pragma pack(push,1)\n\nconst uint32_t DDS_MAGIC = 0x20534444; // \"DDS \"\n\nstruct DDS_PIXELFORMAT\n{\n    uint32_t    size;\n    uint32_t    flags;\n    uint32_t    fourCC;\n    uint32_t    RGBBitCount;\n    uint32_t    RBitMask;\n    uint32_t    GBitMask;\n    uint32_t    BBitMask;\n    uint32_t    ABitMask;\n};\n\n#define DDS_FOURCC      0x00000004  // DDPF_FOURCC\n#define DDS_RGB         0x00000040  // DDPF_RGB\n#define DDS_LUMINANCE   0x00020000  // DDPF_LUMINANCE\n#define DDS_ALPHA       0x00000002  // DDPF_ALPHA\n\n#define DDS_HEADER_FLAGS_VOLUME         0x00800000  // DDSD_DEPTH\n\n#define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT\n#define DDS_WIDTH  0x00000004 // DDSD_WIDTH\n\n#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX\n#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX\n#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY\n#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY\n#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ\n#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ\n\n#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\\\n                               DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\\\n                               DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )\n\n#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP\n\nenum DDS_MISC_FLAGS2\n{\n    DDS_MISC_FLAGS2_ALPHA_MODE_MASK = 0x7L,\n};\n\nstruct DDS_HEADER\n{\n    uint32_t        size;\n    uint32_t        flags;\n    uint32_t        height;\n    uint32_t        width;\n    uint32_t        pitchOrLinearSize;\n    uint32_t        depth; // only if DDS_HEADER_FLAGS_VOLUME is set in flags\n    uint32_t        mipMapCount;\n    uint32_t        reserved1[11];\n    DDS_PIXELFORMAT ddspf;\n    uint32_t        caps;\n    uint32_t        caps2;\n    uint32_t        caps3;\n    uint32_t        caps4;\n    uint32_t        reserved2;\n};\n\nstruct DDS_HEADER_DXT10\n{\n    DXGI_FORMAT     dxgiFormat;\n    uint32_t        resourceDimension;\n    uint32_t        miscFlag; // see D3D11_RESOURCE_MISC_FLAG\n    uint32_t        arraySize;\n    uint32_t        miscFlags2;\n};\n\n#pragma pack(pop)\n\n//--------------------------------------------------------------------------------------\nnamespace\n{\n\nstruct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };\n\ntypedef public std::unique_ptr<void, handle_closer> ScopedHandle;\n\ninline HANDLE safe_handle( HANDLE h ) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }\n\ntemplate<UINT TNameLength>\ninline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char (&name)[TNameLength])\n{\n#if defined(_DEBUG) || defined(PROFILE)\n    resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);\n#else\n    UNREFERENCED_PARAMETER(resource);\n    UNREFERENCED_PARAMETER(name);\n#endif\n}\n\n};\n\n//--------------------------------------------------------------------------------------\nstatic HRESULT LoadTextureDataFromFile( _In_z_ const wchar_t* fileName,\n                                        std::unique_ptr<uint8_t[]>& ddsData,\n                                        DDS_HEADER** header,\n                                        uint8_t** bitData,\n                                        size_t* bitSize\n                                      )\n{\n    if (!header || !bitData || !bitSize)\n    {\n        return E_POINTER;\n    }\n\n    // open the file\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( fileName,\n                                                  GENERIC_READ,\n                                                  FILE_SHARE_READ,\n                                                  OPEN_EXISTING,\n                                                  nullptr ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( fileName,\n                                                  GENERIC_READ,\n                                                  FILE_SHARE_READ,\n                                                  nullptr,\n                                                  OPEN_EXISTING,\n                                                  FILE_ATTRIBUTE_NORMAL,\n                                                  nullptr ) ) );\n#endif\n\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Get the file size\n    LARGE_INTEGER FileSize = { 0 };\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)\n    FILE_STANDARD_INFO fileInfo;\n    if ( !GetFileInformationByHandleEx( hFile.get(), FileStandardInfo, &fileInfo, sizeof(fileInfo) ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n    FileSize = fileInfo.EndOfFile;\n#else\n    GetFileSizeEx( hFile.get(), &FileSize );\n#endif\n\n    // File is too big for 32-bit allocation, so reject read\n    if (FileSize.HighPart > 0)\n    {\n        return E_FAIL;\n    }\n\n    // Need at least enough data to fill the header and magic number to be a valid DDS\n    if (FileSize.LowPart < ( sizeof(DDS_HEADER) + sizeof(uint32_t) ) )\n    {\n        return E_FAIL;\n    }\n\n    // create enough space for the file data\n    ddsData.reset( new (std::nothrow) uint8_t[ FileSize.LowPart ] );\n    if (!ddsData)\n    {\n        return E_OUTOFMEMORY;\n    }\n\n    // read the data in\n    DWORD BytesRead = 0;\n    if (!ReadFile( hFile.get(),\n                   ddsData.get(),\n                   FileSize.LowPart,\n                   &BytesRead,\n                   nullptr\n                 ))\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    if (BytesRead < FileSize.LowPart)\n    {\n        return E_FAIL;\n    }\n\n    // DDS files always start with the same magic number (\"DDS \")\n    uint32_t dwMagicNumber = *( const uint32_t* )( ddsData.get() );\n    if (dwMagicNumber != DDS_MAGIC)\n    {\n        return E_FAIL;\n    }\n\n    auto hdr = reinterpret_cast<DDS_HEADER*>( ddsData.get() + sizeof( uint32_t ) );\n\n    // Verify header to validate DDS file\n    if (hdr->size != sizeof(DDS_HEADER) ||\n        hdr->ddspf.size != sizeof(DDS_PIXELFORMAT))\n    {\n        return E_FAIL;\n    }\n\n    // Check for DX10 extension\n    bool bDXT10Header = false;\n    if ((hdr->ddspf.flags & DDS_FOURCC) &&\n        (MAKEFOURCC( 'D', 'X', '1', '0' ) == hdr->ddspf.fourCC))\n    {\n        // Must be long enough for both headers and magic value\n        if (FileSize.LowPart < ( sizeof(DDS_HEADER) + sizeof(uint32_t) + sizeof(DDS_HEADER_DXT10) ) )\n        {\n            return E_FAIL;\n        }\n\n        bDXT10Header = true;\n    }\n\n    // setup the pointers in the process request\n    *header = hdr;\n    ptrdiff_t offset = sizeof( uint32_t ) + sizeof( DDS_HEADER )\n                       + (bDXT10Header ? sizeof( DDS_HEADER_DXT10 ) : 0);\n    *bitData = ddsData.get() + offset;\n    *bitSize = FileSize.LowPart - offset;\n\n    return S_OK;\n}\n\n\n//--------------------------------------------------------------------------------------\n// Return the BPP for a particular format\n//--------------------------------------------------------------------------------------\nstatic size_t BitsPerPixel( _In_ DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        return 128;\n\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_UINT:\n    case DXGI_FORMAT_R32G32B32_SINT:\n        return 96;\n\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n    case DXGI_FORMAT_R32G32_TYPELESS:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R32G32_UINT:\n    case DXGI_FORMAT_R32G32_SINT:\n    case DXGI_FORMAT_R32G8X24_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n        return 64;\n\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n    case DXGI_FORMAT_R16G16_TYPELESS:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R16G16_UINT:\n    case DXGI_FORMAT_R16G16_SNORM:\n    case DXGI_FORMAT_R16G16_SINT:\n    case DXGI_FORMAT_R32_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R32_UINT:\n    case DXGI_FORMAT_R32_SINT:\n    case DXGI_FORMAT_R24G8_TYPELESS:\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_YUY2:\n        return 32;\n\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n        return 24;\n\n    case DXGI_FORMAT_R8G8_TYPELESS:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R8G8_UINT:\n    case DXGI_FORMAT_R8G8_SNORM:\n    case DXGI_FORMAT_R8G8_SINT:\n    case DXGI_FORMAT_R16_TYPELESS:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R16_UINT:\n    case DXGI_FORMAT_R16_SNORM:\n    case DXGI_FORMAT_R16_SINT:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_A8P8:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        return 16;\n\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n    case DXGI_FORMAT_NV11:\n        return 12;\n\n    case DXGI_FORMAT_R8_TYPELESS:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R8_UINT:\n    case DXGI_FORMAT_R8_SNORM:\n    case DXGI_FORMAT_R8_SINT:\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n        return 8;\n\n    case DXGI_FORMAT_R1_UNORM:\n        return 1;\n\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        return 4;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return 8;\n\n    default:\n        return 0;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\n// Get surface information for a particular format\n//--------------------------------------------------------------------------------------\nstatic void GetSurfaceInfo( _In_ size_t width,\n                            _In_ size_t height,\n                            _In_ DXGI_FORMAT fmt,\n                            _Out_opt_ size_t* outNumBytes,\n                            _Out_opt_ size_t* outRowBytes,\n                            _Out_opt_ size_t* outNumRows )\n{\n    size_t numBytes = 0;\n    size_t rowBytes = 0;\n    size_t numRows = 0;\n\n    bool bc = false;\n    bool packed = false;\n    bool planar = false;\n    size_t bpe = 0;\n    switch (fmt)\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        bc=true;\n        bpe = 8;\n        break;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        bc = true;\n        bpe = 16;\n        break;\n\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_YUY2:\n        packed = true;\n        bpe = 4;\n        break;\n\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n        packed = true;\n        bpe = 8;\n        break;\n\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n        planar = true;\n        bpe = 2;\n        break;\n\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n        planar = true;\n        bpe = 4;\n        break;\n    }\n\n    if (bc)\n    {\n        size_t numBlocksWide = 0;\n        if (width > 0)\n        {\n            numBlocksWide = std::max<size_t>( 1, (width + 3) / 4 );\n        }\n        size_t numBlocksHigh = 0;\n        if (height > 0)\n        {\n            numBlocksHigh = std::max<size_t>( 1, (height + 3) / 4 );\n        }\n        rowBytes = numBlocksWide * bpe;\n        numRows = numBlocksHigh;\n        numBytes = rowBytes * numBlocksHigh;\n    }\n    else if (packed)\n    {\n        rowBytes = ( ( width + 1 ) >> 1 ) * bpe;\n        numRows = height;\n        numBytes = rowBytes * height;\n    }\n    else if ( fmt == DXGI_FORMAT_NV11 )\n    {\n        rowBytes = ( ( width + 3 ) >> 2 ) * 4;\n        numRows = height * 2; // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data\n        numBytes = rowBytes * numRows;\n    }\n    else if (planar)\n    {\n        rowBytes = ( ( width + 1 ) >> 1 ) * bpe;\n        numBytes = ( rowBytes * height ) + ( ( rowBytes * height + 1 ) >> 1 );\n        numRows = height + ( ( height + 1 ) >> 1 );\n    }\n    else\n    {\n        size_t bpp = BitsPerPixel( fmt );\n        rowBytes = ( width * bpp + 7 ) / 8; // round up to nearest byte\n        numRows = height;\n        numBytes = rowBytes * height;\n    }\n\n    if (outNumBytes)\n    {\n        *outNumBytes = numBytes;\n    }\n    if (outRowBytes)\n    {\n        *outRowBytes = rowBytes;\n    }\n    if (outNumRows)\n    {\n        *outNumRows = numRows;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\n#define ISBITMASK( r,g,b,a ) ( ddpf.RBitMask == r && ddpf.GBitMask == g && ddpf.BBitMask == b && ddpf.ABitMask == a )\n\nstatic DXGI_FORMAT GetDXGIFormat( const DDS_PIXELFORMAT& ddpf )\n{\n    if (ddpf.flags & DDS_RGB)\n    {\n        // Note that sRGB formats are written using the \"DX10\" extended header\n\n        switch (ddpf.RGBBitCount)\n        {\n        case 32:\n            if (ISBITMASK(0x000000ff,0x0000ff00,0x00ff0000,0xff000000))\n            {\n                return DXGI_FORMAT_R8G8B8A8_UNORM;\n            }\n\n            if (ISBITMASK(0x00ff0000,0x0000ff00,0x000000ff,0xff000000))\n            {\n                return DXGI_FORMAT_B8G8R8A8_UNORM;\n            }\n\n            if (ISBITMASK(0x00ff0000,0x0000ff00,0x000000ff,0x00000000))\n            {\n                return DXGI_FORMAT_B8G8R8X8_UNORM;\n            }\n\n            // No DXGI format maps to ISBITMASK(0x000000ff,0x0000ff00,0x00ff0000,0x00000000) aka D3DFMT_X8B8G8R8\n\n            // Note that many common DDS reader/writers (including D3DX) swap the\n            // the RED/BLUE masks for 10:10:10:2 formats. We assume\n            // below that the 'backwards' header mask is being used since it is most\n            // likely written by D3DX. The more robust solution is to use the 'DX10'\n            // header extension and specify the DXGI_FORMAT_R10G10B10A2_UNORM format directly\n\n            // For 'correct' writers, this should be 0x000003ff,0x000ffc00,0x3ff00000 for RGB data\n            if (ISBITMASK(0x3ff00000,0x000ffc00,0x000003ff,0xc0000000))\n            {\n                return DXGI_FORMAT_R10G10B10A2_UNORM;\n            }\n\n            // No DXGI format maps to ISBITMASK(0x000003ff,0x000ffc00,0x3ff00000,0xc0000000) aka D3DFMT_A2R10G10B10\n\n            if (ISBITMASK(0x0000ffff,0xffff0000,0x00000000,0x00000000))\n            {\n                return DXGI_FORMAT_R16G16_UNORM;\n            }\n\n            if (ISBITMASK(0xffffffff,0x00000000,0x00000000,0x00000000))\n            {\n                // Only 32-bit color channel format in D3D9 was R32F\n                return DXGI_FORMAT_R32_FLOAT; // D3DX writes this out as a FourCC of 114\n            }\n            break;\n\n        case 24:\n            // No 24bpp DXGI formats aka D3DFMT_R8G8B8\n            break;\n\n        case 16:\n            if (ISBITMASK(0x7c00,0x03e0,0x001f,0x8000))\n            {\n                return DXGI_FORMAT_B5G5R5A1_UNORM;\n            }\n            if (ISBITMASK(0xf800,0x07e0,0x001f,0x0000))\n            {\n                return DXGI_FORMAT_B5G6R5_UNORM;\n            }\n\n            // No DXGI format maps to ISBITMASK(0x7c00,0x03e0,0x001f,0x0000) aka D3DFMT_X1R5G5B5\n\n            if (ISBITMASK(0x0f00,0x00f0,0x000f,0xf000))\n            {\n                return DXGI_FORMAT_B4G4R4A4_UNORM;\n            }\n\n            // No DXGI format maps to ISBITMASK(0x0f00,0x00f0,0x000f,0x0000) aka D3DFMT_X4R4G4B4\n\n            // No 3:3:2, 3:3:2:8, or paletted DXGI formats aka D3DFMT_A8R3G3B2, D3DFMT_R3G3B2, D3DFMT_P8, D3DFMT_A8P8, etc.\n            break;\n        }\n    }\n    else if (ddpf.flags & DDS_LUMINANCE)\n    {\n        if (8 == ddpf.RGBBitCount)\n        {\n            if (ISBITMASK(0x000000ff,0x00000000,0x00000000,0x00000000))\n            {\n                return DXGI_FORMAT_R8_UNORM; // D3DX10/11 writes this out as DX10 extension\n            }\n\n            // No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4\n        }\n\n        if (16 == ddpf.RGBBitCount)\n        {\n            if (ISBITMASK(0x0000ffff,0x00000000,0x00000000,0x00000000))\n            {\n                return DXGI_FORMAT_R16_UNORM; // D3DX10/11 writes this out as DX10 extension\n            }\n            if (ISBITMASK(0x000000ff,0x00000000,0x00000000,0x0000ff00))\n            {\n                return DXGI_FORMAT_R8G8_UNORM; // D3DX10/11 writes this out as DX10 extension\n            }\n        }\n    }\n    else if (ddpf.flags & DDS_ALPHA)\n    {\n        if (8 == ddpf.RGBBitCount)\n        {\n            return DXGI_FORMAT_A8_UNORM;\n        }\n    }\n    else if (ddpf.flags & DDS_FOURCC)\n    {\n        if (MAKEFOURCC( 'D', 'X', 'T', '1' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC1_UNORM;\n        }\n        if (MAKEFOURCC( 'D', 'X', 'T', '3' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC2_UNORM;\n        }\n        if (MAKEFOURCC( 'D', 'X', 'T', '5' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC3_UNORM;\n        }\n\n        // While pre-multiplied alpha isn't directly supported by the DXGI formats,\n        // they are basically the same as these BC formats so they can be mapped\n        if (MAKEFOURCC( 'D', 'X', 'T', '2' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC2_UNORM;\n        }\n        if (MAKEFOURCC( 'D', 'X', 'T', '4' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC3_UNORM;\n        }\n\n        if (MAKEFOURCC( 'A', 'T', 'I', '1' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC4_UNORM;\n        }\n        if (MAKEFOURCC( 'B', 'C', '4', 'U' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC4_UNORM;\n        }\n        if (MAKEFOURCC( 'B', 'C', '4', 'S' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC4_SNORM;\n        }\n\n        if (MAKEFOURCC( 'A', 'T', 'I', '2' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC5_UNORM;\n        }\n        if (MAKEFOURCC( 'B', 'C', '5', 'U' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC5_UNORM;\n        }\n        if (MAKEFOURCC( 'B', 'C', '5', 'S' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_BC5_SNORM;\n        }\n\n        // BC6H and BC7 are written using the \"DX10\" extended header\n\n        if (MAKEFOURCC( 'R', 'G', 'B', 'G' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_R8G8_B8G8_UNORM;\n        }\n        if (MAKEFOURCC( 'G', 'R', 'G', 'B' ) == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_G8R8_G8B8_UNORM;\n        }\n\n        if (MAKEFOURCC('Y','U','Y','2') == ddpf.fourCC)\n        {\n            return DXGI_FORMAT_YUY2;\n        }\n\n        // Check for D3DFORMAT enums being set here\n        switch( ddpf.fourCC )\n        {\n        case 36: // D3DFMT_A16B16G16R16\n            return DXGI_FORMAT_R16G16B16A16_UNORM;\n\n        case 110: // D3DFMT_Q16W16V16U16\n            return DXGI_FORMAT_R16G16B16A16_SNORM;\n\n        case 111: // D3DFMT_R16F\n            return DXGI_FORMAT_R16_FLOAT;\n\n        case 112: // D3DFMT_G16R16F\n            return DXGI_FORMAT_R16G16_FLOAT;\n\n        case 113: // D3DFMT_A16B16G16R16F\n            return DXGI_FORMAT_R16G16B16A16_FLOAT;\n\n        case 114: // D3DFMT_R32F\n            return DXGI_FORMAT_R32_FLOAT;\n\n        case 115: // D3DFMT_G32R32F\n            return DXGI_FORMAT_R32G32_FLOAT;\n\n        case 116: // D3DFMT_A32B32G32R32F\n            return DXGI_FORMAT_R32G32B32A32_FLOAT;\n        }\n    }\n\n    return DXGI_FORMAT_UNKNOWN;\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic DXGI_FORMAT MakeSRGB( _In_ DXGI_FORMAT format )\n{\n    switch( format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC1_UNORM:\n        return DXGI_FORMAT_BC1_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC2_UNORM:\n        return DXGI_FORMAT_BC2_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC3_UNORM:\n        return DXGI_FORMAT_BC3_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n        return DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n        return DXGI_FORMAT_B8G8R8X8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC7_UNORM:\n        return DXGI_FORMAT_BC7_UNORM_SRGB;\n\n    default:\n        return format;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic HRESULT FillInitData( _In_ size_t width,\n                             _In_ size_t height,\n                             _In_ size_t depth,\n                             _In_ size_t mipCount,\n                             _In_ size_t arraySize,\n                             _In_ DXGI_FORMAT format,\n                             _In_ size_t maxsize,\n                             _In_ size_t bitSize,\n                             _In_reads_bytes_(bitSize) const uint8_t* bitData,\n                             _Out_ size_t& twidth,\n                             _Out_ size_t& theight,\n                             _Out_ size_t& tdepth,\n                             _Out_ size_t& skipMip,\n                             _Out_writes_(mipCount*arraySize) D3D11_SUBRESOURCE_DATA* initData )\n{\n    if ( !bitData || !initData )\n    {\n        return E_POINTER;\n    }\n\n    skipMip = 0;\n    twidth = 0;\n    theight = 0;\n    tdepth = 0;\n\n    size_t NumBytes = 0;\n    size_t RowBytes = 0;\n    const uint8_t* pSrcBits = bitData;\n    const uint8_t* pEndBits = bitData + bitSize;\n\n    size_t index = 0;\n    for( size_t j = 0; j < arraySize; j++ )\n    {\n        size_t w = width;\n        size_t h = height;\n        size_t d = depth;\n        for( size_t i = 0; i < mipCount; i++ )\n        {\n            GetSurfaceInfo( w,\n                            h,\n                            format,\n                            &NumBytes,\n                            &RowBytes,\n                            nullptr\n                          );\n\n            if ( (mipCount <= 1) || !maxsize || (w <= maxsize && h <= maxsize && d <= maxsize) )\n            {\n                if ( !twidth )\n                {\n                    twidth = w;\n                    theight = h;\n                    tdepth = d;\n                }\n\n                assert(index < mipCount * arraySize);\n                _Analysis_assume_(index < mipCount * arraySize);\n                initData[index].pSysMem = ( const void* )pSrcBits;\n                initData[index].SysMemPitch = static_cast<UINT>( RowBytes );\n                initData[index].SysMemSlicePitch = static_cast<UINT>( NumBytes );\n                ++index;\n            }\n            else if ( !j )\n            {\n                // Count number of skipped mipmaps (first item only)\n                ++skipMip;\n            }\n\n            if (pSrcBits + (NumBytes*d) > pEndBits)\n            {\n                return HRESULT_FROM_WIN32( ERROR_HANDLE_EOF );\n            }\n  \n            pSrcBits += NumBytes * d;\n\n            w = w >> 1;\n            h = h >> 1;\n            d = d >> 1;\n            if (w == 0)\n            {\n                w = 1;\n            }\n            if (h == 0)\n            {\n                h = 1;\n            }\n            if (d == 0)\n            {\n                d = 1;\n            }\n        }\n    }\n\n    return (index > 0) ? S_OK : E_FAIL;\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,\n                                   _In_ uint32_t resDim,\n                                   _In_ size_t width,\n                                   _In_ size_t height,\n                                   _In_ size_t depth,\n                                   _In_ size_t mipCount,\n                                   _In_ size_t arraySize,\n                                   _In_ DXGI_FORMAT format,\n                                   _In_ D3D11_USAGE usage,\n                                   _In_ unsigned int bindFlags,\n                                   _In_ unsigned int cpuAccessFlags,\n                                   _In_ unsigned int miscFlags,\n                                   _In_ bool forceSRGB,\n                                   _In_ bool isCubeMap,\n                                   _In_reads_opt_(mipCount*arraySize) D3D11_SUBRESOURCE_DATA* initData,\n                                   _Outptr_opt_ ID3D11Resource** texture,\n                                   _Outptr_opt_ ID3D11ShaderResourceView** textureView )\n{\n    if ( !d3dDevice )\n        return E_POINTER;\n\n    HRESULT hr = E_FAIL;\n\n    if ( forceSRGB )\n    {\n        format = MakeSRGB( format );\n    }\n\n    switch ( resDim ) \n    {\n        case D3D11_RESOURCE_DIMENSION_TEXTURE1D:\n            {\n                D3D11_TEXTURE1D_DESC desc;\n                desc.Width = static_cast<UINT>( width ); \n                desc.MipLevels = static_cast<UINT>( mipCount );\n                desc.ArraySize = static_cast<UINT>( arraySize );\n                desc.Format = format;\n                desc.Usage = usage;\n                desc.BindFlags = bindFlags;\n                desc.CPUAccessFlags = cpuAccessFlags;\n                desc.MiscFlags = miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n\n                ID3D11Texture1D* tex = nullptr;\n                hr = d3dDevice->CreateTexture1D( &desc,\n                                                 initData,\n                                                 &tex\n                                               );\n                if (SUCCEEDED( hr ) && tex != 0)\n                {\n                    if (textureView != 0)\n                    {\n                        D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;\n                        memset( &SRVDesc, 0, sizeof( SRVDesc ) );\n                        SRVDesc.Format = format;\n\n                        if (arraySize > 1)\n                        {\n                            SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1DARRAY;\n                            SRVDesc.Texture1DArray.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n                            SRVDesc.Texture1DArray.ArraySize = static_cast<UINT>( arraySize );\n                        }\n                        else\n                        {\n                            SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D;\n                            SRVDesc.Texture1D.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n                        }\n\n                        hr = d3dDevice->CreateShaderResourceView( tex,\n                                                                  &SRVDesc,\n                                                                  textureView\n                                                                );\n                        if ( FAILED(hr) )\n                        {\n                            tex->Release();\n                            return hr;\n                        }\n                    }\n\n                    if (texture != 0)\n                    {\n                        *texture = tex;\n                    }\n                    else\n                    {\n                        SetDebugObjectName(tex, \"DDSTextureLoader\");\n                        tex->Release();\n                    }\n                }\n            }\n           break;\n\n        case D3D11_RESOURCE_DIMENSION_TEXTURE2D:\n            {\n                D3D11_TEXTURE2D_DESC desc;\n                desc.Width = static_cast<UINT>( width );\n                desc.Height = static_cast<UINT>( height );\n                desc.MipLevels = static_cast<UINT>( mipCount );\n                desc.ArraySize = static_cast<UINT>( arraySize );\n                desc.Format = format;\n                desc.SampleDesc.Count = 1;\n                desc.SampleDesc.Quality = 0;\n                desc.Usage = usage;\n                desc.BindFlags = bindFlags;\n                desc.CPUAccessFlags = cpuAccessFlags;\n                if ( isCubeMap )\n                {\n                    desc.MiscFlags = miscFlags | D3D11_RESOURCE_MISC_TEXTURECUBE;\n                }\n                else\n                {\n                    desc.MiscFlags = miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n                }\n\n                ID3D11Texture2D* tex = nullptr;\n                hr = d3dDevice->CreateTexture2D( &desc,\n                                                 initData,\n                                                 &tex\n                                               );\n                if (SUCCEEDED( hr ) && tex != 0)\n                {\n                    if (textureView != 0)\n                    {\n                        D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;\n                        memset( &SRVDesc, 0, sizeof( SRVDesc ) );\n                        SRVDesc.Format = format;\n\n                        if ( isCubeMap )\n                        {\n                            if (arraySize > 6)\n                            {\n                                SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;\n                                SRVDesc.TextureCubeArray.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n\n                                // Earlier we set arraySize to (NumCubes * 6)\n                                SRVDesc.TextureCubeArray.NumCubes = static_cast<UINT>( arraySize / 6 );\n                            }\n                            else\n                            {\n                                SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE;\n                                SRVDesc.TextureCube.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n                            }\n                        }\n                        else if (arraySize > 1)\n                        {\n                            SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY;\n                            SRVDesc.Texture2DArray.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n                            SRVDesc.Texture2DArray.ArraySize = static_cast<UINT>( arraySize );\n                        }\n                        else\n                        {\n                            SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;\n                            SRVDesc.Texture2D.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n                        }\n\n                        hr = d3dDevice->CreateShaderResourceView( tex,\n                                                                  &SRVDesc,\n                                                                  textureView\n                                                                );\n                        if ( FAILED(hr) )\n                        {\n                            tex->Release();\n                            return hr;\n                        }\n                    }\n\n                    if (texture != 0)\n                    {\n                        *texture = tex;\n                    }\n                    else\n                    {\n                        SetDebugObjectName(tex, \"DDSTextureLoader\");\n                        tex->Release();\n                    }\n                }\n            }\n            break;\n\n        case D3D11_RESOURCE_DIMENSION_TEXTURE3D:\n            {\n                D3D11_TEXTURE3D_DESC desc;\n                desc.Width = static_cast<UINT>( width );\n                desc.Height = static_cast<UINT>( height );\n                desc.Depth = static_cast<UINT>( depth );\n                desc.MipLevels = static_cast<UINT>( mipCount );\n                desc.Format = format;\n                desc.Usage = usage;\n                desc.BindFlags = bindFlags;\n                desc.CPUAccessFlags = cpuAccessFlags;\n                desc.MiscFlags = miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n\n                ID3D11Texture3D* tex = nullptr;\n                hr = d3dDevice->CreateTexture3D( &desc,\n                                                 initData,\n                                                 &tex\n                                               );\n                if (SUCCEEDED( hr ) && tex != 0)\n                {\n                    if (textureView != 0)\n                    {\n                        D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;\n                        memset( &SRVDesc, 0, sizeof( SRVDesc ) );\n                        SRVDesc.Format = format;\n\n                        SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D;\n                        SRVDesc.Texture3D.MipLevels = (!mipCount) ? -1 : desc.MipLevels;\n\n                        hr = d3dDevice->CreateShaderResourceView( tex,\n                                                                  &SRVDesc,\n                                                                  textureView\n                                                                );\n                        if ( FAILED(hr) )\n                        {\n                            tex->Release();\n                            return hr;\n                        }\n                    }\n\n                    if (texture != 0)\n                    {\n                        *texture = tex;\n                    }\n                    else\n                    {\n                        SetDebugObjectName(tex, \"DDSTextureLoader\");\n                        tex->Release();\n                    }\n                }\n            }\n            break; \n    }\n\n    return hr;\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic HRESULT CreateTextureFromDDS( _In_ ID3D11Device* d3dDevice,\n                                     _In_opt_ ID3D11DeviceContext* d3dContext,\n                                     _In_ const DDS_HEADER* header,\n                                     _In_reads_bytes_(bitSize) const uint8_t* bitData,\n                                     _In_ size_t bitSize,\n                                     _In_ size_t maxsize,\n                                     _In_ D3D11_USAGE usage,\n                                     _In_ unsigned int bindFlags,\n                                     _In_ unsigned int cpuAccessFlags,\n                                     _In_ unsigned int miscFlags,\n                                     _In_ bool forceSRGB,\n                                     _Outptr_opt_ ID3D11Resource** texture,\n                                     _Outptr_opt_ ID3D11ShaderResourceView** textureView )\n{\n    HRESULT hr = S_OK;\n\n    UINT width = header->width;\n    UINT height = header->height;\n    UINT depth = header->depth;\n\n    uint32_t resDim = D3D11_RESOURCE_DIMENSION_UNKNOWN;\n    UINT arraySize = 1;\n    DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN;\n    bool isCubeMap = false;\n\n    size_t mipCount = header->mipMapCount;\n    if (0 == mipCount)\n    {\n        mipCount = 1;\n    }\n\n    if ((header->ddspf.flags & DDS_FOURCC) &&\n        (MAKEFOURCC( 'D', 'X', '1', '0' ) == header->ddspf.fourCC ))\n    {\n        auto d3d10ext = reinterpret_cast<const DDS_HEADER_DXT10*>( (const char*)header + sizeof(DDS_HEADER) );\n\n        arraySize = d3d10ext->arraySize;\n        if (arraySize == 0)\n        {\n           return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n        }\n\n        switch( d3d10ext->dxgiFormat )\n        {\n        case DXGI_FORMAT_AI44:\n        case DXGI_FORMAT_IA44:\n        case DXGI_FORMAT_P8:\n        case DXGI_FORMAT_A8P8:\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n        default:\n            if ( BitsPerPixel( d3d10ext->dxgiFormat ) == 0 )\n            {\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n            }\n        }\n           \n        format = d3d10ext->dxgiFormat;\n\n        switch ( d3d10ext->resourceDimension )\n        {\n        case D3D11_RESOURCE_DIMENSION_TEXTURE1D:\n            // D3DX writes 1D textures with a fixed Height of 1\n            if ((header->flags & DDS_HEIGHT) && height != 1)\n            {\n                return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n            }\n            height = depth = 1;\n            break;\n\n        case D3D11_RESOURCE_DIMENSION_TEXTURE2D:\n            if (d3d10ext->miscFlag & D3D11_RESOURCE_MISC_TEXTURECUBE)\n            {\n                arraySize *= 6;\n                isCubeMap = true;\n            }\n            depth = 1;\n            break;\n\n        case D3D11_RESOURCE_DIMENSION_TEXTURE3D:\n            if (!(header->flags & DDS_HEADER_FLAGS_VOLUME))\n            {\n                return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n            }\n\n            if (arraySize > 1)\n            {\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n            }\n            break;\n\n        default:\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n\n        resDim = d3d10ext->resourceDimension;\n    }\n    else\n    {\n        format = GetDXGIFormat( header->ddspf );\n\n        if (format == DXGI_FORMAT_UNKNOWN)\n        {\n           return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n\n        if (header->flags & DDS_HEADER_FLAGS_VOLUME)\n        {\n            resDim = D3D11_RESOURCE_DIMENSION_TEXTURE3D;\n        }\n        else \n        {\n            if (header->caps2 & DDS_CUBEMAP)\n            {\n                // We require all six faces to be defined\n                if ((header->caps2 & DDS_CUBEMAP_ALLFACES ) != DDS_CUBEMAP_ALLFACES)\n                {\n                    return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n                }\n\n                arraySize = 6;\n                isCubeMap = true;\n            }\n\n            depth = 1;\n            resDim = D3D11_RESOURCE_DIMENSION_TEXTURE2D;\n\n            // Note there's no way for a legacy Direct3D 9 DDS to express a '1D' texture\n        }\n\n        assert( BitsPerPixel( format ) != 0 );\n    }\n\n    // Bound sizes (for security purposes we don't trust DDS file metadata larger than the D3D 11.x hardware requirements)\n    if (mipCount > D3D11_REQ_MIP_LEVELS)\n    {\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    switch ( resDim )\n    {\n    case D3D11_RESOURCE_DIMENSION_TEXTURE1D:\n        if ((arraySize > D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION) ||\n            (width > D3D11_REQ_TEXTURE1D_U_DIMENSION) )\n        {\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n        break;\n\n    case D3D11_RESOURCE_DIMENSION_TEXTURE2D:\n        if ( isCubeMap )\n        {\n            // This is the right bound because we set arraySize to (NumCubes*6) above\n            if ((arraySize > D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION) ||\n                (width > D3D11_REQ_TEXTURECUBE_DIMENSION) ||\n                (height > D3D11_REQ_TEXTURECUBE_DIMENSION))\n            {\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n            }\n        }\n        else if ((arraySize > D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION) ||\n                    (width > D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION) ||\n                    (height > D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION))\n        {\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n        break;\n\n    case D3D11_RESOURCE_DIMENSION_TEXTURE3D:\n        if ((arraySize > 1) ||\n            (width > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) ||\n            (height > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) ||\n            (depth > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) )\n        {\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n        break;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    bool autogen = false;\n    if ( mipCount == 1 && d3dContext != 0 && textureView != 0 ) // Must have context and shader-view to auto generate mipmaps\n    {\n        // See if format is supported for auto-gen mipmaps (varies by feature level)\n        UINT fmtSupport = 0;\n        hr = d3dDevice->CheckFormatSupport( format, &fmtSupport );\n        if ( SUCCEEDED(hr) && ( fmtSupport & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN ) )\n        {\n            // 10level9 feature levels do not support auto-gen mipgen for volume textures\n            if ( ( resDim != D3D11_RESOURCE_DIMENSION_TEXTURE3D )\n                 || ( d3dDevice->GetFeatureLevel() >= D3D_FEATURE_LEVEL_10_0 ) )\n            {\n                autogen = true;\n            }\n        }\n    }\n\n    if ( autogen )\n    {\n        // Create texture with auto-generated mipmaps\n        ID3D11Resource* tex = nullptr;\n        hr = CreateD3DResources( d3dDevice, resDim, width, height, depth, 0, arraySize,\n                                 format, usage,\n                                 bindFlags | D3D11_BIND_RENDER_TARGET,\n                                 cpuAccessFlags,\n                                 miscFlags | D3D11_RESOURCE_MISC_GENERATE_MIPS, forceSRGB,\n                                 isCubeMap, nullptr, &tex, textureView );\n        if ( SUCCEEDED(hr) )\n        {\n            size_t numBytes = 0;\n            size_t rowBytes = 0;\n            GetSurfaceInfo( width, height, format, &numBytes, &rowBytes, nullptr );\n\n            if ( numBytes > bitSize )\n            {\n                (*textureView)->Release();\n                *textureView = nullptr;\n                tex->Release();\n                return HRESULT_FROM_WIN32( ERROR_HANDLE_EOF );\n            }\n\n            D3D11_SHADER_RESOURCE_VIEW_DESC desc;\n            (*textureView)->GetDesc( &desc );\n\n            UINT mipLevels = 1;\n\n            switch( desc.ViewDimension )\n            {\n            case D3D_SRV_DIMENSION_TEXTURE1D:       mipLevels = desc.Texture1D.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURE1DARRAY:  mipLevels = desc.Texture1DArray.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURE2D:       mipLevels = desc.Texture2D.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURE2DARRAY:  mipLevels = desc.Texture2DArray.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURECUBE:     mipLevels = desc.TextureCube.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURECUBEARRAY:mipLevels = desc.TextureCubeArray.MipLevels; break;\n            case D3D_SRV_DIMENSION_TEXTURE3D:       mipLevels = desc.Texture3D.MipLevels; break;\n            default:\n                (*textureView)->Release();\n                *textureView = nullptr;\n                tex->Release();\n                return E_UNEXPECTED;\n            }\n\n            if ( arraySize > 1 )\n            {\n                const uint8_t* pSrcBits = bitData;\n                const uint8_t* pEndBits = bitData + bitSize;\n                for( UINT item = 0; item < arraySize; ++item )\n                {\n                    if ( (pSrcBits + numBytes) > pEndBits )\n                    {\n                        (*textureView)->Release();\n                        *textureView = nullptr;\n                        tex->Release();\n                        return HRESULT_FROM_WIN32( ERROR_HANDLE_EOF );\n                    }\n\n                    UINT res = D3D11CalcSubresource( 0, item, mipLevels );\n                    d3dContext->UpdateSubresource( tex, res, nullptr, pSrcBits, static_cast<UINT>(rowBytes), static_cast<UINT>(numBytes) );\n                    pSrcBits += numBytes;\n                }\n            }\n            else\n            {\n                d3dContext->UpdateSubresource( tex, 0, nullptr, bitData, static_cast<UINT>(rowBytes), static_cast<UINT>(numBytes) );\n            }\n\n            d3dContext->GenerateMips( *textureView );\n\n            if ( texture )\n            {\n                *texture = tex;\n            }\n            else\n            {\n                tex->Release();\n            }\n        }\n    }\n    else\n    {\n        // Create the texture\n        std::unique_ptr<D3D11_SUBRESOURCE_DATA[]> initData( new (std::nothrow) D3D11_SUBRESOURCE_DATA[ mipCount * arraySize ] );\n        if ( !initData )\n        {\n            return E_OUTOFMEMORY;\n        }\n\n        size_t skipMip = 0;\n        size_t twidth = 0;\n        size_t theight = 0;\n        size_t tdepth = 0;\n        hr = FillInitData( width, height, depth, mipCount, arraySize, format, maxsize, bitSize, bitData,\n                           twidth, theight, tdepth, skipMip, initData.get() );\n\n        if ( SUCCEEDED(hr) )\n        {\n            hr = CreateD3DResources( d3dDevice, resDim, twidth, theight, tdepth, mipCount - skipMip, arraySize,\n                                     format, usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                     isCubeMap, initData.get(), texture, textureView );\n\n            if ( FAILED(hr) && !maxsize && (mipCount > 1) )\n            {\n                // Retry with a maxsize determined by feature level\n                switch( d3dDevice->GetFeatureLevel() )\n                {\n                case D3D_FEATURE_LEVEL_9_1:\n                case D3D_FEATURE_LEVEL_9_2:\n                    if ( isCubeMap )\n                    {\n                        maxsize = 512 /*D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION*/;\n                    }\n                    else\n                    {\n                        maxsize = (resDim == D3D11_RESOURCE_DIMENSION_TEXTURE3D)\n                                  ? 256 /*D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION*/\n                                  : 2048 /*D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                    }\n                    break;\n\n                case D3D_FEATURE_LEVEL_9_3:\n                    maxsize = (resDim == D3D11_RESOURCE_DIMENSION_TEXTURE3D)\n                              ? 256 /*D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION*/\n                              : 4096 /*D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                    break;\n\n                default: // D3D_FEATURE_LEVEL_10_0 & D3D_FEATURE_LEVEL_10_1\n                    maxsize = (resDim == D3D11_RESOURCE_DIMENSION_TEXTURE3D)\n                              ? 2048 /*D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION*/\n                              : 8192 /*D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                    break;\n                }\n\n                hr = FillInitData( width, height, depth, mipCount, arraySize, format, maxsize, bitSize, bitData,\n                                   twidth, theight, tdepth, skipMip, initData.get() );\n                if ( SUCCEEDED(hr) )\n                {\n                    hr = CreateD3DResources( d3dDevice, resDim, twidth, theight, tdepth, mipCount - skipMip, arraySize,\n                                             format, usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                             isCubeMap, initData.get(), texture, textureView );\n                }\n            }\n        }\n    }\n\n    return hr;\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic DDS_ALPHA_MODE GetAlphaMode( _In_ const DDS_HEADER* header )\n{\n    if ( header->ddspf.flags & DDS_FOURCC )\n    {\n        if ( MAKEFOURCC( 'D', 'X', '1', '0' ) == header->ddspf.fourCC )\n        {\n            auto d3d10ext = reinterpret_cast<const DDS_HEADER_DXT10*>( (const char*)header + sizeof(DDS_HEADER) );\n            auto mode = static_cast<DDS_ALPHA_MODE>( d3d10ext->miscFlags2 & DDS_MISC_FLAGS2_ALPHA_MODE_MASK );\n            switch( mode )\n            {\n            case DDS_ALPHA_MODE_STRAIGHT:\n            case DDS_ALPHA_MODE_PREMULTIPLIED:\n            case DDS_ALPHA_MODE_OPAQUE:\n            case DDS_ALPHA_MODE_CUSTOM:\n                return mode;\n            }\n        }\n        else if ( ( MAKEFOURCC( 'D', 'X', 'T', '2' ) == header->ddspf.fourCC )\n                  || ( MAKEFOURCC( 'D', 'X', 'T', '4' ) == header->ddspf.fourCC ) )\n        {\n            return DDS_ALPHA_MODE_PREMULTIPLIED;\n        }\n    }\n\n    return DDS_ALPHA_MODE_UNKNOWN;\n}\n\n\n//--------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromMemory( ID3D11Device* d3dDevice,\n                                             const uint8_t* ddsData,\n                                             size_t ddsDataSize,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             size_t maxsize,\n                                             DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromMemoryEx( d3dDevice, nullptr, ddsData, ddsDataSize, maxsize,\n                                         D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                         texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromMemory( ID3D11Device* d3dDevice,\n                                             ID3D11DeviceContext* d3dContext,\n                                             const uint8_t* ddsData,\n                                             size_t ddsDataSize,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             size_t maxsize,\n                                             DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromMemoryEx( d3dDevice, d3dContext, ddsData, ddsDataSize, maxsize,\n                                         D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                         texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromMemoryEx( ID3D11Device* d3dDevice,\n                                               const uint8_t* ddsData,\n                                               size_t ddsDataSize,\n                                               size_t maxsize,\n                                               D3D11_USAGE usage,\n                                               unsigned int bindFlags,\n                                               unsigned int cpuAccessFlags,\n                                               unsigned int miscFlags,\n                                               bool forceSRGB,\n                                               ID3D11Resource** texture,\n                                               ID3D11ShaderResourceView** textureView,\n                                               DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromMemoryEx( d3dDevice, nullptr, ddsData, ddsDataSize, maxsize,\n                                         usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                         texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromMemoryEx( ID3D11Device* d3dDevice,\n                                               ID3D11DeviceContext* d3dContext,\n                                               const uint8_t* ddsData,\n                                               size_t ddsDataSize,\n                                               size_t maxsize,\n                                               D3D11_USAGE usage,\n                                               unsigned int bindFlags,\n                                               unsigned int cpuAccessFlags,\n                                               unsigned int miscFlags,\n                                               bool forceSRGB,\n                                               ID3D11Resource** texture,\n                                               ID3D11ShaderResourceView** textureView,\n                                               DDS_ALPHA_MODE* alphaMode )\n{\n    if ( texture )\n    {\n        *texture = nullptr;\n    }\n    if ( textureView )\n    {\n        *textureView = nullptr;\n    }\n    if ( alphaMode )\n    {\n        *alphaMode = DDS_ALPHA_MODE_UNKNOWN;\n    }\n\n    if (!d3dDevice || !ddsData || (!texture && !textureView))\n    {\n        return E_INVALIDARG;\n    }\n\n    // Validate DDS file in memory\n    if (ddsDataSize < (sizeof(uint32_t) + sizeof(DDS_HEADER)))\n    {\n        return E_FAIL;\n    }\n\n    uint32_t dwMagicNumber = *( const uint32_t* )( ddsData );\n    if (dwMagicNumber != DDS_MAGIC)\n    {\n        return E_FAIL;\n    }\n\n    auto header = reinterpret_cast<const DDS_HEADER*>( ddsData + sizeof( uint32_t ) );\n\n    // Verify header to validate DDS file\n    if (header->size != sizeof(DDS_HEADER) ||\n        header->ddspf.size != sizeof(DDS_PIXELFORMAT))\n    {\n        return E_FAIL;\n    }\n\n    // Check for DX10 extension\n    bool bDXT10Header = false;\n    if ((header->ddspf.flags & DDS_FOURCC) &&\n        (MAKEFOURCC( 'D', 'X', '1', '0' ) == header->ddspf.fourCC) )\n    {\n        // Must be long enough for both headers and magic value\n        if (ddsDataSize < (sizeof(DDS_HEADER) + sizeof(uint32_t) + sizeof(DDS_HEADER_DXT10)))\n        {\n            return E_FAIL;\n        }\n\n        bDXT10Header = true;\n    }\n\n    ptrdiff_t offset = sizeof( uint32_t )\n                       + sizeof( DDS_HEADER )\n                       + (bDXT10Header ? sizeof( DDS_HEADER_DXT10 ) : 0);\n\n    HRESULT hr = CreateTextureFromDDS( d3dDevice, d3dContext, header,\n                                       ddsData + offset, ddsDataSize - offset, maxsize,\n                                       usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                       texture, textureView );\n    if ( SUCCEEDED(hr) )\n    {\n        if (texture != 0 && *texture != 0)\n        {\n            SetDebugObjectName(*texture, \"DDSTextureLoader\");\n        }\n\n        if (textureView != 0 && *textureView != 0)\n        {\n            SetDebugObjectName(*textureView, \"DDSTextureLoader\");\n        }\n\n        if ( alphaMode )\n            *alphaMode = GetAlphaMode( header );\n    }\n\n    return hr;\n}\n\n//--------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromFile( ID3D11Device* d3dDevice,\n                                           const wchar_t* fileName,\n                                           ID3D11Resource** texture,\n                                           ID3D11ShaderResourceView** textureView,\n                                           size_t maxsize,\n                                           DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromFileEx( d3dDevice, nullptr, fileName, maxsize,\n                                       D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                       texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromFile( ID3D11Device* d3dDevice,\n                                           ID3D11DeviceContext* d3dContext,\n                                           const wchar_t* fileName,\n                                           ID3D11Resource** texture,\n                                           ID3D11ShaderResourceView** textureView,\n                                           size_t maxsize,\n                                           DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromFileEx( d3dDevice, d3dContext, fileName, maxsize,\n                                       D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                       texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromFileEx( ID3D11Device* d3dDevice,\n                                             const wchar_t* fileName,\n                                             size_t maxsize,\n                                             D3D11_USAGE usage,\n                                             unsigned int bindFlags,\n                                             unsigned int cpuAccessFlags,\n                                             unsigned int miscFlags,\n                                             bool forceSRGB,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             DDS_ALPHA_MODE* alphaMode )\n{\n    return CreateDDSTextureFromFileEx( d3dDevice, nullptr, fileName, maxsize,\n                                       usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                       texture, textureView, alphaMode );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateDDSTextureFromFileEx( ID3D11Device* d3dDevice,\n                                             ID3D11DeviceContext* d3dContext,\n                                             const wchar_t* fileName,\n                                             size_t maxsize,\n                                             D3D11_USAGE usage,\n                                             unsigned int bindFlags,\n                                             unsigned int cpuAccessFlags,\n                                             unsigned int miscFlags,\n                                             bool forceSRGB,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             DDS_ALPHA_MODE* alphaMode )\n{\n    if ( texture )\n    {\n        *texture = nullptr;\n    }\n    if ( textureView )\n    {\n        *textureView = nullptr;\n    }\n    if ( alphaMode )\n    {\n        *alphaMode = DDS_ALPHA_MODE_UNKNOWN;\n    }\n\n    if (!d3dDevice || !fileName || (!texture && !textureView))\n    {\n        return E_INVALIDARG;\n    }\n\n    DDS_HEADER* header = nullptr;\n    uint8_t* bitData = nullptr;\n    size_t bitSize = 0;\n\n    std::unique_ptr<uint8_t[]> ddsData;\n    HRESULT hr = LoadTextureDataFromFile( fileName,\n                                          ddsData,\n                                          &header,\n                                          &bitData,\n                                          &bitSize\n                                        );\n    if (FAILED(hr))\n    {\n        return hr;\n    }\n\n    hr = CreateTextureFromDDS( d3dDevice, d3dContext, header,\n                               bitData, bitSize, maxsize,\n                               usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                               texture, textureView );\n\n    if ( SUCCEEDED(hr) )\n    {\n#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )\n        if (texture != 0 || textureView != 0)\n        {\n            CHAR strFileA[MAX_PATH];\n            int result = WideCharToMultiByte( CP_ACP,\n                                              WC_NO_BEST_FIT_CHARS,\n                                              fileName,\n                                              -1,\n                                              strFileA,\n                                              MAX_PATH,\n                                              nullptr,\n                                              FALSE\n                               );\n            if ( result > 0 )\n            {\n                const CHAR* pstrName = strrchr( strFileA, '\\\\' );\n                if (!pstrName)\n                {\n                    pstrName = strFileA;\n                }\n                else\n                {\n                    pstrName++;\n                }\n\n                if (texture != 0 && *texture != 0)\n                {\n                    (*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,\n                                                static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),\n                                                pstrName\n                                              );\n                }\n\n                if (textureView != 0 && *textureView != 0 )\n                {\n                    (*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,\n                                                    static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),\n                                                    pstrName\n                                                  );\n                }\n            }\n        }\n#endif\n\n        if ( alphaMode )\n            *alphaMode = GetAlphaMode( header );\n    }\n\n    return hr;\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSTextureLoader/DDSTextureLoader.h",
    "content": "//--------------------------------------------------------------------------------------\n// File: DDSTextureLoader.h\n//\n// Functions for loading a DDS texture and creating a Direct3D 11 runtime resource for it\n//\n// Note these functions are useful as a light-weight runtime loader for DDS files. For\n// a full-featured DDS file reader, writer, and texture processing pipeline see\n// the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n#ifdef _MSC_VER\n#pragma once\n#endif\n\n#include <d3d11_1.h>\n\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <stdint.h>\n#pragma warning(pop)\n\n#if defined(_MSC_VER) && (_MSC_VER<1610) && !defined(_In_reads_)\n#define _In_reads_(exp)\n#define _Out_writes_(exp)\n#define _In_reads_bytes_(exp)\n#define _In_reads_opt_(exp)\n#define _Outptr_opt_\n#endif\n\n#ifndef _Use_decl_annotations_\n#define _Use_decl_annotations_\n#endif\n\nnamespace DirectX\n{\n    enum DDS_ALPHA_MODE\n    {\n        DDS_ALPHA_MODE_UNKNOWN       = 0,\n        DDS_ALPHA_MODE_STRAIGHT      = 1,\n        DDS_ALPHA_MODE_PREMULTIPLIED = 2,\n        DDS_ALPHA_MODE_OPAQUE        = 3,\n        DDS_ALPHA_MODE_CUSTOM        = 4,\n    };\n\n    // Standard version\n    HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,\n                                        _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,\n                                        _In_ size_t ddsDataSize,\n                                        _Outptr_opt_ ID3D11Resource** texture,\n                                        _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                        _In_ size_t maxsize = 0,\n                                        _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                      );\n\n    HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,\n                                      _In_z_ const wchar_t* szFileName,\n                                      _Outptr_opt_ ID3D11Resource** texture,\n                                      _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                      _In_ size_t maxsize = 0,\n                                      _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                    );\n\n    // Standard version with optional auto-gen mipmap support\n    HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,\n                                        _In_opt_ ID3D11DeviceContext* d3dContext,\n                                        _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,\n                                        _In_ size_t ddsDataSize,\n                                        _Outptr_opt_ ID3D11Resource** texture,\n                                        _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                        _In_ size_t maxsize = 0,\n                                        _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                      );\n\n    HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,\n                                      _In_opt_ ID3D11DeviceContext* d3dContext,\n                                      _In_z_ const wchar_t* szFileName,\n                                      _Outptr_opt_ ID3D11Resource** texture,\n                                      _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                      _In_ size_t maxsize = 0,\n                                      _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                    );\n\n    // Extended version\n    HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,\n                                          _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,\n                                          _In_ size_t ddsDataSize,\n                                          _In_ size_t maxsize,\n                                          _In_ D3D11_USAGE usage,\n                                          _In_ unsigned int bindFlags,\n                                          _In_ unsigned int cpuAccessFlags,\n                                          _In_ unsigned int miscFlags,\n                                          _In_ bool forceSRGB,\n                                          _Outptr_opt_ ID3D11Resource** texture,\n                                          _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                          _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                      );\n\n    HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,\n                                        _In_z_ const wchar_t* szFileName,\n                                        _In_ size_t maxsize,\n                                        _In_ D3D11_USAGE usage,\n                                        _In_ unsigned int bindFlags,\n                                        _In_ unsigned int cpuAccessFlags,\n                                        _In_ unsigned int miscFlags,\n                                        _In_ bool forceSRGB,\n                                        _Outptr_opt_ ID3D11Resource** texture,\n                                        _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                        _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                    );\n\n    // Extended version with optional auto-gen mipmap support\n    HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,\n                                          _In_opt_ ID3D11DeviceContext* d3dContext,\n                                          _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,\n                                          _In_ size_t ddsDataSize,\n                                          _In_ size_t maxsize,\n                                          _In_ D3D11_USAGE usage,\n                                          _In_ unsigned int bindFlags,\n                                          _In_ unsigned int cpuAccessFlags,\n                                          _In_ unsigned int miscFlags,\n                                          _In_ bool forceSRGB,\n                                          _Outptr_opt_ ID3D11Resource** texture,\n                                          _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                          _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                      );\n\n    HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,\n                                        _In_opt_ ID3D11DeviceContext* d3dContext,\n                                        _In_z_ const wchar_t* szFileName,\n                                        _In_ size_t maxsize,\n                                        _In_ D3D11_USAGE usage,\n                                        _In_ unsigned int bindFlags,\n                                        _In_ unsigned int cpuAccessFlags,\n                                        _In_ unsigned int miscFlags,\n                                        _In_ bool forceSRGB,\n                                        _Outptr_opt_ ID3D11Resource** texture,\n                                        _Outptr_opt_ ID3D11ShaderResourceView** textureView,\n                                        _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr\n                                    );\n}"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define IDC_STATIC -1\n#define IDI_MAIN_ICON 100\n#include <WinResRc.h>\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_MAIN_ICON           ICON                    \"directx.ico\"\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define IDC_STATIC -1\\r\\n\"\n    \"#include <winresrc.h>\\r\\n\"\n    \"\\r\\n\"\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2012.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DDSView\", \"DDSView_Desktop_2012.vcxproj\", \"{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.Build.0 = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.Build.0 = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.Build.0 = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.ActiveCfg = Release|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2012.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DDSView</ProjectName>\n    <ProjectGuid>{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}</ProjectGuid>\n    <RootNamespace>DDSView</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2012.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2013.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DDSView\", \"DDSView_Desktop_2013.vcxproj\", \"{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.Build.0 = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.Build.0 = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.Build.0 = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.ActiveCfg = Release|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2013.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DDSView</ProjectName>\n    <ProjectGuid>{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}</ProjectGuid>\n    <RootNamespace>DDSView</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2013.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2015.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2015\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DDSView\", \"DDSView_Desktop_2015.vcxproj\", \"{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.Build.0 = Debug|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.Build.0 = Profile|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|Win32.Build.0 = Release|Win32\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.ActiveCfg = Release|x64\n\t\t{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2015.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DDSView</ProjectName>\n    <ProjectGuid>{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}</ProjectGuid>\n    <RootNamespace>DDSView</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>d3d11.lib;ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/DDSView_Desktop_2015.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"DDSView.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"DDSView.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"ddsview.fx\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/ddsview.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: DDSView.cpp\n//\n// DirectX 11 DDS File Viewer\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n#include <assert.h>\n#include <windows.h>\n#include <stdio.h>\n#include <dxgiformat.h>\n#include <d3d11.h>\n\n#include <directxmath.h>\n\n#include \"DirectXTex.h\"\n\nusing namespace DirectX;\n\n//--------------------------------------------------------------------------------------\n#define IDI_MAIN_ICON 100\n\n//--------------------------------------------------------------------------------------\n#pragma pack(push,1)\nstruct SimpleVertex\n{\n    XMFLOAT4 Pos;\n    XMFLOAT4 Tex;\n};\n\nstruct CBArrayControl\n{\n    float Index;\n    float pad[3];\n};\n#pragma pack(pop)\n\n//--------------------------------------------------------------------------------------\n\n// fxc ddsview.fx /nologo /EVS /Tvs_4_1 /Fhshaders\\vs.h\n#include \"shaders\\vs.h\"\n\n// fxc ddsview.fx /nologo /EPS_1D /Tps_4_1 /Fhshaders\\ps1D.h\n#include \"shaders\\ps1D.h\"\n\n// fxc ddsview.fx /nologo /EPS_1DArray /Tps_4_1 /Fhshaders\\ps1Darray.h\n#include \"shaders\\\\ps1Darray.h\"\n\n// fxc ddsview.fx /nologo /EPS_2D /Tps_4_1 /Fhshaders\\ps2D.h\n#include \"shaders\\\\ps2D.h\"\n\n// fxc ddsview.fx /nologo /EPS_2DArray /Tps_4_1 /Fhshaders\\ps2Darray.h\n#include \"shaders\\ps2Darray.h\"\n\n// fxc ddsview.fx /nologo /EPS_3D /Tps_4_1 /Fhshaders\\ps3D.h\n#include \"shaders\\ps3D.h\"\n\n// fxc ddsview.fx /nologo /EPS_Cube /Tps_4_1 /Fhshaders\\psCube.h\n#include \"shaders\\psCube.h\"\n\n//--------------------------------------------------------------------------------------\nHINSTANCE                   g_hInst = NULL;\nHWND                        g_hWnd = NULL;\nD3D_DRIVER_TYPE             g_driverType = D3D_DRIVER_TYPE_NULL;\nD3D_FEATURE_LEVEL           g_featureLevel = D3D_FEATURE_LEVEL_11_0;\nID3D11Device*               g_pd3dDevice = NULL;\nID3D11DeviceContext*        g_pImmediateContext = NULL;\nIDXGISwapChain*             g_pSwapChain = NULL;\nID3D11RenderTargetView*     g_pRenderTargetView = NULL;\nID3D11Texture2D*            g_pDepthStencil = NULL;\nID3D11DepthStencilView*     g_pDepthStencilView = NULL;\nID3D11VertexShader*         g_pVertexShader = NULL;\nID3D11PixelShader*          g_pPixelShader = NULL;\nID3D11InputLayout*          g_pVertexLayout = NULL;\nID3D11Buffer*               g_pVertexBuffer = NULL;\nID3D11Buffer*               g_pIndexBuffer = NULL;\nID3D11Buffer*               g_pCBArrayControl = NULL;\nID3D11ShaderResourceView*   g_pSRV = NULL;\nID3D11BlendState*           g_AlphaBlendState = NULL;\nID3D11SamplerState*         g_pSamplerLinear = NULL;\n\nUINT                        g_iCurrentIndex = 0;\nUINT                        g_iMaxIndex = 1;\n\nUINT                        g_iIndices = 0;\n\n\n//--------------------------------------------------------------------------------------\nHRESULT InitWindow( HINSTANCE hInstance, int nCmdShow, const TexMetadata& mdata );\nHRESULT InitDevice( const TexMetadata& mdata );\nvoid CleanupDevice();\nLRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );\nvoid Render();\n\n//--------------------------------------------------------------------------------------\n#pragma warning( suppress : 6262 )\nint WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow )\n{\n    UNREFERENCED_PARAMETER( hPrevInstance );\n    UNREFERENCED_PARAMETER( lpCmdLine );\n\n    if ( !*lpCmdLine )\n    {\n        MessageBox( NULL, L\"Usage: ddsview <filename>\", L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n        return 0;\n    }\n\n    TexMetadata mdata;\n    HRESULT hr = GetMetadataFromDDSFile( lpCmdLine, DDS_FLAGS_NONE, mdata );\n    if ( FAILED(hr) )\n    {\n        WCHAR buff[2048];\n        swprintf_s( buff, L\"Failed to open texture file\\n\\nFilename = %ls\\nHRESULT %08X\", lpCmdLine, hr );\n        MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n        return 0;\n    }\n\n    if( FAILED( InitWindow( hInstance, nCmdShow, mdata ) ) )\n        return 0;\n\n    SetWindowTextW( g_hWnd, lpCmdLine );\n\n    if( FAILED( InitDevice( mdata ) ) )\n    {\n        CleanupDevice();\n        return 0;\n    }\n\n    if (mdata.dimension == TEX_DIMENSION_TEXTURE3D)\n    {\n        if ( mdata.arraySize > 1 )\n        {\n            WCHAR buff[2048];\n            swprintf_s( buff, L\"Arrays of volume textures are not supported\\n\\nFilename = %ls\\nArray size %Iu\", lpCmdLine, mdata.arraySize );\n            MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n            return 0;\n        }\n\n        g_iMaxIndex = static_cast<UINT>( mdata.depth );\n    }\n    else\n    {\n        g_iMaxIndex = static_cast<UINT>( mdata.arraySize );\n    }\n\n    switch( mdata.format )\n    {\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        if ( g_featureLevel < D3D_FEATURE_LEVEL_11_0 )\n        {\n            WCHAR buff[2048];\n            swprintf_s( buff, L\"BC6H/BC7 requires DirectX 11 hardware\\n\\nFilename = %ls\\nDXGI Format %d\\nFeature Level %d\", lpCmdLine, mdata.format, g_featureLevel );\n            MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n            return 0;\n        }\n        break;\n\n    default:\n        {\n            UINT flags = 0;\n            hr = g_pd3dDevice->CheckFormatSupport ( mdata.format, &flags );\n            if ( FAILED(hr) || !(flags & (D3D11_FORMAT_SUPPORT_TEXTURE1D|D3D11_FORMAT_SUPPORT_TEXTURE2D|D3D11_FORMAT_SUPPORT_TEXTURE3D)) )\n            {\n                WCHAR buff[2048];\n                swprintf_s( buff, L\"Format not supported by DirectX hardware\\n\\nFilename = %ls\\nDXGI Format %d\\nFeature Level %d\\nHRESULT = %08X\", lpCmdLine, mdata.format, g_featureLevel, hr );\n                MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n                return 0;\n            }\n        }\n        break;\n    }\n\n    ScratchImage image;\n    hr = LoadFromDDSFile( lpCmdLine, DDS_FLAGS_NONE, &mdata, image );\n    if ( FAILED(hr) )\n    {\n        WCHAR buff[2048];\n        swprintf_s( buff, L\"Failed to load texture file\\n\\nFilename = %ls\\nHRESULT %08X\", lpCmdLine, hr );\n        MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n        return 0;\n    }\n\n    // Special case to make sure Texture cubes remain arrays\n    mdata.miscFlags &= ~TEX_MISC_TEXTURECUBE;\n\n    hr = CreateShaderResourceView( g_pd3dDevice, image.GetImages(), image.GetImageCount(), mdata, &g_pSRV );\n    if ( FAILED(hr) )\n    {\n        WCHAR buff[2048];\n        swprintf_s( buff, L\"Failed creating texture from file\\n\\nFilename = %ls\\nHRESULT = %08X\", lpCmdLine, hr );\n        MessageBox( NULL, buff, L\"DDSView\", MB_OK | MB_ICONEXCLAMATION );\n        return 0;\n    }\n\n    // Main message loop\n    MSG msg = {0};\n    while( WM_QUIT != msg.message )\n    {\n        if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )\n        {\n            TranslateMessage( &msg );\n            DispatchMessage( &msg );\n        }\n        else\n        {\n            Render();\n        }\n    }\n\n    CleanupDevice();\n\n    return ( int )msg.wParam;\n}\n\n//--------------------------------------------------------------------------------------\nHRESULT InitWindow( HINSTANCE hInstance, int nCmdShow, const TexMetadata& mdata )\n{\n    // Register class\n    WNDCLASSEX wcex;\n    wcex.cbSize = sizeof( WNDCLASSEX );\n    wcex.style = CS_HREDRAW | CS_VREDRAW;\n    wcex.lpfnWndProc = WndProc;\n    wcex.cbClsExtra = 0;\n    wcex.cbWndExtra = 0;\n    wcex.hInstance = hInstance;\n    wcex.hIcon = LoadIcon( hInstance, ( LPCTSTR )IDI_MAIN_ICON );\n    wcex.hCursor = LoadCursor( NULL, IDC_ARROW );\n    wcex.hbrBackground = ( HBRUSH )( COLOR_WINDOW + 1 );\n    wcex.lpszMenuName = NULL;\n    wcex.lpszClassName = L\"DDSViewWindowClass\";\n    wcex.hIconSm = LoadIcon( wcex.hInstance, ( LPCTSTR )IDI_MAIN_ICON );\n    if( !RegisterClassEx( &wcex ) )\n        return E_FAIL;\n\n    // Create window\n    g_hInst = hInstance;\n    RECT rc = { 0, 0, 640, 480 };\n\n    int cxborder = GetSystemMetrics( SM_CXBORDER );\n    int cxedge = GetSystemMetrics( SM_CXEDGE );\n    int screenX = GetSystemMetrics( SM_CXSCREEN ) - max( cxborder, cxedge );\n    if( rc.right < (LONG)mdata.width )\n        rc.right = (LONG)mdata.height;\n    if ( rc.right > screenX )\n        rc.right = screenX;\n\n    int cyborder = GetSystemMetrics( SM_CYBORDER );\n    int cyedge = GetSystemMetrics( SM_CYEDGE );\n    int screenY = GetSystemMetrics( SM_CYSCREEN ) - max( cyborder, cyedge );\n    if ( rc.bottom < (LONG)mdata.height )\n        rc.bottom = (LONG)mdata.height;\n    if ( rc.bottom > screenY )\n        rc.bottom = screenY;\n\n    AdjustWindowRect( &rc, WS_OVERLAPPEDWINDOW, FALSE );\n    g_hWnd = CreateWindow( L\"DDSViewWindowClass\", L\"DDS View\", WS_OVERLAPPEDWINDOW,\n                           CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance,\n                           NULL );\n    if( !g_hWnd )\n        return E_FAIL;\n\n    ShowWindow( g_hWnd, nCmdShow );\n\n    return S_OK;\n}\n\n\n//--------------------------------------------------------------------------------------\nLRESULT CALLBACK WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )\n{\n    PAINTSTRUCT ps;\n    HDC hdc;\n\n    switch( message )\n    {\n        case WM_PAINT:\n            hdc = BeginPaint( hWnd, &ps );\n            EndPaint( hWnd, &ps );\n            break;\n\n        case WM_DESTROY:\n            PostQuitMessage( 0 );\n            break;\n\n        case WM_KEYDOWN:\n            if ( wParam == VK_RIGHT )\n            {\n                if ( g_iCurrentIndex < g_iMaxIndex-1 )\n                    ++g_iCurrentIndex;\n            }\n            else if ( wParam == VK_LEFT )\n            {\n                if ( g_iCurrentIndex > 0 )\n                {\n                    --g_iCurrentIndex;\n                }\n            }\n            else if ( wParam >= '0' && wParam <= '9' )\n            {\n                UINT index = (wParam == '0') ? 10 : ((UINT) (wParam - '1'));\n                if ( index < g_iMaxIndex )\n                    g_iCurrentIndex = index;\n            }\n            InvalidateRect( hWnd, NULL, FALSE );\n            break;\n\n        default:\n            return DefWindowProc( hWnd, message, wParam, lParam );\n    }\n\n    return 0;\n}\n\n\n//--------------------------------------------------------------------------------------\nHRESULT InitDevice( const TexMetadata& mdata )\n{\n    HRESULT hr = S_OK;\n\n    RECT rc;\n    GetClientRect( g_hWnd, &rc );\n    UINT width = rc.right - rc.left;\n    UINT height = rc.bottom - rc.top;\n\n    UINT createDeviceFlags = 0;\n#if defined( DEBUG ) || defined( _DEBUG )\n    createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;\n#endif\n\n    D3D_DRIVER_TYPE driverTypes[] =\n    {\n        D3D_DRIVER_TYPE_HARDWARE,\n        D3D_DRIVER_TYPE_WARP,\n        D3D_DRIVER_TYPE_REFERENCE,\n    };\n    UINT numDriverTypes = ARRAYSIZE( driverTypes );\n\n    D3D_FEATURE_LEVEL featureLevels[] =\n    {\n        D3D_FEATURE_LEVEL_11_0,\n        D3D_FEATURE_LEVEL_10_1,\n        D3D_FEATURE_LEVEL_10_0,\n    };\n\tUINT numFeatureLevels = ARRAYSIZE( featureLevels );\n\n    DXGI_SWAP_CHAIN_DESC sd;\n    ZeroMemory( &sd, sizeof( sd ) );\n    sd.BufferCount = 1;\n    sd.BufferDesc.Width = width;\n    sd.BufferDesc.Height = height;\n    sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;\n    sd.BufferDesc.RefreshRate.Numerator = 60;\n    sd.BufferDesc.RefreshRate.Denominator = 1;\n    sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;\n    sd.OutputWindow = g_hWnd;\n    sd.SampleDesc.Count = 1;\n    sd.SampleDesc.Quality = 0;\n    sd.Windowed = TRUE;\n\n    for( UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ )\n    {\n        g_driverType = driverTypes[driverTypeIndex];\n        hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, featureLevels, numFeatureLevels,\n                                            D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext );\n        if( SUCCEEDED( hr ) )\n            break;\n    }\n    if( FAILED( hr ) )\n        return hr;\n\n    // Create a render target view\n    ID3D11Texture2D* pBackBuffer = NULL;\n    hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );\n    if( FAILED( hr ) )\n        return hr;\n\n    hr = g_pd3dDevice->CreateRenderTargetView( pBackBuffer, NULL, &g_pRenderTargetView );\n    pBackBuffer->Release();\n    if( FAILED( hr ) )\n        return hr;\n\n    // Create depth stencil texture\n    D3D11_TEXTURE2D_DESC descDepth;\n    ZeroMemory( &descDepth, sizeof(descDepth) );\n    descDepth.Width = width;\n    descDepth.Height = height;\n    descDepth.MipLevels = 1;\n    descDepth.ArraySize = 1;\n    descDepth.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;\n    descDepth.SampleDesc.Count = 1;\n    descDepth.SampleDesc.Quality = 0;\n    descDepth.Usage = D3D11_USAGE_DEFAULT;\n    descDepth.BindFlags = D3D11_BIND_DEPTH_STENCIL;\n    descDepth.CPUAccessFlags = 0;\n    descDepth.MiscFlags = 0;\n    hr = g_pd3dDevice->CreateTexture2D( &descDepth, NULL, &g_pDepthStencil );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Create the depth stencil view\n    D3D11_DEPTH_STENCIL_VIEW_DESC descDSV;\n    ZeroMemory( &descDSV, sizeof(descDSV) );\n    descDSV.Format = descDepth.Format;\n    descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;\n    descDSV.Texture2D.MipSlice = 0;\n    hr = g_pd3dDevice->CreateDepthStencilView( g_pDepthStencil, &descDSV, &g_pDepthStencilView );\n    if( FAILED( hr ) )\n        return hr;\n\n    g_pImmediateContext->OMSetRenderTargets( 1, &g_pRenderTargetView, g_pDepthStencilView );\n\n    // Setup the viewport\n    D3D11_VIEWPORT vp;\n    vp.Width = (FLOAT)width;\n    vp.Height = (FLOAT)height;\n    vp.MinDepth = 0.0f;\n    vp.MaxDepth = 1.0f;\n    vp.TopLeftX = 0;\n    vp.TopLeftY = 0;\n    g_pImmediateContext->RSSetViewports( 1, &vp );\n\n    // Create the vertex shader\n    hr = g_pd3dDevice->CreateVertexShader( g_VS, sizeof(g_VS), NULL, &g_pVertexShader );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Define the input layout\n    D3D11_INPUT_ELEMENT_DESC layout[] =\n    {\n        { \"POSITION\", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },\n        { \"TEXCOORD\", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, sizeof(XMFLOAT4), D3D11_INPUT_PER_VERTEX_DATA, 0 },\n    };\n    UINT numElements = ARRAYSIZE( layout );\n\n    // Create the input layout\n    hr = g_pd3dDevice->CreateInputLayout( layout, numElements, g_VS, sizeof(g_VS), &g_pVertexLayout );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Set the input layout\n    g_pImmediateContext->IASetInputLayout( g_pVertexLayout );\n\n    // Select the pixel shader\n    bool isCubeMap = false;\n    bool is1D = false;\n    const BYTE* pshader = NULL;\n    size_t pshader_size = 0;\n\n    switch ( mdata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        if ( mdata.arraySize > 1)\n        {\n            pshader = g_PS_1DArray;\n            pshader_size = sizeof(g_PS_1DArray);\n        }\n        else\n        {\n            pshader = g_PS_1D;\n            pshader_size = sizeof(g_PS_1D);\n        }\n        is1D = true;\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( mdata.miscFlags & TEX_MISC_TEXTURECUBE )\n        {\n            pshader = g_PS_Cube;\n            pshader_size = sizeof(g_PS_Cube);\n            isCubeMap = true;\n        }\n        else if ( mdata.arraySize > 1 )\n        {\n            pshader = g_PS_2DArray;\n            pshader_size = sizeof(g_PS_2DArray);\n        }\n        else\n        {\n            pshader = g_PS_2D;\n            pshader_size = sizeof(g_PS_2D);\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        pshader = g_PS_3D;\n        pshader_size = sizeof(g_PS_3D);\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    assert( pshader && pshader_size > 0 );\n\n    // Create the pixel shader\n    hr = g_pd3dDevice->CreatePixelShader( pshader, pshader_size, NULL, &g_pPixelShader );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Create vertex buffer\n    UINT nverts;\n    D3D11_SUBRESOURCE_DATA InitData;\n    ZeroMemory( &InitData, sizeof(InitData) );\n\n    static const SimpleVertex verticesCube[] =\n    {\n        // Render cubemaps as horizontal cross\n\n        // XPOS\n        { XMFLOAT4( .5f, .25f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, .25f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( .5f, -.25f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, -.25f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 0.f, 0.f ) },\n\n        // XNEG\n        { XMFLOAT4( -.5f, .25f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 1.f, 0.f ) },\n        { XMFLOAT4( 0.f, .25f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 1.f, 0.f ) },\n        { XMFLOAT4( -.5f, -.25f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 1.f, 0.f ) },\n        { XMFLOAT4( 0.f, -.25f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 1.f, 0.f ) },\n\n        // YPOS\n        { XMFLOAT4( -.5f, .75f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 2.f, 0.f ) },\n        { XMFLOAT4( 0.f, .75f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 2.f, 0.f ) },\n        { XMFLOAT4( -.5f, .25f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 2.f, 0.f ) },\n        { XMFLOAT4( 0.f, .25f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 2.f, 0.f ) },\n\n        // YNEG\n        { XMFLOAT4( -.5f, -.25f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 3.f, 0.f ) },\n        { XMFLOAT4( 0.f, -.25f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 3.f, 0.f ) },\n        { XMFLOAT4( -.5f, -.75f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 3.f, 0.f ) },\n        { XMFLOAT4( 0.f, -.75f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 3.f, 0.f ) },\n\n        // ZPOS\n        { XMFLOAT4( 0.f, .25f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 4.f, 0.f ) },\n        { XMFLOAT4( .5f, .25f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 4.f, 0.f ) },\n        { XMFLOAT4( 0.f, -.25f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 4.f, 0.f ) },\n        { XMFLOAT4( .5f, -.25f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 4.f, 0.f ) },\n\n        // ZNEG\n        { XMFLOAT4( -1.f, .25f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 5.f, 0.f ) },\n        { XMFLOAT4( -.5f, .25f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 5.f, 0.f ) },\n        { XMFLOAT4( -1.f, -.25f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 5.f, 0.f ) },\n        { XMFLOAT4( -.5f, -.25f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 5.f, 0.f ) },\n    };\n\n    static const SimpleVertex vertices[] =\n    {\n        { XMFLOAT4( -1.f, 1.f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, 1.f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( -1.f, -1.f, 0.f, 1.f ), XMFLOAT4( 0.f, 1.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, -1.f, 0.f, 1.f ), XMFLOAT4( 1.f, 1.f, 0.f, 0.f ) },\n    };\n\n    static const SimpleVertex vertices1D[] =\n    {\n        { XMFLOAT4( -1.f, .05f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, .05f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( -1.f, -.05f, 0.f, 1.f ), XMFLOAT4( 0.f, 0.f, 0.f, 0.f ) },\n        { XMFLOAT4( 1.f, -.05f, 0.f, 1.f ), XMFLOAT4( 1.f, 0.f, 0.f, 0.f ) },\n    };\n\n    if ( isCubeMap )\n    {\n        nverts = _countof(verticesCube);\n        InitData.pSysMem = verticesCube;\n    }\n    else if ( is1D )\n    {\n        nverts = _countof(vertices1D);\n        InitData.pSysMem = vertices1D;\n    }\n    else\n    {\n        nverts = _countof(vertices);\n        InitData.pSysMem = vertices;\n    }\n\n    D3D11_BUFFER_DESC bd;\n    ZeroMemory( &bd, sizeof(bd) );\n    bd.Usage = D3D11_USAGE_DEFAULT;\n    bd.ByteWidth = sizeof( SimpleVertex ) * nverts;\n    bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;\n    bd.CPUAccessFlags = 0;\n    hr = g_pd3dDevice->CreateBuffer( &bd, &InitData, &g_pVertexBuffer );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Set vertex buffer\n    UINT stride = sizeof( SimpleVertex );\n    UINT offset = 0;\n    g_pImmediateContext->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );\n\n    // Create index buffer\n    static const WORD indicesCube[] =\n    {\n            0, 1, 2,\n            2, 1, 3,\n            4, 5, 6,\n            6, 5, 7,\n            8, 9, 10,\n            10, 9, 11,\n            12, 13, 14,\n            14, 13, 15,\n            16, 17, 18,\n            18, 17, 19,\n            20, 21, 22,\n            22, 21, 23\n    };\n\n    static const WORD indices[] =\n    {\n            0, 1, 2,\n            2, 1, 3\n    };\n\n    if ( isCubeMap )\n    {\n        g_iIndices = _countof(indicesCube);\n        InitData.pSysMem = indicesCube;\n    }\n    else\n    {\n        g_iIndices = _countof(indices);\n        InitData.pSysMem = indices;\n    }\n\n    bd.Usage = D3D11_USAGE_DEFAULT;\n    bd.ByteWidth = g_iIndices * sizeof(WORD);\n    bd.BindFlags = D3D11_BIND_INDEX_BUFFER;\n    bd.CPUAccessFlags = 0;\n    hr = g_pd3dDevice->CreateBuffer( &bd, &InitData, &g_pIndexBuffer );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Set index buffer\n    g_pImmediateContext->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R16_UINT, 0 );\n\n    // Set primitive topology\n    g_pImmediateContext->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );\n\n    // Create the constant buffers\n    bd.Usage = D3D11_USAGE_DEFAULT;\n    bd.ByteWidth = sizeof(CBArrayControl);\n    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;\n    bd.CPUAccessFlags = 0;\n    hr = g_pd3dDevice->CreateBuffer( &bd, NULL, &g_pCBArrayControl );\n    if( FAILED( hr ) )\n        return hr;\n\n    // Create the state objects\n    D3D11_SAMPLER_DESC sampDesc;\n    ZeroMemory( &sampDesc, sizeof(sampDesc) );\n    sampDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;\n    sampDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;\n    sampDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;\n    sampDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;\n    sampDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;\n    sampDesc.MinLOD = 0;\n    sampDesc.MaxLOD = D3D11_FLOAT32_MAX;\n    hr = g_pd3dDevice->CreateSamplerState( &sampDesc, &g_pSamplerLinear );\n    if( FAILED( hr ) )\n        return hr;\n\n    D3D11_BLEND_DESC dsc = \n    {\n        false,\n        false,\n        {\n        true,\n        D3D11_BLEND_SRC_ALPHA,\n        D3D11_BLEND_INV_SRC_ALPHA,\n        D3D11_BLEND_OP_ADD,\n        D3D11_BLEND_ZERO,\n        D3D11_BLEND_ZERO,\n        D3D11_BLEND_OP_ADD,\n        D3D11_COLOR_WRITE_ENABLE_ALL\n        } \n    };\n    hr = g_pd3dDevice->CreateBlendState(&dsc, &g_AlphaBlendState );\n    if( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//--------------------------------------------------------------------------------------\nvoid Render()\n{\n    float ClearColor[4] = { 0.f, 1.f, 1.f, 1.0f }; //red,green,blue,alpha\n    g_pImmediateContext->ClearRenderTargetView( g_pRenderTargetView, ClearColor );\n    g_pImmediateContext->ClearDepthStencilView( g_pDepthStencilView, D3D11_CLEAR_DEPTH, 1.0f, 0 );\n\n    float bf [4] = {1.0f, 1.0f, 1.0f, 1.0f};\n    g_pImmediateContext->OMSetBlendState( g_AlphaBlendState, bf, 0xffffffff );\n\n    CBArrayControl cb;\n    cb.Index = (float)g_iCurrentIndex;\n    g_pImmediateContext->UpdateSubresource( g_pCBArrayControl, 0, NULL, &cb, 0, 0 );\n\n    g_pImmediateContext->VSSetShader( g_pVertexShader, NULL, 0 );\n    g_pImmediateContext->PSSetShader( g_pPixelShader, NULL, 0 );\n    g_pImmediateContext->PSSetConstantBuffers( 0, 1, &g_pCBArrayControl );\n    g_pImmediateContext->PSSetShaderResources( 0, 1, &g_pSRV );\n    g_pImmediateContext->PSSetSamplers( 0, 1, &g_pSamplerLinear );\n    g_pImmediateContext->DrawIndexed( g_iIndices, 0, 0 );\n\n    g_pSwapChain->Present( 0, 0 );\n}\n\n\n//--------------------------------------------------------------------------------------\nvoid CleanupDevice()\n{\n    if( g_pImmediateContext ) g_pImmediateContext->ClearState();\n\n    if( g_pSamplerLinear ) g_pSamplerLinear->Release();\n    if( g_AlphaBlendState ) g_AlphaBlendState->Release();\n    if( g_pSRV ) g_pSRV->Release();\n    if( g_pVertexBuffer ) g_pVertexBuffer->Release();\n    if( g_pIndexBuffer ) g_pIndexBuffer->Release();\n    if( g_pCBArrayControl ) g_pCBArrayControl->Release();\n    if( g_pVertexLayout ) g_pVertexLayout->Release();\n    if( g_pVertexShader ) g_pVertexShader->Release();\n    if( g_pPixelShader ) g_pPixelShader->Release();\n    if( g_pDepthStencil ) g_pDepthStencil->Release();\n    if( g_pDepthStencilView ) g_pDepthStencilView->Release();\n    if( g_pRenderTargetView ) g_pRenderTargetView->Release();\n    if( g_pSwapChain ) g_pSwapChain->Release();\n    if( g_pImmediateContext ) g_pImmediateContext->Release();\n    if( g_pd3dDevice ) g_pd3dDevice->Release();\n}\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/ddsview.fx",
    "content": "//--------------------------------------------------------------------------------------\n// File: ddsview.fx\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n//--------------------------------------------------------------------------------------\n// Constant Buffer Variables\n//--------------------------------------------------------------------------------------\nTexture1D tx1D : register( t0 );\nTexture1DArray tx1DArray : register( t0 );\n\nTexture2D tx2D : register( t0 );\nTexture2DArray tx2DArray : register( t0 );\n\nTexture3D tx3D : register( t0 );\n\nSamplerState samLinear : register( s0 );\n\ncbuffer cbArrayControl  : register( b0 )\n{\n    float Index;\n};\n\n//--------------------------------------------------------------------------------------\nstruct VS_INPUT\n{\n    float4 Pos : POSITION;\n    float4 Tex : TEXCOORD0;\n};\n\nstruct PS_INPUT\n{\n    float4 Pos : SV_POSITION;\n    float4 Tex : TEXCOORD0;\n};\n\n\n//--------------------------------------------------------------------------------------\n// Vertex Shader\n//--------------------------------------------------------------------------------------\nPS_INPUT VS( VS_INPUT input )\n{\n    PS_INPUT output = (PS_INPUT)0;\n    output.Pos = input.Pos;\n    output.Tex = input.Tex;\n    return output;\n}\n\n\n//--------------------------------------------------------------------------------------\n// Pixel Shader\n//--------------------------------------------------------------------------------------\nfloat4 PS_1D( PS_INPUT input) : SV_Target\n{\n    return tx1D.Sample( samLinear, input.Tex.x );\n}\n\nfloat4 PS_1DArray( PS_INPUT input) : SV_Target\n{\n    return tx1DArray.Sample( samLinear, float2(input.Tex.x, Index) );\n}\n\nfloat4 PS_2D( PS_INPUT input) : SV_Target\n{\n    return tx2D.Sample( samLinear, input.Tex.xy );\n}\n\nfloat4 PS_2DArray( PS_INPUT input) : SV_Target\n{\n    return tx2DArray.Sample( samLinear, float3(input.Tex.xy, Index) );\n}\n\nfloat4 PS_3D( PS_INPUT input) : SV_Target\n{\n    int Width, Height, Depth;\n    tx3D.GetDimensions( Width, Height, Depth);\n\n    return tx3D.Sample( samLinear, float3(input.Tex.xy, Index / Depth) );\n}\n\nfloat4 PS_Cube( PS_INPUT input) : SV_Target\n{\n    return tx2DArray.Sample( samLinear, float3(input.Tex.xy, input.Tex.z + (6*Index)) );\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/hlsl.cmd",
    "content": "fxc ddsview.fx /nologo /EVS /Tvs_4_1 /Fhshaders\\vs.h\nfxc ddsview.fx /nologo /EPS_1D /Tps_4_1 /Fhshaders\\ps1D.h\nfxc ddsview.fx /nologo /EPS_1DArray /Tps_4_1 /Fhshaders\\ps1Darray.h\nfxc ddsview.fx /nologo /EPS_2D /Tps_4_1 /Fhshaders\\ps2D.h\nfxc ddsview.fx /nologo /EPS_2DArray /Tps_4_1 /Fhshaders\\ps2Darray.h\nfxc ddsview.fx /nologo /EPS_3D /Tps_4_1 /Fhshaders\\ps3D.h\nfxc ddsview.fx /nologo /EPS_Cube /Tps_4_1 /Fhshaders\\psCube.h\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/ps1D.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_1D /Tps_4_1 /Fhshaders\\ps1D.h\n//\n//\n// Buffer Definitions: \n//\n// cbuffer cbArrayControl\n// {\n//\n//   float Index;                       // Offset:    0 Size:     4 [unused]\n//\n// }\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx1D                              texture  float4          1d    0        1\n// cbArrayControl                    cbuffer      NA          NA    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   x   \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_constantbuffer cb0[1], immediateIndexed\ndcl_sampler s0, mode_default\ndcl_resource_texture1d (float,float,float,float) t0\ndcl_input_ps linear v1.x\ndcl_output o0.xyzw\nsample o0.xyzw, v1.xxxx, t0.xyzw, s0\nret \n// Approximately 2 instruction slots used\n#endif\n\nconst BYTE g_PS_1D[] =\n{\n     68,  88,  66,  67,  71,  33, \n    105, 235, 206, 215,  61, 110, \n    190,  73,  39, 172,  36, 251, \n     31, 148,   1,   0,   0,   0, \n    220,   2,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n     84,   1,   0,   0, 172,   1, \n      0,   0, 224,   1,   0,   0, \n     96,   2,   0,   0,  82,  68, \n     69,  70,  24,   1,   0,   0, \n      1,   0,   0,   0, 156,   0, \n      0,   0,   3,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    228,   0,   0,   0, 124,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    134,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      2,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 139,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0, 115,  97, \n    109,  76, 105, 110, 101,  97, \n    114,   0, 116, 120,  49,  68, \n      0,  99,  98,  65, 114, 114, \n     97, 121,  67, 111, 110, 116, \n    114, 111, 108,   0, 171, 171, \n    139,   0,   0,   0,   1,   0, \n      0,   0, 180,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    204,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0, 212,   0, \n      0,   0,   0,   0,   0,   0, \n     73, 110, 100, 101, 120,   0, \n    171, 171,   0,   0,   3,   0, \n      1,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     77, 105,  99, 114, 111, 115, \n    111, 102, 116,  32,  40,  82, \n     41,  32,  72,  76,  83,  76, \n     32,  83, 104,  97, 100, 101, \n    114,  32,  67, 111, 109, 112, \n    105, 108, 101, 114,  32,  57, \n     46,  50,  57,  46,  57,  53, \n     50,  46,  51,  49,  49,  49, \n      0, 171, 171, 171,  73,  83, \n     71,  78,  80,   0,   0,   0, \n      2,   0,   0,   0,   8,   0, \n      0,   0,  56,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  68,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   0,  15,   1, \n      0,   0,  83,  86,  95,  80, \n     79,  83,  73,  84,  73,  79, \n     78,   0,  84,  69,  88,  67, \n     79,  79,  82,  68,   0, 171, \n    171, 171,  79,  83,  71,  78, \n     44,   0,   0,   0,   1,   0, \n      0,   0,   8,   0,   0,   0, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     83,  86,  95,  84,  97, 114, \n    103, 101, 116,   0, 171, 171, \n     83,  72,  68,  82, 120,   0, \n      0,   0,  65,   0,   0,   0, \n     30,   0,   0,   0, 106,   8, \n      0,   1,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     90,   0,   0,   3,   0,  96, \n     16,   0,   0,   0,   0,   0, \n     88,  16,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0,  98,  16, \n      0,   3,  18,  16,  16,   0, \n      1,   0,   0,   0, 101,   0, \n      0,   3, 242,  32,  16,   0, \n      0,   0,   0,   0,  69,   0, \n      0,   9, 242,  32,  16,   0, \n      0,   0,   0,   0,   6,  16, \n     16,   0,   1,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,   0,  96,  16,   0, \n      0,   0,   0,   0,  62,   0, \n      0,   1,  83,  84,  65,  84, \n    116,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/ps1Darray.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_1DArray /Tps_4_1 /Fhshaders\\ps1Darray.h\n//\n//\n// Buffer Definitions: \n//\n// cbuffer cbArrayControl\n// {\n//\n//   float Index;                       // Offset:    0 Size:     4\n//\n// }\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx1DArray                         texture  float4     1darray    0        1\n// cbArrayControl                    cbuffer      NA          NA    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   x   \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_constantbuffer cb0[1], immediateIndexed\ndcl_sampler s0, mode_default\ndcl_resource_texture1darray (float,float,float,float) t0\ndcl_input_ps linear v1.x\ndcl_output o0.xyzw\ndcl_temps 1\nmov r0.x, v1.x\nmov r0.y, cb0[0].x\nsample o0.xyzw, r0.xyxx, t0.xyzw, s0\nret \n// Approximately 4 instruction slots used\n#endif\n\nconst BYTE g_PS_1DArray[] =\n{\n     68,  88,  66,  67, 210, 249, \n    153, 123, 172,  65,  50, 100, \n    250,   1,  76, 219,  67, 149, \n    143, 209,   1,   0,   0,   0, \n     20,   3,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n     88,   1,   0,   0, 176,   1, \n      0,   0, 228,   1,   0,   0, \n    152,   2,   0,   0,  82,  68, \n     69,  70,  28,   1,   0,   0, \n      1,   0,   0,   0, 160,   0, \n      0,   0,   3,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    232,   0,   0,   0, 124,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    134,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      3,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 144,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0, 115,  97, \n    109,  76, 105, 110, 101,  97, \n    114,   0, 116, 120,  49,  68, \n     65, 114, 114,  97, 121,   0, \n     99,  98,  65, 114, 114,  97, \n    121,  67, 111, 110, 116, 114, \n    111, 108,   0, 171, 144,   0, \n      0,   0,   1,   0,   0,   0, \n    184,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 208,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0, 216,   0,   0,   0, \n      0,   0,   0,   0,  73, 110, \n    100, 101, 120,   0, 171, 171, \n      0,   0,   3,   0,   1,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  77, 105, \n     99, 114, 111, 115, 111, 102, \n    116,  32,  40,  82,  41,  32, \n     72,  76,  83,  76,  32,  83, \n    104,  97, 100, 101, 114,  32, \n     67, 111, 109, 112, 105, 108, \n    101, 114,  32,  57,  46,  50, \n     57,  46,  57,  53,  50,  46, \n     51,  49,  49,  49,   0, 171, \n    171, 171,  73,  83,  71,  78, \n     80,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     56,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     68,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,  15,   1,   0,   0, \n     83,  86,  95,  80,  79,  83, \n     73,  84,  73,  79,  78,   0, \n     84,  69,  88,  67,  79,  79, \n     82,  68,   0, 171, 171, 171, \n     79,  83,  71,  78,  44,   0, \n      0,   0,   1,   0,   0,   0, \n      8,   0,   0,   0,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,  83,  86, \n     95,  84,  97, 114, 103, 101, \n    116,   0, 171, 171,  83,  72, \n     68,  82, 172,   0,   0,   0, \n     65,   0,   0,   0,  43,   0, \n      0,   0, 106,   8,   0,   1, \n     89,   0,   0,   4,  70, 142, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  90,   0, \n      0,   3,   0,  96,  16,   0, \n      0,   0,   0,   0,  88,  56, \n      0,   4,   0, 112,  16,   0, \n      0,   0,   0,   0,  85,  85, \n      0,   0,  98,  16,   0,   3, \n     18,  16,  16,   0,   1,   0, \n      0,   0, 101,   0,   0,   3, \n    242,  32,  16,   0,   0,   0, \n      0,   0, 104,   0,   0,   2, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,  16, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     69,   0,   0,   9, 242,  32, \n     16,   0,   0,   0,   0,   0, \n     70,   0,  16,   0,   0,   0, \n      0,   0,  70, 126,  16,   0, \n      0,   0,   0,   0,   0,  96, \n     16,   0,   0,   0,   0,   0, \n     62,   0,   0,   1,  83,  84, \n     65,  84, 116,   0,   0,   0, \n      4,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/ps2D.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_2D /Tps_4_1 /Fhshaders\\ps2D.h\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx2D                              texture  float4          2d    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   xy  \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_sampler s0, mode_default\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_input_ps linear v1.xy\ndcl_output o0.xyzw\nsample o0.xyzw, v1.xyxx, t0.xyzw, s0\nret \n// Approximately 2 instruction slots used\n#endif\n\nconst BYTE g_PS_2D[] =\n{\n     68,  88,  66,  67,  45,  73, \n    251,  77, 247,  44, 253,  34, \n    100,  41, 211,  74, 100, 236, \n     72,  69,   1,   0,   0,   0, \n     80,   2,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n    216,   0,   0,   0,  48,   1, \n      0,   0, 100,   1,   0,   0, \n    212,   1,   0,   0,  82,  68, \n     69,  70, 156,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    107,   0,   0,   0,  92,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    102,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      4,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 115,  97, 109,  76, \n    105, 110, 101,  97, 114,   0, \n    116, 120,  50,  68,   0,  77, \n    105,  99, 114, 111, 115, 111, \n    102, 116,  32,  40,  82,  41, \n     32,  72,  76,  83,  76,  32, \n     83, 104,  97, 100, 101, 114, \n     32,  67, 111, 109, 112, 105, \n    108, 101, 114,  32,  57,  46, \n     50,  57,  46,  57,  53,  50, \n     46,  51,  49,  49,  49,   0, \n     73,  83,  71,  78,  80,   0, \n      0,   0,   2,   0,   0,   0, \n      8,   0,   0,   0,  56,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,  68,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,   0, \n     15,   3,   0,   0,  83,  86, \n     95,  80,  79,  83,  73,  84, \n     73,  79,  78,   0,  84,  69, \n     88,  67,  79,  79,  82,  68, \n      0, 171, 171, 171,  79,  83, \n     71,  78,  44,   0,   0,   0, \n      1,   0,   0,   0,   8,   0, \n      0,   0,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  83,  86,  95,  84, \n     97, 114, 103, 101, 116,   0, \n    171, 171,  83,  72,  68,  82, \n    104,   0,   0,   0,  65,   0, \n      0,   0,  26,   0,   0,   0, \n    106,   8,   0,   1,  90,   0, \n      0,   3,   0,  96,  16,   0, \n      0,   0,   0,   0,  88,  24, \n      0,   4,   0, 112,  16,   0, \n      0,   0,   0,   0,  85,  85, \n      0,   0,  98,  16,   0,   3, \n     50,  16,  16,   0,   1,   0, \n      0,   0, 101,   0,   0,   3, \n    242,  32,  16,   0,   0,   0, \n      0,   0,  69,   0,   0,   9, \n    242,  32,  16,   0,   0,   0, \n      0,   0,  70,  16,  16,   0, \n      1,   0,   0,   0,  70, 126, \n     16,   0,   0,   0,   0,   0, \n      0,  96,  16,   0,   0,   0, \n      0,   0,  62,   0,   0,   1, \n     83,  84,  65,  84, 116,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/ps2Darray.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_2DArray /Tps_4_1 /Fhshaders\\ps2Darray.h\n//\n//\n// Buffer Definitions: \n//\n// cbuffer cbArrayControl\n// {\n//\n//   float Index;                       // Offset:    0 Size:     4\n//\n// }\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx2DArray                         texture  float4     2darray    0        1\n// cbArrayControl                    cbuffer      NA          NA    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   xy  \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_constantbuffer cb0[1], immediateIndexed\ndcl_sampler s0, mode_default\ndcl_resource_texture2darray (float,float,float,float) t0\ndcl_input_ps linear v1.xy\ndcl_output o0.xyzw\ndcl_temps 1\nmov r0.xy, v1.xyxx\nmov r0.z, cb0[0].x\nsample o0.xyzw, r0.xyzx, t0.xyzw, s0\nret \n// Approximately 4 instruction slots used\n#endif\n\nconst BYTE g_PS_2DArray[] =\n{\n     68,  88,  66,  67,  55, 138, \n     65,  43, 181, 212,  29, 116, \n    142, 112,  89,  51, 193,  95, \n    148,  33,   1,   0,   0,   0, \n     20,   3,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n     88,   1,   0,   0, 176,   1, \n      0,   0, 228,   1,   0,   0, \n    152,   2,   0,   0,  82,  68, \n     69,  70,  28,   1,   0,   0, \n      1,   0,   0,   0, 160,   0, \n      0,   0,   3,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    232,   0,   0,   0, 124,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    134,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 144,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0, 115,  97, \n    109,  76, 105, 110, 101,  97, \n    114,   0, 116, 120,  50,  68, \n     65, 114, 114,  97, 121,   0, \n     99,  98,  65, 114, 114,  97, \n    121,  67, 111, 110, 116, 114, \n    111, 108,   0, 171, 144,   0, \n      0,   0,   1,   0,   0,   0, \n    184,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 208,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0, 216,   0,   0,   0, \n      0,   0,   0,   0,  73, 110, \n    100, 101, 120,   0, 171, 171, \n      0,   0,   3,   0,   1,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  77, 105, \n     99, 114, 111, 115, 111, 102, \n    116,  32,  40,  82,  41,  32, \n     72,  76,  83,  76,  32,  83, \n    104,  97, 100, 101, 114,  32, \n     67, 111, 109, 112, 105, 108, \n    101, 114,  32,  57,  46,  50, \n     57,  46,  57,  53,  50,  46, \n     51,  49,  49,  49,   0, 171, \n    171, 171,  73,  83,  71,  78, \n     80,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     56,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     68,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,  15,   3,   0,   0, \n     83,  86,  95,  80,  79,  83, \n     73,  84,  73,  79,  78,   0, \n     84,  69,  88,  67,  79,  79, \n     82,  68,   0, 171, 171, 171, \n     79,  83,  71,  78,  44,   0, \n      0,   0,   1,   0,   0,   0, \n      8,   0,   0,   0,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,  83,  86, \n     95,  84,  97, 114, 103, 101, \n    116,   0, 171, 171,  83,  72, \n     68,  82, 172,   0,   0,   0, \n     65,   0,   0,   0,  43,   0, \n      0,   0, 106,   8,   0,   1, \n     89,   0,   0,   4,  70, 142, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  90,   0, \n      0,   3,   0,  96,  16,   0, \n      0,   0,   0,   0,  88,  64, \n      0,   4,   0, 112,  16,   0, \n      0,   0,   0,   0,  85,  85, \n      0,   0,  98,  16,   0,   3, \n     50,  16,  16,   0,   1,   0, \n      0,   0, 101,   0,   0,   3, \n    242,  32,  16,   0,   0,   0, \n      0,   0, 104,   0,   0,   2, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  50,   0,  16,   0, \n      0,   0,   0,   0,  70,  16, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     69,   0,   0,   9, 242,  32, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   0,   0, \n      0,   0,  70, 126,  16,   0, \n      0,   0,   0,   0,   0,  96, \n     16,   0,   0,   0,   0,   0, \n     62,   0,   0,   1,  83,  84, \n     65,  84, 116,   0,   0,   0, \n      4,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/ps3D.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_3D /Tps_4_1 /Fhshaders\\ps3D.h\n//\n//\n// Buffer Definitions: \n//\n// cbuffer cbArrayControl\n// {\n//\n//   float Index;                       // Offset:    0 Size:     4\n//\n// }\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx3D                              texture  float4          3d    0        1\n// cbArrayControl                    cbuffer      NA          NA    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   xy  \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_constantbuffer cb0[1], immediateIndexed\ndcl_sampler s0, mode_default\ndcl_resource_texture3d (float,float,float,float) t0\ndcl_input_ps linear v1.xy\ndcl_output o0.xyzw\ndcl_temps 1\nresinfo r0.x, l(0), t0.zxyw\ndiv r0.z, cb0[0].x, r0.x\nmov r0.xy, v1.xyxx\nsample o0.xyzw, r0.xyzx, t0.xyzw, s0\nret \n// Approximately 5 instruction slots used\n#endif\n\nconst BYTE g_PS_3D[] =\n{\n     68,  88,  66,  67, 119,  18, \n    113,  52,  66, 105,  65,  45, \n    139,  58, 175, 102,  69, 213, \n    121, 186,   1,   0,   0,   0, \n     52,   3,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n     84,   1,   0,   0, 172,   1, \n      0,   0, 224,   1,   0,   0, \n    184,   2,   0,   0,  82,  68, \n     69,  70,  24,   1,   0,   0, \n      1,   0,   0,   0, 156,   0, \n      0,   0,   3,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    228,   0,   0,   0, 124,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    134,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      8,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 139,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0, 115,  97, \n    109,  76, 105, 110, 101,  97, \n    114,   0, 116, 120,  51,  68, \n      0,  99,  98,  65, 114, 114, \n     97, 121,  67, 111, 110, 116, \n    114, 111, 108,   0, 171, 171, \n    139,   0,   0,   0,   1,   0, \n      0,   0, 180,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    204,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      2,   0,   0,   0, 212,   0, \n      0,   0,   0,   0,   0,   0, \n     73, 110, 100, 101, 120,   0, \n    171, 171,   0,   0,   3,   0, \n      1,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     77, 105,  99, 114, 111, 115, \n    111, 102, 116,  32,  40,  82, \n     41,  32,  72,  76,  83,  76, \n     32,  83, 104,  97, 100, 101, \n    114,  32,  67, 111, 109, 112, \n    105, 108, 101, 114,  32,  57, \n     46,  50,  57,  46,  57,  53, \n     50,  46,  51,  49,  49,  49, \n      0, 171, 171, 171,  73,  83, \n     71,  78,  80,   0,   0,   0, \n      2,   0,   0,   0,   8,   0, \n      0,   0,  56,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  68,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   0,  15,   3, \n      0,   0,  83,  86,  95,  80, \n     79,  83,  73,  84,  73,  79, \n     78,   0,  84,  69,  88,  67, \n     79,  79,  82,  68,   0, 171, \n    171, 171,  79,  83,  71,  78, \n     44,   0,   0,   0,   1,   0, \n      0,   0,   8,   0,   0,   0, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     83,  86,  95,  84,  97, 114, \n    103, 101, 116,   0, 171, 171, \n     83,  72,  68,  82, 208,   0, \n      0,   0,  65,   0,   0,   0, \n     52,   0,   0,   0, 106,   8, \n      0,   1,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     90,   0,   0,   3,   0,  96, \n     16,   0,   0,   0,   0,   0, \n     88,  40,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0,  98,  16, \n      0,   3,  50,  16,  16,   0, \n      1,   0,   0,   0, 101,   0, \n      0,   3, 242,  32,  16,   0, \n      0,   0,   0,   0, 104,   0, \n      0,   2,   1,   0,   0,   0, \n     61,   0,   0,   7,  18,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  38, 125,  16,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   8,  66,   0,  16,   0, \n      0,   0,   0,   0,  10, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  50,   0, \n     16,   0,   0,   0,   0,   0, \n     70,  16,  16,   0,   1,   0, \n      0,   0,  69,   0,   0,   9, \n    242,  32,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      0,   0,   0,   0,  70, 126, \n     16,   0,   0,   0,   0,   0, \n      0,  96,  16,   0,   0,   0, \n      0,   0,  62,   0,   0,   1, \n     83,  84,  65,  84, 116,   0, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/psCube.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EPS_Cube /Tps_4_1 /Fhshaders\\psCube.h\n//\n//\n// Buffer Definitions: \n//\n// cbuffer cbArrayControl\n// {\n//\n//   float Index;                       // Offset:    0 Size:     4\n//\n// }\n//\n//\n// Resource Bindings:\n//\n// Name                                 Type  Format         Dim Slot Elements\n// ------------------------------ ---------- ------- ----------- ---- --------\n// samLinear                         sampler      NA          NA    0        1\n// tx2DArray                         texture  float4     2darray    0        1\n// cbArrayControl                    cbuffer      NA          NA    0        1\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float       \n// TEXCOORD                 0   xyzw        1     NONE  float   xyz \n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_Target                0   xyzw        0   TARGET  float   xyzw\n//\nps_4_1\ndcl_globalFlags refactoringAllowed\ndcl_constantbuffer cb0[1], immediateIndexed\ndcl_sampler s0, mode_default\ndcl_resource_texture2darray (float,float,float,float) t0\ndcl_input_ps linear v1.xyz\ndcl_output o0.xyzw\ndcl_temps 1\nmad r0.z, cb0[0].x, l(6.000000), v1.z\nmov r0.xy, v1.xyxx\nsample o0.xyzw, r0.xyzx, t0.xyzw, s0\nret \n// Approximately 4 instruction slots used\n#endif\n\nconst BYTE g_PS_Cube[] =\n{\n     68,  88,  66,  67, 255,  88, \n    222, 202,  51, 233, 113, 192, \n    119,  52,  43, 119,  92,  83, \n    243, 127,   1,   0,   0,   0, \n     36,   3,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n     88,   1,   0,   0, 176,   1, \n      0,   0, 228,   1,   0,   0, \n    168,   2,   0,   0,  82,  68, \n     69,  70,  28,   1,   0,   0, \n      1,   0,   0,   0, 160,   0, \n      0,   0,   3,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    255, 255,   0,   1,   0,   0, \n    232,   0,   0,   0, 124,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    134,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,   0,  13,   0, \n      0,   0, 144,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0, 115,  97, \n    109,  76, 105, 110, 101,  97, \n    114,   0, 116, 120,  50,  68, \n     65, 114, 114,  97, 121,   0, \n     99,  98,  65, 114, 114,  97, \n    121,  67, 111, 110, 116, 114, \n    111, 108,   0, 171, 144,   0, \n      0,   0,   1,   0,   0,   0, \n    184,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 208,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0, 216,   0,   0,   0, \n      0,   0,   0,   0,  73, 110, \n    100, 101, 120,   0, 171, 171, \n      0,   0,   3,   0,   1,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  77, 105, \n     99, 114, 111, 115, 111, 102, \n    116,  32,  40,  82,  41,  32, \n     72,  76,  83,  76,  32,  83, \n    104,  97, 100, 101, 114,  32, \n     67, 111, 109, 112, 105, 108, \n    101, 114,  32,  57,  46,  50, \n     57,  46,  57,  53,  50,  46, \n     51,  49,  49,  49,   0, 171, \n    171, 171,  73,  83,  71,  78, \n     80,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     56,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     68,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,  15,   7,   0,   0, \n     83,  86,  95,  80,  79,  83, \n     73,  84,  73,  79,  78,   0, \n     84,  69,  88,  67,  79,  79, \n     82,  68,   0, 171, 171, 171, \n     79,  83,  71,  78,  44,   0, \n      0,   0,   1,   0,   0,   0, \n      8,   0,   0,   0,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,  83,  86, \n     95,  84,  97, 114, 103, 101, \n    116,   0, 171, 171,  83,  72, \n     68,  82, 188,   0,   0,   0, \n     65,   0,   0,   0,  47,   0, \n      0,   0, 106,   8,   0,   1, \n     89,   0,   0,   4,  70, 142, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  90,   0, \n      0,   3,   0,  96,  16,   0, \n      0,   0,   0,   0,  88,  64, \n      0,   4,   0, 112,  16,   0, \n      0,   0,   0,   0,  85,  85, \n      0,   0,  98,  16,   0,   3, \n    114,  16,  16,   0,   1,   0, \n      0,   0, 101,   0,   0,   3, \n    242,  32,  16,   0,   0,   0, \n      0,   0, 104,   0,   0,   2, \n      1,   0,   0,   0,  50,   0, \n      0,  10,  66,   0,  16,   0, \n      0,   0,   0,   0,  10, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0, 192,  64, \n     42,  16,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     50,   0,  16,   0,   0,   0, \n      0,   0,  70,  16,  16,   0, \n      1,   0,   0,   0,  69,   0, \n      0,   9, 242,  32,  16,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,   0,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,   0,  96,  16,   0, \n      0,   0,   0,   0,  62,   0, \n      0,   1,  83,  84,  65,  84, \n    116,   0,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DDSView/shaders/vs.h",
    "content": "#if 0\n//\n// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111\n//\n//\n//   fxc ddsview.fx /nologo /EVS /Tvs_4_1 /Fhshaders\\vs.h\n//\n//\n//\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// POSITION                 0   xyzw        0     NONE  float   xyzw\n// TEXCOORD                 0   xyzw        1     NONE  float   xyzw\n//\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue Format   Used\n// -------------------- ----- ------ -------- -------- ------ ------\n// SV_POSITION              0   xyzw        0      POS  float   xyzw\n// TEXCOORD                 0   xyzw        1     NONE  float   xyzw\n//\nvs_4_1\ndcl_globalFlags refactoringAllowed\ndcl_input v0.xyzw\ndcl_input v1.xyzw\ndcl_output_siv o0.xyzw, position\ndcl_output o1.xyzw\nmov o0.xyzw, v0.xyzw\nmov o1.xyzw, v1.xyzw\nret \n// Approximately 3 instruction slots used\n#endif\n\nconst BYTE g_VS[] =\n{\n     68,  88,  66,  67, 243,   4, \n    207,   4,  72, 185, 125, 253, \n     86, 236,  11, 103, 199, 128, \n     83, 243,   1,   0,   0,   0, \n     40,   2,   0,   0,   5,   0, \n      0,   0,  52,   0,   0,   0, \n    140,   0,   0,   0, 224,   0, \n      0,   0,  56,   1,   0,   0, \n    172,   1,   0,   0,  82,  68, \n     69,  70,  80,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     28,   0,   0,   0,   1,   4, \n    254, 255,   0,   1,   0,   0, \n     28,   0,   0,   0,  77, 105, \n     99, 114, 111, 115, 111, 102, \n    116,  32,  40,  82,  41,  32, \n     72,  76,  83,  76,  32,  83, \n    104,  97, 100, 101, 114,  32, \n     67, 111, 109, 112, 105, 108, \n    101, 114,  32,  57,  46,  50, \n     57,  46,  57,  53,  50,  46, \n     51,  49,  49,  49,   0, 171, \n    171, 171,  73,  83,  71,  78, \n     76,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     56,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,  15,   0,   0, \n     65,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,  15,  15,   0,   0, \n     80,  79,  83,  73,  84,  73, \n     79,  78,   0,  84,  69,  88, \n     67,  79,  79,  82,  68,   0, \n    171, 171,  79,  83,  71,  78, \n     80,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     56,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     68,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,  15,   0,   0,   0, \n     83,  86,  95,  80,  79,  83, \n     73,  84,  73,  79,  78,   0, \n     84,  69,  88,  67,  79,  79, \n     82,  68,   0, 171, 171, 171, \n     83,  72,  68,  82, 108,   0, \n      0,   0,  65,   0,   1,   0, \n     27,   0,   0,   0, 106,   8, \n      0,   1,  95,   0,   0,   3, \n    242,  16,  16,   0,   0,   0, \n      0,   0,  95,   0,   0,   3, \n    242,  16,  16,   0,   1,   0, \n      0,   0, 103,   0,   0,   4, \n    242,  32,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n    101,   0,   0,   3, 242,  32, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   5, 242,  32, \n     16,   0,   0,   0,   0,   0, \n     70,  30,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n    242,  32,  16,   0,   1,   0, \n      0,   0,  70,  30,  16,   0, \n      1,   0,   0,   0,  62,   0, \n      0,   1,  83,  84,  65,  84, \n    116,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BC.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// BC.cpp\n//  \n// Block-compression (BC) functionality for BC1, BC2, BC3 (orginal DXTn formats)\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//  \n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n// Experiemental encoding variants, not enabled by default\n//#define COLOR_WEIGHTS\n//#define COLOR_AVG_0WEIGHTS\n\n#include \"BC.h\"\n\nusing namespace DirectX::PackedVector;\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Constants\n//-------------------------------------------------------------------------------------\n\n// Perceptual weightings for the importance of each channel.\nstatic const HDRColorA g_Luminance   (0.2125f / 0.7154f, 1.0f, 0.0721f / 0.7154f, 1.0f);\nstatic const HDRColorA g_LuminanceInv(0.7154f / 0.2125f, 1.0f, 0.7154f / 0.0721f, 1.0f);\n\n//-------------------------------------------------------------------------------------\n// Decode/Encode RGB 5/6/5 colors\n//-------------------------------------------------------------------------------------\ninline static void Decode565(_Out_ HDRColorA *pColor, _In_ const uint16_t w565)\n{\n    pColor->r = (float) ((w565 >> 11) & 31) * (1.0f / 31.0f);\n    pColor->g = (float) ((w565 >>  5) & 63) * (1.0f / 63.0f);\n    pColor->b = (float) ((w565 >>  0) & 31) * (1.0f / 31.0f);\n    pColor->a = 1.0f;\n}\n\ninline static uint16_t Encode565(_In_ const HDRColorA *pColor)\n{\n    HDRColorA Color;\n\n    Color.r = (pColor->r < 0.0f) ? 0.0f : (pColor->r > 1.0f) ? 1.0f : pColor->r;\n    Color.g = (pColor->g < 0.0f) ? 0.0f : (pColor->g > 1.0f) ? 1.0f : pColor->g;\n    Color.b = (pColor->b < 0.0f) ? 0.0f : (pColor->b > 1.0f) ? 1.0f : pColor->b;\n\n    uint16_t w;\n\n    w = (uint16_t) ((static_cast<int32_t>(Color.r * 31.0f + 0.5f) << 11) |\n                    (static_cast<int32_t>(Color.g * 63.0f + 0.5f) <<  5) |\n                    (static_cast<int32_t>(Color.b * 31.0f + 0.5f) <<  0));\n\n    return w;\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic void OptimizeRGB(_Out_ HDRColorA *pX, _Out_ HDRColorA *pY,\n                        _In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA *pPoints, _In_ size_t cSteps, _In_ DWORD flags)\n{\n    static const float fEpsilon = (0.25f / 64.0f) * (0.25f / 64.0f);\n    static const float pC3[] = { 2.0f/2.0f, 1.0f/2.0f, 0.0f/2.0f };\n    static const float pD3[] = { 0.0f/2.0f, 1.0f/2.0f, 2.0f/2.0f };\n    static const float pC4[] = { 3.0f/3.0f, 2.0f/3.0f, 1.0f/3.0f, 0.0f/3.0f };\n    static const float pD4[] = { 0.0f/3.0f, 1.0f/3.0f, 2.0f/3.0f, 3.0f/3.0f };\n\n    const float *pC = (3 == cSteps) ? pC3 : pC4;\n    const float *pD = (3 == cSteps) ? pD3 : pD4;\n\n    // Find Min and Max points, as starting point\n    HDRColorA X = (flags & BC_FLAGS_UNIFORM) ? HDRColorA(1.f, 1.f, 1.f, 1.f) : g_Luminance;\n    HDRColorA Y = HDRColorA(0.0f, 0.0f, 0.0f, 1.0f);\n\n    for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n    {\n#ifdef COLOR_WEIGHTS\n        if(pPoints[iPoint].a > 0.0f)\n#endif // COLOR_WEIGHTS\n        {\n            if(pPoints[iPoint].r < X.r)\n                X.r = pPoints[iPoint].r;\n\n            if(pPoints[iPoint].g < X.g)\n                X.g = pPoints[iPoint].g;\n\n            if(pPoints[iPoint].b < X.b)\n                X.b = pPoints[iPoint].b;\n\n            if(pPoints[iPoint].r > Y.r)\n                Y.r = pPoints[iPoint].r;\n\n            if(pPoints[iPoint].g > Y.g)\n                Y.g = pPoints[iPoint].g;\n\n            if(pPoints[iPoint].b > Y.b)\n                Y.b = pPoints[iPoint].b;\n        }\n    }\n\n    // Diagonal axis\n    HDRColorA AB;\n\n    AB.r = Y.r - X.r;\n    AB.g = Y.g - X.g;\n    AB.b = Y.b - X.b;\n\n    float fAB = AB.r * AB.r + AB.g * AB.g + AB.b * AB.b;\n\n    // Single color block.. no need to root-find\n    if(fAB < FLT_MIN)\n    {\n        pX->r = X.r; pX->g = X.g; pX->b = X.b;\n        pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n        return;\n    }\n\n    // Try all four axis directions, to determine which diagonal best fits data\n    float fABInv = 1.0f / fAB;\n\n    HDRColorA Dir;\n    Dir.r = AB.r * fABInv;\n    Dir.g = AB.g * fABInv;\n    Dir.b = AB.b * fABInv;\n\n    HDRColorA Mid;\n    Mid.r = (X.r + Y.r) * 0.5f;\n    Mid.g = (X.g + Y.g) * 0.5f;\n    Mid.b = (X.b + Y.b) * 0.5f;\n\n    float fDir[4];\n    fDir[0] = fDir[1] = fDir[2] = fDir[3] = 0.0f;\n\n\n    for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n    {\n        HDRColorA Pt;\n        Pt.r = (pPoints[iPoint].r - Mid.r) * Dir.r;\n        Pt.g = (pPoints[iPoint].g - Mid.g) * Dir.g;\n        Pt.b = (pPoints[iPoint].b - Mid.b) * Dir.b;\n\n        float f;\n\n#ifdef COLOR_WEIGHTS\n        f = Pt.r + Pt.g + Pt.b;\n        fDir[0] += pPoints[iPoint].a * f * f;\n\n        f = Pt.r + Pt.g - Pt.b;\n        fDir[1] += pPoints[iPoint].a * f * f;\n\n        f = Pt.r - Pt.g + Pt.b;\n        fDir[2] += pPoints[iPoint].a * f * f;\n\n        f = Pt.r - Pt.g - Pt.b;\n        fDir[3] += pPoints[iPoint].a * f * f;\n#else\n        f = Pt.r + Pt.g + Pt.b;\n        fDir[0] += f * f;\n\n        f = Pt.r + Pt.g - Pt.b;\n        fDir[1] += f * f;\n\n        f = Pt.r - Pt.g + Pt.b;\n        fDir[2] += f * f;\n\n        f = Pt.r - Pt.g - Pt.b;\n        fDir[3] += f * f;\n#endif // COLOR_WEIGHTS\n    }\n\n    float fDirMax = fDir[0];\n    size_t  iDirMax = 0;\n\n    for(size_t iDir = 1; iDir < 4; iDir++)\n    {\n        if(fDir[iDir] > fDirMax)\n        {\n            fDirMax = fDir[iDir];\n            iDirMax = iDir;\n        }\n    }\n\n    if(iDirMax & 2)\n    {\n        float f = X.g; X.g = Y.g; Y.g = f;\n    }\n\n    if(iDirMax & 1)\n    {\n        float f = X.b; X.b = Y.b; Y.b = f;\n    }\n\n\n    // Two color block.. no need to root-find\n    if(fAB < 1.0f / 4096.0f)\n    {\n        pX->r = X.r; pX->g = X.g; pX->b = X.b;\n        pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n        return;\n    }\n\n\n    // Use Newton's Method to find local minima of sum-of-squares error.\n    float fSteps = (float) (cSteps - 1);\n\n    for(size_t iIteration = 0; iIteration < 8; iIteration++)\n    {\n        // Calculate new steps\n        HDRColorA pSteps[4];\n\n        for(size_t iStep = 0; iStep < cSteps; iStep++)\n        {\n            pSteps[iStep].r = X.r * pC[iStep] + Y.r * pD[iStep];\n            pSteps[iStep].g = X.g * pC[iStep] + Y.g * pD[iStep];\n            pSteps[iStep].b = X.b * pC[iStep] + Y.b * pD[iStep];\n        }\n\n\n        // Calculate color direction\n        Dir.r = Y.r - X.r;\n        Dir.g = Y.g - X.g;\n        Dir.b = Y.b - X.b;\n\n        float fLen = (Dir.r * Dir.r + Dir.g * Dir.g + Dir.b * Dir.b);\n\n        if(fLen < (1.0f / 4096.0f))\n            break;\n\n        float fScale = fSteps / fLen;\n\n        Dir.r *= fScale;\n        Dir.g *= fScale;\n        Dir.b *= fScale;\n\n\n        // Evaluate function, and derivatives\n        float d2X, d2Y;\n        HDRColorA dX, dY;\n        d2X = d2Y = dX.r = dX.g = dX.b = dY.r = dY.g = dY.b = 0.0f;\n\n        for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n        {\n            float fDot = (pPoints[iPoint].r - X.r) * Dir.r + \n                         (pPoints[iPoint].g - X.g) * Dir.g + \n                         (pPoints[iPoint].b - X.b) * Dir.b;\n\n\n            size_t iStep;\n            if(fDot <= 0.0f)\n                iStep = 0;\n            else if(fDot >= fSteps)\n                iStep = cSteps - 1;\n            else\n                iStep = static_cast<size_t>(fDot + 0.5f);\n\n\n            HDRColorA Diff;\n            Diff.r = pSteps[iStep].r - pPoints[iPoint].r;\n            Diff.g = pSteps[iStep].g - pPoints[iPoint].g;\n            Diff.b = pSteps[iStep].b - pPoints[iPoint].b;\n\n#ifdef COLOR_WEIGHTS\n            float fC = pC[iStep] * pPoints[iPoint].a * (1.0f / 8.0f);\n            float fD = pD[iStep] * pPoints[iPoint].a * (1.0f / 8.0f);\n#else\n            float fC = pC[iStep] * (1.0f / 8.0f);\n            float fD = pD[iStep] * (1.0f / 8.0f);\n#endif // COLOR_WEIGHTS\n\n            d2X  += fC * pC[iStep];\n            dX.r += fC * Diff.r;\n            dX.g += fC * Diff.g;\n            dX.b += fC * Diff.b;\n\n            d2Y  += fD * pD[iStep];\n            dY.r += fD * Diff.r;\n            dY.g += fD * Diff.g;\n            dY.b += fD * Diff.b;\n        }\n\n\n        // Move endpoints\n        if(d2X > 0.0f)\n        {\n            float f = -1.0f / d2X;\n\n            X.r += dX.r * f;\n            X.g += dX.g * f;\n            X.b += dX.b * f;\n        }\n\n        if(d2Y > 0.0f)\n        {\n            float f = -1.0f / d2Y;\n\n            Y.r += dY.r * f;\n            Y.g += dY.g * f;\n            Y.b += dY.b * f;\n        }\n\n        if((dX.r * dX.r < fEpsilon) && (dX.g * dX.g < fEpsilon) && (dX.b * dX.b < fEpsilon) &&\n           (dY.r * dY.r < fEpsilon) && (dY.g * dY.g < fEpsilon) && (dY.b * dY.b < fEpsilon))\n        {\n            break;\n        }\n    }\n\n    pX->r = X.r; pX->g = X.g; pX->b = X.b;\n    pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n}\n\n\n//-------------------------------------------------------------------------------------\ninline static void DecodeBC1( _Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_ const D3DX_BC1 *pBC, _In_ bool isbc1 )\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC1) == 8, \"D3DX_BC1 should be 8 bytes\" );\n\n    static XMVECTORF32 s_Scale = { 1.f/31.f, 1.f/63.f, 1.f/31.f, 1.f };\n\n    XMVECTOR clr0 = XMLoadU565( reinterpret_cast<const XMU565*>(&pBC->rgb[0]) );\n    XMVECTOR clr1 = XMLoadU565( reinterpret_cast<const XMU565*>(&pBC->rgb[1]) );\n\n    clr0 = XMVectorMultiply( clr0, s_Scale );\n    clr1 = XMVectorMultiply( clr1, s_Scale );\n\n    clr0 = XMVectorSwizzle<2, 1, 0, 3>( clr0 );\n    clr1 = XMVectorSwizzle<2, 1, 0, 3>( clr1 );\n\n    clr0 = XMVectorSelect( g_XMIdentityR3, clr0, g_XMSelect1110 );\n    clr1 = XMVectorSelect( g_XMIdentityR3, clr1, g_XMSelect1110 );\n\n    XMVECTOR clr2, clr3;\n    if ( isbc1 && (pBC->rgb[0] <= pBC->rgb[1]) )\n    {\n        clr2 = XMVectorLerp( clr0, clr1, 0.5f );\n        clr3 = XMVectorZero();  // Alpha of 0\n    }\n    else\n    {\n        clr2 = XMVectorLerp( clr0, clr1, 1.f/3.f );\n        clr3 = XMVectorLerp( clr0, clr1, 2.f/3.f );\n    }\n\n    uint32_t dw = pBC->bitmap;\n\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i, dw >>= 2)\n    {\n        switch(dw & 3)\n        {\n        case 0: pColor[i] = clr0; break;\n        case 1: pColor[i] = clr1; break;\n        case 2: pColor[i] = clr2; break;\n\n        case 3:\n        default: pColor[i] = clr3; break;\n        }\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n\nstatic void EncodeBC1(_Out_ D3DX_BC1 *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA *pColor,\n                      _In_ bool bColorKey, _In_ float alphaRef, _In_ DWORD flags)\n{\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC1) == 8, \"D3DX_BC1 should be 8 bytes\" );\n\n    // Determine if we need to colorkey this block\n    size_t uSteps;\n    \n    if (bColorKey)\n    {\n        size_t uColorKey = 0;\n\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            if(pColor[i].a < alphaRef)\n                uColorKey++;\n        }\n\n        if(NUM_PIXELS_PER_BLOCK == uColorKey)\n        {\n            pBC->rgb[0] = 0x0000;\n            pBC->rgb[1] = 0xffff;\n            pBC->bitmap = 0xffffffff;\n            return;\n        }\n\n        uSteps = (uColorKey > 0) ? 3 : 4;\n    }\n    else\n    {\n        uSteps = 4;\n    }\n\n    // Quantize block to R56B5, using Floyd Stienberg error diffusion.  This \n    // increases the chance that colors will map directly to the quantized \n    // axis endpoints.\n    HDRColorA Color[NUM_PIXELS_PER_BLOCK];\n    HDRColorA Error[NUM_PIXELS_PER_BLOCK];\n\n    if (flags & BC_FLAGS_DITHER_RGB)\n        memset(Error, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(HDRColorA));\n\n    size_t i;\n    for(i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        HDRColorA Clr;\n        Clr.r = pColor[i].r;\n        Clr.g = pColor[i].g;\n        Clr.b = pColor[i].b;\n\n        if (flags & BC_FLAGS_DITHER_RGB)\n        {\n            Clr.r += Error[i].r;\n            Clr.g += Error[i].g;    \n            Clr.b += Error[i].b;\n        }\n\n        Color[i].r = (float) static_cast<int32_t>(Clr.r * 31.0f + 0.5f) * (1.0f / 31.0f);\n        Color[i].g = (float) static_cast<int32_t>(Clr.g * 63.0f + 0.5f) * (1.0f / 63.0f);\n        Color[i].b = (float) static_cast<int32_t>(Clr.b * 31.0f + 0.5f) * (1.0f / 31.0f);\n\n#ifdef COLOR_WEIGHTS\n        Color[i].a = pColor[i].a;\n#else\n        Color[i].a = 1.0f;\n#endif // COLOR_WEIGHTS\n\n        if (flags & BC_FLAGS_DITHER_RGB)\n        {\n            HDRColorA Diff;\n            Diff.r = Color[i].a * (Clr.r - Color[i].r);\n            Diff.g = Color[i].a * (Clr.g - Color[i].g);\n            Diff.b = Color[i].a * (Clr.b - Color[i].b);\n\n            if(3 != (i & 3))\n            {\n                assert( i < 15 );\n                _Analysis_assume_( i < 15 );\n                Error[i + 1].r += Diff.r * (7.0f / 16.0f);\n                Error[i + 1].g += Diff.g * (7.0f / 16.0f);\n                Error[i + 1].b += Diff.b * (7.0f / 16.0f);\n            }\n\n            if(i < 12)\n            {\n                if(i & 3)\n                {\n                    Error[i + 3].r += Diff.r * (3.0f / 16.0f);\n                    Error[i + 3].g += Diff.g * (3.0f / 16.0f);\n                    Error[i + 3].b += Diff.b * (3.0f / 16.0f);\n                }\n\n                Error[i + 4].r += Diff.r * (5.0f / 16.0f);\n                Error[i + 4].g += Diff.g * (5.0f / 16.0f);\n                Error[i + 4].b += Diff.b * (5.0f / 16.0f);\n\n                if(3 != (i & 3))\n                {\n                    assert( i < 11 );\n                    _Analysis_assume_( i < 11 );\n                    Error[i + 5].r += Diff.r * (1.0f / 16.0f);\n                    Error[i + 5].g += Diff.g * (1.0f / 16.0f);\n                    Error[i + 5].b += Diff.b * (1.0f / 16.0f);\n                }\n            }\n        }\n\n        if ( !( flags & BC_FLAGS_UNIFORM ) )\n        {\n            Color[i].r *= g_Luminance.r;\n            Color[i].g *= g_Luminance.g;\n            Color[i].b *= g_Luminance.b;\n        }\n    }\n\n    // Perform 6D root finding function to find two endpoints of color axis.\n    // Then quantize and sort the endpoints depending on mode.\n    HDRColorA ColorA, ColorB, ColorC, ColorD;\n\n    OptimizeRGB(&ColorA, &ColorB, Color, uSteps, flags);\n\n    if ( flags & BC_FLAGS_UNIFORM )\n    {\n        ColorC = ColorA;\n        ColorD = ColorB;\n    }\n    else\n    {\n        ColorC.r = ColorA.r * g_LuminanceInv.r;\n        ColorC.g = ColorA.g * g_LuminanceInv.g;\n        ColorC.b = ColorA.b * g_LuminanceInv.b;\n\n        ColorD.r = ColorB.r * g_LuminanceInv.r;\n        ColorD.g = ColorB.g * g_LuminanceInv.g;\n        ColorD.b = ColorB.b * g_LuminanceInv.b;\n    }\n\n    uint16_t wColorA = Encode565(&ColorC);\n    uint16_t wColorB = Encode565(&ColorD);\n\n    if((uSteps == 4) && (wColorA == wColorB))\n    {\n        pBC->rgb[0] = wColorA;\n        pBC->rgb[1] = wColorB;\n        pBC->bitmap = 0x00000000;\n        return;\n    }\n\n    Decode565(&ColorC, wColorA);\n    Decode565(&ColorD, wColorB);\n\n    if ( flags & BC_FLAGS_UNIFORM )\n    {\n        ColorA = ColorC;\n        ColorB = ColorD;\n    }\n    else\n    {\n        ColorA.r = ColorC.r * g_Luminance.r;\n        ColorA.g = ColorC.g * g_Luminance.g;\n        ColorA.b = ColorC.b * g_Luminance.b;\n\n        ColorB.r = ColorD.r * g_Luminance.r;\n        ColorB.g = ColorD.g * g_Luminance.g;\n        ColorB.b = ColorD.b * g_Luminance.b;\n    }\n\n    // Calculate color steps\n    HDRColorA Step[4];\n\n    if((3 == uSteps) == (wColorA <= wColorB))\n    {\n        pBC->rgb[0] = wColorA;\n        pBC->rgb[1] = wColorB;\n\n        Step[0] = ColorA;\n        Step[1] = ColorB;\n    }\n    else\n    {\n        pBC->rgb[0] = wColorB;\n        pBC->rgb[1] = wColorA;\n\n        Step[0] = ColorB;\n        Step[1] = ColorA;\n    }\n\n    static const size_t pSteps3[] = { 0, 2, 1 };\n    static const size_t pSteps4[] = { 0, 2, 3, 1 };\n    const size_t *pSteps;\n\n    if(3 == uSteps)\n    {\n        pSteps = pSteps3;\n\n        HDRColorALerp(&Step[2], &Step[0], &Step[1], 0.5f);\n    }\n    else\n    {\n        pSteps = pSteps4;\n\n        HDRColorALerp(&Step[2], &Step[0], &Step[1], 1.0f / 3.0f);\n        HDRColorALerp(&Step[3], &Step[0], &Step[1], 2.0f / 3.0f);\n    }\n\n    // Calculate color direction\n    HDRColorA Dir;\n\n    Dir.r = Step[1].r - Step[0].r;\n    Dir.g = Step[1].g - Step[0].g;\n    Dir.b = Step[1].b - Step[0].b;\n\n    float fSteps = (float) (uSteps - 1);\n    float fScale = (wColorA != wColorB) ? (fSteps / (Dir.r * Dir.r + Dir.g * Dir.g + Dir.b * Dir.b)) : 0.0f;\n\n    Dir.r *= fScale;\n    Dir.g *= fScale;\n    Dir.b *= fScale;\n\n    // Encode colors\n    uint32_t dw = 0;\n    if (flags & BC_FLAGS_DITHER_RGB)\n        memset(Error, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(HDRColorA));\n\n    for(i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        if((3 == uSteps) && (pColor[i].a < alphaRef))\n        {\n            dw = (3 << 30) | (dw >> 2);\n        }\n        else\n        {\n            HDRColorA Clr;\n            if ( flags & BC_FLAGS_UNIFORM )\n            {\n                Clr.r = pColor[i].r;\n                Clr.g = pColor[i].g;\n                Clr.b = pColor[i].b;\n            }\n            else\n            {\n                Clr.r = pColor[i].r * g_Luminance.r;\n                Clr.g = pColor[i].g * g_Luminance.g;\n                Clr.b = pColor[i].b * g_Luminance.b;\n            }\n\n            if (flags & BC_FLAGS_DITHER_RGB)\n            {\n                Clr.r += Error[i].r;\n                Clr.g += Error[i].g;\n                Clr.b += Error[i].b;\n            }\n\n            float fDot = (Clr.r - Step[0].r) * Dir.r + (Clr.g - Step[0].g) * Dir.g + (Clr.b - Step[0].b) * Dir.b;\n            uint32_t iStep;\n\n            if(fDot <= 0.0f)\n                iStep = 0;\n            else if(fDot >= fSteps)\n                iStep = 1;\n            else\n                iStep = static_cast<uint32_t>( pSteps[static_cast<size_t>(fDot + 0.5f)] );\n\n            dw = (iStep << 30) | (dw >> 2);\n\n            if (flags & BC_FLAGS_DITHER_RGB)\n            {\n                HDRColorA Diff;\n                Diff.r = Color[i].a * (Clr.r - Step[iStep].r);\n                Diff.g = Color[i].a * (Clr.g - Step[iStep].g);\n                Diff.b = Color[i].a * (Clr.b - Step[iStep].b);\n\n                if(3 != (i & 3))\n                {\n                    Error[i + 1].r += Diff.r * (7.0f / 16.0f);\n                    Error[i + 1].g += Diff.g * (7.0f / 16.0f);\n                    Error[i + 1].b += Diff.b * (7.0f / 16.0f);\n                }\n\n                if(i < 12)\n                {\n                    if(i & 3)\n                    {\n                        Error[i + 3].r += Diff.r * (3.0f / 16.0f);\n                        Error[i + 3].g += Diff.g * (3.0f / 16.0f);\n                        Error[i + 3].b += Diff.b * (3.0f / 16.0f);\n                    }\n\n                    Error[i + 4].r += Diff.r * (5.0f / 16.0f);\n                    Error[i + 4].g += Diff.g * (5.0f / 16.0f);\n                    Error[i + 4].b += Diff.b * (5.0f / 16.0f);\n\n                    if(3 != (i & 3))\n                    {\n                        Error[i + 5].r += Diff.r * (1.0f / 16.0f);\n                        Error[i + 5].g += Diff.g * (1.0f / 16.0f);\n                        Error[i + 5].b += Diff.b * (1.0f / 16.0f);\n                    }\n                }\n            }\n        }\n    }\n\n    pBC->bitmap = dw;\n}\n\n//-------------------------------------------------------------------------------------\n#ifdef COLOR_WEIGHTS\nstatic void EncodeSolidBC1(_Out_ D3DX_BC1 *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA *pColor)\n{\n#ifdef COLOR_AVG_0WEIGHTS\n    // Compute avg color\n    HDRColorA Color;\n    Color.r = pColor[0].r;\n    Color.g = pColor[0].g;\n    Color.b = pColor[0].b;\n\n    for(size_t i = 1; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        Color.r += pColor[i].r;\n        Color.g += pColor[i].g;\n        Color.b += pColor[i].b;\n    }\n\n    Color.r *= 1.0f / 16.0f;\n    Color.g *= 1.0f / 16.0f;\n    Color.b *= 1.0f / 16.0f;\n\n    uint16_t wColor = Encode565(&Color);\n#else\n    uint16_t wColor = 0x0000;\n#endif // COLOR_AVG_0WEIGHTS\n\n    // Encode solid block\n    pBC->rgb[0] = wColor;\n    pBC->rgb[1] = wColor;\n    pBC->bitmap = 0x00000000;\n}\n#endif // COLOR_WEIGHTS\n\n\n//=====================================================================================\n// Entry points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// BC1 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC1(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    auto pBC1 = reinterpret_cast<const D3DX_BC1 *>(pBC);\n    DecodeBC1( pColor, pBC1, true );\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC1(uint8_t *pBC, const XMVECTOR *pColor, float alphaRef, DWORD flags)\n{\n    assert( pBC && pColor );\n\n    HDRColorA Color[NUM_PIXELS_PER_BLOCK];\n\n    if (flags & BC_FLAGS_DITHER_A)\n    {\n        float fError[NUM_PIXELS_PER_BLOCK];\n        memset(fError, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(float));\n\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            HDRColorA clr;\n            XMStoreFloat4( reinterpret_cast<XMFLOAT4*>( &clr ), pColor[i] );\n\n            float fAlph = clr.a + fError[i];\n\n            Color[i].r = clr.r;\n            Color[i].g = clr.g;\n            Color[i].b = clr.b;\n            Color[i].a = (float) static_cast<int32_t>(clr.a + fError[i] + 0.5f);\n\n            float fDiff = fAlph - Color[i].a;\n\n            if(3 != (i & 3))\n            {\n                assert( i < 15 );\n                _Analysis_assume_( i < 15 );\n                fError[i + 1] += fDiff * (7.0f / 16.0f);\n            }\n\n            if(i < 12)\n            {\n                if(i & 3)\n                    fError[i + 3] += fDiff * (3.0f / 16.0f);\n\n                fError[i + 4] += fDiff * (5.0f / 16.0f);\n\n                if(3 != (i & 3))\n                {\n                    assert( i < 11 );\n                    _Analysis_assume_( i < 11 );\n                    fError[i + 5] += fDiff * (1.0f / 16.0f);\n                }\n            }\n        }\n    }\n    else\n    {\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            XMStoreFloat4( reinterpret_cast<XMFLOAT4*>( &Color[i] ), pColor[i] );\n        }\n    }\n\n    auto pBC1 = reinterpret_cast<D3DX_BC1 *>(pBC);\n    EncodeBC1(pBC1, Color, true, alphaRef, flags);\n}\n\n\n//-------------------------------------------------------------------------------------\n// BC2 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC2(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC2) == 16, \"D3DX_BC2 should be 16 bytes\" );\n\n    auto pBC2 = reinterpret_cast<const D3DX_BC2 *>(pBC);\n\n    // RGB part\n    DecodeBC1(pColor, &pBC2->bc1, false);\n\n    // 4-bit alpha part\n    DWORD dw = pBC2->bitmap[0];\n\n    for(size_t i = 0; i < 8; ++i, dw >>= 4)\n    {\n        #pragma prefast(suppress:22103, \"writing blocks in two halves confuses tool\")\n        pColor[i] = XMVectorSetW( pColor[i], (float) (dw & 0xf) * (1.0f / 15.0f) );\n    }\n\n    dw = pBC2->bitmap[1];\n\n    for(size_t i = 8; i < NUM_PIXELS_PER_BLOCK; ++i, dw >>= 4)\n        pColor[i] = XMVectorSetW( pColor[i], (float) (dw & 0xf) * (1.0f / 15.0f) );\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC2(uint8_t *pBC, const XMVECTOR *pColor, DWORD flags)\n{\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC2) == 16, \"D3DX_BC2 should be 16 bytes\" );\n\n    HDRColorA Color[NUM_PIXELS_PER_BLOCK];\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        XMStoreFloat4( reinterpret_cast<XMFLOAT4*>( &Color[i] ), pColor[i] );\n    }\n\n    auto pBC2 = reinterpret_cast<D3DX_BC2 *>(pBC);\n\n    // 4-bit alpha part.  Dithered using Floyd Stienberg error diffusion.\n    pBC2->bitmap[0] = 0;\n    pBC2->bitmap[1] = 0;\n\n    float fError[NUM_PIXELS_PER_BLOCK];\n    if (flags & BC_FLAGS_DITHER_A)\n        memset(fError, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(float));\n\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        float fAlph = Color[i].a;\n        if (flags & BC_FLAGS_DITHER_A)\n            fAlph += fError[i];\n\n        uint32_t u = (uint32_t) static_cast<int32_t>(fAlph * 15.0f + 0.5f);\n\n        pBC2->bitmap[i >> 3] >>= 4;\n        pBC2->bitmap[i >> 3] |= (u << 28);\n\n        if (flags & BC_FLAGS_DITHER_A)\n        {     \n            float fDiff = fAlph - (float) u * (1.0f / 15.0f);\n\n            if(3 != (i & 3))\n            {\n                assert( i < 15 );\n                _Analysis_assume_( i < 15 );\n                fError[i + 1] += fDiff * (7.0f / 16.0f);\n            }\n\n            if(i < 12)\n            {\n                if(i & 3)\n                    fError[i + 3] += fDiff * (3.0f / 16.0f);\n\n                fError[i + 4] += fDiff * (5.0f / 16.0f);\n\n                if(3 != (i & 3))\n                {\n                    assert( i < 11 );\n                    _Analysis_assume_( i < 11 );\n                    fError[i + 5] += fDiff * (1.0f / 16.0f);\n                }\n            }\n        }\n    }\n\n    // RGB part\n#ifdef COLOR_WEIGHTS\n    if(!pBC2->bitmap[0] && !pBC2->bitmap[1])\n    {\n        EncodeSolidBC1(pBC2->dxt1, Color);\n        return;\n    }\n#endif // COLOR_WEIGHTS\n\n    EncodeBC1(&pBC2->bc1, Color, false, 0.f, flags);\n}\n\n\n//-------------------------------------------------------------------------------------\n// BC3 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC3(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC3) == 16, \"D3DX_BC3 should be 16 bytes\" );\n\n    auto pBC3 = reinterpret_cast<const D3DX_BC3 *>(pBC);\n\n    // RGB part\n    DecodeBC1(pColor, &pBC3->bc1, false);\n\n    // Adaptive 3-bit alpha part\n    float fAlpha[8];\n\n    fAlpha[0] = ((float) pBC3->alpha[0]) * (1.0f / 255.0f);\n    fAlpha[1] = ((float) pBC3->alpha[1]) * (1.0f / 255.0f);\n\n    if(pBC3->alpha[0] > pBC3->alpha[1]) \n    {\n        for(size_t i = 1; i < 7; ++i)\n            fAlpha[i + 1] = (fAlpha[0] * (7 - i) + fAlpha[1] * i) * (1.0f / 7.0f);\n    }\n    else \n    {\n        for(size_t i = 1; i < 5; ++i)\n            fAlpha[i + 1] = (fAlpha[0] * (5 - i) + fAlpha[1] * i) * (1.0f / 5.0f);\n\n        fAlpha[6] = 0.0f;\n        fAlpha[7] = 1.0f;\n    }\n\n    DWORD dw = pBC3->bitmap[0] | (pBC3->bitmap[1] << 8) | (pBC3->bitmap[2] << 16);\n\n    for(size_t i = 0; i < 8; ++i, dw >>= 3)\n        pColor[i] = XMVectorSetW( pColor[i], fAlpha[dw & 0x7] );\n\n    dw = pBC3->bitmap[3] | (pBC3->bitmap[4] << 8) | (pBC3->bitmap[5] << 16);\n\n    for(size_t i = 8; i < NUM_PIXELS_PER_BLOCK; ++i, dw >>= 3)\n        pColor[i] = XMVectorSetW( pColor[i], fAlpha[dw & 0x7] );\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC3(uint8_t *pBC, const XMVECTOR *pColor, DWORD flags)\n{\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC3) == 16, \"D3DX_BC3 should be 16 bytes\" );\n\n    HDRColorA Color[NUM_PIXELS_PER_BLOCK];\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        XMStoreFloat4( reinterpret_cast<XMFLOAT4*>( &Color[i] ), pColor[i] );\n    }\n\n    auto pBC3 = reinterpret_cast<D3DX_BC3 *>(pBC);\n\n    // Quantize block to A8, using Floyd Stienberg error diffusion.  This \n    // increases the chance that colors will map directly to the quantized \n    // axis endpoints.\n    float fAlpha[NUM_PIXELS_PER_BLOCK];\n    float fError[NUM_PIXELS_PER_BLOCK];\n\n    float fMinAlpha = Color[0].a;\n    float fMaxAlpha = Color[0].a;\n\n    if (flags & BC_FLAGS_DITHER_A)\n        memset(fError, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(float));\n\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        float fAlph = Color[i].a;\n        if (flags & BC_FLAGS_DITHER_A)\n            fAlph += fError[i];\n\n        fAlpha[i] = static_cast<int32_t>(fAlph * 255.0f + 0.5f) * (1.0f / 255.0f);\n\n        if(fAlpha[i] < fMinAlpha)\n            fMinAlpha = fAlpha[i];\n        else if(fAlpha[i] > fMaxAlpha)\n            fMaxAlpha = fAlpha[i];\n    \n        if (flags & BC_FLAGS_DITHER_A)\n        {\n            float fDiff = fAlph - fAlpha[i];\n\n            if(3 != (i & 3))\n            {\n                assert( i < 15 );\n                _Analysis_assume_( i < 15 );\n                fError[i + 1] += fDiff * (7.0f / 16.0f);\n            }\n\n            if(i < 12)\n            {\n                if(i & 3)\n                    fError[i + 3] += fDiff * (3.0f / 16.0f);\n\n                fError[i + 4] += fDiff * (5.0f / 16.0f);\n\n                if(3 != (i & 3))\n                {\n                    assert( i < 11 );\n                    _Analysis_assume_( i < 11 );\n                    fError[i + 5] += fDiff * (1.0f / 16.0f);\n                }\n            }\n        }\n    }\n\n#ifdef COLOR_WEIGHTS\n    if(0.0f == fMaxAlpha)\n    {\n        EncodeSolidBC1(&pBC3->dxt1, Color);\n        pBC3->alpha[0] = 0x00;\n        pBC3->alpha[1] = 0x00;\n        memset(pBC3->bitmap, 0x00, 6);\n    }\n#endif\n\n    // RGB part\n    EncodeBC1(&pBC3->bc1, Color, false, 0.f, flags);\n\n    // Alpha part\n    if(1.0f == fMinAlpha)\n    {\n        pBC3->alpha[0] = 0xff;\n        pBC3->alpha[1] = 0xff;\n        memset(pBC3->bitmap, 0x00, 6);\n        return;\n    }\n\n    // Optimize and Quantize Min and Max values\n    size_t uSteps = ((0.0f == fMinAlpha) || (1.0f == fMaxAlpha)) ? 6 : 8;\n\n    float fAlphaA, fAlphaB;\n    OptimizeAlpha<false>(&fAlphaA, &fAlphaB, fAlpha, uSteps);\n\n    uint8_t bAlphaA = (uint8_t) static_cast<int32_t>(fAlphaA * 255.0f + 0.5f);\n    uint8_t bAlphaB = (uint8_t) static_cast<int32_t>(fAlphaB * 255.0f + 0.5f);\n\n    fAlphaA = (float) bAlphaA * (1.0f / 255.0f);\n    fAlphaB = (float) bAlphaB * (1.0f / 255.0f);\n\n    // Setup block\n    if((8 == uSteps) && (bAlphaA == bAlphaB))\n    {\n        pBC3->alpha[0] = bAlphaA;\n        pBC3->alpha[1] = bAlphaB;\n        memset(pBC3->bitmap, 0x00, 6);\n        return;\n    }\n\n    static const size_t pSteps6[] = { 0, 2, 3, 4, 5, 1 };\n    static const size_t pSteps8[] = { 0, 2, 3, 4, 5, 6, 7, 1 };\n\n    const size_t *pSteps;\n    float fStep[8];\n\n    if(6 == uSteps)\n    {\n        pBC3->alpha[0] = bAlphaA;\n        pBC3->alpha[1] = bAlphaB;\n\n        fStep[0] = fAlphaA;\n        fStep[1] = fAlphaB;\n\n        for(size_t i = 1; i < 5; ++i)\n            fStep[i + 1] = (fStep[0] * (5 - i) + fStep[1] * i) * (1.0f / 5.0f);\n\n        fStep[6] = 0.0f;\n        fStep[7] = 1.0f;\n\n        pSteps = pSteps6;\n    }\n    else\n    {\n        pBC3->alpha[0] = bAlphaB;\n        pBC3->alpha[1] = bAlphaA;\n\n        fStep[0] = fAlphaB;\n        fStep[1] = fAlphaA;\n\n        for(size_t i = 1; i < 7; ++i)\n            fStep[i + 1] = (fStep[0] * (7 - i) + fStep[1] * i) * (1.0f / 7.0f);\n\n        pSteps = pSteps8;\n    }\n\n    // Encode alpha bitmap\n    float fSteps = (float) (uSteps - 1);\n    float fScale = (fStep[0] != fStep[1]) ? (fSteps / (fStep[1] - fStep[0])) : 0.0f;\n\n    if (flags & BC_FLAGS_DITHER_A)\n        memset(fError, 0x00, NUM_PIXELS_PER_BLOCK * sizeof(float));\n\n    for(size_t iSet = 0; iSet < 2; iSet++)\n    {\n        uint32_t dw = 0;\n\n        size_t iMin = iSet * 8;\n        size_t iLim = iMin + 8;\n\n        for(size_t i = iMin; i < iLim; ++i)\n        {\n            float fAlph = Color[i].a;\n            if (flags & BC_FLAGS_DITHER_A)\n                fAlph += fError[i];\n            float fDot = (fAlph - fStep[0]) * fScale;\n\n            uint32_t iStep;\n            if(fDot <= 0.0f)\n                iStep = ((6 == uSteps) && (fAlph <= fStep[0] * 0.5f)) ? 6 : 0;\n            else if(fDot >= fSteps)\n                iStep = ((6 == uSteps) && (fAlph >= (fStep[1] + 1.0f) * 0.5f)) ? 7 : 1;\n            else\n                iStep = static_cast<uint32_t>( pSteps[static_cast<size_t>(fDot + 0.5f)] );\n\n            dw = (iStep << 21) | (dw >> 3);\n\n            if (flags & BC_FLAGS_DITHER_A)\n            {\n                float fDiff = (fAlph - fStep[iStep]);\n\n                if(3 != (i & 3))\n                    fError[i + 1] += fDiff * (7.0f / 16.0f);\n\n                if(i < 12)\n                {\n                    if(i & 3)\n                        fError[i + 3] += fDiff * (3.0f / 16.0f);\n\n                    fError[i + 4] += fDiff * (5.0f / 16.0f);\n\n                    if(3 != (i & 3))\n                        fError[i + 5] += fDiff * (1.0f / 16.0f);\n                }\n            }\n        }\n\n        pBC3->bitmap[0 + iSet * 3] = ((uint8_t *) &dw)[0];\n        pBC3->bitmap[1 + iSet * 3] = ((uint8_t *) &dw)[1];\n        pBC3->bitmap[2 + iSet * 3] = ((uint8_t *) &dw)[2];\n    }\n}\n\n} // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BC.h",
    "content": "//-------------------------------------------------------------------------------------\n// BC.h\n//  \n// Block-compression (BC) functionality\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//  \n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n#include <assert.h>\n#include <directxmath.h>\n#include <directxpackedvector.h>\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Constants\n//-------------------------------------------------------------------------------------\n\nconst uint16_t F16S_MASK    = 0x8000;   // f16 sign mask\nconst uint16_t F16EM_MASK   = 0x7fff;   // f16 exp & mantissa mask\nconst uint16_t F16MAX       = 0x7bff;   // MAXFLT bit pattern for XMHALF\n\n#define SIGN_EXTEND(x,nb) ((((x)&(1<<((nb)-1)))?((~0)<<(nb)):0)|(x))\n\n// Because these are used in SAL annotations, they need to remain macros rather than const values\n#define NUM_PIXELS_PER_BLOCK 16\n#define BC6H_MAX_REGIONS 2\n#define BC6H_MAX_INDICES 16\n#define BC7_MAX_REGIONS 3\n#define BC7_MAX_INDICES 16\n\nconst size_t BC6H_NUM_CHANNELS = 3;\nconst size_t BC6H_MAX_SHAPES = 32;\n\nconst size_t BC7_NUM_CHANNELS = 4;\nconst size_t BC7_MAX_SHAPES = 64;\n\nconst int32_t BC67_WEIGHT_MAX = 64;\nconst uint32_t BC67_WEIGHT_SHIFT = 6;\nconst int32_t BC67_WEIGHT_ROUND = 32;\n\nextern const int g_aWeights2[4];\nextern const int g_aWeights3[8];\nextern const int g_aWeights4[16];\n\nenum BC_FLAGS\n{\n    BC_FLAGS_NONE       = 0x0,\n    BC_FLAGS_DITHER_RGB = 0x10000,  // Enables dithering for RGB colors for BC1-3\n    BC_FLAGS_DITHER_A   = 0x20000,  // Enables dithering for Alpha channel for BC1-3\n    BC_FLAGS_UNIFORM    = 0x40000,  // By default, uses perceptual weighting for BC1-3; this flag makes it a uniform weighting\n    BC_FLAGS_USE_3SUBSETS = 0x80000,// By default, BC7 skips mode 0 & 2; this flag adds those modes back\n};\n\n//-------------------------------------------------------------------------------------\n// Structures\n//-------------------------------------------------------------------------------------\nclass HDRColorA;\n\nclass LDRColorA\n{\npublic:\n    uint8_t r, g, b, a;\n\n    LDRColorA() DIRECTX_CTOR_DEFAULT\n    LDRColorA(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) : r(_r), g(_g), b(_b), a(_a) {}\n\n    const uint8_t& operator [] (_In_range_(0,3) size_t uElement) const\n    {\n        switch(uElement)\n        {\n        case 0: return r;\n        case 1: return g;\n        case 2: return b;\n        case 3: return a;\n        default: assert(false); return r;\n        }\n    }\n\n    uint8_t& operator [] (_In_range_(0,3) size_t uElement)\n    {\n        switch(uElement)\n        {\n        case 0: return r;\n        case 1: return g;\n        case 2: return b;\n        case 3: return a;\n        default: assert(false); return r;\n        }\n    }\n\n    LDRColorA operator = (_In_ const HDRColorA& c);\n\n    static void InterpolateRGB(_In_ const LDRColorA& c0, _In_ const LDRColorA& c1, _In_ size_t wc, _In_ _In_range_(2, 4) size_t wcprec, _Out_ LDRColorA& out)\n    {\n        const int* aWeights = nullptr;\n        switch(wcprec)\n        {\n        case 2: aWeights = g_aWeights2; assert( wc < 4 ); _Analysis_assume_( wc < 4 ); break;\n        case 3: aWeights = g_aWeights3; assert( wc < 8 ); _Analysis_assume_( wc < 8 ); break;\n        case 4: aWeights = g_aWeights4; assert( wc < 16 ); _Analysis_assume_( wc < 16 ); break;\n        default: assert(false); out.r = out.g = out.b = 0; return;\n        }\n        out.r = uint8_t((uint32_t(c0.r) * uint32_t(BC67_WEIGHT_MAX - aWeights[wc]) + uint32_t(c1.r) * uint32_t(aWeights[wc]) + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT);\n        out.g = uint8_t((uint32_t(c0.g) * uint32_t(BC67_WEIGHT_MAX - aWeights[wc]) + uint32_t(c1.g) * uint32_t(aWeights[wc]) + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT);\n        out.b = uint8_t((uint32_t(c0.b) * uint32_t(BC67_WEIGHT_MAX - aWeights[wc]) + uint32_t(c1.b) * uint32_t(aWeights[wc]) + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT);\n    }\n\n    static void InterpolateA(_In_ const LDRColorA& c0, _In_ const LDRColorA& c1, _In_ size_t wa, _In_range_(2, 4) _In_ size_t waprec, _Out_ LDRColorA& out)\n    {\n        const int* aWeights = nullptr;\n        switch(waprec)\n        {\n        case 2: aWeights = g_aWeights2; assert( wa < 4 ); _Analysis_assume_( wa < 4 ); break;\n        case 3: aWeights = g_aWeights3; assert( wa < 8 ); _Analysis_assume_( wa < 8 ); break;\n        case 4: aWeights = g_aWeights4; assert( wa < 16 ); _Analysis_assume_( wa < 16 ); break;\n        default: assert(false); out.a = 0; return;\n        }\n        out.a = uint8_t((uint32_t(c0.a) * uint32_t(BC67_WEIGHT_MAX - aWeights[wa]) + uint32_t(c1.a) * uint32_t(aWeights[wa]) + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT);\n    }\n\n    static void Interpolate(_In_ const LDRColorA& c0, _In_ const LDRColorA& c1, _In_ size_t wc, _In_ size_t wa, _In_ _In_range_(2, 4) size_t wcprec, _In_ _In_range_(2, 4) size_t waprec, _Out_ LDRColorA& out)\n    {\n        InterpolateRGB(c0, c1, wc, wcprec, out);\n        InterpolateA(c0, c1, wa, waprec, out);\n    }\n};\n\nstatic_assert( sizeof(LDRColorA) == 4, \"Unexpected packing\");\n\nclass HDRColorA\n{\npublic:\n    float r, g, b, a;\n\npublic:\n    HDRColorA() DIRECTX_CTOR_DEFAULT\n    HDRColorA(float _r, float _g, float _b, float _a) : r(_r), g(_g), b(_b), a(_a) {}\n    HDRColorA(const HDRColorA& c) : r(c.r), g(c.g), b(c.b), a(c.a) {}\n    HDRColorA(const LDRColorA& c)\n    {\n        r = float(c.r) * (1.0f/255.0f);\n        g = float(c.g) * (1.0f/255.0f);\n        b = float(c.b) * (1.0f/255.0f);\n        a = float(c.a) * (1.0f/255.0f);\n    }\n\n    // binary operators\n    HDRColorA operator + ( _In_ const HDRColorA& c ) const\n    {\n        return HDRColorA(r + c.r, g + c.g, b + c.b, a + c.a);\n    }\n\n    HDRColorA operator - ( _In_ const HDRColorA& c ) const\n    {\n        return HDRColorA(r - c.r, g - c.g, b - c.b, a - c.a);\n    }\n\n    HDRColorA operator * ( _In_ float f ) const\n    {\n        return HDRColorA(r * f, g * f, b * f, a * f);\n    }\n\n    HDRColorA operator / ( _In_ float f ) const\n    {\n        float fInv = 1.0f / f;\n        return HDRColorA(r * fInv, g * fInv, b * fInv, a * fInv);\n    }\n\n    float operator * ( _In_ const HDRColorA& c ) const\n    {\n        return r * c.r + g * c.g + b * c.b + a * c.a;\n    }\n\n    // assignment operators\n    HDRColorA& operator += ( _In_ const HDRColorA& c )\n    {\n        r += c.r;\n        g += c.g;\n        b += c.b;\n        a += c.a;\n        return *this;\n    }\n    \n    HDRColorA& operator -= ( _In_ const HDRColorA& c )\n    {\n        r -= c.r;\n        g -= c.g;\n        b -= c.b;\n        a -= c.a;\n        return *this;\n    }\n    \n    HDRColorA& operator *= ( _In_ float f )\n    {\n        r *= f;\n        g *= f;\n        b *= f;\n        a *= f;\n        return *this;\n    }\n    \n    HDRColorA& operator /= ( _In_ float f )\n    {\n        float fInv = 1.0f / f;\n        r *= fInv;\n        g *= fInv;\n        b *= fInv;\n        a *= fInv;\n        return *this;\n    }\n\n    HDRColorA& operator = (_In_ const LDRColorA& c)\n    {\n        r = (float) c.r;\n        g = (float) c.g;\n        b = (float) c.b;\n        a = (float) c.a;\n        return *this;\n    }\n\n    HDRColorA& Clamp(_In_ float fMin, _In_ float fMax)\n    {\n        r = std::min<float>(fMax, std::max<float>(fMin, r));\n        g = std::min<float>(fMax, std::max<float>(fMin, g));\n        b = std::min<float>(fMax, std::max<float>(fMin, b));\n        a = std::min<float>(fMax, std::max<float>(fMin, a));\n        return *this;\n    }\n\n    LDRColorA ToLDRColorA() const\n    {\n        return LDRColorA((uint8_t) (r + 0.01f), (uint8_t) (g + 0.01f), (uint8_t) (b + 0.01f), (uint8_t) (a + 0.01f));\n    }\n};\n\ninline LDRColorA LDRColorA::operator = (_In_ const HDRColorA& c)\n{\n    LDRColorA ret;\n    HDRColorA tmp(c);\n    tmp = tmp.Clamp(0.0f, 1.0f) * 255.0f;\n    ret.r = uint8_t(tmp.r + 0.001f);\n    ret.g = uint8_t(tmp.g + 0.001f);\n    ret.b = uint8_t(tmp.b + 0.001f);\n    ret.a = uint8_t(tmp.a + 0.001f);\n    return ret;\n}\n\nstruct LDREndPntPair\n{\n    LDRColorA A;\n    LDRColorA B;\n};\n\nstruct HDREndPntPair\n{\n    HDRColorA A;\n    HDRColorA B;\n};\n\ninline HDRColorA* HDRColorALerp(_Out_ HDRColorA *pOut, _In_ const HDRColorA *pC1, _In_ const HDRColorA *pC2, _In_ float s)\n{\n    pOut->r = pC1->r + s * (pC2->r - pC1->r);\n    pOut->g = pC1->g + s * (pC2->g - pC1->g);\n    pOut->b = pC1->b + s * (pC2->b - pC1->b);\n    pOut->a = pC1->a + s * (pC2->a - pC1->a);\n    return pOut;\n}\n\n#pragma pack(push,1)\n// BC1/DXT1 compression (4 bits per texel)\nstruct D3DX_BC1\n{\n    uint16_t    rgb[2]; // 565 colors\n    uint32_t    bitmap; // 2bpp rgb bitmap\n};\n\n// BC2/DXT2/3 compression (8 bits per texel)\nstruct D3DX_BC2\n{\n    uint32_t    bitmap[2];  // 4bpp alpha bitmap\n    D3DX_BC1    bc1;        // BC1 rgb data\n};\n\n// BC3/DXT4/5 compression (8 bits per texel)\nstruct D3DX_BC3\n{\n    uint8_t     alpha[2];   // alpha values\n    uint8_t     bitmap[6];  // 3bpp alpha bitmap\n    D3DX_BC1    bc1;        // BC1 rgb data\n};\n#pragma pack(pop)\n\nclass INTColor\n{\npublic:\n    int r, g, b;\n    int pad;\n\npublic:\n    INTColor() DIRECTX_CTOR_DEFAULT\n    INTColor(int nr, int ng, int nb) {r = nr; g = ng; b = nb;}\n    INTColor(const INTColor& c) {r = c.r; g = c.g; b = c.b;}\n\n    INTColor operator - ( _In_ const INTColor& c ) const\n    {\n        return INTColor(r - c.r, g - c.g, b - c.b);\n    }\n\n    INTColor& operator += ( _In_ const INTColor& c )\n    {\n        r += c.r;\n        g += c.g;\n        b += c.b;\n        return *this;\n    }\n\n    INTColor& operator -= ( _In_ const INTColor& c )\n    {\n        r -= c.r;\n        g -= c.g;\n        b -= c.b;\n        return *this;\n    }\n\n    INTColor& operator &= ( _In_ const INTColor& c )\n    {\n        r &= c.r;\n        g &= c.g;\n        b &= c.b;\n        return *this;\n    }\n\n    int& operator [] ( _In_ uint8_t i )\n    {\n        assert(i < sizeof(INTColor) / sizeof(int));\n        _Analysis_assume_(i < sizeof(INTColor) / sizeof(int));\n        return ((int*) this)[i];\n    }\n\n    void Set(_In_ const HDRColorA& c, _In_ bool bSigned)\n    {\n        PackedVector::XMHALF4 aF16;\n\n        XMVECTOR v = XMLoadFloat4( (const XMFLOAT4*)& c );\n        XMStoreHalf4( &aF16, v );\n\n        r = F16ToINT(aF16.x, bSigned);\n        g = F16ToINT(aF16.y, bSigned);\n        b = F16ToINT(aF16.z, bSigned);\n    }\n\n    INTColor& Clamp(_In_ int iMin, _In_ int iMax)\n    {\n        r = std::min<int>(iMax, std::max<int>(iMin, r));\n        g = std::min<int>(iMax, std::max<int>(iMin, g));\n        b = std::min<int>(iMax, std::max<int>(iMin, b));\n        return *this;\n    }\n\n    INTColor& SignExtend(_In_ const LDRColorA& Prec)\n    {\n        r = SIGN_EXTEND(r, Prec.r);\n        g = SIGN_EXTEND(g, Prec.g);\n        b = SIGN_EXTEND(b, Prec.b);\n        return *this;\n    }\n\n    void ToF16(_Out_writes_(3) PackedVector::HALF aF16[3], _In_ bool bSigned) const\n    {\n        aF16[0] = INT2F16(r, bSigned);\n        aF16[1] = INT2F16(g, bSigned);\n        aF16[2] = INT2F16(b, bSigned);\n    }\n\nprivate:\n    static int F16ToINT(_In_ const PackedVector::HALF& f, _In_ bool bSigned)\n    {\n        uint16_t input = *((const uint16_t*) &f);\n        int out, s;\n        if(bSigned)\n        {\n            s = input & F16S_MASK;\n            input &= F16EM_MASK;\n            if(input > F16MAX) out = F16MAX;\n            else out = input;\n            out = s ? -out : out;\n        }\n        else\n        {\n            if(input & F16S_MASK) out = 0;\n            else out = input;\n        }\n        return out;\n    }\n\n    static PackedVector::HALF INT2F16(_In_ int input, _In_ bool bSigned)\n    {\n        PackedVector::HALF h;\n        uint16_t out;\n        if(bSigned)\n        {\n            int s = 0;\n            if(input < 0)\n            {\n                s = F16S_MASK;\n                input = -input;\n            }\n            out = uint16_t(s | input);\n        }\n        else\n        {\n            assert(input >= 0 && input <= F16MAX);\n            out = (uint16_t) input;\n        }\n\n        *((uint16_t*) &h) = out;\n        return h;\n    }\n};\n\nstatic_assert( sizeof(INTColor) == 16, \"Unexpected packing\");\n\nstruct INTEndPntPair\n{\n    INTColor A;\n    INTColor B;\n};\n\ntemplate< size_t SizeInBytes >\nclass CBits\n{\npublic:\n    uint8_t GetBit(_Inout_ size_t& uStartBit) const\n    {\n        assert(uStartBit < 128);\n        _Analysis_assume_(uStartBit < 128);\n        size_t uIndex = uStartBit >> 3;\n        uint8_t ret = (m_uBits[uIndex] >> (uStartBit - (uIndex << 3))) & 0x01;\n        uStartBit++;\n        return ret;\n    }\n\n    uint8_t GetBits(_Inout_ size_t& uStartBit, _In_ size_t uNumBits) const\n    {\n        if(uNumBits == 0) return 0;\n        assert(uStartBit + uNumBits <= 128 && uNumBits <= 8);\n        _Analysis_assume_(uStartBit + uNumBits <= 128 && uNumBits <= 8);\n        uint8_t ret;\n        size_t uIndex = uStartBit >> 3;\n        size_t uBase = uStartBit - (uIndex << 3);\n        if(uBase + uNumBits > 8)\n        {\n            size_t uFirstIndexBits = 8 - uBase;\n            size_t uNextIndexBits = uNumBits - uFirstIndexBits;\n            ret = (m_uBits[uIndex] >> uBase) | ((m_uBits[uIndex+1] & ((1 << uNextIndexBits) - 1)) << uFirstIndexBits);\n        }\n        else\n        {\n            ret = (m_uBits[uIndex] >> uBase) & ((1 << uNumBits) - 1);\n        }\n        assert(ret < (1 << uNumBits));\n        uStartBit += uNumBits;\n        return ret;\n    }\n\n    void SetBit(_Inout_ size_t& uStartBit, _In_ uint8_t uValue)\n    {\n        assert(uStartBit < 128 && uValue < 2);\n        _Analysis_assume_(uStartBit < 128 && uValue < 2);\n        size_t uIndex = uStartBit >> 3;\n        size_t uBase = uStartBit - (uIndex << 3);\n        m_uBits[uIndex] &= ~(1 << uBase);\n        m_uBits[uIndex] |= uValue << uBase;\n        uStartBit++;\n    }\n\n    void SetBits(_Inout_ size_t& uStartBit, _In_ size_t uNumBits, _In_ uint8_t uValue)\n    {\n        if(uNumBits == 0)\n            return;\n        assert(uStartBit + uNumBits <= 128 && uNumBits <= 8);\n        _Analysis_assume_(uStartBit + uNumBits <= 128 && uNumBits <= 8);\n        assert(uValue < (1 << uNumBits));\n        size_t uIndex = uStartBit >> 3;\n        size_t uBase = uStartBit - (uIndex << 3);\n        if(uBase + uNumBits > 8)\n        {\n            size_t uFirstIndexBits = 8 - uBase;\n            size_t uNextIndexBits = uNumBits - uFirstIndexBits;\n            m_uBits[uIndex] &= ~(((1 << uFirstIndexBits) - 1) << uBase);\n            m_uBits[uIndex] |= uValue << uBase;\n            m_uBits[uIndex+1] &= ~((1 << uNextIndexBits) - 1);\n            m_uBits[uIndex+1] |= uValue >> uFirstIndexBits;\n        }\n        else\n        {\n            m_uBits[uIndex] &= ~(((1 << uNumBits) - 1) << uBase);\n            m_uBits[uIndex] |= uValue << uBase;\n        }\n        uStartBit += uNumBits;\n    }\n\nprivate:\n    uint8_t m_uBits[ SizeInBytes ];\n};\n\n// BC6H compression (16 bits per texel)\nclass D3DX_BC6H : private CBits< 16 >\n{\npublic:\n    void Decode(_In_ bool bSigned, _Out_writes_(NUM_PIXELS_PER_BLOCK) HDRColorA* pOut) const;\n    void Encode(_In_ bool bSigned, _In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA* const pIn);\n\nprivate:\n#pragma warning(push)\n#pragma warning(disable : 4480)\n    enum EField : uint8_t\n    {\n        NA, // N/A\n        M,  // Mode\n        D,  // Shape\n        RW,\n        RX,\n        RY,\n        RZ,\n        GW,\n        GX,\n        GY,\n        GZ,\n        BW,\n        BX,\n        BY,\n        BZ,\n    };\n#pragma warning(pop)\n\n    struct ModeDescriptor\n    {\n        EField m_eField;\n        uint8_t   m_uBit;\n    };\n\n    struct ModeInfo\n    {\n        uint8_t uMode;\n        uint8_t uPartitions;\n        bool bTransformed;\n        uint8_t uIndexPrec;\n        LDRColorA RGBAPrec[BC6H_MAX_REGIONS][2];\n    };\n\n#pragma warning(push)\n#pragma warning(disable : 4512)\n    struct EncodeParams\n    {\n        float fBestErr;\n        const bool bSigned;\n        uint8_t uMode;\n        uint8_t uShape;\n        const HDRColorA* const aHDRPixels;\n        INTEndPntPair aUnqEndPts[BC6H_MAX_SHAPES][BC6H_MAX_REGIONS];\n        INTColor aIPixels[NUM_PIXELS_PER_BLOCK];\n\n        EncodeParams(const HDRColorA* const aOriginal, bool bSignedFormat) :\n            aHDRPixels(aOriginal), fBestErr(FLT_MAX), bSigned(bSignedFormat)\n        {\n            for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n            {\n                aIPixels[i].Set(aOriginal[i], bSigned);\n            }\n        }\n    };\n#pragma warning(pop)\n\n    static int Quantize(_In_ int iValue, _In_ int prec, _In_ bool bSigned);\n    static int Unquantize(_In_ int comp, _In_ uint8_t uBitsPerComp, _In_ bool bSigned);\n    static int FinishUnquantize(_In_ int comp, _In_ bool bSigned);\n\n    static bool EndPointsFit(_In_ const EncodeParams* pEP, _In_reads_(BC6H_MAX_REGIONS) const INTEndPntPair aEndPts[]);\n\n    void GeneratePaletteQuantized(_In_ const EncodeParams* pEP, _In_ const INTEndPntPair& endPts,\n                                  _Out_writes_(BC6H_MAX_INDICES) INTColor aPalette[]) const;\n    float MapColorsQuantized(_In_ const EncodeParams* pEP, _In_reads_(np) const INTColor aColors[], _In_ size_t np, _In_ const INTEndPntPair &endPts) const;\n    float PerturbOne(_In_ const EncodeParams* pEP, _In_reads_(np) const INTColor aColors[], _In_ size_t np, _In_ uint8_t ch,\n                     _In_ const INTEndPntPair& oldEndPts, _Out_ INTEndPntPair& newEndPts, _In_ float fOldErr, _In_ int do_b) const;\n    void OptimizeOne(_In_ const EncodeParams* pEP, _In_reads_(np) const INTColor aColors[], _In_ size_t np, _In_ float aOrgErr,\n                     _In_ const INTEndPntPair &aOrgEndPts, _Out_ INTEndPntPair &aOptEndPts) const;\n    void OptimizeEndPoints(_In_ const EncodeParams* pEP, _In_reads_(BC6H_MAX_REGIONS) const float aOrgErr[],\n                           _In_reads_(BC6H_MAX_REGIONS) const INTEndPntPair aOrgEndPts[],\n                           _Out_writes_all_(BC6H_MAX_REGIONS) INTEndPntPair aOptEndPts[]) const;\n    static void SwapIndices(_In_ const EncodeParams* pEP, _Inout_updates_all_(BC6H_MAX_REGIONS) INTEndPntPair aEndPts[],\n                            _In_reads_(NUM_PIXELS_PER_BLOCK) size_t aIndices[]);\n    void AssignIndices(_In_ const EncodeParams* pEP, _In_reads_(BC6H_MAX_REGIONS) const INTEndPntPair aEndPts[],\n                        _Out_writes_(NUM_PIXELS_PER_BLOCK) size_t aIndices[],\n                        _Out_writes_(BC6H_MAX_REGIONS) float aTotErr[]) const;\n    void QuantizeEndPts(_In_ const EncodeParams* pEP, _Out_writes_(BC6H_MAX_REGIONS) INTEndPntPair* qQntEndPts) const;\n    void EmitBlock(_In_ const EncodeParams* pEP, _In_reads_(BC6H_MAX_REGIONS) const INTEndPntPair aEndPts[],\n                   _In_reads_(NUM_PIXELS_PER_BLOCK) const size_t aIndices[]);\n    void Refine(_Inout_ EncodeParams* pEP);\n\n    static void GeneratePaletteUnquantized(_In_ const EncodeParams* pEP, _In_ size_t uRegion, _Out_writes_(BC6H_MAX_INDICES) INTColor aPalette[]);\n    float MapColors(_In_ const EncodeParams* pEP, _In_ size_t uRegion, _In_ size_t np, _In_reads_(np) const size_t* auIndex) const;\n    float RoughMSE(_Inout_ EncodeParams* pEP) const;\n\nprivate:\n    const static ModeDescriptor ms_aDesc[][82];\n    const static ModeInfo ms_aInfo[];\n    const static int ms_aModeToInfo[];\n};\n\n// BC67 compression (16b bits per texel)\nclass D3DX_BC7 : private CBits< 16 >\n{\npublic:\n    void Decode(_Out_writes_(NUM_PIXELS_PER_BLOCK) HDRColorA* pOut) const;\n    void Encode(bool skip3subsets, _In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA* const pIn);\n\nprivate:\n    struct ModeInfo\n    {\n        uint8_t uPartitions;\n        uint8_t uPartitionBits;\n        uint8_t uPBits;\n        uint8_t uRotationBits;\n        uint8_t uIndexModeBits;\n        uint8_t uIndexPrec;\n        uint8_t uIndexPrec2;\n        LDRColorA RGBAPrec;\n        LDRColorA RGBAPrecWithP;\n    };\n\n#pragma warning(push)\n#pragma warning(disable : 4512)\n    struct EncodeParams\n    {\n        uint8_t uMode;\n        LDREndPntPair aEndPts[BC7_MAX_SHAPES][BC7_MAX_REGIONS];\n        LDRColorA aLDRPixels[NUM_PIXELS_PER_BLOCK];\n        const HDRColorA* const aHDRPixels;\n\n        EncodeParams(const HDRColorA* const aOriginal) : aHDRPixels(aOriginal) {}\n    };\n#pragma warning(pop)\n\n    static uint8_t Quantize(_In_ uint8_t comp, _In_ uint8_t uPrec)\n    {\n        assert(0 < uPrec && uPrec <= 8);\n        uint8_t rnd = (uint8_t) std::min<uint16_t>(255, uint16_t(comp) + (1 << (7 - uPrec)));\n        return rnd >> (8 - uPrec);\n    }\n\n    static LDRColorA Quantize(_In_ const LDRColorA& c, _In_ const LDRColorA& RGBAPrec)\n    {\n        LDRColorA q;\n        q.r = Quantize(c.r, RGBAPrec.r);\n        q.g = Quantize(c.g, RGBAPrec.g);\n        q.b = Quantize(c.b, RGBAPrec.b);\n        if(RGBAPrec.a)\n            q.a = Quantize(c.a, RGBAPrec.a);\n        else\n            q.a = 255;\n        return q;\n    }\n\n    static uint8_t Unquantize(_In_ uint8_t comp, _In_ size_t uPrec)\n    {\n        assert(0 < uPrec && uPrec <= 8);\n        comp = comp << (8 - uPrec);\n        return comp | (comp >> uPrec);\n    }\n\n    static LDRColorA Unquantize(_In_ const LDRColorA& c, _In_ const LDRColorA& RGBAPrec)\n    {\n        LDRColorA q;\n        q.r = Unquantize(c.r, RGBAPrec.r);\n        q.g = Unquantize(c.g, RGBAPrec.g);\n        q.b = Unquantize(c.b, RGBAPrec.b);\n        q.a = RGBAPrec.a > 0 ? Unquantize(c.a, RGBAPrec.a) : 255;\n        return q;\n    }\n\n    void GeneratePaletteQuantized(_In_ const EncodeParams* pEP, _In_ size_t uIndexMode, _In_ const LDREndPntPair& endpts,\n                                  _Out_writes_(BC7_MAX_INDICES) LDRColorA aPalette[]) const;\n    float PerturbOne(_In_ const EncodeParams* pEP, _In_reads_(np) const LDRColorA colors[], _In_ size_t np, _In_ size_t uIndexMode,\n                     _In_ size_t ch, _In_ const LDREndPntPair &old_endpts,\n                     _Out_ LDREndPntPair &new_endpts, _In_ float old_err, _In_ uint8_t do_b) const;\n    void Exhaustive(_In_ const EncodeParams* pEP, _In_reads_(np) const LDRColorA aColors[], _In_ size_t np, _In_ size_t uIndexMode,\n                    _In_ size_t ch, _Inout_ float& fOrgErr, _Inout_ LDREndPntPair& optEndPt) const;\n    void OptimizeOne(_In_ const EncodeParams* pEP, _In_reads_(np) const LDRColorA colors[], _In_ size_t np, _In_ size_t uIndexMode,\n                     _In_ float orig_err, _In_ const LDREndPntPair &orig_endpts, _Out_ LDREndPntPair &opt_endpts) const;\n    void OptimizeEndPoints(_In_ const EncodeParams* pEP, _In_ size_t uShape, _In_ size_t uIndexMode,\n                           _In_reads_(BC7_MAX_REGIONS) const float orig_err[],\n                           _In_reads_(BC7_MAX_REGIONS) const LDREndPntPair orig_endpts[],\n                           _Out_writes_(BC7_MAX_REGIONS) LDREndPntPair opt_endpts[]) const;\n    void AssignIndices(_In_ const EncodeParams* pEP, _In_ size_t uShape, _In_ size_t uIndexMode,\n                       _In_reads_(BC7_MAX_REGIONS) LDREndPntPair endpts[],\n                       _Out_writes_(NUM_PIXELS_PER_BLOCK) size_t aIndices[], _Out_writes_(NUM_PIXELS_PER_BLOCK) size_t aIndices2[],\n                       _Out_writes_(BC7_MAX_REGIONS) float afTotErr[]) const;\n    void EmitBlock(_In_ const EncodeParams* pEP, _In_ size_t uShape, _In_ size_t uRotation, _In_ size_t uIndexMode,\n                   _In_reads_(BC7_MAX_REGIONS) const LDREndPntPair aEndPts[],\n                   _In_reads_(NUM_PIXELS_PER_BLOCK) const size_t aIndex[],\n                   _In_reads_(NUM_PIXELS_PER_BLOCK) const size_t aIndex2[]);\n    float Refine(_In_ const EncodeParams* pEP, _In_ size_t uShape, _In_ size_t uRotation, _In_ size_t uIndexMode);\n\n    float MapColors(_In_ const EncodeParams* pEP, _In_reads_(np) const LDRColorA aColors[], _In_ size_t np, _In_ size_t uIndexMode,\n                    _In_ const LDREndPntPair& endPts, _In_ float fMinErr) const;\n    static float RoughMSE(_Inout_ EncodeParams* pEP, _In_ size_t uShape, _In_ size_t uIndexMode);\n\nprivate:\n    const static ModeInfo ms_aInfo[];\n};\n\n//-------------------------------------------------------------------------------------\n#pragma warning(push)\n#pragma warning(disable : 4127)\ntemplate <bool bRange> void OptimizeAlpha(float *pX, float *pY, const float *pPoints, size_t cSteps)\n{\n    static const float pC6[] = { 5.0f/5.0f, 4.0f/5.0f, 3.0f/5.0f, 2.0f/5.0f, 1.0f/5.0f, 0.0f/5.0f };\n    static const float pD6[] = { 0.0f/5.0f, 1.0f/5.0f, 2.0f/5.0f, 3.0f/5.0f, 4.0f/5.0f, 5.0f/5.0f };\n    static const float pC8[] = { 7.0f/7.0f, 6.0f/7.0f, 5.0f/7.0f, 4.0f/7.0f, 3.0f/7.0f, 2.0f/7.0f, 1.0f/7.0f, 0.0f/7.0f };\n    static const float pD8[] = { 0.0f/7.0f, 1.0f/7.0f, 2.0f/7.0f, 3.0f/7.0f, 4.0f/7.0f, 5.0f/7.0f, 6.0f/7.0f, 7.0f/7.0f };\n\n    const float *pC = (6 == cSteps) ? pC6 : pC8;\n    const float *pD = (6 == cSteps) ? pD6 : pD8;\n\n    float MAX_VALUE = 1.0f;\n    float MIN_VALUE;\n    if (bRange)\n    {\n        MIN_VALUE = -1.0f;\n    }\n    else\n    {\n        MIN_VALUE = 0.0f;\n    }\n\n    // Find Min and Max points, as starting point\n    float fX = MAX_VALUE;\n    float fY = MIN_VALUE;\n\n    if(8 == cSteps)\n    {\n        for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n        {\n            if(pPoints[iPoint] < fX)\n                fX = pPoints[iPoint];\n    \n            if(pPoints[iPoint] > fY)\n                fY = pPoints[iPoint];\n        }\n    }\n    else\n    {\n        for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n        {\n            if(pPoints[iPoint] < fX && pPoints[iPoint] > MIN_VALUE)\n                fX = pPoints[iPoint];\n    \n            if(pPoints[iPoint] > fY && pPoints[iPoint] < MAX_VALUE)\n                fY = pPoints[iPoint];\n        }\n\n        if (fX == fY)\n        {\n            fY = MAX_VALUE;\n        }\n    }\n\n    // Use Newton's Method to find local minima of sum-of-squares error.\n    float fSteps = (float) (cSteps - 1);\n\n    for(size_t iIteration = 0; iIteration < 8; iIteration++)\n    {\n        float fScale;\n\n        if((fY - fX) < (1.0f / 256.0f))\n            break;\n        \n        fScale = fSteps / (fY - fX);\n\n        // Calculate new steps\n        float pSteps[8];\n\n        for(size_t iStep = 0; iStep < cSteps; iStep++)\n            pSteps[iStep] = pC[iStep] * fX + pD[iStep] * fY;\n\n        if(6 == cSteps)\n        {\n            pSteps[6] = MIN_VALUE;\n            pSteps[7] = MAX_VALUE;\n        }\n\n        // Evaluate function, and derivatives\n        float dX  = 0.0f;\n        float dY  = 0.0f;\n        float d2X = 0.0f;\n        float d2Y = 0.0f;\n\n        for(size_t iPoint = 0; iPoint < NUM_PIXELS_PER_BLOCK; iPoint++)\n        {\n            float fDot = (pPoints[iPoint] - fX) * fScale;\n\n            size_t iStep;\n\n            if(fDot <= 0.0f)\n                iStep = ((6 == cSteps) && (pPoints[iPoint] <= fX * 0.5f)) ? 6 : 0;\n            else if(fDot >= fSteps)\n                iStep = ((6 == cSteps) && (pPoints[iPoint] >= (fY + 1.0f) * 0.5f)) ? 7 : (cSteps - 1);\n            else\n                iStep = static_cast<int32_t>(fDot + 0.5f);\n\n\n            if(iStep < cSteps)\n            {\n                // D3DX had this computation backwards (pPoints[iPoint] - pSteps[iStep])\n                // this fix improves RMS of the alpha component\n                float fDiff = pSteps[iStep] - pPoints[iPoint];\n\n                dX  += pC[iStep] * fDiff;\n                d2X += pC[iStep] * pC[iStep];\n\n                dY  += pD[iStep] * fDiff; \n                d2Y += pD[iStep] * pD[iStep];\n            }\n        }\n\n        // Move endpoints\n        if(d2X > 0.0f)\n            fX -= dX / d2X;\n\n        if(d2Y > 0.0f)\n            fY -= dY / d2Y;\n\n        if(fX > fY)\n        {\n            float f = fX; fX = fY; fY = f;\n        }\n\n        if((dX * dX < (1.0f / 64.0f)) && (dY * dY < (1.0f / 64.0f)))\n            break;\n    }\n\n    *pX = (fX < MIN_VALUE) ? MIN_VALUE : (fX > MAX_VALUE) ? MAX_VALUE : fX;\n    *pY = (fY < MIN_VALUE) ? MIN_VALUE : (fY > MAX_VALUE) ? MAX_VALUE : fY;\n}\n#pragma warning(pop)\n\n\n//-------------------------------------------------------------------------------------\n// Functions\n//-------------------------------------------------------------------------------------\n\ntypedef void (*BC_DECODE)(XMVECTOR *pColor, const uint8_t *pBC);\ntypedef void (*BC_ENCODE)(uint8_t *pDXT, const XMVECTOR *pColor, DWORD flags);\n\nvoid D3DXDecodeBC1(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(8) const uint8_t *pBC);\nvoid D3DXDecodeBC2(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC3(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC4U(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(8) const uint8_t *pBC);\nvoid D3DXDecodeBC4S(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(8) const uint8_t *pBC);\nvoid D3DXDecodeBC5U(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC5S(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC6HU(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC6HS(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\nvoid D3DXDecodeBC7(_Out_writes_(NUM_PIXELS_PER_BLOCK) XMVECTOR *pColor, _In_reads_(16) const uint8_t *pBC);\n\nvoid D3DXEncodeBC1(_Out_writes_(8) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ float alphaRef, _In_ DWORD flags);\n    // BC1 requires one additional parameter, so it doesn't match signature of BC_ENCODE above\n\nvoid D3DXEncodeBC2(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC3(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC4U(_Out_writes_(8) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC4S(_Out_writes_(8) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC5U(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC5S(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC6HU(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC6HS(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\nvoid D3DXEncodeBC7(_Out_writes_(16) uint8_t *pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const XMVECTOR *pColor, _In_ DWORD flags);\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BC4BC5.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// BC4BC5.cpp\n//  \n// Block-compression (BC) functionality for BC4 and BC5 (DirectX 10 texture compression)\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//  \n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"BC.h\"\n\nnamespace DirectX\n{\n\n//------------------------------------------------------------------------------------\n// Constants\n//------------------------------------------------------------------------------------\n\n// Because these are used in SAL annotations, they need to remain macros rather than const values\n#define BLOCK_LEN 4\n    // length of each block in texel\n\n#define BLOCK_SIZE (BLOCK_LEN * BLOCK_LEN)\n    // total texels in a 4x4 block.\n\n//------------------------------------------------------------------------------------\n// Structures\n//-------------------------------------------------------------------------------------\n\n#pragma warning(push)\n#pragma warning(disable : 4201)\n\n// BC4U/BC5U\nstruct BC4_UNORM\n{\n    float R(size_t uOffset) const\n    {\n        size_t uIndex = GetIndex(uOffset);\n        return DecodeFromIndex(uIndex);\n    }\n\n    float DecodeFromIndex(size_t uIndex) const\n    {\n        if (uIndex == 0)\n            return red_0 / 255.0f;\n        if (uIndex == 1)\n            return red_1 / 255.0f;\n        float fred_0 = red_0 / 255.0f;\n        float fred_1 = red_1 / 255.0f;\n        if (red_0 > red_1)\n        {\n            uIndex -= 1;\n            return (fred_0 * (7-uIndex) + fred_1 * uIndex) / 7.0f;\n        }\n        else\n        {\n            if (uIndex == 6)\n                return 0.0f;\n            if (uIndex == 7)\n                return 1.0f;\n            uIndex -= 1;\n            return (fred_0 * (5-uIndex) + fred_1 * uIndex) / 5.0f;\n        }\n    }\n\n    size_t GetIndex(size_t uOffset) const\n    {\n        return (size_t) ((data >> (3*uOffset + 16)) & 0x07);\n    }    \n\n    void SetIndex(size_t uOffset, size_t uIndex)\n    {\n        data &= ~((uint64_t) 0x07 << (3*uOffset + 16));\n        data |= ((uint64_t) uIndex << (3*uOffset + 16));\n    }\n\n    union\n    {\n        struct \n        {\n            uint8_t red_0;\n            uint8_t red_1;\n            uint8_t indices[6]; \n        };\n        uint64_t data;\n    };\n};\n\n// BC4S/BC5S\nstruct BC4_SNORM\n{\n    float R(size_t uOffset) const\n    {\n        size_t uIndex = GetIndex(uOffset);\n        return DecodeFromIndex(uIndex);\n    }\n\n    float DecodeFromIndex(size_t uIndex) const\n    {\n        int8_t sred_0 = (red_0 == -128)? -127 : red_0;\n        int8_t sred_1 = (red_1 == -128)? -127 : red_1;\n\n        if (uIndex == 0)\n            return sred_0 / 127.0f;\n        if (uIndex == 1)\n            return sred_1 / 127.0f;\n        float fred_0 = sred_0 / 127.0f;\n        float fred_1 = sred_1 / 127.0f;\n        if (red_0 > red_1)\n        {\n            uIndex -= 1;\n            return (fred_0 * (7-uIndex) + fred_1 * uIndex) / 7.0f;\n        }\n        else\n        {\n            if (uIndex == 6)\n                return -1.0f;\n            if (uIndex == 7)\n                return 1.0f;  \n            uIndex -= 1;\n            return (fred_0 * (5-uIndex) + fred_1 * uIndex) / 5.0f;\n        }\n    }\n\n    size_t GetIndex(size_t uOffset) const\n    {\n        return (size_t) ((data >> (3*uOffset + 16)) & 0x07);\n    }    \n\n    void SetIndex(size_t uOffset, size_t uIndex)\n    {\n        data &= ~((uint64_t) 0x07 << (3*uOffset + 16));\n        data |= ((uint64_t) uIndex << (3*uOffset + 16));\n    }\n\n    union\n    {\n        struct \n        {\n            int8_t red_0;\n            int8_t red_1;\n            uint8_t indices[6]; \n        };\n        uint64_t data;\n    };\n};\n\n#pragma warning(pop)\n\n//-------------------------------------------------------------------------------------\n// Convert a floating point value to an 8-bit SNORM\n//-------------------------------------------------------------------------------------\nstatic void inline FloatToSNorm( _In_ float fVal, _Out_ int8_t *piSNorm )\n{\n    const uint32_t dwMostNeg = ( 1 << ( 8 * sizeof( int8_t ) - 1 ) );\n\n    if( _isnan( fVal ) )\n        fVal = 0;\n    else\n        if( fVal > 1 )\n            fVal = 1;    // Clamp to 1\n        else\n            if( fVal < -1 )\n                fVal = -1;    // Clamp to -1\n\n    fVal = fVal * (int8_t) ( dwMostNeg - 1 );\n\n    if( fVal >= 0 )\n        fVal += .5f;\n    else\n        fVal -= .5f;\n\n    *piSNorm = (int8_t) (fVal);\n}\n\n\n//------------------------------------------------------------------------------\nstatic void FindEndPointsBC4U( _In_reads_(BLOCK_SIZE) const float theTexelsU[], _Out_ uint8_t &endpointU_0, _Out_ uint8_t &endpointU_1)\n{\n    // The boundary of codec for signed/unsigned format\n    float MIN_NORM;\n    float MAX_NORM = 1.0f;\n    int8_t iStart, iEnd;\n    size_t i;\n\n    MIN_NORM = 0.0f;\n\n    // Find max/min of input texels\n    float fBlockMax = theTexelsU[0];\n    float fBlockMin = theTexelsU[0];\n    for (i = 0; i < BLOCK_SIZE; ++i)\n    {    \n        if (theTexelsU[i]<fBlockMin)\n        {\n            fBlockMin = theTexelsU[i];\n        }\n        else if (theTexelsU[i]>fBlockMax)\n        {\n            fBlockMax = theTexelsU[i];\n        }\n    }\n\n    //  If there are boundary values in input texels, Should use 4 block-codec to guarantee\n    //  the exact code of the boundary values.\n    bool bUsing4BlockCodec = ( MIN_NORM == fBlockMin || MAX_NORM == fBlockMax );\n\n    // Using Optimize\n    float fStart, fEnd;\n\n    if (!bUsing4BlockCodec)\n    {   \n        OptimizeAlpha<false>(&fStart, &fEnd, theTexelsU, 8);\n\n        iStart = (uint8_t) (fStart * 255.0f);\n        iEnd   = (uint8_t) (fEnd   * 255.0f);\n\n        endpointU_0 = iEnd;\n        endpointU_1 = iStart;\n    }\n    else\n    {\n        OptimizeAlpha<false>(&fStart, &fEnd, theTexelsU, 6);\n\n        iStart = (uint8_t) (fStart * 255.0f);\n        iEnd   = (uint8_t) (fEnd   * 255.0f);\n\n        endpointU_1 = iEnd;\n        endpointU_0 = iStart;\n    }\n}\n\nstatic void FindEndPointsBC4S(_In_reads_(BLOCK_SIZE) const float theTexelsU[], _Out_ int8_t &endpointU_0, _Out_ int8_t &endpointU_1)\n{\n    //  The boundary of codec for signed/unsigned format\n    float MIN_NORM;\n    float MAX_NORM = 1.0f;\n    int8_t iStart, iEnd;\n    size_t i;\n\n    MIN_NORM = -1.0f;\n\n    // Find max/min of input texels\n    float fBlockMax = theTexelsU[0];\n    float fBlockMin = theTexelsU[0];\n    for (i = 0; i < BLOCK_SIZE; ++i)\n    {    \n        if (theTexelsU[i]<fBlockMin)\n        {\n            fBlockMin = theTexelsU[i];\n        }\n        else if (theTexelsU[i]>fBlockMax)\n        {\n            fBlockMax = theTexelsU[i];\n        }\n    }\n\n    //  If there are boundary values in input texels, Should use 4 block-codec to guarantee\n    //  the exact code of the boundary values.\n    bool bUsing4BlockCodec = ( MIN_NORM == fBlockMin || MAX_NORM == fBlockMax );\n\n    // Using Optimize\n    float fStart, fEnd;\n\n    if (!bUsing4BlockCodec)\n    {   \n        OptimizeAlpha<true>(&fStart, &fEnd, theTexelsU, 8);\n\n        FloatToSNorm(fStart, &iStart);\n        FloatToSNorm(fEnd, &iEnd);\n\n        endpointU_0 = iEnd;\n        endpointU_1 = iStart;\n    }\n    else\n    {\n        OptimizeAlpha<true>(&fStart, &fEnd, theTexelsU, 6);\n\n        FloatToSNorm(fStart, &iStart);\n        FloatToSNorm(fEnd, &iEnd);\n\n        endpointU_1 = iEnd;\n        endpointU_0 = iStart;\n    }\n}\n\n\n//------------------------------------------------------------------------------\nstatic inline void FindEndPointsBC5U( _In_reads_(BLOCK_SIZE) const float theTexelsU[], _In_reads_(BLOCK_SIZE) const float theTexelsV[],\n                                      _Out_ uint8_t &endpointU_0, _Out_ uint8_t &endpointU_1, _Out_ uint8_t &endpointV_0, _Out_ uint8_t &endpointV_1)\n{\n    //Encoding the U and V channel by BC4 codec separately.\n    FindEndPointsBC4U( theTexelsU, endpointU_0, endpointU_1);\n    FindEndPointsBC4U( theTexelsV, endpointV_0, endpointV_1);\n}\n\nstatic inline void FindEndPointsBC5S( _In_reads_(BLOCK_SIZE) const float theTexelsU[], _In_reads_(BLOCK_SIZE) const float theTexelsV[],\n                                      _Out_ int8_t &endpointU_0, _Out_ int8_t &endpointU_1, _Out_ int8_t &endpointV_0, _Out_ int8_t &endpointV_1)\n{\n    //Encoding the U and V channel by BC4 codec separately.\n    FindEndPointsBC4S( theTexelsU, endpointU_0, endpointU_1);\n    FindEndPointsBC4S( theTexelsV, endpointV_0, endpointV_1);\n}\n\n\n//------------------------------------------------------------------------------\nstatic void FindClosestUNORM(_Inout_ BC4_UNORM* pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const float theTexelsU[])\n{\n    float rGradient[8];\n    int i;\n    for (i = 0; i < 8; ++i)\n    {\n        rGradient[i] = pBC->DecodeFromIndex(i);\n    }\n    for (i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        size_t uBestIndex = 0;\n        float fBestDelta = 100000;\n        for (size_t uIndex = 0; uIndex < 8; uIndex++)\n        {\n            float fCurrentDelta = fabsf(rGradient[uIndex]-theTexelsU[i]);\n            if (fCurrentDelta < fBestDelta)\n            {\n                uBestIndex = uIndex;\n                fBestDelta = fCurrentDelta;\n            }\n        }\n        pBC->SetIndex(i, uBestIndex);\n    }\n}\n\nstatic void FindClosestSNORM(_Inout_ BC4_SNORM* pBC, _In_reads_(NUM_PIXELS_PER_BLOCK) const float theTexelsU[])\n{    \n    float rGradient[8];\n    int i;\n    for (i = 0; i < 8; ++i)\n    {\n        rGradient[i] = pBC->DecodeFromIndex(i);\n    }\n    for (i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        size_t uBestIndex = 0;\n        float fBestDelta = 100000;\n        for (size_t uIndex = 0; uIndex < 8; uIndex++)\n        {\n            float fCurrentDelta = fabsf(rGradient[uIndex]-theTexelsU[i]);\n            if (fCurrentDelta < fBestDelta)\n            {\n                uBestIndex = uIndex;\n                fBestDelta = fCurrentDelta;\n            }\n        }\n        pBC->SetIndex(i, uBestIndex);\n    }\n}\n\n\n//=====================================================================================\n// Entry points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// BC4 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC4U( XMVECTOR *pColor, const uint8_t *pBC )\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(BC4_UNORM) == 8, \"BC4_UNORM should be 8 bytes\" );\n\n    auto pBC4 = reinterpret_cast<const BC4_UNORM*>(pBC);\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        #pragma prefast(suppress:22103, \"writing blocks in two halves confuses tool\")\n        pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);\n    }       \n}\n\n_Use_decl_annotations_\nvoid D3DXDecodeBC4S(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(BC4_SNORM) == 8, \"BC4_SNORM should be 8 bytes\" );\n\n    auto pBC4 = reinterpret_cast<const BC4_SNORM*>(pBC);\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        #pragma prefast(suppress:22103, \"writing blocks in two halves confuses tool\")\n        pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);\n    }       \n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC4U( uint8_t *pBC, const XMVECTOR *pColor, DWORD flags )\n{\n    UNREFERENCED_PARAMETER( flags );\n\n    assert( pBC && pColor );\n    static_assert( sizeof(BC4_UNORM) == 8, \"BC4_UNORM should be 8 bytes\" );\n\n    memset(pBC, 0, sizeof(BC4_UNORM));\n    auto pBC4 = reinterpret_cast<BC4_UNORM*>(pBC);\n    float theTexelsU[NUM_PIXELS_PER_BLOCK];\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        theTexelsU[i] = XMVectorGetX( pColor[i] );\n    }\n\n    FindEndPointsBC4U(theTexelsU, pBC4->red_0, pBC4->red_1);\n    FindClosestUNORM(pBC4, theTexelsU);\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC4S( uint8_t *pBC, const XMVECTOR *pColor, DWORD flags )\n{\n    UNREFERENCED_PARAMETER( flags );\n\n    assert( pBC && pColor );\n    static_assert( sizeof(BC4_SNORM) == 8, \"BC4_SNORM should be 8 bytes\" );\n\n    memset(pBC, 0, sizeof(BC4_UNORM));\n    auto pBC4 = reinterpret_cast<BC4_SNORM*>(pBC);\n    float theTexelsU[NUM_PIXELS_PER_BLOCK];\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        theTexelsU[i] = XMVectorGetX( pColor[i] );\n    }\n\n    FindEndPointsBC4S(theTexelsU, pBC4->red_0, pBC4->red_1);\n    FindClosestSNORM(pBC4, theTexelsU);\n}\n\n\n//-------------------------------------------------------------------------------------\n// BC5 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC5U(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(BC4_UNORM) == 8, \"BC4_UNORM should be 8 bytes\" );\n\n    auto pBCR = reinterpret_cast<const BC4_UNORM*>(pBC);\n    auto pBCG = reinterpret_cast<const BC4_UNORM*>(pBC+sizeof(BC4_UNORM));\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        #pragma prefast(suppress:22103, \"writing blocks in two halves confuses tool\")\n        pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);\n    }       \n}\n\n_Use_decl_annotations_\nvoid D3DXDecodeBC5S(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(BC4_SNORM) == 8, \"BC4_SNORM should be 8 bytes\" );\n\n    auto pBCR = reinterpret_cast<const BC4_SNORM*>(pBC);\n    auto pBCG = reinterpret_cast<const BC4_SNORM*>(pBC+sizeof(BC4_SNORM));\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        #pragma prefast(suppress:22103, \"writing blocks in two halves confuses tool\")\n        pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);\n    }       \n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC5U( uint8_t *pBC, const XMVECTOR *pColor, DWORD flags )\n{\n    UNREFERENCED_PARAMETER( flags );\n\n    assert( pBC && pColor );\n    static_assert( sizeof(BC4_UNORM) == 8, \"BC4_UNORM should be 8 bytes\" );\n\n    memset(pBC, 0, sizeof(BC4_UNORM)*2);\n    auto pBCR = reinterpret_cast<BC4_UNORM*>(pBC);\n    auto pBCG = reinterpret_cast<BC4_UNORM*>(pBC+sizeof(BC4_UNORM));\n    float theTexelsU[NUM_PIXELS_PER_BLOCK];\n    float theTexelsV[NUM_PIXELS_PER_BLOCK];\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {   \n        XMFLOAT4A clr;\n        XMStoreFloat4A( &clr, pColor[i] );\n        theTexelsU[i] = clr.x;\n        theTexelsV[i] = clr.y;\n    }\n\n    FindEndPointsBC5U(\n        theTexelsU,\n        theTexelsV,\n        pBCR->red_0,\n        pBCR->red_1,\n        pBCG->red_0,\n        pBCG->red_1);\n\n    FindClosestUNORM(pBCR, theTexelsU);\n    FindClosestUNORM(pBCG, theTexelsV);\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC5S( uint8_t *pBC, const XMVECTOR *pColor, DWORD flags )\n{\n    UNREFERENCED_PARAMETER( flags );\n\n    assert( pBC && pColor );\n    static_assert( sizeof(BC4_SNORM) == 8, \"BC4_SNORM should be 8 bytes\" );\n\n    memset(pBC, 0, sizeof(BC4_UNORM)*2);\n    auto pBCR = reinterpret_cast<BC4_SNORM*>(pBC);\n    auto pBCG = reinterpret_cast<BC4_SNORM*>(pBC+sizeof(BC4_SNORM));\n    float theTexelsU[NUM_PIXELS_PER_BLOCK];\n    float theTexelsV[NUM_PIXELS_PER_BLOCK];\n\n    for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        XMFLOAT4A clr;\n        XMStoreFloat4A( &clr, pColor[i] );\n        theTexelsU[i] = clr.x;\n        theTexelsV[i] = clr.y;\n    }\n\n    FindEndPointsBC5S(\n        theTexelsU,\n        theTexelsV,\n        pBCR->red_0,\n        pBCR->red_1,\n        pBCG->red_0,\n        pBCG->red_1);\n\n    FindClosestSNORM(pBCR, theTexelsU);\n    FindClosestSNORM(pBCG, theTexelsV);\n}\n\n} // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BC6HBC7.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// BC6HBC7.cpp\n//  \n// Block-compression (BC) functionality for BC6H and BC7 (DirectX 11 texture compression)\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//  \n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"BC.h\"\n\nusing namespace DirectX::PackedVector;\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Constants\n//-------------------------------------------------------------------------------------\n\nstatic const float fEpsilon = (0.25f / 64.0f) * (0.25f / 64.0f);\nstatic const float pC3[] = { 2.0f/2.0f, 1.0f/2.0f, 0.0f/2.0f };\nstatic const float pD3[] = { 0.0f/2.0f, 1.0f/2.0f, 2.0f/2.0f };\nstatic const float pC4[] = { 3.0f/3.0f, 2.0f/3.0f, 1.0f/3.0f, 0.0f/3.0f };\nstatic const float pD4[] = { 0.0f/3.0f, 1.0f/3.0f, 2.0f/3.0f, 3.0f/3.0f };\n\nconst int g_aWeights2[] = {0, 21, 43, 64};\nconst int g_aWeights3[] = {0, 9, 18, 27, 37, 46, 55, 64};\nconst int g_aWeights4[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64};\n\n// Partition, Shape, Pixel (index into 4x4 block)\nstatic const uint8_t g_aPartitionTable[3][64][16] =\n{\n    {   // 1 Region case has no subsets (all 0)\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }\n    },\n\n    {   // BC6H/BC7 Partition Set for 2 Subsets\n        { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, // Shape 0\n        { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 }, // Shape 1\n        { 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 }, // Shape 2\n        { 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1 }, // Shape 3\n        { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1 }, // Shape 4\n        { 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, // Shape 5\n        { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, // Shape 6\n        { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1 }, // Shape 7\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1 }, // Shape 8\n        { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // Shape 9\n        { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, // Shape 10\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1 }, // Shape 11\n        { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // Shape 12\n        { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }, // Shape 13\n        { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // Shape 14\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 }, // Shape 15\n        { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1 }, // Shape 16\n        { 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // Shape 17\n        { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 }, // Shape 18\n        { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0 }, // Shape 19\n        { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // Shape 20\n        { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0 }, // Shape 21\n        { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 }, // Shape 22\n        { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1 }, // Shape 23\n        { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 }, // Shape 24\n        { 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 }, // Shape 25\n        { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0 }, // Shape 26\n        { 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0 }, // Shape 27\n        { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0 }, // Shape 28\n        { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, // Shape 29\n        { 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0 }, // Shape 30\n        { 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0 }, // Shape 31\n\n        // BC7 Partition Set for 2 Subsets (second-half)\n        { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 }, // Shape 32\n        { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1 }, // Shape 33\n        { 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0 }, // Shape 34\n        { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0 }, // Shape 35\n        { 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0 }, // Shape 36\n        { 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 }, // Shape 37\n        { 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 }, // Shape 38\n        { 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 }, // Shape 39\n        { 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0 }, // Shape 40\n        { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 }, // Shape 41\n        { 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 }, // Shape 42\n        { 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0 }, // Shape 43\n        { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }, // Shape 44\n        { 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1 }, // Shape 45\n        { 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1 }, // Shape 46\n        { 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Shape 47\n        { 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // Shape 48\n        { 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0 }, // Shape 49\n        { 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0 }, // Shape 50\n        { 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0 }, // Shape 51\n        { 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 }, // Shape 52\n        { 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1 }, // Shape 53\n        { 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0 }, // Shape 54\n        { 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0 }, // Shape 55\n        { 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1 }, // Shape 56\n        { 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1 }, // Shape 57\n        { 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1 }, // Shape 58\n        { 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1 }, // Shape 59\n        { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, // Shape 60\n        { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, // Shape 61\n        { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 }, // Shape 62\n        { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1 }  // Shape 63\n    },\n\n    {   // BC7 Partition Set for 3 Subsets\n        { 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 1, 2, 2, 2, 2 }, // Shape 0\n        { 0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1 }, // Shape 1\n        { 0, 0, 0, 0, 2, 0, 0, 1, 2, 2, 1, 1, 2, 2, 1, 1 }, // Shape 2\n        { 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 1, 0, 1, 1, 1 }, // Shape 3\n        { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2 }, // Shape 4\n        { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 2, 2 }, // Shape 5\n        { 0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 }, // Shape 6\n        { 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1 }, // Shape 7\n        { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 }, // Shape 8\n        { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2 }, // Shape 9\n        { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2 }, // Shape 10\n        { 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2 }, // Shape 11\n        { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2 }, // Shape 12\n        { 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2 }, // Shape 13\n        { 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2 }, // Shape 14\n        { 0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0, 2, 2, 2, 0 }, // Shape 15\n        { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2 }, // Shape 16\n        { 0, 1, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0 }, // Shape 17\n        { 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2 }, // Shape 18\n        { 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1 }, // Shape 19\n        { 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 2 }, // Shape 20\n        { 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 2, 1 }, // Shape 21\n        { 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2 }, // Shape 22\n        { 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 1, 0, 2, 2, 1, 0 }, // Shape 23\n        { 0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0 }, // Shape 24\n        { 0, 0, 1, 2, 0, 0, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2 }, // Shape 25\n        { 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 1, 0 }, // Shape 26\n        { 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1 }, // Shape 27\n        { 0, 0, 2, 2, 1, 1, 0, 2, 1, 1, 0, 2, 0, 0, 2, 2 }, // Shape 28\n        { 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2 }, // Shape 29\n        { 0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1 }, // Shape 30\n        { 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 1, 1, 2, 2, 2, 1 }, // Shape 31\n        { 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 2, 2, 2 }, // Shape 32\n        { 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 1, 1 }, // Shape 33\n        { 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 2, 2, 0, 2, 2, 2 }, // Shape 34\n        { 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0 }, // Shape 35\n        { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0 }, // Shape 36\n        { 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0 }, // Shape 37\n        { 0, 1, 2, 0, 2, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0 }, // Shape 38\n        { 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1 }, // Shape 39\n        { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, 1, 1 }, // Shape 40\n        { 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2 }, // Shape 41\n        { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1 }, // Shape 42\n        { 0, 0, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 2, 2 }, // Shape 43\n        { 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1 }, // Shape 44\n        { 0, 2, 2, 0, 1, 2, 2, 1, 0, 2, 2, 0, 1, 2, 2, 1 }, // Shape 45\n        { 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1 }, // Shape 46\n        { 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1 }, // Shape 47\n        { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2 }, // Shape 48\n        { 0, 2, 2, 2, 0, 1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 1 }, // Shape 49\n        { 0, 0, 0, 2, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 2 }, // Shape 50\n        { 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2 }, // Shape 51\n        { 0, 2, 2, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2 }, // Shape 52\n        { 0, 0, 0, 2, 1, 1, 1, 2, 1, 1, 1, 2, 0, 0, 0, 2 }, // Shape 53\n        { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2 }, // Shape 54\n        { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2 }, // Shape 55\n        { 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2 }, // Shape 56\n        { 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2 }, // Shape 57\n        { 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2 }, // Shape 58\n        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2 }, // Shape 59\n        { 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1 }, // Shape 60\n        { 0, 2, 2, 2, 1, 2, 2, 2, 0, 2, 2, 2, 1, 2, 2, 2 }, // Shape 61\n        { 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, // Shape 62\n        { 0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0 }  // Shape 63\n    }\n};\n\n// Partition, Shape, Fixup\nstatic const uint8_t g_aFixUp[3][64][3] =\n{\n    {   // No fix-ups for 1st subset for BC6H or BC7\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0},\n        { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}\n    },\n\n    {   // BC6H/BC7 Partition Set Fixups for 2 Subsets\n        { 0,15, 0}, { 0,15, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0,15, 0}, { 0,15, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0,15, 0}, { 0,15, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0,15, 0}, { 0,15, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0,15, 0}, { 0, 2, 0}, { 0, 8, 0}, { 0, 2, 0},\n        { 0, 2, 0}, { 0, 8, 0}, { 0, 8, 0}, { 0,15, 0},\n        { 0, 2, 0}, { 0, 8, 0}, { 0, 2, 0}, { 0, 2, 0},\n        { 0, 8, 0}, { 0, 8, 0}, { 0, 2, 0}, { 0, 2, 0},\n\n        // BC7 Partition Set Fixups for 2 Subsets (second-half)\n        { 0,15, 0}, { 0,15, 0}, { 0, 6, 0}, { 0, 8, 0},\n        { 0, 2, 0}, { 0, 8, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0, 2, 0}, { 0, 8, 0}, { 0, 2, 0}, { 0, 2, 0},\n        { 0, 2, 0}, { 0,15, 0}, { 0,15, 0}, { 0, 6, 0},\n        { 0, 6, 0}, { 0, 2, 0}, { 0, 6, 0}, { 0, 8, 0},\n        { 0,15, 0}, { 0,15, 0}, { 0, 2, 0}, { 0, 2, 0},\n        { 0,15, 0}, { 0,15, 0}, { 0,15, 0}, { 0,15, 0},\n        { 0,15, 0}, { 0, 2, 0}, { 0, 2, 0}, { 0,15, 0}\n    },\n\n    {   // BC7 Partition Set Fixups for 3 Subsets\n        { 0, 3,15}, { 0, 3, 8}, { 0,15, 8}, { 0,15, 3},\n        { 0, 8,15}, { 0, 3,15}, { 0,15, 3}, { 0,15, 8},\n        { 0, 8,15}, { 0, 8,15}, { 0, 6,15}, { 0, 6,15},\n        { 0, 6,15}, { 0, 5,15}, { 0, 3,15}, { 0, 3, 8},\n        { 0, 3,15}, { 0, 3, 8}, { 0, 8,15}, { 0,15, 3},\n        { 0, 3,15}, { 0, 3, 8}, { 0, 6,15}, { 0,10, 8},\n        { 0, 5, 3}, { 0, 8,15}, { 0, 8, 6}, { 0, 6,10},\n        { 0, 8,15}, { 0, 5,15}, { 0,15,10}, { 0,15, 8},\n        { 0, 8,15}, { 0,15, 3}, { 0, 3,15}, { 0, 5,10},\n        { 0, 6,10}, { 0,10, 8}, { 0, 8, 9}, { 0,15,10},\n        { 0,15, 6}, { 0, 3,15}, { 0,15, 8}, { 0, 5,15},\n        { 0,15, 3}, { 0,15, 6}, { 0,15, 6}, { 0,15, 8},\n        { 0, 3,15}, { 0,15, 3}, { 0, 5,15}, { 0, 5,15},\n        { 0, 5,15}, { 0, 8,15}, { 0, 5,15}, { 0,10,15},\n        { 0, 5,15}, { 0,10,15}, { 0, 8,15}, { 0,13,15},\n        { 0,15, 3}, { 0,12,15}, { 0, 3,15}, { 0, 3, 8}\n    }\n};\n\n// BC6H Compression\nconst D3DX_BC6H::ModeDescriptor D3DX_BC6H::ms_aDesc[14][82] =\n{\n    {   // Mode 1 (0x00) - 10 5 5 5\n        { M, 0}, { M, 1}, {GY, 4}, {BY, 4}, {BZ, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {GZ, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 2 (0x01) - 7 6 6 6\n        { M, 0}, { M, 1}, {GY, 5}, {GZ, 4}, {GZ, 5}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {BZ, 0}, {BZ, 1}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {BY, 5}, {BZ, 2}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BZ, 3}, {BZ, 5}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {RY, 5}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {RZ, 5}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 3 (0x02) - 11 5 4 4\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RW,10}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GW,10},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BW,10},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 4 (0x06) - 11 4 5 4\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RW,10},\n        {GZ, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GW,10}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BW,10},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {BZ, 0},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {GY, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 5 (0x0a) - 11 4 4 5\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RW,10},\n        {BY, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GW,10},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BW,10}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {BZ, 1},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {BZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 6 (0x0e) - 9 5 5 5\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {GZ, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 7 (0x12) - 8 6 5 5\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {GZ, 4}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {BZ, 2}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BZ, 3}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {RY, 5}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {RZ, 5}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 8 (0x16) - 8 5 6 5\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {BZ, 0}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GY, 5}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {GZ, 5}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {GZ, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BZ, 1}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 9 (0x1a) - 8 5 5 6\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {BZ, 1}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {BY, 5}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BZ, 5}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {GZ, 4}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {BZ, 0}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {BZ, 2}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {BZ, 3}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 10 (0x1e) - 6 6 6 6\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {GZ, 4}, {BZ, 0}, {BZ, 1}, {BY, 4}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GY, 5}, {BY, 5}, {BZ, 2}, {GY, 4}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {GZ, 5}, {BZ, 3}, {BZ, 5}, {BZ, 4}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {GY, 0}, {GY, 1}, {GY, 2}, {GY, 3}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GZ, 0}, {GZ, 1}, {GZ, 2}, {GZ, 3}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BY, 0}, {BY, 1}, {BY, 2}, {BY, 3}, {RY, 0}, {RY, 1}, {RY, 2}, {RY, 3}, {RY, 4},\n        {RY, 5}, {RZ, 0}, {RZ, 1}, {RZ, 2}, {RZ, 3}, {RZ, 4}, {RZ, 5}, { D, 0}, { D, 1}, { D, 2},\n        { D, 3}, { D, 4}, \n    },\n\n    {   // Mode 11 (0x03) - 10 10\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {RX, 6}, {RX, 7}, {RX, 8}, {RX, 9}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GX, 6}, {GX, 7}, {GX, 8}, {GX, 9}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BX, 6}, {BX, 7}, {BX, 8}, {BX, 9}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, \n    },\n\n    {   // Mode 12 (0x07) - 11 9\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {RX, 6}, {RX, 7}, {RX, 8}, {RW,10}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GX, 6}, {GX, 7}, {GX, 8}, {GW,10}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BX, 6}, {BX, 7}, {BX, 8}, {BW,10}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, \n    },\n\n    {   // Mode 13 (0x0b) - 12 8\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RX, 4},\n        {RX, 5}, {RX, 6}, {RX, 7}, {RW,11}, {RW,10}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GX, 4},\n        {GX, 5}, {GX, 6}, {GX, 7}, {GW,11}, {GW,10}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BX, 4},\n        {BX, 5}, {BX, 6}, {BX, 7}, {BW,11}, {BW,10}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, \n    },\n\n    {   // Mode 14 (0x0f) - 16 4\n        { M, 0}, { M, 1}, { M, 2}, { M, 3}, { M, 4}, {RW, 0}, {RW, 1}, {RW, 2}, {RW, 3}, {RW, 4},\n        {RW, 5}, {RW, 6}, {RW, 7}, {RW, 8}, {RW, 9}, {GW, 0}, {GW, 1}, {GW, 2}, {GW, 3}, {GW, 4},\n        {GW, 5}, {GW, 6}, {GW, 7}, {GW, 8}, {GW, 9}, {BW, 0}, {BW, 1}, {BW, 2}, {BW, 3}, {BW, 4},\n        {BW, 5}, {BW, 6}, {BW, 7}, {BW, 8}, {BW, 9}, {RX, 0}, {RX, 1}, {RX, 2}, {RX, 3}, {RW,15},\n        {RW,14}, {RW,13}, {RW,12}, {RW,11}, {RW,10}, {GX, 0}, {GX, 1}, {GX, 2}, {GX, 3}, {GW,15},\n        {GW,14}, {GW,13}, {GW,12}, {GW,11}, {GW,10}, {BX, 0}, {BX, 1}, {BX, 2}, {BX, 3}, {BW,15},\n        {BW,14}, {BW,13}, {BW,12}, {BW,11}, {BW,10}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0}, {NA, 0},\n        {NA, 0}, {NA, 0}, \n    },\n};\n\n// Mode, Partitions, Transformed, IndexPrec, RGBAPrec\nconst D3DX_BC6H::ModeInfo D3DX_BC6H::ms_aInfo[] =\n{\n    {0x00, 1, true,  3, LDRColorA(10,10,10,0), LDRColorA( 5, 5, 5,0), LDRColorA(5,5,5,0), LDRColorA(5,5,5,0)}, // Mode 1\n    {0x01, 1, true,  3, LDRColorA( 7, 7, 7,0), LDRColorA( 6, 6, 6,0), LDRColorA(6,6,6,0), LDRColorA(6,6,6,0)}, // Mode 2\n    {0x02, 1, true,  3, LDRColorA(11,11,11,0), LDRColorA( 5, 4, 4,0), LDRColorA(5,4,4,0), LDRColorA(5,4,4,0)}, // Mode 3\n    {0x06, 1, true,  3, LDRColorA(11,11,11,0), LDRColorA( 4, 5, 4,0), LDRColorA(4,5,4,0), LDRColorA(4,5,4,0)}, // Mode 4\n    {0x0a, 1, true,  3, LDRColorA(11,11,11,0), LDRColorA( 4, 4, 5,0), LDRColorA(4,4,5,0), LDRColorA(4,4,5,0)}, // Mode 5\n    {0x0e, 1, true,  3, LDRColorA( 9, 9, 9,0), LDRColorA( 5, 5, 5,0), LDRColorA(5,5,5,0), LDRColorA(5,5,5,0)}, // Mode 6\n    {0x12, 1, true,  3, LDRColorA( 8, 8, 8,0), LDRColorA( 6, 5, 5,0), LDRColorA(6,5,5,0), LDRColorA(6,5,5,0)}, // Mode 7\n    {0x16, 1, true,  3, LDRColorA( 8, 8, 8,0), LDRColorA( 5, 6, 5,0), LDRColorA(5,6,5,0), LDRColorA(5,6,5,0)}, // Mode 8\n    {0x1a, 1, true,  3, LDRColorA( 8, 8, 8,0), LDRColorA( 5, 5, 6,0), LDRColorA(5,5,6,0), LDRColorA(5,5,6,0)}, // Mode 9\n    {0x1e, 1, false, 3, LDRColorA( 6, 6, 6,0), LDRColorA( 6, 6, 6,0), LDRColorA(6,6,6,0), LDRColorA(6,6,6,0)}, // Mode 10\n    {0x03, 0, false, 4, LDRColorA(10,10,10,0), LDRColorA(10,10,10,0), LDRColorA(0,0,0,0), LDRColorA(0,0,0,0)}, // Mode 11\n    {0x07, 0, true,  4, LDRColorA(11,11,11,0), LDRColorA( 9, 9, 9,0), LDRColorA(0,0,0,0), LDRColorA(0,0,0,0)}, // Mode 12\n    {0x0b, 0, true,  4, LDRColorA(12,12,12,0), LDRColorA( 8, 8, 8,0), LDRColorA(0,0,0,0), LDRColorA(0,0,0,0)}, // Mode 13\n    {0x0f, 0, true,  4, LDRColorA(16,16,16,0), LDRColorA( 4, 4, 4,0), LDRColorA(0,0,0,0), LDRColorA(0,0,0,0)}, // Mode 14\n};\n\nconst int D3DX_BC6H::ms_aModeToInfo[] =\n{\n     0, // Mode 1   - 0x00\n     1, // Mode 2   - 0x01\n     2, // Mode 3   - 0x02\n    10, // Mode 11  - 0x03\n    -1, // Invalid  - 0x04\n    -1, // Invalid  - 0x05\n     3, // Mode 4   - 0x06\n    11, // Mode 12  - 0x07\n    -1, // Invalid  - 0x08\n    -1, // Invalid  - 0x09\n     4, // Mode 5   - 0x0a\n    12, // Mode 13  - 0x0b\n    -1, // Invalid  - 0x0c\n    -1, // Invalid  - 0x0d\n     5, // Mode 6   - 0x0e\n    13, // Mode 14  - 0x0f\n    -1, // Invalid  - 0x10\n    -1, // Invalid  - 0x11\n     6, // Mode 7   - 0x12\n    -1, // Reserved - 0x13\n    -1, // Invalid  - 0x14\n    -1, // Invalid  - 0x15\n     7, // Mode 8   - 0x16\n    -1, // Reserved - 0x17\n    -1, // Invalid  - 0x18\n    -1, // Invalid  - 0x19\n     8, // Mode 9   - 0x1a\n    -1, // Reserved - 0x1b\n    -1, // Invalid  - 0x1c\n    -1, // Invalid  - 0x1d\n     9, // Mode 10  - 0x1e\n    -1, // Resreved - 0x1f\n};\n\n// BC7 compression: uPartitions, uPartitionBits, uPBits, uRotationBits, uIndexModeBits, uIndexPrec, uIndexPrec2, RGBAPrec, RGBAPrecWithP\nconst D3DX_BC7::ModeInfo D3DX_BC7::ms_aInfo[] =\n{\n    {2, 4, 6, 0, 0, 3, 0, LDRColorA(4,4,4,0), LDRColorA(5,5,5,0)},\n        // Mode 0: Color only, 3 Subsets, RGBP 4441 (unique P-bit), 3-bit indecies, 16 partitions\n    {1, 6, 2, 0, 0, 3, 0, LDRColorA(6,6,6,0), LDRColorA(7,7,7,0)},\n        // Mode 1: Color only, 2 Subsets, RGBP 6661 (shared P-bit), 3-bit indecies, 64 partitions\n    {2, 6, 0, 0, 0, 2, 0, LDRColorA(5,5,5,0), LDRColorA(5,5,5,0)},\n        // Mode 2: Color only, 3 Subsets, RGB 555, 2-bit indecies, 64 partitions\n    {1, 6, 4, 0, 0, 2, 0, LDRColorA(7,7,7,0), LDRColorA(8,8,8,0)},\n        // Mode 3: Color only, 2 Subsets, RGBP 7771 (unique P-bit), 2-bits indecies, 64 partitions\n    {0, 0, 0, 2, 1, 2, 3, LDRColorA(5,5,5,6), LDRColorA(5,5,5,6)},\n        // Mode 4: Color w/ Separate Alpha, 1 Subset, RGB 555, A6, 16x2/16x3-bit indices, 2-bit rotation, 1-bit index selector\n    {0, 0, 0, 2, 0, 2, 2, LDRColorA(7,7,7,8), LDRColorA(7,7,7,8)},\n        // Mode 5: Color w/ Separate Alpha, 1 Subset, RGB 777, A8, 16x2/16x2-bit indices, 2-bit rotation\n    {0, 0, 2, 0, 0, 4, 0, LDRColorA(7,7,7,7), LDRColorA(8,8,8,8)},\n        // Mode 6: Color+Alpha, 1 Subset, RGBAP 77771 (unique P-bit), 16x4-bit indecies\n    {1, 6, 4, 0, 0, 2, 0, LDRColorA(5,5,5,5), LDRColorA(6,6,6,6)}\n        // Mode 7: Color+Alpha, 2 Subsets, RGBAP 55551 (unique P-bit), 2-bit indices, 64 partitions\n};\n\n\n//-------------------------------------------------------------------------------------\n// Helper functions\n//-------------------------------------------------------------------------------------\ninline static bool IsFixUpOffset(_In_range_(0,2) size_t uPartitions, _In_range_(0,63) size_t uShape, _In_range_(0,15) size_t uOffset)\n{\n    assert(uPartitions < 3 && uShape < 64 && uOffset < 16);\n    _Analysis_assume_(uPartitions < 3 && uShape < 64 && uOffset < 16);\n    for(size_t p = 0; p <= uPartitions; p++)\n    {\n        if(uOffset == g_aFixUp[uPartitions][uShape][p])\n        {\n            return true;\n        }\n    }\n    return false;\n}\n\ninline static void TransformForward(_Inout_updates_all_(BC6H_MAX_REGIONS) INTEndPntPair aEndPts[])\n{\n    aEndPts[0].B -= aEndPts[0].A;\n    aEndPts[1].A -= aEndPts[0].A;\n    aEndPts[1].B -= aEndPts[0].A;\n}\n\ninline static void TransformInverse(_Inout_updates_all_(BC6H_MAX_REGIONS) INTEndPntPair aEndPts[], _In_ const LDRColorA& Prec, _In_ bool bSigned)\n{\n    INTColor WrapMask((1 << Prec.r) - 1, (1 << Prec.g) - 1, (1 << Prec.b) - 1);\n    aEndPts[0].B += aEndPts[0].A; aEndPts[0].B &= WrapMask; \n    aEndPts[1].A += aEndPts[0].A; aEndPts[1].A &= WrapMask;\n    aEndPts[1].B += aEndPts[0].A; aEndPts[1].B &= WrapMask;\n    if(bSigned)\n    {\n        aEndPts[0].B.SignExtend(Prec);\n        aEndPts[1].A.SignExtend(Prec);\n        aEndPts[1].B.SignExtend(Prec);\n    }\n}\n\ninline static float Norm(_In_ const INTColor& a, _In_ const INTColor& b)\n{\n    float dr = float(a.r) - float(b.r);\n    float dg = float(a.g) - float(b.g);\n    float db = float(a.b) - float(b.b);\n    return dr * dr + dg * dg + db * db;\n}\n\n// return # of bits needed to store n. handle signed or unsigned cases properly\ninline static int NBits(_In_ int n, _In_ bool bIsSigned)\n{\n    int nb;\n    if(n == 0)\n    {\n        return 0;\t// no bits needed for 0, signed or not\n    }\n    else if(n > 0)\n    {\n        for(nb = 0; n; ++nb, n >>= 1);\n        return nb + (bIsSigned ? 1 : 0);\n    }\n    else\n    {\n        assert(bIsSigned);\n        for(nb = 0; n < -1; ++nb, n >>= 1) ;\n        return nb + 1;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic float OptimizeRGB(_In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA* const pPoints,\n                         _Out_ HDRColorA* pX, _Out_ HDRColorA* pY,\n                         _In_ size_t cSteps, _In_ size_t cPixels, _In_reads_(cPixels) const size_t* pIndex)\n{\n    float fError = FLT_MAX;\n    const float *pC = (3 == cSteps) ? pC3 : pC4;\n    const float *pD = (3 == cSteps) ? pD3 : pD4;\n\n    // Find Min and Max points, as starting point\n    HDRColorA X(1.0f, 1.0f, 1.0f, 0.0f);\n    HDRColorA Y(0.0f, 0.0f, 0.0f, 0.0f);\n\n    for(size_t iPoint = 0; iPoint < cPixels; iPoint++)\n    {\n        if(pPoints[pIndex[iPoint]].r < X.r) X.r = pPoints[pIndex[iPoint]].r;\n        if(pPoints[pIndex[iPoint]].g < X.g) X.g = pPoints[pIndex[iPoint]].g;\n        if(pPoints[pIndex[iPoint]].b < X.b) X.b = pPoints[pIndex[iPoint]].b;\n        if(pPoints[pIndex[iPoint]].r > Y.r) Y.r = pPoints[pIndex[iPoint]].r;\n        if(pPoints[pIndex[iPoint]].g > Y.g) Y.g = pPoints[pIndex[iPoint]].g;\n        if(pPoints[pIndex[iPoint]].b > Y.b) Y.b = pPoints[pIndex[iPoint]].b;\n    }\n\n    // Diagonal axis\n    HDRColorA AB;\n    AB.r = Y.r - X.r;\n    AB.g = Y.g - X.g;\n    AB.b = Y.b - X.b;\n\n    float fAB = AB.r * AB.r + AB.g * AB.g + AB.b * AB.b;\n\n    // Single color block.. no need to root-find\n    if(fAB < FLT_MIN)\n    {\n        pX->r = X.r; pX->g = X.g; pX->b = X.b;\n        pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n        return 0.0f;\n    }\n\n    // Try all four axis directions, to determine which diagonal best fits data\n    float fABInv = 1.0f / fAB;\n\n    HDRColorA Dir;\n    Dir.r = AB.r * fABInv;\n    Dir.g = AB.g * fABInv;\n    Dir.b = AB.b * fABInv;\n\n    HDRColorA Mid;\n    Mid.r = (X.r + Y.r) * 0.5f;\n    Mid.g = (X.g + Y.g) * 0.5f;\n    Mid.b = (X.b + Y.b) * 0.5f;\n\n    float fDir[4];\n    fDir[0] = fDir[1] = fDir[2] = fDir[3] = 0.0f;\n\n    for(size_t iPoint = 0; iPoint < cPixels; iPoint++)\n    {\n        HDRColorA Pt;\n        Pt.r = (pPoints[pIndex[iPoint]].r - Mid.r) * Dir.r;\n        Pt.g = (pPoints[pIndex[iPoint]].g - Mid.g) * Dir.g;\n        Pt.b = (pPoints[pIndex[iPoint]].b - Mid.b) * Dir.b;\n\n        float f;\n        f = Pt.r + Pt.g + Pt.b; fDir[0] += f * f;\n        f = Pt.r + Pt.g - Pt.b; fDir[1] += f * f;\n        f = Pt.r - Pt.g + Pt.b; fDir[2] += f * f;\n        f = Pt.r - Pt.g - Pt.b; fDir[3] += f * f;\n    }\n\n    float fDirMax = fDir[0];\n    size_t  iDirMax = 0;\n\n    for(size_t iDir = 1; iDir < 4; iDir++)\n    {\n        if(fDir[iDir] > fDirMax)\n        {\n            fDirMax = fDir[iDir];\n            iDirMax = iDir;\n        }\n    }\n\n    if(iDirMax & 2) std::swap( X.g, Y.g );\n    if(iDirMax & 1) std::swap( X.b, Y.b );\n\n    // Two color block.. no need to root-find\n    if(fAB < 1.0f / 4096.0f)\n    {\n        pX->r = X.r; pX->g = X.g; pX->b = X.b;\n        pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n        return 0.0f;\n    }\n\n    // Use Newton's Method to find local minima of sum-of-squares error.\n    float fSteps = (float) (cSteps - 1);\n\n    for(size_t iIteration = 0; iIteration < 8; iIteration++)\n    {\n        // Calculate new steps\n        HDRColorA pSteps[4] = {};\n\n        for(size_t iStep = 0; iStep < cSteps; iStep++)\n        {\n            pSteps[iStep].r = X.r * pC[iStep] + Y.r * pD[iStep];\n            pSteps[iStep].g = X.g * pC[iStep] + Y.g * pD[iStep];\n            pSteps[iStep].b = X.b * pC[iStep] + Y.b * pD[iStep];\n        }\n\n        // Calculate color direction\n        Dir.r = Y.r - X.r;\n        Dir.g = Y.g - X.g;\n        Dir.b = Y.b - X.b;\n\n        float fLen = (Dir.r * Dir.r + Dir.g * Dir.g + Dir.b * Dir.b);\n\n        if(fLen < (1.0f / 4096.0f))\n            break;\n\n        float fScale = fSteps / fLen;\n\n        Dir.r *= fScale;\n        Dir.g *= fScale;\n        Dir.b *= fScale;\n\n        // Evaluate function, and derivatives\n        float d2X = 0.0f, d2Y = 0.0f;\n        HDRColorA dX(0.0f, 0.0f, 0.0f, 0.0f), dY(0.0f, 0.0f, 0.0f, 0.0f);\n\n        for(size_t iPoint = 0; iPoint < cPixels; iPoint++)\n        {\n            float fDot = (pPoints[pIndex[iPoint]].r - X.r) * Dir.r + \n                (pPoints[pIndex[iPoint]].g - X.g) * Dir.g + \n                (pPoints[pIndex[iPoint]].b - X.b) * Dir.b;\n\n            size_t iStep;\n            if(fDot <= 0.0f)\n                iStep = 0;\n            if(fDot >= fSteps)\n                iStep = cSteps - 1;\n            else\n                iStep = size_t(fDot + 0.5f);\n\n            HDRColorA Diff;\n            Diff.r = pSteps[iStep].r - pPoints[pIndex[iPoint]].r;\n            Diff.g = pSteps[iStep].g - pPoints[pIndex[iPoint]].g;\n            Diff.b = pSteps[iStep].b - pPoints[pIndex[iPoint]].b;\n\n            float fC = pC[iStep] * (1.0f / 8.0f);\n            float fD = pD[iStep] * (1.0f / 8.0f);\n\n            d2X  += fC * pC[iStep];\n            dX.r += fC * Diff.r;\n            dX.g += fC * Diff.g;\n            dX.b += fC * Diff.b;\n\n            d2Y  += fD * pD[iStep];\n            dY.r += fD * Diff.r;\n            dY.g += fD * Diff.g;\n            dY.b += fD * Diff.b;\n        }\n\n        // Move endpoints\n        if(d2X > 0.0f)\n        {\n            float f = -1.0f / d2X;\n\n            X.r += dX.r * f;\n            X.g += dX.g * f;\n            X.b += dX.b * f;\n        }\n\n        if(d2Y > 0.0f)\n        {\n            float f = -1.0f / d2Y;\n\n            Y.r += dY.r * f;\n            Y.g += dY.g * f;\n            Y.b += dY.b * f;\n        }\n\n        if((dX.r * dX.r < fEpsilon) && (dX.g * dX.g < fEpsilon) && (dX.b * dX.b < fEpsilon) &&\n            (dY.r * dY.r < fEpsilon) && (dY.g * dY.g < fEpsilon) && (dY.b * dY.b < fEpsilon))\n        {\n            break;\n        }\n    }\n\n    pX->r = X.r; pX->g = X.g; pX->b = X.b;\n    pY->r = Y.r; pY->g = Y.g; pY->b = Y.b;\n    return fError;\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic float OptimizeRGBA(_In_reads_(NUM_PIXELS_PER_BLOCK) const HDRColorA* const pPoints,\n                          _Out_ HDRColorA* pX, _Out_ HDRColorA* pY,\n                          _In_ size_t cSteps, _In_ size_t cPixels, _In_reads_(cPixels) const size_t* pIndex)\n{\n    float fError = FLT_MAX;\n    const float *pC = (3 == cSteps) ? pC3 : pC4;\n    const float *pD = (3 == cSteps) ? pD3 : pD4;\n\n    // Find Min and Max points, as starting point\n    HDRColorA X(1.0f, 1.0f, 1.0f, 1.0f);\n    HDRColorA Y(0.0f, 0.0f, 0.0f, 0.0f);\n\n    for(size_t iPoint = 0; iPoint < cPixels; iPoint++)\n    {\n        if(pPoints[pIndex[iPoint]].r < X.r) X.r = pPoints[pIndex[iPoint]].r;\n        if(pPoints[pIndex[iPoint]].g < X.g) X.g = pPoints[pIndex[iPoint]].g;\n        if(pPoints[pIndex[iPoint]].b < X.b) X.b = pPoints[pIndex[iPoint]].b;\n        if(pPoints[pIndex[iPoint]].a < X.a) X.a = pPoints[pIndex[iPoint]].a;\n        if(pPoints[pIndex[iPoint]].r > Y.r) Y.r = pPoints[pIndex[iPoint]].r;\n        if(pPoints[pIndex[iPoint]].g > Y.g) Y.g = pPoints[pIndex[iPoint]].g;\n        if(pPoints[pIndex[iPoint]].b > Y.b) Y.b = pPoints[pIndex[iPoint]].b;\n        if(pPoints[pIndex[iPoint]].a > Y.a) Y.a = pPoints[pIndex[iPoint]].a;\n    }\n\n    // Diagonal axis\n    HDRColorA AB = Y - X;\n    float fAB = AB * AB;\n\n    // Single color block.. no need to root-find\n    if(fAB < FLT_MIN)\n    {\n        *pX = X;\n        *pY = Y;\n        return 0.0f;\n    }\n\n    // Try all four axis directions, to determine which diagonal best fits data\n    float fABInv = 1.0f / fAB;\n    HDRColorA Dir = AB * fABInv;\n    HDRColorA Mid = (X + Y) * 0.5f;\n\n    float fDir[8];\n    fDir[0] = fDir[1] = fDir[2] = fDir[3] = fDir[4] = fDir[5] = fDir[6] = fDir[7] = 0.0f;\n\n    for(size_t iPoint = 0; iPoint < cPixels; iPoint++)\n    {\n        HDRColorA Pt;\n        Pt.r = (pPoints[pIndex[iPoint]].r - Mid.r) * Dir.r;\n        Pt.g = (pPoints[pIndex[iPoint]].g - Mid.g) * Dir.g;\n        Pt.b = (pPoints[pIndex[iPoint]].b - Mid.b) * Dir.b;\n        Pt.a = (pPoints[pIndex[iPoint]].a - Mid.a) * Dir.a;\n\n        float f;\n        f = Pt.r + Pt.g + Pt.b + Pt.a; fDir[0] += f * f;\n        f = Pt.r + Pt.g + Pt.b - Pt.a; fDir[1] += f * f;\n        f = Pt.r + Pt.g - Pt.b + Pt.a; fDir[2] += f * f;\n        f = Pt.r + Pt.g - Pt.b - Pt.a; fDir[3] += f * f;\n        f = Pt.r - Pt.g + Pt.b + Pt.a; fDir[4] += f * f;\n        f = Pt.r - Pt.g + Pt.b - Pt.a; fDir[5] += f * f;\n        f = Pt.r - Pt.g - Pt.b + Pt.a; fDir[6] += f * f;\n        f = Pt.r - Pt.g - Pt.b - Pt.a; fDir[7] += f * f;\n    }\n\n    float fDirMax = fDir[0];\n    size_t  iDirMax = 0;\n\n    for(size_t iDir = 1; iDir < 8; iDir++)\n    {\n        if(fDir[iDir] > fDirMax)\n        {\n            fDirMax = fDir[iDir];\n            iDirMax = iDir;\n        }\n    }\n\n    if(iDirMax & 4) std::swap(X.g, Y.g);\n    if(iDirMax & 2) std::swap(X.b, Y.b);\n    if(iDirMax & 1) std::swap(X.a, Y.a);\n\n    // Two color block.. no need to root-find\n    if(fAB < 1.0f / 4096.0f)\n    {\n        *pX = X;\n        *pY = Y;\n        return 0.0f;\n    }\n\n    // Use Newton's Method to find local minima of sum-of-squares error.\n    float fSteps = (float) (cSteps - 1);\n\n    for(size_t iIteration = 0; iIteration < 8 && fError > 0.0f; iIteration++)\n    {\n        // Calculate new steps\n        HDRColorA pSteps[BC7_MAX_INDICES];\n\n        LDRColorA lX, lY;\n        lX = (X * 255.0f).ToLDRColorA();\n        lY = (Y * 255.0f).ToLDRColorA();\n\n        for(size_t iStep = 0; iStep < cSteps; iStep++)\n        {\n            pSteps[iStep] = X * pC[iStep] + Y * pD[iStep];\n            //LDRColorA::Interpolate(lX, lY, i, i, wcprec, waprec, aSteps[i]);\n        }\n\n        // Calculate color direction\n        Dir = Y - X;\n        float fLen = Dir * Dir;\n        if(fLen < (1.0f / 4096.0f))\n            break;\n\n        float fScale = fSteps / fLen;\n        Dir *= fScale;\n\n        // Evaluate function, and derivatives\n        float d2X = 0.0f, d2Y = 0.0f;\n        HDRColorA dX(0.0f, 0.0f, 0.0f, 0.0f), dY(0.0f, 0.0f, 0.0f, 0.0f);\n\n        for(size_t iPoint = 0; iPoint < cPixels; ++iPoint)\n        {\n            float fDot = (pPoints[pIndex[iPoint]] - X) * Dir;\n            size_t iStep;\n            if(fDot <= 0.0f)\n                iStep = 0;\n            if(fDot >= fSteps)\n                iStep = cSteps - 1;\n            else\n                iStep = size_t(fDot + 0.5f);\n\n            HDRColorA Diff = pSteps[iStep] - pPoints[pIndex[iPoint]];\n            float fC = pC[iStep] * (1.0f / 8.0f);\n            float fD = pD[iStep] * (1.0f / 8.0f);\n\n            d2X  += fC * pC[iStep];\n            dX += Diff * fC;\n\n            d2Y  += fD * pD[iStep];\n            dY += Diff * fD;\n        }\n\n        // Move endpoints\n        if(d2X > 0.0f)\n        {\n            float f = -1.0f / d2X;\n            X += dX * f;\n        }\n\n        if(d2Y > 0.0f)\n        {\n            float f = -1.0f / d2Y;\n            Y += dY * f;\n        }\n\n        if((dX * dX < fEpsilon) && (dY * dY < fEpsilon))\n            break;\n    }\n\n    *pX = X;\n    *pY = Y;\n    return fError;\n}\n\n\n//-------------------------------------------------------------------------------------\n\nstatic float ComputeError(_Inout_ const LDRColorA& pixel, _In_reads_(1 << uIndexPrec) const LDRColorA aPalette[],\n                          _In_ uint8_t uIndexPrec, _In_ uint8_t uIndexPrec2, _Out_opt_ size_t* pBestIndex = nullptr, _Out_opt_ size_t* pBestIndex2 = nullptr)\n{\n    const size_t uNumIndices = size_t(1) << uIndexPrec;\n    const size_t uNumIndices2 = size_t(1) << uIndexPrec2;\n    float fTotalErr = 0;\n    float fBestErr = FLT_MAX;\n\n    if(pBestIndex)\n        *pBestIndex = 0;\n    if(pBestIndex2)\n        *pBestIndex2 = 0;\n\n    XMVECTOR vpixel = XMLoadUByte4( reinterpret_cast<const XMUBYTE4*>( &pixel ) );\n\n    if(uIndexPrec2 == 0)\n    {\n        for(register size_t i = 0; i < uNumIndices && fBestErr > 0; i++)\n        {\n            XMVECTOR tpixel = XMLoadUByte4( reinterpret_cast<const XMUBYTE4*>( &aPalette[i] ) );\n            // Compute ErrorMetric\n            tpixel = XMVectorSubtract( vpixel, tpixel );\n            float fErr = XMVectorGetX( XMVector4Dot( tpixel, tpixel ) );\n            if(fErr > fBestErr)\t// error increased, so we're done searching\n                break;\n            if(fErr < fBestErr)\n            {\n                fBestErr = fErr;\n                if(pBestIndex)\n                    *pBestIndex = i;\n            }\n        }\n        fTotalErr += fBestErr;\n    }\n    else\n    {\n        for(register size_t i = 0; i < uNumIndices && fBestErr > 0; i++)\n        {\n            XMVECTOR tpixel = XMLoadUByte4( reinterpret_cast<const XMUBYTE4*>( &aPalette[i] ) );\n            // Compute ErrorMetricRGB\n            tpixel = XMVectorSubtract( vpixel, tpixel );\n            float fErr = XMVectorGetX( XMVector3Dot( tpixel, tpixel ) );\n            if(fErr > fBestErr)\t// error increased, so we're done searching\n                break;\n            if(fErr < fBestErr)\n            {\n                fBestErr = fErr;\n                if(pBestIndex)\n                    *pBestIndex = i;\n            }\n        }\n        fTotalErr += fBestErr;\n        fBestErr = FLT_MAX;\n        for(register size_t i = 0; i < uNumIndices2 && fBestErr > 0; i++)\n        {\n            // Compute ErrorMetricAlpha\n            float ea = float(pixel.a) - float(aPalette[i].a);\n            float fErr = ea*ea;\n            if(fErr > fBestErr)\t// error increased, so we're done searching\n                break;\n            if(fErr < fBestErr)\n            {\n                fBestErr = fErr;\n                if(pBestIndex2)\n                    *pBestIndex2 = i;\n            }\n        }\n        fTotalErr += fBestErr;\n    }\n\n    return fTotalErr;\n}\n\n\ninline static void FillWithErrorColors( _Out_writes_(NUM_PIXELS_PER_BLOCK) HDRColorA* pOut )\n{\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n#ifdef _DEBUG\n        // Use Magenta in debug as a highly-visible error color\n        pOut[i] = HDRColorA(1.0f, 0.0f, 1.0f, 1.0f);\n#else\n        // In production use, default to black\n        pOut[i] = HDRColorA(0.0f, 0.0f, 0.0f, 1.0f);\n#endif\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// BC6H Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DX_BC6H::Decode(bool bSigned, HDRColorA* pOut) const\n{\n    assert(pOut );\n\n    size_t uStartBit = 0;\n    uint8_t uMode = GetBits(uStartBit, 2);\n    if(uMode != 0x00 && uMode != 0x01)\n    {\n        uMode = (GetBits(uStartBit, 3) << 2) | uMode;\n    }\n\n    assert( uMode < 32 );\n    _Analysis_assume_( uMode < 32 );\n\n    if ( ms_aModeToInfo[uMode] >= 0 )\n    {\n        assert(ms_aModeToInfo[uMode] < ARRAYSIZE(ms_aInfo));\n        _Analysis_assume_(ms_aModeToInfo[uMode] < ARRAYSIZE(ms_aInfo));\n        const ModeDescriptor* desc = ms_aDesc[ms_aModeToInfo[uMode]];\n\n        assert(ms_aModeToInfo[uMode] < ARRAYSIZE(ms_aDesc));\n        _Analysis_assume_(ms_aModeToInfo[uMode] < ARRAYSIZE(ms_aDesc));\n        const ModeInfo& info = ms_aInfo[ms_aModeToInfo[uMode]];\n\n        INTEndPntPair aEndPts[BC6H_MAX_REGIONS];\n        memset(aEndPts, 0, BC6H_MAX_REGIONS * 2 * sizeof(INTColor));\n        uint32_t uShape = 0;\n\n        // Read header\n        const size_t uHeaderBits = info.uPartitions > 0 ? 82 : 65;\n        while(uStartBit < uHeaderBits)\n        {\n            size_t uCurBit = uStartBit;\n            if(GetBit(uStartBit))\n            {\n                switch(desc[uCurBit].m_eField)\n                {\n                case D:  uShape |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case RW: aEndPts[0].A.r |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case RX: aEndPts[0].B.r |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case RY: aEndPts[1].A.r |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case RZ: aEndPts[1].B.r |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case GW: aEndPts[0].A.g |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case GX: aEndPts[0].B.g |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case GY: aEndPts[1].A.g |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case GZ: aEndPts[1].B.g |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case BW: aEndPts[0].A.b |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case BX: aEndPts[0].B.b |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case BY: aEndPts[1].A.b |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                case BZ: aEndPts[1].B.b |= 1 << uint32_t(desc[uCurBit].m_uBit); break;\n                default:\n                    {\n#ifdef _DEBUG\n                        OutputDebugStringA( \"BC6H: Invalid header bits encountered during decoding\\n\" );\n#endif\n                        FillWithErrorColors( pOut );\n                        return;\n                    }\n                }\n            }\n        }\n\n        assert( uShape < 64 );\n        _Analysis_assume_( uShape < 64 ); \n\n        // Sign extend necessary end points\n        if(bSigned)\n        {\n            aEndPts[0].A.SignExtend(info.RGBAPrec[0][0]);\n        }\n        if(bSigned || info.bTransformed)\n        {\n            assert( info.uPartitions < BC6H_MAX_REGIONS );\n            _Analysis_assume_( info.uPartitions < BC6H_MAX_REGIONS );\n            for(size_t p = 0; p <= info.uPartitions; ++p)\n            {\n                if(p != 0)\n                {\n                    aEndPts[p].A.SignExtend(info.RGBAPrec[p][0]);\n                }\n                aEndPts[p].B.SignExtend(info.RGBAPrec[p][1]);\n            }\n        }\n\n        // Inverse transform the end points\n        if(info.bTransformed)\n        {\n            TransformInverse(aEndPts, info.RGBAPrec[0][0], bSigned);\n        }\n\n        // Read indices\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            size_t uNumBits = IsFixUpOffset(info.uPartitions, uShape, i) ? info.uIndexPrec-1 : info.uIndexPrec;\n            if ( uStartBit + uNumBits > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC6H: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n            uint8_t uIndex = GetBits(uStartBit, uNumBits);\n\n            if ( uIndex >= ((info.uPartitions > 0) ? 8 : 16) )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC6H: Invalid index encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n            size_t uRegion = g_aPartitionTable[info.uPartitions][uShape][i];\n            assert( uRegion < BC6H_MAX_REGIONS );\n            _Analysis_assume_( uRegion < BC6H_MAX_REGIONS );\n\n            // Unquantize endpoints and interpolate\n            int r1 = Unquantize(aEndPts[uRegion].A.r, info.RGBAPrec[0][0].r, bSigned);\n            int g1 = Unquantize(aEndPts[uRegion].A.g, info.RGBAPrec[0][0].g, bSigned);\n            int b1 = Unquantize(aEndPts[uRegion].A.b, info.RGBAPrec[0][0].b, bSigned);\n            int r2 = Unquantize(aEndPts[uRegion].B.r, info.RGBAPrec[0][0].r, bSigned);\n            int g2 = Unquantize(aEndPts[uRegion].B.g, info.RGBAPrec[0][0].g, bSigned);\n            int b2 = Unquantize(aEndPts[uRegion].B.b, info.RGBAPrec[0][0].b, bSigned);\n            const int* aWeights = info.uPartitions > 0 ? g_aWeights3 : g_aWeights4;\n            INTColor fc;\n            fc.r = FinishUnquantize((r1 * (BC67_WEIGHT_MAX - aWeights[uIndex]) + r2 * aWeights[uIndex] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT, bSigned);\n            fc.g = FinishUnquantize((g1 * (BC67_WEIGHT_MAX - aWeights[uIndex]) + g2 * aWeights[uIndex] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT, bSigned);\n            fc.b = FinishUnquantize((b1 * (BC67_WEIGHT_MAX - aWeights[uIndex]) + b2 * aWeights[uIndex] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT, bSigned);\n\n            HALF rgb[3];\n            fc.ToF16(rgb, bSigned);\n\n            pOut[i].r = XMConvertHalfToFloat( rgb[0] );\n            pOut[i].g = XMConvertHalfToFloat( rgb[1] );\n            pOut[i].b = XMConvertHalfToFloat( rgb[2] );\n            pOut[i].a = 1.0f;\n        }\n    }\n    else\n    {\n#ifdef _DEBUG\n        const char* warnstr = \"BC6H: Invalid mode encountered during decoding\\n\";\n        switch( uMode )\n        {\n        case 0x13:  warnstr = \"BC6H: Reserved mode 10011 encountered during decoding\\n\"; break;\n        case 0x17:  warnstr = \"BC6H: Reserved mode 10111 encountered during decoding\\n\"; break;\n        case 0x1B:  warnstr = \"BC6H: Reserved mode 11011 encountered during decoding\\n\"; break;\n        case 0x1F:  warnstr = \"BC6H: Reserved mode 11111 encountered during decoding\\n\"; break;\n        }\n        OutputDebugStringA( warnstr );\n#endif\n        // Per the BC6H format spec, we must return opaque black\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            pOut[i] = HDRColorA(0.0f, 0.0f, 0.0f, 1.0f);\n        }\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::Encode(bool bSigned, const HDRColorA* const pIn)\n{\n    assert( pIn );\n\n    EncodeParams EP(pIn, bSigned);\n\n    for(EP.uMode = 0; EP.uMode < ARRAYSIZE(ms_aInfo) && EP.fBestErr > 0; ++EP.uMode)\n    {\n        const uint8_t uShapes = ms_aInfo[EP.uMode].uPartitions ? 32 : 1;\n        // Number of rough cases to look at. reasonable values of this are 1, uShapes/4, and uShapes\n        // uShapes/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out\n        const size_t uItems = std::max<size_t>(1, uShapes >> 2);\n        float afRoughMSE[BC6H_MAX_SHAPES];\n        uint8_t auShape[BC6H_MAX_SHAPES];\n\n        // pick the best uItems shapes and refine these.\n        for(EP.uShape = 0; EP.uShape < uShapes; ++EP.uShape)\n        {\n            size_t uShape = EP.uShape;\n            afRoughMSE[uShape] = RoughMSE(&EP);\n            auShape[uShape] = static_cast<uint8_t>(uShape);\n        }\n\n        // Bubble up the first uItems items\n        for(register size_t i = 0; i < uItems; i++)\n        {\n            for(register size_t j = i + 1; j < uShapes; j++)\n            {\n                if(afRoughMSE[i] > afRoughMSE[j])\n                {\n                    std::swap(afRoughMSE[i], afRoughMSE[j]);\n                    std::swap(auShape[i], auShape[j]);\n                }\n            }\n        }\n\n        for(size_t i = 0; i < uItems && EP.fBestErr > 0; i++)\n        {\n            EP.uShape = auShape[i];\n            Refine(&EP);\n        }\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nint D3DX_BC6H::Quantize(int iValue, int prec, bool bSigned)\n{\n    assert(prec > 1);\t// didn't bother to make it work for 1\n    int q, s = 0;\n    if(bSigned)\n    {\n        assert(iValue >= -F16MAX && iValue <= F16MAX);\n        if(iValue < 0)\n        {\n            s = 1;\n            iValue = -iValue;\n        }\n        q = (prec >= 16) ? iValue : (iValue << (prec-1)) / (F16MAX+1);\n        if(s)\n            q = -q;\n        assert (q > -(1 << (prec-1)) && q < (1 << (prec-1)));\n    }\n    else\n    {\n        assert(iValue >= 0 && iValue <= F16MAX);\n        q = (prec >= 15) ? iValue : (iValue << prec) / (F16MAX+1);\n        assert (q >= 0 && q < (1 << prec));\n    }\n\n    return q;\n}\n\n_Use_decl_annotations_\nint D3DX_BC6H::Unquantize(int comp, uint8_t uBitsPerComp, bool bSigned)\n{\n    int unq = 0, s = 0;\n    if(bSigned)\n    {\n        if(uBitsPerComp >= 16)\n        {\n            unq = comp;\n        }\n        else\n        {\n            if(comp < 0)\n            {\n                s = 1;\n                comp = -comp;\n            }\n\n            if(comp == 0) unq = 0;\n            else if(comp >= ((1 << (uBitsPerComp - 1)) - 1)) unq = 0x7FFF;\n            else unq = ((comp << 15) + 0x4000) >> (uBitsPerComp-1);\n\n            if(s) unq = -unq;\n        }\n    }\n    else\n    {\n        if(uBitsPerComp >= 15) unq = comp;\n        else if(comp == 0) unq = 0;\n        else if(comp == ((1 << uBitsPerComp) - 1)) unq = 0xFFFF;\n        else unq = ((comp << 16) + 0x8000) >> uBitsPerComp;\n    }\n\n    return unq;\n}\n\n_Use_decl_annotations_\nint D3DX_BC6H::FinishUnquantize(int comp, bool bSigned)\n{\n    if(bSigned)\n    {\n        return (comp < 0) ? -(((-comp) * 31) >> 5) : (comp * 31) >> 5;  // scale the magnitude by 31/32\n    }\n    else\n    {\n        return (comp * 31) >> 6;                                        // scale the magnitude by 31/64\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nbool D3DX_BC6H::EndPointsFit(const EncodeParams* pEP, const INTEndPntPair aEndPts[])\n{\n    assert( pEP );\n    const bool bTransformed = ms_aInfo[pEP->uMode].bTransformed;\n    const bool bIsSigned = pEP->bSigned;\n    const LDRColorA& Prec0 = ms_aInfo[pEP->uMode].RGBAPrec[0][0];\n    const LDRColorA& Prec1 = ms_aInfo[pEP->uMode].RGBAPrec[0][1];\n    const LDRColorA& Prec2 = ms_aInfo[pEP->uMode].RGBAPrec[1][0];\n    const LDRColorA& Prec3 = ms_aInfo[pEP->uMode].RGBAPrec[1][1];\n\n    INTColor aBits[4];\n    aBits[0].r = NBits(aEndPts[0].A.r, bIsSigned);\n    aBits[0].g = NBits(aEndPts[0].A.g, bIsSigned);\n    aBits[0].b = NBits(aEndPts[0].A.b, bIsSigned);\n    aBits[1].r = NBits(aEndPts[0].B.r, bTransformed || bIsSigned);\n    aBits[1].g = NBits(aEndPts[0].B.g, bTransformed || bIsSigned);\n    aBits[1].b = NBits(aEndPts[0].B.b, bTransformed || bIsSigned);\n    if(aBits[0].r > Prec0.r || aBits[1].r > Prec1.r ||\n       aBits[0].g > Prec0.g || aBits[1].g > Prec1.g ||\n       aBits[0].b > Prec0.b || aBits[1].b > Prec1.b)\n        return false;\n\n    if(ms_aInfo[pEP->uMode].uPartitions)\n    {\n        aBits[2].r = NBits(aEndPts[1].A.r, bTransformed || bIsSigned);\n        aBits[2].g = NBits(aEndPts[1].A.g, bTransformed || bIsSigned);\n        aBits[2].b = NBits(aEndPts[1].A.b, bTransformed || bIsSigned);\n        aBits[3].r = NBits(aEndPts[1].B.r, bTransformed || bIsSigned);\n        aBits[3].g = NBits(aEndPts[1].B.g, bTransformed || bIsSigned);\n        aBits[3].b = NBits(aEndPts[1].B.b, bTransformed || bIsSigned);\n\n        if(aBits[2].r > Prec2.r || aBits[3].r > Prec3.r ||\n           aBits[2].g > Prec2.g || aBits[3].g > Prec3.g ||\n           aBits[2].b > Prec2.b || aBits[3].b > Prec3.b)\n            return false;\n    }\n\n    return true;\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::GeneratePaletteQuantized(const EncodeParams* pEP, const INTEndPntPair& endPts, INTColor aPalette[]) const\n{\n    assert( pEP );\n    const size_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const size_t uNumIndices = size_t(1) << uIndexPrec;\n    assert( uNumIndices > 0 );\n    _Analysis_assume_( uNumIndices > 0 );\n    const LDRColorA& Prec = ms_aInfo[pEP->uMode].RGBAPrec[0][0];\n\n    // scale endpoints\n    INTEndPntPair unqEndPts;\n    unqEndPts.A.r = Unquantize(endPts.A.r, Prec.r, pEP->bSigned); \n    unqEndPts.A.g = Unquantize(endPts.A.g, Prec.g, pEP->bSigned); \n    unqEndPts.A.b = Unquantize(endPts.A.b, Prec.b, pEP->bSigned); \n    unqEndPts.B.r = Unquantize(endPts.B.r, Prec.r, pEP->bSigned);\n    unqEndPts.B.g = Unquantize(endPts.B.g, Prec.g, pEP->bSigned);\n    unqEndPts.B.b = Unquantize(endPts.B.b, Prec.b, pEP->bSigned);\n\n    // interpolate\n    const int* aWeights = nullptr;\n    switch(uIndexPrec)\n    {\n    case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;\n    case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;\n    default:\n        assert(false);\n        for(size_t i = 0; i < uNumIndices; ++i)\n        {\n            #pragma prefast(suppress:22102 22103, \"writing blocks in two halves confuses tool\")\n            aPalette[i] = INTColor(0,0,0);\n        }\n        return;\n    }\n\n    for (size_t i = 0; i < uNumIndices; ++i)\n    {\n        aPalette[i].r = FinishUnquantize(\n            (unqEndPts.A.r * (BC67_WEIGHT_MAX - aWeights[i]) + unqEndPts.B.r * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT,\n            pEP->bSigned);\n        aPalette[i].g = FinishUnquantize(\n            (unqEndPts.A.g * (BC67_WEIGHT_MAX - aWeights[i]) + unqEndPts.B.g * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT,\n            pEP->bSigned);\n        aPalette[i].b = FinishUnquantize(\n            (unqEndPts.A.b * (BC67_WEIGHT_MAX - aWeights[i]) + unqEndPts.B.b * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT,\n            pEP->bSigned);\n    }\n}\n\n// given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr\n_Use_decl_annotations_\nfloat D3DX_BC6H::MapColorsQuantized(const EncodeParams* pEP, const INTColor aColors[], size_t np, const INTEndPntPair &endPts) const\n{\n    assert( pEP );\n\n    const uint8_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uNumIndices = 1 << uIndexPrec;\n    INTColor aPalette[BC6H_MAX_INDICES];\n    GeneratePaletteQuantized(pEP, endPts, aPalette);\n\n    float fTotErr = 0;\n    for(size_t i = 0; i < np; ++i)\n    {\n        XMVECTOR vcolors = XMLoadSInt4( reinterpret_cast<const XMINT4*>( &aColors[i] ) );\n\n        // Compute ErrorMetricRGB\n        XMVECTOR tpal = XMLoadSInt4( reinterpret_cast<const XMINT4*>( &aPalette[0] ) );\n        tpal = XMVectorSubtract( vcolors, tpal );\n        float fBestErr = XMVectorGetX( XMVector3Dot( tpal, tpal ) );\n\n        for(int j = 1; j < uNumIndices && fBestErr > 0; ++j)\n        {\n            // Compute ErrorMetricRGB\n            tpal = XMLoadSInt4( reinterpret_cast<const XMINT4*>( &aPalette[j] ) );\n            tpal = XMVectorSubtract( vcolors, tpal );\n            float fErr = XMVectorGetX( XMVector3Dot( tpal, tpal ) );\n            if(fErr > fBestErr) break;     // error increased, so we're done searching\n            if(fErr < fBestErr) fBestErr = fErr;\n        }\n        fTotErr += fBestErr;\n    }\n    return fTotErr;\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC6H::PerturbOne(const EncodeParams* pEP, const INTColor aColors[], size_t np, uint8_t ch,\n                            const INTEndPntPair& oldEndPts, INTEndPntPair& newEndPts, float fOldErr, int do_b) const\n{\n    assert( pEP );\n    uint8_t uPrec;\n    switch(ch)\n    {\n    case 0: uPrec = ms_aInfo[pEP->uMode].RGBAPrec[0][0].r; break;\n    case 1: uPrec = ms_aInfo[pEP->uMode].RGBAPrec[0][0].g; break;\n    case 2: uPrec = ms_aInfo[pEP->uMode].RGBAPrec[0][0].b; break;\n    default: assert(false); newEndPts = oldEndPts; return FLT_MAX;\n    }\n    INTEndPntPair tmpEndPts;\n    float fMinErr = fOldErr;\n    int beststep = 0;\n\n    // copy real endpoints so we can perturb them\n    tmpEndPts = newEndPts = oldEndPts;\n\n    // do a logarithmic search for the best error for this endpoint (which)\n    for(int step = 1 << (uPrec-1); step; step >>= 1)\n    {\n        bool bImproved = false;\n        for(int sign = -1; sign <= 1; sign += 2)\n        {\n            if(do_b == 0)\n            {\n                tmpEndPts.A[ch] = newEndPts.A[ch] + sign * step;\n                if(tmpEndPts.A[ch] < 0 || tmpEndPts.A[ch] >= (1 << uPrec))\n                    continue;\n            }\n            else\n            {\n                tmpEndPts.B[ch] = newEndPts.B[ch] + sign * step;\n                if(tmpEndPts.B[ch] < 0 || tmpEndPts.B[ch] >= (1 << uPrec))\n                    continue;\n            }\n\n            float fErr = MapColorsQuantized(pEP, aColors, np, tmpEndPts);\n\n            if(fErr < fMinErr)\n            {\n                bImproved = true;\n                fMinErr = fErr;\n                beststep = sign * step;\n            }\n        }\n        // if this was an improvement, move the endpoint and continue search from there\n        if(bImproved)\n        {\n            if(do_b == 0)\n                newEndPts.A[ch] += beststep;\n            else\n                newEndPts.B[ch] += beststep;\n        }\n    }\n    return fMinErr;\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::OptimizeOne(const EncodeParams* pEP, const INTColor aColors[], size_t np, float aOrgErr,\n                            const INTEndPntPair &aOrgEndPts, INTEndPntPair &aOptEndPts) const\n{\n    assert( pEP );\n    float aOptErr = aOrgErr;\n    aOptEndPts.A = aOrgEndPts.A;\n    aOptEndPts.B = aOrgEndPts.B;\n\n    INTEndPntPair new_a, new_b;\n    INTEndPntPair newEndPts;\n    int do_b;\n\n    // now optimize each channel separately\n    for(uint8_t ch = 0; ch < 3; ++ch)\n    {\n        // figure out which endpoint when perturbed gives the most improvement and start there\n        // if we just alternate, we can easily end up in a local minima\n        float fErr0 = PerturbOne(pEP, aColors, np, ch, aOptEndPts, new_a, aOptErr, 0);\t// perturb endpt A\n        float fErr1 = PerturbOne(pEP, aColors, np, ch, aOptEndPts, new_b, aOptErr, 1);\t// perturb endpt B\n\n        if(fErr0 < fErr1)\n        {\n            if(fErr0 >= aOptErr) continue;\n            aOptEndPts.A[ch] = new_a.A[ch];\n            aOptErr = fErr0;\n            do_b = 1;\t\t// do B next\n        }\n        else\n        {\n            if(fErr1 >= aOptErr) continue;\n            aOptEndPts.B[ch] = new_b.B[ch];\n            aOptErr = fErr1;\n            do_b = 0;\t\t// do A next\n        }\n\n        // now alternate endpoints and keep trying until there is no improvement\n        for(;;)\n        {\n            float fErr = PerturbOne(pEP, aColors, np, ch, aOptEndPts, newEndPts, aOptErr, do_b);\n            if(fErr >= aOptErr)\n                break;\n            if(do_b == 0)\n                aOptEndPts.A[ch] = newEndPts.A[ch];\n            else\n                aOptEndPts.B[ch] = newEndPts.B[ch];\n            aOptErr = fErr;\n            do_b = 1 - do_b;\t// now move the other endpoint\n        }\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::OptimizeEndPoints(const EncodeParams* pEP, const float aOrgErr[], const INTEndPntPair aOrgEndPts[], INTEndPntPair aOptEndPts[]) const\n{\n    assert( pEP );\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC6H_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS );\n    INTColor aPixels[NUM_PIXELS_PER_BLOCK];\n    \n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        // collect the pixels in the region\n        size_t np = 0;\n        for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            if(g_aPartitionTable[p][pEP->uShape][i] == p)\n            {\n                aPixels[np++] = pEP->aIPixels[i];\n            }\n        }\n\n        OptimizeOne(pEP, aPixels, np, aOrgErr[p], aOrgEndPts[p], aOptEndPts[p]);\n    }\n}\n\n// Swap endpoints as needed to ensure that the indices at fix up have a 0 high-order bit\n_Use_decl_annotations_\nvoid D3DX_BC6H::SwapIndices(const EncodeParams* pEP, INTEndPntPair aEndPts[], size_t aIndices[])\n{\n    assert( pEP );\n    const size_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    const size_t uNumIndices = size_t(1) << ms_aInfo[pEP->uMode].uIndexPrec;\n    const size_t uHighIndexBit = uNumIndices >> 1;\n\n    assert( uPartitions < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n\n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        size_t i = g_aFixUp[uPartitions][pEP->uShape][p];\n        assert(g_aPartitionTable[uPartitions][pEP->uShape][i] == p);\n        if(aIndices[i] & uHighIndexBit)\n        {\n            // high bit is set, swap the aEndPts and indices for this region\n            std::swap(aEndPts[p].A, aEndPts[p].B);\n\n            for(size_t j = 0; j < NUM_PIXELS_PER_BLOCK; ++j)\n                if(g_aPartitionTable[uPartitions][pEP->uShape][j] == p)\n                    aIndices[j] = uNumIndices - 1 - aIndices[j];\n        }\n    }\n}\n\n// assign indices given a tile, shape, and quantized endpoints, return toterr for each region\n_Use_decl_annotations_\nvoid D3DX_BC6H::AssignIndices(const EncodeParams* pEP, const INTEndPntPair aEndPts[], size_t aIndices[], float aTotErr[]) const\n{\n    assert( pEP );\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    const uint8_t uNumIndices = 1 << ms_aInfo[pEP->uMode].uIndexPrec;\n\n    assert( uPartitions < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n\n    // build list of possibles\n    INTColor aPalette[BC6H_MAX_REGIONS][BC6H_MAX_INDICES];\n\n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        GeneratePaletteQuantized(pEP, aEndPts[p], aPalette[p]);\n        aTotErr[p] = 0;\n    }\n\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        const uint8_t uRegion = g_aPartitionTable[uPartitions][pEP->uShape][i];\n        assert( uRegion < BC6H_MAX_REGIONS );\n        _Analysis_assume_( uRegion < BC6H_MAX_REGIONS );\n        float fBestErr = Norm(pEP->aIPixels[i], aPalette[uRegion][0]);\n        aIndices[i] = 0;\n\n        for(uint8_t j = 1; j < uNumIndices && fBestErr > 0; ++j)\n        {\n            float fErr = Norm(pEP->aIPixels[i], aPalette[uRegion][j]);\n            if(fErr > fBestErr) break;\t// error increased, so we're done searching\n            if(fErr < fBestErr)\n            {\n                fBestErr = fErr;\n                aIndices[i] = j;\n            }\n        }\n        aTotErr[uRegion] += fBestErr;\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::QuantizeEndPts(const EncodeParams* pEP, INTEndPntPair* aQntEndPts) const\n{\n    assert( pEP && aQntEndPts );\n    const INTEndPntPair* aUnqEndPts = pEP->aUnqEndPts[pEP->uShape];\n    const LDRColorA& Prec = ms_aInfo[pEP->uMode].RGBAPrec[0][0];\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC6H_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS );\n\n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        aQntEndPts[p].A.r = Quantize(aUnqEndPts[p].A.r, Prec.r, pEP->bSigned);\n        aQntEndPts[p].A.g = Quantize(aUnqEndPts[p].A.g, Prec.g, pEP->bSigned);\n        aQntEndPts[p].A.b = Quantize(aUnqEndPts[p].A.b, Prec.b, pEP->bSigned);\n        aQntEndPts[p].B.r = Quantize(aUnqEndPts[p].B.r, Prec.r, pEP->bSigned);\n        aQntEndPts[p].B.g = Quantize(aUnqEndPts[p].B.g, Prec.g, pEP->bSigned);\n        aQntEndPts[p].B.b = Quantize(aUnqEndPts[p].B.b, Prec.b, pEP->bSigned);\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::EmitBlock(const EncodeParams* pEP, const INTEndPntPair aEndPts[], const size_t aIndices[])\n{\n    assert( pEP );\n    const uint8_t uRealMode = ms_aInfo[pEP->uMode].uMode;\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    const uint8_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const size_t uHeaderBits = uPartitions > 0 ? 82 : 65;\n    const ModeDescriptor* desc = ms_aDesc[pEP->uMode];\n    size_t uStartBit = 0;\n\n    while(uStartBit < uHeaderBits)\n    {\n        switch(desc[uStartBit].m_eField)\n        {\n        case M:  SetBit(uStartBit, uint8_t(uRealMode >> desc[uStartBit].m_uBit) & 0x01); break;\n        case D:  SetBit(uStartBit, uint8_t(pEP->uShape >> desc[uStartBit].m_uBit) & 0x01); break;\n        case RW: SetBit(uStartBit, uint8_t(aEndPts[0].A.r >> desc[uStartBit].m_uBit) & 0x01); break;\n        case RX: SetBit(uStartBit, uint8_t(aEndPts[0].B.r >> desc[uStartBit].m_uBit) & 0x01); break;\n        case RY: SetBit(uStartBit, uint8_t(aEndPts[1].A.r >> desc[uStartBit].m_uBit) & 0x01); break;\n        case RZ: SetBit(uStartBit, uint8_t(aEndPts[1].B.r >> desc[uStartBit].m_uBit) & 0x01); break;\n        case GW: SetBit(uStartBit, uint8_t(aEndPts[0].A.g >> desc[uStartBit].m_uBit) & 0x01); break;\n        case GX: SetBit(uStartBit, uint8_t(aEndPts[0].B.g >> desc[uStartBit].m_uBit) & 0x01); break;\n        case GY: SetBit(uStartBit, uint8_t(aEndPts[1].A.g >> desc[uStartBit].m_uBit) & 0x01); break;\n        case GZ: SetBit(uStartBit, uint8_t(aEndPts[1].B.g >> desc[uStartBit].m_uBit) & 0x01); break;\n        case BW: SetBit(uStartBit, uint8_t(aEndPts[0].A.b >> desc[uStartBit].m_uBit) & 0x01); break;\n        case BX: SetBit(uStartBit, uint8_t(aEndPts[0].B.b >> desc[uStartBit].m_uBit) & 0x01); break;\n        case BY: SetBit(uStartBit, uint8_t(aEndPts[1].A.b >> desc[uStartBit].m_uBit) & 0x01); break;\n        case BZ: SetBit(uStartBit, uint8_t(aEndPts[1].B.b >> desc[uStartBit].m_uBit) & 0x01); break;\n        default: assert(false);\n        }\n    }\n\n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        if(IsFixUpOffset(ms_aInfo[pEP->uMode].uPartitions, pEP->uShape, i))\n            SetBits(uStartBit, uIndexPrec - 1, static_cast<uint8_t>( aIndices[i] ));\n        else\n            SetBits(uStartBit, uIndexPrec, static_cast<uint8_t>( aIndices[i] ));\n    }\n    assert(uStartBit == 128);\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::Refine(EncodeParams* pEP)\n{\n    assert( pEP );\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC6H_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS );\n\n    const bool bTransformed = ms_aInfo[pEP->uMode].bTransformed;\n    float aOrgErr[BC6H_MAX_REGIONS], aOptErr[BC6H_MAX_REGIONS];\n    INTEndPntPair aOrgEndPts[BC6H_MAX_REGIONS], aOptEndPts[BC6H_MAX_REGIONS];\n    size_t aOrgIdx[NUM_PIXELS_PER_BLOCK], aOptIdx[NUM_PIXELS_PER_BLOCK];\n\n    QuantizeEndPts(pEP, aOrgEndPts);\n    AssignIndices(pEP, aOrgEndPts, aOrgIdx, aOrgErr);\n    SwapIndices(pEP, aOrgEndPts, aOrgIdx);\n\n    if(bTransformed) TransformForward(aOrgEndPts);\n    if(EndPointsFit(pEP, aOrgEndPts))\n    {\n        if(bTransformed) TransformInverse(aOrgEndPts, ms_aInfo[pEP->uMode].RGBAPrec[0][0], pEP->bSigned);\n        OptimizeEndPoints(pEP, aOrgErr, aOrgEndPts, aOptEndPts);\n        AssignIndices(pEP, aOptEndPts, aOptIdx, aOptErr);\n        SwapIndices(pEP, aOptEndPts, aOptIdx);\n\n        float fOrgTotErr = 0.0f, fOptTotErr = 0.0f;\n        for(size_t p = 0; p <= uPartitions; ++p)\n        {\n            fOrgTotErr += aOrgErr[p];\n            fOptTotErr += aOptErr[p];\n        }\n\n        if(bTransformed) TransformForward(aOptEndPts);\n        if(EndPointsFit(pEP, aOptEndPts) && fOptTotErr < fOrgTotErr && fOptTotErr < pEP->fBestErr)\n        {\n            pEP->fBestErr = fOptTotErr;\n            EmitBlock(pEP, aOptEndPts, aOptIdx);\n        }\n        else if(fOrgTotErr < pEP->fBestErr)\n        {\n            // either it stopped fitting when we optimized it, or there was no improvement\n            // so go back to the unoptimized endpoints which we know will fit\n            if(bTransformed) TransformForward(aOrgEndPts);\n            pEP->fBestErr = fOrgTotErr;\n            EmitBlock(pEP, aOrgEndPts, aOrgIdx);\n        }\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC6H::GeneratePaletteUnquantized(const EncodeParams* pEP, size_t uRegion, INTColor aPalette[])\n{\n    assert( pEP );\n    assert( uRegion < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n    _Analysis_assume_( uRegion < BC6H_MAX_REGIONS && pEP->uShape < BC6H_MAX_SHAPES );\n    const INTEndPntPair& endPts = pEP->aUnqEndPts[pEP->uShape][uRegion];\n    const uint8_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uNumIndices = 1 << uIndexPrec;\n    assert(uNumIndices > 0);\n    _Analysis_assume_(uNumIndices > 0);\n\n    const int* aWeights = nullptr;\n    switch(uIndexPrec)\n    {\n    case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;\n    case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;\n    default:\n        assert(false);\n        for(size_t i = 0; i < uNumIndices; ++i)\n        {\n            #pragma prefast(suppress:22102 22103, \"writing blocks in two halves confuses tool\")\n            aPalette[i] = INTColor(0,0,0);\n        }\n        return;\n    }\n\n    for(register size_t i = 0; i < uNumIndices; ++i)\n    {\n        aPalette[i].r = (endPts.A.r * (BC67_WEIGHT_MAX - aWeights[i]) + endPts.B.r * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT;\n        aPalette[i].g = (endPts.A.g * (BC67_WEIGHT_MAX - aWeights[i]) + endPts.B.g * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT;\n        aPalette[i].b = (endPts.A.b * (BC67_WEIGHT_MAX - aWeights[i]) + endPts.B.b * aWeights[i] + BC67_WEIGHT_ROUND) >> BC67_WEIGHT_SHIFT;\n    }\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC6H::MapColors(const EncodeParams* pEP, size_t uRegion, size_t np, const size_t* auIndex) const\n{\n    assert( pEP );\n    const uint8_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uNumIndices = 1 << uIndexPrec;\n    INTColor aPalette[BC6H_MAX_INDICES];\n    GeneratePaletteUnquantized(pEP, uRegion, aPalette);\n\n    float fTotalErr = 0.0f;\n    for(size_t i = 0; i < np; ++i)\n    {\n        float fBestErr = Norm(pEP->aIPixels[auIndex[i]], aPalette[0]);\n        for(uint8_t j = 1; j < uNumIndices && fBestErr > 0.0f; ++j)\n        {\n            float fErr = Norm(pEP->aIPixels[auIndex[i]], aPalette[j]);\n            if(fErr > fBestErr) break;      // error increased, so we're done searching\n            if(fErr < fBestErr) fBestErr = fErr;\n        }\n        fTotalErr += fBestErr;\n    }\n\n    return fTotalErr;\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC6H::RoughMSE(EncodeParams* pEP) const\n{\n    assert( pEP );\n    assert( pEP->uShape < BC6H_MAX_SHAPES);\n    _Analysis_assume_( pEP->uShape < BC6H_MAX_SHAPES);\n\n    INTEndPntPair* aEndPts = pEP->aUnqEndPts[pEP->uShape];\n\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC6H_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC6H_MAX_REGIONS );\n\n    size_t auPixIdx[NUM_PIXELS_PER_BLOCK];\n\n    float fError = 0.0f;\n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        size_t np = 0;\n        for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            if(g_aPartitionTable[uPartitions][pEP->uShape][i] == p)\n            {\n                auPixIdx[np++] = i;\n            }\n        }\n\n        // handle simple cases\n        assert(np > 0);\n        if(np == 1)\n        {\n            aEndPts[p].A = pEP->aIPixels[auPixIdx[0]];\n            aEndPts[p].B = pEP->aIPixels[auPixIdx[0]];\n            continue;\n        }\n        else if(np == 2)\n        {\n            aEndPts[p].A = pEP->aIPixels[auPixIdx[0]];\n            aEndPts[p].B = pEP->aIPixels[auPixIdx[1]];\n            continue;\n        }\n\n        HDRColorA epA, epB;\n        OptimizeRGB(pEP->aHDRPixels, &epA, &epB, 4, np, auPixIdx);\n        aEndPts[p].A.Set(epA, pEP->bSigned);\n        aEndPts[p].B.Set(epB, pEP->bSigned);\n        if(pEP->bSigned)\n        {\n            aEndPts[p].A.Clamp(-F16MAX, F16MAX);\n            aEndPts[p].B.Clamp(-F16MAX, F16MAX);\n        }\n        else\n        {\n            aEndPts[p].A.Clamp(0, F16MAX);\n            aEndPts[p].B.Clamp(0, F16MAX);\n        }\n\n        fError += MapColors(pEP, p, np, auPixIdx);\n    }\n\n    return fError;\n}\n\n\n\n//-------------------------------------------------------------------------------------\n// BC7 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DX_BC7::Decode(HDRColorA* pOut) const\n{\n    assert( pOut );\n\n    size_t uFirst = 0;\n    while(uFirst < 128 && !GetBit(uFirst)) {}\n    uint8_t uMode = uint8_t(uFirst - 1);\n\n    if(uMode < 8)\n    {\n        const uint8_t uPartitions = ms_aInfo[uMode].uPartitions;\n        assert( uPartitions < BC7_MAX_REGIONS );\n        _Analysis_assume_( uPartitions < BC7_MAX_REGIONS );\n\n        const uint8_t uNumEndPts = (uPartitions + 1) << 1;\n        const uint8_t uIndexPrec = ms_aInfo[uMode].uIndexPrec;\n        const uint8_t uIndexPrec2 = ms_aInfo[uMode].uIndexPrec2;\n        register size_t i;\n        size_t uStartBit = uMode + 1;\n        uint8_t P[6];\n        uint8_t uShape = GetBits(uStartBit, ms_aInfo[uMode].uPartitionBits);\n        assert( uShape < BC7_MAX_SHAPES );\n        _Analysis_assume_( uShape < BC7_MAX_SHAPES );\n\n        uint8_t uRotation = GetBits(uStartBit, ms_aInfo[uMode].uRotationBits);\n        assert( uRotation < 4 );\n\n        uint8_t uIndexMode = GetBits(uStartBit, ms_aInfo[uMode].uIndexModeBits);\n        assert( uIndexMode < 2 );\n\n        LDRColorA c[BC7_MAX_REGIONS << 1];\n        const LDRColorA RGBAPrec = ms_aInfo[uMode].RGBAPrec;\n        const LDRColorA RGBAPrecWithP = ms_aInfo[uMode].RGBAPrecWithP;\n\n        assert( uNumEndPts <= (BC7_MAX_REGIONS << 1) );\n\n        // Red channel\n        for(i = 0; i < uNumEndPts; i++)\n        {\n            if ( uStartBit + RGBAPrec.r > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n            c[i].r = GetBits(uStartBit, RGBAPrec.r);\n        }\n\n        // Green channel\n        for(i = 0; i < uNumEndPts; i++)\n        {\n            if ( uStartBit + RGBAPrec.g > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n             c[i].g = GetBits(uStartBit, RGBAPrec.g);\n        }\n\n        // Blue channel\n        for(i = 0; i < uNumEndPts; i++)\n        {\n            if ( uStartBit + RGBAPrec.b > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n            c[i].b = GetBits(uStartBit, RGBAPrec.b);\n        }\n\n        // Alpha channel\n        for(i = 0; i < uNumEndPts; i++)\n        {\n            if ( uStartBit + RGBAPrec.a > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n            c[i].a = RGBAPrec.a ? GetBits(uStartBit, RGBAPrec.a) : 255;\n        }\n\n        // P-bits\n        assert( ms_aInfo[uMode].uPBits <= 6 );\n        _Analysis_assume_( ms_aInfo[uMode].uPBits <= 6 );\n        for(i = 0; i < ms_aInfo[uMode].uPBits; i++)\n        {\n            if ( uStartBit > 127 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n\n            P[i] = GetBit(uStartBit);\n        }\n\n        if(ms_aInfo[uMode].uPBits)\n        {\n            for(i = 0; i < uNumEndPts; i++)\n            {\n                size_t pi = i * ms_aInfo[uMode].uPBits / uNumEndPts;\n                for(register uint8_t ch = 0; ch < BC7_NUM_CHANNELS; ch++)\n                {\n                    if(RGBAPrec[ch] != RGBAPrecWithP[ch])\n                    {\n                        c[i][ch] = (c[i][ch] << 1) | P[pi];\n                    }\n                }\n            }\n        }\n\n        for(i = 0; i < uNumEndPts; i++)\n        {\n            c[i] = Unquantize(c[i], RGBAPrecWithP);\n        }\n\n        uint8_t w1[NUM_PIXELS_PER_BLOCK], w2[NUM_PIXELS_PER_BLOCK];\n\n        // read color indices\n        for(i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n        {\n            size_t uNumBits = IsFixUpOffset(ms_aInfo[uMode].uPartitions, uShape, i) ? uIndexPrec - 1 : uIndexPrec;\n            if ( uStartBit + uNumBits > 128 )\n            {\n#ifdef _DEBUG\n                OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                FillWithErrorColors( pOut );\n                return;\n            }\n            w1[i] = GetBits(uStartBit, uNumBits);\n        }\n\n        // read alpha indices\n        if(uIndexPrec2)\n        {\n            for(i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n            {\n                size_t uNumBits = i ? uIndexPrec2 : uIndexPrec2 - 1;\n                if ( uStartBit + uNumBits > 128 )\n                {\n#ifdef _DEBUG\n                    OutputDebugStringA( \"BC7: Invalid block encountered during decoding\\n\" );\n#endif\n                    FillWithErrorColors( pOut );\n                    return;\n                }\n                w2[i] = GetBits(uStartBit, uNumBits );\n            }\n        }\n\n        for(i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n        {\n            uint8_t uRegion = g_aPartitionTable[uPartitions][uShape][i];\n            LDRColorA outPixel;\n            if(uIndexPrec2 == 0)\n            {\n                LDRColorA::Interpolate(c[uRegion << 1], c[(uRegion << 1) + 1], w1[i], w1[i], uIndexPrec, uIndexPrec, outPixel);\n            }\n            else\n            {\n                if(uIndexMode == 0)\n                {\n                    LDRColorA::Interpolate(c[uRegion << 1], c[(uRegion << 1) + 1], w1[i], w2[i], uIndexPrec, uIndexPrec2, outPixel);\n                }\n                else\n                {\n                    LDRColorA::Interpolate(c[uRegion << 1], c[(uRegion << 1) + 1], w2[i], w1[i], uIndexPrec2, uIndexPrec, outPixel);\n                }\n            }\n\n            switch(uRotation)\n            {\n            case 1: std::swap(outPixel.r, outPixel.a); break;\n            case 2: std::swap(outPixel.g, outPixel.a); break;\n            case 3: std::swap(outPixel.b, outPixel.a); break;\n            }\n\n            pOut[i] = HDRColorA(outPixel);\n        }\n    }\n    else\n    {\n#ifdef _DEBUG\n        OutputDebugStringA( \"BC7: Reserved mode 8 encountered during decoding\\n\" );\n#endif\n        // Per the BC7 format spec, we must return transparent black\n        memset( pOut, 0, sizeof(HDRColorA) * NUM_PIXELS_PER_BLOCK );\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC7::Encode(bool skip3subsets, const HDRColorA* const pIn)\n{\n    assert( pIn );\n\n    D3DX_BC7 final = *this;\n    EncodeParams EP(pIn);\n    float fMSEBest = FLT_MAX;\n    \n    for(size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n    {\n        EP.aLDRPixels[i].r = uint8_t( std::max<float>( 0.0f, std::min<float>( 255.0f, pIn[i].r * 255.0f + 0.01f ) ) );\n        EP.aLDRPixels[i].g = uint8_t( std::max<float>( 0.0f, std::min<float>( 255.0f, pIn[i].g * 255.0f + 0.01f ) ) );\n        EP.aLDRPixels[i].b = uint8_t( std::max<float>( 0.0f, std::min<float>( 255.0f, pIn[i].b * 255.0f + 0.01f ) ) );\n        EP.aLDRPixels[i].a = uint8_t( std::max<float>( 0.0f, std::min<float>( 255.0f, pIn[i].a * 255.0f + 0.01f ) ) );\n    }\n\n    for(EP.uMode = 0; EP.uMode < 8 && fMSEBest > 0; ++EP.uMode)\n    {\n        if ( skip3subsets && (EP.uMode == 0 || EP.uMode == 2) )\n        {\n            // 3 subset modes tend to be used rarely and add significant compression time\n            continue;\n        }\n\n        const size_t uShapes = size_t(1) << ms_aInfo[EP.uMode].uPartitionBits;\n        assert( uShapes <= BC7_MAX_SHAPES );\n        _Analysis_assume_( uShapes <= BC7_MAX_SHAPES );\n\n        const size_t uNumRots = size_t(1) << ms_aInfo[EP.uMode].uRotationBits;\n        const size_t uNumIdxMode = size_t(1) << ms_aInfo[EP.uMode].uIndexModeBits;\n        // Number of rough cases to look at. reasonable values of this are 1, uShapes/4, and uShapes\n        // uShapes/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out\n        const size_t uItems = std::max<size_t>(1, uShapes >> 2);\n        float afRoughMSE[BC7_MAX_SHAPES];\n        size_t auShape[BC7_MAX_SHAPES];\n\n        for(size_t r = 0; r < uNumRots && fMSEBest > 0; ++r)\n        {\n            switch(r)\n            {\n            case 1: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].r, EP.aLDRPixels[i].a); break;\n            case 2: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].g, EP.aLDRPixels[i].a); break;\n            case 3: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].b, EP.aLDRPixels[i].a); break;\n            }\n\n            for(size_t im = 0; im < uNumIdxMode && fMSEBest > 0; ++im)\n            {\n                // pick the best uItems shapes and refine these.\n                for(size_t s = 0; s < uShapes; s++)\n                {\n                    afRoughMSE[s] = RoughMSE(&EP, s, im);\n                    auShape[s] = s;\n                }\n\n                // Bubble up the first uItems items\n                for(size_t i = 0; i < uItems; i++)\n                {\n                    for(size_t j = i + 1; j < uShapes; j++)\n                    {\n                        if(afRoughMSE[i] > afRoughMSE[j])\n                        {\n                            std::swap(afRoughMSE[i], afRoughMSE[j]);\n                            std::swap(auShape[i], auShape[j]);\n                        }\n                    }\n                }\n\n                for(size_t i = 0; i < uItems && fMSEBest > 0; i++)\n                {\n                    float fMSE = Refine(&EP, auShape[i], r, im);\n                    if(fMSE < fMSEBest)\n                    {\n                        final = *this;\n                        fMSEBest = fMSE;\n                    }\n                }\n            }\n\n            switch(r)\n            {\n            case 1: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].r, EP.aLDRPixels[i].a); break;\n            case 2: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].g, EP.aLDRPixels[i].a); break;\n            case 3: for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++) std::swap(EP.aLDRPixels[i].b, EP.aLDRPixels[i].a); break;\n            }\n        }\n    }\n\n    *this = final;\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DX_BC7::GeneratePaletteQuantized(const EncodeParams* pEP, size_t uIndexMode, const LDREndPntPair& endPts, LDRColorA aPalette[]) const\n{\n    assert( pEP );\n    const size_t uIndexPrec = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec2 : ms_aInfo[pEP->uMode].uIndexPrec;\n    const size_t uIndexPrec2 = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec : ms_aInfo[pEP->uMode].uIndexPrec2;\n    const size_t uNumIndices = size_t(1) << uIndexPrec;\n    const size_t uNumIndices2 = size_t(1) << uIndexPrec2;\n    assert( uNumIndices > 0 && uNumIndices2 > 0 );\n    _Analysis_assume_( uNumIndices > 0 && uNumIndices2 > 0 );\n    assert( (uNumIndices <= BC7_MAX_INDICES) && (uNumIndices2 <= BC7_MAX_INDICES) );\n    _Analysis_assume_( (uNumIndices <= BC7_MAX_INDICES) && (uNumIndices2 <= BC7_MAX_INDICES) );\n\n    LDRColorA a = Unquantize(endPts.A, ms_aInfo[pEP->uMode].RGBAPrecWithP);\n    LDRColorA b = Unquantize(endPts.B, ms_aInfo[pEP->uMode].RGBAPrecWithP);\n    if(uIndexPrec2 == 0)\n    {\n        for(register size_t i = 0; i < uNumIndices; i++)\n            LDRColorA::Interpolate(a, b, i, i, uIndexPrec, uIndexPrec, aPalette[i]);\n    }\n    else\n    {\n        for(register size_t i = 0; i < uNumIndices; i++)\n            LDRColorA::InterpolateRGB(a, b, i, uIndexPrec, aPalette[i]);\n        for(register size_t i = 0; i < uNumIndices2; i++)\n            LDRColorA::InterpolateA(a, b, i, uIndexPrec2, aPalette[i]);\n    }\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC7::PerturbOne(const EncodeParams* pEP, const LDRColorA aColors[], size_t np, size_t uIndexMode, size_t ch,\n                           const LDREndPntPair &oldEndPts, LDREndPntPair &newEndPts, float fOldErr, uint8_t do_b) const\n{\n    assert( pEP );\n    const int prec = ms_aInfo[pEP->uMode].RGBAPrecWithP[ch];\n    LDREndPntPair tmp_endPts = newEndPts = oldEndPts;\n    float fMinErr = fOldErr;\n    uint8_t* pnew_c = (do_b ? &newEndPts.B[ch] : &newEndPts.A[ch]);\n    uint8_t* ptmp_c = (do_b ? &tmp_endPts.B[ch] : &tmp_endPts.A[ch]);\n\n    // do a logarithmic search for the best error for this endpoint (which)\n    for(int step = 1 << (prec-1); step; step >>= 1)\n    {\n        bool bImproved = false;\n        int beststep = 0;\n        for(int sign = -1; sign <= 1; sign += 2)\n        {\n            int tmp = int(*pnew_c) + sign * step;\n            if(tmp < 0 || tmp >= (1 << prec))\n                continue;\n            else\n                *ptmp_c = (uint8_t) tmp;\n\n            float fTotalErr = MapColors(pEP, aColors, np, uIndexMode, tmp_endPts, fMinErr);\n            if(fTotalErr < fMinErr)\n            {\n                bImproved = true;\n                fMinErr = fTotalErr;\n                beststep = sign * step;\n            }\n        }\n\n        // if this was an improvement, move the endpoint and continue search from there\n        if(bImproved)\n            *pnew_c = uint8_t(int(*pnew_c) + beststep);\n    }\n    return fMinErr;\n}\n\n// perturb the endpoints at least -3 to 3.\n// always ensure endpoint ordering is preserved (no need to overlap the scan)\n_Use_decl_annotations_\nvoid D3DX_BC7::Exhaustive(const EncodeParams* pEP, const LDRColorA aColors[], size_t np, size_t uIndexMode, size_t ch,\n                          float& fOrgErr, LDREndPntPair& optEndPt) const\n{\n    assert( pEP );\n    const uint8_t uPrec = ms_aInfo[pEP->uMode].RGBAPrecWithP[ch];\n    LDREndPntPair tmpEndPt;\n    if(fOrgErr == 0)\n        return;\n\n    int delta = 5;\n\n    // ok figure out the range of A and B\n    tmpEndPt = optEndPt;\n    int alow = std::max<int>(0, int(optEndPt.A[ch]) - delta);\n    int ahigh = std::min<int>((1 << uPrec) - 1, int(optEndPt.A[ch]) + delta);\n    int blow = std::max<int>(0, int(optEndPt.B[ch]) - delta);\n    int bhigh = std::min<int>((1 << uPrec) - 1, int(optEndPt.B[ch]) + delta);\n    int amin = 0;\n    int bmin = 0;\n\n    float fBestErr = fOrgErr;\n    if(optEndPt.A[ch] <= optEndPt.B[ch])\n    {\n        // keep a <= b\n        for(int a = alow; a <= ahigh; ++a)\n        {\n            for(int b = std::max<int>(a, blow); b < bhigh; ++b)\n            {\n                tmpEndPt.A[ch] = (uint8_t) a;\n                tmpEndPt.B[ch] = (uint8_t) b;\n\n                float fErr = MapColors(pEP, aColors, np, uIndexMode, tmpEndPt, fBestErr);\n                if(fErr < fBestErr)\n                {\n                    amin = a;\n                    bmin = b;\n                    fBestErr = fErr;\n                }\n            }\n        }\n    }\n    else\n    {\n        // keep b <= a\n        for(int b = blow; b < bhigh; ++b)\n        {\n            for(int a = std::max<int>(b, alow); a <= ahigh; ++a)\n            {\n                tmpEndPt.A[ch] = (uint8_t) a;\n                tmpEndPt.B[ch] = (uint8_t) b;\n\n                float fErr = MapColors(pEP, aColors, np, uIndexMode, tmpEndPt, fBestErr);\n                if(fErr < fBestErr)\n                {\n                    amin = a;\n                    bmin = b;\n                    fBestErr = fErr;\n                }\n            }\n        }\n    }\n\n    if(fBestErr < fOrgErr)\n    {\n        optEndPt.A[ch] = (uint8_t) amin;\n        optEndPt.B[ch] = (uint8_t) bmin;\n        fOrgErr = fBestErr;\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC7::OptimizeOne(const EncodeParams* pEP, const LDRColorA aColors[], size_t np, size_t uIndexMode,\n                           float fOrgErr, const LDREndPntPair& org, LDREndPntPair& opt) const\n{\n    assert( pEP );\n\n    float fOptErr = fOrgErr;\n    opt = org;\n\n    LDREndPntPair new_a, new_b;\n    LDREndPntPair newEndPts;\n    uint8_t do_b;\n\n    // now optimize each channel separately\n    for(size_t ch = 0; ch < BC7_NUM_CHANNELS; ++ch)\n    {\n        if(ms_aInfo[pEP->uMode].RGBAPrecWithP[ch] == 0)\n            continue;\n\n        // figure out which endpoint when perturbed gives the most improvement and start there\n        // if we just alternate, we can easily end up in a local minima\n        float fErr0 = PerturbOne(pEP, aColors, np, uIndexMode, ch, opt, new_a, fOptErr, 0);\t// perturb endpt A\n        float fErr1 = PerturbOne(pEP, aColors, np, uIndexMode, ch, opt, new_b, fOptErr, 1);\t// perturb endpt B\n\n        uint8_t& copt_a = opt.A[ch];\n        uint8_t& copt_b = opt.B[ch];\n        uint8_t& cnew_a = new_a.A[ch];\n        uint8_t& cnew_b = new_a.B[ch];\n\n        if(fErr0 < fErr1)\n        {\n            if(fErr0 >= fOptErr)\n                continue;\n            copt_a = cnew_a;\n            fOptErr = fErr0;\n            do_b = 1;\t\t// do B next\n        }\n        else\n        {\n            if(fErr1 >= fOptErr)\n                continue;\n            copt_b = cnew_b;\n            fOptErr = fErr1;\n            do_b = 0;\t\t// do A next\n        }\n\n        // now alternate endpoints and keep trying until there is no improvement\n        for( ; ; )\n        {\n            float fErr = PerturbOne(pEP, aColors, np, uIndexMode, ch, opt, newEndPts, fOptErr, do_b);\n            if(fErr >= fOptErr)\n                break;\n            if(do_b == 0)\n                copt_a = cnew_a;\n            else\n                copt_b = cnew_b;\n            fOptErr = fErr;\n            do_b = 1 - do_b;\t// now move the other endpoint\n        }\n    }\n\n    // finally, do a small exhaustive search around what we think is the global minima to be sure\n    for(size_t ch = 0; ch < BC7_NUM_CHANNELS; ch++)\n        Exhaustive(pEP, aColors, np, uIndexMode, ch, fOptErr, opt);\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC7::OptimizeEndPoints(const EncodeParams* pEP, size_t uShape, size_t uIndexMode, const float afOrgErr[],\n                                 const LDREndPntPair aOrgEndPts[], LDREndPntPair aOptEndPts[]) const\n{\n    assert( pEP );\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC7_MAX_REGIONS && uShape < BC7_MAX_SHAPES );\n    _Analysis_assume_( uPartitions < BC7_MAX_REGIONS && uShape < BC7_MAX_SHAPES );\n\n    LDRColorA aPixels[NUM_PIXELS_PER_BLOCK];\n\n    for(size_t p = 0; p <= uPartitions; ++p)\n    {\n        // collect the pixels in the region\n        size_t np = 0;\n        for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n            if(g_aPartitionTable[uPartitions][uShape][i] == p)\n                aPixels[np++] = pEP->aLDRPixels[i];\n\n        OptimizeOne(pEP, aPixels, np, uIndexMode, afOrgErr[p], aOrgEndPts[p], aOptEndPts[p]);\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC7::AssignIndices(const EncodeParams* pEP, size_t uShape, size_t uIndexMode, LDREndPntPair endPts[], size_t aIndices[], size_t aIndices2[],\n                             float afTotErr[]) const\n{\n    assert( pEP );\n    assert( uShape < BC7_MAX_SHAPES );\n    _Analysis_assume_( uShape < BC7_MAX_SHAPES );\n\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC7_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC7_MAX_REGIONS );\n\n    const uint8_t uIndexPrec = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec2 : ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uIndexPrec2 = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec : ms_aInfo[pEP->uMode].uIndexPrec2;\n    const uint8_t uNumIndices = 1 << uIndexPrec;\n    const uint8_t uNumIndices2 = 1 << uIndexPrec2;\n\n    assert( (uNumIndices <= BC7_MAX_INDICES) && (uNumIndices2 <= BC7_MAX_INDICES) );\n    _Analysis_assume_( (uNumIndices <= BC7_MAX_INDICES) && (uNumIndices2 <= BC7_MAX_INDICES) );\n\n    const uint8_t uHighestIndexBit = uNumIndices >> 1;\n    const uint8_t uHighestIndexBit2 = uNumIndices2 >> 1;\n    LDRColorA aPalette[BC7_MAX_REGIONS][BC7_MAX_INDICES];\n\n    // build list of possibles\n    for(size_t p = 0; p <= uPartitions; p++)\n    {\n        GeneratePaletteQuantized(pEP, uIndexMode, endPts[p], aPalette[p]);\n        afTotErr[p] = 0;\n    }\n\n    for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n    {\n        uint8_t uRegion = g_aPartitionTable[uPartitions][uShape][i];\n        assert( uRegion < BC7_MAX_REGIONS );\n        _Analysis_assume_( uRegion < BC7_MAX_REGIONS );\n        afTotErr[uRegion] += ComputeError(pEP->aLDRPixels[i], aPalette[uRegion], uIndexPrec, uIndexPrec2, &(aIndices[i]), &(aIndices2[i]));\n    }\n\n    // swap endpoints as needed to ensure that the indices at index_positions have a 0 high-order bit\n    if(uIndexPrec2 == 0)\n    {\n        for(register size_t p = 0; p <= uPartitions; p++)\n        {\n            if(aIndices[g_aFixUp[uPartitions][uShape][p]] & uHighestIndexBit)\n            {\n                std::swap(endPts[p].A, endPts[p].B);\n                for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n                    if(g_aPartitionTable[uPartitions][uShape][i] == p)\n                        aIndices[i] = uNumIndices - 1 - aIndices[i];\n            }\n            assert((aIndices[g_aFixUp[uPartitions][uShape][p]] & uHighestIndexBit) == 0);\n        }\n    }\n    else\n    {\n        for(register size_t p = 0; p <= uPartitions; p++)\n        {\n            if(aIndices[g_aFixUp[uPartitions][uShape][p]] & uHighestIndexBit)\n            {\n                std::swap(endPts[p].A.r, endPts[p].B.r);\n                std::swap(endPts[p].A.g, endPts[p].B.g);\n                std::swap(endPts[p].A.b, endPts[p].B.b);\n                for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n                    if(g_aPartitionTable[uPartitions][uShape][i] == p)\n                        aIndices[i] = uNumIndices - 1 - aIndices[i];\n            }\n            assert((aIndices[g_aFixUp[uPartitions][uShape][p]] & uHighestIndexBit) == 0);\n\n            if(aIndices2[0] & uHighestIndexBit2)\n            {\n                std::swap(endPts[p].A.a, endPts[p].B.a);\n                for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n                    aIndices2[i] = uNumIndices2 - 1 - aIndices2[i];\n            }\n            assert((aIndices2[0] & uHighestIndexBit2) == 0);\n        }\n    }\n}\n\n_Use_decl_annotations_\nvoid D3DX_BC7::EmitBlock(const EncodeParams* pEP, size_t uShape, size_t uRotation, size_t uIndexMode, const LDREndPntPair aEndPts[], const size_t aIndex[], const size_t aIndex2[])\n{\n    assert( pEP );\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC7_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC7_MAX_REGIONS );\n\n    const size_t uPBits = ms_aInfo[pEP->uMode].uPBits;\n    const size_t uIndexPrec = ms_aInfo[pEP->uMode].uIndexPrec;\n    const size_t uIndexPrec2 = ms_aInfo[pEP->uMode].uIndexPrec2;\n    const LDRColorA RGBAPrec = ms_aInfo[pEP->uMode].RGBAPrec;\n    const LDRColorA RGBAPrecWithP = ms_aInfo[pEP->uMode].RGBAPrecWithP;\n    register size_t i;\n    size_t uStartBit = 0;\n    SetBits(uStartBit, pEP->uMode, 0);\n    SetBits(uStartBit, 1, 1);\n    SetBits(uStartBit, ms_aInfo[pEP->uMode].uRotationBits, static_cast<uint8_t>( uRotation ));\n    SetBits(uStartBit, ms_aInfo[pEP->uMode].uIndexModeBits, static_cast<uint8_t>( uIndexMode ));\n    SetBits(uStartBit, ms_aInfo[pEP->uMode].uPartitionBits, static_cast<uint8_t>( uShape ));\n\n    if(uPBits)\n    {\n        const size_t uNumEP = size_t(1 + uPartitions) << 1;\n        uint8_t aPVote[BC7_MAX_REGIONS << 1] = {0,0,0,0,0,0};\n        uint8_t aCount[BC7_MAX_REGIONS << 1] = {0,0,0,0,0,0};\n        for(uint8_t ch = 0; ch < BC7_NUM_CHANNELS; ch++)\n        {\n            uint8_t ep = 0;\n            for(i = 0; i <= uPartitions; i++)\n            {\n                if(RGBAPrec[ch] == RGBAPrecWithP[ch])\n                {\n                    SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].A[ch]);\n                    SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].B[ch]);\n                }\n                else\n                {\n                    SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].A[ch] >> 1);\n                    SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].B[ch] >> 1);\n                    size_t idx = ep++ * uPBits / uNumEP;\n                    assert(idx < (BC7_MAX_REGIONS << 1));\n                    _Analysis_assume_(idx < (BC7_MAX_REGIONS << 1));\n                    aPVote[idx] += aEndPts[i].A[ch] & 0x01;\n                    aCount[idx]++;\n                    idx = ep++ * uPBits / uNumEP;\n                    assert(idx < (BC7_MAX_REGIONS << 1));\n                    _Analysis_assume_(idx < (BC7_MAX_REGIONS << 1));\n                    aPVote[idx] += aEndPts[i].B[ch] & 0x01;\n                    aCount[idx]++;\n                }\n            }\n        }\n\n        for(i = 0; i < uPBits; i++)\n        {\n            SetBits(uStartBit, 1, aPVote[i] > (aCount[i] >> 1) ? 1 : 0);\n        }\n    }\n    else\n    {\n        for(size_t ch = 0; ch < BC7_NUM_CHANNELS; ch++)\n        {\n            for(i = 0; i <= uPartitions; i++)\n            {\n                SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].A[ch] );\n                SetBits(uStartBit, RGBAPrec[ch], aEndPts[i].B[ch] );\n            }\n        }\n    }\n\n    const size_t* aI1 = uIndexMode ? aIndex2 : aIndex;\n    const size_t* aI2 = uIndexMode ? aIndex : aIndex2;\n    for(i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n    {\n        if(IsFixUpOffset(ms_aInfo[pEP->uMode].uPartitions, uShape, i))\n            SetBits(uStartBit, uIndexPrec - 1, static_cast<uint8_t>( aI1[i] ));\n        else\n            SetBits(uStartBit, uIndexPrec, static_cast<uint8_t>( aI1[i] ));\n    }\n    if(uIndexPrec2)\n        for(i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n            SetBits(uStartBit, i ? uIndexPrec2 : uIndexPrec2 - 1, static_cast<uint8_t>( aI2[i] ));\n\n    assert(uStartBit == 128);\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC7::Refine(const EncodeParams* pEP, size_t uShape, size_t uRotation, size_t uIndexMode)\n{\n    assert( pEP );\n    assert( uShape < BC7_MAX_SHAPES );\n    _Analysis_assume_( uShape < BC7_MAX_SHAPES );\n    const LDREndPntPair* aEndPts = pEP->aEndPts[uShape];\n\n    const size_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC7_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC7_MAX_REGIONS );\n\n    LDREndPntPair aOrgEndPts[BC7_MAX_REGIONS];\n    LDREndPntPair aOptEndPts[BC7_MAX_REGIONS];\n    size_t aOrgIdx[NUM_PIXELS_PER_BLOCK];\n    size_t aOrgIdx2[NUM_PIXELS_PER_BLOCK];\n    size_t aOptIdx[NUM_PIXELS_PER_BLOCK];\n    size_t aOptIdx2[NUM_PIXELS_PER_BLOCK];\n    float aOrgErr[BC7_MAX_REGIONS];\n    float aOptErr[BC7_MAX_REGIONS];\n\n    for(register size_t p = 0; p <= uPartitions; p++)\n    {\n        aOrgEndPts[p].A = Quantize(aEndPts[p].A, ms_aInfo[pEP->uMode].RGBAPrecWithP);\n        aOrgEndPts[p].B = Quantize(aEndPts[p].B, ms_aInfo[pEP->uMode].RGBAPrecWithP);\n    }\n\n    AssignIndices(pEP, uShape, uIndexMode, aOrgEndPts, aOrgIdx, aOrgIdx2, aOrgErr);\n    OptimizeEndPoints(pEP, uShape, uIndexMode, aOrgErr, aOrgEndPts, aOptEndPts);\n    AssignIndices(pEP, uShape, uIndexMode, aOptEndPts, aOptIdx, aOptIdx2, aOptErr);\n\n    float fOrgTotErr = 0, fOptTotErr = 0;\n    for(register size_t p = 0; p <= uPartitions; p++)\n    {\n        fOrgTotErr += aOrgErr[p];\n        fOptTotErr += aOptErr[p];\n    }\n    if(fOptTotErr < fOrgTotErr)\n    {\n        EmitBlock(pEP, uShape, uRotation, uIndexMode, aOptEndPts, aOptIdx, aOptIdx2);\n        return fOptTotErr;\n    }\n    else\n    {\n        EmitBlock(pEP, uShape, uRotation, uIndexMode, aOrgEndPts, aOrgIdx, aOrgIdx2);\n        return fOrgTotErr;\n    }\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC7::MapColors(const EncodeParams* pEP, const LDRColorA aColors[], size_t np, size_t uIndexMode, const LDREndPntPair& endPts, float fMinErr) const\n{\n    assert( pEP );\n    const uint8_t uIndexPrec = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec2 : ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uIndexPrec2 = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec : ms_aInfo[pEP->uMode].uIndexPrec2;\n    LDRColorA aPalette[BC7_MAX_INDICES];\n    float fTotalErr = 0;\n\n    GeneratePaletteQuantized(pEP, uIndexMode, endPts, aPalette);\n    for(register size_t i = 0; i < np; ++i)\n    {\n        fTotalErr += ComputeError(aColors[i], aPalette, uIndexPrec, uIndexPrec2);\n        if(fTotalErr > fMinErr)   // check for early exit\n        {\n            fTotalErr = FLT_MAX;\n            break;\n        }\n    }\n\n    return fTotalErr;\n}\n\n_Use_decl_annotations_\nfloat D3DX_BC7::RoughMSE(EncodeParams* pEP, size_t uShape, size_t uIndexMode)\n{\n    assert( pEP );\n    assert( uShape < BC7_MAX_SHAPES );\n    _Analysis_assume_( uShape < BC7_MAX_SHAPES );\n    LDREndPntPair* aEndPts = pEP->aEndPts[uShape];\n\n    const uint8_t uPartitions = ms_aInfo[pEP->uMode].uPartitions;\n    assert( uPartitions < BC7_MAX_REGIONS );\n    _Analysis_assume_( uPartitions < BC7_MAX_REGIONS );\n\n    const uint8_t uIndexPrec = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec2 : ms_aInfo[pEP->uMode].uIndexPrec;\n    const uint8_t uIndexPrec2 = uIndexMode ? ms_aInfo[pEP->uMode].uIndexPrec : ms_aInfo[pEP->uMode].uIndexPrec2;\n    const uint8_t uNumIndices = 1 << uIndexPrec;\n    const uint8_t uNumIndices2 = 1 << uIndexPrec2;\n    size_t auPixIdx[NUM_PIXELS_PER_BLOCK];\n    LDRColorA aPalette[BC7_MAX_REGIONS][BC7_MAX_INDICES];\n\n    for(size_t p = 0; p <= uPartitions; p++)\n    {\n        size_t np = 0;\n        for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n        {\n            if (g_aPartitionTable[uPartitions][uShape][i] == p)\n            {\n                auPixIdx[np++] = i;\n            }\n        }\n\n        // handle simple cases\n        assert(np > 0);\n        if(np == 1)\n        {\n            aEndPts[p].A = pEP->aLDRPixels[auPixIdx[0]];\n            aEndPts[p].B = pEP->aLDRPixels[auPixIdx[0]];\n            continue;\n        }\n        else if(np == 2)\n        {\n            aEndPts[p].A = pEP->aLDRPixels[auPixIdx[0]];\n            aEndPts[p].B = pEP->aLDRPixels[auPixIdx[1]];\n            continue;\n        }\n\n        if(uIndexPrec2 == 0)\n        {\n            HDRColorA epA, epB;\n            OptimizeRGBA(pEP->aHDRPixels, &epA, &epB, 4, np, auPixIdx);\n            epA.Clamp(0.0f, 1.0f);\n            epB.Clamp(0.0f, 1.0f);\n            epA *= 255.0f;\n            epB *= 255.0f;\n            aEndPts[p].A = epA.ToLDRColorA();\n            aEndPts[p].B = epB.ToLDRColorA();\n        }\n        else\n        {\n            uint8_t uMinAlpha = 255, uMaxAlpha = 0;\n            for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)\n            {\n                uMinAlpha = std::min<uint8_t>(uMinAlpha, pEP->aLDRPixels[auPixIdx[i]].a);\n                uMaxAlpha = std::max<uint8_t>(uMaxAlpha, pEP->aLDRPixels[auPixIdx[i]].a);\n            }\n\n            HDRColorA epA, epB;\n            OptimizeRGB(pEP->aHDRPixels, &epA, &epB, 4, np, auPixIdx);\n            epA.Clamp(0.0f, 1.0f);\n            epB.Clamp(0.0f, 1.0f);\n            epA *= 255.0f;\n            epB *= 255.0f;\n            aEndPts[p].A = epA.ToLDRColorA();\n            aEndPts[p].B = epB.ToLDRColorA();\n            aEndPts[p].A.a = uMinAlpha;\n            aEndPts[p].B.a = uMaxAlpha;\n        }\n    }\n\n    if(uIndexPrec2 == 0)\n    {\n        for(size_t p = 0; p <= uPartitions; p++)\n            for(register size_t i = 0; i < uNumIndices; i++)\n                LDRColorA::Interpolate(aEndPts[p].A, aEndPts[p].B, i, i, uIndexPrec, uIndexPrec, aPalette[p][i]);\n    }\n    else\n    {\n        for(size_t p = 0; p <= uPartitions; p++)\n        {\n            for(register size_t i = 0; i < uNumIndices; i++)\n                LDRColorA::InterpolateRGB(aEndPts[p].A, aEndPts[p].B, i, uIndexPrec, aPalette[p][i]);\n            for(register size_t i = 0; i < uNumIndices2; i++)\n                LDRColorA::InterpolateA(aEndPts[p].A, aEndPts[p].B, i, uIndexPrec2, aPalette[p][i]);\n        }\n    }\n\n    float fTotalErr = 0;\n    for(register size_t i = 0; i < NUM_PIXELS_PER_BLOCK; i++)\n    {\n        uint8_t uRegion = g_aPartitionTable[uPartitions][uShape][i];\n        fTotalErr += ComputeError(pEP->aLDRPixels[i], aPalette[uRegion], uIndexPrec, uIndexPrec2);\n    }\n\n    return fTotalErr;\n}\n\n//=====================================================================================\n// Entry points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// BC6H Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC6HU(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC6H) == 16, \"D3DX_BC6H should be 16 bytes\" );\n    reinterpret_cast< const D3DX_BC6H* >( pBC )->Decode(false, reinterpret_cast<HDRColorA*>(pColor));\n}\n\n_Use_decl_annotations_\nvoid D3DXDecodeBC6HS(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC6H) == 16, \"D3DX_BC6H should be 16 bytes\" );\n    reinterpret_cast< const D3DX_BC6H* >( pBC )->Decode(true, reinterpret_cast<HDRColorA*>(pColor));\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC6HU(uint8_t *pBC, const XMVECTOR *pColor, DWORD flags)\n{\n    UNREFERENCED_PARAMETER(flags);\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC6H) == 16, \"D3DX_BC6H should be 16 bytes\" );\n    reinterpret_cast< D3DX_BC6H* >( pBC )->Encode(false, reinterpret_cast<const HDRColorA*>(pColor));\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC6HS(uint8_t *pBC, const XMVECTOR *pColor, DWORD flags)\n{\n    UNREFERENCED_PARAMETER(flags);\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC6H) == 16, \"D3DX_BC6H should be 16 bytes\" );\n    reinterpret_cast< D3DX_BC6H* >( pBC )->Encode(true, reinterpret_cast<const HDRColorA*>(pColor));\n}\n\n\n//-------------------------------------------------------------------------------------\n// BC7 Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid D3DXDecodeBC7(XMVECTOR *pColor, const uint8_t *pBC)\n{\n    assert( pColor && pBC );\n    static_assert( sizeof(D3DX_BC7) == 16, \"D3DX_BC7 should be 16 bytes\" );\n    reinterpret_cast< const D3DX_BC7* >( pBC )->Decode(reinterpret_cast<HDRColorA*>(pColor));\n}\n\n_Use_decl_annotations_\nvoid D3DXEncodeBC7(uint8_t *pBC, const XMVECTOR *pColor, DWORD flags)\n{\n    assert( pBC && pColor );\n    static_assert( sizeof(D3DX_BC7) == 16, \"D3DX_BC7 should be 16 bytes\" );\n    reinterpret_cast< D3DX_BC7* >( pBC )->Encode( !(flags& BC_FLAGS_USE_3SUBSETS), reinterpret_cast<const HDRColorA*>(pColor));\n}\n\n} // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BCDirectCompute.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// BCDirectCompute.cpp\n//  \n// Direct3D 11 Compute Shader BC Compressor\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"BCDirectCompute.h\"\n\n#if defined(_DEBUG) || defined(PROFILE)\n#pragma comment(lib,\"dxguid.lib\")\n#endif\n\nusing Microsoft::WRL::ComPtr;\n\nnamespace\n{\n    #include \"Shaders\\Compiled\\BC7Encode_EncodeBlockCS.inc\"\n    #include \"Shaders\\Compiled\\BC7Encode_TryMode02CS.inc\"\n    #include \"Shaders\\Compiled\\BC7Encode_TryMode137CS.inc\"\n    #include \"Shaders\\Compiled\\BC7Encode_TryMode456CS.inc\"\n    #include \"Shaders\\Compiled\\BC6HEncode_EncodeBlockCS.inc\"\n    #include \"Shaders\\Compiled\\BC6HEncode_TryModeG10CS.inc\"\n    #include \"Shaders\\Compiled\\BC6HEncode_TryModeLE10CS.inc\"\n\n    struct BufferBC6HBC7\n    {\n        UINT color[4];\n    };\n\n    struct ConstantsBC6HBC7\n    {\n        UINT    tex_width;\n        UINT    num_block_x;\n        UINT    format;\n        UINT    mode_id;\n        UINT    start_block_id;\n        UINT    num_total_blocks;\n        float   alpha_weight;\n        UINT    reserved;\n    };\n\n    static_assert( sizeof(ConstantsBC6HBC7) == sizeof(UINT)*8, \"Constant buffer size mismatch\" );\n\n    inline void RunComputeShader( ID3D11DeviceContext* pContext,\n                                  ID3D11ComputeShader* shader,\n                                  ID3D11ShaderResourceView** pSRVs, \n                                  UINT srvCount,\n                                  ID3D11Buffer* pCB, \n                                  ID3D11UnorderedAccessView* pUAV,\n                                  UINT X )\n    {\n        // Force UAV to nullptr before setting SRV since we are swapping buffers\n        ID3D11UnorderedAccessView* nullUAV = nullptr;\n        pContext->CSSetUnorderedAccessViews( 0, 1, &nullUAV, nullptr );\n\n        pContext->CSSetShader( shader, nullptr, 0 );\n        pContext->CSSetShaderResources( 0, srvCount, pSRVs );\n        pContext->CSSetUnorderedAccessViews( 0, 1, &pUAV, nullptr );\n        pContext->CSSetConstantBuffers( 0, 1, &pCB );\n        pContext->Dispatch( X, 1, 1 );\n    }\n\n    inline void ResetContext( ID3D11DeviceContext* pContext )\n    {\n        ID3D11UnorderedAccessView* nullUAV = nullptr;\n        pContext->CSSetUnorderedAccessViews( 0, 1, &nullUAV, nullptr );\n\n        ID3D11ShaderResourceView* nullSRV[3] = { nullptr, nullptr, nullptr };\n        pContext->CSSetShaderResources( 0, 3, nullSRV );\n\n        ID3D11Buffer* nullBuffer[1] = { nullptr };\n        pContext->CSSetConstantBuffers( 0, 1, nullBuffer );\n    }\n};\n\nnamespace DirectX\n{\n\nGPUCompressBC::GPUCompressBC() :\n    m_bcformat(DXGI_FORMAT_UNKNOWN),\n    m_srcformat(DXGI_FORMAT_UNKNOWN),\n    m_alphaWeight(1.f),\n    m_width(0),\n    m_height(0)\n{\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GPUCompressBC::Initialize( ID3D11Device* pDevice )\n{\n    if ( !pDevice )\n        return E_INVALIDARG;\n\n    // Check for DirectCompute support\n    D3D_FEATURE_LEVEL fl = pDevice->GetFeatureLevel();\n\n    if ( fl < D3D_FEATURE_LEVEL_10_0 )\n    {\n        // DirectCompute not supported on Feature Level 9.x hardware\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    if ( fl < D3D_FEATURE_LEVEL_11_0 )\n    {\n        // DirectCompute support on Feature Level 10.x hardware is optional, and this function needs it\n        D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts;\n        HRESULT hr = pDevice->CheckFeatureSupport( D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) );\n        if ( FAILED(hr) )\n        {\n            memset( &hwopts, 0, sizeof(hwopts) );\n        }\n\n        if ( !hwopts.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x )\n        {\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n    }\n\n    // Save a device reference and obtain immediate context\n    m_device = pDevice;\n\n    pDevice->GetImmediateContext( m_context.ReleaseAndGetAddressOf() );\n    assert( m_context );\n\n    //--- Create compute shader library: BC6H -----------------------------------------\n\n    // Modes 11-14\n    HRESULT hr = pDevice->CreateComputeShader( BC6HEncode_TryModeG10CS, sizeof(BC6HEncode_TryModeG10CS), nullptr, m_BC6H_tryModeG10CS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Modes 1-10\n    hr = pDevice->CreateComputeShader( BC6HEncode_TryModeLE10CS, sizeof(BC6HEncode_TryModeLE10CS), nullptr, m_BC6H_tryModeLE10CS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Encode\n    hr = pDevice->CreateComputeShader( BC6HEncode_EncodeBlockCS, sizeof(BC6HEncode_EncodeBlockCS), nullptr, m_BC6H_encodeBlockCS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    //--- Create compute shader library: BC7 ------------------------------------------\n\n    // Modes 4, 5, 6\n    hr = pDevice->CreateComputeShader( BC7Encode_TryMode456CS, sizeof(BC7Encode_TryMode456CS), nullptr, m_BC7_tryMode456CS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Modes 1, 3, 7\n    hr = pDevice->CreateComputeShader( BC7Encode_TryMode137CS, sizeof(BC7Encode_TryMode137CS), nullptr, m_BC7_tryMode137CS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Modes 0, 2\n    hr = pDevice->CreateComputeShader( BC7Encode_TryMode02CS, sizeof(BC7Encode_TryMode02CS), nullptr, m_BC7_tryMode02CS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Encode\n    hr = pDevice->CreateComputeShader( BC7Encode_EncodeBlockCS, sizeof(BC7Encode_EncodeBlockCS), nullptr, m_BC7_encodeBlockCS.ReleaseAndGetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GPUCompressBC::Prepare( size_t width, size_t height, DXGI_FORMAT format, float alphaWeight, bool skip3subsets )\n{\n    if ( !width || !height || alphaWeight < 0.f )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( (width > 0xFFFFFFFF) || (height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    m_width = width;\n    m_height = height;\n\n    m_alphaWeight = alphaWeight;\n\n    m_skip3Subsets = skip3subsets;\n\n    size_t xblocks = std::max<size_t>( 1, (width + 3) >> 2 );\n    size_t yblocks = std::max<size_t>( 1, (height + 3) >> 2 );\n    size_t num_blocks = xblocks * yblocks;\n\n    switch( format )\n    {\n    // BC6H GPU compressor takes RGBAF32 as input\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n        m_srcformat = DXGI_FORMAT_R32G32B32A32_FLOAT;\n        break;\n\n    // BC7 GPU compressor takes RGBA32 as input\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n        m_srcformat = DXGI_FORMAT_R8G8B8A8_UNORM;\n        break;\n\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        m_srcformat = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n        break;\n\n    default:\n        m_bcformat = m_srcformat = DXGI_FORMAT_UNKNOWN;\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    m_bcformat = format;\n\n    auto pDevice = m_device.Get();\n    if ( !pDevice )\n        return E_POINTER;\n\n    // Create structured buffers\n    size_t bufferSize = num_blocks * sizeof( BufferBC6HBC7 );\n    {\n        D3D11_BUFFER_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE;\n        desc.Usage = D3D11_USAGE_DEFAULT;\n        desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;\n        desc.StructureByteStride = sizeof( BufferBC6HBC7 );\n        desc.ByteWidth = static_cast<UINT>( bufferSize );\n\n        HRESULT hr = pDevice->CreateBuffer( &desc, nullptr, m_output.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n\n        hr = pDevice->CreateBuffer( &desc, nullptr, m_err1.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n\n        hr = pDevice->CreateBuffer( &desc, nullptr, m_err2.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    // Create staging output buffer\n    {\n        D3D11_BUFFER_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.Usage = D3D11_USAGE_STAGING;\n        desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n        desc.ByteWidth = static_cast<UINT>( bufferSize );\n\n        HRESULT hr = pDevice->CreateBuffer( &desc, nullptr, m_outputCPU.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    // Create constant buffer\n    {\n        D3D11_BUFFER_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;\n        desc.Usage = D3D11_USAGE_DYNAMIC;\n        desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;\n        desc.ByteWidth = sizeof( ConstantsBC6HBC7 );\n\n        HRESULT hr = pDevice->CreateBuffer( &desc, nullptr, m_constBuffer.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    // Create shader resource views\n    {\n        D3D11_SHADER_RESOURCE_VIEW_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.Buffer.NumElements = static_cast<UINT>( num_blocks );\n        desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;\n\n        HRESULT hr = pDevice->CreateShaderResourceView( m_err1.Get(), &desc, m_err1SRV.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n\n        hr = pDevice->CreateShaderResourceView( m_err2.Get(), &desc, m_err2SRV.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    // Create unordered access views\n    {\n        D3D11_UNORDERED_ACCESS_VIEW_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.Buffer.NumElements = static_cast<UINT>( num_blocks );\n        desc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER;\n\n        HRESULT hr = pDevice->CreateUnorderedAccessView( m_output.Get(), &desc, m_outputUAV.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n\n        hr = pDevice->CreateUnorderedAccessView( m_err1.Get(), &desc, m_err1UAV.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n\n        hr = pDevice->CreateUnorderedAccessView( m_err2.Get(), &desc, m_err2UAV.ReleaseAndGetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n    \n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GPUCompressBC::Compress( const Image& srcImage, const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_INVALIDARG;\n\n    if ( srcImage.width != destImage.width\n         || srcImage.height != destImage.height\n         || srcImage.width != m_width\n         || srcImage.height != m_height\n         || srcImage.format != m_srcformat\n         || destImage.format != m_bcformat )\n    {\n        return E_UNEXPECTED;\n    }\n\n    //--- Create input texture --------------------------------------------------------\n    auto pDevice = m_device.Get();\n    if ( !pDevice )\n        return E_POINTER;\n\n    // We need to avoid the hardware doing additional colorspace conversion\n    DXGI_FORMAT inputFormat = ( m_srcformat == DXGI_FORMAT_R8G8B8A8_UNORM_SRGB ) ? DXGI_FORMAT_R8G8B8A8_UNORM : m_srcformat;\n\n    ComPtr<ID3D11Texture2D> sourceTex;\n    {\n        D3D11_TEXTURE2D_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.Width = static_cast<UINT>( srcImage.width );\n        desc.Height = static_cast<UINT>( srcImage.height ); \n        desc.MipLevels = 1;\n        desc.ArraySize = 1;\n        desc.Format = inputFormat;\n        desc.SampleDesc.Count = 1;\n        desc.Usage = D3D11_USAGE_DEFAULT;\n        desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;\n\n        D3D11_SUBRESOURCE_DATA initData;\n        initData.pSysMem = srcImage.pixels;\n        initData.SysMemPitch = static_cast<DWORD>( srcImage.rowPitch );\n        initData.SysMemSlicePitch = static_cast<DWORD>( srcImage.slicePitch );\n\n        HRESULT hr = pDevice->CreateTexture2D( &desc, &initData, sourceTex.GetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    ComPtr<ID3D11ShaderResourceView> sourceSRV;\n    {\n        D3D11_SHADER_RESOURCE_VIEW_DESC desc;\n        memset( &desc, 0, sizeof(desc) );\n        desc.Texture2D.MipLevels = 1;\n        desc.Format = inputFormat;\n        desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;\n\n        HRESULT hr = pDevice->CreateShaderResourceView( sourceTex.Get(), &desc, sourceSRV.GetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            return hr;\n        }\n    }\n\n    //--- Compress using DirectCompute ------------------------------------------------\n    bool isbc7 = false;\n    switch( m_bcformat )\n    {\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n        break;\n\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        isbc7 = true;\n        break;\n\n    default:\n        return E_UNEXPECTED;\n    }\n\n    const UINT MAX_BLOCK_BATCH = 64;\n\n    auto pContext = m_context.Get();\n    if ( !pContext )\n        return E_UNEXPECTED;\n\n    size_t xblocks = std::max<size_t>( 1, (m_width + 3) >> 2 );\n    size_t yblocks = std::max<size_t>( 1, (m_height + 3) >> 2 );\n\n    UINT num_total_blocks = static_cast<UINT>( xblocks * yblocks );\n    UINT num_blocks = num_total_blocks;\n    int start_block_id = 0;\n    while (num_blocks > 0)\n    {\n        UINT n = std::min<UINT>( num_blocks, MAX_BLOCK_BATCH );\n        UINT uThreadGroupCount = n;\n\n        {\n            D3D11_MAPPED_SUBRESOURCE mapped;\n            HRESULT hr = pContext->Map( m_constBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped );\n            if ( FAILED(hr) )\n                return hr;\n\n            ConstantsBC6HBC7 param;\n            param.tex_width = static_cast<UINT>( srcImage.width );\n            param.num_block_x = static_cast<UINT>( xblocks );\n            param.format = m_bcformat;\n            param.mode_id = 0;\n            param.start_block_id = start_block_id;\n            param.num_total_blocks = num_total_blocks;\n            param.alpha_weight = m_alphaWeight;\n            memcpy( mapped.pData, &param, sizeof( param ) );\n\n            pContext->Unmap( m_constBuffer.Get(), 0 );\n        }\n\n        if ( isbc7 )\n        {\n            //--- BC7 -----------------------------------------------------------------\n            ID3D11ShaderResourceView* pSRVs[] = { sourceSRV.Get(), nullptr };\n            RunComputeShader( pContext, m_BC7_tryMode456CS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                              m_err1UAV.Get(), std::max<UINT>( (uThreadGroupCount + 3) / 4, 1) );\n\n            for ( UINT i = 0; i < 3; ++i )\n            {\n                static const UINT modes[] = { 1, 3, 7 };\n\n                // Mode 1: err1 -> err2\n                // Mode 3: err2 -> err1\n                // Mode 7: err1 -> err2\n                {\n                    D3D11_MAPPED_SUBRESOURCE mapped;\n                    HRESULT hr = pContext->Map( m_constBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped );\n                    if ( FAILED(hr) )\n                    {\n                        ResetContext( pContext );\n                        return hr;\n                    }\n\n                    ConstantsBC6HBC7 param;\n                    param.tex_width = static_cast<UINT>( srcImage.width );\n                    param.num_block_x = static_cast<UINT>( xblocks );\n                    param.format = m_bcformat;\n                    param.mode_id = modes[i];\n                    param.start_block_id = start_block_id;\n                    param.num_total_blocks = num_total_blocks;\n                    param.alpha_weight = m_alphaWeight;\n                    memcpy( mapped.pData, &param, sizeof( param ) );\n                    pContext->Unmap( m_constBuffer.Get(), 0 );\n                }\n\n                pSRVs[1] = (i & 1) ? m_err2SRV.Get() : m_err1SRV.Get();\n                RunComputeShader( pContext, m_BC7_tryMode137CS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                                  (i & 1) ? m_err1UAV.Get() : m_err2UAV.Get(), uThreadGroupCount );\n            }               \n\n            if ( !m_skip3Subsets )\n            {\n                // 3 subset modes tend to be used rarely and add significant compression time\n                for ( UINT i = 0; i < 2; ++i )\n                {\n                    static const UINT modes[] = { 0, 2 };\n                    // Mode 0: err2 -> err1\n                    // Mode 2: err1 -> err2\n                    {\n                        D3D11_MAPPED_SUBRESOURCE mapped;\n                        HRESULT hr = pContext->Map( m_constBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped );\n                        if ( FAILED(hr) )\n                        {\n                            ResetContext( pContext );\n                            return hr;\n                        }\n\n                        ConstantsBC6HBC7 param;\n                        param.tex_width = static_cast<UINT>( srcImage.width );\n                        param.num_block_x = static_cast<UINT>( xblocks );\n                        param.format = m_bcformat;\n                        param.mode_id = modes[i];\n                        param.start_block_id = start_block_id;\n                        param.num_total_blocks = num_total_blocks;\n                        param.alpha_weight = m_alphaWeight;\n                        memcpy( mapped.pData, &param, sizeof( param ) );\n                        pContext->Unmap( m_constBuffer.Get(), 0 );\n                    }\n\n                    pSRVs[1] = (i & 1) ? m_err1SRV.Get() : m_err2SRV.Get();\n                    RunComputeShader( pContext, m_BC7_tryMode02CS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                                      (i & 1) ? m_err2UAV.Get() : m_err1UAV.Get(), uThreadGroupCount );\n                }\n            }\n\n            pSRVs[1] = m_err2SRV.Get();\n            RunComputeShader( pContext, m_BC7_encodeBlockCS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                              m_outputUAV.Get(), std::max<UINT>( (uThreadGroupCount + 3) / 4, 1) );\n        }\n        else\n        {\n            //--- BC6H ----------------------------------------------------------------\n            ID3D11ShaderResourceView* pSRVs[] = { sourceSRV.Get(), nullptr };\n            RunComputeShader( pContext, m_BC6H_tryModeG10CS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                              m_err1UAV.Get(), std::max<UINT>( (uThreadGroupCount + 3) / 4, 1) );\n\n            for ( UINT i = 0; i < 10; ++i )\n            {\n                {\n                    D3D11_MAPPED_SUBRESOURCE mapped;\n                    HRESULT hr = pContext->Map( m_constBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped );\n                    if ( FAILED(hr) )\n                    {\n                        ResetContext( pContext );\n                        return hr;\n                    }\n\n                    ConstantsBC6HBC7 param;\n                    param.tex_width = static_cast<UINT>( srcImage.width );\n                    param.num_block_x = static_cast<UINT>( xblocks );\n                    param.format = m_bcformat;\n                    param.mode_id = i;\n                    param.start_block_id = start_block_id;\n                    param.num_total_blocks = num_total_blocks;\n                    memcpy( mapped.pData, &param, sizeof( param ) );\n                    pContext->Unmap( m_constBuffer.Get(), 0 );\n                }\n\n                pSRVs[1] = (i & 1) ? m_err2SRV.Get() : m_err1SRV.Get();\n                RunComputeShader( pContext, m_BC6H_tryModeLE10CS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                                  (i & 1) ? m_err1UAV.Get() : m_err2UAV.Get(), std::max<UINT>( (uThreadGroupCount + 1) / 2, 1) );\n            }               \n\n            pSRVs[1] = m_err1SRV.Get();\n            RunComputeShader( pContext, m_BC6H_encodeBlockCS.Get(), pSRVs, 2, m_constBuffer.Get(),\n                              m_outputUAV.Get(), std::max<UINT>( (uThreadGroupCount + 1) / 2, 1) );\n        }\n\n        start_block_id += n;\n        num_blocks -= n;\n    }\n\n    ResetContext( pContext );\n\n    //--- Copy output texture back to CPU ---------------------------------------------\n\n    pContext->CopyResource( m_outputCPU.Get(), m_output.Get() );\n\n    D3D11_MAPPED_SUBRESOURCE mapped;\n    HRESULT hr = pContext->Map( m_outputCPU.Get(), 0, D3D11_MAP_READ, 0, &mapped );\n    if ( SUCCEEDED(hr) )\n    {\n        const uint8_t *pSrc = reinterpret_cast<const uint8_t *>( mapped.pData );\n        uint8_t *pDest = destImage.pixels;\n\n        size_t pitch = xblocks * sizeof( BufferBC6HBC7 );\n\n        size_t rows = std::max<size_t>( 1, ( destImage.height + 3 ) >> 2 );\n\n        for( size_t h = 0; h < rows; ++h )\n        {\n            memcpy( pDest, pSrc, destImage.rowPitch );\n\n            pSrc += pitch;\n            pDest += destImage.rowPitch;\n        }\n\n        pContext->Unmap( m_outputCPU.Get(), 0 );\n    }\n\n    return hr;\n}\n\n}; // namespace"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/BCDirectCompute.h",
    "content": "//-------------------------------------------------------------------------------------\n// BCDirectCompute.h\n//  \n// Direct3D 11 Compute Shader BC Compressor\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\nnamespace DirectX\n{\n\nclass GPUCompressBC\n{\npublic:\n    GPUCompressBC();\n\n    HRESULT Initialize( _In_ ID3D11Device* pDevice );\n\n    HRESULT Prepare( _In_ size_t width, _In_ size_t height, _In_ DXGI_FORMAT format, _In_ float alphaWeight = 1.f, _In_ bool skip3subsets = true );\n\n    HRESULT Compress( _In_ const Image& srcImage, _In_ const Image& destImage );\n\n    DXGI_FORMAT GetSourceFormat() const { return m_srcformat; }\n\nprivate:\n    DXGI_FORMAT                                         m_bcformat;\n    DXGI_FORMAT                                         m_srcformat;\n    float                                               m_alphaWeight;\n    bool                                                m_skip3Subsets;\n    size_t                                              m_width;\n    size_t                                              m_height;\n\n    Microsoft::WRL::ComPtr<ID3D11Device>                m_device;\n    Microsoft::WRL::ComPtr<ID3D11DeviceContext>         m_context;\n\n    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_err1;\n    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_err1UAV;\n    Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>    m_err1SRV;\n\n    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_err2;\n    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_err2UAV;\n    Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>    m_err2SRV;\n\n    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_output;\n    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_outputCPU;\n    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_outputUAV;\n    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_constBuffer;\n    \n    // Compute shader library\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_tryModeG10CS;\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_tryModeLE10CS;\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_encodeBlockCS;\n\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode456CS;\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode137CS;\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode02CS;\n    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_encodeBlockCS;    \n};\n\n}; // namespace"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DDS.h",
    "content": "//--------------------------------------------------------------------------------------\n// dds.h\n//\n// This header defines constants and structures that are useful when parsing \n// DDS files.  DDS files were originally designed to use several structures\n// and constants that are native to DirectDraw and are defined in ddraw.h,\n// such as DDSURFACEDESC2 and DDSCAPS2.  This file defines similar \n// (compatible) constants and structures so that one can use DDS files \n// without needing to include ddraw.h.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//--------------------------------------------------------------------------------------\n\n#pragma once\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n#include <d3d11_x.h>\n#else\n#include <dxgiformat.h>\n#endif\n\n// VS 2010's stdint.h conflicts with intsafe.h\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <stdint.h>\n#pragma warning(pop)\n\nnamespace DirectX\n{\n\n#pragma pack(push,1)\n\nconst uint32_t DDS_MAGIC = 0x20534444; // \"DDS \"\n\nstruct DDS_PIXELFORMAT\n{\n    uint32_t    dwSize;\n    uint32_t    dwFlags;\n    uint32_t    dwFourCC;\n    uint32_t    dwRGBBitCount;\n    uint32_t    dwRBitMask;\n    uint32_t    dwGBitMask;\n    uint32_t    dwBBitMask;\n    uint32_t    dwABitMask;\n};\n\n#define DDS_FOURCC      0x00000004  // DDPF_FOURCC\n#define DDS_RGB         0x00000040  // DDPF_RGB\n#define DDS_RGBA        0x00000041  // DDPF_RGB | DDPF_ALPHAPIXELS\n#define DDS_LUMINANCE   0x00020000  // DDPF_LUMINANCE\n#define DDS_LUMINANCEA  0x00020001  // DDPF_LUMINANCE | DDPF_ALPHAPIXELS\n#define DDS_ALPHA       0x00000002  // DDPF_ALPHA\n#define DDS_PAL8        0x00000020  // DDPF_PALETTEINDEXED8\n\n#ifndef MAKEFOURCC\n    #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \\\n                ((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) |       \\\n                ((uint32_t)(uint8_t)(ch2) << 16) | ((uint32_t)(uint8_t)(ch3) << 24 ))\n#endif /* defined(MAKEFOURCC) */\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DXT1 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DXT2 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','2'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DXT3 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','3'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DXT4 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','4'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DXT5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','5'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_BC4_UNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','4','U'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_BC4_SNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','4','S'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_BC5_UNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','5','U'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_BC5_SNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','5','S'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_R8G8_B8G8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R','G','B','G'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_G8R8_G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G','R','G','B'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_YUY2 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('Y','U','Y','2'), 0, 0, 0, 0, 0 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A8R8G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_X8R8G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB,  0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A8B8G8R8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_X8B8G8R8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB,  0, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_G16R16 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB,  0, 32, 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_R5G6B5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 16, 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A1R5G5B5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 16, 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A4R4G4B4 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 16, 0x00000f00, 0x000000f0, 0x0000000f, 0x0000f000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_R8G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_L8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCE, 0,  8, 0xff, 0x00, 0x00, 0x00 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_L16 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCE, 0, 16, 0xffff, 0x0000, 0x0000, 0x0000 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A8L8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCEA, 0, 16, 0x00ff, 0x0000, 0x0000, 0xff00 };\n\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_A8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_ALPHA, 0, 8, 0x00, 0x00, 0x00, 0xff };\n\n// D3DFMT_A2R10G10B10/D3DFMT_A2B10G10R10 should be written using DX10 extension to avoid D3DX 10:10:10:2 reversal issue\n\n// This indicates the DDS_HEADER_DXT10 extension is present (the format is in dxgiFormat)\nextern __declspec(selectany) const DDS_PIXELFORMAT DDSPF_DX10 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','1','0'), 0, 0, 0, 0, 0 };\n\n#define DDS_HEADER_FLAGS_TEXTURE        0x00001007  // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT \n#define DDS_HEADER_FLAGS_MIPMAP         0x00020000  // DDSD_MIPMAPCOUNT\n#define DDS_HEADER_FLAGS_VOLUME         0x00800000  // DDSD_DEPTH\n#define DDS_HEADER_FLAGS_PITCH          0x00000008  // DDSD_PITCH\n#define DDS_HEADER_FLAGS_LINEARSIZE     0x00080000  // DDSD_LINEARSIZE\n\n#define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT\n#define DDS_WIDTH  0x00000004 // DDSD_WIDTH\n\n#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE\n#define DDS_SURFACE_FLAGS_MIPMAP  0x00400008 // DDSCAPS_COMPLEX | DDSCAPS_MIPMAP\n#define DDS_SURFACE_FLAGS_CUBEMAP 0x00000008 // DDSCAPS_COMPLEX\n\n#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX\n#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX\n#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY\n#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY\n#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ\n#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ\n\n#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\\\n                               DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\\\n                               DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )\n\n#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP\n\n#define DDS_FLAGS_VOLUME 0x00200000 // DDSCAPS2_VOLUME\n\n// Subset here matches D3D10_RESOURCE_DIMENSION and D3D11_RESOURCE_DIMENSION\nenum DDS_RESOURCE_DIMENSION\n{\n    DDS_DIMENSION_TEXTURE1D\t= 2,\n    DDS_DIMENSION_TEXTURE2D\t= 3,\n    DDS_DIMENSION_TEXTURE3D\t= 4,\n};\n\n// Subset here matches D3D10_RESOURCE_MISC_FLAG and D3D11_RESOURCE_MISC_FLAG\nenum DDS_RESOURCE_MISC_FLAG\n{\n    DDS_RESOURCE_MISC_TEXTURECUBE = 0x4L,\n};\n\nenum DDS_MISC_FLAGS2\n{\n    DDS_MISC_FLAGS2_ALPHA_MODE_MASK = 0x7L,\n};\n\nenum DDS_ALPHA_MODE\n{\n    DDS_ALPHA_MODE_UNKNOWN       = 0,\n    DDS_ALPHA_MODE_STRAIGHT      = 1,\n    DDS_ALPHA_MODE_PREMULTIPLIED = 2,\n    DDS_ALPHA_MODE_OPAQUE        = 3,\n    DDS_ALPHA_MODE_CUSTOM        = 4,\n};\n\nstruct DDS_HEADER\n{\n    uint32_t    dwSize;\n    uint32_t    dwFlags;\n    uint32_t    dwHeight;\n    uint32_t    dwWidth;\n    uint32_t    dwPitchOrLinearSize;\n    uint32_t    dwDepth; // only if DDS_HEADER_FLAGS_VOLUME is set in dwFlags\n    uint32_t    dwMipMapCount;\n    uint32_t    dwReserved1[11];\n    DDS_PIXELFORMAT ddspf;\n    uint32_t    dwCaps;\n    uint32_t    dwCaps2;\n    uint32_t    dwCaps3;\n    uint32_t    dwCaps4;\n    uint32_t    dwReserved2;\n};\n\nstruct DDS_HEADER_DXT10\n{\n    DXGI_FORMAT dxgiFormat;\n    uint32_t    resourceDimension;\n    uint32_t    miscFlag; // see DDS_RESOURCE_MISC_FLAG\n    uint32_t    arraySize;\n    uint32_t    miscFlags2; // see DDS_MISC_FLAGS2\n};\n\n#pragma pack(pop)\n\nstatic_assert( sizeof(DDS_HEADER) == 124, \"DDS Header size mismatch\" );\nstatic_assert( sizeof(DDS_HEADER_DXT10) == 20, \"DDS DX10 Extended Header size mismatch\");\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex.h",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTex.h\n//  \n// DirectX Texture Library\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) && (_WIN32_WINNT <= _WIN32_WINNT_WIN8)\n#error WIC is not supported on Windows Phone 8.0\n#endif\n\n// VS 2010's stdint.h conflicts with intsafe.h\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <stdint.h>\n#pragma warning(pop)\n\n#include <algorithm>\n#include <functional>\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n#include <d3d11_x.h>\n#define DCOMMON_H_INCLUDED\n#else\n#include <d3d11_1.h>\n#endif\n\n#include <ocidl.h>\n\n// VS 2010 doesn't support explicit calling convention for std::function\n#ifndef DIRECTX_STD_CALLCONV\n#if defined(_MSC_VER) && (_MSC_VER < 1700)\n#define DIRECTX_STD_CALLCONV\n#else\n#define DIRECTX_STD_CALLCONV __cdecl\n#endif\n#endif\n\n// VS 2010/2012 do not support =default =delete\n#ifndef DIRECTX_CTOR_DEFAULT\n#if defined(_MSC_VER) && (_MSC_VER < 1800)\n#define DIRECTX_CTOR_DEFAULT {}\n#define DIRECTX_CTOR_DELETE ;\n#else\n#define DIRECTX_CTOR_DEFAULT =default;\n#define DIRECTX_CTOR_DELETE =delete;\n#endif\n#endif\n\n#define DIRECTX_TEX_VERSION 132\n\nnamespace DirectX\n{\n\n    //---------------------------------------------------------------------------------\n    // DXGI Format Utilities\n    bool __cdecl IsValid( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsCompressed( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsPacked( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsVideo( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsPlanar( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsPalettized( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsDepthStencil(_In_ DXGI_FORMAT fmt );\n    bool __cdecl IsSRGB( _In_ DXGI_FORMAT fmt );\n    bool __cdecl IsTypeless( _In_ DXGI_FORMAT fmt, _In_ bool partialTypeless = true );\n\n    bool __cdecl HasAlpha( _In_ DXGI_FORMAT fmt );\n\n    size_t __cdecl BitsPerPixel( _In_ DXGI_FORMAT fmt );\n\n    size_t __cdecl BitsPerColor( _In_ DXGI_FORMAT fmt );\n\n    enum CP_FLAGS\n    {\n        CP_FLAGS_NONE               = 0x0,      // Normal operation\n        CP_FLAGS_LEGACY_DWORD       = 0x1,      // Assume pitch is DWORD aligned instead of BYTE aligned\n        CP_FLAGS_PARAGRAPH          = 0x2,      // Assume pitch is 16-byte aligned instead of BYTE aligned\n        CP_FLAGS_YMM                = 0x4,      // Assume pitch is 32-byte aligned instead of BYTE aligned\n        CP_FLAGS_ZMM                = 0x8,      // Assume pitch is 64-byte aligned instead of BYTE aligned\n        CP_FLAGS_PAGE4K             = 0x200,    // Assume pitch is 4096-byte aligned instead of BYTE aligned\n        CP_FLAGS_24BPP              = 0x10000,  // Override with a legacy 24 bits-per-pixel format size\n        CP_FLAGS_16BPP              = 0x20000,  // Override with a legacy 16 bits-per-pixel format size\n        CP_FLAGS_8BPP               = 0x40000,  // Override with a legacy 8 bits-per-pixel format size\n    };\n\n    void __cdecl ComputePitch( _In_ DXGI_FORMAT fmt, _In_ size_t width, _In_ size_t height,\n                               _Out_ size_t& rowPitch, _Out_ size_t& slicePitch, _In_ DWORD flags = CP_FLAGS_NONE );\n\n    size_t __cdecl ComputeScanlines( _In_ DXGI_FORMAT fmt, _In_ size_t height );\n\n    DXGI_FORMAT __cdecl MakeSRGB( _In_ DXGI_FORMAT fmt );\n    DXGI_FORMAT __cdecl MakeTypeless( _In_ DXGI_FORMAT fmt );\n    DXGI_FORMAT __cdecl MakeTypelessUNORM( _In_ DXGI_FORMAT fmt );\n    DXGI_FORMAT __cdecl MakeTypelessFLOAT( _In_ DXGI_FORMAT fmt );\n\n    //---------------------------------------------------------------------------------\n    // Texture metadata\n    enum TEX_DIMENSION\n        // Subset here matches D3D10_RESOURCE_DIMENSION and D3D11_RESOURCE_DIMENSION\n    {\n        TEX_DIMENSION_TEXTURE1D    = 2,\n        TEX_DIMENSION_TEXTURE2D    = 3,\n        TEX_DIMENSION_TEXTURE3D    = 4,\n    };\n\n    enum TEX_MISC_FLAG\n        // Subset here matches D3D10_RESOURCE_MISC_FLAG and D3D11_RESOURCE_MISC_FLAG\n    {\n        TEX_MISC_TEXTURECUBE = 0x4L,\n    };\n\n    enum TEX_MISC_FLAG2\n    {\n        TEX_MISC2_ALPHA_MODE_MASK = 0x7L,\n    };\n\n    enum TEX_ALPHA_MODE\n        // Matches DDS_ALPHA_MODE, encoded in MISC_FLAGS2\n    {\n        TEX_ALPHA_MODE_UNKNOWN       = 0,\n        TEX_ALPHA_MODE_STRAIGHT      = 1,\n        TEX_ALPHA_MODE_PREMULTIPLIED = 2,\n        TEX_ALPHA_MODE_OPAQUE        = 3,\n        TEX_ALPHA_MODE_CUSTOM        = 4,\n    };\n\n    struct TexMetadata\n    {\n        size_t          width;\n        size_t          height;     // Should be 1 for 1D textures\n        size_t          depth;      // Should be 1 for 1D or 2D textures\n        size_t          arraySize;  // For cubemap, this is a multiple of 6\n        size_t          mipLevels;\n        uint32_t        miscFlags;\n        uint32_t        miscFlags2;\n        DXGI_FORMAT     format;\n        TEX_DIMENSION   dimension;\n\n        size_t __cdecl ComputeIndex( _In_ size_t mip, _In_ size_t item, _In_ size_t slice ) const;\n            // Returns size_t(-1) to indicate an out-of-range error\n\n        bool __cdecl IsCubemap() const { return (miscFlags & TEX_MISC_TEXTURECUBE) != 0; }\n            // Helper for miscFlags\n\n        bool __cdecl IsPMAlpha() const { return ((miscFlags2 & TEX_MISC2_ALPHA_MODE_MASK) == TEX_ALPHA_MODE_PREMULTIPLIED) != 0; }\n        void __cdecl SetAlphaMode( TEX_ALPHA_MODE mode ) { miscFlags2 = (miscFlags2 & ~TEX_MISC2_ALPHA_MODE_MASK) | static_cast<uint32_t>(mode); }\n            // Helpers for miscFlags2\n\n        bool __cdecl IsVolumemap() const { return (dimension == TEX_DIMENSION_TEXTURE3D); }\n            // Helper for dimension\n    };\n\n    enum DDS_FLAGS\n    {\n        DDS_FLAGS_NONE                  = 0x0,\n\n        DDS_FLAGS_LEGACY_DWORD          = 0x1,\n            // Assume pitch is DWORD aligned instead of BYTE aligned (used by some legacy DDS files)\n\n        DDS_FLAGS_NO_LEGACY_EXPANSION   = 0x2,\n            // Do not implicitly convert legacy formats that result in larger pixel sizes (24 bpp, 3:3:2, A8L8, A4L4, P8, A8P8) \n\n        DDS_FLAGS_NO_R10B10G10A2_FIXUP  = 0x4,\n            // Do not use work-around for long-standing D3DX DDS file format issue which reversed the 10:10:10:2 color order masks\n\n        DDS_FLAGS_FORCE_RGB             = 0x8,\n            // Convert DXGI 1.1 BGR formats to DXGI_FORMAT_R8G8B8A8_UNORM to avoid use of optional WDDM 1.1 formats\n\n        DDS_FLAGS_NO_16BPP              = 0x10,\n            // Conversions avoid use of 565, 5551, and 4444 formats and instead expand to 8888 to avoid use of optional WDDM 1.2 formats\n\n        DDS_FLAGS_EXPAND_LUMINANCE      = 0x20,\n            // When loading legacy luminance formats expand replicating the color channels rather than leaving them packed (L8, L16, A8L8)\n\n        DDS_FLAGS_FORCE_DX10_EXT        = 0x10000,\n            // Always use the 'DX10' header extension for DDS writer (i.e. don't try to write DX9 compatible DDS files)\n\n        DDS_FLAGS_FORCE_DX10_EXT_MISC2  = 0x20000,\n            // DDS_FLAGS_FORCE_DX10_EXT including miscFlags2 information (result may not be compatible with D3DX10 or D3DX11)\n    };\n\n    enum WIC_FLAGS\n    {\n        WIC_FLAGS_NONE                  = 0x0,\n\n        WIC_FLAGS_FORCE_RGB             = 0x1,\n            // Loads DXGI 1.1 BGR formats as DXGI_FORMAT_R8G8B8A8_UNORM to avoid use of optional WDDM 1.1 formats\n\n        WIC_FLAGS_NO_X2_BIAS            = 0x2,\n            // Loads DXGI 1.1 X2 10:10:10:2 format as DXGI_FORMAT_R10G10B10A2_UNORM\n\n        WIC_FLAGS_NO_16BPP              = 0x4,\n            // Loads 565, 5551, and 4444 formats as 8888 to avoid use of optional WDDM 1.2 formats\n\n        WIC_FLAGS_ALLOW_MONO            = 0x8,\n            // Loads 1-bit monochrome (black & white) as R1_UNORM rather than 8-bit grayscale\n\n        WIC_FLAGS_ALL_FRAMES            = 0x10,\n            // Loads all images in a multi-frame file, converting/resizing to match the first frame as needed, defaults to 0th frame otherwise\n\n        WIC_FLAGS_IGNORE_SRGB           = 0x20,\n            // Ignores sRGB metadata if present in the file\n\n        WIC_FLAGS_DITHER                = 0x10000,\n            // Use ordered 4x4 dithering for any required conversions\n\n        WIC_FLAGS_DITHER_DIFFUSION      = 0x20000,\n            // Use error-diffusion dithering for any required conversions\n\n        WIC_FLAGS_FILTER_POINT          = 0x100000,\n        WIC_FLAGS_FILTER_LINEAR         = 0x200000,\n        WIC_FLAGS_FILTER_CUBIC          = 0x300000,\n        WIC_FLAGS_FILTER_FANT           = 0x400000, // Combination of Linear and Box filter\n            // Filtering mode to use for any required image resizing (only needed when loading arrays of differently sized images; defaults to Fant)\n    };\n\n    HRESULT __cdecl GetMetadataFromDDSMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DWORD flags,\n                                              _Out_ TexMetadata& metadata );\n    HRESULT __cdecl GetMetadataFromDDSFile( _In_z_ LPCWSTR szFile, _In_ DWORD flags,\n                                            _Out_ TexMetadata& metadata );\n\n    HRESULT __cdecl GetMetadataFromTGAMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size,\n                                              _Out_ TexMetadata& metadata );\n    HRESULT __cdecl GetMetadataFromTGAFile( _In_z_ LPCWSTR szFile,\n                                            _Out_ TexMetadata& metadata );\n\n    HRESULT __cdecl GetMetadataFromWICMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DWORD flags,\n                                              _Out_ TexMetadata& metadata );\n    HRESULT __cdecl GetMetadataFromWICFile( _In_z_ LPCWSTR szFile, _In_ DWORD flags,\n                                            _Out_ TexMetadata& metadata );\n\n    //---------------------------------------------------------------------------------\n    // Bitmap image container\n    struct Image\n    {\n        size_t      width;\n        size_t      height;\n        DXGI_FORMAT format;\n        size_t      rowPitch;\n        size_t      slicePitch;\n        uint8_t*    pixels;\n    };\n\n    class ScratchImage\n    {\n    public:\n        ScratchImage()\n            : _nimages(0), _size(0), _image(nullptr), _memory(nullptr) {}\n        ScratchImage(ScratchImage&& moveFrom)\n            : _nimages(0), _size(0), _image(nullptr), _memory(nullptr) { *this = std::move(moveFrom); }\n        ~ScratchImage() { Release(); }\n\n        ScratchImage& __cdecl operator= (ScratchImage&& moveFrom);\n\n        HRESULT __cdecl Initialize( _In_ const TexMetadata& mdata, _In_ DWORD flags = CP_FLAGS_NONE );\n\n        HRESULT __cdecl Initialize1D( _In_ DXGI_FORMAT fmt, _In_ size_t length, _In_ size_t arraySize, _In_ size_t mipLevels, _In_ DWORD flags = CP_FLAGS_NONE );\n        HRESULT __cdecl Initialize2D( _In_ DXGI_FORMAT fmt, _In_ size_t width, _In_ size_t height, _In_ size_t arraySize, _In_ size_t mipLevels, _In_ DWORD flags = CP_FLAGS_NONE );\n        HRESULT __cdecl Initialize3D( _In_ DXGI_FORMAT fmt, _In_ size_t width, _In_ size_t height, _In_ size_t depth, _In_ size_t mipLevels, _In_ DWORD flags = CP_FLAGS_NONE );\n        HRESULT __cdecl InitializeCube( _In_ DXGI_FORMAT fmt, _In_ size_t width, _In_ size_t height, _In_ size_t nCubes, _In_ size_t mipLevels, _In_ DWORD flags = CP_FLAGS_NONE );\n\n        HRESULT __cdecl InitializeFromImage( _In_ const Image& srcImage, _In_ bool allow1D = false, _In_ DWORD flags = CP_FLAGS_NONE );\n        HRESULT __cdecl InitializeArrayFromImages( _In_reads_(nImages) const Image* images, _In_ size_t nImages, _In_ bool allow1D = false, _In_ DWORD flags = CP_FLAGS_NONE ); \n        HRESULT __cdecl InitializeCubeFromImages( _In_reads_(nImages) const Image* images, _In_ size_t nImages, _In_ DWORD flags = CP_FLAGS_NONE );\n        HRESULT __cdecl Initialize3DFromImages( _In_reads_(depth) const Image* images, _In_ size_t depth, _In_ DWORD flags = CP_FLAGS_NONE );\n\n        void __cdecl Release();\n\n        bool __cdecl OverrideFormat( _In_ DXGI_FORMAT f );\n\n        const TexMetadata& __cdecl GetMetadata() const { return _metadata; }\n        const Image* __cdecl GetImage(_In_ size_t mip, _In_ size_t item, _In_ size_t slice) const;\n\n        const Image* __cdecl GetImages() const { return _image; }\n        size_t __cdecl GetImageCount() const { return _nimages; }\n\n        uint8_t* __cdecl GetPixels() const { return _memory; }\n        size_t __cdecl GetPixelsSize() const { return _size; }\n\n        bool __cdecl IsAlphaAllOpaque() const;\n\n    private:\n        size_t      _nimages;\n        size_t      _size;\n        TexMetadata _metadata;\n        Image*      _image;\n        uint8_t*    _memory;\n\n        // Hide copy constructor and assignment operator\n        ScratchImage( const ScratchImage& );\n        ScratchImage& operator=( const ScratchImage& );\n    };\n\n    //---------------------------------------------------------------------------------\n    // Memory blob (allocated buffer pointer is always 16-byte aligned)\n    class Blob\n    {\n    public:\n        Blob() : _buffer(nullptr), _size(0) {}\n        Blob(Blob&& moveFrom) : _buffer(nullptr), _size(0) { *this = std::move(moveFrom); }\n        ~Blob() { Release(); }\n\n        Blob& __cdecl operator= (Blob&& moveFrom);\n\n        HRESULT __cdecl Initialize( _In_ size_t size );\n\n        void __cdecl Release();\n\n        void *__cdecl GetBufferPointer() const { return _buffer; }\n        size_t __cdecl GetBufferSize() const { return _size; }\n\n    private:\n        void*   _buffer;\n        size_t  _size;\n\n        // Hide copy constructor and assignment operator\n        Blob( const Blob& );\n        Blob& operator=( const Blob& );\n    };\n\n    //---------------------------------------------------------------------------------\n    // Image I/O\n\n    // DDS operations\n    HRESULT __cdecl LoadFromDDSMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DWORD flags,\n                                       _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n    HRESULT __cdecl LoadFromDDSFile( _In_z_ LPCWSTR szFile, _In_ DWORD flags,\n                                     _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n\n    HRESULT __cdecl SaveToDDSMemory( _In_ const Image& image, _In_ DWORD flags,\n                                     _Out_ Blob& blob );\n    HRESULT __cdecl SaveToDDSMemory( _In_reads_(nimages) const Image* images, _In_ size_t nimages, _In_ const TexMetadata& metadata, _In_ DWORD flags,\n                                     _Out_ Blob& blob );\n\n    HRESULT __cdecl SaveToDDSFile( _In_ const Image& image, _In_ DWORD flags, _In_z_ LPCWSTR szFile );\n    HRESULT __cdecl SaveToDDSFile( _In_reads_(nimages) const Image* images, _In_ size_t nimages, _In_ const TexMetadata& metadata, _In_ DWORD flags, _In_z_ LPCWSTR szFile );\n\n    // TGA operations\n    HRESULT __cdecl LoadFromTGAMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size,\n                                       _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n    HRESULT __cdecl LoadFromTGAFile( _In_z_ LPCWSTR szFile,\n                                     _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n\n    HRESULT __cdecl SaveToTGAMemory( _In_ const Image& image, _Out_ Blob& blob );\n    HRESULT __cdecl SaveToTGAFile( _In_ const Image& image, _In_z_ LPCWSTR szFile );\n\n    // WIC operations\n    HRESULT __cdecl LoadFromWICMemory( _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DWORD flags,\n                                       _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n    HRESULT __cdecl LoadFromWICFile( _In_z_ LPCWSTR szFile, _In_ DWORD flags,\n                                    _Out_opt_ TexMetadata* metadata, _Out_ ScratchImage& image );\n\n    HRESULT __cdecl SaveToWICMemory( _In_ const Image& image, _In_ DWORD flags, _In_ REFGUID guidContainerFormat,\n                                     _Out_ Blob& blob, _In_opt_ const GUID* targetFormat = nullptr,\n                                     _In_opt_ std::function<void DIRECTX_STD_CALLCONV(IPropertyBag2*)> setCustomProps = nullptr );\n    HRESULT __cdecl SaveToWICMemory( _In_count_(nimages) const Image* images, _In_ size_t nimages, _In_ DWORD flags, _In_ REFGUID guidContainerFormat,\n                                     _Out_ Blob& blob, _In_opt_ const GUID* targetFormat = nullptr,\n                                     _In_opt_ std::function<void DIRECTX_STD_CALLCONV(IPropertyBag2*)> setCustomProps = nullptr );\n\n    HRESULT __cdecl SaveToWICFile( _In_ const Image& image, _In_ DWORD flags, _In_ REFGUID guidContainerFormat,\n                                   _In_z_ LPCWSTR szFile, _In_opt_ const GUID* targetFormat = nullptr,\n                                   _In_opt_ std::function<void DIRECTX_STD_CALLCONV(IPropertyBag2*)> setCustomProps = nullptr );\n    HRESULT __cdecl SaveToWICFile( _In_count_(nimages) const Image* images, _In_ size_t nimages, _In_ DWORD flags, _In_ REFGUID guidContainerFormat,\n                                   _In_z_ LPCWSTR szFile, _In_opt_ const GUID* targetFormat = nullptr,\n                                   _In_opt_ std::function<void DIRECTX_STD_CALLCONV(IPropertyBag2*)> setCustomProps = nullptr );\n\n    enum WICCodecs\n    {\n        WIC_CODEC_BMP       =1,     // Windows Bitmap (.bmp)\n        WIC_CODEC_JPEG,             // Joint Photographic Experts Group (.jpg, .jpeg)\n        WIC_CODEC_PNG,              // Portable Network Graphics (.png)\n        WIC_CODEC_TIFF,             // Tagged Image File Format  (.tif, .tiff)\n        WIC_CODEC_GIF,              // Graphics Interchange Format  (.gif)\n        WIC_CODEC_WMP,              // Windows Media Photo / HD Photo / JPEG XR (.hdp, .jxr, .wdp)\n        WIC_CODEC_ICO,              // Windows Icon (.ico)\n    };\n\n    REFGUID __cdecl GetWICCodec( _In_ WICCodecs codec );\n\n    //---------------------------------------------------------------------------------\n    // Texture conversion, resizing, mipmap generation, and block compression\n\n    enum TEX_FR_FLAGS\n    {\n        TEX_FR_ROTATE0          = 0x0,\n        TEX_FR_ROTATE90         = 0x1,\n        TEX_FR_ROTATE180        = 0x2,\n        TEX_FR_ROTATE270        = 0x3,\n        TEX_FR_FLIP_HORIZONTAL  = 0x08,\n        TEX_FR_FLIP_VERTICAL    = 0x10,\n    };\n\n    HRESULT __cdecl FlipRotate( _In_ const Image& srcImage, _In_ DWORD flags, _Out_ ScratchImage& image );\n    HRESULT __cdecl FlipRotate( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                _In_ DWORD flags, _Out_ ScratchImage& result );\n        // Flip and/or rotate image\n\n    enum TEX_FILTER_FLAGS\n    {\n        TEX_FILTER_DEFAULT          = 0,\n\n        TEX_FILTER_WRAP_U           = 0x1,\n        TEX_FILTER_WRAP_V           = 0x2,\n        TEX_FILTER_WRAP_W           = 0x4,\n        TEX_FILTER_WRAP             = ( TEX_FILTER_WRAP_U | TEX_FILTER_WRAP_V | TEX_FILTER_WRAP_W ),\n        TEX_FILTER_MIRROR_U         = 0x10,\n        TEX_FILTER_MIRROR_V         = 0x20,\n        TEX_FILTER_MIRROR_W         = 0x40,\n        TEX_FILTER_MIRROR          = ( TEX_FILTER_MIRROR_U | TEX_FILTER_MIRROR_V | TEX_FILTER_MIRROR_W ),\n            // Wrap vs. Mirror vs. Clamp filtering options\n\n        TEX_FILTER_SEPARATE_ALPHA   = 0x100,\n            // Resize color and alpha channel independently\n\n        TEX_FILTER_RGB_COPY_RED     = 0x1000,\n        TEX_FILTER_RGB_COPY_GREEN   = 0x2000,\n        TEX_FILTER_RGB_COPY_BLUE    = 0x4000,\n            // When converting RGB to R, defaults to using grayscale. These flags indicate copying a specific channel instead\n            // When converting RGB to RG, defaults to copying RED | GREEN. These flags control which channels are selected instead.\n\n        TEX_FILTER_DITHER           = 0x10000,\n            // Use ordered 4x4 dithering for any required conversions\n        TEX_FILTER_DITHER_DIFFUSION = 0x20000,\n            // Use error-diffusion dithering for any required conversions\n\n        TEX_FILTER_POINT            = 0x100000,\n        TEX_FILTER_LINEAR           = 0x200000,\n        TEX_FILTER_CUBIC            = 0x300000,\n        TEX_FILTER_BOX              = 0x400000,\n        TEX_FILTER_FANT             = 0x400000, // Equiv to Box filtering for mipmap generation\n        TEX_FILTER_TRIANGLE         = 0x500000,\n            // Filtering mode to use for any required image resizing\n\n        TEX_FILTER_SRGB_IN          = 0x1000000,\n        TEX_FILTER_SRGB_OUT         = 0x2000000,\n        TEX_FILTER_SRGB             = ( TEX_FILTER_SRGB_IN | TEX_FILTER_SRGB_OUT ),\n            // sRGB <-> RGB for use in conversion operations\n            // if the input format type is IsSRGB(), then SRGB_IN is on by default\n            // if the output format type is IsSRGB(), then SRGB_OUT is on by default\n\n        TEX_FILTER_FORCE_NON_WIC    = 0x10000000,\n            // Forces use of the non-WIC path when both are an option\n\n        TEX_FILTER_FORCE_WIC        = 0x20000000,\n            // Forces use of the WIC path even when logic would have picked a non-WIC path when both are an option\n    };\n\n    HRESULT __cdecl Resize( _In_ const Image& srcImage, _In_ size_t width, _In_ size_t height, _In_ DWORD filter,\n                            _Out_ ScratchImage& image );\n    HRESULT __cdecl Resize( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                            _In_ size_t width, _In_ size_t height, _In_ DWORD filter, _Out_ ScratchImage& result );\n        // Resize the image to width x height. Defaults to Fant filtering.\n        // Note for a complex resize, the result will always have mipLevels == 1\n\n    HRESULT __cdecl Convert( _In_ const Image& srcImage, _In_ DXGI_FORMAT format, _In_ DWORD filter, _In_ float threshold,\n                            _Out_ ScratchImage& image );\n    HRESULT __cdecl Convert( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                             _In_ DXGI_FORMAT format, _In_ DWORD filter, _In_ float threshold, _Out_ ScratchImage& result );\n        // Convert the image to a new format\n    \n    HRESULT __cdecl ConvertToSinglePlane( _In_ const Image& srcImage, _Out_ ScratchImage& image );\n    HRESULT __cdecl ConvertToSinglePlane( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                          _Out_ ScratchImage& image );\n        // Converts the image from a planar format to an equivalent non-planar format\n\n    HRESULT __cdecl GenerateMipMaps( _In_ const Image& baseImage, _In_ DWORD filter, _In_ size_t levels,\n                                     _Inout_ ScratchImage& mipChain, _In_ bool allow1D = false );\n    HRESULT __cdecl GenerateMipMaps( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                     _In_ DWORD filter, _In_ size_t levels, _Inout_ ScratchImage& mipChain );\n        // levels of '0' indicates a full mipchain, otherwise is generates that number of total levels (including the source base image)\n        // Defaults to Fant filtering which is equivalent to a box filter\n\n    HRESULT __cdecl GenerateMipMaps3D( _In_reads_(depth) const Image* baseImages, _In_ size_t depth, _In_ DWORD filter, _In_ size_t levels,\n                                       _Out_ ScratchImage& mipChain );\n    HRESULT __cdecl GenerateMipMaps3D( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                       _In_ DWORD filter, _In_ size_t levels, _Out_ ScratchImage& mipChain );\n        // levels of '0' indicates a full mipchain, otherwise is generates that number of total levels (including the source base image)\n        // Defaults to Fant filtering which is equivalent to a box filter\n\n    enum TEX_PMALPHA_FLAGS\n    {\n        TEX_PMALPHA_DEFAULT         = 0,\n\n        TEX_PMALPHA_IGNORE_SRGB     = 0x1,\n            // ignores sRGB colorspace conversions\n\n        TEX_PMALPHA_SRGB_IN         = 0x1000000,\n        TEX_PMALPHA_SRGB_OUT        = 0x2000000,\n        TEX_PMALPHA_SRGB            = ( TEX_PMALPHA_SRGB_IN | TEX_PMALPHA_SRGB_OUT ),\n            // if the input format type is IsSRGB(), then SRGB_IN is on by default\n            // if the output format type is IsSRGB(), then SRGB_OUT is on by default\n    };\n\n    HRESULT __cdecl PremultiplyAlpha( _In_ const Image& srcImage, _In_ DWORD flags, _Out_ ScratchImage& image );\n    HRESULT __cdecl PremultiplyAlpha( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata, _In_ DWORD flags, _Out_ ScratchImage& result );\n        // Converts to a premultiplied alpha version of the texture\n\n    enum TEX_COMPRESS_FLAGS\n    {\n        TEX_COMPRESS_DEFAULT        = 0,\n\n        TEX_COMPRESS_RGB_DITHER     = 0x10000,\n            // Enables dithering RGB colors for BC1-3 compression\n\n        TEX_COMPRESS_A_DITHER       = 0x20000,\n            // Enables dithering alpha for BC1-3 compression\n\n        TEX_COMPRESS_DITHER         = 0x30000,\n            // Enables both RGB and alpha dithering for BC1-3 compression\n\n        TEX_COMPRESS_UNIFORM        = 0x40000,\n            // Uniform color weighting for BC1-3 compression; by default uses perceptual weighting\n\n        TEX_COMPRESS_BC7_USE_3SUBSETS = 0x80000,\n            // Enables exhaustive search for BC7 compress for mode 0 and 2; by default skips trying these modes\n\n        TEX_COMPRESS_SRGB_IN        = 0x1000000,\n        TEX_COMPRESS_SRGB_OUT       = 0x2000000,\n        TEX_COMPRESS_SRGB           = ( TEX_COMPRESS_SRGB_IN | TEX_COMPRESS_SRGB_OUT ),\n            // if the input format type is IsSRGB(), then SRGB_IN is on by default\n            // if the output format type is IsSRGB(), then SRGB_OUT is on by default\n\n        TEX_COMPRESS_PARALLEL       = 0x10000000,\n            // Compress is free to use multithreading to improve performance (by default it does not use multithreading)\n    };\n\n    HRESULT __cdecl Compress( _In_ const Image& srcImage, _In_ DXGI_FORMAT format, _In_ DWORD compress, _In_ float alphaRef,\n                              _Out_ ScratchImage& cImage );\n    HRESULT __cdecl Compress( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                              _In_ DXGI_FORMAT format, _In_ DWORD compress, _In_ float alphaRef, _Out_ ScratchImage& cImages );\n        // Note that alphaRef is only used by BC1. 0.5f is a typical value to use\n\n    HRESULT __cdecl Compress( _In_ ID3D11Device* pDevice, _In_ const Image& srcImage, _In_ DXGI_FORMAT format, _In_ DWORD compress,\n                              _In_ float alphaWeight, _Out_ ScratchImage& image );\n    HRESULT __cdecl Compress( _In_ ID3D11Device* pDevice, _In_ const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                              _In_ DXGI_FORMAT format, _In_ DWORD compress, _In_ float alphaWeight, _Out_ ScratchImage& cImages );\n        // DirectCompute-based compression (alphaWeight is only used by BC7. 1.0 is the typical value to use)\n\n    HRESULT __cdecl Decompress( _In_ const Image& cImage, _In_ DXGI_FORMAT format, _Out_ ScratchImage& image );\n    HRESULT __cdecl Decompress( _In_reads_(nimages) const Image* cImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                _In_ DXGI_FORMAT format, _Out_ ScratchImage& images );\n\n    //---------------------------------------------------------------------------------\n    // Normal map operations\n\n    enum CNMAP_FLAGS\n    {\n        CNMAP_DEFAULT           = 0,\n\n        CNMAP_CHANNEL_RED       = 0x1,\n        CNMAP_CHANNEL_GREEN     = 0x2,\n        CNMAP_CHANNEL_BLUE      = 0x3,\n        CNMAP_CHANNEL_ALPHA     = 0x4,\n        CNMAP_CHANNEL_LUMINANCE = 0x5,\n            // Channel selection when evaluting color value for height\n            // Luminance is a combination of red, green, and blue\n\n        CNMAP_MIRROR_U          = 0x1000,\n        CNMAP_MIRROR_V          = 0x2000,\n        CNMAP_MIRROR            = 0x3000,\n            // Use mirror semantics for scanline references (defaults to wrap)\n\n        CNMAP_INVERT_SIGN       = 0x4000,\n            // Inverts normal sign\n\n        CNMAP_COMPUTE_OCCLUSION = 0x8000,\n            // Computes a crude occlusion term stored in the alpha channel\n    };\n\n    HRESULT __cdecl ComputeNormalMap( _In_ const Image& srcImage, _In_ DWORD flags, _In_ float amplitude,\n                                      _In_ DXGI_FORMAT format, _Out_ ScratchImage& normalMap );\n    HRESULT __cdecl ComputeNormalMap( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                      _In_ DWORD flags, _In_ float amplitude, _In_ DXGI_FORMAT format, _Out_ ScratchImage& normalMaps );\n\n    //---------------------------------------------------------------------------------\n    // Misc image operations\n    struct Rect\n    {\n        size_t x;\n        size_t y;\n        size_t w;\n        size_t h;\n\n        Rect() DIRECTX_CTOR_DEFAULT\n        Rect( size_t _x, size_t _y, size_t _w, size_t _h ) : x(_x), y(_y), w(_w), h(_h) {}\n    };\n\n    HRESULT __cdecl CopyRectangle( _In_ const Image& srcImage, _In_ const Rect& srcRect, _In_ const Image& dstImage,\n                                   _In_ DWORD filter, _In_ size_t xOffset, _In_ size_t yOffset );\n\n    enum CMSE_FLAGS\n    {\n        CMSE_DEFAULT                = 0,\n\n        CMSE_IMAGE1_SRGB            = 0x1,\n        CMSE_IMAGE2_SRGB            = 0x2,\n            // Indicates that image needs gamma correction before comparision\n\n        CMSE_IGNORE_RED             = 0x10,\n        CMSE_IGNORE_GREEN           = 0x20,\n        CMSE_IGNORE_BLUE            = 0x40,\n        CMSE_IGNORE_ALPHA           = 0x80,\n            // Ignore the channel when computing MSE\n\n        CMSE_IMAGE1_X2_BIAS         = 0x100,\n        CMSE_IMAGE2_X2_BIAS         = 0x200,\n            // Indicates that image should be scaled and biased before comparison (i.e. UNORM -> SNORM)\n    };\n\n    HRESULT __cdecl ComputeMSE( _In_ const Image& image1, _In_ const Image& image2, _Out_ float& mse, _Out_writes_opt_(4) float* mseV, _In_ DWORD flags = 0 );\n\n    //---------------------------------------------------------------------------------\n    // Direct3D 11 functions\n    bool __cdecl IsSupportedTexture( _In_ ID3D11Device* pDevice, _In_ const TexMetadata& metadata );\n\n    HRESULT __cdecl CreateTexture( _In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                   _Outptr_ ID3D11Resource** ppResource );\n\n    HRESULT __cdecl CreateShaderResourceView( _In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                              _Outptr_ ID3D11ShaderResourceView** ppSRV );\n\n    HRESULT __cdecl CreateTextureEx( _In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                     _In_ D3D11_USAGE usage, _In_ unsigned int bindFlags, _In_ unsigned int cpuAccessFlags, _In_ unsigned int miscFlags, _In_ bool forceSRGB,\n                                     _Outptr_ ID3D11Resource** ppResource );\n\n    HRESULT __cdecl CreateShaderResourceViewEx( _In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                                _In_ D3D11_USAGE usage, _In_ unsigned int bindFlags, _In_ unsigned int cpuAccessFlags, _In_ unsigned int miscFlags, _In_ bool forceSRGB,\n                                                _Outptr_ ID3D11ShaderResourceView** ppSRV );\n\n    HRESULT __cdecl CaptureTexture( _In_ ID3D11Device* pDevice, _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource* pSource, _Out_ ScratchImage& result );\n\n#include \"DirectXTex.inl\"\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex.inl",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTex.inl\n//  \n// DirectX Texture Library\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n//=====================================================================================\n// DXGI Format Utilities\n//=====================================================================================\n\n_Use_decl_annotations_\ninline bool __cdecl IsValid( DXGI_FORMAT fmt )\n{\n    return ( static_cast<size_t>(fmt) >= 1 && static_cast<size_t>(fmt) <= 120 );\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsCompressed(DXGI_FORMAT fmt)\n{\n    switch ( fmt )\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsPacked(DXGI_FORMAT fmt)\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_YUY2: // 4:2:2 8-bit\n    case DXGI_FORMAT_Y210: // 4:2:2 10-bit\n    case DXGI_FORMAT_Y216: // 4:2:2 16-bit\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsPlanar(DXGI_FORMAT fmt)\n{\n    switch ( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_NV12:      // 4:2:0 8-bit\n    case DXGI_FORMAT_P010:      // 4:2:0 10-bit\n    case DXGI_FORMAT_P016:      // 4:2:0 16-bit\n    case DXGI_FORMAT_420_OPAQUE:// 4:2:0 8-bit\n    case DXGI_FORMAT_NV11:      // 4:1:1 8-bit\n        return true;\n\n    case 118 /* DXGI_FORMAT_D16_UNORM_S8_UINT */:\n    case 119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */:\n    case 120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */:\n        // These are Xbox One platform specific types\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsPalettized(DXGI_FORMAT fmt)\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n    case DXGI_FORMAT_A8P8:\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsVideo(DXGI_FORMAT fmt)\n{\n    switch ( fmt )\n    {\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n    case DXGI_FORMAT_YUY2:\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n    case DXGI_FORMAT_NV11:\n        // These video formats can be used with the 3D pipeline through special view mappings\n\n    case DXGI_FORMAT_420_OPAQUE:\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n    case DXGI_FORMAT_A8P8:\n        // These are limited use video formats not usable in any way by the 3D pipeline\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsDepthStencil(DXGI_FORMAT fmt)\n{\n    switch( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n    case DXGI_FORMAT_D16_UNORM:\n    case 118 /* DXGI_FORMAT_D16_UNORM_S8_UINT */:\n    case 119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */:\n    case 120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */:\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsSRGB(DXGI_FORMAT fmt)\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl IsTypeless(DXGI_FORMAT fmt, bool partialTypeless)\n{\n    switch( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R32G32_TYPELESS:\n    case DXGI_FORMAT_R32G8X24_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R16G16_TYPELESS:\n    case DXGI_FORMAT_R32_TYPELESS:\n    case DXGI_FORMAT_R24G8_TYPELESS:\n    case DXGI_FORMAT_R8G8_TYPELESS:\n    case DXGI_FORMAT_R16_TYPELESS:\n    case DXGI_FORMAT_R8_TYPELESS:\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC7_TYPELESS:\n        return true;\n\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n        return partialTypeless;\n\n    case 119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */:\n    case 120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */:\n        // These are Xbox One platform specific types\n        return partialTypeless;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline bool __cdecl HasAlpha(DXGI_FORMAT fmt)\n{\n    switch( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_A8P8:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        return true;\n\n    case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n    case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n        // These are Xbox One platform specific types\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n_Use_decl_annotations_\ninline size_t __cdecl ComputeScanlines(DXGI_FORMAT fmt, size_t height)\n{\n    if ( IsCompressed(fmt) )\n    {\n        return std::max<size_t>( 1, (height + 3) / 4 );\n    }\n    else if ( fmt == DXGI_FORMAT_NV11 )\n    {\n        // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data\n        return height * 2;\n    }\n    else if ( IsPlanar(fmt) )\n    {\n        return height + ( ( height + 1 ) >> 1 );\n    }\n    else\n    {\n        return height;\n    }\n}\n\n//=====================================================================================\n// Image I/O\n//=====================================================================================\n_Use_decl_annotations_\ninline HRESULT __cdecl SaveToDDSMemory(const Image& image, DWORD flags, Blob& blob)\n{\n    TexMetadata mdata;\n    memset( &mdata, 0, sizeof(mdata) );\n    mdata.width = image.width;\n    mdata.height = image.height;\n    mdata.depth = 1;\n    mdata.arraySize = 1;\n    mdata.mipLevels = 1;\n    mdata.format = image.format;\n    mdata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n    return SaveToDDSMemory( &image, 1, mdata, flags, blob );\n}\n\n_Use_decl_annotations_\ninline HRESULT __cdecl SaveToDDSFile(const Image& image, DWORD flags, LPCWSTR szFile)\n{\n    TexMetadata mdata;\n    memset( &mdata, 0, sizeof(mdata) );\n    mdata.width = image.width;\n    mdata.height = image.height;\n    mdata.depth = 1;\n    mdata.arraySize = 1;\n    mdata.mipLevels = 1;\n    mdata.format = image.format;\n    mdata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n    return SaveToDDSFile( &image, 1, mdata, flags, szFile );\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexCompress.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexCompress.cpp\n//  \n// DirectX Texture Library - Texture compression\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#ifdef _OPENMP\n#include <omp.h>\n#pragma warning(disable : 4616 6993)\n#endif\n\n#include \"bc.h\"\n\n\nnamespace DirectX\n{\n\ninline static DWORD _GetBCFlags( _In_ DWORD compress )\n{\n    static_assert( TEX_COMPRESS_RGB_DITHER == BC_FLAGS_DITHER_RGB, \"TEX_COMPRESS_* flags should match BC_FLAGS_*\" );\n    static_assert( TEX_COMPRESS_A_DITHER == BC_FLAGS_DITHER_A, \"TEX_COMPRESS_* flags should match BC_FLAGS_*\"  );\n    static_assert( TEX_COMPRESS_DITHER == (BC_FLAGS_DITHER_RGB | BC_FLAGS_DITHER_A), \"TEX_COMPRESS_* flags should match BC_FLAGS_*\"  );\n    static_assert( TEX_COMPRESS_UNIFORM == BC_FLAGS_UNIFORM, \"TEX_COMPRESS_* flags should match BC_FLAGS_*\"  );\n    static_assert( TEX_COMPRESS_BC7_USE_3SUBSETS == BC_FLAGS_USE_3SUBSETS, \"TEX_COMPRESS_* flags should match BC_FLAGS_*\"  );\n    return ( compress & (BC_FLAGS_DITHER_RGB|BC_FLAGS_DITHER_A|BC_FLAGS_UNIFORM|BC_FLAGS_USE_3SUBSETS) );\n}\n\ninline static DWORD _GetSRGBFlags( _In_ DWORD compress )\n{\n    static_assert( TEX_COMPRESS_SRGB_IN == TEX_FILTER_SRGB_IN, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_COMPRESS_SRGB_OUT == TEX_FILTER_SRGB_OUT, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_COMPRESS_SRGB == TEX_FILTER_SRGB, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    return ( compress & TEX_COMPRESS_SRGB );\n}\n\ninline static bool _DetermineEncoderSettings( _In_ DXGI_FORMAT format, _Out_ BC_ENCODE& pfEncode, _Out_ size_t& blocksize, _Out_ DWORD& cflags )\n{\n    switch(format)\n    {\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:    pfEncode = nullptr;         blocksize = 8;   cflags = 0; break;\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:    pfEncode = D3DXEncodeBC2;   blocksize = 16;  cflags = 0; break;\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:    pfEncode = D3DXEncodeBC3;   blocksize = 16;  cflags = 0; break;\n    case DXGI_FORMAT_BC4_UNORM:         pfEncode = D3DXEncodeBC4U;  blocksize = 8;   cflags = TEX_FILTER_RGB_COPY_RED; break;\n    case DXGI_FORMAT_BC4_SNORM:         pfEncode = D3DXEncodeBC4S;  blocksize = 8;   cflags = TEX_FILTER_RGB_COPY_RED; break;\n    case DXGI_FORMAT_BC5_UNORM:         pfEncode = D3DXEncodeBC5U;  blocksize = 16;  cflags = TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN; break;\n    case DXGI_FORMAT_BC5_SNORM:         pfEncode = D3DXEncodeBC5S;  blocksize = 16;  cflags = TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN; break;\n    case DXGI_FORMAT_BC6H_UF16:         pfEncode = D3DXEncodeBC6HU; blocksize = 16;  cflags = 0; break;\n    case DXGI_FORMAT_BC6H_SF16:         pfEncode = D3DXEncodeBC6HS; blocksize = 16;  cflags = 0; break;\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:    pfEncode = D3DXEncodeBC7;   blocksize = 16;  cflags = 0; break;\n    default:                            pfEncode = nullptr;         blocksize = 0;   cflags = 0; return false;\n    }\n\n    return true;\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic HRESULT _CompressBC( _In_ const Image& image, _In_ const Image& result, _In_ DWORD bcflags,\n                            _In_ DWORD srgb, _In_ float alphaRef )\n{\n    if ( !image.pixels || !result.pixels )\n        return E_POINTER;\n\n    assert( image.width == result.width );\n    assert( image.height == result.height );\n\n    const DXGI_FORMAT format = image.format;\n    size_t sbpp = BitsPerPixel( format );\n    if ( !sbpp )\n        return E_FAIL;\n\n    if ( sbpp < 8 )\n    {\n        // We don't support compressing from monochrome (DXGI_FORMAT_R1_UNORM)\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    // Round to bytes\n    sbpp = ( sbpp + 7 ) / 8;\n\n    uint8_t *pDest = result.pixels;\n\n    // Determine BC format encoder\n    BC_ENCODE pfEncode;\n    size_t blocksize;\n    DWORD cflags;\n    if ( !_DetermineEncoderSettings( result.format, pfEncode, blocksize, cflags ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    XMVECTOR temp[16];\n    const uint8_t *pSrc = image.pixels;\n    const size_t rowPitch = image.rowPitch;\n    for( size_t h=0; h < image.height; h += 4 )\n    {\n        const uint8_t *sptr = pSrc;\n        uint8_t* dptr = pDest;\n        size_t ph = std::min<size_t>( 4, image.height - h );\n        size_t w = 0;\n        for( size_t count = 0; (count < result.rowPitch) && (w < image.width); count += blocksize, w += 4 )\n        {\n            size_t pw = std::min<size_t>( 4, image.width - w );\n            assert( pw > 0 && ph > 0 );\n\n            if ( !_LoadScanline( &temp[0], pw, sptr, rowPitch, format ) )\n                return E_FAIL;\n\n            if ( ph > 1 )\n            {\n                if ( !_LoadScanline( &temp[4], pw, sptr + rowPitch, rowPitch, format ) )\n                    return E_FAIL;\n\n                if ( ph > 2 )\n                {\n                    if ( !_LoadScanline( &temp[8], pw, sptr + rowPitch*2, rowPitch, format ) )\n                        return E_FAIL;\n\n                    if ( ph > 3 )\n                    {\n                        if ( !_LoadScanline( &temp[12], pw, sptr + rowPitch*3, rowPitch, format ) )\n                            return E_FAIL;\n                    }\n                }\n            }\n\n            if ( pw != 4 || ph != 4 )\n            {\n                // Replicate pixels for partial block\n                static const size_t uSrc[] = { 0, 0, 0, 1 };\n\n                if ( pw < 4 )\n                {\n                    for( size_t t = 0; t < ph && t < 4; ++t )\n                    {\n                        for( size_t s = pw; s < 4; ++s )\n                        {\n#pragma prefast(suppress: 26000, \"PREFAST false positive\")\n                            temp[ (t << 2) | s ] = temp[ (t << 2) | uSrc[s] ]; \n                        }\n                    }\n                }\n\n                if ( ph < 4 )\n                {\n                    for( size_t t = ph; t < 4; ++t )\n                    {\n                        for( size_t s = 0; s < 4; ++s )\n                        {\n#pragma prefast(suppress: 26000, \"PREFAST false positive\")\n                            temp[ (t << 2) | s ] = temp[ (uSrc[t] << 2) | s ]; \n                        }\n                    }\n                }\n            }\n\n            _ConvertScanline( temp, 16, result.format, format, cflags | srgb );\n            \n            if ( pfEncode )\n                pfEncode( dptr, temp, bcflags );\n            else\n                D3DXEncodeBC1( dptr, temp, alphaRef, bcflags );\n\n            sptr += sbpp*4;\n            dptr += blocksize;\n        }\n\n        pSrc += rowPitch*4;\n        pDest += result.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n#ifdef _OPENMP\nstatic HRESULT _CompressBC_Parallel( _In_ const Image& image, _In_ const Image& result, _In_ DWORD bcflags,\n                                     _In_ DWORD srgb, _In_ float alphaRef )\n{\n    if ( !image.pixels || !result.pixels )\n        return E_POINTER;\n\n    assert( image.width == result.width );\n    assert( image.height == result.height );\n\n    const DXGI_FORMAT format = image.format;\n    size_t sbpp = BitsPerPixel( format );\n    if ( !sbpp )\n        return E_FAIL;\n\n    if ( sbpp < 8 )\n    {\n        // We don't support compressing from monochrome (DXGI_FORMAT_R1_UNORM)\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    // Round to bytes\n    sbpp = ( sbpp + 7 ) / 8;\n\n    // Determine BC format encoder\n    BC_ENCODE pfEncode;\n    size_t blocksize;\n    DWORD cflags;\n    if ( !_DetermineEncoderSettings( result.format, pfEncode, blocksize, cflags ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    // Refactored version of loop to support parallel independance\n    const size_t nBlocks = std::max<size_t>(1, (image.width + 3) / 4 ) * std::max<size_t>(1, (image.height + 3) / 4 );\n\n    bool fail = false;\n\n#pragma omp parallel for\n    for( int nb=0; nb < static_cast<int>( nBlocks ); ++nb )\n    {\n        const size_t nbWidth = std::max<size_t>(1, (image.width + 3) / 4 );\n\n        const size_t y = nb / nbWidth;\n        const size_t x = nb - (y*nbWidth);\n\n        assert( x < image.width && y < image.height );\n\n        size_t rowPitch = image.rowPitch;\n        const uint8_t *pSrc = image.pixels + (y*4*rowPitch) + (x*4*sbpp);\n\n        uint8_t *pDest = result.pixels + (nb*blocksize);\n\n        size_t ph = std::min<size_t>( 4, image.height - y );\n        size_t pw = std::min<size_t>( 4, image.width - x );\n        assert( pw > 0 && ph > 0 );\n\n        XMVECTOR temp[16];\n        if ( !_LoadScanline( &temp[0], pw, pSrc, rowPitch, format ) )\n            fail = true;\n\n        if ( ph > 1 )\n        {\n            if ( !_LoadScanline( &temp[4], pw, pSrc + rowPitch, rowPitch, format ) )\n                fail = true;\n\n            if ( ph > 2 )\n            {\n                if ( !_LoadScanline( &temp[8], pw, pSrc + rowPitch*2, rowPitch, format ) )\n                    fail = true;\n\n                if ( ph > 3 )\n                {\n                    if ( !_LoadScanline( &temp[12], pw, pSrc + rowPitch*3, rowPitch, format ) )\n                        fail = true;\n                }\n            }\n        }\n\n        if ( pw != 4 || ph != 4 )\n        {\n            // Replicate pixels for partial block\n            static const size_t uSrc[] = { 0, 0, 0, 1 };\n\n            if ( pw < 4 )\n            {\n                for( size_t t = 0; t < ph && t < 4; ++t )\n                {\n                    for( size_t s = pw; s < 4; ++s )\n                    {\n                        temp[ (t << 2) | s ] = temp[ (t << 2) | uSrc[s] ]; \n                    }\n                }\n            }\n\n            if ( ph < 4 )\n            {\n                for( size_t t = ph; t < 4; ++t )\n                {\n                    for( size_t s = 0; s < 4; ++s )\n                    {\n                        temp[ (t << 2) | s ] = temp[ (uSrc[t] << 2) | s ]; \n                    }\n                }\n            }\n        }\n\n        _ConvertScanline( temp, 16, result.format, format, cflags | srgb );\n            \n        if ( pfEncode )\n            pfEncode( pDest, temp, bcflags );\n        else\n            D3DXEncodeBC1( pDest, temp, alphaRef, bcflags );\n    }\n\n    return (fail) ? E_FAIL : S_OK;\n}\n\n#endif // _OPENMP\n\n\n//-------------------------------------------------------------------------------------\nstatic DXGI_FORMAT _DefaultDecompress( _In_ DXGI_FORMAT format )\n{\n    switch( format )\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n        return DXGI_FORMAT_R8G8B8A8_UNORM;\n\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n        return DXGI_FORMAT_R8_UNORM;\n\n    case DXGI_FORMAT_BC4_SNORM:\n        return DXGI_FORMAT_R8_SNORM;\n\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n        return DXGI_FORMAT_R8G8_UNORM;\n\n    case DXGI_FORMAT_BC5_SNORM:\n        return DXGI_FORMAT_R8G8_SNORM;\n\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n        // We could use DXGI_FORMAT_R32G32B32_FLOAT here since BC6H is always Alpha 1.0,\n        // but this format is more supported by viewers\n        return DXGI_FORMAT_R32G32B32A32_FLOAT;\n\n    default:\n        return DXGI_FORMAT_UNKNOWN;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecompressBC( _In_ const Image& cImage, _In_ const Image& result )\n{\n    if ( !cImage.pixels || !result.pixels )\n        return E_POINTER;\n\n    assert( cImage.width == result.width );\n    assert( cImage.height == result.height );\n\n    const DXGI_FORMAT format = result.format;\n    size_t dbpp = BitsPerPixel( format );\n    if ( !dbpp )\n        return E_FAIL;\n\n    if ( dbpp < 8 )\n    {\n        // We don't support decompressing to monochrome (DXGI_FORMAT_R1_UNORM)\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    // Round to bytes\n    dbpp = ( dbpp + 7 ) / 8;\n\n    uint8_t *pDest = result.pixels;\n    if ( !pDest )\n        return E_POINTER;\n\n    // Promote \"typeless\" BC formats\n    DXGI_FORMAT cformat;\n    switch( cImage.format )\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:  cformat = DXGI_FORMAT_BC1_UNORM; break;\n    case DXGI_FORMAT_BC2_TYPELESS:  cformat = DXGI_FORMAT_BC2_UNORM; break;\n    case DXGI_FORMAT_BC3_TYPELESS:  cformat = DXGI_FORMAT_BC3_UNORM; break;\n    case DXGI_FORMAT_BC4_TYPELESS:  cformat = DXGI_FORMAT_BC4_UNORM; break;\n    case DXGI_FORMAT_BC5_TYPELESS:  cformat = DXGI_FORMAT_BC5_UNORM; break;\n    case DXGI_FORMAT_BC6H_TYPELESS: cformat = DXGI_FORMAT_BC6H_UF16; break;\n    case DXGI_FORMAT_BC7_TYPELESS:  cformat = DXGI_FORMAT_BC7_UNORM; break;\n    default:                        cformat = cImage.format;         break;\n    }\n\n    // Determine BC format decoder\n    BC_DECODE pfDecode;\n    size_t sbpp;\n    switch(cformat)\n    {\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:    pfDecode = D3DXDecodeBC1;   sbpp = 8;   break;\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:    pfDecode = D3DXDecodeBC2;   sbpp = 16;  break;\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:    pfDecode = D3DXDecodeBC3;   sbpp = 16;  break;\n    case DXGI_FORMAT_BC4_UNORM:         pfDecode = D3DXDecodeBC4U;  sbpp = 8;   break;\n    case DXGI_FORMAT_BC4_SNORM:         pfDecode = D3DXDecodeBC4S;  sbpp = 8;   break;\n    case DXGI_FORMAT_BC5_UNORM:         pfDecode = D3DXDecodeBC5U;  sbpp = 16;  break;\n    case DXGI_FORMAT_BC5_SNORM:         pfDecode = D3DXDecodeBC5S;  sbpp = 16;  break;\n    case DXGI_FORMAT_BC6H_UF16:         pfDecode = D3DXDecodeBC6HU; sbpp = 16;  break;\n    case DXGI_FORMAT_BC6H_SF16:         pfDecode = D3DXDecodeBC6HS; sbpp = 16;  break;\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:    pfDecode = D3DXDecodeBC7;   sbpp = 16;  break;\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    XMVECTOR temp[16];\n    const uint8_t *pSrc = cImage.pixels;\n    const size_t rowPitch = result.rowPitch;\n    for( size_t h=0; h < cImage.height; h += 4 )\n    {\n        const uint8_t *sptr = pSrc;\n        uint8_t* dptr = pDest;\n        size_t ph = std::min<size_t>( 4, cImage.height - h );\n        size_t w = 0;\n        for( size_t count = 0; (count < cImage.rowPitch) && (w < cImage.width); count += sbpp, w += 4 )\n        {\n            pfDecode( temp, sptr );\n            _ConvertScanline( temp, 16, format, cformat, 0 );\n\n            size_t pw = std::min<size_t>( 4, cImage.width - w );\n            assert( pw > 0 && ph > 0 );\n\n            if ( !_StoreScanline( dptr, rowPitch, format, &temp[0], pw ) )\n                return E_FAIL;\n\n            if ( ph > 1 )\n            {\n                if ( !_StoreScanline( dptr + rowPitch, rowPitch, format, &temp[4], pw ) )\n                    return E_FAIL;\n\n                if ( ph > 2 )\n                {\n                    if ( !_StoreScanline( dptr + rowPitch*2, rowPitch, format, &temp[8], pw ) )\n                        return E_FAIL;\n\n                    if ( ph > 3 )\n                    {\n                        if ( !_StoreScanline( dptr + rowPitch*3, rowPitch, format, &temp[12], pw ) )\n                            return E_FAIL;\n                    }\n                }\n            }\n\n            sptr += sbpp;\n            dptr += dbpp*4;\n        }\n\n        pSrc += cImage.rowPitch;\n        pDest += rowPitch*4;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\nbool _IsAlphaAllOpaqueBC( _In_ const Image& cImage )\n{\n    if ( !cImage.pixels )\n        return false;\n\n    // Promote \"typeless\" BC formats\n    DXGI_FORMAT cformat;\n    switch( cImage.format )\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:  cformat = DXGI_FORMAT_BC1_UNORM; break;\n    case DXGI_FORMAT_BC2_TYPELESS:  cformat = DXGI_FORMAT_BC2_UNORM; break;\n    case DXGI_FORMAT_BC3_TYPELESS:  cformat = DXGI_FORMAT_BC3_UNORM; break;\n    case DXGI_FORMAT_BC7_TYPELESS:  cformat = DXGI_FORMAT_BC7_UNORM; break;\n    default:                        cformat = cImage.format;         break;\n    }\n\n    // Determine BC format decoder\n    BC_DECODE pfDecode;\n    size_t sbpp;\n    switch(cformat)\n    {\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:    pfDecode = D3DXDecodeBC1;   sbpp = 8;   break;\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:    pfDecode = D3DXDecodeBC2;   sbpp = 16;  break;\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:    pfDecode = D3DXDecodeBC3;   sbpp = 16;  break;\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:    pfDecode = D3DXDecodeBC7;   sbpp = 16;  break;\n    default:\n        // BC4, BC5, and BC6 don't have alpha channels\n        return false;\n    }\n\n    // Scan blocks for non-opaque alpha\n    static const XMVECTORF32 threshold = { 0.99f, 0.99f, 0.99f, 0.99f };\n\n    XMVECTOR temp[16];\n    const uint8_t *pPixels = cImage.pixels;\n    for( size_t h = 0; h < cImage.height; h += 4 )\n    {\n        const uint8_t *ptr = pPixels;\n        size_t ph = std::min<size_t>( 4, cImage.height - h );\n        size_t w = 0;\n        for( size_t count = 0; (count < cImage.rowPitch) && (w < cImage.width); count += sbpp, w += 4 )\n        {\n            pfDecode( temp, ptr );\n\n            size_t pw = std::min<size_t>( 4, cImage.width - w );\n            assert( pw > 0 && ph > 0 );\n\n            if ( pw == 4 && ph == 4 )\n            {\n                // Full blocks\n                for( size_t j = 0; j < 16; ++j )\n                {\n                    XMVECTOR alpha = XMVectorSplatW( temp[j] );\n                    if ( XMVector4Less( alpha, threshold ) )\n                        return false;\n                }\n            }\n            else\n            {\n                // Handle partial blocks\n                for( size_t y = 0; y < ph; ++y )\n                {\n                    for( size_t x = 0; x < pw; ++x )\n                    {\n                        XMVECTOR alpha = XMVectorSplatW( temp[ y * 4 + x ] );\n                        if ( XMVector4Less( alpha, threshold ) )\n                            return false;\n                    }\n                }\n            }\n\n            ptr += sbpp;\n        }\n\n        pPixels += cImage.rowPitch;\n    }\n\n    return true;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Compress( const Image& srcImage, DXGI_FORMAT format, DWORD compress, float alphaRef, ScratchImage& image )\n{\n    if ( IsCompressed(srcImage.format) || !IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( IsTypeless(format)\n         || IsTypeless(srcImage.format) || IsPlanar(srcImage.format) || IsPalettized(srcImage.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    // Create compressed image\n    HRESULT hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    // Compress single image\n    if (compress & TEX_COMPRESS_PARALLEL)\n    {\n#ifndef _OPENMP\n        return E_NOTIMPL;\n#else\n        hr = _CompressBC_Parallel( srcImage, *img, _GetBCFlags( compress ), _GetSRGBFlags( compress ), alphaRef );\n#endif // _OPENMP\n    }\n    else\n    {\n        hr = _CompressBC( srcImage, *img, _GetBCFlags( compress ), _GetSRGBFlags( compress ), alphaRef );\n    }\n\n    if ( FAILED(hr) )\n        image.Release();\n\n    return hr;\n}\n\n_Use_decl_annotations_\nHRESULT Compress( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                  DXGI_FORMAT format, DWORD compress, float alphaRef, ScratchImage& cImages )\n{\n    if ( !srcImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(metadata.format) || !IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( IsTypeless(format)\n         || IsTypeless(metadata.format) || IsPlanar(metadata.format) || IsPalettized(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    cImages.Release();\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = cImages.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != cImages.GetImageCount() )\n    {\n        cImages.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = cImages.GetImages();\n    if ( !dest  )\n    {\n        cImages.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        assert( dest[ index ].format == format );\n\n        const Image& src = srcImages[ index ];\n\n        if ( src.width != dest[ index ].width || src.height != dest[ index ].height )\n        {\n            cImages.Release();\n            return E_FAIL;\n        }\n\n        if ( (compress & TEX_COMPRESS_PARALLEL) )\n        {\n#ifndef _OPENMP\n            return E_NOTIMPL;\n#else\n            if ( compress & TEX_COMPRESS_PARALLEL )\n            {\n                hr = _CompressBC_Parallel( src, dest[ index ], _GetBCFlags( compress ), _GetSRGBFlags( compress ), alphaRef );\n                if ( FAILED(hr) )\n                {\n                    cImages.Release();\n                    return  hr;\n                }\n            }\n#endif // _OPENMP\n        }\n        else\n        {\n            hr = _CompressBC( src, dest[ index ], _GetBCFlags( compress ), _GetSRGBFlags( compress ), alphaRef );\n            if ( FAILED(hr) )\n            {\n                cImages.Release();\n                return hr;\n            }\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Decompression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Decompress( const Image& cImage, DXGI_FORMAT format, ScratchImage& image )\n{\n    if ( !IsCompressed(cImage.format) || IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( format == DXGI_FORMAT_UNKNOWN )\n    {\n        // Pick a default decompressed format based on BC input format\n        format = _DefaultDecompress( cImage.format );\n        if ( format == DXGI_FORMAT_UNKNOWN )\n        {\n            // Input is not a compressed format\n            return E_INVALIDARG;\n        }\n    }\n    else\n    {\n        if ( !IsValid(format) )\n            return E_INVALIDARG;\n\n        if ( IsTypeless(format) || IsPlanar(format) || IsPalettized(format) )\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    // Create decompressed image\n    HRESULT hr = image.Initialize2D( format, cImage.width, cImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    // Decompress single image\n    hr = _DecompressBC( cImage, *img );\n    if ( FAILED(hr) )\n        image.Release();\n\n    return hr;\n}\n\n_Use_decl_annotations_\nHRESULT Decompress( const Image* cImages, size_t nimages, const TexMetadata& metadata,\n                    DXGI_FORMAT format, ScratchImage& images )\n{\n    if ( !cImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( !IsCompressed(metadata.format) || IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( format == DXGI_FORMAT_UNKNOWN )\n    {\n        // Pick a default decompressed format based on BC input format\n        format = _DefaultDecompress( cImages[0].format );\n        if ( format == DXGI_FORMAT_UNKNOWN )\n        {\n            // Input is not a compressed format\n            return E_FAIL;\n        }\n    }\n    else\n    {\n        if ( !IsValid(format) )\n            return E_INVALIDARG;\n\n        if ( IsTypeless(format) || IsPlanar(format) || IsPalettized(format) )\n            HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    images.Release();\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = images.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != images.GetImageCount() )\n    {\n        images.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = images.GetImages();\n    if ( !dest )\n    {\n        images.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        assert( dest[ index ].format == format );\n\n        const Image& src = cImages[ index ];\n        if ( !IsCompressed( src.format ) )\n        {\n            images.Release();\n            return E_FAIL;\n        }\n\n        if ( src.width != dest[ index ].width || src.height != dest[ index ].height )\n        {\n            images.Release();\n            return E_FAIL;\n        }\n\n        hr = _DecompressBC( src, dest[ index ] );\n        if ( FAILED(hr) )\n        {\n            images.Release();\n            return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexCompressGPU.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexCompressGPU.cpp\n//  \n// DirectX Texture Library - DirectCompute-based texture compression\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"bcdirectcompute.h\"\n\nnamespace DirectX\n{\n\ninline static DWORD _GetSRGBFlags( _In_ DWORD compress )\n{\n    static_assert( TEX_COMPRESS_SRGB_IN == TEX_FILTER_SRGB_IN, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_COMPRESS_SRGB_OUT == TEX_FILTER_SRGB_OUT, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_COMPRESS_SRGB == TEX_FILTER_SRGB, \"TEX_COMPRESS_SRGB* should match TEX_FILTER_SRGB*\" );\n    return ( compress & TEX_COMPRESS_SRGB );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to R8G8B8A8_UNORM or R8G8B8A8_UNORM_SRGB doing any conversion logic needed\n//-------------------------------------------------------------------------------------\nstatic HRESULT _ConvertToRGBA32( _In_ const Image& srcImage, _In_ ScratchImage& image, bool srgb, _In_ DWORD filter )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    DXGI_FORMAT format = srgb ? DXGI_FORMAT_R8G8B8A8_UNORM_SRGB : DXGI_FORMAT_R8G8B8A8_UNORM;\n\n    HRESULT hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    uint8_t* pDest = img->pixels;\n    if ( !pDest )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( ( sizeof(XMVECTOR) * srcImage.width ), 16 ) ) );\n    if ( !scanline )\n    {\n        image.Release();\n        return E_OUTOFMEMORY;\n    }\n\n    const uint8_t *pSrc = srcImage.pixels;\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_LoadScanline( scanline.get(), srcImage.width, pSrc, srcImage.rowPitch, srcImage.format ) )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        _ConvertScanline( scanline.get(), srcImage.width, format, srcImage.format, filter );\n\n        if ( !_StoreScanline( pDest, img->rowPitch, format, scanline.get(), srcImage.width ) )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        pSrc += srcImage.rowPitch;\n        pDest += img->rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to DXGI_FORMAT_R32G32B32A32_FLOAT doing any conversion logic needed\n//-------------------------------------------------------------------------------------\nstatic HRESULT _ConvertToRGBAF32( const Image& srcImage, ScratchImage& image, _In_ DWORD filter )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    HRESULT hr = image.Initialize2D( DXGI_FORMAT_R32G32B32A32_FLOAT, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    uint8_t* pDest = img->pixels;\n    if ( !pDest )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    const uint8_t *pSrc = srcImage.pixels;\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_LoadScanline( reinterpret_cast<XMVECTOR*>(pDest), srcImage.width, pSrc, srcImage.rowPitch, srcImage.format ) )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        _ConvertScanline( reinterpret_cast<XMVECTOR*>(pDest), srcImage.width, DXGI_FORMAT_R32G32B32A32_FLOAT, srcImage.format, filter );\n\n        pSrc += srcImage.rowPitch;\n        pDest += img->rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Compress using GPU, converting to the proper input format for the shader if needed\n//-------------------------------------------------------------------------------------\ninline static HRESULT _GPUCompress( _In_ GPUCompressBC* gpubc, _In_ const Image& srcImage, _In_ const Image& destImage, _In_ DWORD compress )\n{\n    if ( !gpubc )\n        return E_POINTER;\n\n    assert( srcImage.pixels && destImage.pixels );\n\n    DXGI_FORMAT format = gpubc->GetSourceFormat();\n\n    if ( srcImage.format == format )\n    {\n        // Input is already in our required source format\n        return gpubc->Compress( srcImage, destImage );\n    }\n    else\n    {\n        // Convert format and then use as the source image\n        ScratchImage image;\n        HRESULT hr;\n\n        DWORD srgb = _GetSRGBFlags( compress );\n\n        switch( format )\n        {\n        case DXGI_FORMAT_R8G8B8A8_UNORM:\n            hr = _ConvertToRGBA32( srcImage, image, false, srgb );\n            break;\n\n        case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n            hr = _ConvertToRGBA32( srcImage, image, true, srgb );\n            break;\n\n        case DXGI_FORMAT_R32G32B32A32_FLOAT:\n            hr = _ConvertToRGBAF32( srcImage, image, srgb );\n            break;\n\n        default:\n            hr = E_UNEXPECTED;\n            break;\n        }\n\n        if ( FAILED(hr) )\n            return hr;\n\n        const Image *img = image.GetImage( 0, 0, 0 );\n        if ( !img )\n            return E_POINTER;\n\n        return gpubc->Compress( *img, destImage );\n    }\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Compression\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Compress( ID3D11Device* pDevice, const Image& srcImage, DXGI_FORMAT format, DWORD compress, float alphaWeight, ScratchImage& image )\n{\n    if ( !pDevice || IsCompressed(srcImage.format) || !IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( IsTypeless(format)\n         || IsTypeless(srcImage.format) || IsPlanar(srcImage.format) || IsPalettized(srcImage.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    // Setup GPU compressor\n    std::unique_ptr<GPUCompressBC> gpubc( new (std::nothrow) GPUCompressBC );\n    if ( !gpubc )\n        return E_OUTOFMEMORY;\n\n    HRESULT hr = gpubc->Initialize( pDevice );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = gpubc->Prepare( srcImage.width, srcImage.height, format, alphaWeight, !(compress & TEX_COMPRESS_BC7_USE_3SUBSETS) );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Create workspace for result\n    hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    hr = _GPUCompress( gpubc.get(), srcImage, *img, compress );\n    if ( FAILED(hr) )\n        image.Release();\n\n    return hr;\n}\n\n_Use_decl_annotations_\nHRESULT Compress( ID3D11Device* pDevice, const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                  DXGI_FORMAT format, DWORD compress, float alphaWeight, ScratchImage& cImages )\n{\n    if ( !pDevice || !srcImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(metadata.format) || !IsCompressed(format) )\n        return E_INVALIDARG;\n\n    if ( IsTypeless(format)\n         || IsTypeless(metadata.format) || IsPlanar(metadata.format) || IsPalettized(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    cImages.Release();\n\n    // Setup GPU compressor\n    std::unique_ptr<GPUCompressBC> gpubc( new (std::nothrow) GPUCompressBC );\n    if ( !gpubc )\n        return E_OUTOFMEMORY;\n\n    HRESULT hr = gpubc->Initialize( pDevice );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Create workspace for result\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    hr = cImages.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != cImages.GetImageCount() )\n    {\n        cImages.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = cImages.GetImages();\n    if ( !dest  )\n    {\n        cImages.Release();\n        return E_POINTER;\n    }\n\n    // Process images (ordered by size)\n    switch( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        {\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                hr = gpubc->Prepare( w, h, format, alphaWeight, !(compress & TEX_COMPRESS_BC7_USE_3SUBSETS) );\n                if ( FAILED(hr) )\n                {\n                    cImages.Release();\n                    return hr;\n                }\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    size_t index = metadata.ComputeIndex( level, item, 0 );\n                    if ( index >= nimages )\n                    {\n                        cImages.Release();\n                        return E_FAIL;\n                    }\n\n                    assert( dest[ index ].format == format );\n\n                    const Image& src = srcImages[ index ];\n\n                    if ( src.width != dest[ index ].width || src.height != dest[ index ].height )\n                    {\n                        cImages.Release();\n                        return E_FAIL;\n                    }\n\n                    hr = _GPUCompress( gpubc.get(), src, dest[ index ], compress );\n                    if ( FAILED(hr) )\n                    {\n                        cImages.Release();\n                        return hr;\n                    }\n                }\n\n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n            size_t d = metadata.depth;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                hr = gpubc->Prepare( w, h, format, alphaWeight, !(compress & TEX_COMPRESS_BC7_USE_3SUBSETS) );\n                if ( FAILED(hr) )\n                {\n                    cImages.Release();\n                    return hr;\n                }\n\n                for( size_t slice=0; slice < d; ++slice )\n                {\n                    size_t index = metadata.ComputeIndex( level, 0, slice );\n                    if ( index >= nimages )\n                    {\n                        cImages.Release();\n                        return E_FAIL;\n                    }\n\n                    assert( dest[ index ].format == format );\n\n                    const Image& src = srcImages[ index ];\n\n                    if ( src.width != dest[ index ].width || src.height != dest[ index ].height )\n                    {\n                        cImages.Release();\n                        return E_FAIL;\n                    }\n\n                    hr = _GPUCompress( gpubc.get(), src, dest[ index ], compress );\n                    if ( FAILED(hr) )\n                    {\n                        cImages.Release();\n                        return hr;\n                    }\n                }\n\n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexConvert.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexConvert.cpp\n//  \n// DirectX Texture Library - Image conversion \n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nusing namespace DirectX::PackedVector;\nusing Microsoft::WRL::ComPtr;\n\nnamespace\n{\n#if DIRECTX_MATH_VERSION < 306\n    inline float round_to_nearest( float x )\n    {\n        // Round to nearest (even)\n        float i = floorf(x);\n        x -= i;\n        if(x < 0.5f)\n            return i;\n        if(x > 0.5f)\n            return i + 1.f;\n\n        float int_part;\n        modff( i / 2.f, &int_part );\n        if ( (2.f*int_part) == i )\n        {\n            return i;\n        }\n\n        return i + 1.f;\n    }\n#endif\n\n    inline uint32_t FloatTo7e3(float Value)\n    {\n        uint32_t IValue = reinterpret_cast<uint32_t *>(&Value)[0];\n\n        if ( IValue & 0x80000000U )\n        {\n            // Positive only\n            return 0;\n        }\n        else if (IValue > 0x41FF73FFU)\n        {\n            // The number is too large to be represented as a 7e3. Saturate.\n            return 0x3FFU;\n        }\n        else\n        {\n            if (IValue < 0x3E800000U)\n            {\n                // The number is too small to be represented as a normalized 7e3.\n                // Convert it to a denormalized value.\n                uint32_t Shift = 125U - (IValue >> 23U);\n                IValue = (0x800000U | (IValue & 0x7FFFFFU)) >> Shift;\n            }\n            else\n            {\n                // Rebias the exponent to represent the value as a normalized 7e3.\n                IValue += 0xC2000000U;\n            }\n\n            return ((IValue + 0x7FFFU + ((IValue >> 16U) & 1U)) >> 16U)&0x3FFU; \n        }\n    }\n\n    inline float FloatFrom7e3( uint32_t Value )\n    {\n        uint32_t Mantissa = (uint32_t)(Value & 0x7F);\n\n        uint32_t Exponent = (Value & 0x380);\n        if (Exponent != 0)  // The value is normalized\n        {\n            Exponent = (uint32_t)((Value >> 7) & 0x7);\n        }\n        else if (Mantissa != 0)     // The value is denormalized\n        {\n            // Normalize the value in the resulting float\n            Exponent = 1;\n\n            do\n            {\n                Exponent--;\n                Mantissa <<= 1;\n            } while ((Mantissa & 0x80) == 0);\n\n            Mantissa &= 0x7F;\n        }\n        else                        // The value is zero\n        {\n            Exponent = (uint32_t)-124;\n        }\n\n        uint32_t Result = ((Exponent + 124) << 23) | // Exponent\n                          (Mantissa << 16);          // Mantissa\n\n        return reinterpret_cast<float*>(&Result)[0];\n    }\n\n    inline uint32_t FloatTo6e4(float Value)\n    {\n        uint32_t IValue = reinterpret_cast<uint32_t *>(&Value)[0];\n\n        if ( IValue & 0x80000000U )\n        {\n            // Positive only\n            return 0;\n        }\n        else if (IValue > 0x43FEFFFFU)\n        {\n            // The number is too large to be represented as a 6e4. Saturate.\n            return 0x3FFU;\n        }\n        else\n        {\n            if (IValue < 0x3C800000U)\n            {\n                // The number is too small to be represented as a normalized 6e4.\n                // Convert it to a denormalized value.\n                uint32_t Shift = 121U - (IValue >> 23U);\n                IValue = (0x800000U | (IValue & 0x7FFFFFU)) >> Shift;\n            }\n            else\n            {\n                // Rebias the exponent to represent the value as a normalized 6e4.\n                IValue += 0xC4000000U;\n            }\n\n            return ((IValue + 0xFFFFU + ((IValue >> 17U) & 1U)) >> 17U)&0x3FFU; \n        }\n    }\n\n    inline float FloatFrom6e4( uint32_t Value )\n    {\n        uint32_t Mantissa = (uint32_t)(Value & 0x3F);\n\n        uint32_t Exponent = (Value & 0x3C0);\n        if (Exponent != 0)  // The value is normalized\n        {\n            Exponent = (uint32_t)((Value >> 6) & 0xF);\n        }\n        else if (Mantissa != 0)     // The value is denormalized\n        {\n            // Normalize the value in the resulting float\n            Exponent = 1;\n\n            do\n            {\n                Exponent--;\n                Mantissa <<= 1;\n            } while ((Mantissa & 0x40) == 0);\n\n            Mantissa &= 0x3F;\n        }\n        else                        // The value is zero\n        {\n            Exponent = (uint32_t)-120;\n        }\n\n        uint32_t Result = ((Exponent + 120) << 23) | // Exponent\n                          (Mantissa << 17);          // Mantissa\n\n        return reinterpret_cast<float*>(&Result)[0];\n    }\n};\n\nnamespace DirectX\n{\nstatic const XMVECTORF32 g_Grayscale = { 0.2125f, 0.7154f, 0.0721f, 0.0f };\nstatic const XMVECTORF32 g_HalfMin = { -65504.f, -65504.f, -65504.f, -65504.f };\nstatic const XMVECTORF32 g_HalfMax = { 65504.f, 65504.f, 65504.f, 65504.f };\nstatic const XMVECTORF32 g_8BitBias = { 0.5f/255.f, 0.5f/255.f, 0.5f/255.f, 0.5f/255.f };\n\n//-------------------------------------------------------------------------------------\n// Copies an image row with optional clearing of alpha value to 1.0\n// (can be used in place as well) otherwise copies the image row unmodified.\n//-------------------------------------------------------------------------------------\nvoid _CopyScanline(_When_(pDestination == pSource, _Inout_updates_bytes_(outSize))\n                   _When_(pDestination != pSource, _Out_writes_bytes_(outSize))\n                   LPVOID pDestination, _In_ size_t outSize,\n                   _In_reads_bytes_(inSize) LPCVOID pSource, _In_ size_t inSize,\n                   _In_ DXGI_FORMAT format, _In_ DWORD flags)\n{\n    assert( pDestination && outSize > 0 );\n    assert( pSource && inSize > 0 );\n    assert( IsValid(format) && !IsPalettized(format) );\n\n    if ( flags & TEXP_SCANLINE_SETALPHA )\n    {\n        switch( static_cast<int>(format) )\n        {\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n        case DXGI_FORMAT_R32G32B32A32_FLOAT:\n        case DXGI_FORMAT_R32G32B32A32_UINT:\n        case DXGI_FORMAT_R32G32B32A32_SINT:\n            if ( inSize >= 16 && outSize >= 16 )\n            {\n                uint32_t alpha;\n                if ( format == DXGI_FORMAT_R32G32B32A32_FLOAT )\n                    alpha = 0x3f800000;\n                else if ( format == DXGI_FORMAT_R32G32B32A32_SINT )\n                    alpha = 0x7fffffff;\n                else\n                    alpha = 0xffffffff;\n\n                if ( pDestination == pSource )\n                {\n                    uint32_t *dPtr = reinterpret_cast<uint32_t*> (pDestination);\n                    for( size_t count = 0; count < ( outSize - 15 ); count += 16 )\n                    {\n                        dPtr += 3;\n                        *(dPtr++) = alpha;\n                    }\n                }\n                else\n                {\n                    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                    uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 15 ); count += 16 )\n                    {\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = alpha;\n                        sPtr++;\n                    }\n                }\n            }\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n        case DXGI_FORMAT_R16G16B16A16_FLOAT:\n        case DXGI_FORMAT_R16G16B16A16_UNORM:\n        case DXGI_FORMAT_R16G16B16A16_UINT:\n        case DXGI_FORMAT_R16G16B16A16_SNORM:\n        case DXGI_FORMAT_R16G16B16A16_SINT:\n        case DXGI_FORMAT_Y416:\n            if ( inSize >= 8 && outSize >= 8 )\n            {\n                uint16_t alpha;\n                if ( format == DXGI_FORMAT_R16G16B16A16_FLOAT )\n                    alpha = 0x3c00;\n                else if ( format == DXGI_FORMAT_R16G16B16A16_SNORM || format == DXGI_FORMAT_R16G16B16A16_SINT )\n                    alpha = 0x7fff;\n                else\n                    alpha = 0xffff;\n\n                if ( pDestination == pSource )\n                {\n                    uint16_t *dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 7 ); count += 8 )\n                    {\n                        dPtr += 3;\n                        *(dPtr++) = alpha;\n                    }\n                }\n                else\n                {\n                    const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n                    uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 7 ); count += 8 )\n                    {\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = *(sPtr++);\n                        *(dPtr++) = alpha;\n                        sPtr++;\n                    }\n                }\n            }\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n        case DXGI_FORMAT_R10G10B10A2_UNORM:\n        case DXGI_FORMAT_R10G10B10A2_UINT:\n        case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        case DXGI_FORMAT_Y410:\n        case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n        case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n            if ( inSize >= 4 && outSize >= 4 )\n            {\n                if ( pDestination == pSource )\n                {\n                    uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 3 ); count += 4 )\n                    {\n                        *dPtr |= 0xC0000000;\n                        ++dPtr;\n                    }\n                }\n                else\n                {\n                    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                    uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 3 ); count += 4 )\n                    {\n                        *(dPtr++) = *(sPtr++) | 0xC0000000;\n                    }\n                }\n            }\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n        case DXGI_FORMAT_R8G8B8A8_UNORM:\n        case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        case DXGI_FORMAT_R8G8B8A8_UINT:\n        case DXGI_FORMAT_R8G8B8A8_SNORM:\n        case DXGI_FORMAT_R8G8B8A8_SINT:\n        case DXGI_FORMAT_B8G8R8A8_UNORM:\n        case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n        case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        case DXGI_FORMAT_AYUV:\n            if ( inSize >= 4 && outSize >= 4 )\n            {\n                const uint32_t alpha = ( format == DXGI_FORMAT_R8G8B8A8_SNORM || format == DXGI_FORMAT_R8G8B8A8_SINT ) ? 0x7f000000 : 0xff000000;\n\n                if ( pDestination == pSource )\n                {\n                    uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 3 ); count += 4 )\n                    {\n                        uint32_t t = *dPtr & 0xFFFFFF;\n                        t |= alpha;\n                        *(dPtr++) = t;\n                    }\n                }\n                else\n                {\n                    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                    uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 3 ); count += 4 )\n                    {\n                        uint32_t t = *(sPtr++) & 0xFFFFFF;\n                        t |= alpha;\n                        *(dPtr++) = t;\n                    }\n                }\n            }\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_B5G5R5A1_UNORM:\n            if ( inSize >= 2 && outSize >= 2 )\n            {\n                if ( pDestination == pSource )\n                {\n                    uint16_t *dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 1 ); count += 2 )\n                    {\n                        *(dPtr++) |= 0x8000;\n                    }\n                }\n                else\n                {\n                    const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n                    uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 1 ); count += 2 )\n                    {\n                        *(dPtr++) = *(sPtr++) | 0x8000;\n                    }\n                }\n            }\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_A8_UNORM:\n            memset( pDestination, 0xff, outSize );\n            return;\n\n        //-----------------------------------------------------------------------------\n        case DXGI_FORMAT_B4G4R4A4_UNORM:\n            if ( inSize >= 2 && outSize >= 2 )\n            {\n                if ( pDestination == pSource )\n                {\n                    uint16_t *dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 1 ); count += 2 )\n                    {\n                        *(dPtr++) |= 0xF000;\n                    }\n                }\n                else\n                {\n                    const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n                    uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 1 ); count += 2 )\n                    {\n                        *(dPtr++) = *(sPtr++) | 0xF000;\n                    }\n                }\n            }\n            return;\n        }\n    }\n\n    // Fall-through case is to just use memcpy (assuming this is not an in-place operation)\n    if ( pDestination == pSource )\n        return;\n\n    size_t size = std::min<size_t>( outSize, inSize );\n    memcpy_s( pDestination, outSize, pSource, size );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Swizzles (RGB <-> BGR) an image row with optional clearing of alpha value to 1.0\n// (can be used in place as well) otherwise copies the image row unmodified.\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid _SwizzleScanline( LPVOID pDestination, size_t outSize, LPCVOID pSource, size_t inSize, DXGI_FORMAT format, DWORD flags )\n{\n    assert( pDestination && outSize > 0 );\n    assert( pSource && inSize > 0 );\n    assert( IsValid(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    switch( format )\n    {\n    //---------------------------------------------------------------------------------\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        if ( inSize >= 4 && outSize >= 4 )\n        {\n            if ( flags & TEXP_SCANLINE_LEGACY )\n            {\n                // Swap Red (R) and Blue (B) channel (used for D3DFMT_A2R10G10B10 legacy sources)\n                if ( pDestination == pSource )\n                {\n                    uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 3 ); count += 4 )\n                    {\n                        uint32_t t = *dPtr;\n\n                        uint32_t t1 = (t & 0x3ff00000) >> 20;\n                        uint32_t t2 = (t & 0x000003ff) << 20;\n                        uint32_t t3 = (t & 0x000ffc00);\n                        uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xC0000000 : (t & 0xC0000000);\n\n                        *(dPtr++) = t1 | t2 | t3 | ta;\n                    }\n                }\n                else\n                {\n                    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                    uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 3 ); count += 4 )\n                    {\n                        uint32_t t = *(sPtr++);\n\n                        uint32_t t1 = (t & 0x3ff00000) >> 20;\n                        uint32_t t2 = (t & 0x000003ff) << 20;\n                        uint32_t t3 = (t & 0x000ffc00);\n                        uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xC0000000 : (t & 0xC0000000);\n\n                        *(dPtr++) = t1 | t2 | t3 | ta;\n                    }\n                }\n                return;\n            }\n        }\n        break;\n\n    //---------------------------------------------------------------------------------\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        if ( inSize >= 4 && outSize >= 4 )\n        {\n            // Swap Red (R) and Blue (B) channels (used to convert from DXGI 1.1 BGR formats to DXGI 1.0 RGB)\n            if ( pDestination == pSource )\n            {\n                uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                for( size_t count = 0; count < ( outSize - 3 ); count += 4 )\n                {\n                    uint32_t t = *dPtr;\n\n                    uint32_t t1 = (t & 0x00ff0000) >> 16;\n                    uint32_t t2 = (t & 0x000000ff) << 16;\n                    uint32_t t3 = (t & 0x0000ff00);\n                    uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : (t & 0xFF000000);\n\n                    *(dPtr++) = t1 | t2 | t3 | ta;\n                }\n            }\n            else\n            {\n                const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                size_t size = std::min<size_t>( outSize, inSize );\n                for( size_t count = 0; count < ( size - 3 ); count += 4 )\n                {\n                    uint32_t t = *(sPtr++);\n\n                    uint32_t t1 = (t & 0x00ff0000) >> 16;\n                    uint32_t t2 = (t & 0x000000ff) << 16;\n                    uint32_t t3 = (t & 0x0000ff00);\n                    uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : (t & 0xFF000000);\n\n                    *(dPtr++) = t1 | t2 | t3 | ta;\n                }\n            }\n            return;\n        }\n        break;\n\n    //---------------------------------------------------------------------------------\n    case DXGI_FORMAT_YUY2:\n        if ( inSize >= 4 && outSize >= 4 )\n        {\n            if ( flags & TEXP_SCANLINE_LEGACY )\n            {\n                // Reorder YUV components (used to convert legacy UYVY -> YUY2)\n                if ( pDestination == pSource )\n                {\n                    uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    for( size_t count = 0; count < ( outSize - 3 ); count += 4 )\n                    {\n                        uint32_t t = *dPtr;\n\n                        uint32_t t1 = (t & 0x000000ff) << 8;\n                        uint32_t t2 = (t & 0x0000ff00) >> 8;\n                        uint32_t t3 = (t & 0x00ff0000) << 8;\n                        uint32_t t4 = (t & 0xff000000) >> 8;\n\n                        *(dPtr++) = t1 | t2 | t3 | t4;\n                    }\n                }\n                else\n                {\n                    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n                    uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n                    size_t size = std::min<size_t>( outSize, inSize );\n                    for( size_t count = 0; count < ( size - 3 ); count += 4 )\n                    {\n                        uint32_t t = *(sPtr++);\n\n                        uint32_t t1 = (t & 0x000000ff) << 8;\n                        uint32_t t2 = (t & 0x0000ff00) >> 8;\n                        uint32_t t3 = (t & 0x00ff0000) << 8;\n                        uint32_t t4 = (t & 0xff000000) >> 8;\n\n                        *(dPtr++) = t1 | t2 | t3 | t4;\n                    }\n                }\n                return;\n            }\n        }\n        break;\n    }\n\n    // Fall-through case is to just use memcpy (assuming this is not an in-place operation)\n    if ( pDestination == pSource )\n        return;\n\n    size_t size = std::min<size_t>( outSize, inSize );\n    memcpy_s( pDestination, outSize, pSource, size );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts an image row with optional clearing of alpha value to 1.0\n// Returns true if supported, false if expansion case not supported\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nbool _ExpandScanline( LPVOID pDestination, size_t outSize, DXGI_FORMAT outFormat,  \n                      LPCVOID pSource, size_t inSize, DXGI_FORMAT inFormat, DWORD flags )\n{\n    assert( pDestination && outSize > 0 );\n    assert( pSource && inSize > 0 );\n    assert( IsValid(outFormat) && !IsPlanar(outFormat) && !IsPalettized(outFormat) );\n    assert( IsValid(inFormat) && !IsPlanar(inFormat) && !IsPalettized(inFormat) );\n\n    switch( inFormat )\n    {\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        if ( outFormat != DXGI_FORMAT_R8G8B8A8_UNORM )\n            return false;\n\n        // DXGI_FORMAT_B5G6R5_UNORM -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = ((t & 0xf800) >> 8) | ((t & 0xe000) >> 13);\n                uint32_t t2 = ((t & 0x07e0) << 5) | ((t & 0x0600) >> 5);\n                uint32_t t3 = ((t & 0x001f) << 19) | ((t & 0x001c) << 14);\n\n                *(dPtr++) = t1 | t2 | t3 | 0xff000000;\n            }\n            return true;\n        }\n        return false;\n        \n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        if ( outFormat != DXGI_FORMAT_R8G8B8A8_UNORM )\n            return false;\n\n        // DXGI_FORMAT_B5G5R5A1_UNORM -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = ((t & 0x7c00) >> 7) | ((t & 0x7000) >> 12);\n                uint32_t t2 = ((t & 0x03e0) << 6) | ((t & 0x0380) << 1);\n                uint32_t t3 = ((t & 0x001f) << 19) | ((t & 0x001c) << 14);\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : ((t & 0x8000) ? 0xff000000 : 0);\n\n                *(dPtr++) = t1 | t2 | t3 | ta;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        if ( outFormat != DXGI_FORMAT_R8G8B8A8_UNORM )\n            return false;\n\n        // DXGI_FORMAT_B4G4R4A4_UNORM -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = ((t & 0x0f00) >> 4) | ((t & 0x0f00) >> 8);\n                uint32_t t2 = ((t & 0x00f0) << 8) | ((t & 0x00f0) << 4);\n                uint32_t t3 = ((t & 0x000f) << 20) | ((t & 0x000f) << 16);\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : (((t & 0xf000) << 16) | ((t & 0xf000) << 12));\n\n                *(dPtr++) = t1 | t2 | t3 | ta;\n            }\n            return true;\n        }\n        return false;\n    }\n\n    return false;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Loads an image row into standard RGBA XMVECTOR (aligned) array\n//-------------------------------------------------------------------------------------\n#define LOAD_SCANLINE( type, func )\\\n        if ( size >= sizeof(type) )\\\n        {\\\n            const type * __restrict sPtr = reinterpret_cast<const type*>(pSource);\\\n            for( size_t icount = 0; icount < ( size - sizeof(type) + 1 ); icount += sizeof(type) )\\\n            {\\\n                if ( dPtr >= ePtr ) break;\\\n                *(dPtr++) = func( sPtr++ );\\\n            }\\\n            return true;\\\n        }\\\n        return false;\n\n#define LOAD_SCANLINE3( type, func, defvec )\\\n        if ( size >= sizeof(type) )\\\n        {\\\n            const type * __restrict sPtr = reinterpret_cast<const type*>(pSource);\\\n            for( size_t icount = 0; icount < ( size - sizeof(type) + 1 ); icount += sizeof(type) )\\\n            {\\\n                XMVECTOR v = func( sPtr++ );\\\n                if ( dPtr >= ePtr ) break;\\\n                *(dPtr++) = XMVectorSelect( defvec, v, g_XMSelect1110 );\\\n            }\\\n            return true;\\\n        }\\\n        return false;\n\n#define LOAD_SCANLINE2( type, func, defvec )\\\n        if ( size >= sizeof(type) )\\\n        {\\\n            const type * __restrict sPtr = reinterpret_cast<const type*>(pSource);\\\n            for( size_t icount = 0; icount < ( size - sizeof(type) + 1 ); icount += sizeof(type) )\\\n            {\\\n                XMVECTOR v = func( sPtr++ );\\\n                if ( dPtr >= ePtr ) break;\\\n                *(dPtr++) = XMVectorSelect( defvec, v, g_XMSelect1100 );\\\n            }\\\n            return true;\\\n        }\\\n        return false;\n\n#pragma warning(suppress: 6101)\n_Use_decl_annotations_ bool _LoadScanline( XMVECTOR* pDestination, size_t count,\n                    LPCVOID pSource, size_t size, DXGI_FORMAT format )\n{\n    assert( pDestination && count > 0 && (((uintptr_t)pDestination & 0xF) == 0) );\n    assert( pSource && size > 0 );\n    assert( IsValid(format) && !IsTypeless(format, false) && !IsCompressed(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    XMVECTOR* __restrict dPtr = pDestination;\n    if ( !dPtr )\n        return false;\n\n    const XMVECTOR* ePtr = pDestination + count;\n\n    switch( static_cast<int>(format) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n        {\n            size_t msize = (size > (sizeof(XMVECTOR)*count)) ? (sizeof(XMVECTOR)*count) : size;\n            memcpy_s( dPtr, sizeof(XMVECTOR)*count, pSource, msize );\n        }\n        return true;\n\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n        LOAD_SCANLINE( XMUINT4, XMLoadUInt4 )\n\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        LOAD_SCANLINE( XMINT4, XMLoadSInt4 )\n\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n        LOAD_SCANLINE3( XMFLOAT3, XMLoadFloat3, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R32G32B32_UINT:\n        LOAD_SCANLINE3( XMUINT3, XMLoadUInt3, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R32G32B32_SINT:\n        LOAD_SCANLINE3( XMINT3, XMLoadSInt3, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n        LOAD_SCANLINE( XMHALF4, XMLoadHalf4 )\n\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n        LOAD_SCANLINE( XMUSHORTN4, XMLoadUShortN4 ) \n\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n        LOAD_SCANLINE( XMUSHORT4, XMLoadUShort4 )\n\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n        LOAD_SCANLINE( XMSHORTN4, XMLoadShortN4 )\n\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n        LOAD_SCANLINE( XMSHORT4, XMLoadShort4 )\n\n    case DXGI_FORMAT_R32G32_FLOAT:\n        LOAD_SCANLINE2( XMFLOAT2, XMLoadFloat2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R32G32_UINT:\n        LOAD_SCANLINE2( XMUINT2, XMLoadUInt2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R32G32_SINT:\n        LOAD_SCANLINE2( XMINT2, XMLoadSInt2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n        {\n            const size_t psize = sizeof(float)+sizeof(uint32_t);\n            if ( size >= psize )\n            {\n                const float * sPtr = reinterpret_cast<const float*>(pSource);\n                for( size_t icount = 0; icount < ( size - psize + 1 ); icount += psize )\n                {\n                    const uint8_t* ps8 = reinterpret_cast<const uint8_t*>( &sPtr[1] );\n                    if ( dPtr >= ePtr ) break;\n                    *(dPtr++) = XMVectorSet( sPtr[0], static_cast<float>( *ps8 ), 0.f, 1.f );\n                    sPtr += 2;\n                }\n                return true;\n            }\n        }\n        return false;\n\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n        {\n            const size_t psize = sizeof(float)+sizeof(uint32_t);\n            if ( size >= psize )\n            {\n                const float * sPtr = reinterpret_cast<const float*>(pSource);\n                for( size_t icount = 0; icount < ( size - psize + 1 ); icount += psize )\n                {\n                    if ( dPtr >= ePtr ) break;\n                    *(dPtr++) = XMVectorSet( sPtr[0], 0.f /* typeless component assumed zero */, 0.f, 1.f );\n                    sPtr += 2;\n                }\n                return true;\n            }\n        }\n        return false;\n\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n        {\n            const size_t psize = sizeof(float)+sizeof(uint32_t);\n            if ( size >= psize )\n            {\n                const float * sPtr = reinterpret_cast<const float*>(pSource);\n                for( size_t icount = 0; icount < ( size - psize + 1 ); icount += psize )\n                {\n                    const uint8_t* pg8 = reinterpret_cast<const uint8_t*>( &sPtr[1] );\n                    if ( dPtr >= ePtr ) break;\n                    *(dPtr++) = XMVectorSet( 0.f /* typeless component assumed zero */, static_cast<float>( *pg8 ), 0.f, 1.f );\n                    sPtr += 2;\n                }\n                return true;\n            }\n        }\n        return false;\n\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n        LOAD_SCANLINE( XMUDECN4, XMLoadUDecN4 );\n\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n#if DIRECTX_MATH_VERSION >= 306\n        LOAD_SCANLINE( XMUDECN4, XMLoadUDecN4_XR );\n#else\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            const XMUDECN4 * __restrict sPtr = reinterpret_cast<const XMUDECN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( dPtr >= ePtr ) break;\n\n                int32_t ElementX = sPtr->v & 0x3FF;\n                int32_t ElementY = (sPtr->v >> 10) & 0x3FF;\n                int32_t ElementZ = (sPtr->v >> 20) & 0x3FF;\n\n                XMVECTORF32 vResult = {\n                    (float)(ElementX - 0x180) / 510.0f,\n                    (float)(ElementY - 0x180) / 510.0f,\n                    (float)(ElementZ - 0x180) / 510.0f,\n                    (float)(sPtr->v >> 30) / 3.0f\n                };\n\n                ++sPtr;\n\n                *(dPtr++) = vResult.v;\n            }\n            return true;\n        }\n        return false;\n#endif\n\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n        LOAD_SCANLINE( XMUDEC4, XMLoadUDec4 );\n\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n        LOAD_SCANLINE3( XMFLOAT3PK, XMLoadFloat3PK, g_XMIdentityR3 );\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        LOAD_SCANLINE( XMUBYTEN4, XMLoadUByteN4 )\n\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n        LOAD_SCANLINE( XMUBYTE4, XMLoadUByte4 )\n\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n        LOAD_SCANLINE( XMBYTEN4, XMLoadByteN4 )\n\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n        LOAD_SCANLINE( XMBYTE4, XMLoadByte4 )\n\n    case DXGI_FORMAT_R16G16_FLOAT:\n        LOAD_SCANLINE2( XMHALF2, XMLoadHalf2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16G16_UNORM:\n        LOAD_SCANLINE2( XMUSHORTN2, XMLoadUShortN2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16G16_UINT:\n        LOAD_SCANLINE2( XMUSHORT2, XMLoadUShort2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16G16_SNORM:\n        LOAD_SCANLINE2( XMSHORTN2, XMLoadShortN2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16G16_SINT:\n        LOAD_SCANLINE2( XMSHORT2, XMLoadShort2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n        if ( size >= sizeof(float) )\n        {\n            const float* __restrict sPtr = reinterpret_cast<const float*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(float) + 1 ); icount += sizeof(float) )\n            {\n                XMVECTOR v = XMLoadFloat( sPtr++ );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1000 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R32_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            const uint32_t* __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                XMVECTOR v = XMLoadInt( sPtr++ );\n                v = XMConvertVectorUIntToFloat( v, 0 );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1000 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R32_SINT:\n        if ( size >= sizeof(int32_t) )\n        {\n            const int32_t * __restrict sPtr = reinterpret_cast<const int32_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(int32_t) + 1 ); icount += sizeof(int32_t) )\n            {\n                XMVECTOR v = XMLoadInt( reinterpret_cast<const uint32_t*> (sPtr++) );\n                v = XMConvertVectorIntToFloat( v, 0 );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1000 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            const uint32_t * sPtr = reinterpret_cast<const uint32_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                float d = static_cast<float>( *sPtr & 0xFFFFFF ) / 16777215.f;\n                float s = static_cast<float>( ( *sPtr & 0xFF000000 ) >> 24 );\n                ++sPtr;\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( d, s, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n        if ( size >= sizeof(uint32_t) )\n        {\n            const uint32_t * sPtr = reinterpret_cast<const uint32_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                float r = static_cast<float>( *sPtr & 0xFFFFFF ) / 16777215.f;\n                ++sPtr;\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( r, 0.f /* typeless component assumed zero */, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            const uint32_t * sPtr = reinterpret_cast<const uint32_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                float g = static_cast<float>( ( *sPtr & 0xFF000000 ) >> 24 );\n                ++sPtr;\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( 0.f /* typeless component assumed zero */, g, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8G8_UNORM:\n        LOAD_SCANLINE2( XMUBYTEN2, XMLoadUByteN2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R8G8_UINT:\n        LOAD_SCANLINE2( XMUBYTE2, XMLoadUByte2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R8G8_SNORM:\n        LOAD_SCANLINE2( XMBYTEN2, XMLoadByteN2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R8G8_SINT:\n        LOAD_SCANLINE2( XMBYTE2, XMLoadByte2, g_XMIdentityR3 )\n\n    case DXGI_FORMAT_R16_FLOAT:\n        if ( size >= sizeof(HALF) )\n        {\n            const HALF * __restrict sPtr = reinterpret_cast<const HALF*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(HALF) + 1 ); icount += sizeof(HALF) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( XMConvertHalfToFloat(*sPtr++), 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n        if ( size >= sizeof(uint16_t) )\n        {\n            const uint16_t* __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint16_t) + 1 ); icount += sizeof(uint16_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++) / 65535.f, 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_UINT:\n        if ( size >= sizeof(uint16_t) )\n        {\n            const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(uint16_t) + 1 ); icount += sizeof(uint16_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++), 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_SNORM:\n        if ( size >= sizeof(int16_t) )\n        {\n            const int16_t * __restrict sPtr = reinterpret_cast<const int16_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(int16_t) + 1 ); icount += sizeof(int16_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++) / 32767.f, 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_SINT:\n        if ( size >= sizeof(int16_t) )\n        {\n            const int16_t * __restrict sPtr = reinterpret_cast<const int16_t*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(int16_t) + 1 ); icount += sizeof(int16_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++), 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++) / 255.f, 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_UINT:\n        if ( size >= sizeof(uint8_t) )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++), 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_SNORM:\n        if ( size >= sizeof(int8_t) )\n        {\n            const int8_t * __restrict sPtr = reinterpret_cast<const int8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(int8_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++) / 127.f, 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_SINT:\n        if ( size >= sizeof(int8_t) )\n        {\n            const int8_t * __restrict sPtr = reinterpret_cast<const int8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(int8_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( static_cast<float>(*sPtr++), 0.f, 0.f, 1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_A8_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( 0.f, 0.f, 0.f, static_cast<float>(*sPtr++) / 255.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R1_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                for( size_t bcount = 8; bcount > 0; --bcount )\n                {\n                    if ( dPtr >= ePtr ) break;\n                    *(dPtr++) = XMVectorSet( (((*sPtr >> (bcount-1)) & 0x1) ? 1.f : 0.f), 0.f, 0.f, 1.f );\n                }\n                \n                ++sPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n#if DIRECTX_MATH_VERSION >= 306\n        LOAD_SCANLINE3( XMFLOAT3SE, XMLoadFloat3SE, g_XMIdentityR3 )\n#else\n        if ( size >= sizeof(XMFLOAT3SE) )\n        {\n            const XMFLOAT3SE * __restrict sPtr = reinterpret_cast<const XMFLOAT3SE*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMFLOAT3SE) + 1 ); icount += sizeof(XMFLOAT3SE) )\n            {\n                union { float f; int32_t i; } fi;\n                fi.i = 0x33800000 + (sPtr->e << 23);\n                float Scale = fi.f;\n\n                XMVECTORF32 v = {\n                    Scale * float( sPtr->xm ),\n                    Scale * float( sPtr->ym ),\n                    Scale * float( sPtr->zm ),\n                    1.0f };\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = v;\n            }\n            return true;\n        }\n        return false;\n#endif\n\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                XMVECTOR v = XMLoadUByteN4( sPtr++ );\n                XMVECTOR v1 = XMVectorSwizzle<0, 3, 2, 1>( v );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1110 );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v1, g_XMSelect1110 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                XMVECTOR v = XMLoadUByteN4( sPtr++ );\n                XMVECTOR v0 = XMVectorSwizzle<1, 0, 3, 2>( v );\n                XMVECTOR v1 = XMVectorSwizzle<1, 2, 3, 0>( v );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v0, g_XMSelect1110 );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v1, g_XMSelect1110 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        if ( size >= sizeof(XMU565) )\n        {\n            static const XMVECTORF32 s_Scale = { 1.f/31.f, 1.f/63.f, 1.f/31.f, 1.f };\n            const XMU565 * __restrict sPtr = reinterpret_cast<const XMU565*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMU565) + 1 ); icount += sizeof(XMU565) )\n            {\n                XMVECTOR v = XMLoadU565( sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                v = XMVectorSwizzle<2, 1, 0, 3>( v );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1110 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        if ( size >= sizeof(XMU555) )\n        {\n            static const XMVECTORF32 s_Scale = { 1.f/31.f, 1.f/31.f, 1.f/31.f, 1.f };\n            const XMU555 * __restrict sPtr = reinterpret_cast<const XMU555*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMU555) + 1 ); icount += sizeof(XMU555) )\n            {\n                XMVECTOR v = XMLoadU555( sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSwizzle<2, 1, 0, 3>( v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                XMVECTOR v = XMLoadUByteN4( sPtr++ );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSwizzle<2, 1, 0, 3>( v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                XMVECTOR v = XMLoadUByteN4( sPtr++ );\n                v = XMVectorSwizzle<2, 1, 0, 3>( v );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSelect( g_XMIdentityR3, v, g_XMSelect1110 );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_AYUV:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                int v = int(sPtr->x) - 128;\n                int u = int(sPtr->y) - 128;\n                int y = int(sPtr->z) - 16;\n                unsigned int a = sPtr->w;\n                ++sPtr;\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/dd206750.aspx\n\n                // Y  = Y - 16\n                // Cb = Cb - 128\n                // Cr = Cr - 128\n\n                // R = 1.1644Y + 1.5960Cr\n                // G = 1.1644Y - 0.3917Cb - 0.8128Cr\n                // B = 1.1644Y + 2.0172Cb\n\n                int r = (298 * y +           409 * v + 128) >> 8;\n                int g = (298 * y - 100 * u - 208 * v + 128) >> 8;\n                int b = (298 * y + 516 * u           + 128) >> 8;\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 255 ) ) / 255.f,\n                                         float( a / 255.f ) );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y410:\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            const XMUDECN4 * __restrict sPtr = reinterpret_cast<const XMUDECN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                int64_t u = int(sPtr->x) - 512;\n                int64_t y = int(sPtr->y) - 64;\n                int64_t v = int(sPtr->z) - 512;\n                unsigned int a = sPtr->w;\n                ++sPtr;\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578.aspx\n\n                // Y  = Y - 64\n                // Cb = Cb - 512\n                // Cr = Cr - 512\n\n                // R = 1.1678Y + 1.6007Cr\n                // G = 1.1678Y - 0.3929Cb - 0.8152Cr\n                // B = 1.1678Y + 2.0232Cb\n\n                int r = static_cast<int>( (76533 * y +              104905 * v + 32768) >> 16 );\n                int g = static_cast<int>( (76533 * y -  25747 * u -  53425 * v + 32768) >> 16 );\n                int b = static_cast<int>( (76533 * y + 132590 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 1023 ) ) / 1023.f,\n                                         float( a / 3.f ) );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y416:\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            const XMUSHORTN4 * __restrict sPtr = reinterpret_cast<const XMUSHORTN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                int64_t u = int64_t(sPtr->x) - 32768;\n                int64_t y = int64_t(sPtr->y) - 4096;\n                int64_t v = int64_t(sPtr->z) - 32768;\n                unsigned int a = sPtr->w;\n                ++sPtr;\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578.aspx\n\n                // Y  = Y - 4096\n                // Cb = Cb - 32768\n                // Cr = Cr - 32768\n\n                // R = 1.1689Y + 1.6023Cr\n                // G = 1.1689Y - 0.3933Cb - 0.8160Cr\n                // B = 1.1689Y+ 2.0251Cb\n\n                int r = static_cast<int>( (76607 * y +              105006 * v + 32768) >> 16 );\n                int g = static_cast<int>( (76607 * y -  25772 * u -  53477 * v + 32768) >> 16 );\n                int b = static_cast<int>( (76607 * y + 132718 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( a, 0 ), 65535 ) ) / 65535.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_YUY2:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            const XMUBYTEN4 * __restrict sPtr = reinterpret_cast<const XMUBYTEN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                int y0 = int(sPtr->x) - 16;\n                int u  = int(sPtr->y) - 128;\n                int y1 = int(sPtr->z) - 16;\n                int v  = int(sPtr->w) - 128;\n                ++sPtr;\n\n                // See AYUV\n                int r = (298 * y0 +           409 * v + 128) >> 8;\n                int g = (298 * y0 - 100 * u - 208 * v + 128) >> 8;\n                int b = (298 * y0 + 516 * u           + 128) >> 8;\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 255 ) ) / 255.f,\n                                         1.f );\n                \n                r = (298 * y1 +           409 * v + 128) >> 8;\n                g = (298 * y1 - 100 * u - 208 * v + 128) >> 8;\n                b = (298 * y1 + 516 * u           + 128) >> 8;\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 255 ) ) / 255.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 255 ) ) / 255.f,\n                                         1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y210:\n        // Same as Y216 with least significant 6 bits set to zero\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            const XMUSHORTN4 * __restrict sPtr = reinterpret_cast<const XMUSHORTN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                int64_t y0 = int64_t(sPtr->x >> 6) - 64;\n                int64_t u  = int64_t(sPtr->y >> 6) - 512;\n                int64_t y1 = int64_t(sPtr->z >> 6) - 64;\n                int64_t v  = int64_t(sPtr->w >> 6) - 512;\n                ++sPtr;\n\n                // See Y410\n                int r = static_cast<int>( (76533 * y0 +              104905 * v + 32768) >> 16 );\n                int g = static_cast<int>( (76533 * y0 -  25747 * u -  53425 * v + 32768) >> 16 );\n                int b = static_cast<int>( (76533 * y0 + 132590 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 1023 ) ) / 1023.f,\n                                         1.f );\n\n                r = static_cast<int>( (76533 * y1 +              104905 * v + 32768) >> 16 );\n                g = static_cast<int>( (76533 * y1 -  25747 * u -  53425 * v + 32768) >> 16 );\n                b = static_cast<int>( (76533 * y1 + 132590 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 1023 ) ) / 1023.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 1023 ) ) / 1023.f,\n                                         1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y216:\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            const XMUSHORTN4 * __restrict sPtr = reinterpret_cast<const XMUSHORTN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                int64_t y0 = int64_t(sPtr->x) - 4096;\n                int64_t u  = int64_t(sPtr->y) - 32768;\n                int64_t y1 = int64_t(sPtr->z) - 4096;\n                int64_t v  = int64_t(sPtr->w) - 32768;\n                ++sPtr;\n\n                // See Y416\n                int r = static_cast<int>( (76607 * y0 +              105006 * v + 32768) >> 16 );\n                int g = static_cast<int>( (76607 * y0 -  25772 * u -  53477 * v + 32768) >> 16 );\n                int b = static_cast<int>( (76607 * y0 + 132718 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 65535 ) ) / 65535.f,\n                                         1.f );\n\n                r = static_cast<int>( (76607 * y1 +              105006 * v + 32768) >> 16 );\n                g = static_cast<int>( (76607 * y1 -  25772 * u -  53477 * v + 32768) >> 16 );\n                b = static_cast<int>( (76607 * y1 + 132718 * u              + 32768) >> 16 );\n\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSet( float( std::min<int>( std::max<int>( r, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( g, 0 ), 65535 ) ) / 65535.f,\n                                         float( std::min<int>( std::max<int>( b, 0 ), 65535 ) ) / 65535.f,\n                                         1.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        if ( size >= sizeof(XMUNIBBLE4) )\n        {\n            static const XMVECTORF32 s_Scale = { 1.f/15.f, 1.f/15.f, 1.f/15.f, 1.f/15.f };\n            const XMUNIBBLE4 * __restrict sPtr = reinterpret_cast<const XMUNIBBLE4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUNIBBLE4) + 1 ); icount += sizeof(XMUNIBBLE4) )\n            {\n                XMVECTOR v = XMLoadUNibble4( sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                if ( dPtr >= ePtr ) break;\n                *(dPtr++) = XMVectorSwizzle<2, 1, 0, 3>( v );\n            }\n            return true;\n        }\n        return false;\n\n    case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n        // Xbox One specific 7e3 format\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            const XMUDECN4 * __restrict sPtr = reinterpret_cast<const XMUDECN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( dPtr >= ePtr ) break;\n\n                XMVECTORF32 vResult = {\n                    FloatFrom7e3(sPtr->x),\n                    FloatFrom7e3(sPtr->y),\n                    FloatFrom7e3(sPtr->z),\n                    (float)(sPtr->v >> 30) / 3.0f\n                };\n\n                ++sPtr;\n\n                *(dPtr++) = vResult.v;\n            }\n            return true;\n        }\n        return false;\n\n    case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n        // Xbox One specific 6e4 format\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            const XMUDECN4 * __restrict sPtr = reinterpret_cast<const XMUDECN4*>(pSource);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( dPtr >= ePtr ) break;\n\n                XMVECTORF32 vResult = {\n                    FloatFrom6e4(sPtr->x),\n                    FloatFrom6e4(sPtr->y),\n                    FloatFrom6e4(sPtr->z),\n                    (float)(sPtr->v >> 30) / 3.0f\n                };\n\n                ++sPtr;\n\n                *(dPtr++) = vResult.v;\n            }\n            return true;\n        }\n        return false;\n\n    // We don't support the planar or palettized formats\n\n    default:\n        return false;\n    }\n}\n\n#undef LOAD_SCANLINE\n#undef LOAD_SCANLINE3\n#undef LOAD_SCANLINE2\n\n\n//-------------------------------------------------------------------------------------\n// Stores an image row from standard RGBA XMVECTOR (aligned) array\n//-------------------------------------------------------------------------------------\n#define STORE_SCANLINE( type, func )\\\n        if ( size >= sizeof(type) )\\\n        {\\\n            type * __restrict dPtr = reinterpret_cast<type*>(pDestination);\\\n            for( size_t icount = 0; icount < ( size - sizeof(type) + 1 ); icount += sizeof(type) )\\\n            {\\\n                if ( sPtr >= ePtr ) break;\\\n                func( dPtr++, *sPtr++ );\\\n            }\\\n            return true; \\\n        }\\\n        return false;\n\n_Use_decl_annotations_\nbool _StoreScanline( LPVOID pDestination, size_t size, DXGI_FORMAT format,\n                     const XMVECTOR* pSource, size_t count, float threshold )\n{\n    assert( pDestination && size > 0 );\n    assert( pSource && count > 0 && (((uintptr_t)pSource & 0xF) == 0) );\n    assert( IsValid(format) && !IsTypeless(format) && !IsCompressed(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    const XMVECTOR* __restrict sPtr = pSource;\n    if ( !sPtr )\n        return false;\n\n    const XMVECTOR* ePtr = pSource + count;\n\n    switch( static_cast<int>(format) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n        STORE_SCANLINE( XMFLOAT4, XMStoreFloat4 )\n\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n        STORE_SCANLINE( XMUINT4, XMStoreUInt4 )\n\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        STORE_SCANLINE( XMINT4, XMStoreSInt4 )\n\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n        STORE_SCANLINE( XMFLOAT3, XMStoreFloat3 )\n\n    case DXGI_FORMAT_R32G32B32_UINT:\n        STORE_SCANLINE( XMUINT3, XMStoreUInt3 )\n\n    case DXGI_FORMAT_R32G32B32_SINT:\n        STORE_SCANLINE( XMINT3, XMStoreSInt3 )\n\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n        if ( size >= sizeof(XMHALF4) )\n        {\n            XMHALF4* __restrict dPtr = reinterpret_cast<XMHALF4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMHALF4) + 1 ); icount += sizeof(XMHALF4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = *sPtr++;\n                v = XMVectorClamp( v, g_HalfMin, g_HalfMax );\n                XMStoreHalf4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n        STORE_SCANLINE( XMUSHORTN4, XMStoreUShortN4 ) \n\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n        STORE_SCANLINE( XMUSHORT4, XMStoreUShort4 )\n\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n        STORE_SCANLINE( XMSHORTN4, XMStoreShortN4 )\n\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n        STORE_SCANLINE( XMSHORT4, XMStoreShort4 )\n\n    case DXGI_FORMAT_R32G32_FLOAT:\n        STORE_SCANLINE( XMFLOAT2, XMStoreFloat2 )\n\n    case DXGI_FORMAT_R32G32_UINT:\n        STORE_SCANLINE( XMUINT2, XMStoreUInt2 )\n\n    case DXGI_FORMAT_R32G32_SINT:\n        STORE_SCANLINE( XMINT2, XMStoreSInt2 )\n\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n        {\n            const size_t psize = sizeof(float)+sizeof(uint32_t);\n            if ( size >= psize )\n            {\n                float *dPtr = reinterpret_cast<float*>(pDestination);\n                for( size_t icount = 0; icount < ( size - psize + 1 ); icount += psize )\n                {\n                    if ( sPtr >= ePtr ) break;\n                    XMFLOAT4 f;\n                    XMStoreFloat4( &f, *sPtr++ );\n                    dPtr[0] = f.x;\n                    uint8_t* ps8 = reinterpret_cast<uint8_t*>( &dPtr[1] );\n                    ps8[0] = static_cast<uint8_t>( std::min<float>( 255.f, std::max<float>( 0.f, f.y ) ) );\n                    ps8[1] = ps8[2] = ps8[3] = 0;\n                    dPtr += 2;\n                }\n                return true;\n            }\n        }\n        return false;\n\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n        STORE_SCANLINE( XMUDECN4, XMStoreUDecN4 );\n\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n#if DIRECTX_MATH_VERSION >= 306\n        STORE_SCANLINE( XMUDECN4, XMStoreUDecN4_XR );\n#else\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            static const XMVECTORF32  Scale = { 510.0f, 510.0f, 510.0f, 3.0f };\n            static const XMVECTORF32  Bias  = { 384.0f, 384.0f, 384.0f, 0.0f };\n            static const XMVECTORF32  C     = { 1023.f, 1023.f, 1023.f, 3.f };\n\n            XMUDECN4 * __restrict dPtr = reinterpret_cast<XMUDECN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMVECTOR N = XMVectorMultiplyAdd( *sPtr++, Scale, Bias );\n                N = XMVectorClamp( N, g_XMZero, C );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A(&tmp, N );\n\n                dPtr->v = ((uint32_t)tmp.w << 30)\n                           | (((uint32_t)tmp.z & 0x3FF) << 20)\n                           | (((uint32_t)tmp.y & 0x3FF) << 10)\n                           | (((uint32_t)tmp.x & 0x3FF));\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n#endif\n\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n        STORE_SCANLINE( XMUDEC4, XMStoreUDec4 );\n\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n        STORE_SCANLINE( XMFLOAT3PK, XMStoreFloat3PK );\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorAdd( *sPtr++, g_8BitBias );\n                XMStoreUByteN4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n        STORE_SCANLINE( XMUBYTE4, XMStoreUByte4 )\n\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n        STORE_SCANLINE( XMBYTEN4, XMStoreByteN4 )\n\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n        STORE_SCANLINE( XMBYTE4, XMStoreByte4 )\n\n    case DXGI_FORMAT_R16G16_FLOAT:\n        if ( size >= sizeof(XMHALF2) )\n        {\n            XMHALF2* __restrict dPtr = reinterpret_cast<XMHALF2*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMHALF2) + 1 ); icount += sizeof(XMHALF2) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = *sPtr++;\n                v = XMVectorClamp( v, g_HalfMin, g_HalfMax );\n                XMStoreHalf2( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16G16_UNORM:\n        STORE_SCANLINE( XMUSHORTN2, XMStoreUShortN2 )\n\n    case DXGI_FORMAT_R16G16_UINT:\n        STORE_SCANLINE( XMUSHORT2, XMStoreUShort2 )\n\n    case DXGI_FORMAT_R16G16_SNORM:\n        STORE_SCANLINE( XMSHORTN2, XMStoreShortN2 )\n\n    case DXGI_FORMAT_R16G16_SINT:\n        STORE_SCANLINE( XMSHORT2, XMStoreShort2 )\n\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n        if ( size >= sizeof(float) )\n        {\n            float * __restrict dPtr = reinterpret_cast<float*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(float) + 1 ); icount += sizeof(float) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMStoreFloat( dPtr++, *(sPtr++) );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R32_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMConvertVectorFloatToUInt( *(sPtr++), 0 );\n                XMStoreInt( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R32_SINT:\n        if ( size >= sizeof(int32_t) )\n        {\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(int32_t) + 1 ); icount += sizeof(int32_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMConvertVectorFloatToInt( *(sPtr++), 0 );\n                XMStoreInt( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            static const XMVECTORF32 clamp = { 1.f, 255.f, 0.f, 0.f };\n            XMVECTOR zero = XMVectorZero();\n            uint32_t *dPtr = reinterpret_cast<uint32_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(uint32_t) + 1 ); icount += sizeof(uint32_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMFLOAT4 f;\n                XMStoreFloat4( &f, XMVectorClamp( *sPtr++, zero, clamp ) );\n                *dPtr++ = (static_cast<uint32_t>( f.x * 16777215.f ) & 0xFFFFFF)\n                          | ((static_cast<uint32_t>( f.y ) & 0xFF) << 24);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8G8_UNORM:\n        STORE_SCANLINE( XMUBYTEN2, XMStoreUByteN2 )\n\n    case DXGI_FORMAT_R8G8_UINT:\n        STORE_SCANLINE( XMUBYTE2, XMStoreUByte2 )\n\n    case DXGI_FORMAT_R8G8_SNORM:\n        STORE_SCANLINE( XMBYTEN2, XMStoreByteN2 )\n\n    case DXGI_FORMAT_R8G8_SINT:\n        STORE_SCANLINE( XMBYTE2, XMStoreByte2 )\n\n    case DXGI_FORMAT_R16_FLOAT:\n        if ( size >= sizeof(HALF) )\n        {\n            HALF * __restrict dPtr = reinterpret_cast<HALF*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(HALF) + 1 ); icount += sizeof(HALF) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 65504.f ), -65504.f );\n                *(dPtr++) = XMConvertFloatToHalf(v);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n        if ( size >= sizeof(uint16_t) )\n        {\n            uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(uint16_t) + 1 ); icount += sizeof(uint16_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 1.f ), 0.f );\n                *(dPtr++) = static_cast<uint16_t>( v*65535.f + 0.5f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_UINT:\n        if ( size >= sizeof(uint16_t) )\n        {\n            uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(uint16_t) + 1 ); icount += sizeof(uint16_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 65535.f ), 0.f );\n                *(dPtr++) = static_cast<uint16_t>(v);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_SNORM:\n        if ( size >= sizeof(int16_t) )\n        {\n            int16_t * __restrict dPtr = reinterpret_cast<int16_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(int16_t) + 1 ); icount += sizeof(int16_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 1.f ), -1.f );\n                *(dPtr++) = static_cast<int16_t>( v * 32767.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R16_SINT:\n        if ( size >= sizeof(int16_t) )\n        {\n            int16_t * __restrict dPtr = reinterpret_cast<int16_t*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(int16_t) + 1 ); icount += sizeof(int16_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 32767.f ), -32767.f );\n                *(dPtr++) = static_cast<int16_t>(v);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 1.f ), 0.f );\n                *(dPtr++) = static_cast<uint8_t>( v * 255.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_UINT:\n        if ( size >= sizeof(uint8_t) )\n        {\n            uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 255.f ), 0.f );\n                *(dPtr++) = static_cast<uint8_t>(v);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_SNORM:\n        if ( size >= sizeof(int8_t) )\n        {\n            int8_t * __restrict dPtr = reinterpret_cast<int8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(int8_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 1.f ), -1.f );\n                *(dPtr++) = static_cast<int8_t>( v * 127.f );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8_SINT:\n        if ( size >= sizeof(int8_t) )\n        {\n            int8_t * __restrict dPtr = reinterpret_cast<int8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(int8_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetX( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 127.f ), -127.f );\n                *(dPtr++) = static_cast<int8_t>( v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_A8_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                if ( sPtr >= ePtr ) break;\n                float v = XMVectorGetW( *sPtr++ );\n                v = std::max<float>( std::min<float>( v, 1.f ), 0.f );\n                *(dPtr++) = static_cast<uint8_t>( v * 255.f);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R1_UNORM:\n        if ( size >= sizeof(uint8_t) )\n        {\n            uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n            for( size_t icount = 0; icount < size; icount += sizeof(uint8_t) )\n            {\n                uint8_t pixels = 0;\n                for( size_t bcount = 8; bcount > 0; --bcount )\n                {\n                    if ( sPtr >= ePtr ) break;\n                    float v = XMVectorGetX( *sPtr++ );\n\n                    // Absolute thresholding generally doesn't give good results for all images\n                    // Picking the 'right' threshold automatically requires whole-image analysis\n\n                    if ( v > 0.25f )\n                        pixels |= 1 << (bcount-1);\n                }\n                *(dPtr++) = pixels;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n#if DIRECTX_MATH_VERSION >= 306\n        STORE_SCANLINE( XMFLOAT3SE, XMStoreFloat3SE )\n#else\n        if ( size >= sizeof(XMFLOAT3SE) )\n        {\n            static const float maxf9 = float(0x1FF << 7);\n            static const float minf9 = float(1.f / (1 << 16));\n\n            XMFLOAT3SE * __restrict dPtr = reinterpret_cast<XMFLOAT3SE*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMFLOAT3SE) + 1 ); icount += sizeof(XMFLOAT3SE) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMFLOAT3 rgb;\n                XMStoreFloat3( &rgb, *(sPtr++) );\n\n                float r = (rgb.x >= 0.f) ? ( (rgb.x > maxf9) ? maxf9 : rgb.x ) : 0.f;\n                float g = (rgb.y >= 0.f) ? ( (rgb.y > maxf9) ? maxf9 : rgb.y ) : 0.f;\n                float b = (rgb.z >= 0.f) ? ( (rgb.z > maxf9) ? maxf9 : rgb.z ) : 0.f;\n\n                const float max_rg = (r > g) ? r : g;\n                const float max_rgb = (max_rg > b) ? max_rg : b;\n\n                const float maxColor = (max_rgb > minf9) ? max_rgb : minf9;\n\n                union { float f; INT32 i; } fi;\n                fi.f = maxColor;\n                fi.i &= 0xFF800000; // cut off fraction\n\n                dPtr->e = (fi.i - 0x37800000) >> 23;\n\n                fi.i = 0x83000000 - fi.i;\n                float ScaleR = fi.f;\n\n                dPtr->xm = static_cast<uint32_t>( round_to_nearest(r * ScaleR) );\n                dPtr->ym = static_cast<uint32_t>( round_to_nearest(g * ScaleR) );\n                dPtr->zm = static_cast<uint32_t>( round_to_nearest(b * ScaleR) );\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n#endif\n\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v0 = *sPtr++;\n                XMVECTOR v1 = (sPtr < ePtr) ? XMVectorSplatY( *sPtr++ ) : XMVectorZero();\n                XMVECTOR v = XMVectorSelect( v1, v0, g_XMSelect1110 );\n                v = XMVectorAdd( v, g_8BitBias );\n                XMStoreUByteN4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            static XMVECTORU32 select1101 = {XM_SELECT_1, XM_SELECT_1, XM_SELECT_0, XM_SELECT_1};\n\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v0 = XMVectorSwizzle<1, 0, 3, 2>( *sPtr++ );\n                XMVECTOR v1 = (sPtr < ePtr) ? XMVectorSplatY( *sPtr++ ) : XMVectorZero();\n                XMVECTOR v = XMVectorSelect( v1, v0, select1101 );\n                v = XMVectorAdd( v, g_8BitBias );\n                XMStoreUByteN4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        if ( size >= sizeof(XMU565) )\n        {\n            static const XMVECTORF32 s_Scale = { 31.f, 63.f, 31.f, 1.f };\n            XMU565 * __restrict dPtr = reinterpret_cast<XMU565*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMU565) + 1 ); icount += sizeof(XMU565) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( *sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                XMStoreU565( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        if ( size >= sizeof(XMU555) )\n        {\n            static const XMVECTORF32 s_Scale = { 31.f, 31.f, 31.f, 1.f };\n            XMU555 * __restrict dPtr = reinterpret_cast<XMU555*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMU555) + 1 ); icount += sizeof(XMU555) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( *sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                XMStoreU555( dPtr, v );\n                dPtr->w = ( XMVectorGetW( v ) > threshold ) ? 1 : 0;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( *sPtr++ );\n                v = XMVectorAdd( v, g_8BitBias );\n                XMStoreUByteN4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorPermute<2, 1, 0, 7>( *sPtr++, g_XMIdentityR3 );\n                v = XMVectorAdd( v, g_8BitBias );\n                XMStoreUByteN4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_AYUV:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                \n                XMUBYTEN4 rgba;\n                XMStoreUByteN4( &rgba, *sPtr++ );\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/dd206750.aspx\n\n                // Y  =  0.2568R + 0.5041G + 0.1001B + 16\n                // Cb = -0.1482R - 0.2910G + 0.4392B + 128\n                // Cr =  0.4392R - 0.3678G - 0.0714B + 128\n\n                int y = ( (  66 * rgba.x + 129 * rgba.y +  25 * rgba.z + 128) >> 8) +  16;\n                int u = ( ( -38 * rgba.x -  74 * rgba.y + 112 * rgba.z + 128) >> 8) + 128;\n                int v = ( ( 112 * rgba.x -  94 * rgba.y -  18 * rgba.z + 128) >> 8) + 128;\n\n                dPtr->x = static_cast<uint8_t>( std::min<int>( std::max<int>( v, 0 ), 255 ) );\n                dPtr->y = static_cast<uint8_t>( std::min<int>( std::max<int>( u, 0 ), 255 ) );\n                dPtr->z = static_cast<uint8_t>( std::min<int>( std::max<int>( y, 0 ), 255 ) );\n                dPtr->w = rgba.w;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y410:\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            XMUDECN4 * __restrict dPtr = reinterpret_cast<XMUDECN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                \n                XMUDECN4 rgba;\n                XMStoreUDecN4( &rgba, *sPtr++ );\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578.aspx\n\n                // Y  =  0.2560R + 0.5027G + 0.0998B + 64\n                // Cb = -0.1478R - 0.2902G + 0.4379B + 512\n                // Cr =  0.4379R - 0.3667G - 0.0712B + 512\n\n                int64_t r = rgba.x;\n                int64_t g = rgba.y;\n                int64_t b = rgba.z;\n\n                int y = static_cast<int>( (  16780 * r + 32942 * g +  6544 * b + 32768) >> 16) + 64;\n                int u = static_cast<int>( ( -9683  * r - 19017 * g + 28700 * b + 32768) >> 16) + 512;\n                int v = static_cast<int>( (  28700 * r - 24033 * g -  4667 * b + 32768) >> 16) + 512;\n\n                dPtr->x = static_cast<uint32_t>( std::min<int>( std::max<int>( u, 0 ), 1023 ) );\n                dPtr->y = static_cast<uint32_t>( std::min<int>( std::max<int>( y, 0 ), 1023 ) );\n                dPtr->z = static_cast<uint32_t>( std::min<int>( std::max<int>( v, 0 ), 1023 ) );\n                dPtr->w = rgba.w;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y416:\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            XMUSHORTN4 * __restrict dPtr = reinterpret_cast<XMUSHORTN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                \n                XMUSHORTN4 rgba;\n                XMStoreUShortN4( &rgba, *sPtr++ );\n\n                // http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578.aspx\n\n                // Y  =  0.2558R + 0.5022G + 0.0998B + 4096\n                // Cb = -0.1476R - 0.2899G + 0.4375B + 32768\n                // Cr =  0.4375R - 0.3664G - 0.0711B + 32768\n\n                int64_t r = int64_t(rgba.x);\n                int64_t g = int64_t(rgba.y);\n                int64_t b = int64_t(rgba.z);\n\n                int y = static_cast<int>( (  16763 * r + 32910 * g +  6537 * b + 32768) >> 16) + 4096;\n                int u = static_cast<int>( ( -9674  * r - 18998 * g + 28672 * b + 32768) >> 16) + 32768;\n                int v = static_cast<int>( (  28672 * r - 24010 * g -  4662 * b + 32768) >> 16) + 32768;\n\n                dPtr->x = static_cast<uint16_t>( std::min<int>( std::max<int>( u, 0 ), 65535 ) );\n                dPtr->y = static_cast<uint16_t>( std::min<int>( std::max<int>( y, 0 ), 65535 ) );\n                dPtr->z = static_cast<uint16_t>( std::min<int>( std::max<int>( v, 0 ), 65535 ) );\n                dPtr->w = rgba.w;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_YUY2:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUBYTEN4) + 1 ); icount += sizeof(XMUBYTEN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                \n                XMUBYTEN4 rgb1;\n                XMStoreUByteN4( &rgb1, *sPtr++ );\n\n                // See AYUV\n                int y0 = ( (  66 * rgb1.x + 129 * rgb1.y +  25 * rgb1.z + 128) >> 8) +  16;\n                int u0 = ( ( -38 * rgb1.x -  74 * rgb1.y + 112 * rgb1.z + 128) >> 8) + 128;\n                int v0 = ( ( 112 * rgb1.x -  94 * rgb1.y -  18 * rgb1.z + 128) >> 8) + 128;\n\n                XMUBYTEN4 rgb2;\n                if(sPtr < ePtr)\n                {\n                    XMStoreUByteN4( &rgb2, *sPtr++ );\n                }\n                else\n                {\n                    rgb2.x = rgb2.y = rgb2.z = rgb2.w = 0;\n                }\n\n                int y1 = ( (  66 * rgb2.x + 129 * rgb2.y +  25 * rgb2.z + 128) >> 8) +  16;\n                int u1 = ( ( -38 * rgb2.x -  74 * rgb2.y + 112 * rgb2.z + 128) >> 8) + 128;\n                int v1 = ( ( 112 * rgb2.x -  94 * rgb2.y -  18 * rgb2.z + 128) >> 8) + 128;\n\n                dPtr->x = static_cast<uint8_t>( std::min<int>( std::max<int>( y0, 0 ), 255 ) );\n                dPtr->y = static_cast<uint8_t>( std::min<int>( std::max<int>( (u0 + u1) >> 1, 0 ), 255 ) );\n                dPtr->z = static_cast<uint8_t>( std::min<int>( std::max<int>( y1, 0 ), 255 ) );\n                dPtr->w = static_cast<uint8_t>( std::min<int>( std::max<int>( (v0 + v1) >> 1, 0 ), 255 ) );\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y210:\n        // Same as Y216 with least significant 6 bits set to zero\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            XMUSHORTN4 * __restrict dPtr = reinterpret_cast<XMUSHORTN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMUDECN4 rgb1;\n                XMStoreUDecN4( &rgb1, *sPtr++ );\n\n                // See Y410\n                int64_t r = rgb1.x;\n                int64_t g = rgb1.y;\n                int64_t b = rgb1.z;\n\n                int y0 = static_cast<int>( (  16780 * r + 32942 * g +  6544 * b + 32768) >> 16) + 64;\n                int u0 = static_cast<int>( ( -9683  * r - 19017 * g + 28700 * b + 32768) >> 16) + 512;\n                int v0 = static_cast<int>( (  28700 * r - 24033 * g -  4667 * b + 32768) >> 16) + 512;\n\n                XMUDECN4 rgb2;\n                if(sPtr < ePtr)\n                {\n                    XMStoreUDecN4( &rgb2, *sPtr++ );\n                }\n                else\n                {\n                    rgb2.x = rgb2.y = rgb2.z = rgb2.w = 0;\n                }\n\n                r = rgb2.x;\n                g = rgb2.y;\n                b = rgb2.z;\n\n                int y1 = static_cast<int>( (  16780 * r + 32942 * g +  6544 * b + 32768) >> 16) + 64;\n                int u1 = static_cast<int>( ( -9683  * r - 19017 * g + 28700 * b + 32768) >> 16) + 512;\n                int v1 = static_cast<int>( (  28700 * r - 24033 * g -  4667 * b + 32768) >> 16) + 512;\n\n                dPtr->x = static_cast<uint16_t>( std::min<int>( std::max<int>( y0, 0 ), 1023 ) << 6 );\n                dPtr->y = static_cast<uint16_t>( std::min<int>( std::max<int>( (u0 + u1) >> 1, 0 ), 1023 ) << 6 );\n                dPtr->z = static_cast<uint16_t>( std::min<int>( std::max<int>( y1, 0 ), 1023 ) << 6 );\n                dPtr->w = static_cast<uint16_t>( std::min<int>( std::max<int>( (v0 + v1) >> 1, 0 ), 1023 ) << 6 );\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_Y216:\n        if ( size >= sizeof(XMUSHORTN4) )\n        {\n            XMUSHORTN4 * __restrict dPtr = reinterpret_cast<XMUSHORTN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUSHORTN4) + 1 ); icount += sizeof(XMUSHORTN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMUSHORTN4 rgb1;\n                XMStoreUShortN4( &rgb1, *sPtr++ );\n\n                // See Y416\n                int64_t r = int64_t(rgb1.x);\n                int64_t g = int64_t(rgb1.y);\n                int64_t b = int64_t(rgb1.z);\n\n                int y0 = static_cast<int>( ( 16763 * r + 32910 * g +  6537 * b + 32768) >> 16) + 4096;\n                int u0 = static_cast<int>( (-9674  * r - 18998 * g + 28672 * b + 32768) >> 16) + 32768;\n                int v0 = static_cast<int>( ( 28672 * r - 24010 * g -  4662 * b + 32768) >> 16) + 32768;\n\n                XMUSHORTN4 rgb2;\n                if(sPtr < ePtr)\n                {\n                    XMStoreUShortN4( &rgb2, *sPtr++ );\n                }\n                else\n                {\n                    rgb2.x = rgb2.y = rgb2.z = rgb2.w = 0;\n                }\n\n                r = int64_t(rgb2.x);\n                g = int64_t(rgb2.y);\n                b = int64_t(rgb2.z);\n\n                int y1 = static_cast<int>( ( 16763 * r + 32910 * g +  6537 * b + 32768) >> 16) + 4096;\n                int u1 = static_cast<int>( (-9674  * r - 18998 * g + 28672 * b + 32768) >> 16) + 32768;\n                int v1 = static_cast<int>( ( 28672 * r - 24010 * g -  4662 * b + 32768) >> 16) + 32768;\n\n                dPtr->x = static_cast<uint16_t>( std::min<int>( std::max<int>( y0, 0 ), 65535 ) );\n                dPtr->y = static_cast<uint16_t>( std::min<int>( std::max<int>( (u0 + u1) >> 1, 0 ), 65535 ) );\n                dPtr->z = static_cast<uint16_t>( std::min<int>( std::max<int>( y1, 0 ), 65535 ) );\n                dPtr->w = static_cast<uint16_t>( std::min<int>( std::max<int>( (v0 + v1) >> 1, 0 ), 65535 ) );\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        if ( size >= sizeof(XMUNIBBLE4) )\n        {\n            static const XMVECTORF32 s_Scale = { 15.f, 15.f, 15.f, 15.f };\n            XMUNIBBLE4 * __restrict dPtr = reinterpret_cast<XMUNIBBLE4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUNIBBLE4) + 1 ); icount += sizeof(XMUNIBBLE4) )\n            {\n                if ( sPtr >= ePtr ) break;\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( *sPtr++ );\n                v = XMVectorMultiply( v, s_Scale );\n                XMStoreUNibble4( dPtr++, v );\n            }\n            return true;\n        }\n        return false;\n\n    case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n        // Xbox One specific 7e3 format with alpha\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            static const XMVECTORF32  Scale = { 1.0f, 1.0f, 1.0f, 3.0f };\n            static const XMVECTORF32  C     = { 31.875f, 31.875f, 31.875f, 3.f };\n\n            XMUDECN4 * __restrict dPtr = reinterpret_cast<XMUDECN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMVECTOR V = XMVectorMultiply( *sPtr++, Scale );\n                V = XMVectorClamp( V, g_XMZero, C );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, V );\n\n                dPtr->x = FloatTo7e3( tmp.x );\n                dPtr->y = FloatTo7e3( tmp.y );\n                dPtr->z = FloatTo7e3( tmp.z );\n                dPtr->w = (uint32_t)tmp.w;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n        // Xbox One specific 6e4 format with alpha\n        if ( size >= sizeof(XMUDECN4) )\n        {\n            static const XMVECTORF32  Scale = { 1.0f, 1.0f, 1.0f, 3.0f };\n            static const XMVECTORF32  C     = { 508.f, 508.f, 508.f, 3.f };\n\n            XMUDECN4 * __restrict dPtr = reinterpret_cast<XMUDECN4*>(pDestination);\n            for( size_t icount = 0; icount < ( size - sizeof(XMUDECN4) + 1 ); icount += sizeof(XMUDECN4) )\n            {\n                if ( sPtr >= ePtr ) break;\n\n                XMVECTOR V = XMVectorMultiply( *sPtr++, Scale );\n                V = XMVectorClamp( V, g_XMZero, C );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, V );\n\n                dPtr->x = FloatTo6e4( tmp.x );\n                dPtr->y = FloatTo6e4( tmp.y );\n                dPtr->z = FloatTo6e4( tmp.z );\n                dPtr->w = (uint32_t)tmp.w;\n                ++dPtr;\n            }\n            return true;\n        }\n        return false;\n\n    // We don't support the planar or palettized formats\n\n    default:\n        return false;\n    }\n}\n\n#undef STORE_SCANLINE\n\n\n//-------------------------------------------------------------------------------------\n// Convert DXGI image to/from GUID_WICPixelFormat128bppRGBAFloat (no range conversions)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT _ConvertToR32G32B32A32( const Image& srcImage, ScratchImage& image )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    HRESULT hr = image.Initialize2D( DXGI_FORMAT_R32G32B32A32_FLOAT, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    uint8_t* pDest = img->pixels;\n    if ( !pDest )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    const uint8_t *pSrc = srcImage.pixels;\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_LoadScanline( reinterpret_cast<XMVECTOR*>(pDest), srcImage.width, pSrc, srcImage.rowPitch, srcImage.format ) )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        pSrc += srcImage.rowPitch;\n        pDest += img->rowPitch;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT _ConvertFromR32G32B32A32( const Image& srcImage, const Image& destImage )\n{\n    assert( srcImage.format == DXGI_FORMAT_R32G32B32A32_FLOAT );\n\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    if ( srcImage.width != destImage.width || srcImage.height != destImage.height )\n        return E_FAIL;\n\n    const uint8_t *pSrc = srcImage.pixels;\n    uint8_t* pDest = destImage.pixels;\n\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_StoreScanline( pDest, destImage.rowPitch, destImage.format, reinterpret_cast<const XMVECTOR*>(pSrc), srcImage.width ) )\n            return E_FAIL;\n\n        pSrc += srcImage.rowPitch;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT _ConvertFromR32G32B32A32( const Image& srcImage, DXGI_FORMAT format, ScratchImage& image )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    HRESULT hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    hr = _ConvertFromR32G32B32A32( srcImage, *img );\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT _ConvertFromR32G32B32A32( const Image* srcImages, size_t nimages, const TexMetadata& metadata, DXGI_FORMAT format, ScratchImage& result )\n{\n    if ( !srcImages )\n        return E_POINTER;\n\n    result.Release();\n\n    assert( metadata.format == DXGI_FORMAT_R32G32B32A32_FLOAT );\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != result.GetImageCount() )\n    {\n        result.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = result.GetImages();\n    if ( !dest )\n    {\n        result.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        const Image& src = srcImages[ index ];\n        const Image& dst = dest[ index ];\n\n        assert( src.format == DXGI_FORMAT_R32G32B32A32_FLOAT );\n        assert( dst.format == format );\n\n        if ( src.width != dst.width || src.height != dst.height )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n        const uint8_t* pSrc = src.pixels;\n        uint8_t* pDest = dst.pixels;\n        if ( !pSrc || !pDest )\n        {\n            result.Release();\n            return E_POINTER;\n        }\n\n        for( size_t h=0; h < src.height; ++h )\n        {\n            if ( !_StoreScanline( pDest, dst.rowPitch, format, reinterpret_cast<const XMVECTOR*>(pSrc), src.width ) )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n            pSrc += src.rowPitch;\n            pDest += dst.rowPitch;\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert from Linear RGB to sRGB\n//\n// if C_linear <= 0.0031308 -> C_srgb = 12.92 * C_linear\n// if C_linear >  0.0031308 -> C_srgb = ( 1 + a ) * pow( C_Linear, 1 / 2.4 ) - a\n//                             where a = 0.055\n//-------------------------------------------------------------------------------------\n#if DIRECTX_MATH_VERSION < 306\nstatic inline XMVECTOR XMColorRGBToSRGB( FXMVECTOR rgb )\n{\n    static const XMVECTORF32 Cutoff = { 0.0031308f, 0.0031308f, 0.0031308f, 1.f };\n    static const XMVECTORF32 Linear = { 12.92f, 12.92f, 12.92f, 1.f };\n    static const XMVECTORF32 Scale = { 1.055f, 1.055f, 1.055f, 1.f };\n    static const XMVECTORF32 Bias = { 0.055f, 0.055f, 0.055f, 0.f };\n    static const XMVECTORF32 InvGamma = { 1.0f/2.4f, 1.0f/2.4f, 1.0f/2.4f, 1.f };\n\n    XMVECTOR V = XMVectorSaturate(rgb);\n    XMVECTOR V0 = XMVectorMultiply( V, Linear );\n    XMVECTOR V1 = Scale * XMVectorPow( V, InvGamma ) - Bias;\n    XMVECTOR select = XMVectorLess( V, Cutoff );\n    V = XMVectorSelect( V1, V0, select );\n    return XMVectorSelect( rgb, V, g_XMSelect1110 );\n}\n#endif\n\n_Use_decl_annotations_\nbool _StoreScanlineLinear( LPVOID pDestination, size_t size, DXGI_FORMAT format,\n                           XMVECTOR* pSource, size_t count, DWORD flags, float threshold )\n{\n    assert( pDestination && size > 0 );\n    assert( pSource && count > 0 && (((uintptr_t)pSource & 0xF) == 0) );\n    assert( IsValid(format) && !IsTypeless(format) && !IsCompressed(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    switch ( format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        flags |= TEX_FILTER_SRGB;\n        break;\n\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        break;\n\n    default:\n        // can't treat A8, XR, Depth, SNORM, UINT, or SINT as sRGB\n        flags &= ~TEX_FILTER_SRGB;\n        break;\n    }\n\n    // sRGB output processing (Linear RGB -> sRGB)\n    if ( flags & TEX_FILTER_SRGB_OUT )\n    {\n        // To avoid the need for another temporary scanline buffer, we allow this function to overwrite the source buffer in-place\n        // Given the intended usage in the filtering routines, this is not a problem.\n        XMVECTOR* ptr = pSource;\n        for( size_t i=0; i < count; ++i, ++ptr )\n        {\n            *ptr = XMColorRGBToSRGB( *ptr );\n        }\n    }\n\n    return _StoreScanline( pDestination, size, format, pSource, count, threshold );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert from sRGB to Linear RGB\n//\n// if C_srgb <= 0.04045 -> C_linear = C_srgb / 12.92\n// if C_srgb >  0.04045 -> C_linear = pow( ( C_srgb + a ) / ( 1 + a ), 2.4 )\n//                         where a = 0.055\n//-------------------------------------------------------------------------------------\n#if DIRECTX_MATH_VERSION < 306\nstatic inline XMVECTOR XMColorSRGBToRGB( FXMVECTOR srgb )\n{\n    static const XMVECTORF32 Cutoff = { 0.04045f, 0.04045f, 0.04045f, 1.f };\n    static const XMVECTORF32 ILinear = { 1.f/12.92f, 1.f/12.92f, 1.f/12.92f, 1.f };\n    static const XMVECTORF32 Scale = { 1.f/1.055f, 1.f/1.055f, 1.f/1.055f, 1.f };\n    static const XMVECTORF32 Bias = { 0.055f, 0.055f, 0.055f, 0.f };\n    static const XMVECTORF32 Gamma = { 2.4f, 2.4f, 2.4f, 1.f };\n\n    XMVECTOR V = XMVectorSaturate(srgb);\n    XMVECTOR V0 = XMVectorMultiply( V, ILinear );\n    XMVECTOR V1 = XMVectorPow( (V + Bias) * Scale, Gamma );\n    XMVECTOR select = XMVectorGreater( V, Cutoff );\n    V = XMVectorSelect( V0, V1, select );\n    return XMVectorSelect( srgb, V, g_XMSelect1110 );\n}\n#endif\n\n_Use_decl_annotations_\nbool _LoadScanlineLinear( XMVECTOR* pDestination, size_t count,\n                          LPCVOID pSource, size_t size, DXGI_FORMAT format, DWORD flags )\n{\n    assert( pDestination && count > 0 && (((uintptr_t)pDestination & 0xF) == 0) );\n    assert( pSource && size > 0 );\n    assert( IsValid(format) && !IsTypeless(format,false) && !IsCompressed(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    switch ( format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        flags |= TEX_FILTER_SRGB;\n        break;\n\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        break;\n\n    default:\n        // can't treat A8, XR, Depth, SNORM, UINT, or SINT as sRGB\n        flags &= ~TEX_FILTER_SRGB;\n        break;\n    }\n\n    if ( _LoadScanline( pDestination, count, pSource, size, format ) )\n    {\n        // sRGB input processing (sRGB -> Linear RGB)\n        if ( flags & TEX_FILTER_SRGB_IN )\n        {\n            XMVECTOR* ptr = pDestination;\n            for( size_t i=0; i < count; ++i, ++ptr )\n            {\n                *ptr = XMColorSRGBToRGB( *ptr );\n            }\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert scanline based on source/target formats\n//-------------------------------------------------------------------------------------\nstruct ConvertData\n{\n    DXGI_FORMAT format;\n    size_t datasize;\n    DWORD flags;\n};\n\nstatic const ConvertData g_ConvertTable[] = {\n    { DXGI_FORMAT_R32G32B32A32_FLOAT,           32, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R32G32B32A32_UINT,            32, CONVF_UINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R32G32B32A32_SINT,            32, CONVF_SINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R32G32B32_FLOAT,              32, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R32G32B32_UINT,               32, CONVF_UINT | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R32G32B32_SINT,               32, CONVF_SINT | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R16G16B16A16_FLOAT,           16, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R16G16B16A16_UNORM,           16, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A }, \n    { DXGI_FORMAT_R16G16B16A16_UINT,            16, CONVF_UINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A }, \n    { DXGI_FORMAT_R16G16B16A16_SNORM,           16, CONVF_SNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A }, \n    { DXGI_FORMAT_R16G16B16A16_SINT,            16, CONVF_SINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A }, \n    { DXGI_FORMAT_R32G32_FLOAT,                 32, CONVF_FLOAT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R32G32_UINT,                  32, CONVF_UINT | CONVF_R | CONVF_G  },\n    { DXGI_FORMAT_R32G32_SINT,                  32, CONVF_SINT | CONVF_R | CONVF_G  },\n    { DXGI_FORMAT_D32_FLOAT_S8X24_UINT,         32, CONVF_FLOAT | CONVF_DEPTH | CONVF_STENCIL },\n    { DXGI_FORMAT_R10G10B10A2_UNORM,            10, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R10G10B10A2_UINT,             10, CONVF_UINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R11G11B10_FLOAT,              10, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R8G8B8A8_UNORM,               8, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,          8, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R8G8B8A8_UINT,                8, CONVF_UINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R8G8B8A8_SNORM,               8, CONVF_SNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R8G8B8A8_SINT,                8, CONVF_SINT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_R16G16_FLOAT,                 16, CONVF_FLOAT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R16G16_UNORM,                 16, CONVF_UNORM | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R16G16_UINT,                  16, CONVF_UINT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R16G16_SNORM,                 16, CONVF_SNORM | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R16G16_SINT,                  16, CONVF_SINT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_D32_FLOAT,                    32, CONVF_FLOAT | CONVF_DEPTH },\n    { DXGI_FORMAT_R32_FLOAT,                    32, CONVF_FLOAT | CONVF_R },\n    { DXGI_FORMAT_R32_UINT,                     32, CONVF_UINT | CONVF_R },\n    { DXGI_FORMAT_R32_SINT,                     32, CONVF_SINT | CONVF_R },\n    { DXGI_FORMAT_D24_UNORM_S8_UINT,            32, CONVF_UNORM | CONVF_DEPTH | CONVF_STENCIL },\n    { DXGI_FORMAT_R8G8_UNORM,                   8, CONVF_UNORM | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R8G8_UINT,                    8, CONVF_UINT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R8G8_SNORM,                   8, CONVF_SNORM | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R8G8_SINT,                    8, CONVF_SINT | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_R16_FLOAT,                    16, CONVF_FLOAT | CONVF_R },\n    { DXGI_FORMAT_D16_UNORM,                    16, CONVF_UNORM | CONVF_DEPTH },\n    { DXGI_FORMAT_R16_UNORM,                    16, CONVF_UNORM | CONVF_R },\n    { DXGI_FORMAT_R16_UINT,                     16, CONVF_UINT | CONVF_R },\n    { DXGI_FORMAT_R16_SNORM,                    16, CONVF_SNORM | CONVF_R },\n    { DXGI_FORMAT_R16_SINT,                     16, CONVF_SINT | CONVF_R },\n    { DXGI_FORMAT_R8_UNORM,                     8, CONVF_UNORM | CONVF_R },\n    { DXGI_FORMAT_R8_UINT,                      8, CONVF_UINT | CONVF_R },\n    { DXGI_FORMAT_R8_SNORM,                     8, CONVF_SNORM | CONVF_R },\n    { DXGI_FORMAT_R8_SINT,                      8, CONVF_SINT | CONVF_R },\n    { DXGI_FORMAT_A8_UNORM,                     8, CONVF_UNORM | CONVF_A },\n    { DXGI_FORMAT_R1_UNORM,                     1, CONVF_UNORM | CONVF_R },\n    { DXGI_FORMAT_R9G9B9E5_SHAREDEXP,           9, CONVF_SHAREDEXP | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R8G8_B8G8_UNORM,              8, CONVF_UNORM | CONVF_PACKED | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_G8R8_G8B8_UNORM,              8, CONVF_UNORM | CONVF_PACKED | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_BC1_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC1_UNORM_SRGB,               8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC2_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC2_UNORM_SRGB,               8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC3_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC3_UNORM_SRGB,               8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC4_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R },\n    { DXGI_FORMAT_BC4_SNORM,                    8, CONVF_SNORM | CONVF_BC | CONVF_R },\n    { DXGI_FORMAT_BC5_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_BC5_SNORM,                    8, CONVF_SNORM | CONVF_BC | CONVF_R | CONVF_G },\n    { DXGI_FORMAT_B5G6R5_UNORM,                 5, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_B5G5R5A1_UNORM,               5, CONVF_UNORM | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_B8G8R8A8_UNORM,               8, CONVF_UNORM | CONVF_BGR | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_B8G8R8X8_UNORM,               8, CONVF_UNORM | CONVF_BGR | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM,   10, CONVF_UNORM | CONVF_XR | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_B8G8R8A8_UNORM_SRGB,          8, CONVF_UNORM | CONVF_BGR | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_B8G8R8X8_UNORM_SRGB,          8, CONVF_UNORM | CONVF_BGR | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_BC6H_UF16,                    16, CONVF_FLOAT | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC6H_SF16,                    16, CONVF_FLOAT | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC7_UNORM,                    8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_BC7_UNORM_SRGB,               8, CONVF_UNORM | CONVF_BC | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_AYUV,                         8, CONVF_UNORM | CONVF_YUV | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_Y410,                         10, CONVF_UNORM | CONVF_YUV | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_Y416,                         16, CONVF_UNORM | CONVF_YUV | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT_YUY2,                         8, CONVF_UNORM | CONVF_YUV | CONVF_PACKED | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_Y210,                         10, CONVF_UNORM | CONVF_YUV | CONVF_PACKED | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_Y216,                         16, CONVF_UNORM | CONVF_YUV | CONVF_PACKED | CONVF_R | CONVF_G | CONVF_B },\n    { DXGI_FORMAT_B4G4R4A4_UNORM,               4, CONVF_UNORM | CONVF_BGR | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT(116)\n      /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */, 10, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n    { DXGI_FORMAT(117)\n      /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */, 10, CONVF_FLOAT | CONVF_R | CONVF_G | CONVF_B | CONVF_A },\n};\n\n#pragma prefast( suppress : 25004, \"Signature must match bsearch_s\" );\nstatic int __cdecl _ConvertCompare( void *context, const void* ptr1, const void *ptr2 )\n{\n    UNREFERENCED_PARAMETER(context);\n    const ConvertData *p1 = reinterpret_cast<const ConvertData*>(ptr1);\n    const ConvertData *p2 = reinterpret_cast<const ConvertData*>(ptr2);\n    if ( p1->format == p2->format ) return 0;\n    else return (p1->format < p2->format ) ? -1 : 1;\n}\n\n_Use_decl_annotations_\nDWORD _GetConvertFlags( DXGI_FORMAT format )\n{\n#ifdef _DEBUG\n    // Ensure conversion table is in ascending order\n    assert( _countof(g_ConvertTable) > 0 );\n    DXGI_FORMAT lastvalue = g_ConvertTable[0].format;\n    for( size_t index=1; index < _countof(g_ConvertTable); ++index )\n    {\n        assert( g_ConvertTable[index].format > lastvalue );\n        lastvalue = g_ConvertTable[index].format;\n    }\n#endif\n\n    ConvertData key = { format, 0 };\n    const ConvertData* in = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),\n                                                            _ConvertCompare, 0 );\n    return (in) ? in->flags : 0;\n}\n\n_Use_decl_annotations_\nvoid _ConvertScanline( XMVECTOR* pBuffer, size_t count, DXGI_FORMAT outFormat, DXGI_FORMAT inFormat, DWORD flags )\n{\n    assert( pBuffer && count > 0 && (((uintptr_t)pBuffer & 0xF) == 0) );\n    assert( IsValid(outFormat) && !IsTypeless(outFormat) && !IsPlanar(outFormat) && !IsPalettized(outFormat) );\n    assert( IsValid(inFormat) && !IsTypeless(inFormat) && !IsPlanar(inFormat) && !IsPalettized(inFormat) );\n\n    if ( !pBuffer )\n        return;\n\n#ifdef _DEBUG\n    // Ensure conversion table is in ascending order\n    assert( _countof(g_ConvertTable) > 0 );\n    DXGI_FORMAT lastvalue = g_ConvertTable[0].format;\n    for( size_t index=1; index < _countof(g_ConvertTable); ++index )\n    {\n        assert( g_ConvertTable[index].format > lastvalue );\n        lastvalue = g_ConvertTable[index].format;\n    }\n#endif\n\n    // Determine conversion details about source and dest formats\n    ConvertData key = { inFormat, 0 };\n    const ConvertData* in = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),\n                                                            _ConvertCompare, 0 );\n    key.format = outFormat;\n    const ConvertData* out = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData),\n                                                            _ConvertCompare, 0 );\n    if ( !in || !out )\n    {\n        assert(false);\n        return;\n    }\n\n    assert( _GetConvertFlags( inFormat ) == in->flags );\n    assert( _GetConvertFlags( outFormat ) == out->flags );\n\n    // Handle SRGB filtering modes\n    switch ( inFormat )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        flags |= TEX_FILTER_SRGB_IN;\n        break;\n\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        flags &= ~TEX_FILTER_SRGB_IN;\n        break;\n    }\n\n    switch ( outFormat )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        flags |= TEX_FILTER_SRGB_OUT;\n        break;\n\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        flags &= ~TEX_FILTER_SRGB_OUT;\n        break;\n    }\n\n    if ( (flags & (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT)) == (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT) )\n    {\n        flags &= ~(TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT);\n    }\n\n    // sRGB input processing (sRGB -> Linear RGB)\n    if ( flags & TEX_FILTER_SRGB_IN )\n    {\n        if ( !(in->flags & CONVF_DEPTH) && ( (in->flags & CONVF_FLOAT) || (in->flags & CONVF_UNORM) ) )\n        {\n            XMVECTOR* ptr = pBuffer;\n            for( size_t i=0; i < count; ++i, ++ptr )\n            {\n                *ptr = XMColorSRGBToRGB( *ptr );\n            }\n        }\n    }\n\n    // Handle conversion special cases\n    DWORD diffFlags = in->flags ^ out->flags;\n    if ( diffFlags != 0 )\n    {\n        static const XMVECTORF32 s_two = { 2.0f, 2.0f, 2.0f, 2.0f };\n\n        if ( diffFlags & CONVF_DEPTH )\n        {\n            if ( in->flags & CONVF_DEPTH )\n            {\n                // CONVF_DEPTH -> !CONVF_DEPTH\n                if ( in->flags & CONVF_STENCIL )\n                {\n                    // Stencil -> Alpha\n                    static const XMVECTORF32 S = { 1.f, 1.f, 1.f, 255.f };\n\n                    if( out->flags & CONVF_UNORM )\n                    {\n                        // UINT -> UNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatY( v );\n                            v1 = XMVectorClamp( v1, g_XMZero, S );\n                            v1 = XMVectorDivide( v1, S );\n                            v = XMVectorSelect( v1, v, g_XMSelect1110 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else if ( out->flags & CONVF_SNORM )\n                    {\n                        // UINT -> SNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatY( v );\n                            v1 = XMVectorClamp( v1, g_XMZero, S );\n                            v1 = XMVectorDivide( v1, S );\n                            v1 = XMVectorMultiplyAdd( v1, s_two, g_XMNegativeOne );\n                            v = XMVectorSelect( v1, v, g_XMSelect1110 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatY( v );\n                            v = XMVectorSelect( v1, v, g_XMSelect1110 );\n                            *ptr++ = v;\n                        }\n                    }\n                }\n\n                // Depth -> RGB\n                if ( ( out->flags & CONVF_UNORM ) && ( in->flags & CONVF_FLOAT ) )\n                {\n                    // Depth FLOAT -> UNORM\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        XMVECTOR v1 = XMVectorSaturate( v );\n                        v1 = XMVectorSplatX( v1 );\n                        v = XMVectorSelect( v, v1, g_XMSelect1110 );\n                        *ptr++ = v;\n                    }\n                }\n                else if ( out->flags & CONVF_SNORM )\n                {\n                    if ( in->flags & CONVF_UNORM )\n                    {\n                        // Depth UNORM -> SNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorMultiplyAdd( v, s_two, g_XMNegativeOne );\n                            v1 = XMVectorSplatX( v1 );\n                            v = XMVectorSelect( v, v1, g_XMSelect1110 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else\n                    {\n                        // Depth FLOAT -> SNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorClamp( v, g_XMNegativeOne, g_XMOne );\n                            v1 = XMVectorSplatX( v1 );\n                            v = XMVectorSelect( v, v1, g_XMSelect1110 );\n                            *ptr++ = v;\n                        }\n                    }\n                }\n                else\n                {\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        XMVECTOR v1 = XMVectorSplatX( v );\n                        v = XMVectorSelect( v, v1, g_XMSelect1110 );\n                        *ptr++ = v;\n                    }\n                }\n            }\n            else\n            {\n                // !CONVF_DEPTH -> CONVF_DEPTH\n\n                // RGB -> Depth (red channel)\n                switch( flags & ( TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN | TEX_FILTER_RGB_COPY_BLUE ) )\n                {\n                case TEX_FILTER_RGB_COPY_GREEN:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatY( v );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                    }\n                    break;\n\n                case TEX_FILTER_RGB_COPY_BLUE:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatZ( v );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                    }\n                    break;\n\n                default:\n                    if ( (in->flags & CONVF_UNORM) && ( (in->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G|CONVF_B) ) )\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVector3Dot( v, g_Grayscale );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                        break;\n                    }\n\n                    // fall-through\n\n                case TEX_FILTER_RGB_COPY_RED:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatX( v );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                    }\n                    break;\n                }\n\n                // Finialize type conversion for depth (red channel)\n                if ( out->flags & CONVF_UNORM )\n                {\n                    if ( in->flags & CONVF_SNORM )\n                    {\n                        // SNORM -> UNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorMultiplyAdd( v, g_XMOneHalf, g_XMOneHalf );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else if ( in->flags & CONVF_FLOAT )\n                    {\n                        // FLOAT -> UNORM\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSaturate( v );\n                            v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                            *ptr++ = v;\n                        }\n                    }\n                }\n\n                if ( out->flags & CONVF_STENCIL )\n                {\n                    // Alpha -> Stencil (green channel)\n                    static const XMVECTORU32 select0100 = { XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0 };\n                    static const XMVECTORF32 S = { 255.f, 255.f, 255.f, 255.f };\n\n                    if ( in->flags & CONVF_UNORM )\n                    {\n                        // UNORM -> UINT\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorMultiply( v, S );\n                            v1 = XMVectorSplatW( v1 );\n                            v = XMVectorSelect( v, v1, select0100 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else if ( in->flags & CONVF_SNORM )\n                    {\n                        // SNORM -> UINT\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorMultiplyAdd( v, g_XMOneHalf, g_XMOneHalf );\n                            v1 = XMVectorMultiply( v1, S );\n                            v1 = XMVectorSplatW( v1 );\n                            v = XMVectorSelect( v, v1, select0100 );\n                            *ptr++ = v;\n                        }\n                    }\n                    else\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatW( v );\n                            v = XMVectorSelect( v, v1, select0100 );\n                            *ptr++ = v;\n                        }\n                    }\n                }\n            }\n        }\n        else if ( out->flags & CONVF_DEPTH )\n        {\n            // CONVF_DEPTH -> CONVF_DEPTH\n            if ( diffFlags & CONVF_FLOAT )\n            {\n                if ( in->flags & CONVF_FLOAT )\n                {\n                    // FLOAT -> UNORM depth, preserve stencil\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        XMVECTOR v1 = XMVectorSaturate( v );\n                        v = XMVectorSelect( v, v1, g_XMSelect1000 );\n                        *ptr++ = v;\n                    }\n                }\n            }\n        }\n        else if ( out->flags & CONVF_UNORM )\n        {\n            if ( in->flags & CONVF_SNORM )\n            {\n                // SNORM -> UNORM\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    *ptr++ = XMVectorMultiplyAdd( v, g_XMOneHalf, g_XMOneHalf );\n                }\n            }\n            else if ( in->flags & CONVF_FLOAT )\n            {\n                // FLOAT -> UNORM\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    *ptr++ = XMVectorSaturate( v );\n                }\n            }\n        }\n        else if ( out->flags & CONVF_SNORM )\n        {\n            if ( in->flags & CONVF_UNORM )\n            {\n                // UNORM -> SNORM\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    *ptr++ = XMVectorMultiplyAdd( v, s_two, g_XMNegativeOne );\n                }\n            }\n            else if ( in->flags & CONVF_FLOAT )\n            {\n                // FLOAT -> SNORM\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    *ptr++ = XMVectorClamp( v, g_XMNegativeOne, g_XMOne );\n                }\n            }\n        }\n\n        // !CONVF_A -> CONVF_A is handled because LoadScanline ensures alpha defaults to 1.0 for no-alpha formats\n\n        // CONVF_PACKED cases are handled because LoadScanline/StoreScanline handles packing/unpacking\n\n        if ( ((out->flags & CONVF_RGBA_MASK) == CONVF_A) && !(in->flags & CONVF_A) )\n        {\n            // !CONVF_A -> A format\n            switch( flags & ( TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN | TEX_FILTER_RGB_COPY_BLUE ) )\n            {\n            case TEX_FILTER_RGB_COPY_GREEN:\n                {\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        *ptr++ = XMVectorSplatY( v );\n                    }\n                }\n                break;\n\n            case TEX_FILTER_RGB_COPY_BLUE:\n                {\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        *ptr++ = XMVectorSplatZ( v );\n                    }\n                }\n                break;\n\n            default:\n                if ( (in->flags & CONVF_UNORM) && ( (in->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G|CONVF_B) ) )\n                {\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        *ptr++ = XMVector3Dot( v, g_Grayscale );\n                    }\n                    break;\n                }\n\n                // fall-through\n\n            case TEX_FILTER_RGB_COPY_RED:\n                {\n                    XMVECTOR* ptr = pBuffer;\n                    for( size_t i=0; i < count; ++i )\n                    {\n                        XMVECTOR v = *ptr;\n                        *ptr++ = XMVectorSplatX( v );\n                    }\n                }\n                break;\n            }\n        }\n        else if ( ((in->flags & CONVF_RGBA_MASK) == CONVF_A) && !(out->flags & CONVF_A) )\n        {\n            // A format -> !CONVF_A\n            XMVECTOR* ptr = pBuffer;\n            for( size_t i=0; i < count; ++i )\n            {\n                XMVECTOR v = *ptr;\n                *ptr++ = XMVectorSplatW( v );\n            }\n        }\n        else if ( (in->flags & CONVF_RGB_MASK) == CONVF_R )\n        {\n            if ( (out->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G|CONVF_B) )\n            {\n                // R format -> RGB format\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    XMVECTOR v1 = XMVectorSplatX( v );\n                    *ptr++ = XMVectorSelect( v, v1, g_XMSelect1110 );\n                }\n            }\n            else if ( (out->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G) )\n            {\n                // R format -> RG format\n                XMVECTOR* ptr = pBuffer;\n                for( size_t i=0; i < count; ++i )\n                {\n                    XMVECTOR v = *ptr;\n                    XMVECTOR v1 = XMVectorSplatX( v );\n                    *ptr++ = XMVectorSelect( v, v1, g_XMSelect1100 );\n                }\n            }\n        }\n        else if ( (in->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G|CONVF_B) )\n        {\n            if ( (out->flags & CONVF_RGB_MASK) == CONVF_R )\n            {\n                // RGB format -> R format\n                switch( flags & ( TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN | TEX_FILTER_RGB_COPY_BLUE ) )\n                {\n                case TEX_FILTER_RGB_COPY_GREEN:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatY( v );\n                            *ptr++ = XMVectorSelect( v, v1, g_XMSelect1110 );\n                        }\n                    }\n                    break;\n\n                case TEX_FILTER_RGB_COPY_BLUE:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSplatZ( v );\n                            *ptr++ = XMVectorSelect( v, v1, g_XMSelect1110 );\n                        }\n                    }\n                    break;\n\n                default:\n                    if ( in->flags & CONVF_UNORM )\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVector3Dot( v, g_Grayscale );\n                            *ptr++ = XMVectorSelect( v, v1, g_XMSelect1110 );\n                        }\n                        break;\n                    }\n\n                    // fall-through\n\n                case TEX_FILTER_RGB_COPY_RED:\n                    // Leave data unchanged and the store will handle this...\n                    break;\n                }\n            }\n            else if ( (out->flags & CONVF_RGB_MASK) == (CONVF_R|CONVF_G) )\n            {\n                // RGB format -> RG format\n                switch( flags & ( TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN | TEX_FILTER_RGB_COPY_BLUE ) )\n                {\n                case TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_BLUE:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSwizzle<0,2,0,2>( v );\n                            *ptr++ = XMVectorSelect( v, v1, g_XMSelect1100 );\n                        }\n                    }\n                    break;\n\n                case TEX_FILTER_RGB_COPY_GREEN | TEX_FILTER_RGB_COPY_BLUE:\n                    {\n                        XMVECTOR* ptr = pBuffer;\n                        for( size_t i=0; i < count; ++i )\n                        {\n                            XMVECTOR v = *ptr;\n                            XMVECTOR v1 = XMVectorSwizzle<1,2,3,0>( v );\n                            *ptr++ = XMVectorSelect( v, v1, g_XMSelect1100 );\n                        }\n                    }\n                    break;\n\n                case TEX_FILTER_RGB_COPY_RED | TEX_FILTER_RGB_COPY_GREEN:\n                default:\n                    // Leave data unchanged and the store will handle this...\n                    break;\n                }\n            }\n        }\n    }\n\n    // sRGB output processing (Linear RGB -> sRGB)\n    if ( flags & TEX_FILTER_SRGB_OUT )\n    {\n        if ( !(out->flags & CONVF_DEPTH) && ( (out->flags & CONVF_FLOAT) || (out->flags & CONVF_UNORM) ) )\n        {\n            XMVECTOR* ptr = pBuffer;\n            for( size_t i=0; i < count; ++i, ++ptr )\n            {\n                *ptr = XMColorRGBToSRGB( *ptr );\n            }\n        }\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Dithering\n//-------------------------------------------------------------------------------------\n\n// 4X4X4 ordered dithering matrix\nstatic const float g_Dither[] =\n{\n    // (z & 3) + ( (y & 3) * 8) + (x & 3)\n    0.468750f,  -0.031250f, 0.343750f, -0.156250f, 0.468750f, -0.031250f, 0.343750f, -0.156250f,\n    -0.281250f,  0.218750f, -0.406250f, 0.093750f, -0.281250f, 0.218750f, -0.406250f, 0.093750f,\n    0.281250f,  -0.218750f, 0.406250f, -0.093750f, 0.281250f, -0.218750f, 0.406250f, -0.093750f,\n    -0.468750f,  0.031250f, -0.343750f, 0.156250f, -0.468750f, 0.031250f, -0.343750f, 0.156250f,\n};\n\nstatic const XMVECTORF32 g_Scale16pc    = {    65535.f, 65535.f, 65535.f, 65535.f };\nstatic const XMVECTORF32 g_Scale15pc    = {    32767.f, 32767.f, 32767.f, 32767.f };\nstatic const XMVECTORF32 g_Scale10pc    = {     1023.f,  1023.f,  1023.f,     3.f };\nstatic const XMVECTORF32 g_Scale8pc     = {      255.f,   255.f,   255.f,   255.f  };\nstatic const XMVECTORF32 g_Scale7pc     = {      127.f,   127.f,   127.f,   127.f  };\nstatic const XMVECTORF32 g_Scale565pc   = {       31.f,    63.f,    31.f,     1.f  };\nstatic const XMVECTORF32 g_Scale5551pc  = {       31.f,    31.f,    31.f,     1.f  };\nstatic const XMVECTORF32 g_Scale4pc     = {       15.f,    15.f,    15.f,    15.f  };\n\nstatic const XMVECTORF32 g_ErrorWeight3 = { 3.f/16.f, 3.f/16.f, 3.f/16.f, 3.f/16.f };\nstatic const XMVECTORF32 g_ErrorWeight5 = { 5.f/16.f, 5.f/16.f, 5.f/16.f, 5.f/16.f };\nstatic const XMVECTORF32 g_ErrorWeight1 = { 1.f/16.f, 1.f/16.f, 1.f/16.f, 1.f/16.f };\nstatic const XMVECTORF32 g_ErrorWeight7 = { 7.f/16.f, 7.f/16.f, 7.f/16.f, 7.f/16.f };\n\n#define STORE_SCANLINE( type, scalev, clampzero, norm, itype, mask, row, bgr ) \\\n        if ( size >= sizeof(type) ) \\\n        { \\\n            type * __restrict dest = reinterpret_cast<type*>(pDestination); \\\n            for( size_t i = 0; i < count; ++i ) \\\n            { \\\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( row & 1 ) ? ( count - i - 1 ) : i ); \\\n                ptrdiff_t delta = ( row & 1 ) ? -2 : 0; \\\n                \\\n                XMVECTOR v = sPtr[ index ]; \\\n                if ( bgr ) { v = XMVectorSwizzle<2, 1, 0, 3>( v ); } \\\n                if ( norm && clampzero ) v = XMVectorSaturate( v ) ; \\\n                else if ( clampzero ) v = XMVectorClamp( v, g_XMZero, scalev ); \\\n                else if ( norm ) v = XMVectorClamp( v, g_XMNegativeOne, g_XMOne ); \\\n                else v = XMVectorClamp( v, -scalev + g_XMOne, scalev ); \\\n                v = XMVectorAdd( v, vError ); \\\n                if ( norm ) v = XMVectorMultiply( v, scalev ); \\\n                \\\n                XMVECTOR target; \\\n                if ( pDiffusionErrors ) \\\n                { \\\n                    target = XMVectorRound( v ); \\\n                    vError = XMVectorSubtract( v, target ); \\\n                    if (norm) vError = XMVectorDivide( vError, scalev ); \\\n                    \\\n                    /* Distribute error to next scanline and next pixel */ \\\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError ); \\\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError ); \\\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError ); \\\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 ); \\\n                } \\\n                else \\\n                { \\\n                    /* Applied ordered dither */ \\\n                    target = XMVectorAdd( v, ordered[ index & 3 ] ); \\\n                    target = XMVectorRound( target ); \\\n                } \\\n                \\\n                target = XMVectorMin( scalev, target ); \\\n                target = XMVectorMax( (clampzero) ? g_XMZero : ( -scalev + g_XMOne ), target ); \\\n                \\\n                XMFLOAT4A tmp; \\\n                XMStoreFloat4A( &tmp, target ); \\\n                \\\n                auto dPtr = &dest[ index ]; \\\n                dPtr->x = static_cast<itype>( tmp.x ) & mask; \\\n                dPtr->y = static_cast<itype>( tmp.y ) & mask; \\\n                dPtr->z = static_cast<itype>( tmp.z ) & mask; \\\n                dPtr->w = static_cast<itype>( tmp.w ) & mask; \\\n            } \\\n            return true; \\\n        } \\\n        return false;\n\n#define STORE_SCANLINE2( type, scalev, clampzero, norm, itype, mask, row ) \\\n        /* The 2 component cases are always bgr=false */ \\\n        if ( size >= sizeof(type) ) \\\n        { \\\n            type * __restrict dest = reinterpret_cast<type*>(pDestination); \\\n            for( size_t i = 0; i < count; ++i ) \\\n            { \\\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( row & 1 ) ? ( count - i - 1 ) : i ); \\\n                ptrdiff_t delta = ( row & 1 ) ? -2 : 0; \\\n                \\\n                XMVECTOR v = sPtr[ index ]; \\\n                if ( norm && clampzero ) v = XMVectorSaturate( v ) ; \\\n                else if ( clampzero ) v = XMVectorClamp( v, g_XMZero, scalev ); \\\n                else if ( norm ) v = XMVectorClamp( v, g_XMNegativeOne, g_XMOne ); \\\n                else v = XMVectorClamp( v, -scalev + g_XMOne, scalev ); \\\n                v = XMVectorAdd( v, vError ); \\\n                if ( norm ) v = XMVectorMultiply( v, scalev ); \\\n                \\\n                XMVECTOR target; \\\n                if ( pDiffusionErrors ) \\\n                { \\\n                    target = XMVectorRound( v ); \\\n                    vError = XMVectorSubtract( v, target ); \\\n                    if (norm) vError = XMVectorDivide( vError, scalev ); \\\n                    \\\n                    /* Distribute error to next scanline and next pixel */ \\\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError ); \\\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError ); \\\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError ); \\\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 ); \\\n                } \\\n                else \\\n                { \\\n                    /* Applied ordered dither */ \\\n                    target = XMVectorAdd( v, ordered[ index & 3 ] ); \\\n                    target = XMVectorRound( target ); \\\n                } \\\n                \\\n                target = XMVectorMin( scalev, target ); \\\n                target = XMVectorMax( (clampzero) ? g_XMZero : ( -scalev + g_XMOne ), target ); \\\n                \\\n                XMFLOAT4A tmp; \\\n                XMStoreFloat4A( &tmp, target ); \\\n                \\\n                auto dPtr = &dest[ index ]; \\\n                dPtr->x = static_cast<itype>( tmp.x ) & mask; \\\n                dPtr->y = static_cast<itype>( tmp.y ) & mask; \\\n            } \\\n            return true; \\\n        } \\\n        return false;\n\n#define STORE_SCANLINE1( type, scalev, clampzero, norm, mask, row, selectw ) \\\n        /* The 1 component cases are always bgr=false */ \\\n        if ( size >= sizeof(type) ) \\\n        { \\\n            type * __restrict dest = reinterpret_cast<type*>(pDestination); \\\n            for( size_t i = 0; i < count; ++i ) \\\n            { \\\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( row & 1 ) ? ( count - i - 1 ) : i ); \\\n                ptrdiff_t delta = ( row & 1 ) ? -2 : 0; \\\n                \\\n                XMVECTOR v = sPtr[ index ]; \\\n                if ( norm && clampzero ) v = XMVectorSaturate( v ) ; \\\n                else if ( clampzero ) v = XMVectorClamp( v, g_XMZero, scalev ); \\\n                else if ( norm ) v = XMVectorClamp( v, g_XMNegativeOne, g_XMOne ); \\\n                else v = XMVectorClamp( v, -scalev + g_XMOne, scalev ); \\\n                v = XMVectorAdd( v, vError ); \\\n                if ( norm ) v = XMVectorMultiply( v, scalev ); \\\n                \\\n                XMVECTOR target; \\\n                if ( pDiffusionErrors ) \\\n                { \\\n                    target = XMVectorRound( v ); \\\n                    vError = XMVectorSubtract( v, target ); \\\n                    if (norm) vError = XMVectorDivide( vError, scalev ); \\\n                    \\\n                    /* Distribute error to next scanline and next pixel */ \\\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError ); \\\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError ); \\\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError ); \\\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 ); \\\n                } \\\n                else \\\n                { \\\n                    /* Applied ordered dither */ \\\n                    target = XMVectorAdd( v, ordered[ index & 3 ] ); \\\n                    target = XMVectorRound( target ); \\\n                } \\\n                \\\n                target = XMVectorMin( scalev, target ); \\\n                target = XMVectorMax( (clampzero) ? g_XMZero : ( -scalev + g_XMOne ), target ); \\\n                \\\n                dest[ index ] = static_cast<type>( (selectw) ? XMVectorGetW( target ) : XMVectorGetX( target ) ) & mask; \\\n            } \\\n            return true; \\\n        } \\\n        return false;\n\n#pragma warning(push)\n#pragma warning( disable : 4127 )\n\n_Use_decl_annotations_\nbool _StoreScanlineDither( LPVOID pDestination, size_t size, DXGI_FORMAT format,\n                           XMVECTOR* pSource, size_t count, float threshold, size_t y, size_t z, XMVECTOR* pDiffusionErrors )\n{\n    assert( pDestination && size > 0 );\n    assert( pSource && count > 0 && (((uintptr_t)pSource & 0xF) == 0) );\n    assert( IsValid(format) && !IsTypeless(format) && !IsCompressed(format) && !IsPlanar(format) && !IsPalettized(format) );\n\n    XMVECTOR ordered[4];\n    if ( pDiffusionErrors )\n    {\n        // If pDiffusionErrors != 0, then this function performs error diffusion dithering (aka Floyd-Steinberg dithering)\n\n        // To avoid the need for another temporary scanline buffer, we allow this function to overwrite the source buffer in-place\n        // Given the intended usage in the conversion routines, this is not a problem.\n\n        XMVECTOR* ptr = pSource;\n        const XMVECTOR* err = pDiffusionErrors + 1;\n        for( size_t i=0; i < count; ++i )\n        {\n            // Add contribution from previous scanline\n            XMVECTOR v = XMVectorAdd( *ptr, *err++ );\n            *ptr++ = v;\n        }\n\n        // Reset errors for next scanline\n        memset( pDiffusionErrors, 0, sizeof(XMVECTOR)*(count+2) );\n    }\n    else\n    {\n        // If pDiffusionErrors == 0, then this function performs ordered dithering\n\n        XMVECTOR dither = XMLoadFloat4( reinterpret_cast<const XMFLOAT4*>( g_Dither + (z & 3) + ( (y & 3) * 8 ) ) );\n\n        ordered[0] = XMVectorSplatX( dither );\n        ordered[1] = XMVectorSplatY( dither );\n        ordered[2] = XMVectorSplatZ( dither );\n        ordered[3] = XMVectorSplatW( dither );\n    }\n\n    const XMVECTOR* __restrict sPtr = pSource;\n    if ( !sPtr )\n        return false;\n\n    XMVECTOR vError = XMVectorZero();\n\n    switch( format )\n    {\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n        STORE_SCANLINE( XMUSHORTN4, g_Scale16pc, true, true, uint16_t, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n        STORE_SCANLINE( XMUSHORT4, g_Scale16pc, true, false, uint16_t, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n        STORE_SCANLINE( XMSHORTN4, g_Scale15pc, false, true, int16_t, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n        STORE_SCANLINE( XMSHORT4, g_Scale15pc, false, false, int16_t, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n        STORE_SCANLINE( XMUDECN4, g_Scale10pc, true, true, uint16_t, 0x3FF, y, false )\n\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n        STORE_SCANLINE( XMUDEC4, g_Scale10pc, true, false, uint16_t, 0x3FF, y, false )\n\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        if ( size >= sizeof(XMUDEC4) )\n        {\n            static const XMVECTORF32  Scale = { 510.0f, 510.0f, 510.0f, 3.0f };\n            static const XMVECTORF32  Bias  = { 384.0f, 384.0f, 384.0f, 0.0f };\n            static const XMVECTORF32  MinXR = { -0.7529f, -0.7529f, -0.7529f, 0.f };\n            static const XMVECTORF32  MaxXR = { 1.2529f, 1.2529f, 1.2529f, 1.0f };\n\n            XMUDEC4 * __restrict dest = reinterpret_cast<XMUDEC4*>(pDestination);\n            for( size_t i = 0; i < count; ++i )\n            {\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( y & 1 ) ? ( count - i - 1 ) : i );\n                ptrdiff_t delta = ( y & 1 ) ? -2 : 0;\n\n                XMVECTOR v = XMVectorClamp( sPtr[ index ], MinXR, MaxXR );\n                v = XMVectorMultiplyAdd( v, Scale, vError );\n\n                XMVECTOR target;\n                if ( pDiffusionErrors )\n                {\n                    target = XMVectorRound( v );\n                    vError = XMVectorSubtract( v, target );\n                    vError = XMVectorDivide( vError, Scale );\n\n                    // Distribute error to next scanline and next pixel\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError );\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError );\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError );\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 );\n                }\n                else\n                {\n                    // Applied ordered dither\n                    target = XMVectorAdd( v, ordered[ index & 3 ] );\n                    target = XMVectorRound( target );\n                }\n\n                target = XMVectorAdd( target, Bias );\n                target = XMVectorClamp( target, g_XMZero, g_Scale10pc );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, target );\n\n                auto dPtr = &dest[ index ];\n                dPtr->x = static_cast<uint16_t>( tmp.x ) & 0x3FF;\n                dPtr->y = static_cast<uint16_t>( tmp.y ) & 0x3FF;\n                dPtr->z = static_cast<uint16_t>( tmp.z ) & 0x3FF;\n                dPtr->w = static_cast<uint16_t>( tmp.w );\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        STORE_SCANLINE( XMUBYTEN4, g_Scale8pc, true, true, uint8_t, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n        STORE_SCANLINE( XMUBYTE4, g_Scale8pc, true, false, uint8_t, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n        STORE_SCANLINE( XMBYTEN4, g_Scale7pc, false, true, int8_t, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n        STORE_SCANLINE( XMBYTE4, g_Scale7pc, false, false, int8_t, 0xFF, y, false )\n\n    case DXGI_FORMAT_R16G16_UNORM:\n        STORE_SCANLINE2( XMUSHORTN2, g_Scale16pc, true, true, uint16_t, 0xFFFF, y )\n\n    case DXGI_FORMAT_R16G16_UINT:\n        STORE_SCANLINE2( XMUSHORT2, g_Scale16pc, true, false, uint16_t, 0xFFFF, y )\n\n    case DXGI_FORMAT_R16G16_SNORM:\n        STORE_SCANLINE2( XMSHORTN2, g_Scale15pc, false, true, int16_t, 0xFFFF, y )\n\n    case DXGI_FORMAT_R16G16_SINT:\n        STORE_SCANLINE2( XMSHORT2, g_Scale15pc, false, false, int16_t, 0xFFFF, y )\n\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n        if ( size >= sizeof(uint32_t) )\n        {\n            static const XMVECTORF32 Clamp  = {       1.f,  255.f, 0.f, 0.f };\n            static const XMVECTORF32 Scale  = { 16777215.f,   1.f, 0.f, 0.f };\n            static const XMVECTORF32 Scale2 = { 16777215.f, 255.f, 0.f, 0.f };\n\n            uint32_t * __restrict dest = reinterpret_cast<uint32_t*>(pDestination);\n            for( size_t i = 0; i < count; ++i )\n            {\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( y & 1 ) ? ( count - i - 1 ) : i );\n                ptrdiff_t delta = ( y & 1 ) ? -2 : 0;\n\n                XMVECTOR v = XMVectorClamp( sPtr[ index ], g_XMZero, Clamp );\n                v = XMVectorAdd( v, vError );\n                v = XMVectorMultiply( v, Scale );\n\n                XMVECTOR target;\n                if ( pDiffusionErrors )\n                {\n                    target = XMVectorRound( v );\n                    vError = XMVectorSubtract( v, target );\n                    vError = XMVectorDivide( vError, Scale );\n\n                    // Distribute error to next scanline and next pixel\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError );\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError );\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError );\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 );\n                }\n                else\n                {\n                    // Applied ordered dither\n                    target = XMVectorAdd( v, ordered[ index & 3 ] );\n                    target = XMVectorRound( target );\n                }\n\n                target = XMVectorClamp( target, g_XMZero, Scale2 );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, target );\n\n                auto dPtr = &dest[ index ];\n                *dPtr = (static_cast<uint32_t>( tmp.x ) & 0xFFFFFF)\n                        | ((static_cast<uint32_t>( tmp.y ) & 0xFF) << 24);\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_R8G8_UNORM:\n        STORE_SCANLINE2( XMUBYTEN2, g_Scale8pc, true, true, uint8_t, 0xFF, y )\n\n    case DXGI_FORMAT_R8G8_UINT:\n        STORE_SCANLINE2( XMUBYTE2, g_Scale8pc, true, false, uint8_t, 0xFF, y )\n\n    case DXGI_FORMAT_R8G8_SNORM:\n        STORE_SCANLINE2( XMBYTEN2, g_Scale7pc, false, true, int8_t, 0xFF, y )\n\n    case DXGI_FORMAT_R8G8_SINT:\n        STORE_SCANLINE2( XMBYTE2, g_Scale7pc, false, false, int8_t, 0xFF, y )\n\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n        STORE_SCANLINE1( uint16_t, g_Scale16pc, true, true, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16_UINT:\n        STORE_SCANLINE1( uint16_t, g_Scale16pc, true, false, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16_SNORM:\n        STORE_SCANLINE1( int16_t, g_Scale15pc, false, true, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R16_SINT:\n        STORE_SCANLINE1( int16_t, g_Scale15pc, false, false, 0xFFFF, y, false )\n\n    case DXGI_FORMAT_R8_UNORM:\n        STORE_SCANLINE1( uint8_t, g_Scale8pc, true, true, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8_UINT:\n        STORE_SCANLINE1( uint8_t, g_Scale8pc, true, false, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8_SNORM:\n        STORE_SCANLINE1( int8_t, g_Scale7pc, false, true, 0xFF, y, false )\n\n    case DXGI_FORMAT_R8_SINT:\n        STORE_SCANLINE1( int8_t, g_Scale7pc, false, false, 0xFF, y, false )\n\n    case DXGI_FORMAT_A8_UNORM:\n        STORE_SCANLINE1( uint8_t, g_Scale8pc, true, true, 0xFF, y, true )\n\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        if ( size >= sizeof(XMU565) )\n        {\n            XMU565 * __restrict dest = reinterpret_cast<XMU565*>(pDestination);\n            for( size_t i = 0; i < count; ++i )\n            {\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( y & 1 ) ? ( count - i - 1 ) : i );\n                ptrdiff_t delta = ( y & 1 ) ? -2 : 0;\n\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( sPtr[ index ] );\n                v = XMVectorSaturate( v );\n                v = XMVectorAdd( v, vError );\n                v = XMVectorMultiply( v, g_Scale565pc );\n\n                XMVECTOR target;\n                if ( pDiffusionErrors )\n                {\n                    target = XMVectorRound( v );\n                    vError = XMVectorSubtract( v, target );\n                    vError = XMVectorDivide( vError, g_Scale565pc );\n\n                    // Distribute error to next scanline and next pixel\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError );\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError );\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError );\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 );\n                }\n                else\n                {\n                    // Applied ordered dither\n                    target = XMVectorAdd( v, ordered[ index & 3 ] );\n                    target = XMVectorRound( target );\n                }\n\n                target = XMVectorClamp( target, g_XMZero, g_Scale565pc );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, target );\n\n                auto dPtr = &dest[ index ];\n                dPtr->x = static_cast<uint16_t>( tmp.x ) & 0x1F;\n                dPtr->y = static_cast<uint16_t>( tmp.y ) & 0x3F;\n                dPtr->z = static_cast<uint16_t>( tmp.z ) & 0x1F;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        if ( size >= sizeof(XMU555) )\n        {\n            XMU555 * __restrict dest = reinterpret_cast<XMU555*>(pDestination);\n            for( size_t i = 0; i < count; ++i )\n            {\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( y & 1 ) ? ( count - i - 1 ) : i );\n                ptrdiff_t delta = ( y & 1 ) ? -2 : 0;\n\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( sPtr[ index ] );\n                v = XMVectorSaturate( v );\n                v = XMVectorAdd( v, vError );\n                v = XMVectorMultiply( v, g_Scale5551pc );\n\n                XMVECTOR target;\n                if ( pDiffusionErrors )\n                {\n                    target = XMVectorRound( v );\n                    vError = XMVectorSubtract( v, target );\n                    vError = XMVectorDivide( vError, g_Scale5551pc );\n\n                    // Distribute error to next scanline and next pixel\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError );\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError );\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError );\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 );\n                }\n                else\n                {\n                    // Applied ordered dither\n                    target = XMVectorAdd( v, ordered[ index & 3 ] );\n                    target = XMVectorRound( target );\n                }\n\n                target = XMVectorClamp( target, g_XMZero, g_Scale5551pc );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, target );\n\n                auto dPtr = &dest[ index ];\n                dPtr->x = static_cast<uint16_t>( tmp.x ) & 0x1F;\n                dPtr->y = static_cast<uint16_t>( tmp.y ) & 0x1F;\n                dPtr->z = static_cast<uint16_t>( tmp.z ) & 0x1F;\n                dPtr->w = ( XMVectorGetW( target ) > threshold ) ? 1 : 0;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        STORE_SCANLINE( XMUBYTEN4, g_Scale8pc, true, true, uint8_t, 0xFF, y, true )\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        if ( size >= sizeof(XMUBYTEN4) )\n        {\n            XMUBYTEN4 * __restrict dest = reinterpret_cast<XMUBYTEN4*>(pDestination);\n            for( size_t i = 0; i < count; ++i )\n            {\n                ptrdiff_t index = static_cast<ptrdiff_t>( ( y & 1 ) ? ( count - i - 1 ) : i );\n                ptrdiff_t delta = ( y & 1 ) ? -2 : 0;\n\n                XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>( sPtr[ index ] );\n                v = XMVectorSaturate( v );\n                v = XMVectorAdd( v, vError );\n                v = XMVectorMultiply( v, g_Scale8pc );\n\n                XMVECTOR target;\n                if ( pDiffusionErrors )\n                {\n                    target = XMVectorRound( v );\n                    vError = XMVectorSubtract( v, target );\n                    vError = XMVectorDivide( vError, g_Scale8pc );\n\n                    // Distribute error to next scanline and next pixel\n                    pDiffusionErrors[ index-delta ]   += XMVectorMultiply( g_ErrorWeight3, vError );\n                    pDiffusionErrors[ index+1 ]       += XMVectorMultiply( g_ErrorWeight5, vError );\n                    pDiffusionErrors[ index+2+delta ] += XMVectorMultiply( g_ErrorWeight1, vError );\n                    vError = XMVectorMultiply( vError, g_ErrorWeight7 );\n                }\n                else\n                {\n                    // Applied ordered dither\n                    target = XMVectorAdd( v, ordered[ index & 3 ] );\n                    target = XMVectorRound( target );\n                }\n\n                target = XMVectorClamp( target, g_XMZero, g_Scale8pc );\n\n                XMFLOAT4A tmp;\n                XMStoreFloat4A( &tmp, target );\n\n                auto dPtr = &dest[ index ];\n                dPtr->x = static_cast<uint8_t>( tmp.x ) & 0xFF;\n                dPtr->y = static_cast<uint8_t>( tmp.y ) & 0xFF;\n                dPtr->z = static_cast<uint8_t>( tmp.z ) & 0xFF;\n                dPtr->w = 0;\n            }\n            return true;\n        }\n        return false;\n\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        STORE_SCANLINE( XMUNIBBLE4, g_Scale4pc, true, true, uint8_t, 0xF, y, true )\n\n    default:\n        return _StoreScanline( pDestination, size, format, pSource, count, threshold );\n    }\n}\n\n#pragma warning(pop)\n\n#undef STORE_SCANLINE\n#undef STORE_SCANLINE2\n#undef STORE_SCANLINE1\n\n\n//-------------------------------------------------------------------------------------\n// Selection logic for using WIC vs. our own routines\n//-------------------------------------------------------------------------------------\nstatic inline bool _UseWICConversion( _In_ DWORD filter, _In_ DXGI_FORMAT sformat, _In_ DXGI_FORMAT tformat,\n                                      _Out_ WICPixelFormatGUID& pfGUID, _Out_ WICPixelFormatGUID& targetGUID )\n{\n    memcpy( &pfGUID, &GUID_NULL, sizeof(GUID) );\n    memcpy( &targetGUID, &GUID_NULL, sizeof(GUID) );\n\n    if ( filter & TEX_FILTER_FORCE_NON_WIC )\n    {\n        // Explicit flag indicates use of non-WIC code paths\n        return false;\n    }\n\n    if ( !_DXGIToWIC( sformat, pfGUID ) || !_DXGIToWIC( tformat, targetGUID ) )\n    {\n        // Source or target format are not WIC supported native pixel formats\n        return false;\n    }\n\n    if ( filter & TEX_FILTER_FORCE_WIC )\n    {\n        // Explicit flag to use WIC code paths, skips all the case checks below\n        return true;\n    }\n\n    if ( filter & TEX_FILTER_SEPARATE_ALPHA )\n    {\n        // Alpha is not premultiplied, so use non-WIC code paths\n        return false;\n    }\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n    if ( sformat == DXGI_FORMAT_R16G16B16A16_FLOAT\n         || sformat == DXGI_FORMAT_R16_FLOAT\n         || tformat == DXGI_FORMAT_R16G16B16A16_FLOAT\n         || tformat == DXGI_FORMAT_R16_FLOAT )\n    {\n        // Use non-WIC code paths as these conversions are not supported by Xbox One XDK\n        return false;\n    }\n#endif\n\n    // Check for special cases\n    switch ( sformat )\n    {\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n        switch( tformat )\n        {\n        case DXGI_FORMAT_R16_FLOAT:\n        case DXGI_FORMAT_R32_FLOAT:\n        case DXGI_FORMAT_D32_FLOAT:\n            // WIC converts via UNORM formats and ends up converting colorspaces for these cases\n        case DXGI_FORMAT_A8_UNORM:\n            // Conversion logic for these kinds of textures is unintuitive for WIC code paths\n            return false;\n        }\n        break;\n    \n    case DXGI_FORMAT_R16_FLOAT:\n        switch( tformat )\n        {\n        case DXGI_FORMAT_R32_FLOAT:\n        case DXGI_FORMAT_D32_FLOAT:\n            // WIC converts via UNORM formats and ends up converting colorspaces for these cases\n        case DXGI_FORMAT_A8_UNORM:\n            // Conversion logic for these kinds of textures is unintuitive for WIC code paths\n            return false;\n        }\n        break;\n\n    case DXGI_FORMAT_A8_UNORM:\n        // Conversion logic for these kinds of textures is unintuitive for WIC code paths\n        return false;\n\n    default:\n        switch( tformat )\n        {\n        case DXGI_FORMAT_A8_UNORM:\n            // Conversion logic for these kinds of textures is unintuitive for WIC code paths\n            return false;\n        }\n    }\n    \n    // Check for implicit color space changes\n    if ( IsSRGB( sformat ) )\n        filter |= TEX_FILTER_SRGB_IN;\n\n    if ( IsSRGB( tformat ) )\n        filter |= TEX_FILTER_SRGB_OUT;\n\n    if ( (filter & (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT)) == (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT) )\n    {\n        filter &= ~(TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT);\n    }\n\n    DWORD wicsrgb = _CheckWICColorSpace( pfGUID, targetGUID );\n\n    if ( wicsrgb != (filter & (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT)) )\n    {\n        // WIC will perform a colorspace conversion we didn't request\n        return false;\n    }\n\n    return true;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert the source image using WIC\n//-------------------------------------------------------------------------------------\nstatic HRESULT _ConvertUsingWIC( _In_ const Image& srcImage, _In_ const WICPixelFormatGUID& pfGUID,\n                                 _In_ const WICPixelFormatGUID& targetGUID,\n                                 _In_ DWORD filter, _In_ float threshold,  _In_ const Image& destImage )\n{\n    assert( srcImage.width == destImage.width );\n    assert( srcImage.height == destImage.height );\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICFormatConverter> FC;\n    HRESULT hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Note that WIC conversion ignores the TEX_FILTER_SRGB_IN and TEX_FILTER_SRGB_OUT flags,\n    // but also always assumes UNORM <-> FLOAT conversions are changing color spaces sRGB <-> scRGB\n\n    BOOL canConvert = FALSE;\n    hr = FC->CanConvert( pfGUID, targetGUID, &canConvert );\n    if ( FAILED(hr) || !canConvert )\n    {\n        // This case is not an issue for the subset of WIC formats that map directly to DXGI\n        return E_UNEXPECTED;\n    }\n\n    ComPtr<IWICBitmap> source;\n    hr = pWIC->CreateBitmapFromMemory( static_cast<UINT>( srcImage.width ), static_cast<UINT>( srcImage.height ), pfGUID,\n                                       static_cast<UINT>( srcImage.rowPitch ), static_cast<UINT>( srcImage.slicePitch ),\n                                       srcImage.pixels, source.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = FC->Initialize( source.Get(), targetGUID, _GetWICDither( filter ), 0, threshold * 100.f, WICBitmapPaletteTypeCustom );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = FC->CopyPixels( 0, static_cast<UINT>( destImage.rowPitch ), static_cast<UINT>( destImage.slicePitch ), destImage.pixels );  \n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert the source image (not using WIC)\n//-------------------------------------------------------------------------------------\nstatic HRESULT _Convert( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage, _In_ float threshold, _In_ size_t z )\n{\n    assert( srcImage.width == destImage.width );\n    assert( srcImage.height == destImage.height );\n\n    const uint8_t *pSrc = srcImage.pixels;\n    uint8_t *pDest = destImage.pixels;\n    if ( !pSrc || !pDest )\n        return E_POINTER;\n\n    size_t width = srcImage.width;\n\n    if ( filter & TEX_FILTER_DITHER_DIFFUSION )\n    {\n        // Error diffusion dithering (aka Floyd-Steinberg dithering)\n        ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*(width*2 + 2)), 16 ) ) );\n        if ( !scanline )\n            return E_OUTOFMEMORY;\n\n        XMVECTOR* pDiffusionErrors = scanline.get() + width;\n        memset( pDiffusionErrors, 0, sizeof(XMVECTOR)*(width+2) );\n\n        for( size_t h = 0; h < srcImage.height; ++h )\n        {\n            if ( !_LoadScanline( scanline.get(), width, pSrc, srcImage.rowPitch, srcImage.format ) )\n                return E_FAIL;\n\n            _ConvertScanline( scanline.get(), width, destImage.format, srcImage.format, filter );\n\n            if ( !_StoreScanlineDither( pDest, destImage.rowPitch, destImage.format, scanline.get(), width, threshold, h, z, pDiffusionErrors ) )\n                return E_FAIL;\n\n            pSrc += srcImage.rowPitch;\n            pDest += destImage.rowPitch;\n        }\n    }\n    else\n    {\n        ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width), 16 ) ) );\n        if ( !scanline )\n            return E_OUTOFMEMORY;\n\n        if ( filter & TEX_FILTER_DITHER )\n        {\n            // Ordered dithering\n            for( size_t h = 0; h < srcImage.height; ++h )\n            {\n                if ( !_LoadScanline( scanline.get(), width, pSrc, srcImage.rowPitch, srcImage.format ) )\n                    return E_FAIL;\n\n                _ConvertScanline( scanline.get(), width, destImage.format, srcImage.format, filter );\n\n                if ( !_StoreScanlineDither( pDest, destImage.rowPitch, destImage.format, scanline.get(), width, threshold, h, z, nullptr ) )\n                    return E_FAIL;\n\n                pSrc += srcImage.rowPitch;\n                pDest += destImage.rowPitch;\n            }\n        }\n        else\n        {\n            // No dithering\n            for( size_t h = 0; h < srcImage.height; ++h )\n            {\n                if ( !_LoadScanline( scanline.get(), width, pSrc, srcImage.rowPitch, srcImage.format ) )\n                    return E_FAIL;\n\n                _ConvertScanline( scanline.get(), width, destImage.format, srcImage.format, filter );\n\n                if ( !_StoreScanline( pDest, destImage.rowPitch, destImage.format, scanline.get(), width, threshold ) )\n                    return E_FAIL;\n\n                pSrc += srcImage.rowPitch;\n                pDest += destImage.rowPitch;\n            }\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\nstatic DXGI_FORMAT _PlanarToSingle( _In_ DXGI_FORMAT format )\n{\n    switch (format)\n    {\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_NV11:\n        return DXGI_FORMAT_YUY2;\n\n    case DXGI_FORMAT_P010:\n        return DXGI_FORMAT_Y210;\n\n    case DXGI_FORMAT_P016:\n        return DXGI_FORMAT_Y216;\n\n    // We currently do not support conversion for Xbox One specific depth formats\n\n    // We can't do anything with DXGI_FORMAT_420_OPAQUE because it's an opaque blob of bits\n\n    default:\n        return DXGI_FORMAT_UNKNOWN;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert the image from a planar to non-planar image\n//-------------------------------------------------------------------------------------\n#define CONVERT_420_TO_422( srcType, destType )\\\n        {\\\n            size_t rowPitch = srcImage.rowPitch;\\\n            \\\n            auto sourceE = reinterpret_cast<const srcType*>( pSrc + srcImage.slicePitch );\\\n            auto pSrcUV = pSrc + ( srcImage.height * rowPitch );\\\n            \\\n            for( size_t y = 0; y < srcImage.height; y+= 2 )\\\n            {\\\n                auto sPtrY0 = reinterpret_cast<const srcType*>( pSrc );\\\n                auto sPtrY2 = reinterpret_cast<const srcType*>( pSrc + rowPitch );\\\n                auto sPtrUV = reinterpret_cast<const srcType*>( pSrcUV );\\\n                \\\n                destType * __restrict dPtr0 = reinterpret_cast<destType*>(pDest);\\\n                destType * __restrict dPtr1 = reinterpret_cast<destType*>(pDest + destImage.rowPitch);\\\n                \\\n                for( size_t x = 0; x < srcImage.width; x+= 2 )\\\n                {\\\n                    if ( (sPtrUV+1) >= sourceE ) break;\\\n                    \\\n                    srcType u = *(sPtrUV++);\\\n                    srcType v = *(sPtrUV++);\\\n                    \\\n                    dPtr0->x = *(sPtrY0++);\\\n                    dPtr0->y = u;\\\n                    dPtr0->z = *(sPtrY0++);\\\n                    dPtr0->w = v;\\\n                    ++dPtr0;\\\n                    \\\n                    dPtr1->x = *(sPtrY2++);\\\n                    dPtr1->y = u;\\\n                    dPtr1->z = *(sPtrY2++);\\\n                    dPtr1->w = v;\\\n                    ++dPtr1;\\\n                }\\\n                \\\n                pSrc += rowPitch * 2;\\\n                pSrcUV += rowPitch;\\\n                \\\n                pDest += destImage.rowPitch * 2;\\\n            }\\\n        }\n\nstatic HRESULT _ConvertToSinglePlane( _In_ const Image& srcImage, _In_ const Image& destImage )\n{\n    assert( srcImage.width == destImage.width );\n    assert( srcImage.height == destImage.height );\n\n    const uint8_t *pSrc = srcImage.pixels;\n    uint8_t *pDest = destImage.pixels;\n    if ( !pSrc || !pDest )\n        return E_POINTER;\n\n    switch ( srcImage.format )\n    {\n    case DXGI_FORMAT_NV12:\n        assert( destImage.format == DXGI_FORMAT_YUY2 );\n        CONVERT_420_TO_422( uint8_t, XMUBYTEN4 );\n        return S_OK;\n\n    case DXGI_FORMAT_P010:\n        assert( destImage.format == DXGI_FORMAT_Y210 );\n        CONVERT_420_TO_422( uint16_t, XMUSHORTN4 );\n        return S_OK;\n\n    case DXGI_FORMAT_P016:\n        assert( destImage.format == DXGI_FORMAT_Y216 );\n        CONVERT_420_TO_422( uint16_t, XMUSHORTN4 );\n        return S_OK;\n\n    case DXGI_FORMAT_NV11:\n        assert( destImage.format == DXGI_FORMAT_YUY2 );\n        // Convert 4:1:1 to 4:2:2\n        {\n            size_t rowPitch = srcImage.rowPitch;\n            \n            const uint8_t* sourceE = pSrc + srcImage.slicePitch;\n            const uint8_t* pSrcUV = pSrc + ( srcImage.height * rowPitch );\n            \n            for( size_t y = 0; y < srcImage.height; ++y )\n            {\n                const uint8_t* sPtrY = pSrc;\n                const uint8_t* sPtrUV = pSrcUV;\n                \n                XMUBYTEN4 * __restrict dPtr = reinterpret_cast<XMUBYTEN4*>(pDest);\n                \n                for( size_t x = 0; x < srcImage.width; x+= 4 )\n                {\n                    if ( (sPtrUV+1) >= sourceE ) break;\n                    \n                    uint8_t u = *(sPtrUV++);\n                    uint8_t v = *(sPtrUV++);\n                    \n                    dPtr->x = *(sPtrY++);\n                    dPtr->y = u;\n                    dPtr->z = *(sPtrY++);\n                    dPtr->w = v;\n                    ++dPtr;\n                    \n                    dPtr->x = *(sPtrY++);\n                    dPtr->y = u;\n                    dPtr->z = *(sPtrY++);\n                    dPtr->w = v;\n                    ++dPtr;\n                }\n                \n                pSrc += rowPitch;\n                pSrcUV += (rowPitch >> 1);\n                \n                pDest += destImage.rowPitch;\n            }\n        }\n        return S_OK;\n\n    default:\n        return E_UNEXPECTED;\n    }\n}\n\n#undef CONVERT_420_TO_422\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Convert image\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Convert( const Image& srcImage, DXGI_FORMAT format, DWORD filter, float threshold, ScratchImage& image )\n{\n    if ( (srcImage.format == format) || !IsValid( format ) )\n        return E_INVALIDARG;\n\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    if ( IsCompressed(srcImage.format) || IsCompressed(format)\n         || IsPlanar(srcImage.format) || IsPlanar(format)\n         || IsPalettized(srcImage.format) || IsPalettized(format)\n         || IsTypeless(srcImage.format) || IsTypeless(format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (srcImage.width > 0xFFFFFFFF) || (srcImage.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    HRESULT hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n   \n    const Image *rimage = image.GetImage( 0, 0, 0 );\n    if ( !rimage )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    WICPixelFormatGUID pfGUID, targetGUID;\n    if ( _UseWICConversion( filter, srcImage.format, format, pfGUID, targetGUID ) )\n    {\n        hr = _ConvertUsingWIC( srcImage, pfGUID, targetGUID, filter, threshold, *rimage );\n    }\n    else\n    {\n        hr = _Convert( srcImage, filter, *rimage, threshold, 0 );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert image (complex)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Convert( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                 DXGI_FORMAT format, DWORD filter, float threshold, ScratchImage& result )\n{\n    if ( !srcImages || !nimages || (metadata.format == format) || !IsValid(format) )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(metadata.format) || IsCompressed(format)\n         || IsPlanar(metadata.format) || IsPlanar(format)\n         || IsPalettized(metadata.format) || IsPalettized(format)\n         || IsTypeless(metadata.format) || IsTypeless(format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (metadata.width > 0xFFFFFFFF) || (metadata.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != result.GetImageCount() )\n    {\n        result.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = result.GetImages();\n    if ( !dest )\n    {\n        result.Release();\n        return E_POINTER;\n    }\n\n    WICPixelFormatGUID pfGUID, targetGUID;\n    bool usewic = _UseWICConversion( filter, metadata.format, format, pfGUID, targetGUID );\n\n    switch (metadata.dimension)\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        for( size_t index=0; index < nimages; ++index )\n        {\n            const Image& src = srcImages[ index ];\n            if ( src.format != metadata.format )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n#ifdef _M_X64\n            if ( (src.width > 0xFFFFFFFF) || (src.height > 0xFFFFFFFF) )\n                return E_FAIL;\n#endif\n\n            const Image& dst = dest[ index ];\n            assert( dst.format == format );\n\n            if ( src.width != dst.width || src.height != dst.height )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n            if ( usewic )\n            {\n                hr = _ConvertUsingWIC( src, pfGUID, targetGUID, filter, threshold, dst );\n            }\n            else\n            {\n                hr = _Convert( src, filter, dst, threshold, 0 );\n            }\n\n            if ( FAILED(hr) )\n            {\n                result.Release();\n                return hr;\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            size_t index = 0;\n            size_t d = metadata.depth;\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                for( size_t slice = 0; slice < d; ++slice, ++index )\n                {\n                    if ( index >= nimages )\n                        return E_FAIL;\n\n                    const Image& src = srcImages[ index ];\n                    if ( src.format != metadata.format )\n                    {\n                        result.Release();\n                        return E_FAIL;\n                    }\n\n#ifdef _M_X64\n                    if ( (src.width > 0xFFFFFFFF) || (src.height > 0xFFFFFFFF) )\n                        return E_FAIL;\n#endif\n\n                    const Image& dst = dest[ index ];\n                    assert( dst.format == format );\n\n                    if ( src.width != dst.width || src.height != dst.height )\n                    {\n                        result.Release();\n                        return E_FAIL;\n                    }\n\n                    if ( usewic )\n                    {\n                        hr = _ConvertUsingWIC( src, pfGUID, targetGUID, filter, threshold, dst );\n                    }\n                    else\n                    {\n                        hr = _Convert( src, filter, dst, threshold, slice );\n                    }\n\n                    if ( FAILED(hr) )\n                    {\n                        result.Release();\n                        return hr;\n                    }\n                }\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert image from planar to single plane (image)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT ConvertToSinglePlane( const Image& srcImage, ScratchImage& image )\n{\n    if ( !IsPlanar(srcImage.format) )\n        return E_INVALIDARG;\n\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    DXGI_FORMAT format = _PlanarToSingle( srcImage.format );\n    if ( format == DXGI_FORMAT_UNKNOWN )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (srcImage.width > 0xFFFFFFFF) || (srcImage.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    HRESULT hr = image.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n   \n    const Image *rimage = image.GetImage( 0, 0, 0 );\n    if ( !rimage )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    hr = _ConvertToSinglePlane( srcImage, *rimage );\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Convert image from planar to single plane (complex)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT ConvertToSinglePlane( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                              ScratchImage& result )\n{\n    if ( !srcImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( metadata.IsVolumemap() )\n    {\n        // Direct3D does not support any planar formats for Texture3D\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    DXGI_FORMAT format = _PlanarToSingle( metadata.format );\n    if ( format == DXGI_FORMAT_UNKNOWN )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (metadata.width > 0xFFFFFFFF) || (metadata.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != result.GetImageCount() )\n    {\n        result.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = result.GetImages();\n    if ( !dest )\n    {\n        result.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        const Image& src = srcImages[ index ];\n        if ( src.format != metadata.format )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n#ifdef _M_X64\n        if ( (src.width > 0xFFFFFFFF) || (src.height > 0xFFFFFFFF) )\n            return E_FAIL;\n#endif\n\n        const Image& dst = dest[ index ];\n        assert( dst.format == format );\n\n        if ( src.width != dst.width || src.height != dst.height )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n        hr = _ConvertToSinglePlane( src, dst );\n        if ( FAILED(hr) )\n        {\n            result.Release();\n            return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexD3D11.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexD3D11.cpp\n//  \n// DirectX Texture Library - Direct3D 11 helpers\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#if !defined(_XBOX_ONE) || !defined(_TITLE)\n#include <d3d10.h>\n#endif\n\nusing Microsoft::WRL::ComPtr;\n\nnamespace DirectX\n{\n\nstatic HRESULT _Capture( _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource* pSource, _In_ const TexMetadata& metadata,\n                         _In_ const ScratchImage& result )\n{\n    if ( !pContext || !pSource || !result.GetPixels() )\n        return E_POINTER;\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n\n    ComPtr<ID3D11Device> d3dDevice;\n    pContext->GetDevice( d3dDevice.GetAddressOf() );\n\n    if ( d3dDevice->GetCreationFlags() & D3D11_CREATE_DEVICE_IMMEDIATE_CONTEXT_FAST_SEMANTICS )\n    {\n        ComPtr<ID3D11DeviceX> d3dDeviceX;\n        HRESULT hr = d3dDevice.As( &d3dDeviceX );\n        if ( FAILED(hr) )\n            return hr;\n\n        ComPtr<ID3D11DeviceContextX> d3dContextX;\n        hr = pContext->QueryInterface( __uuidof(ID3D11DeviceContextX), reinterpret_cast<void**>( d3dContextX.GetAddressOf() ) );\n        if ( FAILED(hr) )\n            return hr;\n\n        UINT64 copyFence = d3dContextX->InsertFence(0);\n        \n        while ( d3dDeviceX->IsFencePending( copyFence ) )\n        {\n            SwitchToThread();\n        }\n    }\n\n#endif\n\n    if ( metadata.IsVolumemap() )\n    {\n        //--- Volume texture ----------------------------------------------------------\n        assert( metadata.arraySize == 1 );\n\n        size_t height = metadata.height;\n        size_t depth = metadata.depth;\n\n        for( size_t level = 0; level < metadata.mipLevels; ++level )\n        {\n            UINT dindex = D3D11CalcSubresource( static_cast<UINT>( level ), 0, static_cast<UINT>( metadata.mipLevels ) );\n\n            D3D11_MAPPED_SUBRESOURCE mapped;\n            HRESULT hr = pContext->Map( pSource, dindex, D3D11_MAP_READ, 0, &mapped );\n            if ( FAILED(hr) )\n                return hr;\n\n            auto pslice = reinterpret_cast<const uint8_t*>( mapped.pData );\n            if ( !pslice )\n            {\n                pContext->Unmap( pSource, dindex );\n                return E_POINTER;\n            }\n\n            size_t lines = ComputeScanlines( metadata.format, height );\n            if ( !lines )\n            {\n                pContext->Unmap( pSource, dindex );\n                return E_UNEXPECTED;\n            }\n\n            for( size_t slice = 0; slice < depth; ++slice )\n            {\n                const Image* img = result.GetImage( level, 0, slice );\n                if ( !img )\n                {\n                    pContext->Unmap( pSource, dindex );\n                    return E_FAIL;\n                }\n\n                if ( !img->pixels )\n                {\n                    pContext->Unmap( pSource, dindex );\n                    return E_POINTER;\n                }\n\n                const uint8_t* sptr = pslice;\n                uint8_t* dptr = img->pixels;\n                for( size_t h = 0; h < lines; ++h )\n                {\n                    size_t msize = std::min<size_t>( img->rowPitch, mapped.RowPitch );\n                    memcpy_s( dptr, img->rowPitch, sptr, msize );\n                    sptr += mapped.RowPitch;\n                    dptr += img->rowPitch;\n                }\n\n                pslice += mapped.DepthPitch;\n            }\n\n            pContext->Unmap( pSource, dindex );\n\n            if ( height > 1 )\n                height >>= 1;\n            if ( depth > 1 )\n                depth >>= 1;\n        }\n    }\n    else\n    {\n        //--- 1D or 2D texture --------------------------------------------------------\n        assert( metadata.depth == 1 );\n\n        for( size_t item = 0; item < metadata.arraySize; ++item )\n        {\n            size_t height = metadata.height;\n\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                UINT dindex = D3D11CalcSubresource( static_cast<UINT>( level ), static_cast<UINT>( item ), static_cast<UINT>( metadata.mipLevels ) );\n\n                D3D11_MAPPED_SUBRESOURCE mapped;\n                HRESULT hr = pContext->Map( pSource, dindex, D3D11_MAP_READ, 0, &mapped );\n                if ( FAILED(hr) )\n                    return hr;\n\n                const Image* img = result.GetImage( level, item, 0 );\n                if ( !img )\n                {\n                    pContext->Unmap( pSource, dindex );\n                    return E_FAIL;\n                }\n\n                if ( !img->pixels )\n                {\n                    pContext->Unmap( pSource, dindex );\n                    return E_POINTER;\n                }\n\n                size_t lines = ComputeScanlines( metadata.format, height );\n                if ( !lines )\n                {\n                    pContext->Unmap( pSource, dindex );\n                    return E_UNEXPECTED;\n                }\n\n                auto sptr = reinterpret_cast<const uint8_t*>( mapped.pData );\n                uint8_t* dptr = img->pixels;\n                for( size_t h = 0; h < lines; ++h )\n                {\n                    size_t msize = std::min<size_t>( img->rowPitch, mapped.RowPitch );\n                    memcpy_s( dptr, img->rowPitch, sptr, msize );\n                    sptr += mapped.RowPitch;\n                    dptr += img->rowPitch;\n                }\n\n                pContext->Unmap( pSource, dindex );\n\n                if ( height > 1 )\n                    height >>= 1;\n            }\n        }\n    }\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Determine if given texture metadata is supported on the given device\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nbool IsSupportedTexture( ID3D11Device* pDevice, const TexMetadata& metadata )\n{\n    if ( !pDevice )\n        return false;\n\n    D3D_FEATURE_LEVEL fl = pDevice->GetFeatureLevel();\n\n    // Validate format\n    DXGI_FORMAT fmt = metadata.format;\n\n    if ( !IsValid( fmt ) )\n        return false;\n\n    switch( fmt )\n    {\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n        if ( fl < D3D_FEATURE_LEVEL_10_0 )\n            return false;\n        break;\n\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        if ( fl < D3D_FEATURE_LEVEL_11_0 )\n            return false;\n        break;\n    }\n\n    // Validate miplevel count\n    if ( metadata.mipLevels > D3D11_REQ_MIP_LEVELS )\n        return false;\n       \n    // Validate array size, dimension, and width/height\n    size_t arraySize = metadata.arraySize;\n    size_t iWidth = metadata.width;\n    size_t iHeight = metadata.height;\n    size_t iDepth = metadata.depth;\n\n    // Most cases are known apriori based on feature level, but we use this for robustness to handle the few optional cases\n    UINT formatSupport = 0;\n    HRESULT hr = pDevice->CheckFormatSupport( fmt, &formatSupport );\n    if ( FAILED(hr) )\n    {\n        formatSupport = 0;\n    }\n\n    switch ( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        if ( !(formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE1D) )\n            return false;\n\n        if ( (arraySize > D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION)\n             || (iWidth > D3D11_REQ_TEXTURE1D_U_DIMENSION) )\n            return false;\n\n        if ( fl < D3D_FEATURE_LEVEL_11_0 )\n        {\n            if ( (arraySize > D3D10_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION)\n                 || (iWidth > D3D10_REQ_TEXTURE1D_U_DIMENSION) )\n                return false;\n\n            if ( fl < D3D_FEATURE_LEVEL_10_0 )\n            {\n                if ( (arraySize > 1) || (iWidth > D3D_FL9_3_REQ_TEXTURE1D_U_DIMENSION) )\n                    return false;\n\n                if ( (fl < D3D_FEATURE_LEVEL_9_3) && (iWidth > D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION ) )\n                    return false;\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( metadata.IsCubemap() )\n        {\n            if ( !(formatSupport & D3D11_FORMAT_SUPPORT_TEXTURECUBE) )\n                return false;\n\n            if ( (arraySize > D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION)\n                 || (iWidth > D3D11_REQ_TEXTURECUBE_DIMENSION) \n                 || (iHeight > D3D11_REQ_TEXTURECUBE_DIMENSION))\n                return false;\n\n            if ( fl < D3D_FEATURE_LEVEL_11_0 )\n            {\n                if ( (arraySize > D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION)\n                     || (iWidth > D3D10_REQ_TEXTURECUBE_DIMENSION) \n                     || (iHeight > D3D10_REQ_TEXTURECUBE_DIMENSION))\n                    return false;\n\n                if ( (fl < D3D_FEATURE_LEVEL_10_1) && (arraySize != 6) )\n                    return false;\n\n                if ( fl < D3D_FEATURE_LEVEL_10_0 )\n                {\n                    if ( (iWidth > D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION )\n                         || (iHeight > D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION ) )\n                        return false;\n\n                    if ( (fl < D3D_FEATURE_LEVEL_9_3)\n                         && ( (iWidth > D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION)\n                              || (iHeight > D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION) ) )\n                        return false;\n                }\n            }\n        }\n        else // Not a cube map\n        {\n            if ( !(formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE2D) )\n                return false;\n\n            if ( (arraySize > D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION)\n                 || (iWidth > D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION) \n                 || (iHeight > D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION))\n                return false;\n\n            if ( fl < D3D_FEATURE_LEVEL_11_0 )\n            {\n                if ( (arraySize > D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION)\n                     || (iWidth > D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION) \n                     || (iHeight > D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION))\n                    return false;\n\n                if ( fl < D3D_FEATURE_LEVEL_10_0 )\n                {\n                    if ( (arraySize > 1)\n                         || (iWidth > D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION)\n                         || (iHeight > D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION) )\n                        return false;\n\n                    if ( (fl < D3D_FEATURE_LEVEL_9_3)\n                         && ( (iWidth > D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION)\n                              || (iHeight > D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION) ) )\n                        return false;\n                }\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        if ( !(formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE3D) )\n            return false;\n\n        if ( (arraySize > 1)\n             || (iWidth > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) \n             || (iHeight > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION)\n             || (iDepth > D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) )\n            return false;\n\n        if ( fl < D3D_FEATURE_LEVEL_11_0 )\n        {\n            if ( (iWidth > D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) \n                 || (iHeight > D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION)\n                 || (iDepth > D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) )\n                return false;\n\n            if ( fl < D3D_FEATURE_LEVEL_10_0 )\n            {\n                if ( (iWidth > D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION)\n                     || (iHeight > D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION)\n                     || (iDepth > D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION) )\n                    return false;\n            }\n        }\n        break;\n\n    default:\n        // Not a supported dimension\n        return false;\n    }\n\n    return true;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Create a texture resource\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT CreateTexture( ID3D11Device* pDevice, const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                       ID3D11Resource** ppResource )\n{\n    return CreateTextureEx( pDevice, srcImages, nimages, metadata,\n                            D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                            ppResource );\n}\n\n_Use_decl_annotations_\nHRESULT CreateTextureEx( ID3D11Device* pDevice, const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                         D3D11_USAGE usage, unsigned int bindFlags, unsigned int cpuAccessFlags, unsigned int miscFlags, bool forceSRGB,\n                         ID3D11Resource** ppResource )\n{\n    if ( !pDevice || !srcImages || !nimages || !ppResource )\n        return E_INVALIDARG;\n\n    *ppResource = nullptr;\n\n    if ( !metadata.mipLevels || !metadata.arraySize )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( (metadata.width > 0xFFFFFFFF) || (metadata.height > 0xFFFFFFFF)\n         || (metadata.mipLevels > 0xFFFFFFFF) || (metadata.arraySize > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    std::unique_ptr<D3D11_SUBRESOURCE_DATA[]> initData( new (std::nothrow) D3D11_SUBRESOURCE_DATA[ metadata.mipLevels * metadata.arraySize ] );\n    if ( !initData )\n        return E_OUTOFMEMORY;\n\n    // Fill out subresource array\n    if ( metadata.IsVolumemap() )\n    {\n        //--- Volume case -------------------------------------------------------------\n        if ( !metadata.depth )\n            return E_INVALIDARG;\n\n#ifdef _M_X64\n        if ( metadata.depth > 0xFFFFFFFF )\n            return E_INVALIDARG;\n#endif\n\n        if ( metadata.arraySize > 1 )\n            // Direct3D 11 doesn't support arrays of 3D textures\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n        size_t depth = metadata.depth;\n\n        size_t idx = 0;\n        for( size_t level = 0; level < metadata.mipLevels; ++level )\n        {\n            size_t index = metadata.ComputeIndex( level, 0, 0 );\n            if ( index >= nimages )\n                return E_FAIL;\n\n            const Image& img = srcImages[ index ];\n\n            if ( img.format != metadata.format )\n                return E_FAIL;\n\n            if ( !img.pixels )\n                return E_POINTER;\n\n            // Verify pixels in image 1 .. (depth-1) are exactly image->slicePitch apart\n            // For 3D textures, this relies on all slices of the same miplevel being continous in memory\n            // (this is how ScratchImage lays them out), which is why we just give the 0th slice to Direct3D 11\n            const uint8_t* pSlice = img.pixels + img.slicePitch;\n            for( size_t slice = 1; slice < depth; ++slice )\n            {\n                size_t tindex = metadata.ComputeIndex( level, 0, slice );\n                if ( tindex >= nimages )\n                    return E_FAIL;\n\n                const Image& timg = srcImages[ tindex ];\n\n                if ( !timg.pixels )\n                    return E_POINTER;\n\n                if ( timg.pixels != pSlice\n                     || timg.format != metadata.format\n                     || timg.rowPitch != img.rowPitch\n                     || timg.slicePitch != img.slicePitch )\n                    return E_FAIL;\n\n                pSlice = timg.pixels + img.slicePitch;\n            }\n\n            assert( idx < (metadata.mipLevels * metadata.arraySize) );\n\n            initData[idx].pSysMem = img.pixels;\n            initData[idx].SysMemPitch = static_cast<DWORD>( img.rowPitch );\n            initData[idx].SysMemSlicePitch = static_cast<DWORD>( img.slicePitch );\n            ++idx;\n\n            if ( depth > 1 )\n                depth >>= 1;\n        }\n    }\n    else\n    {\n        //--- 1D or 2D texture case ---------------------------------------------------\n        size_t idx = 0;\n        for( size_t item = 0; item < metadata.arraySize; ++item )\n        {\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                size_t index = metadata.ComputeIndex( level, item, 0 );\n                if ( index >= nimages )\n                    return E_FAIL;\n\n                const Image& img = srcImages[ index ];\n\n                if ( img.format != metadata.format )\n                    return E_FAIL;\n\n                if ( !img.pixels )\n                    return E_POINTER;\n\n                assert( idx < (metadata.mipLevels * metadata.arraySize) );\n\n                initData[idx].pSysMem = img.pixels;\n                initData[idx].SysMemPitch = static_cast<DWORD>( img.rowPitch );\n                initData[idx].SysMemSlicePitch = static_cast<DWORD>( img.slicePitch );\n                ++idx;\n            }\n        }\n    }\n\n    // Create texture using static initialization data\n    HRESULT hr = E_FAIL;\n\n    DXGI_FORMAT tformat = ( forceSRGB ) ? MakeSRGB( metadata.format ) : metadata.format;\n\n    switch ( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        {\n            D3D11_TEXTURE1D_DESC desc;\n            desc.Width = static_cast<UINT>( metadata.width );\n            desc.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            desc.ArraySize = static_cast<UINT>( metadata.arraySize );\n            desc.Format = tformat;\n            desc.Usage = usage;\n            desc.BindFlags = bindFlags;\n            desc.CPUAccessFlags = cpuAccessFlags;\n            desc.MiscFlags = miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n\n            hr = pDevice->CreateTexture1D( &desc, initData.get(), reinterpret_cast<ID3D11Texture1D**>(ppResource) );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        {\n            D3D11_TEXTURE2D_DESC desc;\n            desc.Width = static_cast<UINT>( metadata.width );\n            desc.Height = static_cast<UINT>( metadata.height ); \n            desc.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            desc.ArraySize = static_cast<UINT>( metadata.arraySize );\n            desc.Format = tformat;\n            desc.SampleDesc.Count = 1;\n            desc.SampleDesc.Quality = 0;\n            desc.Usage = usage;\n            desc.BindFlags = bindFlags;\n            desc.CPUAccessFlags = cpuAccessFlags;\n            if ( metadata.IsCubemap() )\n                desc.MiscFlags =  miscFlags | D3D11_RESOURCE_MISC_TEXTURECUBE;\n            else\n                desc.MiscFlags =  miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n\n            hr = pDevice->CreateTexture2D( &desc, initData.get(), reinterpret_cast<ID3D11Texture2D**>(ppResource) );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            D3D11_TEXTURE3D_DESC desc;\n            desc.Width = static_cast<UINT>( metadata.width );\n            desc.Height = static_cast<UINT>( metadata.height );\n            desc.Depth = static_cast<UINT>( metadata.depth );\n            desc.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            desc.Format = tformat;\n            desc.Usage = usage;\n            desc.BindFlags = bindFlags;\n            desc.CPUAccessFlags = cpuAccessFlags;\n            desc.MiscFlags = miscFlags & ~D3D11_RESOURCE_MISC_TEXTURECUBE;\n\n            hr = pDevice->CreateTexture3D( &desc, initData.get(), reinterpret_cast<ID3D11Texture3D**>(ppResource) );\n        }\n        break;\n    }\n\n    return hr;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Create a shader resource view and associated texture\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT CreateShaderResourceView( ID3D11Device* pDevice, const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                                  ID3D11ShaderResourceView** ppSRV )\n{\n    return CreateShaderResourceViewEx( pDevice, srcImages, nimages, metadata,\n                                       D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                       ppSRV );\n}\n\n_Use_decl_annotations_\nHRESULT CreateShaderResourceViewEx( ID3D11Device* pDevice, const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                                    D3D11_USAGE usage, unsigned int bindFlags, unsigned int cpuAccessFlags, unsigned int miscFlags, bool forceSRGB,\n                                    ID3D11ShaderResourceView** ppSRV )\n{\n    if ( !ppSRV )\n        return E_INVALIDARG;\n\n    *ppSRV = nullptr;\n\n    ComPtr<ID3D11Resource> resource;\n    HRESULT hr = CreateTextureEx( pDevice, srcImages, nimages, metadata,\n                                  usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                  resource.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    assert( resource );\n\n    D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;\n    memset( &SRVDesc, 0, sizeof(SRVDesc) );\n    if ( forceSRGB )\n        SRVDesc.Format = MakeSRGB( metadata.format );\n    else\n        SRVDesc.Format = metadata.format;\n\n    switch ( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        if ( metadata.arraySize > 1 )\n        {\n            SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE1DARRAY;\n            SRVDesc.Texture1DArray.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            SRVDesc.Texture1DArray.ArraySize = static_cast<UINT>( metadata.arraySize );\n        }\n        else\n        {\n            SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE1D;\n            SRVDesc.Texture1D.MipLevels = static_cast<UINT>( metadata.mipLevels );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( metadata.IsCubemap() )\n        {\n            if (metadata.arraySize > 6)\n            {\n                assert( (metadata.arraySize % 6) == 0 );\n                SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURECUBEARRAY;\n                SRVDesc.TextureCubeArray.MipLevels = static_cast<UINT>( metadata.mipLevels );\n                SRVDesc.TextureCubeArray.NumCubes = static_cast<UINT>( metadata.arraySize / 6 );\n            }\n            else\n            {\n                SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURECUBE;\n                SRVDesc.TextureCube.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            }\n        }\n        else if ( metadata.arraySize > 1 )\n        {\n            SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2DARRAY;\n            SRVDesc.Texture2DArray.MipLevels = static_cast<UINT>( metadata.mipLevels );\n            SRVDesc.Texture2DArray.ArraySize = static_cast<UINT>( metadata.arraySize );\n        }\n        else\n        {\n            SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;\n            SRVDesc.Texture2D.MipLevels = static_cast<UINT>( metadata.mipLevels );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        assert( metadata.arraySize == 1 );\n        SRVDesc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE3D;\n        SRVDesc.Texture3D.MipLevels = static_cast<UINT>( metadata.mipLevels );\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    hr = pDevice->CreateShaderResourceView( resource.Get(), &SRVDesc, ppSRV );\n    if ( FAILED(hr) )\n        return hr;\n\n    assert( *ppSRV );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a texture resource to a DDS file in memory/on disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT CaptureTexture( ID3D11Device* pDevice, ID3D11DeviceContext* pContext, ID3D11Resource* pSource, ScratchImage& result )\n{\n    if ( !pDevice || !pContext || !pSource )\n        return E_INVALIDARG;\n\n    D3D11_RESOURCE_DIMENSION resType = D3D11_RESOURCE_DIMENSION_UNKNOWN;\n    pSource->GetType( &resType );\n\n    HRESULT hr;\n\n    switch( resType )\n    {\n    case D3D11_RESOURCE_DIMENSION_TEXTURE1D:\n        {\n            ComPtr<ID3D11Texture1D> pTexture;\n            hr = pSource->QueryInterface( __uuidof(ID3D11Texture1D), reinterpret_cast<void**>( pTexture.GetAddressOf() ) );\n            if ( FAILED(hr) )\n                break;\n\n            assert( pTexture );\n\n            D3D11_TEXTURE1D_DESC desc;\n            pTexture->GetDesc( &desc );\n\n            desc.BindFlags = 0;\n            desc.MiscFlags = 0;\n            desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n            desc.Usage = D3D11_USAGE_STAGING;\n\n            ComPtr<ID3D11Texture1D> pStaging;\n            hr = pDevice->CreateTexture1D( &desc, 0, pStaging.GetAddressOf() );\n            if ( FAILED(hr) )\n                break;\n\n            assert( pStaging );\n\n            pContext->CopyResource( pStaging.Get(), pSource );\n\n            TexMetadata mdata;\n            mdata.width = desc.Width;\n            mdata.height = mdata.depth = 1;\n            mdata.arraySize = desc.ArraySize;\n            mdata.mipLevels = desc.MipLevels;\n            mdata.miscFlags = 0;\n            mdata.miscFlags2 = 0;\n            mdata.format = desc.Format;\n            mdata.dimension = TEX_DIMENSION_TEXTURE1D;\n\n            hr = result.Initialize( mdata );\n            if ( FAILED(hr) )\n                break;\n\n            hr = _Capture( pContext, pStaging.Get(), mdata, result );\n        }\n        break;\n\n    case D3D11_RESOURCE_DIMENSION_TEXTURE2D:\n        {\n            ComPtr<ID3D11Texture2D> pTexture;\n            hr = pSource->QueryInterface( __uuidof(ID3D11Texture2D), reinterpret_cast<void**>( pTexture.GetAddressOf() ) );\n            if ( FAILED(hr) )\n                break;\n\n            assert( pTexture );\n\n            D3D11_TEXTURE2D_DESC desc;\n            pTexture->GetDesc( &desc );\n\n            ComPtr<ID3D11Texture2D> pStaging;\n            if ( desc.SampleDesc.Count > 1 )\n            {\n                desc.SampleDesc.Count = 1;\n                desc.SampleDesc.Quality = 0;\n\n                ComPtr<ID3D11Texture2D> pTemp;\n                hr = pDevice->CreateTexture2D( &desc, 0, pTemp.GetAddressOf() );\n                if ( FAILED(hr) )\n                    break;\n\n                assert( pTemp );\n\n                DXGI_FORMAT fmt = desc.Format;\n                if ( IsTypeless(fmt) )\n                {\n                    // Assume a UNORM if it exists otherwise use FLOAT\n                    fmt = MakeTypelessUNORM( fmt );\n                    fmt = MakeTypelessFLOAT( fmt );\n                }\n\n                UINT support = 0;\n                hr = pDevice->CheckFormatSupport( fmt, &support );\n                if ( FAILED(hr) )\n                    break;\n\n                if ( !(support & D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE) )\n                {\n                    hr = E_FAIL;\n                    break;\n                }\n\n                for( UINT item = 0; item < desc.ArraySize; ++item )\n                {\n                    for( UINT level = 0; level < desc.MipLevels; ++level )\n                    {\n                        UINT index = D3D11CalcSubresource( level, item, desc.MipLevels );\n                        pContext->ResolveSubresource( pTemp.Get(), index, pSource, index, fmt );\n                    }\n                }\n\n                desc.BindFlags = 0;\n                desc.MiscFlags &= D3D11_RESOURCE_MISC_TEXTURECUBE;\n                desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n                desc.Usage = D3D11_USAGE_STAGING;\n\n                hr = pDevice->CreateTexture2D( &desc, 0, pStaging.GetAddressOf() );\n                if ( FAILED(hr) )\n                    break;\n\n                assert( pStaging );\n\n                pContext->CopyResource( pStaging.Get(), pTemp.Get() );\n            }\n            else\n            {\n                desc.BindFlags = 0;\n                desc.MiscFlags &= D3D11_RESOURCE_MISC_TEXTURECUBE;\n                desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n                desc.Usage = D3D11_USAGE_STAGING;\n\n                hr = pDevice->CreateTexture2D( &desc, 0, &pStaging );\n                if ( FAILED(hr) )\n                    break;\n\n                assert( pStaging );\n\n                pContext->CopyResource( pStaging.Get(), pSource );\n            }\n\n            TexMetadata mdata;\n            mdata.width = desc.Width;\n            mdata.height = desc.Height;\n            mdata.depth = 1;\n            mdata.arraySize = desc.ArraySize;\n            mdata.mipLevels = desc.MipLevels;\n            mdata.miscFlags = (desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE) ? TEX_MISC_TEXTURECUBE : 0;\n            mdata.miscFlags2 = 0;\n            mdata.format = desc.Format;\n            mdata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n            hr = result.Initialize( mdata );\n            if ( FAILED(hr) )\n                break;\n\n            hr = _Capture( pContext, pStaging.Get(), mdata, result );\n        }\n        break;\n\n    case D3D11_RESOURCE_DIMENSION_TEXTURE3D:\n        {\n            ComPtr<ID3D11Texture3D> pTexture;\n            hr = pSource->QueryInterface( __uuidof(ID3D11Texture3D), reinterpret_cast<void**>( pTexture.GetAddressOf() ) );\n            if ( FAILED(hr) )\n                break;\n\n            assert( pTexture );\n\n            D3D11_TEXTURE3D_DESC desc;\n            pTexture->GetDesc( &desc );\n\n            desc.BindFlags = 0;\n            desc.MiscFlags = 0;\n            desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n            desc.Usage = D3D11_USAGE_STAGING;\n\n            ComPtr<ID3D11Texture3D> pStaging;\n            hr = pDevice->CreateTexture3D( &desc, 0, pStaging.GetAddressOf() );\n            if ( FAILED(hr) )\n                break;\n\n            assert( pStaging );\n\n            pContext->CopyResource( pStaging.Get(), pSource );\n\n            TexMetadata mdata;\n            mdata.width = desc.Width;\n            mdata.height = desc.Height;\n            mdata.depth = desc.Depth;\n            mdata.arraySize = 1;\n            mdata.mipLevels = desc.MipLevels;\n            mdata.miscFlags = 0;\n            mdata.miscFlags2 = 0;\n            mdata.format = desc.Format;\n            mdata.dimension = TEX_DIMENSION_TEXTURE3D;\n\n            hr = result.Initialize( mdata );\n            if ( FAILED(hr) )\n                break;\n\n            hr = _Capture( pContext, pStaging.Get(), mdata, result );\n        }\n        break;\n\n    default:\n        hr = E_FAIL;\n        break;\n    }\n\n    if ( FAILED(hr) )\n    {\n        result.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexDDS.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexDDS.cpp\n//  \n// DirectX Texture Library - Microsoft DirectDraw Surface (DDS) file format reader/writer\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"dds.h\"\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Legacy format mapping table (used for DDS files without 'DX10' extended header)\n//-------------------------------------------------------------------------------------\nenum CONVERSION_FLAGS\n{\n    CONV_FLAGS_NONE     = 0x0,\n    CONV_FLAGS_EXPAND   = 0x1,      // Conversion requires expanded pixel size\n    CONV_FLAGS_NOALPHA  = 0x2,      // Conversion requires setting alpha to known value\n    CONV_FLAGS_SWIZZLE  = 0x4,      // BGR/RGB order swizzling required\n    CONV_FLAGS_PAL8     = 0x8,      // Has an 8-bit palette\n    CONV_FLAGS_888      = 0x10,     // Source is an 8:8:8 (24bpp) format\n    CONV_FLAGS_565      = 0x20,     // Source is a 5:6:5 (16bpp) format\n    CONV_FLAGS_5551     = 0x40,     // Source is a 5:5:5:1 (16bpp) format\n    CONV_FLAGS_4444     = 0x80,     // Source is a 4:4:4:4 (16bpp) format\n    CONV_FLAGS_44       = 0x100,    // Source is a 4:4 (8bpp) format\n    CONV_FLAGS_332      = 0x200,    // Source is a 3:3:2 (8bpp) format\n    CONV_FLAGS_8332     = 0x400,    // Source is a 8:3:3:2 (16bpp) format\n    CONV_FLAGS_A8P8     = 0x800,    // Has an 8-bit palette with an alpha channel\n    CONV_FLAGS_DX10     = 0x10000,  // Has the 'DX10' extension header\n    CONV_FLAGS_PMALPHA  = 0x20000,  // Contains premultiplied alpha data\n    CONV_FLAGS_L8       = 0x40000,  // Source is a 8 luminance format \n    CONV_FLAGS_L16      = 0x80000,  // Source is a 16 luminance format \n    CONV_FLAGS_A8L8     = 0x100000, // Source is a 8:8 luminance format \n};\n\nstruct LegacyDDS\n{\n    DXGI_FORMAT     format;\n    DWORD           convFlags;\n    DDS_PIXELFORMAT ddpf;\n};\n\nconst LegacyDDS g_LegacyDDSMap[] = \n{\n    { DXGI_FORMAT_BC1_UNORM,          CONV_FLAGS_NONE,        DDSPF_DXT1 }, // D3DFMT_DXT1\n    { DXGI_FORMAT_BC2_UNORM,          CONV_FLAGS_NONE,        DDSPF_DXT3 }, // D3DFMT_DXT3\n    { DXGI_FORMAT_BC3_UNORM,          CONV_FLAGS_NONE,        DDSPF_DXT5 }, // D3DFMT_DXT5\n\n    { DXGI_FORMAT_BC2_UNORM,          CONV_FLAGS_PMALPHA,     DDSPF_DXT2 }, // D3DFMT_DXT2\n    { DXGI_FORMAT_BC3_UNORM,          CONV_FLAGS_PMALPHA,     DDSPF_DXT4 }, // D3DFMT_DXT4\n\n    { DXGI_FORMAT_BC4_UNORM,          CONV_FLAGS_NONE,        DDSPF_BC4_UNORM },\n    { DXGI_FORMAT_BC4_SNORM,          CONV_FLAGS_NONE,        DDSPF_BC4_SNORM },\n    { DXGI_FORMAT_BC5_UNORM,          CONV_FLAGS_NONE,        DDSPF_BC5_UNORM },\n    { DXGI_FORMAT_BC5_SNORM,          CONV_FLAGS_NONE,        DDSPF_BC5_SNORM },\n\n    { DXGI_FORMAT_BC4_UNORM,          CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC( 'A', 'T', 'I', '1' ), 0, 0, 0, 0, 0 } },\n    { DXGI_FORMAT_BC5_UNORM,          CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC( 'A', 'T', 'I', '2' ), 0, 0, 0, 0, 0 } },\n\n    { DXGI_FORMAT_R8G8_B8G8_UNORM,    CONV_FLAGS_NONE,        DDSPF_R8G8_B8G8 }, // D3DFMT_R8G8_B8G8\n    { DXGI_FORMAT_G8R8_G8B8_UNORM,    CONV_FLAGS_NONE,        DDSPF_G8R8_G8B8 }, // D3DFMT_G8R8_G8B8\n\n    { DXGI_FORMAT_B8G8R8A8_UNORM,     CONV_FLAGS_NONE,        DDSPF_A8R8G8B8 }, // D3DFMT_A8R8G8B8 (uses DXGI 1.1 format)\n    { DXGI_FORMAT_B8G8R8X8_UNORM,     CONV_FLAGS_NONE,        DDSPF_X8R8G8B8 }, // D3DFMT_X8R8G8B8 (uses DXGI 1.1 format)\n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_NONE,        DDSPF_A8B8G8R8 }, // D3DFMT_A8B8G8R8\n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_NOALPHA,     DDSPF_X8B8G8R8 }, // D3DFMT_X8B8G8R8\n    { DXGI_FORMAT_R16G16_UNORM,       CONV_FLAGS_NONE,        DDSPF_G16R16   }, // D3DFMT_G16R16\n\n    { DXGI_FORMAT_R10G10B10A2_UNORM,  CONV_FLAGS_SWIZZLE,     { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 32, 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 } }, // D3DFMT_A2R10G10B10 (D3DX reversal issue workaround)\n    { DXGI_FORMAT_R10G10B10A2_UNORM,  CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 32, 0x3ff00000, 0x000ffc00, 0x000003ff, 0xc0000000 } }, // D3DFMT_A2B10G10R10 (D3DX reversal issue workaround)\n\n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_NOALPHA\n                                      | CONV_FLAGS_888,       DDSPF_R8G8B8 }, // D3DFMT_R8G8B8\n\n    { DXGI_FORMAT_B5G6R5_UNORM,       CONV_FLAGS_565,         DDSPF_R5G6B5 }, // D3DFMT_R5G6B5\n    { DXGI_FORMAT_B5G5R5A1_UNORM,     CONV_FLAGS_5551,        DDSPF_A1R5G5B5 }, // D3DFMT_A1R5G5B5\n    { DXGI_FORMAT_B5G5R5A1_UNORM,     CONV_FLAGS_5551\n                                      | CONV_FLAGS_NOALPHA,   { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 16, 0x7c00,     0x03e0,     0x001f,     0x0000     } }, // D3DFMT_X1R5G5B5\n     \n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_8332,      { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 16, 0x00e0,     0x001c,     0x0003,     0xff00     } }, // D3DFMT_A8R3G3B2\n    { DXGI_FORMAT_B5G6R5_UNORM,       CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_332,       { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0,  8, 0xe0,       0x1c,       0x03,       0x00       } }, // D3DFMT_R3G3B2\n  \n    { DXGI_FORMAT_R8_UNORM,           CONV_FLAGS_NONE,        DDSPF_L8   }, // D3DFMT_L8\n    { DXGI_FORMAT_R16_UNORM,          CONV_FLAGS_NONE,        DDSPF_L16  }, // D3DFMT_L16\n    { DXGI_FORMAT_R8G8_UNORM,         CONV_FLAGS_NONE,        DDSPF_A8L8 }, // D3DFMT_A8L8\n\n    { DXGI_FORMAT_A8_UNORM,           CONV_FLAGS_NONE,        DDSPF_A8   }, // D3DFMT_A8\n\n    { DXGI_FORMAT_R16G16B16A16_UNORM, CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,   36,  0, 0,          0,          0,          0          } }, // D3DFMT_A16B16G16R16\n    { DXGI_FORMAT_R16G16B16A16_SNORM, CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  110,  0, 0,          0,          0,          0          } }, // D3DFMT_Q16W16V16U16\n    { DXGI_FORMAT_R16_FLOAT,          CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  111,  0, 0,          0,          0,          0          } }, // D3DFMT_R16F\n    { DXGI_FORMAT_R16G16_FLOAT,       CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  112,  0, 0,          0,          0,          0          } }, // D3DFMT_G16R16F\n    { DXGI_FORMAT_R16G16B16A16_FLOAT, CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  113,  0, 0,          0,          0,          0          } }, // D3DFMT_A16B16G16R16F\n    { DXGI_FORMAT_R32_FLOAT,          CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  114,  0, 0,          0,          0,          0          } }, // D3DFMT_R32F\n    { DXGI_FORMAT_R32G32_FLOAT,       CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  115,  0, 0,          0,          0,          0          } }, // D3DFMT_G32R32F\n    { DXGI_FORMAT_R32G32B32A32_FLOAT, CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,  116,  0, 0,          0,          0,          0          } }, // D3DFMT_A32B32G32R32F\n\n    { DXGI_FORMAT_R32_FLOAT,          CONV_FLAGS_NONE,        { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 32, 0xffffffff, 0x00000000, 0x00000000, 0x00000000 } }, // D3DFMT_R32F (D3DX uses FourCC 114 instead)\n\n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_PAL8\n                                      | CONV_FLAGS_A8P8,      { sizeof(DDS_PIXELFORMAT), DDS_PAL8,      0, 16, 0,          0,          0,          0         } }, // D3DFMT_A8P8\n    { DXGI_FORMAT_R8G8B8A8_UNORM,     CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_PAL8,      { sizeof(DDS_PIXELFORMAT), DDS_PAL8,      0,  8, 0,          0,          0,          0         } }, // D3DFMT_P8\n\n    { DXGI_FORMAT_B4G4R4A4_UNORM,     CONV_FLAGS_4444,        DDSPF_A4R4G4B4 }, // D3DFMT_A4R4G4B4 (uses DXGI 1.2 format)\n    { DXGI_FORMAT_B4G4R4A4_UNORM,     CONV_FLAGS_NOALPHA\n                                      | CONV_FLAGS_4444,      { sizeof(DDS_PIXELFORMAT), DDS_RGB,       0, 16, 0x0f00,     0x00f0,     0x000f,     0x0000     } }, // D3DFMT_X4R4G4B4 (uses DXGI 1.2 format)\n    { DXGI_FORMAT_B4G4R4A4_UNORM,     CONV_FLAGS_EXPAND\n                                      | CONV_FLAGS_44,        { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCE, 0,  8, 0x0f,       0x00,       0x00,       0xf0       } }, // D3DFMT_A4L4 (uses DXGI 1.2 format)\n\n    { DXGI_FORMAT_YUY2,               CONV_FLAGS_NONE,        DDSPF_YUY2 }, // D3DFMT_YUY2 (uses DXGI 1.2 format)\n    { DXGI_FORMAT_YUY2,               CONV_FLAGS_SWIZZLE,     { sizeof(DDS_PIXELFORMAT), DDS_FOURCC,    MAKEFOURCC('U','Y','V','Y'), 0, 0, 0, 0, 0            } }, // D3DFMT_UYVY (uses DXGI 1.2 format)\n};\n\n// Note that many common DDS reader/writers (including D3DX) swap the\n// the RED/BLUE masks for 10:10:10:2 formats. We assumme\n// below that the 'backwards' header mask is being used since it is most\n// likely written by D3DX. The more robust solution is to use the 'DX10'\n// header extension and specify the DXGI_FORMAT_R10G10B10A2_UNORM format directly\n\n// We do not support the following legacy Direct3D 9 formats:\n//      BumpDuDv D3DFMT_V8U8, D3DFMT_Q8W8V8U8, D3DFMT_V16U16, D3DFMT_A2W10V10U10\n//      BumpLuminance D3DFMT_L6V5U5, D3DFMT_X8L8V8U8\n//      FourCC 117 D3DFMT_CxV8U8\n//      ZBuffer D3DFMT_D16_LOCKABLE\n//      FourCC 82 D3DFMT_D32F_LOCKABLE\n\nstatic DXGI_FORMAT _GetDXGIFormat( const DDS_PIXELFORMAT& ddpf, DWORD flags, _Inout_ DWORD& convFlags )\n{\n    const size_t MAP_SIZE = sizeof(g_LegacyDDSMap) / sizeof(LegacyDDS);\n    size_t index = 0;\n    for( index = 0; index < MAP_SIZE; ++index )\n    {\n        const LegacyDDS* entry = &g_LegacyDDSMap[index];\n\n        if ( ddpf.dwFlags & entry->ddpf.dwFlags )\n        {\n            if ( entry->ddpf.dwFlags & DDS_FOURCC )\n            {\n                if ( ddpf.dwFourCC == entry->ddpf.dwFourCC )\n                    break;\n            }\n            else if ( entry->ddpf.dwFlags & DDS_PAL8 )\n            {\n                if (  ddpf.dwRGBBitCount == entry->ddpf.dwRGBBitCount )\n                    break;\n            }\n            else if ( ddpf.dwRGBBitCount == entry->ddpf.dwRGBBitCount )\n            {\n                // RGB, RGBA, ALPHA, LUMINANCE\n                if ( ddpf.dwRBitMask == entry->ddpf.dwRBitMask\n                     && ddpf.dwGBitMask == entry->ddpf.dwGBitMask\n                     && ddpf.dwBBitMask == entry->ddpf.dwBBitMask\n                     && ddpf.dwABitMask == entry->ddpf.dwABitMask )\n                    break;\n            }\n        }\n    }\n\n    if ( index >= MAP_SIZE )\n        return DXGI_FORMAT_UNKNOWN;\n\n    DWORD cflags = g_LegacyDDSMap[index].convFlags;\n    DXGI_FORMAT format = g_LegacyDDSMap[index].format;\n\n    if ( (cflags & CONV_FLAGS_EXPAND) && (flags & DDS_FLAGS_NO_LEGACY_EXPANSION) )\n        return DXGI_FORMAT_UNKNOWN;\n\n    if ( (format == DXGI_FORMAT_R10G10B10A2_UNORM) && (flags & DDS_FLAGS_NO_R10B10G10A2_FIXUP) )\n    {\n        cflags ^= CONV_FLAGS_SWIZZLE;\n    }\n\n    convFlags = cflags;\n\n    return format;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Decodes DDS header including optional DX10 extended header\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecodeDDSHeader( _In_reads_bytes_(size) LPCVOID pSource, size_t size, DWORD flags, _Out_ TexMetadata& metadata,\n                                 _Inout_ DWORD& convFlags )\n{\n    if ( !pSource )\n        return E_INVALIDARG;\n\n    memset( &metadata, 0, sizeof(TexMetadata) );\n\n    if ( size < (sizeof(DDS_HEADER) + sizeof(uint32_t)) )\n    {\n        return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n    }\n\n    // DDS files always start with the same magic number (\"DDS \")\n    uint32_t dwMagicNumber = *reinterpret_cast<const uint32_t*>(pSource);\n    if ( dwMagicNumber != DDS_MAGIC )\n    {\n        return E_FAIL;\n    }\n\n    auto pHeader = reinterpret_cast<const DDS_HEADER*>( (const uint8_t*)pSource + sizeof( uint32_t ) );\n\n    // Verify header to validate DDS file\n    if ( pHeader->dwSize != sizeof(DDS_HEADER)\n         || pHeader->ddspf.dwSize != sizeof(DDS_PIXELFORMAT) )\n    {\n        return E_FAIL;\n    }\n\n    metadata.mipLevels = pHeader->dwMipMapCount;\n    if ( metadata.mipLevels == 0 )\n        metadata.mipLevels = 1;\n\n    // Check for DX10 extension\n    if ( (pHeader->ddspf.dwFlags & DDS_FOURCC)\n         && (MAKEFOURCC( 'D', 'X', '1', '0' ) == pHeader->ddspf.dwFourCC) )\n    {\n        // Buffer must be big enough for both headers and magic value\n        if ( size < ( sizeof(DDS_HEADER) + sizeof(uint32_t) + sizeof(DDS_HEADER_DXT10) ) )\n        {\n            return E_FAIL;\n        }\n\n        auto d3d10ext = reinterpret_cast<const DDS_HEADER_DXT10*>( (const uint8_t*)pSource + sizeof( uint32_t ) + sizeof(DDS_HEADER) );\n        convFlags |= CONV_FLAGS_DX10;\n\n        metadata.arraySize = d3d10ext->arraySize;\n        if ( metadata.arraySize == 0 )\n        {\n            return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n        }\n\n        metadata.format = d3d10ext->dxgiFormat;\n        if ( !IsValid( metadata.format ) || IsPalettized( metadata.format ) )\n        {\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n\n        static_assert( TEX_MISC_TEXTURECUBE == DDS_RESOURCE_MISC_TEXTURECUBE, \"DDS header mismatch\");\n\n        metadata.miscFlags = d3d10ext->miscFlag & ~TEX_MISC_TEXTURECUBE;\n\n        switch ( d3d10ext->resourceDimension )\n        {\n        case DDS_DIMENSION_TEXTURE1D:\n\n            // D3DX writes 1D textures with a fixed Height of 1\n            if ( (pHeader->dwFlags & DDS_HEIGHT) && pHeader->dwHeight != 1 )\n            {\n                return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n            }\n\n            metadata.width = pHeader->dwWidth;\n            metadata.height = 1;\n            metadata.depth = 1;\n            metadata.dimension = TEX_DIMENSION_TEXTURE1D;\n            break;\n\n        case DDS_DIMENSION_TEXTURE2D:\n            if ( d3d10ext->miscFlag & DDS_RESOURCE_MISC_TEXTURECUBE )\n            {\n                metadata.miscFlags |= TEX_MISC_TEXTURECUBE;\n                metadata.arraySize *= 6;\n            }\n\n            metadata.width = pHeader->dwWidth;\n            metadata.height = pHeader->dwHeight;\n            metadata.depth = 1;\n            metadata.dimension = TEX_DIMENSION_TEXTURE2D;\n            break;\n\n        case DDS_DIMENSION_TEXTURE3D:\n            if ( !(pHeader->dwFlags & DDS_HEADER_FLAGS_VOLUME) )\n            {\n                return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n            }\n\n            if ( metadata.arraySize > 1 )\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n            metadata.width = pHeader->dwWidth;\n            metadata.height = pHeader->dwHeight;\n            metadata.depth = pHeader->dwDepth;\n            metadata.dimension = TEX_DIMENSION_TEXTURE3D;\n            break;\n\n        default:\n            return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n        }\n\n        static_assert( TEX_MISC2_ALPHA_MODE_MASK == DDS_MISC_FLAGS2_ALPHA_MODE_MASK, \"DDS header mismatch\");\n\n        static_assert( TEX_ALPHA_MODE_UNKNOWN == DDS_ALPHA_MODE_UNKNOWN, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_STRAIGHT == DDS_ALPHA_MODE_STRAIGHT, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_PREMULTIPLIED == DDS_ALPHA_MODE_PREMULTIPLIED, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_OPAQUE == DDS_ALPHA_MODE_OPAQUE, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_CUSTOM == DDS_ALPHA_MODE_CUSTOM, \"DDS header mismatch\");\n\n        metadata.miscFlags2 = d3d10ext->miscFlags2;\n    }\n    else\n    {\n        metadata.arraySize = 1;\n\n        if ( pHeader->dwFlags & DDS_HEADER_FLAGS_VOLUME )\n        {\n            metadata.width = pHeader->dwWidth;\n            metadata.height = pHeader->dwHeight;\n            metadata.depth = pHeader->dwDepth;\n            metadata.dimension = TEX_DIMENSION_TEXTURE3D;\n        }\n        else \n        {\n            if ( pHeader->dwCaps2 & DDS_CUBEMAP )\n            {\n               // We require all six faces to be defined\n               if ( (pHeader->dwCaps2 & DDS_CUBEMAP_ALLFACES ) != DDS_CUBEMAP_ALLFACES )\n                   return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n                metadata.arraySize = 6;\n                metadata.miscFlags |= TEX_MISC_TEXTURECUBE;\n            }\n\n            metadata.width = pHeader->dwWidth;\n            metadata.height = pHeader->dwHeight;\n            metadata.depth = 1;\n            metadata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n            // Note there's no way for a legacy Direct3D 9 DDS to express a '1D' texture\n        }\n\n        metadata.format = _GetDXGIFormat( pHeader->ddspf, flags, convFlags );\n\n        if ( metadata.format == DXGI_FORMAT_UNKNOWN )\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n        if ( convFlags & CONV_FLAGS_PMALPHA )\n            metadata.miscFlags2 |= TEX_ALPHA_MODE_PREMULTIPLIED;\n\n        // Special flag for handling LUMINANCE legacy formats\n        if ( flags & DDS_FLAGS_EXPAND_LUMINANCE )\n        {\n            switch ( metadata.format )\n            {\n            case DXGI_FORMAT_R8_UNORM:\n                metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n                convFlags |= CONV_FLAGS_L8 | CONV_FLAGS_EXPAND;\n                break;\n\n            case DXGI_FORMAT_R8G8_UNORM:\n                metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n                convFlags |= CONV_FLAGS_A8L8 | CONV_FLAGS_EXPAND;\n                break;\n\n            case DXGI_FORMAT_R16_UNORM:\n                metadata.format = DXGI_FORMAT_R16G16B16A16_UNORM;\n                convFlags |= CONV_FLAGS_L16 | CONV_FLAGS_EXPAND;\n                break;\n            }\n        }\n    }\n\n    // Special flag for handling BGR DXGI 1.1 formats\n    if (flags & DDS_FLAGS_FORCE_RGB)\n    {\n        switch ( metadata.format )\n        {\n        case DXGI_FORMAT_B8G8R8A8_UNORM:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            convFlags |= CONV_FLAGS_SWIZZLE;\n            break;\n\n        case DXGI_FORMAT_B8G8R8X8_UNORM:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            convFlags |= CONV_FLAGS_SWIZZLE | CONV_FLAGS_NOALPHA;\n            break;\n\n        case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_TYPELESS;\n            convFlags |= CONV_FLAGS_SWIZZLE;\n            break;\n\n        case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n            convFlags |= CONV_FLAGS_SWIZZLE;\n            break;\n\n        case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_TYPELESS;\n            convFlags |= CONV_FLAGS_SWIZZLE | CONV_FLAGS_NOALPHA;\n            break;\n\n        case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n            convFlags |= CONV_FLAGS_SWIZZLE | CONV_FLAGS_NOALPHA;\n            break;\n        }\n    }\n\n    // Special flag for handling 16bpp formats\n    if (flags & DDS_FLAGS_NO_16BPP)\n    {\n        switch ( metadata.format )\n        {\n        case DXGI_FORMAT_B5G6R5_UNORM:\n        case DXGI_FORMAT_B5G5R5A1_UNORM:\n        case DXGI_FORMAT_B4G4R4A4_UNORM:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            convFlags |= CONV_FLAGS_EXPAND;\n            if ( metadata.format == DXGI_FORMAT_B5G6R5_UNORM )\n                convFlags |= CONV_FLAGS_NOALPHA;\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Encodes DDS file header (magic value, header, optional DX10 extended header)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT _EncodeDDSHeader( const TexMetadata& metadata, DWORD flags, \n                          LPVOID pDestination, size_t maxsize, size_t& required )\n{\n    if ( !IsValid( metadata.format ) )\n        return E_INVALIDARG;\n\n    if ( IsPalettized( metadata.format ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( metadata.arraySize > 1 )\n    {\n        if ( (metadata.arraySize != 6) || (metadata.dimension != TEX_DIMENSION_TEXTURE2D) || !(metadata.IsCubemap()) )\n        {\n            // Texture1D arrays, Texture2D arrays, and Cubemap arrays must be stored using 'DX10' extended header\n            flags |= DDS_FLAGS_FORCE_DX10_EXT;\n        }\n    }\n\n    if ( flags & DDS_FLAGS_FORCE_DX10_EXT_MISC2 )\n    {\n        flags |= DDS_FLAGS_FORCE_DX10_EXT;\n    }\n\n    DDS_PIXELFORMAT ddpf = { 0 };\n    if ( !(flags & DDS_FLAGS_FORCE_DX10_EXT) )\n    {\n        switch( metadata.format )\n        {\n        case DXGI_FORMAT_R8G8B8A8_UNORM:        memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A8B8G8R8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_R16G16_UNORM:          memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_G16R16, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_R8G8_UNORM:            memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A8L8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_R16_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_L16, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_R8_UNORM:              memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_L8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_A8_UNORM:              memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_R8G8_B8G8_UNORM:       memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_R8G8_B8G8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_G8R8_G8B8_UNORM:       memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_G8R8_G8B8, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC1_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_DXT1, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC2_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), metadata.IsPMAlpha() ? (&DDSPF_DXT2) : (&DDSPF_DXT3), sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC3_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), metadata.IsPMAlpha() ? (&DDSPF_DXT4) : (&DDSPF_DXT5), sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC4_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_BC4_UNORM, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC4_SNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_BC4_SNORM, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC5_UNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_BC5_UNORM, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_BC5_SNORM:             memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_BC5_SNORM, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_B5G6R5_UNORM:          memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_R5G6B5, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_B5G5R5A1_UNORM:        memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A1R5G5B5, sizeof(DDS_PIXELFORMAT) ); break;\n        case DXGI_FORMAT_B8G8R8A8_UNORM:        memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A8R8G8B8, sizeof(DDS_PIXELFORMAT) ); break; // DXGI 1.1\n        case DXGI_FORMAT_B8G8R8X8_UNORM:        memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_X8R8G8B8, sizeof(DDS_PIXELFORMAT) ); break; // DXGI 1.1\n        case DXGI_FORMAT_B4G4R4A4_UNORM:        memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_A4R4G4B4, sizeof(DDS_PIXELFORMAT) ); break; // DXGI 1.2\n        case DXGI_FORMAT_YUY2:                  memcpy_s( &ddpf, sizeof(ddpf), &DDSPF_YUY2, sizeof(DDS_PIXELFORMAT) ); break; // DXGI 1.2\n\n        // Legacy D3DX formats using D3DFMT enum value as FourCC\n        case DXGI_FORMAT_R32G32B32A32_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 116;  // D3DFMT_A32B32G32R32F\n            break;\n        case DXGI_FORMAT_R16G16B16A16_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 113;  // D3DFMT_A16B16G16R16F\n            break;\n        case DXGI_FORMAT_R16G16B16A16_UNORM:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 36;  // D3DFMT_A16B16G16R16\n            break;\n        case DXGI_FORMAT_R16G16B16A16_SNORM:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 110;  // D3DFMT_Q16W16V16U16\n            break;\n        case DXGI_FORMAT_R32G32_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 115;  // D3DFMT_G32R32F\n            break;\n       case DXGI_FORMAT_R16G16_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 112;  // D3DFMT_G16R16F\n            break;\n        case DXGI_FORMAT_R32_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 114;  // D3DFMT_R32F\n            break;\n        case DXGI_FORMAT_R16_FLOAT:\n            ddpf.dwSize = sizeof(DDS_PIXELFORMAT); ddpf.dwFlags = DDS_FOURCC; ddpf.dwFourCC = 111;  // D3DFMT_R16F\n            break;\n        }\n    }\n\n    required = sizeof(uint32_t) + sizeof(DDS_HEADER);\n\n    if ( ddpf.dwSize == 0 )\n        required += sizeof(DDS_HEADER_DXT10);\n\n    if ( !pDestination )\n        return S_OK;\n\n    if ( maxsize < required )\n        return E_NOT_SUFFICIENT_BUFFER;\n\n    *reinterpret_cast<uint32_t*>(pDestination) = DDS_MAGIC;\n\n    auto header = reinterpret_cast<DDS_HEADER*>( reinterpret_cast<uint8_t*>(pDestination) + sizeof(uint32_t) );\n    assert( header );\n\n    memset( header, 0, sizeof(DDS_HEADER ) );\n    header->dwSize = sizeof( DDS_HEADER );\n    header->dwFlags = DDS_HEADER_FLAGS_TEXTURE;\n    header->dwCaps = DDS_SURFACE_FLAGS_TEXTURE;\n\n    if (metadata.mipLevels > 0)\n    {\n        header->dwFlags |= DDS_HEADER_FLAGS_MIPMAP;\n\n#ifdef _M_X64\n        if ( metadata.mipLevels > 0xFFFFFFFF )\n            return E_INVALIDARG;\n#endif\n\n        header->dwMipMapCount = static_cast<uint32_t>( metadata.mipLevels );\n\n        if ( header->dwMipMapCount > 1 )\n            header->dwCaps |= DDS_SURFACE_FLAGS_MIPMAP;\n    }\n\n    switch( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n#ifdef _M_X64\n        if ( metadata.width > 0xFFFFFFFF )\n            return E_INVALIDARG;\n#endif\n\n        header->dwWidth = static_cast<uint32_t>( metadata.width ); \n        header->dwHeight = header->dwDepth = 1;\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n#ifdef _M_X64\n        if ( metadata.height > 0xFFFFFFFF\n             || metadata.width > 0xFFFFFFFF)\n            return E_INVALIDARG;\n#endif\n\n        header->dwHeight = static_cast<uint32_t>( metadata.height ); \n        header->dwWidth = static_cast<uint32_t>( metadata.width );\n        header->dwDepth = 1;\n\n        if ( metadata.IsCubemap() )\n        {\n            header->dwCaps |= DDS_SURFACE_FLAGS_CUBEMAP;\n            header->dwCaps2 |= DDS_CUBEMAP_ALLFACES;\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n#ifdef _M_X64\n        if ( metadata.height > 0xFFFFFFFF\n             || metadata.width > 0xFFFFFFFF\n             || metadata.depth > 0xFFFFFFFF )\n            return E_INVALIDARG;\n#endif\n\n        header->dwFlags |= DDS_HEADER_FLAGS_VOLUME;\n        header->dwCaps2 |= DDS_FLAGS_VOLUME;\n        header->dwHeight = static_cast<uint32_t>( metadata.height ); \n        header->dwWidth = static_cast<uint32_t>( metadata.width );\n        header->dwDepth = static_cast<uint32_t>( metadata.depth );\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    size_t rowPitch, slicePitch;\n    ComputePitch( metadata.format, metadata.width, metadata.height, rowPitch, slicePitch, CP_FLAGS_NONE );\n\n#ifdef _M_X64\n    if ( slicePitch > 0xFFFFFFFF\n         || rowPitch > 0xFFFFFFFF )\n        return E_FAIL;\n#endif\n\n    if ( IsCompressed( metadata.format ) )\n    {\n        header->dwFlags |= DDS_HEADER_FLAGS_LINEARSIZE;\n        header->dwPitchOrLinearSize = static_cast<uint32_t>( slicePitch );\n    }\n    else\n    {\n        header->dwFlags |= DDS_HEADER_FLAGS_PITCH;\n        header->dwPitchOrLinearSize = static_cast<uint32_t>( rowPitch );\n    }\n\n    if ( ddpf.dwSize == 0 )\n    {\n        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_DX10, sizeof(DDS_PIXELFORMAT) );\n\n        auto ext = reinterpret_cast<DDS_HEADER_DXT10*>( reinterpret_cast<uint8_t*>(header) + sizeof(DDS_HEADER) );\n        assert( ext );\n\n        memset( ext, 0, sizeof(DDS_HEADER_DXT10) );\n        ext->dxgiFormat = metadata.format;\n        ext->resourceDimension = metadata.dimension;\n\n#ifdef _M_X64\n        if ( metadata.arraySize > 0xFFFFFFFF )\n            return E_INVALIDARG;\n#endif\n\n        static_assert( TEX_MISC_TEXTURECUBE == DDS_RESOURCE_MISC_TEXTURECUBE, \"DDS header mismatch\");\n        \n        ext->miscFlag = metadata.miscFlags & ~TEX_MISC_TEXTURECUBE;\n\n        if ( metadata.miscFlags & TEX_MISC_TEXTURECUBE )\n        {\n            ext->miscFlag |= TEX_MISC_TEXTURECUBE;\n            assert( (metadata.arraySize % 6) == 0 );\n            ext->arraySize = static_cast<UINT>( metadata.arraySize / 6 );\n        }\n        else\n        {\n            ext->arraySize = static_cast<UINT>( metadata.arraySize );\n        }\n\n        static_assert( TEX_MISC2_ALPHA_MODE_MASK == DDS_MISC_FLAGS2_ALPHA_MODE_MASK, \"DDS header mismatch\");\n\n        static_assert( TEX_ALPHA_MODE_UNKNOWN == DDS_ALPHA_MODE_UNKNOWN, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_STRAIGHT == DDS_ALPHA_MODE_STRAIGHT, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_PREMULTIPLIED == DDS_ALPHA_MODE_PREMULTIPLIED, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_OPAQUE == DDS_ALPHA_MODE_OPAQUE, \"DDS header mismatch\");\n        static_assert( TEX_ALPHA_MODE_CUSTOM == DDS_ALPHA_MODE_CUSTOM, \"DDS header mismatch\");\n\n        if ( flags & DDS_FLAGS_FORCE_DX10_EXT_MISC2 )\n        {\n            // This was formerly 'reserved'. D3DX10 and D3DX11 will fail if this value is anything other than 0\n            ext->miscFlags2 = metadata.miscFlags2;\n        }\n    }\n    else\n    {\n        memcpy_s( &header->ddspf, sizeof(header->ddspf), &ddpf, sizeof(ddpf) );\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts an image row with optional clearing of alpha value to 1.0\n// Returns true if supported, false if expansion case not supported\n//-------------------------------------------------------------------------------------\nenum TEXP_LEGACY_FORMAT\n{\n    TEXP_LEGACY_UNKNOWN     = 0,\n    TEXP_LEGACY_R8G8B8,\n    TEXP_LEGACY_R3G3B2,\n    TEXP_LEGACY_A8R3G3B2,\n    TEXP_LEGACY_P8,\n    TEXP_LEGACY_A8P8,\n    TEXP_LEGACY_A4L4,\n    TEXP_LEGACY_B4G4R4A4,\n    TEXP_LEGACY_L8,\n    TEXP_LEGACY_L16,\n    TEXP_LEGACY_A8L8\n};\n\ninline static TEXP_LEGACY_FORMAT _FindLegacyFormat( DWORD flags )\n{\n    TEXP_LEGACY_FORMAT lformat = TEXP_LEGACY_UNKNOWN;\n\n    if ( flags & CONV_FLAGS_PAL8 )\n    {\n        lformat = ( flags & CONV_FLAGS_A8P8 ) ? TEXP_LEGACY_A8P8 : TEXP_LEGACY_P8;\n    }\n    else if ( flags & CONV_FLAGS_888 )\n        lformat = TEXP_LEGACY_R8G8B8;\n    else if ( flags & CONV_FLAGS_332 )\n        lformat = TEXP_LEGACY_R3G3B2;\n    else if ( flags & CONV_FLAGS_8332 )\n        lformat = TEXP_LEGACY_A8R3G3B2;\n    else if ( flags & CONV_FLAGS_44 )\n        lformat = TEXP_LEGACY_A4L4;\n    else if ( flags & CONV_FLAGS_4444 )\n        lformat = TEXP_LEGACY_B4G4R4A4;\n    else if ( flags & CONV_FLAGS_L8 )\n        lformat = TEXP_LEGACY_L8;\n    else if ( flags & CONV_FLAGS_L16 )\n        lformat = TEXP_LEGACY_L16;\n    else if ( flags & CONV_FLAGS_A8L8 )\n        lformat = TEXP_LEGACY_A8L8;\n\n    return lformat;\n}\n\n_Success_(return != false)\nstatic bool _LegacyExpandScanline( _Out_writes_bytes_(outSize) LPVOID pDestination, size_t outSize, _In_ DXGI_FORMAT outFormat, \n                                   _In_reads_bytes_(inSize) LPCVOID pSource, size_t inSize, _In_ TEXP_LEGACY_FORMAT inFormat,\n                                   _In_reads_opt_(256) const uint32_t* pal8, _In_ DWORD flags )\n{\n    assert( pDestination && outSize > 0 );\n    assert( pSource && inSize > 0 );\n    assert( IsValid(outFormat) && !IsPlanar(outFormat) && !IsPalettized(outFormat) );\n\n    switch( inFormat )\n    {\n    case TEXP_LEGACY_R8G8B8:\n        if ( outFormat != DXGI_FORMAT_R8G8B8A8_UNORM )\n            return false;\n\n        // D3DFMT_R8G8B8 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 3 && outSize >= 4 )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 2 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 3, ocount += 4 )\n            {\n                // 24bpp Direct3D 9 files are actually BGR, so need to swizzle as well\n                uint32_t t1 = ( *(sPtr) << 16 );\n                uint32_t t2 = ( *(sPtr+1) << 8 ); \n                uint32_t t3 = *(sPtr+2);\n\n                *(dPtr++) = t1 | t2 | t3 | 0xff000000;\n                sPtr += 3;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_R3G3B2:\n        switch( outFormat )\n        {\n        case DXGI_FORMAT_R8G8B8A8_UNORM:\n            // D3DFMT_R3G3B2 -> DXGI_FORMAT_R8G8B8A8_UNORM\n            if ( inSize >= 1 && outSize >= 4 )\n            {\n                const uint8_t* __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n                uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n                for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 3 ) ) ); ++icount, ocount += 4 )\n                {\n                    uint8_t t = *(sPtr++);\n\n                    uint32_t t1 = (t & 0xe0) | ((t & 0xe0) >> 3) | ((t & 0xc0) >> 6);\n                    uint32_t t2 = ((t & 0x1c) << 11) | ((t & 0x1c) << 8) | ((t & 0x18) << 5);\n                    uint32_t t3 = ((t & 0x03) << 22) | ((t & 0x03) << 20) | ((t & 0x03) << 18) | ((t & 0x03) << 16);\n\n                    *(dPtr++) = t1 | t2 | t3 | 0xff000000;\n                }\n                return true;\n            }\n            return false;\n\n        case DXGI_FORMAT_B5G6R5_UNORM:\n            // D3DFMT_R3G3B2 -> DXGI_FORMAT_B5G6R5_UNORM\n            if ( inSize >= 1 && outSize >= 2 )\n            {\n                const uint8_t* __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n                uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n\n                for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 1 ) ) ); ++icount, ocount += 2 )\n                {\n                    uint8_t t = *(sPtr++);\n\n                    uint16_t t1 = ((t & 0xe0) << 8) | ((t & 0xc0) << 5);\n                    uint16_t t2 = ((t & 0x1c) << 6) | ((t & 0x1c) << 3);\n                    uint16_t t3 = ((t & 0x03) << 3) | ((t & 0x03) << 1) | ((t & 0x02) >> 1);\n\n                    *(dPtr++) = t1 | t2 | t3;\n                }\n                return true;\n            }\n            return false;\n        }\n        break;\n\n    case TEXP_LEGACY_A8R3G3B2:\n        if ( outFormat != DXGI_FORMAT_R8G8B8A8_UNORM )\n            return false;\n\n        // D3DFMT_A8R3G3B2 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t* __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = (t & 0x00e0) | ((t & 0x00e0) >> 3) | ((t & 0x00c0) >> 6);\n                uint32_t t2 = ((t & 0x001c) << 11) | ((t & 0x001c) << 8) | ((t & 0x0018) << 5);\n                uint32_t t3 = ((t & 0x0003) << 22) | ((t & 0x0003) << 20) | ((t & 0x0003) << 18) | ((t & 0x0003) << 16);\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : ((t & 0xff00) << 16);\n\n                *(dPtr++) = t1 | t2 | t3 | ta;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_P8:\n        if ( (outFormat != DXGI_FORMAT_R8G8B8A8_UNORM) || !pal8 )\n            return false;\n\n        // D3DFMT_P8 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 1 && outSize >= 4 )\n        {\n            const uint8_t* __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 3 ) ) ); ++icount, ocount += 4 )\n            {\n                uint8_t t = *(sPtr++);\n\n                *(dPtr++) = pal8[ t ];\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_A8P8:\n        if ( (outFormat != DXGI_FORMAT_R8G8B8A8_UNORM) || !pal8 )\n            return false;\n\n        // D3DFMT_A8P8 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t* __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = pal8[ t & 0xff ];\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : ((t & 0xff00) << 16);\n\n                *(dPtr++) = t1 | ta;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_A4L4:\n        switch( outFormat )\n        {\n        case DXGI_FORMAT_B4G4R4A4_UNORM :\n            // D3DFMT_A4L4 -> DXGI_FORMAT_B4G4R4A4_UNORM \n            if ( inSize >= 1 && outSize >= 2 )\n            {\n                const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n                uint16_t * __restrict dPtr = reinterpret_cast<uint16_t*>(pDestination);\n\n                for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 1 ) ) ); ++icount, ocount += 2 )\n                {\n                    uint8_t t = *(sPtr++);\n\n                    uint16_t t1 = (t & 0x0f);\n                    uint16_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xf000 : ((t & 0xf0) << 8);\n\n                    *(dPtr++) = t1 | (t1 << 4) | (t1 << 8) | ta;\n                }\n                return true;\n            }\n            return false;\n\n        case DXGI_FORMAT_R8G8B8A8_UNORM:\n            // D3DFMT_A4L4 -> DXGI_FORMAT_R8G8B8A8_UNORM\n            if ( inSize >= 1 && outSize >= 4 )\n            {\n                const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n                uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n                for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 3 ) ) ); ++icount, ocount += 4 )\n                {\n                    uint8_t t = *(sPtr++);\n\n                    uint32_t t1 = ((t & 0x0f) << 4) | (t & 0x0f);\n                    uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : (((t & 0xf0) << 24) | ((t & 0xf0) << 20));\n\n                    *(dPtr++) = t1 | (t1 << 8) | (t1 << 16) | ta;\n                }\n                return true;\n            }\n            return false;\n        }\n        break;\n\n    case TEXP_LEGACY_B4G4R4A4:\n        if (outFormat != DXGI_FORMAT_R8G8B8A8_UNORM)\n            return false;\n\n        // D3DFMT_A4R4G4B4 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t * __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = ((t & 0x0f00) >> 4) | ((t & 0x0f00) >> 8);\n                uint32_t t2 = ((t & 0x00f0) << 8) | ((t & 0x00f0) << 4);\n                uint32_t t3 = ((t & 0x000f) << 20) | ((t & 0x000f) << 16);\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : (((t & 0xf000) << 16) | ((t & 0xf000) << 12));\n\n                *(dPtr++) = t1 | t2 | t3 | ta;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_L8:\n        if (outFormat != DXGI_FORMAT_R8G8B8A8_UNORM)\n            return false;\n\n        // D3DFMT_L8 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 1 && outSize >= 4 )\n        {\n            const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < inSize ) && ( ocount < ( outSize - 3 ) ) ); ++icount, ocount += 4 )\n            {\n                uint32_t t1 = *(sPtr++);\n                uint32_t t2 = (t1 << 8);\n                uint32_t t3 = (t1 << 16);\n\n                *(dPtr++) = t1 | t2 | t3 | 0xff000000;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_L16:\n        if (outFormat != DXGI_FORMAT_R16G16B16A16_UNORM)\n            return false;\n\n        // D3DFMT_L16 -> DXGI_FORMAT_R16G16B16A16_UNORM\n        if ( inSize >= 2 && outSize >= 8 )\n        {\n            const uint16_t* __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint64_t * __restrict dPtr = reinterpret_cast<uint64_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 7 ) ) ); icount += 2, ocount += 8 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint64_t t1 = t;\n                uint64_t t2 = (t1 << 16);\n                uint64_t t3 = (t1 << 32);\n\n                *(dPtr++) = t1 | t2 | t3 | 0xffff000000000000;\n            }\n            return true;\n        }\n        return false;\n\n    case TEXP_LEGACY_A8L8:\n        if (outFormat != DXGI_FORMAT_R8G8B8A8_UNORM)\n            return false;\n\n        // D3DFMT_A8L8 -> DXGI_FORMAT_R8G8B8A8_UNORM\n        if ( inSize >= 2 && outSize >= 4 )\n        {\n            const uint16_t* __restrict sPtr = reinterpret_cast<const uint16_t*>(pSource);\n            uint32_t * __restrict dPtr = reinterpret_cast<uint32_t*>(pDestination);\n\n            for( size_t ocount = 0, icount = 0; ( ( icount < ( inSize - 1 ) ) && ( ocount < ( outSize - 3 ) ) ); icount += 2, ocount += 4 )\n            {\n                uint16_t t = *(sPtr++);\n\n                uint32_t t1 = (t & 0xff);\n                uint32_t t2 = (t1 << 8);\n                uint32_t t3 = (t1 << 16);\n                uint32_t ta = ( flags & TEXP_SCANLINE_SETALPHA ) ? 0xff000000 : ((t & 0xff00) << 16);\n\n                *(dPtr++) = t1 | t2 | t3 | ta;\n            }\n            return true;\n        }\n        return false;\n    }\n\n    return false;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts or copies image data from pPixels into scratch image data\n//-------------------------------------------------------------------------------------\nstatic HRESULT _CopyImage( _In_reads_bytes_(size) const void* pPixels, _In_ size_t size, \n                           _In_ const TexMetadata& metadata, _In_ DWORD cpFlags, _In_ DWORD convFlags, _In_reads_opt_(256) const uint32_t *pal8, _In_ const ScratchImage& image )\n{\n    assert( pPixels );\n    assert( image.GetPixels() );\n\n    if ( !size )\n        return E_FAIL;\n     \n    if ( convFlags & CONV_FLAGS_EXPAND )\n    {\n        if ( convFlags & CONV_FLAGS_888 )\n            cpFlags |= CP_FLAGS_24BPP;\n        else if ( convFlags & (CONV_FLAGS_565 | CONV_FLAGS_5551 | CONV_FLAGS_4444 | CONV_FLAGS_8332 | CONV_FLAGS_A8P8 | CONV_FLAGS_L16 | CONV_FLAGS_A8L8) )\n            cpFlags |= CP_FLAGS_16BPP;\n        else if ( convFlags & (CONV_FLAGS_44 | CONV_FLAGS_332 | CONV_FLAGS_PAL8 | CONV_FLAGS_L8) )\n            cpFlags |= CP_FLAGS_8BPP;\n    }\n\n    size_t pixelSize, nimages;\n    _DetermineImageArray( metadata, cpFlags, nimages, pixelSize );\n    if ( (nimages == 0) || (nimages != image.GetImageCount()) )\n    {\n        return E_FAIL;\n    }\n\n    assert( pixelSize <= size );\n\n    std::unique_ptr<Image[]> timages( new (std::nothrow) Image[nimages] );\n    if ( !timages )\n    {\n        return E_OUTOFMEMORY;\n    }\n\n    if ( !_SetupImageArray( (uint8_t*)pPixels, size, metadata, cpFlags, timages.get(), nimages ) )\n    {\n        return E_FAIL;\n    }\n\n    if ( nimages != image.GetImageCount() )\n    {\n        return E_FAIL;\n    }\n\n    const Image* images = image.GetImages();\n    if ( !images )\n    {\n        return E_FAIL;\n    }\n\n    DWORD tflags = (convFlags & CONV_FLAGS_NOALPHA) ? TEXP_SCANLINE_SETALPHA : 0;\n    if ( convFlags & CONV_FLAGS_SWIZZLE )\n        tflags |= TEXP_SCANLINE_LEGACY;\n\n    switch (metadata.dimension)\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        {\n            size_t index = 0;\n            for( size_t item = 0; item < metadata.arraySize; ++item )\n            {\n                for( size_t level = 0; level < metadata.mipLevels; ++level, ++index )\n                {\n                    if ( index >= nimages )\n                        return E_FAIL;\n\n                    if ( images[ index ].height != timages[ index ].height )\n                        return E_FAIL;\n\n                    size_t dpitch = images[ index ].rowPitch;\n                    size_t spitch = timages[ index ].rowPitch;\n\n                    const uint8_t *pSrc = const_cast<const uint8_t*>( timages[ index ].pixels );\n                    if ( !pSrc )\n                        return E_POINTER;\n\n                    uint8_t *pDest = images[ index ].pixels;\n                    if ( !pDest )\n                        return E_POINTER;\n\n                    if ( IsCompressed( metadata.format ) )\n                    {\n                        size_t csize = std::min<size_t>( images[ index ].slicePitch, timages[ index ].slicePitch );\n                        memcpy_s( pDest, images[ index ].slicePitch, pSrc, csize );\n                    }\n                    else if ( IsPlanar( metadata.format ) )\n                    {\n                        size_t count = ComputeScanlines( metadata.format, images[ index ].height );\n                        if ( !count )\n                            return E_UNEXPECTED;\n\n                        size_t csize = std::min<size_t>( dpitch, spitch );\n                        for( size_t h = 0; h < count; ++h )\n                        {\n                            memcpy_s( pDest, dpitch, pSrc, csize );\n                            pSrc += spitch;\n                            pDest += dpitch;\n                        }\n                    }\n                    else\n                    {\n                        for( size_t h = 0; h < images[ index ].height; ++h )\n                        {\n                            if ( convFlags & CONV_FLAGS_EXPAND )\n                            {\n                                if ( convFlags & (CONV_FLAGS_565|CONV_FLAGS_5551|CONV_FLAGS_4444) )\n                                {\n                                    if ( !_ExpandScanline( pDest, dpitch, DXGI_FORMAT_R8G8B8A8_UNORM,\n                                                           pSrc, spitch,\n                                                           (convFlags & CONV_FLAGS_565) ? DXGI_FORMAT_B5G6R5_UNORM : DXGI_FORMAT_B5G5R5A1_UNORM,\n                                                           tflags ) )\n                                        return E_FAIL;\n                                }\n                                else\n                                {\n                                    TEXP_LEGACY_FORMAT lformat = _FindLegacyFormat( convFlags );\n                                    if ( !_LegacyExpandScanline( pDest, dpitch, metadata.format,\n                                                                 pSrc, spitch, lformat, pal8,\n                                                                 tflags ) )\n                                        return E_FAIL;\n                                }\n                            }\n                            else if ( convFlags & CONV_FLAGS_SWIZZLE )\n                            {\n                                _SwizzleScanline( pDest, dpitch, pSrc, spitch,\n                                                  metadata.format, tflags );\n                            }\n                            else\n                            {\n                                _CopyScanline( pDest, dpitch, pSrc, spitch,\n                                               metadata.format, tflags );\n                            }\n\n                            pSrc += spitch;\n                            pDest += dpitch;\n                        }\n                    }\n                }\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            size_t index = 0;\n            size_t d = metadata.depth;\n\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                for( size_t slice = 0; slice < d; ++slice, ++index )\n                {\n                    if ( index >= nimages )\n                        return E_FAIL;\n\n                    if ( images[ index ].height != timages[ index ].height )\n                        return E_FAIL;\n\n                    size_t dpitch = images[ index ].rowPitch;\n                    size_t spitch = timages[ index ].rowPitch;\n\n                    const uint8_t *pSrc = const_cast<const uint8_t*>( timages[ index ].pixels );\n                    if ( !pSrc )\n                        return E_POINTER;\n\n                    uint8_t *pDest = images[ index ].pixels;\n                    if ( !pDest )\n                        return E_POINTER;\n\n                    if ( IsCompressed( metadata.format ) )\n                    {\n                        size_t csize = std::min<size_t>( images[ index ].slicePitch, timages[ index ].slicePitch );\n                        memcpy_s( pDest, images[ index ].slicePitch, pSrc, csize );\n                    }\n                    else if ( IsPlanar( metadata.format ) )\n                    {\n                        // Direct3D does not support any planar formats for Texture3D\n                        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n                    }\n                    else\n                    {\n                        for( size_t h = 0; h < images[ index ].height; ++h )\n                        {\n                            if ( convFlags & CONV_FLAGS_EXPAND )\n                            {\n                                if ( convFlags & (CONV_FLAGS_565|CONV_FLAGS_5551|CONV_FLAGS_4444) )\n                                {\n                                    if ( !_ExpandScanline( pDest, dpitch, DXGI_FORMAT_R8G8B8A8_UNORM,\n                                                           pSrc, spitch,\n                                                           (convFlags & CONV_FLAGS_565) ? DXGI_FORMAT_B5G6R5_UNORM : DXGI_FORMAT_B5G5R5A1_UNORM,\n                                                           tflags ) )\n                                        return E_FAIL;\n                                }\n                                else\n                                {\n                                    TEXP_LEGACY_FORMAT lformat = _FindLegacyFormat( convFlags );\n                                    if ( !_LegacyExpandScanline( pDest, dpitch, metadata.format,\n                                                                 pSrc, spitch, lformat, pal8,\n                                                                 tflags ) )\n                                        return E_FAIL;\n                                }\n                            }\n                            else if ( convFlags & CONV_FLAGS_SWIZZLE )\n                            {\n                                _SwizzleScanline( pDest, dpitch, pSrc, spitch, metadata.format, tflags );\n                            }\n                            else\n                            {\n                                _CopyScanline( pDest, dpitch, pSrc, spitch, metadata.format, tflags );\n                            }\n\n                            pSrc += spitch;\n                            pDest += dpitch;\n                        }\n                    }\n                }\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\nstatic HRESULT _CopyImageInPlace( DWORD convFlags, _In_ const ScratchImage& image )\n{\n    if ( !image.GetPixels() )\n        return E_FAIL;\n\n    const Image* images = image.GetImages();\n    if ( !images )\n        return E_FAIL;\n\n    const TexMetadata& metadata = image.GetMetadata();\n\n    if ( IsPlanar( metadata.format ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    DWORD tflags = (convFlags & CONV_FLAGS_NOALPHA) ? TEXP_SCANLINE_SETALPHA : 0;\n    if ( convFlags & CONV_FLAGS_SWIZZLE )\n        tflags |= TEXP_SCANLINE_LEGACY;\n\n    for( size_t i = 0; i < image.GetImageCount(); ++i )\n    {\n        const Image* img = &images[ i ];\n        uint8_t *pPixels = img->pixels;\n        if ( !pPixels )\n            return E_POINTER;\n\n        size_t rowPitch = img->rowPitch;\n\n        for( size_t h = 0; h < img->height; ++h )\n        {\n            if ( convFlags & CONV_FLAGS_SWIZZLE )\n            {\n                _SwizzleScanline( pPixels, rowPitch, pPixels, rowPitch, metadata.format, tflags );\n            }\n            else\n            {\n                _CopyScanline( pPixels, rowPitch, pPixels, rowPitch, metadata.format, tflags );\n            }\n\n            pPixels += rowPitch;\n        }\n    }\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Obtain metadata from DDS file in memory/on disk\n//-------------------------------------------------------------------------------------\n\n_Use_decl_annotations_\nHRESULT GetMetadataFromDDSMemory( LPCVOID pSource, size_t size, DWORD flags, TexMetadata& metadata )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n    DWORD convFlags = 0;\n    return _DecodeDDSHeader( pSource, size, flags, metadata, convFlags );\n}\n\n_Use_decl_annotations_\nHRESULT GetMetadataFromDDSFile( LPCWSTR szFile, DWORD flags, TexMetadata& metadata )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( szFile, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( szFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING,\n                                                  FILE_FLAG_SEQUENTIAL_SCAN, 0 ) ) );\n#endif\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Get the file size\n    LARGE_INTEGER fileSize = {0};\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)\n    FILE_STANDARD_INFO fileInfo;\n    if ( !GetFileInformationByHandleEx( hFile.get(), FileStandardInfo, &fileInfo, sizeof(fileInfo) ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n    fileSize = fileInfo.EndOfFile;\n#else\n    if ( !GetFileSizeEx( hFile.get(), &fileSize ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n#endif\n\n    // File is too big for 32-bit allocation, so reject read (4 GB should be plenty large enough for a valid DDS file)\n    if ( fileSize.HighPart > 0 )\n    {\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n    }\n\n    // Need at least enough data to fill the standard header and magic number to be a valid DDS\n    if ( fileSize.LowPart < ( sizeof(DDS_HEADER) + sizeof(uint32_t) ) )\n    {\n        return E_FAIL;\n    }\n\n    // Read the header in (including extended header if present)\n    const size_t MAX_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10);\n    uint8_t header[MAX_HEADER_SIZE];\n\n    DWORD bytesRead = 0;\n    if ( !ReadFile( hFile.get(), header, MAX_HEADER_SIZE, &bytesRead, 0 ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    DWORD convFlags = 0;\n    return _DecodeDDSHeader( header, bytesRead, flags, metadata, convFlags );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a DDS file in memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromDDSMemory( LPCVOID pSource, size_t size, DWORD flags, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n    image.Release();\n\n    DWORD convFlags = 0;\n    TexMetadata mdata;\n    HRESULT hr = _DecodeDDSHeader( pSource, size, flags, mdata, convFlags );  \n    if ( FAILED(hr) )\n        return hr;\n\n    size_t offset = sizeof(uint32_t) + sizeof(DDS_HEADER);\n    if ( convFlags & CONV_FLAGS_DX10 )\n        offset += sizeof(DDS_HEADER_DXT10);\n\n    assert( offset <= size );\n\n    const uint32_t *pal8 = nullptr;\n    if ( convFlags & CONV_FLAGS_PAL8 )\n    {\n        pal8 = reinterpret_cast<const uint32_t*>( reinterpret_cast<const uint8_t*>(pSource) + offset );\n        assert( pal8 );\n        offset += ( 256 * sizeof(uint32_t) );\n        if ( size < offset )\n            return E_FAIL;\n    }\n\n    hr = image.Initialize( mdata );\n    if ( FAILED(hr) )\n        return hr;\n\n    auto pPixels = reinterpret_cast<LPCVOID>( reinterpret_cast<const uint8_t*>(pSource) + offset );\n    assert( pPixels );\n    hr = _CopyImage( pPixels, size - offset, mdata,\n                     (flags & DDS_FLAGS_LEGACY_DWORD) ? CP_FLAGS_LEGACY_DWORD : CP_FLAGS_NONE, convFlags, pal8, image );\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a DDS file from disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromDDSFile( LPCWSTR szFile, DWORD flags, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    image.Release();\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle ( CreateFile2( szFile, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle ( CreateFileW( szFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING,\n                                                   FILE_FLAG_SEQUENTIAL_SCAN, 0 ) ) );\n#endif\n\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Get the file size\n    LARGE_INTEGER fileSize = {0};\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)\n    FILE_STANDARD_INFO fileInfo;\n    if ( !GetFileInformationByHandleEx( hFile.get(), FileStandardInfo, &fileInfo, sizeof(fileInfo) ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n    fileSize = fileInfo.EndOfFile;\n#else\n    if ( !GetFileSizeEx( hFile.get(), &fileSize ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n#endif\n\n    // File is too big for 32-bit allocation, so reject read (4 GB should be plenty large enough for a valid DDS file)\n    if ( fileSize.HighPart > 0 )\n    {\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n    }\n\n    // Need at least enough data to fill the standard header and magic number to be a valid DDS\n    if ( fileSize.LowPart < ( sizeof(DDS_HEADER) + sizeof(uint32_t) ) )\n    {\n        return E_FAIL;\n    }\n\n    // Read the header in (including extended header if present)\n    const size_t MAX_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10);\n    uint8_t header[MAX_HEADER_SIZE];\n\n    DWORD bytesRead = 0;\n    if ( !ReadFile( hFile.get(), header, MAX_HEADER_SIZE, &bytesRead, 0 ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    DWORD convFlags = 0;\n    TexMetadata mdata;\n    HRESULT hr = _DecodeDDSHeader( header, bytesRead, flags, mdata, convFlags );\n    if ( FAILED(hr) )\n        return hr;\n\n    DWORD offset = MAX_HEADER_SIZE;\n\n    if ( !(convFlags & CONV_FLAGS_DX10) )\n    {\n        // Must reset file position since we read more than the standard header above\n        LARGE_INTEGER filePos = { sizeof(uint32_t) + sizeof(DDS_HEADER), 0};\n        if ( !SetFilePointerEx( hFile.get(), filePos, 0, FILE_BEGIN ) )\n        {\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        offset = sizeof(uint32_t) + sizeof(DDS_HEADER);\n    }\n\n    std::unique_ptr<uint32_t[]> pal8;\n    if ( convFlags & CONV_FLAGS_PAL8 )\n    {\n        pal8.reset( new (std::nothrow) uint32_t[256] );\n        if ( !pal8 )\n        {\n            return E_OUTOFMEMORY;\n        }\n\n        if ( !ReadFile( hFile.get(), pal8.get(), 256 * sizeof(uint32_t), &bytesRead, 0 ) )\n        {\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesRead != (256 * sizeof(uint32_t)) )\n        {\n            return E_FAIL;\n        }\n\n        offset += ( 256 * sizeof(uint32_t) );\n    }\n\n    DWORD remaining = fileSize.LowPart - offset;\n    if ( remaining == 0 )\n        return E_FAIL;\n\n    hr = image.Initialize( mdata );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( (convFlags & CONV_FLAGS_EXPAND) || (flags & DDS_FLAGS_LEGACY_DWORD) )\n    {\n        std::unique_ptr<uint8_t[]> temp( new (std::nothrow) uint8_t[ remaining ] );\n        if ( !temp )\n        {\n            image.Release();\n            return E_OUTOFMEMORY;\n        }\n\n        if ( !ReadFile( hFile.get(), temp.get(), remaining, &bytesRead, 0 ) )\n        {\n            image.Release();\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesRead != remaining )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        hr = _CopyImage( temp.get(), remaining, mdata,\n                         (flags & DDS_FLAGS_LEGACY_DWORD) ? CP_FLAGS_LEGACY_DWORD : CP_FLAGS_NONE,\n                         convFlags, pal8.get(), image );\n        if ( FAILED(hr) )\n        {\n            image.Release();\n            return hr;\n        }\n    }\n    else\n    {\n        if ( remaining < image.GetPixelsSize() )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        if ( !ReadFile( hFile.get(), image.GetPixels(), static_cast<DWORD>( image.GetPixelsSize() ), &bytesRead, 0 ) )\n        {\n            image.Release();\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( convFlags & (CONV_FLAGS_SWIZZLE|CONV_FLAGS_NOALPHA) )\n        {\n            // Swizzle/copy image in place\n            hr = _CopyImageInPlace( convFlags, image );\n            if ( FAILED(hr) )\n            {\n                image.Release();\n                return hr;\n            }\n        }\n    }\n\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a DDS file to memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToDDSMemory( const Image* images, size_t nimages, const TexMetadata& metadata, DWORD flags, Blob& blob )\n{\n    if ( !images || (nimages == 0) )\n        return E_INVALIDARG;\n\n    // Determine memory required\n    size_t required = 0;\n    HRESULT hr = _EncodeDDSHeader( metadata, flags, 0, 0, required );\n    if ( FAILED(hr) )\n        return hr;\n\n    bool fastpath = true;\n\n    for( size_t i = 0; i < nimages; ++i )\n    {\n        if ( !images[ i ].pixels )\n            return E_POINTER;\n\n        if ( images[ i ].format != metadata.format )\n            return E_FAIL;\n\n        size_t ddsRowPitch, ddsSlicePitch;\n        ComputePitch( metadata.format, images[ i ].width, images[ i ].height, ddsRowPitch, ddsSlicePitch, CP_FLAGS_NONE );\n\n        assert( images[ i ].rowPitch > 0 );\n        assert( images[ i ].slicePitch > 0 );\n\n        if ( ( images[ i ].rowPitch != ddsRowPitch ) || ( images[ i ].slicePitch != ddsSlicePitch ) )\n        {\n            fastpath = false;\n        }\n\n        required += ddsSlicePitch;\n    }\n\n    assert( required > 0 );\n\n    blob.Release();\n\n    hr = blob.Initialize( required );\n    if ( FAILED(hr) )\n        return hr;\n\n    auto pDestination = reinterpret_cast<uint8_t*>( blob.GetBufferPointer() );\n    assert( pDestination );\n\n    hr = _EncodeDDSHeader( metadata, flags, pDestination, blob.GetBufferSize(), required );\n    if ( FAILED(hr) )\n    {\n        blob.Release();\n        return hr;\n    }\n\n    size_t remaining = blob.GetBufferSize() - required;\n    pDestination += required;\n\n    if ( !remaining )\n    {\n        blob.Release();\n        return E_FAIL;\n    }\n\n    switch( metadata.dimension )\n    {\n    case DDS_DIMENSION_TEXTURE1D:\n    case DDS_DIMENSION_TEXTURE2D:\n        {\n            size_t index = 0;\n            for( size_t item = 0; item < metadata.arraySize; ++item )\n            {\n                for( size_t level = 0; level < metadata.mipLevels; ++level )\n                {\n                    if ( index >= nimages )\n                    {\n                        blob.Release();\n                        return E_FAIL;\n                    }\n\n                    if ( fastpath )\n                    {\n                        size_t pixsize = images[ index ].slicePitch;\n                        if ( memcpy_s( pDestination, remaining, images[ index ].pixels, pixsize ) )\n                        {\n                            blob.Release();\n                            return E_FAIL;\n                        }\n\n                        pDestination += pixsize;\n                        remaining -= pixsize;\n                    }\n                    else\n                    {\n                        size_t ddsRowPitch, ddsSlicePitch;\n                        ComputePitch( metadata.format, images[ index ].width, images[ index ].height, ddsRowPitch, ddsSlicePitch, CP_FLAGS_NONE );\n\n                        size_t rowPitch = images[ index ].rowPitch;\n\n                        const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(images[ index ].pixels);\n                        uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n\n                        size_t lines = ComputeScanlines( metadata.format, images[ index ].height );\n                        size_t csize = std::min<size_t>( rowPitch, ddsRowPitch );\n                        size_t tremaining = remaining;\n                        for( size_t j = 0; j < lines; ++j )\n                        {\n                            if ( memcpy_s( dPtr, tremaining, sPtr, csize ) )\n                            {\n                                blob.Release();\n                                return E_FAIL;\n                            }\n\n                            sPtr += rowPitch;\n                            dPtr += ddsRowPitch;\n                            tremaining -= ddsRowPitch;\n                        }\n\n                        pDestination += ddsSlicePitch;\n                        remaining -= ddsSlicePitch;\n                    }\n\n                    ++index;\n                }\n            }\n        }\n        break;\n\n    case DDS_DIMENSION_TEXTURE3D:\n        {\n            if ( metadata.arraySize != 1 )\n            {\n                blob.Release();\n                return E_FAIL;\n            }\n\n            size_t d = metadata.depth;\n\n            size_t index = 0;\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                for( size_t slice = 0; slice < d; ++slice )\n                {\n                    if ( index >= nimages )\n                    {\n                        blob.Release();\n                        return E_FAIL;\n                    }\n\n                    if ( fastpath )\n                    {\n                        size_t pixsize = images[ index ].slicePitch;\n                        if ( memcpy_s( pDestination, remaining, images[ index ].pixels, pixsize ) )\n                        {\n                            blob.Release();\n                            return E_FAIL;\n                        }\n\n                        pDestination += pixsize;\n                        remaining -= pixsize;\n                    }\n                    else\n                    {\n                        size_t ddsRowPitch, ddsSlicePitch;\n                        ComputePitch( metadata.format, images[ index ].width, images[ index ].height, ddsRowPitch, ddsSlicePitch, CP_FLAGS_NONE );\n\n                        size_t rowPitch = images[ index ].rowPitch;\n\n                        const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(images[ index ].pixels);\n                        uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n\n                        size_t lines = ComputeScanlines( metadata.format, images[ index ].height );\n                        size_t csize = std::min<size_t>( rowPitch, ddsRowPitch );\n                        size_t tremaining = remaining;\n                        for( size_t j = 0; j < lines; ++j )\n                        {\n                            if ( memcpy_s( dPtr, tremaining, sPtr, csize ) )\n                            {\n                                blob.Release();\n                                return E_FAIL;\n                            }\n\n                            sPtr += rowPitch;\n                            dPtr += ddsRowPitch;\n                            tremaining -= ddsRowPitch;\n                        }\n\n                        pDestination += ddsSlicePitch;\n                        remaining -= ddsSlicePitch;\n                    }\n\n                    ++index;\n                }\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        blob.Release();\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a DDS file to disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToDDSFile( const Image* images, size_t nimages, const TexMetadata& metadata, DWORD flags, LPCWSTR szFile )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    // Create DDS Header\n    const size_t MAX_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10);\n    uint8_t header[MAX_HEADER_SIZE];\n    size_t required;\n    HRESULT hr = _EncodeDDSHeader( metadata, flags, header, MAX_HEADER_SIZE, required );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Create file and write header\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( szFile, GENERIC_WRITE, 0, CREATE_ALWAYS, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( szFile, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0 ) ) );\n#endif\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    DWORD bytesWritten;\n    if ( !WriteFile( hFile.get(), header, static_cast<DWORD>( required ), &bytesWritten, 0 ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    if ( bytesWritten != required )\n    {\n        return E_FAIL;\n    }\n\n    // Write images\n    switch( metadata.dimension )\n    {\n    case DDS_DIMENSION_TEXTURE1D:\n    case DDS_DIMENSION_TEXTURE2D:\n        {\n            size_t index = 0;\n            for( size_t item = 0; item < metadata.arraySize; ++item )\n            {\n                for( size_t level = 0; level < metadata.mipLevels; ++level, ++index )\n                {\n                    if ( index >= nimages )\n                        return E_FAIL;\n\n                    if ( !images[ index ].pixels )\n                        return E_POINTER;\n\n                    assert( images[ index ].rowPitch > 0 );\n                    assert( images[ index ].slicePitch > 0 );\n\n                    size_t ddsRowPitch, ddsSlicePitch;\n                    ComputePitch( metadata.format, images[ index ].width, images[ index ].height, ddsRowPitch, ddsSlicePitch, CP_FLAGS_NONE );\n\n                    if ( images[ index ].slicePitch == ddsSlicePitch )\n                    {\n                        if ( !WriteFile( hFile.get(), images[ index ].pixels, static_cast<DWORD>( ddsSlicePitch ), &bytesWritten, 0 ) )\n                        {\n                            return HRESULT_FROM_WIN32( GetLastError() );\n                        }\n\n                        if ( bytesWritten != ddsSlicePitch )\n                        {\n                            return E_FAIL;\n                        }\n                    }\n                    else\n                    {\n                        size_t rowPitch = images[ index ].rowPitch;\n                        if ( rowPitch < ddsRowPitch )\n                        {\n                            // DDS uses 1-byte alignment, so if this is happening then the input pitch isn't actually a full line of data\n                            return E_FAIL;\n                        }\n\n                        const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(images[ index ].pixels);\n\n                        size_t lines = ComputeScanlines( metadata.format, images[ index ].height );\n                        for( size_t j = 0; j < lines; ++j )\n                        {\n                            if ( !WriteFile( hFile.get(), sPtr, static_cast<DWORD>( ddsRowPitch ), &bytesWritten, 0 ) )\n                            {\n                                return HRESULT_FROM_WIN32( GetLastError() );\n                            }\n\n                            if ( bytesWritten != ddsRowPitch )\n                            {\n                                return E_FAIL;\n                            }\n\n                            sPtr += rowPitch;\n                        }\n                    }\n                }\n            }\n        }\n        break;\n\n    case DDS_DIMENSION_TEXTURE3D:\n        {\n            if ( metadata.arraySize != 1 )\n                return E_FAIL;\n\n            size_t d = metadata.depth;\n\n            size_t index = 0;\n            for( size_t level = 0; level < metadata.mipLevels; ++level )\n            {\n                for( size_t slice = 0; slice < d; ++slice, ++index )\n                {\n                    if ( index >= nimages )\n                        return E_FAIL;\n\n                    if ( !images[ index ].pixels )\n                        return E_POINTER;\n\n                    assert( images[ index ].rowPitch > 0 );\n                    assert( images[ index ].slicePitch > 0 );\n\n                    size_t ddsRowPitch, ddsSlicePitch;\n                    ComputePitch( metadata.format, images[ index ].width, images[ index ].height, ddsRowPitch, ddsSlicePitch, CP_FLAGS_NONE );\n\n                    if ( images[ index ].slicePitch == ddsSlicePitch )\n                    {\n                        if ( !WriteFile( hFile.get(), images[ index ].pixels, static_cast<DWORD>( ddsSlicePitch ), &bytesWritten, 0 ) )\n                        {\n                            return HRESULT_FROM_WIN32( GetLastError() );\n                        }\n\n                        if ( bytesWritten != ddsSlicePitch )\n                        {\n                            return E_FAIL;\n                        }\n                    }\n                    else\n                    {\n                        size_t rowPitch = images[ index ].rowPitch;\n                        if ( rowPitch < ddsRowPitch )\n                        {\n                            // DDS uses 1-byte alignment, so if this is happening then the input pitch isn't actually a full line of data\n                            return E_FAIL;\n                        }\n\n                        const uint8_t * __restrict sPtr = reinterpret_cast<const uint8_t*>(images[ index ].pixels);\n\n                        size_t lines = ComputeScanlines( metadata.format, images[ index ].height );\n                        for( size_t j = 0; j < lines; ++j )\n                        {\n                            if ( !WriteFile( hFile.get(), sPtr, static_cast<DWORD>( ddsRowPitch ), &bytesWritten, 0 ) )\n                            {\n                                return HRESULT_FROM_WIN32( GetLastError() );\n                            }\n\n                            if ( bytesWritten != ddsRowPitch )\n                            {\n                                return E_FAIL;\n                            }\n\n                            sPtr += rowPitch;\n                        }\n                    }\n                }\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexFlipRotate.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexFlipRotate.cpp\n//  \n// DirectX Texture Library - Image flip/rotate operations\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nusing Microsoft::WRL::ComPtr;\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Do flip/rotate operation using WIC\n//-------------------------------------------------------------------------------------\nstatic HRESULT _PerformFlipRotateUsingWIC( _In_ const Image& srcImage, _In_ DWORD flags,\n                                           _In_ const WICPixelFormatGUID& pfGUID, _In_ const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    assert( srcImage.format == destImage.format );\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICBitmap> source;\n    HRESULT hr = pWIC->CreateBitmapFromMemory( static_cast<UINT>( srcImage.width ), static_cast<UINT>( srcImage.height ), pfGUID,\n                                               static_cast<UINT>( srcImage.rowPitch ), static_cast<UINT>( srcImage.slicePitch ),\n                                               srcImage.pixels, source.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFlipRotator> FR;\n    hr = pWIC->CreateBitmapFlipRotator( FR.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = FR->Initialize( source.Get(), static_cast<WICBitmapTransformOptions>( flags ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    WICPixelFormatGUID pfFR;\n    hr = FR->GetPixelFormat( &pfFR );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( memcmp( &pfFR, &pfGUID, sizeof(GUID) ) != 0 )\n    {\n        // Flip/rotate should return the same format as the source...\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    UINT nwidth, nheight;\n    hr = FR->GetSize( &nwidth, &nheight );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( destImage.width != nwidth || destImage.height != nheight )\n        return E_FAIL;\n\n    hr = FR->CopyPixels( 0, static_cast<UINT>( destImage.rowPitch ), static_cast<UINT>( destImage.slicePitch ), destImage.pixels );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Do conversion, flip/rotate using WIC, conversion cycle\n//-------------------------------------------------------------------------------------\nstatic HRESULT _PerformFlipRotateViaF32( _In_ const Image& srcImage, _In_ DWORD flags, _In_ const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    assert( srcImage.format != DXGI_FORMAT_R32G32B32A32_FLOAT );\n    assert( srcImage.format == destImage.format );\n\n    ScratchImage temp;\n    HRESULT hr = _ConvertToR32G32B32A32( srcImage, temp );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *tsrc = temp.GetImage( 0, 0, 0 );\n    if ( !tsrc )\n        return E_POINTER;\n\n    ScratchImage rtemp;\n    hr = rtemp.Initialize2D( DXGI_FORMAT_R32G32B32A32_FLOAT, destImage.width, destImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *tdest = rtemp.GetImage( 0, 0, 0 );\n    if ( !tdest )\n        return E_POINTER;\n\n    hr = _PerformFlipRotateUsingWIC( *tsrc, flags, GUID_WICPixelFormat128bppRGBAFloat, *tdest );\n    if ( FAILED(hr) )\n        return hr;\n\n    temp.Release();\n\n    hr = _ConvertFromR32G32B32A32( *tdest, destImage );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Flip/rotate image\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT FlipRotate( const Image& srcImage, DWORD flags, ScratchImage& image )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    if ( !flags )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( (srcImage.width > 0xFFFFFFFF) || (srcImage.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    if ( IsCompressed( srcImage.format ) )\n    {\n        // We don't support flip/rotate operations on compressed images\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    static_assert( TEX_FR_ROTATE0 == WICBitmapTransformRotate0, \"TEX_FR_ROTATE0 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE90 == WICBitmapTransformRotate90, \"TEX_FR_ROTATE90 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE180 == WICBitmapTransformRotate180, \"TEX_FR_ROTATE180 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE270 == WICBitmapTransformRotate270, \"TEX_FR_ROTATE270 no longer matches WIC\" );\n    static_assert( TEX_FR_FLIP_HORIZONTAL == WICBitmapTransformFlipHorizontal, \"TEX_FR_FLIP_HORIZONTAL no longer matches WIC\" );\n    static_assert( TEX_FR_FLIP_VERTICAL == WICBitmapTransformFlipVertical, \"TEX_FR_FLIP_VERTICAL no longer matches WIC\" );\n\n    // Only supports 90, 180, 270, or no rotation flags... not a combination of rotation flags\n    switch ( flags & (TEX_FR_ROTATE90|TEX_FR_ROTATE180|TEX_FR_ROTATE270) )\n    {\n    case 0:\n    case TEX_FR_ROTATE90:\n    case TEX_FR_ROTATE180:\n    case TEX_FR_ROTATE270:\n        break;\n\n    default:\n        return E_INVALIDARG;\n    }\n\n    size_t nwidth = srcImage.width;\n    size_t nheight = srcImage.height;\n\n    if (flags & (TEX_FR_ROTATE90|TEX_FR_ROTATE270))\n    {\n        nwidth = srcImage.height;\n        nheight = srcImage.width;\n    }\n\n    HRESULT hr = image.Initialize2D( srcImage.format, nwidth, nheight, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n   \n    const Image *rimage = image.GetImage( 0, 0, 0 );\n    if ( !rimage )\n        return E_POINTER;\n\n    WICPixelFormatGUID pfGUID;\n    if ( _DXGIToWIC( srcImage.format, pfGUID ) )\n    {\n        // Case 1: Source format is supported by Windows Imaging Component\n        hr = _PerformFlipRotateUsingWIC( srcImage, flags, pfGUID, *rimage );\n    }\n    else\n    {\n        // Case 2: Source format is not supported by WIC, so we have to convert, flip/rotate, and convert back\n        hr = _PerformFlipRotateViaF32( srcImage, flags, *rimage );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Flip/rotate image (complex)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT FlipRotate( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                    DWORD flags, ScratchImage& result )\n{\n    if ( !srcImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( IsCompressed( metadata.format ) )\n    {\n        // We don't support flip/rotate operations on compressed images\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    static_assert( TEX_FR_ROTATE0 == WICBitmapTransformRotate0, \"TEX_FR_ROTATE0 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE90 == WICBitmapTransformRotate90, \"TEX_FR_ROTATE90 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE180 == WICBitmapTransformRotate180, \"TEX_FR_ROTATE180 no longer matches WIC\" );\n    static_assert( TEX_FR_ROTATE270 == WICBitmapTransformRotate270, \"TEX_FR_ROTATE270 no longer matches WIC\" );\n    static_assert( TEX_FR_FLIP_HORIZONTAL == WICBitmapTransformFlipHorizontal, \"TEX_FR_FLIP_HORIZONTAL no longer matches WIC\" );\n    static_assert( TEX_FR_FLIP_VERTICAL == WICBitmapTransformFlipVertical, \"TEX_FR_FLIP_VERTICAL no longer matches WIC\" );\n\n    // Only supports 90, 180, 270, or no rotation flags... not a combination of rotation flags\n    switch ( flags & (TEX_FR_ROTATE90|TEX_FR_ROTATE180|TEX_FR_ROTATE270) )\n    {\n    case 0:\n    case TEX_FR_ROTATE90:\n    case TEX_FR_ROTATE180:\n    case TEX_FR_ROTATE270:\n        break;\n\n    default:\n        return E_INVALIDARG;\n    }\n\n    TexMetadata mdata2 = metadata;\n\n    bool flipwh = false;\n    if (flags & (TEX_FR_ROTATE90|TEX_FR_ROTATE270))\n    {\n        flipwh = true;\n        mdata2.width = metadata.height;\n        mdata2.height = metadata.width;\n    }\n\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != result.GetImageCount() )\n    {\n        result.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = result.GetImages();\n    if ( !dest )\n    {\n        result.Release();\n        return E_POINTER;\n    }\n\n    WICPixelFormatGUID pfGUID;\n    bool wicpf = _DXGIToWIC( metadata.format, pfGUID );\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        const Image& src = srcImages[ index ];\n        if ( src.format != metadata.format )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n#ifdef _M_X64\n        if ( (src.width > 0xFFFFFFFF) || (src.height > 0xFFFFFFFF) )\n            return E_FAIL;\n#endif\n\n        const Image& dst = dest[ index ];\n        assert( dst.format == metadata.format );\n\n        if ( flipwh )\n        {\n            if ( src.width != dst.height || src.height != dst.width )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n        }\n        else\n        {\n            if ( src.width != dst.width || src.height != dst.height )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n        }\n\n        if (wicpf)\n        {\n            // Case 1: Source format is supported by Windows Imaging Component\n            hr = _PerformFlipRotateUsingWIC( src, flags, pfGUID, dst );\n        }\n        else\n        {\n            // Case 2: Source format is not supported by WIC, so we have to convert, flip/rotate, and convert back\n            hr = _PerformFlipRotateViaF32( src, flags, dst );\n        }\n\n        if ( FAILED(hr) )\n        {\n            result.Release();\n            return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexImage.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexImage.cpp\n//  \n// DirectX Texture Library - Image container\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nnamespace DirectX\n{\n\nextern bool _CalculateMipLevels( _In_ size_t width, _In_ size_t height, _Inout_ size_t& mipLevels );\nextern bool _CalculateMipLevels3D( _In_ size_t width, _In_ size_t height, _In_ size_t depth, _Inout_ size_t& mipLevels );\nextern bool _IsAlphaAllOpaqueBC( _In_ const Image& cImage );\n\n//-------------------------------------------------------------------------------------\n// Determines number of image array entries and pixel size\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid _DetermineImageArray( const TexMetadata& metadata, DWORD cpFlags,\n                           size_t& nImages, size_t& pixelSize )\n{\n    assert( metadata.width > 0 && metadata.height > 0 && metadata.depth > 0 );\n    assert( metadata.arraySize > 0 );\n    assert( metadata.mipLevels > 0 );\n\n    size_t _pixelSize = 0;\n    size_t _nimages = 0;\n\n    switch( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        for( size_t item = 0; item < metadata.arraySize; ++item )\n        {\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                size_t rowPitch, slicePitch;\n                ComputePitch( metadata.format, w, h, rowPitch, slicePitch, cpFlags );\n\n                _pixelSize += slicePitch;\n                ++_nimages;\n\n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n            size_t d = metadata.depth;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                size_t rowPitch, slicePitch;\n                ComputePitch( metadata.format, w, h, rowPitch, slicePitch, cpFlags );\n\n                for( size_t slice=0; slice < d; ++slice )\n                {\n                    _pixelSize += slicePitch;\n                    ++_nimages;\n                }\n\n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        break;\n\n    default:\n        assert( false );\n        break;\n    }\n\n    nImages = _nimages;\n    pixelSize = _pixelSize;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Fills in the image array entries\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nbool _SetupImageArray( uint8_t *pMemory, size_t pixelSize,\n                       const TexMetadata& metadata, DWORD cpFlags,\n                       Image* images, size_t nImages )\n{\n    assert( pMemory );\n    assert( pixelSize > 0 );\n    assert( nImages > 0 );\n\n    if ( !images )\n        return false;\n\n    size_t index = 0;\n    uint8_t* pixels = pMemory;\n    const uint8_t* pEndBits = pMemory + pixelSize;\n\n    switch( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        if (metadata.arraySize == 0 || metadata.mipLevels == 0)\n        {\n            return false;\n        }\n\n        for( size_t item = 0; item < metadata.arraySize; ++item )\n        {\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                if ( index >= nImages )\n                {\n                    return false;\n                }\n\n                size_t rowPitch, slicePitch;\n                ComputePitch( metadata.format, w, h, rowPitch, slicePitch, cpFlags );\n\n                images[index].width = w;\n                images[index].height = h;\n                images[index].format = metadata.format;\n                images[index].rowPitch = rowPitch;\n                images[index].slicePitch = slicePitch;\n                images[index].pixels = pixels;\n                ++index;\n\n                pixels += slicePitch;\n                if ( pixels > pEndBits )\n                {\n                    return false;\n                }\n            \n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n            }\n        }\n        return true;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        {\n            if (metadata.mipLevels == 0 || metadata.depth == 0)\n            {\n                return false;\n            }\n\n            size_t w = metadata.width;\n            size_t h = metadata.height;\n            size_t d = metadata.depth;\n\n            for( size_t level=0; level < metadata.mipLevels; ++level )\n            {\n                size_t rowPitch, slicePitch;\n                ComputePitch( metadata.format, w, h, rowPitch, slicePitch, cpFlags );\n\n                for( size_t slice=0; slice < d; ++slice )\n                {\n                    if ( index >= nImages )\n                    {\n                        return false;\n                    }\n\n                    // We use the same memory organization that Direct3D 11 needs for D3D11_SUBRESOURCE_DATA\n                    // with all slices of a given miplevel being continuous in memory\n                    images[index].width = w;\n                    images[index].height = h;\n                    images[index].format = metadata.format;\n                    images[index].rowPitch = rowPitch;\n                    images[index].slicePitch = slicePitch;\n                    images[index].pixels = pixels;\n                    ++index;\n\n                    pixels += slicePitch;\n                    if ( pixels > pEndBits )\n                    {\n                        return false;\n                    }\n                }\n            \n                if ( h > 1 )\n                    h >>= 1;\n\n                if ( w > 1 )\n                    w >>= 1;\n\n                if ( d > 1 )\n                    d >>= 1;\n            }\n        }\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n\n//=====================================================================================\n// ScratchImage - Bitmap image container\n//=====================================================================================\n\nScratchImage& ScratchImage::operator= (ScratchImage&& moveFrom)\n{\n    if ( this != &moveFrom )\n    {\n        Release();\n\n        _nimages = moveFrom._nimages;\n        _size = moveFrom._size;\n        _metadata = moveFrom._metadata;\n        _image = moveFrom._image;\n        _memory = moveFrom._memory;\n\n        moveFrom._nimages = 0;\n        moveFrom._size = 0;\n        moveFrom._image = nullptr;\n        moveFrom._memory = nullptr;\n    }\n    return *this;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Methods\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT ScratchImage::Initialize( const TexMetadata& mdata, DWORD flags )\n{\n    if ( !IsValid(mdata.format) )\n        return E_INVALIDARG;\n\n    if ( IsPalettized(mdata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    size_t mipLevels = mdata.mipLevels;\n\n    switch( mdata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        if ( !mdata.width || mdata.height != 1 || mdata.depth != 1 || !mdata.arraySize )\n            return E_INVALIDARG;\n\n        if ( !_CalculateMipLevels(mdata.width,1,mipLevels) )\n            return E_INVALIDARG;\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( !mdata.width || !mdata.height || mdata.depth != 1 || !mdata.arraySize )\n            return E_INVALIDARG;\n\n        if ( mdata.IsCubemap() )\n        {\n            if ( (mdata.arraySize % 6) != 0 )\n                return E_INVALIDARG;\n        }\n\n        if ( !_CalculateMipLevels(mdata.width,mdata.height,mipLevels) )\n            return E_INVALIDARG;\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        if ( !mdata.width || !mdata.height || !mdata.depth || mdata.arraySize != 1 )\n            return E_INVALIDARG;\n        \n        if ( !_CalculateMipLevels3D(mdata.width,mdata.height,mdata.depth,mipLevels) )\n            return E_INVALIDARG;\n        break;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    Release();\n\n    _metadata.width = mdata.width;\n    _metadata.height = mdata.height;\n    _metadata.depth = mdata.depth;\n    _metadata.arraySize = mdata.arraySize;\n    _metadata.mipLevels = mipLevels;\n    _metadata.miscFlags = mdata.miscFlags;\n    _metadata.miscFlags2 = mdata.miscFlags2;\n    _metadata.format = mdata.format;\n    _metadata.dimension = mdata.dimension;\n\n    size_t pixelSize, nimages;\n    _DetermineImageArray( _metadata, flags, nimages, pixelSize );\n\n    _image = new (std::nothrow) Image[ nimages ];\n    if ( !_image )\n        return E_OUTOFMEMORY;\n\n    _nimages = nimages;\n    memset( _image, 0, sizeof(Image) * nimages );\n\n    _memory = reinterpret_cast<uint8_t*>( _aligned_malloc( pixelSize, 16 ) );\n    if ( !_memory )\n    {\n        Release();\n        return E_OUTOFMEMORY;\n    }\n    _size = pixelSize;\n    if ( !_SetupImageArray( _memory, pixelSize, _metadata, flags, _image, nimages ) )\n    {\n        Release();\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::Initialize1D( DXGI_FORMAT fmt, size_t length, size_t arraySize, size_t mipLevels, DWORD flags )\n{\n    if ( !length || !arraySize )\n        return E_INVALIDARG;\n\n    // 1D is a special case of the 2D case\n    HRESULT hr = Initialize2D( fmt, length, 1, arraySize, mipLevels, flags );\n    if ( FAILED(hr) )\n        return hr;\n\n    _metadata.dimension = TEX_DIMENSION_TEXTURE1D;\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::Initialize2D( DXGI_FORMAT fmt, size_t width, size_t height, size_t arraySize, size_t mipLevels, DWORD flags )\n{\n    if ( !IsValid(fmt) || !width || !height || !arraySize )\n        return E_INVALIDARG;\n\n    if ( IsPalettized(fmt) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !_CalculateMipLevels(width,height,mipLevels) )\n        return E_INVALIDARG;\n\n    Release();\n\n    _metadata.width = width;\n    _metadata.height = height;\n    _metadata.depth = 1;\n    _metadata.arraySize = arraySize;\n    _metadata.mipLevels = mipLevels;\n    _metadata.miscFlags = 0;\n    _metadata.miscFlags2 = 0;\n    _metadata.format = fmt;\n    _metadata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n    size_t pixelSize, nimages;\n    _DetermineImageArray( _metadata, flags, nimages, pixelSize );\n\n    _image = new (std::nothrow) Image[ nimages ];\n    if ( !_image )\n        return E_OUTOFMEMORY;\n\n    _nimages = nimages;\n    memset( _image, 0, sizeof(Image) * nimages );\n\n    _memory = reinterpret_cast<uint8_t*>( _aligned_malloc( pixelSize, 16 ) );\n    if ( !_memory )\n    {\n        Release();\n        return E_OUTOFMEMORY;\n    }\n\n\t\t// clear the memory!\n\tmemset(_memory, 0, pixelSize);\n\n    _size = pixelSize;\n    if ( !_SetupImageArray( _memory, pixelSize, _metadata, flags, _image, nimages ) )\n    {\n        Release();\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::Initialize3D( DXGI_FORMAT fmt, size_t width, size_t height, size_t depth, size_t mipLevels, DWORD flags )\n{\n    if ( !IsValid(fmt) || !width || !height || !depth )\n        return E_INVALIDARG;\n\n    if ( IsPalettized(fmt) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !_CalculateMipLevels3D(width,height,depth,mipLevels) )\n        return E_INVALIDARG;\n\n    Release();\n\n    _metadata.width = width;\n    _metadata.height = height;\n    _metadata.depth = depth;\n    _metadata.arraySize = 1;    // Direct3D 10.x/11 does not support arrays of 3D textures\n    _metadata.mipLevels = mipLevels;\n    _metadata.miscFlags = 0;\n    _metadata.miscFlags2 = 0;\n    _metadata.format = fmt;\n    _metadata.dimension = TEX_DIMENSION_TEXTURE3D;\n\n    size_t pixelSize, nimages;\n    _DetermineImageArray( _metadata, flags, nimages, pixelSize );\n\n    _image = new (std::nothrow) Image[ nimages ];\n    if ( !_image )\n    {\n        Release();\n        return E_OUTOFMEMORY;\n    }\n    _nimages = nimages;\n    memset( _image, 0, sizeof(Image) * nimages );\n\n    _memory = reinterpret_cast<uint8_t*>( _aligned_malloc( pixelSize, 16 ) );\n    if ( !_memory )\n    {\n        Release();\n        return E_OUTOFMEMORY;\n    }\n    _size = pixelSize;\n\n    if ( !_SetupImageArray( _memory, pixelSize, _metadata, flags, _image, nimages ) )\n    {\n        Release();\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::InitializeCube( DXGI_FORMAT fmt, size_t width, size_t height, size_t nCubes, size_t mipLevels, DWORD flags )\n{\n    if ( !width || !height || !nCubes )\n        return E_INVALIDARG;\n\n    // A DirectX11 cubemap is just a 2D texture array that is a multiple of 6 for each cube\n    HRESULT hr = Initialize2D( fmt, width, height, nCubes * 6, mipLevels, flags );\n    if ( FAILED(hr) )\n        return hr;\n\n    _metadata.miscFlags |= TEX_MISC_TEXTURECUBE;\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::InitializeFromImage( const Image& srcImage, bool allow1D, DWORD flags )\n{\n    HRESULT hr = ( srcImage.height > 1 || !allow1D )\n                 ? Initialize2D( srcImage.format, srcImage.width, srcImage.height, 1, 1, flags )\n                 : Initialize1D( srcImage.format, srcImage.width, 1, 1, flags );\n\n    if ( FAILED(hr) )\n        return hr;\n\n    size_t rowCount = ComputeScanlines( srcImage.format, srcImage.height );\n    if ( !rowCount )\n        return E_UNEXPECTED;\n\n    const uint8_t* sptr = reinterpret_cast<const uint8_t*>( srcImage.pixels );\n    if ( !sptr )\n        return E_POINTER;\n\n    auto dptr = reinterpret_cast<uint8_t*>( _image[0].pixels );\n    if ( !dptr )\n        return E_POINTER;\n\n    size_t spitch = srcImage.rowPitch;\n    size_t dpitch = _image[0].rowPitch;\n\n    size_t size = std::min<size_t>( dpitch, spitch );\n\n    for( size_t y = 0; y < rowCount; ++y )\n    {\n        memcpy_s( dptr, dpitch, sptr, size );\n        sptr += spitch;\n        dptr += dpitch;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::InitializeArrayFromImages( const Image* images, size_t nImages, bool allow1D, DWORD flags )\n{\n    if ( !images || !nImages )\n        return E_INVALIDARG;\n\n    DXGI_FORMAT format = images[0].format;\n    size_t width = images[0].width;\n    size_t height = images[0].height;\n\n    for( size_t index=0; index < nImages; ++index )\n    {\n        if ( !images[index].pixels )\n            return E_POINTER;\n\n        if ( images[index].format != format || images[index].width != width || images[index].height != height )\n        {\n            // All images must be the same format, width, and height\n            return E_FAIL;\n        }\n    }\n\n    HRESULT hr = ( height > 1 || !allow1D )\n                 ? Initialize2D( format, width, height, nImages, 1, flags )\n                 : Initialize1D( format, width, nImages, 1, flags );\n\n    if ( FAILED(hr) )\n        return hr;\n\n    size_t rowCount = ComputeScanlines( format, height );\n    if ( !rowCount )\n        return E_UNEXPECTED;\n\n    for( size_t index=0; index < nImages; ++index )\n    {\n        auto sptr = reinterpret_cast<const uint8_t*>( images[index].pixels );\n        if ( !sptr )\n            return E_POINTER;\n\n        assert( index < _nimages );\n        auto dptr = reinterpret_cast<uint8_t*>( _image[index].pixels );\n        if ( !dptr )\n            return E_POINTER;\n\n        size_t spitch = images[index].rowPitch;\n        size_t dpitch = _image[index].rowPitch;\n\n        size_t size = std::min<size_t>( dpitch, spitch );\n\n        for( size_t y = 0; y < rowCount; ++y )\n        {\n            memcpy_s( dptr, dpitch, sptr, size );\n            sptr += spitch;\n            dptr += dpitch;\n        }\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::InitializeCubeFromImages( const Image* images, size_t nImages, DWORD flags )\n{\n    if ( !images || !nImages )\n        return E_INVALIDARG;\n\n    // A DirectX11 cubemap is just a 2D texture array that is a multiple of 6 for each cube\n    if ( ( nImages % 6 ) != 0 )\n        return E_INVALIDARG;\n\n    HRESULT hr = InitializeArrayFromImages( images, nImages, false, flags );\n    if ( FAILED(hr) )\n        return hr;\n\n    _metadata.miscFlags |= TEX_MISC_TEXTURECUBE;\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ScratchImage::Initialize3DFromImages( const Image* images, size_t depth, DWORD flags )\n{\n    if ( !images || !depth )\n        return E_INVALIDARG;\n\n    DXGI_FORMAT format = images[0].format;\n    size_t width = images[0].width;\n    size_t height = images[0].height;\n\n    for( size_t slice=0; slice < depth; ++slice )\n    {\n        if ( !images[slice].pixels )\n            return E_POINTER;\n\n        if ( images[slice].format != format || images[slice].width != width || images[slice].height != height )\n        {\n            // All images must be the same format, width, and height\n            return E_FAIL;\n        }\n    }\n\n    HRESULT hr = Initialize3D( format, width, height, depth, 1, flags );\n    if ( FAILED(hr) )\n        return hr;\n\n    size_t rowCount = ComputeScanlines( format, height );\n    if ( !rowCount )\n        return E_UNEXPECTED;\n\n    for( size_t slice=0; slice < depth; ++slice )\n    {\n        auto sptr = reinterpret_cast<const uint8_t*>( images[slice].pixels );\n        if ( !sptr )\n            return E_POINTER;\n\n        assert( slice < _nimages );\n        auto dptr = reinterpret_cast<uint8_t*>( _image[slice].pixels );\n        if ( !dptr )\n            return E_POINTER;\n\n        size_t spitch = images[slice].rowPitch;\n        size_t dpitch = _image[slice].rowPitch;\n\n        size_t size = std::min<size_t>( dpitch, spitch );\n\n        for( size_t y = 0; y < rowCount; ++y )\n        {\n            memcpy_s( dptr, dpitch, sptr, size );\n            sptr += spitch;\n            dptr += dpitch;\n        }\n    }\n\n    return S_OK;\n}\n\nvoid ScratchImage::Release()\n{\n    _nimages = 0;\n    _size = 0;\n\n    if ( _image )\n    {\n        delete [] _image;\n        _image = 0;\n    }\n\n    if ( _memory )\n    {\n        _aligned_free( _memory );\n        _memory = 0;\n    }\n    \n    memset(&_metadata, 0, sizeof(_metadata));\n}\n\n_Use_decl_annotations_\nbool ScratchImage::OverrideFormat( DXGI_FORMAT f )\n{\n    if ( !_image )\n        return false;\n\n    if ( !IsValid( f ) || IsPlanar( f ) || IsPalettized( f ) )\n        return false;\n\n    for( size_t index = 0; index < _nimages; ++index )\n    {\n        _image[ index ].format = f;\n    }\n\n    _metadata.format = f;\n\n    return true;\n}\n\n_Use_decl_annotations_\nconst Image* ScratchImage::GetImage(size_t mip, size_t item, size_t slice) const\n{\n    if ( mip >= _metadata.mipLevels )\n        return nullptr;\n\n    size_t index = 0;\n\n    switch( _metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( slice > 0 )\n            return nullptr;\n\n        if ( item >= _metadata.arraySize )\n            return nullptr;\n\n        index = item*( _metadata.mipLevels ) + mip;\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        if ( item > 0 )\n        {\n            // No support for arrays of volumes\n            return nullptr;\n        }\n        else\n        {\n            size_t d = _metadata.depth;\n\n            for( size_t level = 0; level < mip; ++level )\n            {\n                index += d;\n                if ( d > 1 )\n                    d >>= 1;\n            }\n\n            if ( slice >= d )\n                return nullptr;\n\n            index += slice;\n        }\n        break;\n\n    default:\n        return nullptr;\n    }\n \n    return &_image[index];\n}\n\nbool ScratchImage::IsAlphaAllOpaque() const\n{\n    if ( !_image )\n        return false;\n\n    if ( !HasAlpha( _metadata.format ) )\n        return true;\n\n    if ( IsCompressed( _metadata.format ) )\n    {\n        for( size_t index = 0; index < _nimages; ++index )\n        {\n            if ( !_IsAlphaAllOpaqueBC( _image[ index ] ) )\n                return false;\n        }\n    }\n    else\n    {\n        ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*_metadata.width), 16 ) ) );\n        if ( !scanline )\n            return false;\n\n        static const XMVECTORF32 threshold = { 0.99f, 0.99f, 0.99f, 0.99f };\n\n        for( size_t index = 0; index < _nimages; ++index )\n        {\n#pragma warning( suppress : 6011 )\n            const Image& img = _image[ index ];\n\n            const uint8_t *pPixels = img.pixels;\n            assert( pPixels );\n\n            for( size_t h = 0; h < img.height; ++h )\n            {\n                if ( !_LoadScanline( scanline.get(), img.width, pPixels, img.rowPitch, img.format ) )\n                    return false;\n\n                XMVECTOR* ptr = scanline.get();\n                for( size_t w = 0; w < img.width; ++w )\n                {\n                    XMVECTOR alpha = XMVectorSplatW( *ptr );\n                    if ( XMVector4Less( alpha, threshold ) )\n                        return false;\n                    ++ptr;\n                }\n\n                pPixels += img.rowPitch;\n            }\n        }\n    }\n\n    return true;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexMipmaps.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexMipMaps.cpp\n//  \n// DirectX Texture Library - Mip-map generation\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"filters.h\"\n\nusing Microsoft::WRL::ComPtr;\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Mipmap helper functions\n//-------------------------------------------------------------------------------------\ninline static bool ispow2( _In_ size_t x )\n{\n    return ((x != 0) && !(x & (x - 1)));\n}\n\n\n//--- mipmap (1D/2D) levels computation ---\nstatic size_t _CountMips( _In_ size_t width, _In_ size_t height )\n{\n    size_t mipLevels = 1;\n\n    while ( height > 1 || width > 1 )\n    {\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        ++mipLevels;\n    }\n    \n    return mipLevels;\n}\n\nbool _CalculateMipLevels( _In_ size_t width, _In_ size_t height, _Inout_ size_t& mipLevels )\n{\n    if ( mipLevels > 1 )\n    {\n        size_t maxMips = _CountMips(width,height);\n        if ( mipLevels > maxMips )\n            return false;\n    }\n    else if ( mipLevels == 0 )\n    {\n        mipLevels = _CountMips(width,height);\n    }\n    else\n    {\n        mipLevels = 1;\n    }\n    return true;\n}\n\n\n//--- volume mipmap (3D) levels computation ---\nstatic size_t _CountMips3D( _In_ size_t width, _In_ size_t height, _In_ size_t depth )\n{\n    size_t mipLevels = 1;\n\n    while ( height > 1 || width > 1 || depth > 1 )\n    {\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n\n        ++mipLevels;\n    }\n    \n    return mipLevels;\n}\n\nbool _CalculateMipLevels3D( _In_ size_t width, _In_ size_t height, _In_ size_t depth, _Inout_ size_t& mipLevels )\n{\n    if ( mipLevels > 1 )\n    {\n        size_t maxMips = _CountMips3D(width,height,depth);\n        if ( mipLevels > maxMips )\n            return false;\n    }\n    else if ( mipLevels == 0 )\n    {\n        mipLevels = _CountMips3D(width,height,depth);\n    }\n    else\n    {\n        mipLevels = 1;\n    }\n    return true;\n}\n\n\n//-------------------------------------------------------------------------------------\n// WIC related helper functions\n//-------------------------------------------------------------------------------------\nstatic HRESULT _EnsureWicBitmapPixelFormat( _In_ IWICImagingFactory* pWIC, _In_ IWICBitmap* src, _In_ DWORD filter,\n                                            _In_ const WICPixelFormatGUID& desiredPixelFormat,\n                                            _Deref_out_ IWICBitmap** dest )\n{\n    if ( !pWIC || !src || !dest )\n        return E_POINTER;\n\n    *dest = nullptr;\n    \n    WICPixelFormatGUID actualPixelFormat;\n    HRESULT hr = src->GetPixelFormat( &actualPixelFormat );\n    \n    if ( SUCCEEDED(hr) )\n    {\n        if ( memcmp( &actualPixelFormat, &desiredPixelFormat, sizeof(WICPixelFormatGUID) ) == 0 )\n        {\n            src->AddRef();\n            *dest = src;\n        }\n        else\n        {\n            ComPtr<IWICFormatConverter> converter;\n            hr = pWIC->CreateFormatConverter( converter.GetAddressOf() );\n\n            if ( SUCCEEDED(hr) )\n            {\n                BOOL canConvert = FALSE;\n                hr = converter->CanConvert( actualPixelFormat, desiredPixelFormat, &canConvert );\n                if ( FAILED(hr) || !canConvert )\n                {\n                    return E_UNEXPECTED;\n                }\n            }\n\n            if ( SUCCEEDED(hr) )\n            {\n                hr = converter->Initialize( src, desiredPixelFormat, _GetWICDither(filter), 0, 0, WICBitmapPaletteTypeCustom );\n            }\n\n            if ( SUCCEEDED(hr) )\n            {\n                hr = pWIC->CreateBitmapFromSource( converter.Get(), WICBitmapCacheOnDemand, dest );\n            }\n        }\n    }\n\n    return hr;\n}\n\n\n//--- Resizing color and alpha channels separately using WIC ---\nHRESULT _ResizeSeparateColorAndAlpha( _In_ IWICImagingFactory* pWIC, _In_ IWICBitmap* original,\n                                      _In_ size_t newWidth, _In_ size_t newHeight, _In_ DWORD filter, _Inout_ const Image* img )\n{\n    if ( !pWIC || !original || !img )\n        return E_POINTER;\n\n    const WICBitmapInterpolationMode interpolationMode = _GetWICInterp(filter);\n\n    WICPixelFormatGUID desiredPixelFormat = GUID_WICPixelFormatUndefined;\n    HRESULT hr = original->GetPixelFormat( &desiredPixelFormat );\n    \n    size_t colorBytesInPixel = 0;\n    size_t colorBytesPerPixel = 0;\n    size_t colorWithAlphaBytesPerPixel = 0;\n    WICPixelFormatGUID colorPixelFormat = GUID_WICPixelFormatUndefined;\n    WICPixelFormatGUID colorWithAlphaPixelFormat = GUID_WICPixelFormatUndefined;\n\n    if ( SUCCEEDED(hr) )\n    {\n        ComPtr<IWICComponentInfo> componentInfo;\n        hr = pWIC->CreateComponentInfo( desiredPixelFormat, componentInfo.GetAddressOf() );\n\n        ComPtr<IWICPixelFormatInfo> pixelFormatInfo;\n        if ( SUCCEEDED(hr) )\n        {\n            hr = componentInfo.As( &pixelFormatInfo );\n        }\n\n        UINT bitsPerPixel = 0;\n        if ( SUCCEEDED(hr) )\n        {\n            hr = pixelFormatInfo->GetBitsPerPixel( &bitsPerPixel );\n        }\n\n        if ( SUCCEEDED(hr) )\n        {\n            if ( bitsPerPixel <= 32 )\n            {\n                colorBytesInPixel = colorBytesPerPixel = 3;\n                colorPixelFormat = GUID_WICPixelFormat24bppBGR;\n\n                colorWithAlphaBytesPerPixel = 4;\n                colorWithAlphaPixelFormat = GUID_WICPixelFormat32bppBGRA;\n            }\n            else\n            {\n#if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n                if ( _IsWIC2() )\n                {\n                    colorBytesInPixel = colorBytesPerPixel = 12;\n                    colorPixelFormat = GUID_WICPixelFormat96bppRGBFloat;\n                }\n                else\n#endif\n                {\n                    colorBytesInPixel = 12;\n                    colorBytesPerPixel = 16;\n                    colorPixelFormat = GUID_WICPixelFormat128bppRGBFloat;\n                }\n\n                colorWithAlphaBytesPerPixel = 16;\n                colorWithAlphaPixelFormat = GUID_WICPixelFormat128bppRGBAFloat;\n            }\n        }\n    }\n    \n    // Resize color only image (no alpha channel)\n    ComPtr<IWICBitmap> resizedColor;\n    if ( SUCCEEDED(hr) )\n    { \n        ComPtr<IWICBitmapScaler> colorScaler;\n        hr = pWIC->CreateBitmapScaler( colorScaler.GetAddressOf() );\n        if ( SUCCEEDED(hr) )\n        {\n            ComPtr<IWICBitmap> converted;\n            hr = _EnsureWicBitmapPixelFormat( pWIC, original, filter, colorPixelFormat, converted.GetAddressOf() );\n            if ( SUCCEEDED(hr) )\n            {\n                hr = colorScaler->Initialize( converted.Get(), static_cast<UINT>(newWidth), static_cast<UINT>(newHeight), interpolationMode );\n            }\n        }\n            \n        if ( SUCCEEDED(hr) )\n        {\n            ComPtr<IWICBitmap> resized;\n            hr = pWIC->CreateBitmapFromSource( colorScaler.Get(), WICBitmapCacheOnDemand, resized.GetAddressOf() );\n            if ( SUCCEEDED(hr) )\n            {\n                hr = _EnsureWicBitmapPixelFormat( pWIC, resized.Get(), filter, colorPixelFormat, resizedColor.GetAddressOf() );\n            }\n        }\n    }\n    \n    // Resize color+alpha image\n    ComPtr<IWICBitmap> resizedColorWithAlpha;\n    if ( SUCCEEDED(hr) )\n    {\n        ComPtr<IWICBitmapScaler> colorWithAlphaScaler;\n        hr = pWIC->CreateBitmapScaler( colorWithAlphaScaler.GetAddressOf() );\n        if ( SUCCEEDED(hr) )\n        {\n            ComPtr<IWICBitmap> converted;\n            hr = _EnsureWicBitmapPixelFormat( pWIC, original, filter, colorWithAlphaPixelFormat, converted.GetAddressOf() );\n            if ( SUCCEEDED(hr) )\n            {\n                hr = colorWithAlphaScaler->Initialize( converted.Get(), static_cast<UINT>(newWidth), static_cast<UINT>(newHeight), interpolationMode );\n            }\n        }\n            \n        if ( SUCCEEDED(hr) )\n        {\n            ComPtr<IWICBitmap> resized;\n            hr = pWIC->CreateBitmapFromSource( colorWithAlphaScaler.Get(), WICBitmapCacheOnDemand, resized.GetAddressOf() );\n            if ( SUCCEEDED(hr) )\n            {\n                hr = _EnsureWicBitmapPixelFormat( pWIC, resized.Get(), filter, colorWithAlphaPixelFormat, resizedColorWithAlpha.GetAddressOf() );\n            }\n        }\n    }\n\n    // Merge pixels (copying color channels from color only image to color+alpha image)\n    if ( SUCCEEDED(hr) )\n    {\n        ComPtr<IWICBitmapLock> colorLock;\n        ComPtr<IWICBitmapLock> colorWithAlphaLock;\n        hr = resizedColor->Lock( nullptr, WICBitmapLockRead, colorLock.GetAddressOf() );\n        if ( SUCCEEDED(hr) )\n        {\n            hr = resizedColorWithAlpha->Lock( nullptr, WICBitmapLockWrite, colorWithAlphaLock.GetAddressOf() );\n        }\n        \n        if ( SUCCEEDED(hr) )\n        {\n            WICInProcPointer colorWithAlphaData = nullptr;\n            UINT colorWithAlphaSizeInBytes = 0;\n            UINT colorWithAlphaStride = 0;\n            \n            hr = colorWithAlphaLock->GetDataPointer( &colorWithAlphaSizeInBytes, &colorWithAlphaData );\n            if ( SUCCEEDED(hr) )\n            {\n                if ( !colorWithAlphaData )\n                {\n                    hr = E_POINTER;\n                }\n                else\n                {\n                    hr = colorWithAlphaLock->GetStride( &colorWithAlphaStride );\n                }\n            }\n\n            WICInProcPointer colorData = nullptr;\n            UINT colorSizeInBytes = 0;\n            UINT colorStride = 0;\n            if ( SUCCEEDED(hr) )\n            {\n                hr = colorLock->GetDataPointer( &colorSizeInBytes, &colorData );\n                if ( SUCCEEDED(hr) )\n                {\n                    if ( !colorData )\n                    {\n                        hr = E_POINTER;\n                    }\n                    else\n                    {\n                        hr = colorLock->GetStride( &colorStride );\n                    }\n                }\n            }\n            \n            for ( size_t j = 0; SUCCEEDED(hr) && j < newHeight; j++ )\n            {\n                for ( size_t i = 0; SUCCEEDED(hr) && i < newWidth; i++ )\n                {\n                    size_t colorWithAlphaIndex = (j * colorWithAlphaStride) + (i * colorWithAlphaBytesPerPixel);\n                    size_t colorIndex = (j * colorStride) + (i * colorBytesPerPixel);\n                    \n                    if ( ((colorWithAlphaIndex + colorBytesInPixel) > colorWithAlphaSizeInBytes)\n                         || ( (colorIndex + colorBytesPerPixel) > colorSizeInBytes) )\n                    {\n                        hr = E_INVALIDARG;\n                    }\n                    else\n                    {\n#pragma warning( suppress : 26014 6386 ) // No overflow possible here\n                        memcpy_s( colorWithAlphaData + colorWithAlphaIndex, colorWithAlphaBytesPerPixel, colorData + colorIndex, colorBytesInPixel );\n                    }\n                }\n            }\n        }\n    }\n\n    if ( SUCCEEDED(hr) )\n    {\n        ComPtr<IWICBitmap> wicBitmap;\n        hr = _EnsureWicBitmapPixelFormat( pWIC, resizedColorWithAlpha.Get(), filter, desiredPixelFormat, wicBitmap.GetAddressOf() );\n        if ( SUCCEEDED(hr) )\n        {\n            hr = wicBitmap->CopyPixels( nullptr, static_cast<UINT>(img->rowPitch), static_cast<UINT>(img->slicePitch), img->pixels );\n        }\n    }\n\n    return hr;\n}\n\n\n//--- determine when to use WIC vs. non-WIC paths ---\nstatic bool _UseWICFiltering( _In_ DXGI_FORMAT format, _In_ DWORD filter )\n{\n    if ( filter & TEX_FILTER_FORCE_NON_WIC )\n    {\n        // Explicit flag indicates use of non-WIC code paths\n        return false;\n    }\n\n    if ( filter & TEX_FILTER_FORCE_WIC )\n    {\n        // Explicit flag to use WIC code paths, skips all the case checks below\n        return true;\n    }\n\n    if ( IsSRGB(format) || (filter & TEX_FILTER_SRGB) )\n    {\n        // Use non-WIC code paths for sRGB correct filtering\n        return false;\n    }\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n    if ( format == DXGI_FORMAT_R16G16B16A16_FLOAT\n         || format == DXGI_FORMAT_R16_FLOAT )\n    {\n        // Use non-WIC code paths as these conversions are not supported by Xbox One XDK\n        return false;\n    }\n#endif\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    switch ( filter & TEX_FILTER_MASK )\n    {\n    case TEX_FILTER_LINEAR:\n        if ( filter & TEX_FILTER_WRAP )\n        {\n            // WIC only supports 'clamp' semantics (MIRROR is equivalent to clamp for linear)\n            return false;\n        }\n\n        if ( BitsPerColor(format) > 8 )\n        {\n            // Avoid the WIC bitmap scaler when doing Linear filtering of XR/HDR formats\n            return false;\n        }\n        break;\n\n    case TEX_FILTER_CUBIC:\n        if ( filter & ( TEX_FILTER_WRAP | TEX_FILTER_MIRROR ) )\n        {\n            // WIC only supports 'clamp' semantics\n            return false;\n        }\n\n        if ( BitsPerColor(format) > 8 )\n        {\n            // Avoid the WIC bitmap scaler when doing Cubic filtering of XR/HDR formats\n            return false;\n        }\n        break;\n\n    case TEX_FILTER_TRIANGLE:\n        // WIC does not implement this filter\n        return false;\n    }\n\n    return true;\n}\n\n\n//--- mipmap (1D/2D) generation using WIC image scalar ---\nstatic HRESULT _GenerateMipMapsUsingWIC( _In_ const Image& baseImage, _In_ DWORD filter, _In_ size_t levels,\n                                         _In_ const WICPixelFormatGUID& pfGUID, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    assert( levels > 1 );\n\n    if ( !baseImage.pixels || !mipChain.GetPixels() )\n        return E_POINTER;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    size_t width = baseImage.width;\n    size_t height = baseImage.height;\n\n    ComPtr<IWICBitmap> source;\n    HRESULT hr = pWIC->CreateBitmapFromMemory( static_cast<UINT>( width ), static_cast<UINT>( height ), pfGUID,\n                                               static_cast<UINT>( baseImage.rowPitch ), static_cast<UINT>( baseImage.slicePitch ),\n                                               baseImage.pixels, source.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy base image to top miplevel\n    const Image *img0 = mipChain.GetImage( 0, item, 0 );\n    if ( !img0 )\n        return E_POINTER;\n\n    uint8_t* pDest = img0->pixels;\n    if ( !pDest )\n        return E_POINTER;\n\n    const uint8_t *pSrc = baseImage.pixels;\n    for( size_t h=0; h < height; ++h )\n    {\n        size_t msize = std::min<size_t>( img0->rowPitch, baseImage.rowPitch );\n        memcpy_s( pDest, img0->rowPitch, pSrc, msize );  \n        pSrc += baseImage.rowPitch;\n        pDest += img0->rowPitch;\n    }\n\n    ComPtr<IWICComponentInfo> componentInfo;\n    hr = pWIC->CreateComponentInfo( pfGUID, componentInfo.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICPixelFormatInfo2> pixelFormatInfo;\n    hr = componentInfo.As( &pixelFormatInfo );\n    if ( FAILED(hr) )\n        return hr;\n\n    BOOL supportsTransparency = FALSE;\n    hr = pixelFormatInfo->SupportsTransparency( &supportsTransparency );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Resize base image to each target mip level\n    for( size_t level = 1; level < levels; ++level )\n    {\n        const Image *img = mipChain.GetImage( level, item, 0 );\n        if ( !img )\n            return E_POINTER;\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        assert( img->width == width && img->height == height && img->format == baseImage.format );\n\n        if ( (filter & TEX_FILTER_SEPARATE_ALPHA) && supportsTransparency )\n        {\n            hr = _ResizeSeparateColorAndAlpha( pWIC, source.Get(), width, height, filter, img );\n            if ( FAILED(hr) )\n                return hr;\n        }\n        else\n        {\n            ComPtr<IWICBitmapScaler> scaler;\n            hr = pWIC->CreateBitmapScaler( scaler.GetAddressOf() );\n            if ( FAILED(hr) )\n                return hr;\n\n            hr = scaler->Initialize( source.Get(), static_cast<UINT>( width ), static_cast<UINT>( height ), _GetWICInterp( filter ) );\n            if ( FAILED(hr) )\n                return hr;\n\n            WICPixelFormatGUID pfScaler;\n            hr = scaler->GetPixelFormat( &pfScaler );\n            if ( FAILED(hr) )\n                return hr;\n\n            if ( memcmp( &pfScaler, &pfGUID, sizeof(WICPixelFormatGUID) ) == 0 )\n            {\n                hr = scaler->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n            else\n            {\n                // The WIC bitmap scaler is free to return a different pixel format than the source image, so here we\n                // convert it back\n                ComPtr<IWICFormatConverter> FC;\n                hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n                if ( FAILED(hr) )\n                    return hr;\n\n                BOOL canConvert = FALSE;\n                hr = FC->CanConvert( pfScaler, pfGUID, &canConvert );\n                if ( FAILED(hr) || !canConvert )\n                {\n                    return E_UNEXPECTED;\n                }\n\n                hr = FC->Initialize( scaler.Get(), pfGUID, _GetWICDither( filter ), 0, 0, WICBitmapPaletteTypeCustom );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = FC->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Generate (1D/2D) mip-map helpers (custom filtering)\n//-------------------------------------------------------------------------------------\nstatic HRESULT _Setup2DMips( _In_reads_(nimages) const Image* baseImages, _In_ size_t nimages, _In_ const TexMetadata& mdata,\n                             _Out_ ScratchImage& mipChain )\n{\n    if ( !baseImages || !nimages )\n        return E_INVALIDARG;\n\n    assert( mdata.mipLevels > 1 );\n    assert( mdata.arraySize == nimages );\n    assert( mdata.depth == 1 && mdata.dimension != TEX_DIMENSION_TEXTURE3D );\n    assert( mdata.width == baseImages[0].width );\n    assert( mdata.height == baseImages[0].height );\n    assert( mdata.format == baseImages[0].format );\n \n    HRESULT hr = mipChain.Initialize( mdata );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy base image(s) to top of mip chain\n    for( size_t item=0; item < nimages; ++item )\n    {\n        const Image& src = baseImages[item];\n\n        const Image *dest = mipChain.GetImage( 0, item, 0 );\n        if ( !dest )\n        {\n            mipChain.Release();\n            return E_POINTER;\n        }\n\n        assert( src.format == dest->format );\n\n        uint8_t* pDest = dest->pixels;\n        if ( !pDest )\n        {\n            mipChain.Release();\n            return E_POINTER;\n        }\n\n        const uint8_t *pSrc = src.pixels;\n        size_t rowPitch = src.rowPitch;\n        for( size_t h=0; h < mdata.height; ++h )\n        {\n            size_t msize = std::min<size_t>( dest->rowPitch, rowPitch );\n            memcpy_s( pDest, dest->rowPitch, pSrc, msize );  \n            pSrc += rowPitch;\n            pDest += dest->rowPitch;\n        }\n    }\n\n    return S_OK;\n}\n\n//--- 2D Point Filter ---\nstatic HRESULT _Generate2DMipsPointFilter( _In_ size_t levels, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    if ( !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base image is already placed into the mipChain at the top level... (see _Setup2DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (2 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*2), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row = target + width;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n#ifdef _DEBUG\n        memset( row, 0xCD, sizeof(XMVECTOR)*width );\n#endif\n\n        // 2D point filter\n        const Image* src = mipChain.GetImage( level-1, item, 0 );\n        const Image* dest = mipChain.GetImage( level, item, 0 );\n\n        if ( !src || !dest )\n            return E_POINTER;\n\n        const uint8_t* pSrc = src->pixels;\n        uint8_t* pDest = dest->pixels;\n\n        size_t rowPitch = src->rowPitch;\n\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n        size_t xinc = ( width << 16 ) / nwidth;\n        size_t yinc = ( height << 16 ) / nheight;\n\n        size_t lasty = size_t(-1);\n\n        size_t sy = 0;\n        for( size_t y = 0; y < nheight; ++y )\n        {\n            if ( (lasty ^ sy) >> 16 )\n            {\n                if ( !_LoadScanline( row, width, pSrc + ( rowPitch * (sy >> 16) ), rowPitch, src->format ) )\n                    return E_FAIL;\n                lasty = sy;\n            }\n\n            size_t sx = 0;\n            for( size_t x = 0; x < nwidth; ++x )\n            {\n                target[ x ] = row[ sx >> 16 ];\n                sx += xinc;\n            }\n\n            if ( !_StoreScanline( pDest, dest->rowPitch, dest->format, target, nwidth ) )\n                return E_FAIL;\n            pDest += dest->rowPitch;\n\n            sy += yinc;\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 2D Box Filter ---\nstatic HRESULT _Generate2DMipsBoxFilter( _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    if ( !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base image is already placed into the mipChain at the top level... (see _Setup2DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    if ( !ispow2(width) || !ispow2(height) )\n        return E_FAIL;\n\n    // Allocate temporary space (3 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*3), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* urow0 = target + width;\n    XMVECTOR* urow1 = target + width*2;\n\n    const XMVECTOR* urow2 = urow0 + 1;\n    const XMVECTOR* urow3 = urow1 + 1;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        if ( height <= 1 )\n        {\n            urow1 = urow0;\n        }\n\n        if ( width <= 1 )\n        {\n            urow2 = urow0;\n            urow3 = urow1;\n        }\n\n        // 2D box filter\n        const Image* src = mipChain.GetImage( level-1, item, 0 );\n        const Image* dest = mipChain.GetImage( level, item, 0 );\n\n        if ( !src || !dest )\n            return E_POINTER;\n\n        const uint8_t* pSrc = src->pixels;\n        uint8_t* pDest = dest->pixels;\n\n        size_t rowPitch = src->rowPitch;\n\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n        for( size_t y = 0; y < nheight; ++y )\n        {\n            if ( !_LoadScanlineLinear( urow0, width, pSrc, rowPitch, src->format, filter ) )\n                return E_FAIL;\n            pSrc += rowPitch;\n\n            if ( urow0 != urow1 )\n            {\n                if ( !_LoadScanlineLinear( urow1, width, pSrc, rowPitch, src->format, filter ) )\n                    return E_FAIL;\n                pSrc += rowPitch;\n            }\n\n            for( size_t x = 0; x < nwidth; ++x )\n            {\n                size_t x2 = x << 1;\n\n                AVERAGE4( target[ x ], urow0[ x2 ], urow1[ x2 ], urow2[ x2 ], urow3[ x2 ] );\n            }\n\n            if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                return E_FAIL;\n            pDest += dest->rowPitch;\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 2D Linear Filter ---\nstatic HRESULT _Generate2DMipsLinearFilter( _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    if ( !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base image is already placed into the mipChain at the top level... (see _Setup2DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (3 scanlines, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*3), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<LinearFilter[]> lf( new (std::nothrow) LinearFilter[ width+height ] );\n    if ( !lf )\n        return E_OUTOFMEMORY;\n\n    LinearFilter* lfX = lf.get();\n    LinearFilter* lfY = lf.get() + width;\n \n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row0 = target + width;\n    XMVECTOR* row1 = target + width*2;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        // 2D linear filter\n        const Image* src = mipChain.GetImage( level-1, item, 0 );\n        const Image* dest = mipChain.GetImage( level, item, 0 );\n\n        if ( !src || !dest )\n            return E_POINTER;\n\n        const uint8_t* pSrc = src->pixels;\n        uint8_t* pDest = dest->pixels;\n\n        size_t rowPitch = src->rowPitch;\n\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        _CreateLinearFilter( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, lfX );\n\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        _CreateLinearFilter( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, lfY );\n\n#ifdef _DEBUG\n        memset( row0, 0xCD, sizeof(XMVECTOR)*width );\n        memset( row1, 0xDD, sizeof(XMVECTOR)*width );\n#endif\n\n        size_t u0 = size_t(-1);\n        size_t u1 = size_t(-1);\n\n        for( size_t y = 0; y < nheight; ++y )\n        {\n            auto& toY = lfY[ y ];\n\n            if ( toY.u0 != u0 )\n            {\n                if ( toY.u0 != u1 )\n                {\n                    u0 = toY.u0;\n\n                    if ( !_LoadScanlineLinear( row0, width, pSrc + (rowPitch * u0), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n                else\n                {\n                    u0 = u1;\n                    u1 = size_t(-1);\n\n                    std::swap( row0, row1 );\n                }\n            }\n\n            if ( toY.u1 != u1 )\n            {\n                u1 = toY.u1;\n\n                if ( !_LoadScanlineLinear( row1, width, pSrc + (rowPitch * u1), rowPitch, src->format, filter ) )\n                    return E_FAIL;\n            }\n\n            for( size_t x = 0; x < nwidth; ++x )\n            {\n                auto& toX = lfX[ x ];\n\n                BILINEAR_INTERPOLATE( target[x], toX, toY, row0, row1 );\n            }\n\n            if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                return E_FAIL;\n            pDest += dest->rowPitch;\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 2D Cubic Filter ---\nstatic HRESULT _Generate2DMipsCubicFilter( _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    if ( !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base image is already placed into the mipChain at the top level... (see _Setup2DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (5 scanlines, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*5), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<CubicFilter[]> cf( new (std::nothrow) CubicFilter[ width+height ] );\n    if ( !cf )\n        return E_OUTOFMEMORY;\n\n    CubicFilter* cfX = cf.get();\n    CubicFilter* cfY = cf.get() + width;\n \n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row0 = target + width;\n    XMVECTOR* row1 = target + width*2;\n    XMVECTOR* row2 = target + width*3;\n    XMVECTOR* row3 = target + width*4;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        // 2D cubic filter\n        const Image* src = mipChain.GetImage( level-1, item, 0 );\n        const Image* dest = mipChain.GetImage( level, item, 0 );\n\n        if (  !src || !dest )\n            return E_POINTER;\n\n        const uint8_t* pSrc = src->pixels;\n        uint8_t* pDest = dest->pixels;\n\n        size_t rowPitch = src->rowPitch;\n\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        _CreateCubicFilter( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, (filter & TEX_FILTER_MIRROR_U) != 0, cfX );\n\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        _CreateCubicFilter( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, (filter & TEX_FILTER_MIRROR_V) != 0, cfY );\n\n#ifdef _DEBUG\n        memset( row0, 0xCD, sizeof(XMVECTOR)*width );\n        memset( row1, 0xDD, sizeof(XMVECTOR)*width );\n        memset( row2, 0xED, sizeof(XMVECTOR)*width );\n        memset( row3, 0xFD, sizeof(XMVECTOR)*width );\n#endif\n\n        size_t u0 = size_t(-1);\n        size_t u1 = size_t(-1);\n        size_t u2 = size_t(-1);\n        size_t u3 = size_t(-1);\n\n        for( size_t y = 0; y < nheight; ++y )\n        {\n            auto& toY = cfY[ y ];\n\n            // Scanline 1\n            if ( toY.u0 != u0 )\n            {\n                if ( toY.u0 != u1 && toY.u0 != u2 && toY.u0 != u3 )\n                {\n                    u0 = toY.u0;\n\n                    if ( !_LoadScanlineLinear( row0, width, pSrc + (rowPitch * u0), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n                else if ( toY.u0 == u1 )\n                {\n                    u0 = u1;\n                    u1 = size_t(-1);\n\n                    std::swap( row0, row1 );\n                }\n                else if ( toY.u0 == u2 )\n                {\n                    u0 = u2;\n                    u2 = size_t(-1);\n\n                    std::swap( row0, row2 );\n                }\n                else if ( toY.u0 == u3 )\n                {\n                    u0 = u3;\n                    u3 = size_t(-1);\n\n                    std::swap( row0, row3 );\n                }\n            }\n\n            // Scanline 2\n            if ( toY.u1 != u1 )\n            {\n                if ( toY.u1 != u2 && toY.u1 != u3 )\n                {\n                    u1 = toY.u1;\n\n                    if ( !_LoadScanlineLinear( row1, width, pSrc + (rowPitch * u1), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n                else if ( toY.u1 == u2 )\n                {\n                    u1 = u2;\n                    u2 = size_t(-1);\n\n                    std::swap( row1, row2 );\n                }\n                else if ( toY.u1 == u3 )\n                {\n                    u1 = u3;\n                    u3 = size_t(-1);\n\n                    std::swap( row1, row3 );\n                }\n            }\n\n            // Scanline 3\n            if ( toY.u2 != u2 )\n            {\n                if ( toY.u2 != u3 )\n                {\n                    u2 = toY.u2;\n\n                    if ( !_LoadScanlineLinear( row2, width, pSrc + (rowPitch * u2), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n                else\n                {\n                    u2 = u3;\n                    u3 = size_t(-1);\n\n                    std::swap( row2, row3 );\n                }\n            }\n\n            // Scanline 4\n            if ( toY.u3 != u3 )\n            {\n                u3 = toY.u3;\n\n                if ( !_LoadScanlineLinear( row3, width, pSrc + (rowPitch * u3), rowPitch, src->format, filter ) )\n                    return E_FAIL;\n            }\n\n            for( size_t x = 0; x < nwidth; ++x )\n            {\n                auto& toX = cfX[ x ];\n\n                XMVECTOR C0, C1, C2, C3;\n\n                CUBIC_INTERPOLATE( C0, toX.x, row0[ toX.u0 ], row0[ toX.u1 ], row0[ toX.u2 ], row0[ toX.u3 ] );\n                CUBIC_INTERPOLATE( C1, toX.x, row1[ toX.u0 ], row1[ toX.u1 ], row1[ toX.u2 ], row1[ toX.u3 ] );\n                CUBIC_INTERPOLATE( C2, toX.x, row2[ toX.u0 ], row2[ toX.u1 ], row2[ toX.u2 ], row2[ toX.u3 ] );\n                CUBIC_INTERPOLATE( C3, toX.x, row3[ toX.u0 ], row3[ toX.u1 ], row3[ toX.u2 ], row3[ toX.u3 ] );\n\n                CUBIC_INTERPOLATE( target[x], toY.x, C0, C1, C2, C3 );\n            }\n\n            if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                return E_FAIL;\n            pDest += dest->rowPitch;\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 2D Triangle Filter ---\nstatic HRESULT _Generate2DMipsTriangleFilter( _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain, _In_ size_t item )\n{\n    if ( !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    using namespace TriangleFilter;\n\n    // This assumes that the base image is already placed into the mipChain at the top level... (see _Setup2DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate initial temporary space (1 scanline, accumulation rows, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( sizeof(XMVECTOR) * width, 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<TriangleRow[]> rowActive( new (std::nothrow) TriangleRow[ height ] );\n    if ( !rowActive )\n        return E_OUTOFMEMORY;\n\n    TriangleRow * rowFree = nullptr;\n\n    std::unique_ptr<Filter> tfX, tfY;\n\n    XMVECTOR* row = scanline.get();\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        // 2D triangle filter\n        const Image* src = mipChain.GetImage( level-1, item, 0 );\n        const Image* dest = mipChain.GetImage( level, item, 0 );\n\n        if ( !src || !dest )\n            return E_POINTER;\n\n        const uint8_t* pSrc = src->pixels;\n        size_t rowPitch = src->rowPitch;\n        const uint8_t* pEndSrc = pSrc + rowPitch * height;\n\n        uint8_t* pDest = dest->pixels;\n\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        HRESULT hr = _Create( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, tfX );\n        if ( FAILED(hr) )\n            return hr;\n        \n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        hr = _Create( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, tfY );\n        if ( FAILED(hr) )\n            return hr;\n\n#ifdef _DEBUG\n        memset( row, 0xCD, sizeof(XMVECTOR)*width );\n#endif\n\n        auto xFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfX.get() ) + tfX->sizeInBytes );\n        auto yFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfY.get() ) + tfY->sizeInBytes );\n\n        // Count times rows get written (and clear out any leftover accumulation rows from last miplevel)\n        for( FilterFrom* yFrom = tfY->from; yFrom < yFromEnd; )\n        {\n            for ( size_t j = 0; j < yFrom->count; ++j )\n            {\n                size_t v = yFrom->to[ j ].u;\n                assert( v < nheight );\n                TriangleRow* rowAcc = &rowActive[ v ];\n\n                ++rowAcc->remaining;\n\n                if ( rowAcc->scanline )\n                {\n                    memset( rowAcc->scanline.get(), 0, sizeof(XMVECTOR) * nwidth );\n                }\n            }\n\n            yFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( yFrom ) + yFrom->sizeInBytes );\n        }\n\n        // Filter image\n        for( FilterFrom* yFrom = tfY->from; yFrom < yFromEnd; )\n        {\n            // Create accumulation rows as needed\n            for ( size_t j = 0; j < yFrom->count; ++j )\n            {\n                size_t v = yFrom->to[ j ].u;\n                assert( v < nheight );\n                TriangleRow* rowAcc = &rowActive[ v ];\n\n                if ( !rowAcc->scanline )\n                {\n                    if ( rowFree )\n                    {\n                        // Steal and reuse scanline from 'free row' list\n                        // (it will always be at least as wide as nwidth due to loop decending order)\n                        assert( rowFree->scanline != 0 );\n                        rowAcc->scanline.reset( rowFree->scanline.release() );\n                        rowFree = rowFree->next;\n                    }\n                    else\n                    {\n                        rowAcc->scanline.reset( reinterpret_cast<XMVECTOR*>( _aligned_malloc( sizeof(XMVECTOR) * nwidth, 16 ) ) );\n                        if ( !rowAcc->scanline )\n                            return E_OUTOFMEMORY;\n                    }\n\n                    memset( rowAcc->scanline.get(), 0, sizeof(XMVECTOR) * nwidth );\n                }\n            }\n\n            // Load source scanline\n            if ( (pSrc + rowPitch) > pEndSrc )\n                return E_FAIL;\n\n            if ( !_LoadScanlineLinear( row, width, pSrc, rowPitch, src->format, filter ) )\n                return E_FAIL;\n\n            pSrc += rowPitch;\n\n            // Process row\n            size_t x = 0;\n            for( FilterFrom* xFrom = tfX->from; xFrom < xFromEnd; ++x )\n            {\n                for ( size_t j = 0; j < yFrom->count; ++j )\n                {\n                    size_t v = yFrom->to[ j ].u;\n                    assert( v < nheight );\n                    float yweight = yFrom->to[ j ].weight;\n\n                    XMVECTOR* accPtr = rowActive[ v ].scanline.get();\n                    if ( !accPtr )\n                        return E_POINTER;\n\n                    for ( size_t k = 0; k < xFrom->count; ++k )\n                    {\n                        size_t u = xFrom->to[ k ].u;\n                        assert( u < nwidth );\n\n                        XMVECTOR weight = XMVectorReplicate( yweight * xFrom->to[ k ].weight );\n\n                        assert( x < width );\n                        accPtr[ u ] = XMVectorMultiplyAdd( row[ x ], weight, accPtr[ u ] );\n                    }\n                }\n\n                xFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( xFrom ) + xFrom->sizeInBytes );\n            }\n\n            // Write completed accumulation rows\n            for ( size_t j = 0; j < yFrom->count; ++j )\n            {\n                size_t v = yFrom->to[ j ].u;\n                assert( v < nheight );\n                TriangleRow* rowAcc = &rowActive[ v ];\n\n                assert( rowAcc->remaining > 0 );\n                --rowAcc->remaining;\n\n                if ( !rowAcc->remaining )\n                {\n                    XMVECTOR* pAccSrc = rowAcc->scanline.get();\n                    if ( !pAccSrc )\n                        return E_POINTER;\n\n                    switch( dest->format )\n                    {\n                    case DXGI_FORMAT_R10G10B10A2_UNORM:\n                    case DXGI_FORMAT_R10G10B10A2_UINT:\n                        {\n                            // Need to slightly bias results for floating-point error accumulation which can\n                            // be visible with harshly quantized values\n                            static const XMVECTORF32 Bias = { 0.f, 0.f, 0.f, 0.1f };\n                       \n                            XMVECTOR* ptr = pAccSrc;\n                            for( size_t i=0; i < dest->width; ++i, ++ptr )\n                            {\n                                *ptr = XMVectorAdd( *ptr, Bias );\n                            }\n                        }\n                        break;\n                    }\n\n                    // This performs any required clamping\n                    if ( !_StoreScanlineLinear( pDest + (dest->rowPitch * v), dest->rowPitch, dest->format, pAccSrc, dest->width, filter ) )\n                        return E_FAIL;\n\n                    // Put row on freelist to reuse it's allocated scanline\n                    rowAcc->next = rowFree;\n                    rowFree = rowAcc;\n                }\n            }\n\n            yFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( yFrom ) + yFrom->sizeInBytes );\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Generate volume mip-map helpers\n//-------------------------------------------------------------------------------------\nstatic HRESULT _Setup3DMips( _In_reads_(depth) const Image* baseImages, _In_ size_t depth, size_t levels,\n                             _Out_ ScratchImage& mipChain )\n{\n    if ( !baseImages || !depth )\n        return E_INVALIDARG;\n\n    assert( levels > 1 );\n\n    size_t width = baseImages[0].width;\n    size_t height = baseImages[0].height;\n\n    HRESULT hr = mipChain.Initialize3D( baseImages[0].format, width, height, depth, levels );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy base images to top slice\n    for( size_t slice=0; slice < depth; ++slice )\n    {\n        const Image& src = baseImages[slice];\n\n        const Image *dest = mipChain.GetImage( 0, 0, slice );\n        if ( !dest )\n        {\n            mipChain.Release();\n            return E_POINTER;\n        }\n\n        assert( src.format == dest->format );\n\n        uint8_t* pDest = dest->pixels;\n        if ( !pDest )\n        {\n            mipChain.Release();\n            return E_POINTER;\n        }\n\n        const uint8_t *pSrc = src.pixels;\n        size_t rowPitch = src.rowPitch;\n        for( size_t h=0; h < height; ++h )\n        {\n            size_t msize = std::min<size_t>( dest->rowPitch, rowPitch );\n            memcpy_s( pDest, dest->rowPitch, pSrc, msize );  \n            pSrc += rowPitch;\n            pDest += dest->rowPitch;\n        }\n    }\n\n    return S_OK;\n}\n\n\n//--- 3D Point Filter ---\nstatic HRESULT _Generate3DMipsPointFilter( _In_ size_t depth, _In_ size_t levels, _In_ const ScratchImage& mipChain )\n{\n    if ( !depth || !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base images are already placed into the mipChain at the top level... (see _Setup3DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (2 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*2), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row = target + width;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n#ifdef _DEBUG\n        memset( row, 0xCD, sizeof(XMVECTOR)*width );\n#endif\n\n        if ( depth > 1 )\n        {\n            // 3D point filter\n            size_t ndepth = depth >> 1;\n\n            size_t zinc = ( depth << 16 ) / ndepth;\n\n            size_t sz = 0;\n            for( size_t slice=0; slice < ndepth; ++slice )\n            {\n                const Image* src = mipChain.GetImage( level-1, 0, (sz >> 16) );\n                const Image* dest = mipChain.GetImage( level, 0, slice );\n\n                if ( !src || !dest )\n                    return E_POINTER;\n\n                const uint8_t* pSrc = src->pixels;\n                uint8_t* pDest = dest->pixels;\n\n                size_t rowPitch = src->rowPitch;\n\n                size_t nwidth = (width > 1) ? (width >> 1) : 1;\n                size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n                size_t xinc = ( width << 16 ) / nwidth;\n                size_t yinc = ( height << 16 ) / nheight;\n\n                size_t lasty = size_t(-1);\n\n                size_t sy = 0;\n                for( size_t y = 0; y < nheight; ++y )\n                {\n                    if ( (lasty ^ sy) >> 16 )\n                    {\n                        if ( !_LoadScanline( row, width, pSrc + ( rowPitch * (sy >> 16) ), rowPitch, src->format ) )\n                            return E_FAIL;\n                        lasty = sy;\n                    }\n\n                    size_t sx = 0;\n                    for( size_t x = 0; x < nwidth; ++x )\n                    {\n                        target[ x ] = row[ sx >> 16 ];\n                        sx += xinc;\n                    }\n\n                    if ( !_StoreScanline( pDest, dest->rowPitch, dest->format, target, nwidth ) )\n                        return E_FAIL;\n                    pDest += dest->rowPitch;\n\n                    sy += yinc;\n                }\n\n                sz += zinc;\n            }\n        }\n        else\n        {\n            // 2D point filter\n            const Image* src = mipChain.GetImage( level-1, 0, 0 );\n            const Image* dest = mipChain.GetImage( level, 0, 0 );\n\n            if ( !src || !dest )\n                return E_POINTER;\n\n            const uint8_t* pSrc = src->pixels;\n            uint8_t* pDest = dest->pixels;\n\n            size_t rowPitch = src->rowPitch;\n\n            size_t nwidth = (width > 1) ? (width >> 1) : 1;\n            size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n            size_t xinc = ( width << 16 ) / nwidth;\n            size_t yinc = ( height << 16 ) / nheight;\n\n            size_t lasty = size_t(-1);\n\n            size_t sy = 0;\n            for( size_t y = 0; y < nheight; ++y )\n            {\n                if ( (lasty ^ sy) >> 16 )\n                {\n                    if ( !_LoadScanline( row, width, pSrc + ( rowPitch * (sy >> 16) ), rowPitch, src->format ) )\n                        return E_FAIL;\n                    lasty = sy;\n                }\n\n                size_t sx = 0;\n                for( size_t x = 0; x < nwidth; ++x )\n                {\n                    target[ x ] = row[ sx >> 16 ];\n                    sx += xinc;\n                }\n\n                if ( !_StoreScanline( pDest, dest->rowPitch, dest->format, target, nwidth ) )\n                    return E_FAIL;\n                pDest += dest->rowPitch;\n\n                sy += yinc;\n            }\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 3D Box Filter ---\nstatic HRESULT _Generate3DMipsBoxFilter( _In_ size_t depth, _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain )\n{\n    if ( !depth || !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base images are already placed into the mipChain at the top level... (see _Setup3DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    if ( !ispow2(width) || !ispow2(height) || !ispow2(depth) )\n        return E_FAIL;\n\n    // Allocate temporary space (5 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*5), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* urow0 = target + width;\n    XMVECTOR* urow1 = target + width*2;\n    XMVECTOR* vrow0 = target + width*3;\n    XMVECTOR* vrow1 = target + width*4;\n\n    const XMVECTOR* urow2 = urow0 + 1;\n    const XMVECTOR* urow3 = urow1 + 1;\n    const XMVECTOR* vrow2 = vrow0 + 1;\n    const XMVECTOR* vrow3 = vrow1 + 1;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        if ( height <= 1 )\n        {\n            urow1 = urow0;\n            vrow1 = vrow0;\n        }\n\n        if ( width <= 1 )\n        {\n            urow2 = urow0;\n            urow3 = urow1;\n            vrow2 = vrow0;\n            vrow3 = vrow1;\n        }\n\n        if ( depth > 1 )\n        {\n            // 3D box filter\n            size_t ndepth = depth >> 1;\n\n            for( size_t slice=0; slice < ndepth; ++slice )\n            {\n                size_t slicea = std::min<size_t>( slice * 2, depth-1 );\n                size_t sliceb = std::min<size_t>( slicea + 1, depth-1 );\n\n                const Image* srca = mipChain.GetImage( level-1, 0, slicea );\n                const Image* srcb = mipChain.GetImage( level-1, 0, sliceb );\n                const Image* dest = mipChain.GetImage( level, 0, slice );\n\n                if ( !srca || !srcb || !dest )\n                    return E_POINTER;\n\n                const uint8_t* pSrc1 = srca->pixels;\n                const uint8_t* pSrc2 = srcb->pixels;\n                uint8_t* pDest = dest->pixels;\n\n                size_t aRowPitch = srca->rowPitch;\n                size_t bRowPitch = srcb->rowPitch;\n\n                size_t nwidth = (width > 1) ? (width >> 1) : 1;\n                size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n                for( size_t y = 0; y < nheight; ++y )\n                {\n                    if ( !_LoadScanlineLinear( urow0, width, pSrc1, aRowPitch, srca->format, filter ) )\n                        return E_FAIL;\n                    pSrc1 += aRowPitch;\n\n                    if ( urow0 != urow1 )\n                    {\n                        if ( !_LoadScanlineLinear( urow1, width, pSrc1, aRowPitch, srca->format, filter ) )\n                            return E_FAIL;\n                        pSrc1 += aRowPitch;\n                    }\n\n                    if ( !_LoadScanlineLinear( vrow0, width, pSrc2, bRowPitch, srcb->format, filter ) )\n                        return E_FAIL;\n                    pSrc2 += bRowPitch;\n\n                    if ( vrow0 != vrow1 )\n                    {\n                        if ( !_LoadScanlineLinear( vrow1, width, pSrc2, bRowPitch, srcb->format, filter ) )\n                            return E_FAIL;\n                        pSrc2 += bRowPitch;\n                    }\n\n                    for( size_t x = 0; x < nwidth; ++x )\n                    {\n                        size_t x2 = x << 1;\n\n                        AVERAGE8( target[x], urow0[ x2 ], urow1[ x2 ], urow2[ x2 ], urow3[ x2 ],\n                                             vrow0[ x2 ], vrow1[ x2 ], vrow2[ x2 ], vrow3[ x2 ] );\n                    }\n\n                    if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                        return E_FAIL;\n                    pDest += dest->rowPitch;\n                }\n            }\n        }\n        else\n        {\n            // 2D box filter\n            const Image* src = mipChain.GetImage( level-1, 0, 0 );\n            const Image* dest = mipChain.GetImage( level, 0, 0 );\n\n            if ( !src || !dest )\n                return E_POINTER;\n\n            const uint8_t* pSrc = src->pixels;\n            uint8_t* pDest = dest->pixels;\n\n            size_t rowPitch = src->rowPitch;\n\n            size_t nwidth = (width > 1) ? (width >> 1) : 1;\n            size_t nheight = (height > 1) ? (height >> 1) : 1;\n\n            for( size_t y = 0; y < nheight; ++y )\n            {\n                if ( !_LoadScanlineLinear( urow0, width, pSrc, rowPitch, src->format, filter ) )\n                    return E_FAIL;\n                pSrc += rowPitch;\n\n                if ( urow0 != urow1 )\n                {\n                    if ( !_LoadScanlineLinear( urow1, width, pSrc, rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                    pSrc += rowPitch;\n                }\n\n                for( size_t x = 0; x < nwidth; ++x )\n                {\n                    size_t x2 = x << 1;\n\n                    AVERAGE4( target[ x ], urow0[ x2 ], urow1[ x2 ], urow2[ x2 ], urow3[ x2 ] );\n                }\n\n                if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                    return E_FAIL;\n                pDest += dest->rowPitch;\n            }\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 3D Linear Filter ---\nstatic HRESULT _Generate3DMipsLinearFilter( _In_ size_t depth, _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain )\n{\n    if ( !depth || !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base images are already placed into the mipChain at the top level... (see _Setup3DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (5 scanlines, plus X/Y/Z filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*5), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<LinearFilter[]> lf( new (std::nothrow) LinearFilter[ width+height+depth ] );\n    if ( !lf )\n        return E_OUTOFMEMORY;\n\n    LinearFilter* lfX = lf.get();\n    LinearFilter* lfY = lf.get() + width;\n    LinearFilter* lfZ = lf.get() + width + height;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* urow0 = target + width;\n    XMVECTOR* urow1 = target + width*2;\n    XMVECTOR* vrow0 = target + width*3;\n    XMVECTOR* vrow1 = target + width*4;\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        _CreateLinearFilter( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, lfX );\n\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        _CreateLinearFilter( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, lfY );\n\n#ifdef _DEBUG\n        memset( urow0, 0xCD, sizeof(XMVECTOR)*width );\n        memset( urow1, 0xDD, sizeof(XMVECTOR)*width );\n        memset( vrow0, 0xED, sizeof(XMVECTOR)*width );\n        memset( vrow1, 0xFD, sizeof(XMVECTOR)*width );\n#endif\n\n        if ( depth > 1 )\n        {\n            // 3D linear filter\n            size_t ndepth = depth >> 1;\n            _CreateLinearFilter( depth, ndepth, (filter & TEX_FILTER_WRAP_W) != 0, lfZ );\n\n            for( size_t slice=0; slice < ndepth; ++slice )\n            {\n                auto& toZ = lfZ[ slice ];\n\n                const Image* srca = mipChain.GetImage( level-1, 0, toZ.u0 );\n                const Image* srcb = mipChain.GetImage( level-1, 0, toZ.u1 );\n                if ( !srca || !srcb )\n                    return E_POINTER;\n\n                size_t u0 = size_t(-1);\n                size_t u1 = size_t(-1);\n\n                const Image* dest = mipChain.GetImage( level, 0, slice );\n                if ( !dest )\n                    return E_POINTER;\n\n                uint8_t* pDest = dest->pixels;\n\n                for( size_t y = 0; y < nheight; ++y )\n                {\n                    auto& toY = lfY[ y ];\n\n                    if ( toY.u0 != u0 )\n                    {\n                        if ( toY.u0 != u1 )\n                        {\n                            u0 = toY.u0;\n\n                            if ( !_LoadScanlineLinear( urow0, width, srca->pixels + (srca->rowPitch * u0), srca->rowPitch, srca->format, filter )\n                                 || !_LoadScanlineLinear( vrow0, width, srcb->pixels + (srcb->rowPitch * u0), srcb->rowPitch, srcb->format, filter ) )\n                                return E_FAIL;\n                        }\n                        else\n                        {\n                            u0 = u1;\n                            u1 = size_t(-1);\n\n                            std::swap( urow0, urow1 );\n                            std::swap( vrow0, vrow1 );\n                        }\n                    }\n\n                    if ( toY.u1 != u1 )\n                    {\n                        u1 = toY.u1;\n\n                        if ( !_LoadScanlineLinear( urow1, width, srca->pixels + (srca->rowPitch * u1), srca->rowPitch, srca->format, filter )\n                                || !_LoadScanlineLinear( vrow1, width, srcb->pixels + (srcb->rowPitch * u1), srcb->rowPitch, srcb->format, filter ) )\n                            return E_FAIL;\n                    }\n\n                    for( size_t x = 0; x < nwidth; ++x )\n                    {\n                        auto& toX = lfX[ x ];\n\n                        TRILINEAR_INTERPOLATE( target[x], toX, toY, toZ, urow0, urow1, vrow0, vrow1 );\n                    }\n\n                    if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                        return E_FAIL;\n                    pDest += dest->rowPitch;\n                }\n            }\n        }\n        else\n        {\n            // 2D linear filter\n            const Image* src = mipChain.GetImage( level-1, 0, 0 );\n            const Image* dest = mipChain.GetImage( level, 0, 0 );\n\n            if ( !src || !dest )\n                return E_POINTER;\n\n            const uint8_t* pSrc = src->pixels;\n            uint8_t* pDest = dest->pixels;\n\n            size_t rowPitch = src->rowPitch;\n\n            size_t u0 = size_t(-1);\n            size_t u1 = size_t(-1);\n\n            for( size_t y = 0; y < nheight; ++y )\n            {\n                auto& toY = lfY[ y ];\n\n                if ( toY.u0 != u0 )\n                {\n                    if ( toY.u0 != u1 )\n                    {\n                        u0 = toY.u0;\n\n                        if ( !_LoadScanlineLinear( urow0, width, pSrc + (rowPitch * u0), rowPitch, src->format, filter ) )\n                            return E_FAIL;\n                    }\n                    else\n                    {\n                        u0 = u1;\n                        u1 = size_t(-1);\n\n                        std::swap( urow0, urow1 );\n                    }\n                }\n\n                if ( toY.u1 != u1 )\n                {\n                    u1 = toY.u1;\n\n                    if ( !_LoadScanlineLinear( urow1, width, pSrc + (rowPitch * u1), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n\n                for( size_t x = 0; x < nwidth; ++x )\n                {\n                    auto& toX = lfX[ x ];\n\n                    BILINEAR_INTERPOLATE( target[x], toX, toY, urow0, urow1 );\n                }\n\n                if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                    return E_FAIL;\n                pDest += dest->rowPitch;\n            }\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 3D Cubic Filter ---\nstatic HRESULT _Generate3DMipsCubicFilter( _In_ size_t depth, _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain )\n{\n    if ( !depth || !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    // This assumes that the base images are already placed into the mipChain at the top level... (see _Setup3DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate temporary space (17 scanlines, plus X/Y/Z filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*17), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<CubicFilter[]> cf( new (std::nothrow) CubicFilter[ width+height+depth ] );\n    if ( !cf )\n        return E_OUTOFMEMORY;\n\n    CubicFilter* cfX = cf.get();\n    CubicFilter* cfY = cf.get() + width;\n    CubicFilter* cfZ = cf.get() + width + height;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* urow[4];\n    XMVECTOR* vrow[4];\n    XMVECTOR* srow[4];\n    XMVECTOR* trow[4];\n\n    XMVECTOR *ptr = scanline.get() + width;\n    for( size_t j = 0; j < 4; ++j )\n    {\n        urow[j] = ptr;  ptr += width;\n        vrow[j] = ptr;  ptr += width;\n        srow[j] = ptr;  ptr += width;\n        trow[j] = ptr;  ptr += width;\n    }\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        _CreateCubicFilter( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, (filter & TEX_FILTER_MIRROR_U) != 0, cfX );\n\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        _CreateCubicFilter( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, (filter & TEX_FILTER_MIRROR_V) != 0, cfY );\n\n#ifdef _DEBUG\n        for( size_t j = 0; j < 4; ++j )\n        {\n            memset( urow[j], 0xCD, sizeof(XMVECTOR)*width );\n            memset( vrow[j], 0xDD, sizeof(XMVECTOR)*width );\n            memset( srow[j], 0xED, sizeof(XMVECTOR)*width );\n            memset( trow[j], 0xFD, sizeof(XMVECTOR)*width );\n        }\n#endif\n\n        if ( depth > 1 )\n        {\n            // 3D cubic filter\n            size_t ndepth = depth >> 1;\n            _CreateCubicFilter( depth, ndepth, (filter & TEX_FILTER_WRAP_W) != 0, (filter & TEX_FILTER_MIRROR_W) != 0, cfZ );\n\n            for( size_t slice=0; slice < ndepth; ++slice )\n            {\n                auto& toZ = cfZ[ slice ];\n\n                const Image* srca = mipChain.GetImage( level-1, 0, toZ.u0 );\n                const Image* srcb = mipChain.GetImage( level-1, 0, toZ.u1 );\n                const Image* srcc = mipChain.GetImage( level-1, 0, toZ.u2 );\n                const Image* srcd = mipChain.GetImage( level-1, 0, toZ.u3 );\n                if ( !srca || !srcb || !srcc || !srcd )\n                    return E_POINTER;\n\n                size_t u0 = size_t(-1);\n                size_t u1 = size_t(-1);\n                size_t u2 = size_t(-1);\n                size_t u3 = size_t(-1);\n\n                const Image* dest = mipChain.GetImage( level, 0, slice );\n                if ( !dest )\n                    return E_POINTER;\n\n                uint8_t* pDest = dest->pixels;\n\n                for( size_t y = 0; y < nheight; ++y )\n                {\n                    auto& toY = cfY[ y ];\n\n                    // Scanline 1\n                    if ( toY.u0 != u0 )\n                    {\n                        if ( toY.u0 != u1 && toY.u0 != u2 && toY.u0 != u3 )\n                        {\n                            u0 = toY.u0;\n\n                            if ( !_LoadScanlineLinear( urow[0], width, srca->pixels + (srca->rowPitch * u0), srca->rowPitch, srca->format, filter )\n                                    || !_LoadScanlineLinear( urow[1], width, srcb->pixels + (srcb->rowPitch * u0), srcb->rowPitch, srcb->format, filter )\n                                    || !_LoadScanlineLinear( urow[2], width, srcc->pixels + (srcc->rowPitch * u0), srcc->rowPitch, srcc->format, filter )\n                                    || !_LoadScanlineLinear( urow[3], width, srcd->pixels + (srcd->rowPitch * u0), srcd->rowPitch, srcd->format, filter ) )\n                                return E_FAIL;\n                        }\n                        else if ( toY.u0 == u1 )\n                        {\n                            u0 = u1;\n                            u1 = size_t(-1);\n\n                            std::swap( urow[0], vrow[0] );\n                            std::swap( urow[1], vrow[1] );\n                            std::swap( urow[2], vrow[2] );\n                            std::swap( urow[3], vrow[3] );\n                        }\n                        else if ( toY.u0 == u2 )\n                        {\n                            u0 = u2;\n                            u2 = size_t(-1);\n\n                            std::swap( urow[0], srow[0] );\n                            std::swap( urow[1], srow[1] );\n                            std::swap( urow[2], srow[2] );\n                            std::swap( urow[3], srow[3] );\n                        }\n                        else if ( toY.u0 == u3 )\n                        {\n                            u0 = u3;\n                            u3 = size_t(-1);\n\n                            std::swap( urow[0], trow[0] );\n                            std::swap( urow[1], trow[1] );\n                            std::swap( urow[2], trow[2] );\n                            std::swap( urow[3], trow[3] );\n                        }\n                    }\n\n                    // Scanline 2\n                    if ( toY.u1 != u1 )\n                    {\n                        if ( toY.u1 != u2 && toY.u1 != u3 )\n                        {\n                            u1 = toY.u1;\n\n                            if ( !_LoadScanlineLinear( vrow[0], width, srca->pixels + (srca->rowPitch * u1), srca->rowPitch, srca->format, filter )\n                                    || !_LoadScanlineLinear( vrow[1], width, srcb->pixels + (srcb->rowPitch * u1), srcb->rowPitch, srcb->format, filter )\n                                    || !_LoadScanlineLinear( vrow[2], width, srcc->pixels + (srcc->rowPitch * u1), srcc->rowPitch, srcc->format, filter )\n                                    || !_LoadScanlineLinear( vrow[3], width, srcd->pixels + (srcd->rowPitch * u1), srcd->rowPitch, srcd->format, filter ) )\n                                return E_FAIL;\n                        }\n                        else if ( toY.u1 == u2 )\n                        {\n                            u1 = u2;\n                            u2 = size_t(-1);\n\n                            std::swap( vrow[0], srow[0] );\n                            std::swap( vrow[1], srow[1] );\n                            std::swap( vrow[2], srow[2] );\n                            std::swap( vrow[3], srow[3] );\n                        }\n                        else if ( toY.u1 == u3 )\n                        {\n                            u1 = u3;\n                            u3 = size_t(-1);\n\n                            std::swap( vrow[0], trow[0] );\n                            std::swap( vrow[1], trow[1] );\n                            std::swap( vrow[2], trow[2] );\n                            std::swap( vrow[3], trow[3] );\n                        }\n                    }\n\n                    // Scanline 3\n                    if ( toY.u2 != u2 )\n                    {\n                        if ( toY.u2 != u3 )\n                        {\n                            u2 = toY.u2;\n\n                            if ( !_LoadScanlineLinear( srow[0], width, srca->pixels + (srca->rowPitch * u2), srca->rowPitch, srca->format, filter )\n                                    || !_LoadScanlineLinear( srow[1], width, srcb->pixels + (srcb->rowPitch * u2), srcb->rowPitch, srcb->format, filter )\n                                    || !_LoadScanlineLinear( srow[2], width, srcc->pixels + (srcc->rowPitch * u2), srcc->rowPitch, srcc->format, filter )\n                                    || !_LoadScanlineLinear( srow[3], width, srcd->pixels + (srcd->rowPitch * u2), srcd->rowPitch, srcd->format, filter ) )\n                                return E_FAIL;\n                        }\n                        else\n                        {\n                            u2 = u3;\n                            u3 = size_t(-1);\n\n                            std::swap( srow[0], trow[0] );\n                            std::swap( srow[1], trow[1] );\n                            std::swap( srow[2], trow[2] );\n                            std::swap( srow[3], trow[3] );\n                        }\n                    }\n\n                    // Scanline 4\n                    if ( toY.u3 != u3 )\n                    {\n                        u3 = toY.u3;\n\n                        if ( !_LoadScanlineLinear( trow[0], width, srca->pixels + (srca->rowPitch * u3), srca->rowPitch, srca->format, filter )\n                                || !_LoadScanlineLinear( trow[1], width, srcb->pixels + (srcb->rowPitch * u3), srcb->rowPitch, srcb->format, filter )\n                                || !_LoadScanlineLinear( trow[2], width, srcc->pixels + (srcc->rowPitch * u3), srcc->rowPitch, srcc->format, filter )\n                                || !_LoadScanlineLinear( trow[3], width, srcd->pixels + (srcd->rowPitch * u3), srcd->rowPitch, srcd->format, filter ) )\n                            return E_FAIL;\n                    }\n\n                    for( size_t x = 0; x < nwidth; ++x )\n                    {\n                        auto& toX = cfX[ x ];\n\n                        XMVECTOR D[4];\n\n                        for( size_t j=0; j < 4; ++j )\n                        {\n                            XMVECTOR C0, C1, C2, C3;\n                            CUBIC_INTERPOLATE( C0, toX.x, urow[j][ toX.u0 ], urow[j][ toX.u1 ], urow[j][ toX.u2 ], urow[j][ toX.u3 ] );\n                            CUBIC_INTERPOLATE( C1, toX.x, vrow[j][ toX.u0 ], vrow[j][ toX.u1 ], vrow[j][ toX.u2 ], vrow[j][ toX.u3 ] );\n                            CUBIC_INTERPOLATE( C2, toX.x, srow[j][ toX.u0 ], srow[j][ toX.u1 ], srow[j][ toX.u2 ], srow[j][ toX.u3 ] );\n                            CUBIC_INTERPOLATE( C3, toX.x, trow[j][ toX.u0 ], trow[j][ toX.u1 ], trow[j][ toX.u2 ], trow[j][ toX.u3 ] );\n\n                            CUBIC_INTERPOLATE( D[j], toY.x, C0, C1, C2, C3 );\n                        }\n\n                        CUBIC_INTERPOLATE( target[x], toZ.x, D[0], D[1], D[2], D[3] );\n                    }\n\n                    if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                        return E_FAIL;\n                    pDest += dest->rowPitch;\n                }\n            }\n        }\n        else\n        {\n            // 2D cubic filter\n            const Image* src = mipChain.GetImage( level-1, 0, 0 );\n            const Image* dest = mipChain.GetImage( level, 0, 0 );\n\n            if ( !src || !dest )\n                return E_POINTER;\n\n            const uint8_t* pSrc = src->pixels;\n            uint8_t* pDest = dest->pixels;\n\n            size_t rowPitch = src->rowPitch;\n\n            size_t u0 = size_t(-1);\n            size_t u1 = size_t(-1);\n            size_t u2 = size_t(-1);\n            size_t u3 = size_t(-1);\n\n            for( size_t y = 0; y < nheight; ++y )\n            {\n                auto& toY = cfY[ y ];\n\n                // Scanline 1\n                if ( toY.u0 != u0 )\n                {\n                    if ( toY.u0 != u1 && toY.u0 != u2 && toY.u0 != u3 )\n                    {\n                        u0 = toY.u0;\n\n                        if ( !_LoadScanlineLinear( urow[0], width, pSrc + (rowPitch * u0), rowPitch, src->format, filter ) )\n                            return E_FAIL;\n                    }\n                    else if ( toY.u0 == u1 )\n                    {\n                        u0 = u1;\n                        u1 = size_t(-1);\n\n                        std::swap( urow[0], vrow[0] );\n                    }\n                    else if ( toY.u0 == u2 )\n                    {\n                        u0 = u2;\n                        u2 = size_t(-1);\n\n                        std::swap( urow[0], srow[0] );\n                    }\n                    else if ( toY.u0 == u3 )\n                    {\n                        u0 = u3;\n                        u3 = size_t(-1);\n\n                        std::swap( urow[0], trow[0] );\n                    }\n                }\n\n                // Scanline 2\n                if ( toY.u1 != u1 )\n                {\n                    if ( toY.u1 != u2 && toY.u1 != u3 )\n                    {\n                        u1 = toY.u1;\n\n                        if ( !_LoadScanlineLinear( vrow[0], width, pSrc + (rowPitch * u1), rowPitch, src->format, filter ) )\n                            return E_FAIL;\n                    }\n                    else if ( toY.u1 == u2 )\n                    {\n                        u1 = u2;\n                        u2 = size_t(-1);\n\n                        std::swap( vrow[0], srow[0] );\n                    }\n                    else if ( toY.u1 == u3 )\n                    {\n                        u1 = u3;\n                        u3 = size_t(-1);\n\n                        std::swap( vrow[0], trow[0] );\n                    }\n                }\n\n                // Scanline 3\n                if ( toY.u2 != u2 )\n                {\n                    if ( toY.u2 != u3 )\n                    {\n                        u2 = toY.u2;\n\n                        if ( !_LoadScanlineLinear( srow[0], width, pSrc + (rowPitch * u2), rowPitch, src->format, filter ) )\n                            return E_FAIL;\n                    }\n                    else\n                    {\n                        u2 = u3;\n                        u3 = size_t(-1);\n\n                        std::swap( srow[0], trow[0] );\n                    }\n                }\n\n                // Scanline 4\n                if ( toY.u3 != u3 )\n                {\n                    u3 = toY.u3;\n\n                    if ( !_LoadScanlineLinear( trow[0], width, pSrc + (rowPitch * u3), rowPitch, src->format, filter ) )\n                        return E_FAIL;\n                }\n\n                for( size_t x = 0; x < nwidth; ++x )\n                {\n                    auto& toX = cfX[ x ];\n\n                    XMVECTOR C0, C1, C2, C3;\n                    CUBIC_INTERPOLATE( C0, toX.x, urow[0][ toX.u0 ], urow[0][ toX.u1 ], urow[0][ toX.u2 ], urow[0][ toX.u3 ] );\n                    CUBIC_INTERPOLATE( C1, toX.x, vrow[0][ toX.u0 ], vrow[0][ toX.u1 ], vrow[0][ toX.u2 ], vrow[0][ toX.u3 ] );\n                    CUBIC_INTERPOLATE( C2, toX.x, srow[0][ toX.u0 ], srow[0][ toX.u1 ], srow[0][ toX.u2 ], srow[0][ toX.u3 ] );\n                    CUBIC_INTERPOLATE( C3, toX.x, trow[0][ toX.u0 ], trow[0][ toX.u1 ], trow[0][ toX.u2 ], trow[0][ toX.u3 ] );\n\n                    CUBIC_INTERPOLATE( target[x], toY.x, C0, C1, C2, C3 );\n                }\n\n                if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, target, nwidth, filter ) )\n                    return E_FAIL;\n                pDest += dest->rowPitch;\n            }\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//--- 3D Triangle Filter ---\nstatic HRESULT _Generate3DMipsTriangleFilter( _In_ size_t depth, _In_ size_t levels, _In_ DWORD filter, _In_ const ScratchImage& mipChain )\n{\n    if ( !depth || !mipChain.GetImages() )\n        return E_INVALIDARG;\n\n    using namespace TriangleFilter;\n\n    // This assumes that the base images are already placed into the mipChain at the top level... (see _Setup3DMips)\n\n    assert( levels > 1 );\n\n    size_t width = mipChain.GetMetadata().width;\n    size_t height = mipChain.GetMetadata().height;\n\n    // Allocate initial temporary space (1 scanline, accumulation rows, plus X/Y/Z filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( sizeof(XMVECTOR) * width, 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<TriangleRow[]> sliceActive( new (std::nothrow) TriangleRow[ depth ] );\n    if ( !sliceActive )\n        return E_OUTOFMEMORY;\n\n    TriangleRow * sliceFree = nullptr;\n\n    std::unique_ptr<Filter> tfX, tfY, tfZ;\n\n    XMVECTOR* row = scanline.get();\n\n    // Resize base image to each target mip level\n    for( size_t level=1; level < levels; ++level )\n    {\n        size_t nwidth = (width > 1) ? (width >> 1) : 1;\n        HRESULT hr = _Create( width, nwidth, (filter & TEX_FILTER_WRAP_U) != 0, tfX );\n        if ( FAILED(hr) )\n            return hr;\n\n        size_t nheight = (height > 1) ? (height >> 1) : 1;\n        hr = _Create( height, nheight, (filter & TEX_FILTER_WRAP_V) != 0, tfY );\n        if ( FAILED(hr) )\n            return hr;\n\n        size_t ndepth = (depth > 1 ) ? (depth >> 1) : 1;\n        hr = _Create( depth, ndepth, (filter & TEX_FILTER_WRAP_W) != 0, tfZ );\n        if ( FAILED(hr) )\n            return hr;\n\n#ifdef _DEBUG\n        memset( row, 0xCD, sizeof(XMVECTOR)*width );\n#endif\n\n        auto xFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfX.get() ) + tfX->sizeInBytes );\n        auto yFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfY.get() ) + tfY->sizeInBytes );\n        auto zFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfZ.get() ) + tfZ->sizeInBytes );\n\n        // Count times slices get written (and clear out any leftover accumulation slices from last miplevel)\n        for( FilterFrom* zFrom = tfZ->from; zFrom < zFromEnd; )\n        {\n            for ( size_t j = 0; j < zFrom->count; ++j )\n            {\n                size_t w = zFrom->to[ j ].u;\n                assert( w < ndepth );\n                TriangleRow* sliceAcc = &sliceActive[ w ];\n\n                ++sliceAcc->remaining;\n\n                if ( sliceAcc->scanline )\n                {\n                    memset( sliceAcc->scanline.get(), 0, sizeof(XMVECTOR) * nwidth * nheight );\n                }\n            }\n\n            zFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( zFrom ) + zFrom->sizeInBytes );\n        }\n\n        // Filter image\n        size_t z = 0;\n        for( FilterFrom* zFrom = tfZ->from; zFrom < zFromEnd; ++z )\n        {\n            // Create accumulation slices as needed\n            for ( size_t j = 0; j < zFrom->count; ++j )\n            {\n                size_t w = zFrom->to[ j ].u;\n                assert( w < ndepth );\n                TriangleRow* sliceAcc = &sliceActive[ w ];\n\n                if ( !sliceAcc->scanline )\n                {\n                    if ( sliceFree )\n                    {\n                        // Steal and reuse scanline from 'free slice' list\n                        // (it will always be at least as large as nwidth*nheight due to loop decending order)\n                        assert( sliceFree->scanline != 0 );\n                        sliceAcc->scanline.reset( sliceFree->scanline.release() );\n                        sliceFree = sliceFree->next;\n                    }\n                    else\n                    {\n                        size_t bytes = sizeof(XMVECTOR) * nwidth * nheight;\n                        sliceAcc->scanline.reset( reinterpret_cast<XMVECTOR*>( _aligned_malloc( bytes, 16 ) ) );\n                        if ( !sliceAcc->scanline )\n                            return E_OUTOFMEMORY;\n                    }\n\n                    memset( sliceAcc->scanline.get(), 0, sizeof(XMVECTOR) * nwidth * nheight );\n                }\n            }\n\n            assert( z < depth );\n            const Image* src = mipChain.GetImage( level-1, 0, z );\n            if ( !src )\n                return E_POINTER;\n\n            const uint8_t* pSrc = src->pixels;\n            size_t rowPitch = src->rowPitch;\n            const uint8_t* pEndSrc = pSrc + rowPitch * height;\n\n            for( FilterFrom* yFrom = tfY->from; yFrom < yFromEnd; )\n            {\n                // Load source scanline\n                if ( (pSrc + rowPitch) > pEndSrc )\n                    return E_FAIL;\n\n                if ( !_LoadScanlineLinear( row, width, pSrc, rowPitch, src->format, filter ) )\n                    return E_FAIL;\n\n                pSrc += rowPitch;\n\n                // Process row\n                size_t x = 0;\n                for( FilterFrom* xFrom = tfX->from; xFrom < xFromEnd; ++x )\n                {\n                    for ( size_t j = 0; j < zFrom->count; ++j )\n                    {\n                        size_t w = zFrom->to[ j ].u;\n                        assert( w < ndepth );\n                        float zweight = zFrom->to[ j ].weight;\n\n                        XMVECTOR* accSlice = sliceActive[ w ].scanline.get();\n                        if ( !accSlice )\n                            return E_POINTER;\n\n                        for ( size_t k = 0; k < yFrom->count; ++k )\n                        {\n                            size_t v = yFrom->to[ k ].u;\n                            assert( v < nheight );\n                            float yweight = yFrom->to[ k ].weight;\n\n                            XMVECTOR * accPtr = accSlice + v * nwidth;\n\n                            for ( size_t l = 0; l < xFrom->count; ++l )\n                            {\n                                size_t u = xFrom->to[ l ].u;\n                                assert( u < nwidth );\n\n                                XMVECTOR weight = XMVectorReplicate( zweight * yweight * xFrom->to[ l ].weight );\n\n                                assert( x < width );\n                                accPtr[ u ] = XMVectorMultiplyAdd( row[ x ], weight, accPtr[ u ] );\n                            }\n                        }\n                    }\n\n                    xFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( xFrom ) + xFrom->sizeInBytes );\n                }\n\n                yFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( yFrom ) + yFrom->sizeInBytes );\n            }\n\n            // Write completed accumulation slices\n            for ( size_t j = 0; j < zFrom->count; ++j )\n            {\n                size_t w = zFrom->to[ j ].u;\n                assert( w < ndepth );\n                TriangleRow* sliceAcc = &sliceActive[ w ];\n\n                assert( sliceAcc->remaining > 0 );\n                --sliceAcc->remaining;\n\n                if ( !sliceAcc->remaining )\n                {\n                    const Image* dest = mipChain.GetImage( level, 0, w );\n                    XMVECTOR* pAccSrc = sliceAcc->scanline.get();\n                    if ( !dest || !pAccSrc )\n                        return E_POINTER;\n\n                    uint8_t* pDest = dest->pixels;\n\n                    for( size_t h = 0; h < nheight; ++h )\n                    {\n                        switch( dest->format )\n                        {\n                        case DXGI_FORMAT_R10G10B10A2_UNORM:\n                        case DXGI_FORMAT_R10G10B10A2_UINT:\n                            {\n                                // Need to slightly bias results for floating-point error accumulation which can\n                                // be visible with harshly quantized values\n                                static const XMVECTORF32 Bias = { 0.f, 0.f, 0.f, 0.1f };\n                       \n                                XMVECTOR* ptr = pAccSrc;\n                                for( size_t i=0; i < dest->width; ++i, ++ptr )\n                                {\n                                    *ptr = XMVectorAdd( *ptr, Bias );\n                                }\n                            }\n                            break;\n                        }\n\n                        // This performs any required clamping\n                        if ( !_StoreScanlineLinear( pDest, dest->rowPitch, dest->format, pAccSrc, dest->width, filter ) )\n                            return E_FAIL;\n\n                        pDest += dest->rowPitch;\n                        pAccSrc += nwidth;\n                    }\n\n                    // Put slice on freelist to reuse it's allocated scanline\n                    sliceAcc->next = sliceFree;\n                    sliceFree = sliceAcc;\n                }\n            }\n\n            zFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( zFrom ) + zFrom->sizeInBytes );\n        }\n\n        if ( height > 1 )\n            height >>= 1;\n\n        if ( width > 1 )\n            width >>= 1;\n\n        if ( depth > 1 )\n            depth >>= 1;\n    }\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Generate mipmap chain\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GenerateMipMaps( const Image& baseImage, DWORD filter, size_t levels, ScratchImage& mipChain, bool allow1D )\n{\n    if ( !IsValid( baseImage.format ) )\n        return E_INVALIDARG;\n\n    if ( !baseImage.pixels )\n        return E_POINTER;\n\n    if ( !_CalculateMipLevels(baseImage.width, baseImage.height, levels) )\n        return E_INVALIDARG;\n\n    if ( levels <= 1 )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(baseImage.format) || IsTypeless(baseImage.format) || IsPlanar(baseImage.format) || IsPalettized(baseImage.format) )\n    {\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    HRESULT hr;\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    if ( _UseWICFiltering( baseImage.format, filter ) )\n    {\n        //--- Use WIC filtering to generate mipmaps -----------------------------------\n        switch(filter & TEX_FILTER_MASK)\n        {\n            case 0:\n            case TEX_FILTER_POINT:\n            case TEX_FILTER_FANT: // Equivalent to Box filter\n            case TEX_FILTER_LINEAR:\n            case TEX_FILTER_CUBIC:\n                {\n                    static_assert( TEX_FILTER_FANT == TEX_FILTER_BOX, \"TEX_FILTER_ flag alias mismatch\" );\n\n                    WICPixelFormatGUID pfGUID;\n                    if ( _DXGIToWIC( baseImage.format, pfGUID, true ) )\n                    {\n                        // Case 1: Base image format is supported by Windows Imaging Component\n                        hr = (baseImage.height > 1 || !allow1D)\n                             ? mipChain.Initialize2D( baseImage.format, baseImage.width, baseImage.height, 1, levels )\n                             : mipChain.Initialize1D( baseImage.format, baseImage.width, 1, levels ); \n                        if ( FAILED(hr) )\n                            return hr;\n\n                        return _GenerateMipMapsUsingWIC( baseImage, filter, levels, pfGUID, mipChain, 0 );\n                    }\n                    else\n                    {\n                        // Case 2: Base image format is not supported by WIC, so we have to convert, generate, and convert back\n                        assert( baseImage.format != DXGI_FORMAT_R32G32B32A32_FLOAT );\n                        ScratchImage temp;\n                        hr = _ConvertToR32G32B32A32( baseImage, temp );\n                        if ( FAILED(hr) )\n                            return hr;\n\n                        const Image *timg = temp.GetImage( 0, 0, 0 );\n                        if ( !timg )\n                            return E_POINTER;\n\n                        ScratchImage tMipChain;\n                        hr = (baseImage.height > 1 || !allow1D)\n                             ? tMipChain.Initialize2D( DXGI_FORMAT_R32G32B32A32_FLOAT, baseImage.width, baseImage.height, 1, levels )\n                             : tMipChain.Initialize1D( DXGI_FORMAT_R32G32B32A32_FLOAT, baseImage.width, 1, levels ); \n                        if ( FAILED(hr) )\n                            return hr;\n\n                        hr = _GenerateMipMapsUsingWIC( *timg, filter, levels, GUID_WICPixelFormat128bppRGBAFloat, tMipChain, 0 );\n                        if ( FAILED(hr) )\n                            return hr;\n\n                        temp.Release();\n\n                        return _ConvertFromR32G32B32A32( tMipChain.GetImages(), tMipChain.GetImageCount(), tMipChain.GetMetadata(), baseImage.format, mipChain );\n                    }\n                }\n                break;\n\n            default:\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n    }\n    else\n    {\n        //--- Use custom filters to generate mipmaps ----------------------------------\n        TexMetadata mdata;\n        memset( &mdata, 0, sizeof(mdata) );\n        mdata.width = baseImage.width;\n        if ( baseImage.height > 1 || !allow1D )\n        {\n            mdata.height =  baseImage.height;\n            mdata.dimension = TEX_DIMENSION_TEXTURE2D;\n        }\n        else\n        {\n            mdata.height = 1;\n            mdata.dimension= TEX_DIMENSION_TEXTURE1D;\n        }\n        mdata.depth = mdata.arraySize = 1;\n        mdata.mipLevels = levels;\n        mdata.format = baseImage.format;\n\n        DWORD filter_select = ( filter & TEX_FILTER_MASK );\n        if ( !filter_select )\n        {\n            // Default filter choice\n            filter_select = ( ispow2(baseImage.width) && ispow2(baseImage.height) ) ? TEX_FILTER_BOX : TEX_FILTER_LINEAR;\n        }\n\n        switch( filter_select )\n        {\n            case TEX_FILTER_BOX:\n                hr = _Setup2DMips( &baseImage, 1, mdata, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = _Generate2DMipsBoxFilter( levels, filter, mipChain, 0 );\n                if ( FAILED(hr) )\n                    mipChain.Release();\n                return hr;\n\n            case TEX_FILTER_POINT:\n                hr = _Setup2DMips( &baseImage, 1, mdata, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = _Generate2DMipsPointFilter( levels, mipChain, 0 );\n                if ( FAILED(hr) )\n                    mipChain.Release();\n                return hr;\n\n            case TEX_FILTER_LINEAR:\n                hr = _Setup2DMips( &baseImage, 1, mdata, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = _Generate2DMipsLinearFilter( levels, filter, mipChain, 0 );\n                if ( FAILED(hr) )\n                    mipChain.Release();\n                return hr;\n\n            case TEX_FILTER_CUBIC:\n                hr = _Setup2DMips( &baseImage, 1, mdata, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = _Generate2DMipsCubicFilter( levels, filter, mipChain, 0 );\n                if ( FAILED(hr) )\n                    mipChain.Release();\n                return hr;\n\n            case TEX_FILTER_TRIANGLE:\n                hr = _Setup2DMips( &baseImage, 1, mdata, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = _Generate2DMipsTriangleFilter( levels, filter, mipChain, 0 );\n                if ( FAILED(hr) )\n                    mipChain.Release();\n                return hr;\n\n            default:\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n    }\n}\n\n_Use_decl_annotations_\nHRESULT GenerateMipMaps( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                         DWORD filter, size_t levels, ScratchImage& mipChain )\n{\n    if ( !srcImages || !nimages || !IsValid(metadata.format) )\n        return E_INVALIDARG;\n\n    if ( metadata.IsVolumemap()\n         || IsCompressed(metadata.format) || IsTypeless(metadata.format) || IsPlanar(metadata.format) || IsPalettized(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !_CalculateMipLevels(metadata.width, metadata.height, levels) )\n        return E_INVALIDARG;\n\n    if ( levels <= 1 )\n        return E_INVALIDARG;\n\n    std::vector<Image> baseImages;\n    baseImages.reserve( metadata.arraySize );\n    for( size_t item=0; item < metadata.arraySize; ++item )\n    {\n        size_t index = metadata.ComputeIndex( 0, item, 0);\n        if ( index >= nimages )\n            return E_FAIL;\n\n        const Image& src = srcImages[ index ];\n        if ( !src.pixels )\n            return E_POINTER;\n\n        if ( src.format != metadata.format || src.width != metadata.width || src.height != metadata.height )\n        {\n            // All base images must be the same format, width, and height\n            return E_FAIL;\n        }\n\n        baseImages.push_back( src );\n    }\n\n    assert( baseImages.size() == metadata.arraySize );\n\n    HRESULT hr;\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    if ( _UseWICFiltering( metadata.format, filter ) )\n    {\n        //--- Use WIC filtering to generate mipmaps -----------------------------------\n        switch(filter & TEX_FILTER_MASK)\n        {\n        case 0:\n        case TEX_FILTER_POINT:\n        case TEX_FILTER_FANT: // Equivalent to Box filter\n        case TEX_FILTER_LINEAR:\n        case TEX_FILTER_CUBIC:\n            {\n                static_assert( TEX_FILTER_FANT == TEX_FILTER_BOX, \"TEX_FILTER_ flag alias mismatch\" );\n\n                WICPixelFormatGUID pfGUID;\n                if ( _DXGIToWIC( metadata.format, pfGUID, true ) )\n                {\n                    // Case 1: Base image format is supported by Windows Imaging Component\n                    TexMetadata mdata2 = metadata;\n                    mdata2.mipLevels = levels;\n                    hr = mipChain.Initialize( mdata2 ); \n                    if ( FAILED(hr) )\n                        return hr;\n\n                    for( size_t item = 0; item < metadata.arraySize; ++item )\n                    {\n                        hr = _GenerateMipMapsUsingWIC( baseImages[item], filter, levels, pfGUID, mipChain, item );\n                        if ( FAILED(hr) )\n                        {\n                            mipChain.Release();\n                            return hr;\n                        }\n                    }\n\n                    return S_OK;\n                }\n                else\n                {\n                    // Case 2: Base image format is not supported by WIC, so we have to convert, generate, and convert back\n                    assert( metadata.format != DXGI_FORMAT_R32G32B32A32_FLOAT );\n\n                    TexMetadata mdata2 = metadata;\n                    mdata2.mipLevels = levels;\n                    mdata2.format = DXGI_FORMAT_R32G32B32A32_FLOAT;\n                    ScratchImage tMipChain;\n                    hr = tMipChain.Initialize( mdata2 ); \n                    if ( FAILED(hr) )\n                        return hr;\n\n                    for( size_t item = 0; item < metadata.arraySize; ++item )\n                    {\n                        ScratchImage temp;\n                        hr = _ConvertToR32G32B32A32( baseImages[item], temp );\n                        if ( FAILED(hr) )\n                            return hr;\n\n                        const Image *timg = temp.GetImage( 0, 0, 0 );\n                        if ( !timg )\n                            return E_POINTER;\n\n                        hr = _GenerateMipMapsUsingWIC( *timg, filter, levels, GUID_WICPixelFormat128bppRGBAFloat, tMipChain, item );\n                        if ( FAILED(hr) )\n                            return hr;\n                    }\n\n                    return _ConvertFromR32G32B32A32( tMipChain.GetImages(), tMipChain.GetImageCount(), tMipChain.GetMetadata(), metadata.format, mipChain );\n                }\n            }\n            break;\n\n        default:\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n    }\n    else\n    {\n        //--- Use custom filters to generate mipmaps ----------------------------------\n        TexMetadata mdata2 = metadata;\n        mdata2.mipLevels = levels;\n\n        DWORD filter_select = ( filter & TEX_FILTER_MASK );\n        if ( !filter_select )\n        {\n            // Default filter choice\n            filter_select = ( ispow2(metadata.width) && ispow2(metadata.height) ) ? TEX_FILTER_BOX : TEX_FILTER_LINEAR;\n        }\n\n        switch( filter_select )\n        {\n            case TEX_FILTER_BOX:\n                hr = _Setup2DMips( &baseImages[0], metadata.arraySize, mdata2, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    hr = _Generate2DMipsBoxFilter( levels, filter, mipChain, item );\n                    if ( FAILED(hr) )\n                        mipChain.Release();\n                }\n                return hr;\n\n            case TEX_FILTER_POINT:\n                hr = _Setup2DMips( &baseImages[0], metadata.arraySize, mdata2, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    hr = _Generate2DMipsPointFilter( levels, mipChain, item );\n                    if ( FAILED(hr) )\n                        mipChain.Release();\n                }\n                return hr;\n\n            case TEX_FILTER_LINEAR:\n                hr = _Setup2DMips( &baseImages[0], metadata.arraySize, mdata2, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    hr = _Generate2DMipsLinearFilter( levels, filter, mipChain, item );\n                    if ( FAILED(hr) )\n                        mipChain.Release();\n                }\n                return hr;\n\n            case TEX_FILTER_CUBIC:\n                hr = _Setup2DMips( &baseImages[0], metadata.arraySize, mdata2, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    hr = _Generate2DMipsCubicFilter( levels, filter, mipChain, item );\n                    if ( FAILED(hr) )\n                        mipChain.Release();\n                }\n                return hr;\n\n            case TEX_FILTER_TRIANGLE:\n                hr = _Setup2DMips( &baseImages[0], metadata.arraySize, mdata2, mipChain );\n                if ( FAILED(hr) )\n                    return hr;\n\n                for( size_t item = 0; item < metadata.arraySize; ++item )\n                {\n                    hr = _Generate2DMipsTriangleFilter( levels, filter, mipChain, item );\n                    if ( FAILED(hr) )\n                        mipChain.Release();\n                }\n                return hr;\n\n            default:\n                return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Generate mipmap chain for volume texture\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GenerateMipMaps3D( const Image* baseImages, size_t depth, DWORD filter, size_t levels, ScratchImage& mipChain )\n{\n    if ( !baseImages || !depth )\n        return E_INVALIDARG;\n\n    if ( filter & TEX_FILTER_FORCE_WIC )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    DXGI_FORMAT format = baseImages[0].format;\n    size_t width = baseImages[0].width;\n    size_t height = baseImages[0].height;\n\n    if ( !_CalculateMipLevels3D(width, height, depth, levels) )\n        return E_INVALIDARG;\n\n    if ( levels <= 1 )\n        return E_INVALIDARG;\n\n    for( size_t slice=0; slice < depth; ++slice )\n    {\n        if ( !baseImages[slice].pixels )\n            return E_POINTER;\n\n        if ( baseImages[slice].format != format || baseImages[slice].width != width || baseImages[slice].height != height )\n        {\n            // All base images must be the same format, width, and height\n            return E_FAIL;\n        }\n    }\n\n    if ( IsCompressed(format) || IsTypeless(format) || IsPlanar(format) || IsPalettized(format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    HRESULT hr;\n\n    DWORD filter_select = ( filter & TEX_FILTER_MASK );\n    if ( !filter_select )\n    {\n        // Default filter choice\n        filter_select = ( ispow2(width) && ispow2(height) && ispow2(depth) ) ? TEX_FILTER_BOX : TEX_FILTER_TRIANGLE;\n    }\n\n    switch( filter_select )\n    {\n    case TEX_FILTER_BOX:\n        hr = _Setup3DMips( baseImages, depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsBoxFilter( depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_POINT:\n        hr = _Setup3DMips( baseImages, depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsPointFilter( depth, levels, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_LINEAR:\n        hr = _Setup3DMips( baseImages, depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsLinearFilter( depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_CUBIC:\n        hr = _Setup3DMips( baseImages, depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsCubicFilter( depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_TRIANGLE:\n        hr = _Setup3DMips( baseImages, depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsTriangleFilter( depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n}\n\n_Use_decl_annotations_\nHRESULT GenerateMipMaps3D( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                           DWORD filter, size_t levels, ScratchImage& mipChain )\n{\n    if ( !srcImages || !nimages || !IsValid(metadata.format) )\n        return E_INVALIDARG;\n\n    if ( filter & TEX_FILTER_FORCE_WIC )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !metadata.IsVolumemap()\n         || IsCompressed(metadata.format) || IsTypeless(metadata.format) || IsPlanar(metadata.format) || IsPalettized(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !_CalculateMipLevels3D(metadata.width, metadata.height, metadata.depth, levels) )\n        return E_INVALIDARG;\n\n    if ( levels <= 1 )\n        return E_INVALIDARG;\n\n    std::vector<Image> baseImages;\n    baseImages.reserve( metadata.depth );\n    for( size_t slice=0; slice < metadata.depth; ++slice )\n    {\n        size_t index = metadata.ComputeIndex( 0, 0, slice );\n        if ( index >= nimages )\n            return E_FAIL;\n\n        const Image& src = srcImages[ index ];\n        if ( !src.pixels )\n            return E_POINTER;\n\n        if ( src.format != metadata.format || src.width != metadata.width || src.height != metadata.height )\n        {\n            // All base images must be the same format, width, and height\n            return E_FAIL;\n        }\n\n        baseImages.push_back( src );\n    }\n\n    assert( baseImages.size() == metadata.depth );\n\n    HRESULT hr;\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    DWORD filter_select = ( filter & TEX_FILTER_MASK );\n    if ( !filter_select )\n    {\n        // Default filter choice\n        filter_select = ( ispow2(metadata.width) && ispow2(metadata.height) && ispow2(metadata.depth) ) ? TEX_FILTER_BOX : TEX_FILTER_TRIANGLE;\n    }\n\n    switch( filter_select )\n    {\n    case TEX_FILTER_BOX:\n        hr = _Setup3DMips( &baseImages[0], metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsBoxFilter( metadata.depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_POINT:\n        hr = _Setup3DMips( &baseImages[0], metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsPointFilter( metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_LINEAR:\n        hr = _Setup3DMips( &baseImages[0], metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsLinearFilter( metadata.depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_CUBIC:\n        hr = _Setup3DMips( &baseImages[0], metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsCubicFilter( metadata.depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    case TEX_FILTER_TRIANGLE:\n        hr = _Setup3DMips( &baseImages[0], metadata.depth, levels, mipChain );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = _Generate3DMipsTriangleFilter( metadata.depth, levels, filter, mipChain );\n        if ( FAILED(hr) )\n            mipChain.Release();\n        return hr;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexMisc.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexMisc.cpp\n//  \n// DirectX Texture Library - Misc image operations\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nnamespace DirectX\n{\nstatic const XMVECTORF32 g_Gamma22 = { 2.2f, 2.2f, 2.2f, 1.f };\n\n//-------------------------------------------------------------------------------------\nstatic HRESULT _ComputeMSE( _In_ const Image& image1, _In_ const Image& image2,\n                            _Out_ float& mse, _Out_writes_opt_(4) float* mseV,\n                            _In_ DWORD flags )\n{\n    if ( !image1.pixels || !image2.pixels )\n        return E_POINTER;\n\n    assert( image1.width == image2.width && image1.height == image2.height );\n    assert( !IsCompressed( image1.format ) && !IsCompressed( image2.format )  );\n\n    const size_t width = image1.width;\n\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width)*2, 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    // Flags implied from image formats\n    switch( image1.format )\n    {\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n        flags |= CMSE_IGNORE_ALPHA;\n        break;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        flags |= CMSE_IMAGE1_SRGB | CMSE_IGNORE_ALPHA;\n        break;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        flags |= CMSE_IMAGE1_SRGB;\n        break;\n    }\n\n    switch( image2.format )\n    {\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n        flags |= CMSE_IGNORE_ALPHA;\n        break;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        flags |= CMSE_IMAGE2_SRGB | CMSE_IGNORE_ALPHA;\n        break;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        flags |= CMSE_IMAGE2_SRGB;\n        break;\n    }\n\n    const uint8_t *pSrc1 = image1.pixels;\n    const size_t rowPitch1 = image1.rowPitch;\n\n    const uint8_t *pSrc2 = image2.pixels;\n    const size_t rowPitch2 = image2.rowPitch;\n\n    XMVECTOR acc = g_XMZero;\n    static XMVECTORF32 two = { 2.0f, 2.0f, 2.0f, 2.0f };\n\n    for( size_t h = 0; h < image1.height; ++h )\n    {\n        XMVECTOR* ptr1 = scanline.get();\n        if ( !_LoadScanline( ptr1, width, pSrc1, rowPitch1, image1.format ) )\n            return E_FAIL;\n\n        XMVECTOR* ptr2 = scanline.get() + width;\n        if ( !_LoadScanline( ptr2, width, pSrc2, rowPitch2, image2.format ) )\n            return E_FAIL;\n\n        for( size_t i = 0; i < width; ++i )\n        {\n            XMVECTOR v1 = *(ptr1++);\n            if ( flags & CMSE_IMAGE1_SRGB )\n            {\n                v1 = XMVectorPow( v1, g_Gamma22 );\n            }\n            if ( flags & CMSE_IMAGE1_X2_BIAS )\n            {\n                v1 = XMVectorMultiplyAdd( v1, two, g_XMNegativeOne );\n            }\n\n            XMVECTOR v2 = *(ptr2++);\n            if ( flags & CMSE_IMAGE2_SRGB )\n            {\n                v2 = XMVectorPow( v2, g_Gamma22 );\n            }\n            if ( flags & CMSE_IMAGE2_X2_BIAS )\n            {\n                v1 = XMVectorMultiplyAdd( v2, two, g_XMNegativeOne );\n            }\n\n            // sum[ (I1 - I2)^2 ]\n            XMVECTOR v = XMVectorSubtract( v1, v2 );\n            if ( flags & CMSE_IGNORE_RED )\n            {\n                v = XMVectorSelect( v, g_XMZero, g_XMMaskX );\n            }\n            if ( flags & CMSE_IGNORE_GREEN )\n            {\n                v = XMVectorSelect( v, g_XMZero, g_XMMaskY );\n            }\n            if ( flags & CMSE_IGNORE_BLUE )\n            {\n                v = XMVectorSelect( v, g_XMZero, g_XMMaskZ );\n            }\n            if ( flags & CMSE_IGNORE_ALPHA )\n            {\n                v = XMVectorSelect( v, g_XMZero, g_XMMaskW );\n            }\n\n            acc = XMVectorMultiplyAdd( v, v, acc );\n        }\n\n        pSrc1 += rowPitch1;\n        pSrc2 += rowPitch2;\n    }\n\n    // MSE = sum[ (I1 - I2)^2 ] / w*h\n    XMVECTOR d = XMVectorReplicate( float(image1.width * image1.height) );\n    XMVECTOR v = XMVectorDivide( acc, d );\n    if ( mseV )\n    {\n        XMStoreFloat4( reinterpret_cast<XMFLOAT4*>( mseV ), v );\n        mse = mseV[0] + mseV[1] + mseV[2] + mseV[3];\n    }\n    else\n    {\n        XMFLOAT4 _mseV;\n        XMStoreFloat4( &_mseV, v );\n        mse = _mseV.x + _mseV.y + _mseV.z + _mseV.w;\n    }\n\n    return S_OK; \n}\n\n\n//=====================================================================================\n// Entry points\n//=====================================================================================\n        \n//-------------------------------------------------------------------------------------\n// Copies a rectangle from one image into another\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT CopyRectangle( const Image& srcImage, const Rect& srcRect, const Image& dstImage, DWORD filter, size_t xOffset, size_t yOffset )\n{\n    if ( !srcImage.pixels || !dstImage.pixels )\n        return E_POINTER;\n\n    if ( IsCompressed( srcImage.format ) || IsCompressed( dstImage.format )\n         || IsPlanar( srcImage.format ) || IsPlanar( dstImage.format )\n         || IsPalettized( srcImage.format ) || IsPalettized( dstImage.format ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    // Validate rectangle/offset\n    if ( !srcRect.w || !srcRect.h || ( (srcRect.x + srcRect.w) > srcImage.width ) || ( (srcRect.y + srcRect.h) > srcImage.height ) )\n    {\n        return E_INVALIDARG;\n    }\n\n    if ( ( (xOffset + srcRect.w) > dstImage.width ) || ( (yOffset + srcRect.h) > dstImage.height ) )\n    {\n        return E_INVALIDARG;\n    }\n\n    // Compute source bytes-per-pixel\n    size_t sbpp = BitsPerPixel( srcImage.format );\n    if ( !sbpp )\n        return E_FAIL;\n\n    if ( sbpp < 8 )\n    {\n        // We don't support monochrome (DXGI_FORMAT_R1_UNORM)\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    const uint8_t* pEndSrc = srcImage.pixels + srcImage.rowPitch*srcImage.height;\n    const uint8_t* pEndDest = dstImage.pixels + dstImage.rowPitch*dstImage.height;\n\n    // Round to bytes\n    sbpp = ( sbpp + 7 ) / 8;\n\n    const uint8_t* pSrc = srcImage.pixels + (srcRect.y * srcImage.rowPitch) + (srcRect.x * sbpp);\n\n    if ( srcImage.format == dstImage.format )\n    {\n        // Direct copy case (avoid intermediate conversions)\n        uint8_t* pDest = dstImage.pixels + (yOffset * dstImage.rowPitch) + (xOffset * sbpp);\n        const size_t copyW = srcRect.w * sbpp;\n        for( size_t h=0; h < srcRect.h; ++h )\n        {\n            if ( ( (pSrc+copyW) > pEndSrc ) || (pDest > pEndDest) )\n                return E_FAIL;\n\n            memcpy_s( pDest, pEndDest - pDest, pSrc, copyW );\n\n            pSrc += srcImage.rowPitch;\n            pDest += dstImage.rowPitch;\n        }\n\n        return S_OK;\n    }\n\n    // Compute destination bytes-per-pixel (not the same format as source)\n    size_t dbpp = BitsPerPixel( dstImage.format );\n    if ( !dbpp )\n        return E_FAIL;\n\n    if ( dbpp < 8 )\n    {\n        // We don't support monochrome (DXGI_FORMAT_R1_UNORM)\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    // Round to bytes\n    dbpp = ( dbpp + 7 ) / 8;\n\n    uint8_t* pDest = dstImage.pixels + (yOffset * dstImage.rowPitch) + (xOffset * dbpp);\n\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*srcRect.w), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    const size_t copyS = srcRect.w * sbpp;\n    const size_t copyD = srcRect.w * dbpp;\n\n    for( size_t h=0; h < srcRect.h; ++h )\n    {\n        if ( ( (pSrc+copyS) > pEndSrc) || ((pDest+copyD) > pEndDest) )\n            return E_FAIL;\n\n        if ( !_LoadScanline( scanline.get(), srcRect.w, pSrc, copyS, srcImage.format ) )\n            return E_FAIL;\n\n        _ConvertScanline( scanline.get(), srcRect.w, dstImage.format, srcImage.format, filter );\n\n        if ( !_StoreScanline( pDest, copyD, dstImage.format, scanline.get(), srcRect.w ) )\n            return E_FAIL;\n\n        pSrc += srcImage.rowPitch;\n        pDest += dstImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n    \n//-------------------------------------------------------------------------------------\n// Computes the Mean-Squared-Error (MSE) between two images\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT ComputeMSE( const Image& image1, const Image& image2, float& mse, float* mseV, DWORD flags )\n{\n    if ( !image1.pixels || !image2.pixels )\n        return E_POINTER;\n\n    if ( image1.width != image2.width || image1.height != image2.height )\n        return E_INVALIDARG;\n\n    if ( IsPlanar( image1.format ) || IsPlanar( image2.format )\n         || IsPalettized( image1.format ) || IsPalettized( image2.format ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( IsCompressed(image1.format) )\n    {\n        if ( IsCompressed(image2.format) )\n        {\n            // Case 1: both images are compressed, expand to RGBA32F\n            ScratchImage temp1;\n            HRESULT hr = Decompress( image1, DXGI_FORMAT_R32G32B32A32_FLOAT, temp1 );\n            if ( FAILED(hr) )\n                return hr;\n\n            ScratchImage temp2;\n            hr = Decompress(  image2, DXGI_FORMAT_R32G32B32A32_FLOAT, temp2 );\n            if ( FAILED(hr) )\n                return hr;\n\n            const Image* img1 = temp1.GetImage(0,0,0);\n            const Image* img2 = temp2.GetImage(0,0,0);\n            if ( !img1 || !img2 )\n                return E_POINTER;\n\n            return _ComputeMSE( *img1, *img2, mse, mseV, flags );\n        }\n        else\n        {\n            // Case 2: image1 is compressed, expand to RGBA32F\n            ScratchImage temp;\n            HRESULT hr = Decompress( image1, DXGI_FORMAT_R32G32B32A32_FLOAT, temp );\n            if ( FAILED(hr) )\n                return hr;\n\n            const Image* img = temp.GetImage(0,0,0);\n            if ( !img )\n                return E_POINTER;\n\n            return _ComputeMSE( *img, image2, mse, mseV, flags );\n        }\n    }\n    else\n    {\n        if ( IsCompressed(image2.format) )\n        {\n            // Case 3: image2 is compressed, expand to RGBA32F\n            ScratchImage temp;\n            HRESULT hr = Decompress( image2, DXGI_FORMAT_R32G32B32A32_FLOAT, temp );\n            if ( FAILED(hr) )\n                return hr;\n\n            const Image* img = temp.GetImage(0,0,0);\n            if ( !img )\n                return E_POINTER;\n\n            return _ComputeMSE( image1, *img, mse, mseV, flags );\n        }\n        else\n        {\n            // Case 4: neither image is compressed\n            return _ComputeMSE( image1, image2, mse, mseV, flags );\n        }\n    }\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexNormalMaps.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexNormalMaps.cpp\n//  \n// DirectX Texture Library - Normal map operations\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nnamespace DirectX\n{\n\n#pragma prefast(suppress : 25000, \"FXMVECTOR is 16 bytes\")\nstatic inline float _EvaluateColor( _In_ FXMVECTOR val, _In_ DWORD flags )\n{\n    XMFLOAT4A f;\n\n    static XMVECTORF32 lScale = { 0.2125f, 0.7154f, 0.0721f, 1.f };\n\n    static_assert( CNMAP_CHANNEL_RED == 0x1, \"CNMAP_CHANNEL_ flag values don't match mask\" );\n    switch( flags & 0xf )\n    {\n    case 0:\n    case CNMAP_CHANNEL_RED:     return XMVectorGetX( val );\n    case CNMAP_CHANNEL_GREEN:   return XMVectorGetY( val );\n    case CNMAP_CHANNEL_BLUE:    return XMVectorGetZ( val );\n    case CNMAP_CHANNEL_ALPHA:   return XMVectorGetW( val );\n\n    case CNMAP_CHANNEL_LUMINANCE:\n        {\n            XMVECTOR v = XMVectorMultiply( val, lScale );\n            XMStoreFloat4A( &f, v );\n            return f.x + f.y + f.z;\n        }\n        break;\n\n    default:\n        assert(false);\n        return 0.f;\n    }\n}\n\nstatic void _EvaluateRow( _In_reads_(width) const XMVECTOR* pSource, _Out_writes_(width+2) float* pDest,\n                          _In_ size_t width, _In_ DWORD flags )\n{\n    assert( pSource && pDest );\n    assert( width > 0 );\n\n    for( size_t x = 0; x < width; ++x )\n    {\n        pDest[x+1] = _EvaluateColor( pSource[x], flags );\n    }\n\n    if ( flags & CNMAP_MIRROR_U )\n    {\n        // Mirror in U\n        pDest[0] = _EvaluateColor( pSource[0], flags );\n        pDest[width+1] = _EvaluateColor( pSource[width-1], flags );\n    }\n    else\n    {\n        // Wrap in U\n        pDest[0] = _EvaluateColor( pSource[width-1], flags );\n        pDest[width+1] = _EvaluateColor( pSource[0], flags );\n    }\n}\n\nstatic HRESULT _ComputeNMap( _In_ const Image& srcImage, _In_ DWORD flags, _In_ float amplitude,\n                             _In_ DXGI_FORMAT format, _In_ const Image& normalMap )\n{\n    if ( !srcImage.pixels || !normalMap.pixels )\n        return E_INVALIDARG;\n\n    const DWORD convFlags = _GetConvertFlags( format );\n    if ( !convFlags )\n        return E_FAIL;\n\n    if ( !( convFlags & (CONVF_UNORM | CONVF_SNORM | CONVF_FLOAT) ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    const size_t width = srcImage.width;\n    const size_t height = srcImage.height;\n    if ( width != normalMap.width || height != normalMap.height )\n        return E_FAIL;\n\n    // Allocate temporary space (4 scanlines and 3 evaluated rows)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*4), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    ScopedAlignedArrayFloat buffer( reinterpret_cast<float*>( _aligned_malloc( ( ( sizeof(float) * ( width + 2 ) ) * 3 ), 16 ) ) );\n    if ( !buffer )\n        return E_OUTOFMEMORY;\n\n    uint8_t* pDest = normalMap.pixels;\n    if ( !pDest )\n        return E_POINTER;\n\n    XMVECTOR* row0 = scanline.get();\n    XMVECTOR* row1 = row0 + width;\n    XMVECTOR* row2 = row1 + width;\n    XMVECTOR* target = row2 + width;\n\n    float* val0 = buffer.get();\n    float* val1 = val0 + width + 2;\n    float* val2 = val1 + width + 2;\n\n    const size_t rowPitch = srcImage.rowPitch;\n    const uint8_t* pSrc = srcImage.pixels;\n\n    // Read first scanline row into 'row1'\n    if ( !_LoadScanline( row1, width, pSrc, rowPitch, srcImage.format ) )\n        return E_FAIL;\n\n    // Setup 'row0'\n    if ( flags & CNMAP_MIRROR_V )\n    {\n        // Mirror first row\n        memcpy_s( row0, rowPitch, row1, rowPitch );\n    }\n    else\n    {\n        // Read last row (Wrap V)\n        if ( !_LoadScanline( row0, width, pSrc + (rowPitch * (height-1)), rowPitch, srcImage.format ) )\n            return E_FAIL;\n    }\n\n    // Evaluate the initial rows\n    _EvaluateRow( row0, val0, width, flags );\n    _EvaluateRow( row1, val1, width, flags );\n\n    pSrc += rowPitch;\n\n    for( size_t y = 0; y < height; ++y )\n    {\n        // Load next scanline of source image\n        if ( y < (height-1) )\n        {\n            if ( !_LoadScanline( row2, width, pSrc, rowPitch, srcImage.format ) )\n                return E_FAIL;\n        }\n        else\n        {\n            if ( flags & CNMAP_MIRROR_V )\n            {\n                // Use last row of source image\n                if ( !_LoadScanline( row2, width, srcImage.pixels + (rowPitch * (height-1)), rowPitch, srcImage.format ) )\n                    return E_FAIL;\n            }\n            else\n            {\n                // Use first row of source image (Wrap V)\n                if ( !_LoadScanline( row2, width, srcImage.pixels, rowPitch, srcImage.format ) )\n                    return E_FAIL;\n            }\n        }\n\n        // Evaluate row\n        _EvaluateRow( row2, val2, width, flags );\n\n        // Generate target scanline\n        XMVECTOR *dptr = target;\n        for( size_t x = 0; x < width; ++x )\n        {\n            // Compute normal via central differencing\n            float totDelta = ( val0[x] - val0[x+2] ) + ( val1[x] - val1[x+2] ) + ( val2[x] - val2[x+2] );\n            float deltaZX = totDelta * amplitude / 6.f;\n\n            totDelta = ( val0[x] - val2[x] ) + ( val0[x+1] - val2[x+1] ) + ( val0[x+2] - val2[x+2] );\n            float deltaZY = totDelta * amplitude / 6.f;\n\n            XMVECTOR vx = XMVectorSetZ( g_XMNegIdentityR0, deltaZX );   // (-1.0f, 0.0f, deltaZX)\n            XMVECTOR vy = XMVectorSetZ( g_XMNegIdentityR1, deltaZY );   // (0.0f, -1.0f, deltaZY)\n\n            XMVECTOR normal = XMVector3Normalize( XMVector3Cross( vx, vy ) );\n\n            // Compute alpha (1.0 or an occlusion term)\n            float alpha = 1.f;\n\n            if ( flags & CNMAP_COMPUTE_OCCLUSION )\n            {\n                float delta = 0.f;\n                float c = val1[x+1];\n\n                float t = val0[x] - c;  if ( t > 0.f ) delta += t;\n                t = val0[x+1]   - c;    if ( t > 0.f ) delta += t;\n                t = val0[x+2]   - c;    if ( t > 0.f ) delta += t;\n                t = val1[x]     - c;    if ( t > 0.f ) delta += t;\n                // Skip current pixel\n                t = val1[x+2]   - c;    if ( t > 0.f ) delta += t;\n                t = val2[x]     - c;    if ( t > 0.f ) delta += t;\n                t = val2[x+1]   - c;    if ( t > 0.f ) delta += t;\n                t = val2[x+2]   - c;    if ( t > 0.f ) delta += t;\n\n                // Average delta (divide by 8, scale by amplitude factor)\n                delta *= 0.125f * amplitude;\n                if ( delta > 0.f )\n                {\n                    // If < 0, then no occlusion\n                    float r = sqrtf( 1.f + delta*delta );\n                    alpha = (r - delta) / r;\n                }\n            }\n\n            // Encode based on target format\n            if ( convFlags & CONVF_UNORM )\n            {\n                // 0.5f*normal + 0.5f -or- invert sign case: -0.5f*normal + 0.5f\n                XMVECTOR n1 = XMVectorMultiplyAdd( (flags & CNMAP_INVERT_SIGN) ? g_XMNegativeOneHalf : g_XMOneHalf, normal, g_XMOneHalf ); \n                *dptr++ = XMVectorSetW( n1, alpha );\n            }\n            else if ( flags & CNMAP_INVERT_SIGN )\n            {\n                *dptr++ = XMVectorSetW( XMVectorNegate( normal ), alpha );\n            }\n            else\n            {\n                *dptr++ = XMVectorSetW( normal, alpha );\n            }\n        }\n\n        if ( !_StoreScanline( pDest, normalMap.rowPitch, format, target, width ) )\n            return E_FAIL;\n\n        // Cycle buffers\n        float* temp = val0;\n        val0 = val1;\n        val1 = val2;\n        val2 = temp;\n\n        pSrc += rowPitch;\n        pDest += normalMap.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry points\n//=====================================================================================\n        \n//-------------------------------------------------------------------------------------\n// Generates a normal map from a height-map\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT ComputeNormalMap( const Image& srcImage, DWORD flags, float amplitude,\n                          DXGI_FORMAT format, ScratchImage& normalMap )\n{\n    if ( !srcImage.pixels || !IsValid(format) )\n        return E_INVALIDARG;\n\n    static_assert( CNMAP_CHANNEL_RED == 0x1, \"CNMAP_CHANNEL_ flag values don't match mask\" );\n    switch( flags & 0xf )\n    {\n    case 0:\n    case CNMAP_CHANNEL_RED:\n    case CNMAP_CHANNEL_GREEN:\n    case CNMAP_CHANNEL_BLUE:\n    case CNMAP_CHANNEL_ALPHA:\n    case CNMAP_CHANNEL_LUMINANCE:\n        break;\n\n    default:\n        return E_INVALIDARG;\n    }\n\n    if ( IsCompressed(format) || IsCompressed(srcImage.format)\n         || IsTypeless(format) || IsTypeless(srcImage.format) \n         || IsPlanar(format) || IsPlanar(srcImage.format) \n         || IsPalettized(format) || IsPalettized(srcImage.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    // Setup target image\n    normalMap.Release();\n\n    HRESULT hr = normalMap.Initialize2D( format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = normalMap.GetImage( 0, 0, 0 );\n    if ( !img )\n    {\n        normalMap.Release();\n        return E_POINTER;\n    }\n\n    hr = _ComputeNMap( srcImage, flags, amplitude, format, *img );\n    if ( FAILED(hr) )\n    {\n        normalMap.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT ComputeNormalMap( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                          DWORD flags, float amplitude, DXGI_FORMAT format, ScratchImage& normalMaps )\n{\n    if ( !srcImages || !nimages || !IsValid(format) )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(format) || IsCompressed(metadata.format)\n         || IsTypeless(format) || IsTypeless(metadata.format) \n         || IsPlanar(format) || IsPlanar(metadata.format) \n         || IsPalettized(format) || IsPalettized(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    static_assert( CNMAP_CHANNEL_RED == 0x1, \"CNMAP_CHANNEL_ flag values don't match mask\" );\n    switch( flags & 0xf )\n    {\n    case 0:\n    case CNMAP_CHANNEL_RED:\n    case CNMAP_CHANNEL_GREEN:\n    case CNMAP_CHANNEL_BLUE:\n    case CNMAP_CHANNEL_ALPHA:\n    case CNMAP_CHANNEL_LUMINANCE:\n        break;\n\n    default:\n        return E_INVALIDARG;\n    }\n\n    normalMaps.Release();\n\n    TexMetadata mdata2 = metadata;\n    mdata2.format = format;\n    HRESULT hr = normalMaps.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != normalMaps.GetImageCount() )\n    {\n        normalMaps.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = normalMaps.GetImages();\n    if ( !dest )\n    {\n        normalMaps.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        assert( dest[ index ].format == format );\n\n        const Image& src = srcImages[ index ];\n        if ( IsCompressed( src.format ) || IsTypeless( src.format ) )\n        {\n            normalMaps.Release();\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n\n        if ( src.width != dest[ index ].width || src.height != dest[ index ].height )\n        {\n            normalMaps.Release();\n            return E_FAIL;\n        }\n\n        hr = _ComputeNMap( src, flags, amplitude, format, dest[ index ] );\n        if ( FAILED(hr) )\n        {\n            normalMaps.Release();\n            return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexP.h",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexp.h\n//  \n// DirectX Texture Library - Private header\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n#define NOMINMAX\n#include <windows.h>\n#include <directxmath.h>\n#include <directxpackedvector.h>\n#include <assert.h>\n\n#include <malloc.h>\n#include <memory>\n\n#include <vector>\n\n#include <stdlib.h>\n#include <search.h>\n\n#include <ole2.h>\n\n#include \"directxtex.h\"\n\n// VS 2010's stdint.h conflicts with intsafe.h\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <wincodec.h>\n#include <intsafe.h>\n#pragma warning(pop)\n\n#include <wrl\\client.h>\n\n#include \"scoped.h\"\n\nstruct IWICImagingFactory;\n\n#define TEX_FILTER_MASK 0xF00000\n\nnamespace DirectX\n{\n    //---------------------------------------------------------------------------------\n    // WIC helper functions\n    DXGI_FORMAT __cdecl _WICToDXGI( _In_ const GUID& guid );\n    bool __cdecl _DXGIToWIC( _In_ DXGI_FORMAT format, _Out_ GUID& guid, _In_ bool ignoreRGBvsBGR = false );\n\n    DWORD __cdecl _CheckWICColorSpace( _In_ const GUID& sourceGUID, _In_ const GUID& targetGUID );\n\n    IWICImagingFactory* __cdecl _GetWIC();\n\n    bool __cdecl _IsWIC2();\n\n    inline WICBitmapDitherType __cdecl _GetWICDither( _In_ DWORD flags )\n    {\n        static_assert( TEX_FILTER_DITHER == 0x10000, \"TEX_FILTER_DITHER* flag values don't match mask\" );\n\n        static_assert( TEX_FILTER_DITHER == WIC_FLAGS_DITHER, \"TEX_FILTER_DITHER* should match WIC_FLAGS_DITHER*\" );\n        static_assert( TEX_FILTER_DITHER_DIFFUSION == WIC_FLAGS_DITHER_DIFFUSION, \"TEX_FILTER_DITHER* should match WIC_FLAGS_DITHER*\" );\n\n        switch( flags & 0xF0000 )\n        {\n        case TEX_FILTER_DITHER:\n            return WICBitmapDitherTypeOrdered4x4;\n\n        case TEX_FILTER_DITHER_DIFFUSION:\n            return WICBitmapDitherTypeErrorDiffusion;\n\n        default:\n            return WICBitmapDitherTypeNone;\n        }\n    }\n\n    inline WICBitmapInterpolationMode __cdecl _GetWICInterp( _In_ DWORD flags )\n    {\n        static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n        static_assert( TEX_FILTER_POINT == WIC_FLAGS_FILTER_POINT, \"TEX_FILTER_* flags should match WIC_FLAGS_FILTER_*\" );\n        static_assert( TEX_FILTER_LINEAR == WIC_FLAGS_FILTER_LINEAR, \"TEX_FILTER_* flags should match WIC_FLAGS_FILTER_*\"  );\n        static_assert( TEX_FILTER_CUBIC == WIC_FLAGS_FILTER_CUBIC, \"TEX_FILTER_* flags should match WIC_FLAGS_FILTER_*\"  );\n        static_assert( TEX_FILTER_FANT == WIC_FLAGS_FILTER_FANT, \"TEX_FILTER_* flags should match WIC_FLAGS_FILTER_*\"  );\n\n        switch( flags & TEX_FILTER_MASK )\n        {\n        case TEX_FILTER_POINT:\n            return WICBitmapInterpolationModeNearestNeighbor;\n\n        case TEX_FILTER_LINEAR:\n            return WICBitmapInterpolationModeLinear;\n\n        case TEX_FILTER_CUBIC:\n            return WICBitmapInterpolationModeCubic;\n\n        case TEX_FILTER_FANT:\n        default:\n            return WICBitmapInterpolationModeFant;\n        }\n    }\n\n    //---------------------------------------------------------------------------------\n    // Image helper functions\n    void __cdecl _DetermineImageArray( _In_ const TexMetadata& metadata, _In_ DWORD cpFlags,\n                                       _Out_ size_t& nImages, _Out_ size_t& pixelSize );\n\n    _Success_(return != false)\n    bool __cdecl _SetupImageArray( _In_reads_bytes_(pixelSize) uint8_t *pMemory, _In_ size_t pixelSize,\n                                   _In_ const TexMetadata& metadata, _In_ DWORD cpFlags,\n                                   _Out_writes_(nImages) Image* images, _In_ size_t nImages );\n\n    //---------------------------------------------------------------------------------\n    // Conversion helper functions\n\n    enum TEXP_SCANLINE_FLAGS\n    {\n        TEXP_SCANLINE_NONE          = 0,\n        TEXP_SCANLINE_SETALPHA      = 0x1,  // Set alpha channel to known opaque value\n        TEXP_SCANLINE_LEGACY        = 0x2,  // Enables specific legacy format conversion cases\n    };\n\n    enum CONVERT_FLAGS\n    {\n        CONVF_FLOAT     = 0x1,\n        CONVF_UNORM     = 0x2,\n        CONVF_UINT      = 0x4,\n        CONVF_SNORM     = 0x8, \n        CONVF_SINT      = 0x10,\n        CONVF_DEPTH     = 0x20,\n        CONVF_STENCIL   = 0x40,\n        CONVF_SHAREDEXP = 0x80,\n        CONVF_BGR       = 0x100,\n        CONVF_XR        = 0x200,\n        CONVF_PACKED    = 0x400,\n        CONVF_BC        = 0x800,\n        CONVF_YUV       = 0x1000,\n        CONVF_R         = 0x10000,\n        CONVF_G         = 0x20000,\n        CONVF_B         = 0x40000,\n        CONVF_A         = 0x80000,\n        CONVF_RGB_MASK  = 0x70000,\n        CONVF_RGBA_MASK = 0xF0000,\n    };\n\n    DWORD __cdecl _GetConvertFlags( _In_ DXGI_FORMAT format );\n\n    void __cdecl _CopyScanline( _When_(pDestination == pSource, _Inout_updates_bytes_(outSize))\n                                _When_(pDestination != pSource, _Out_writes_bytes_(outSize))\n                                LPVOID pDestination, _In_ size_t outSize, \n                                _In_reads_bytes_(inSize) LPCVOID pSource, _In_ size_t inSize,\n                                _In_ DXGI_FORMAT format, _In_ DWORD flags );\n\n    void __cdecl _SwizzleScanline( _When_(pDestination == pSource, _In_)\n                                   _When_(pDestination != pSource, _Out_writes_bytes_(outSize))\n                                   LPVOID pDestination, _In_ size_t outSize, \n                                   _In_reads_bytes_(inSize) LPCVOID pSource, _In_ size_t inSize,\n                                   _In_ DXGI_FORMAT format, _In_ DWORD flags );\n \n    _Success_(return != false)\n    bool __cdecl _ExpandScanline( _Out_writes_bytes_(outSize) LPVOID pDestination, _In_ size_t outSize,\n                                  _In_ DXGI_FORMAT outFormat, \n                                  _In_reads_bytes_(inSize) LPCVOID pSource, _In_ size_t inSize,\n                                  _In_ DXGI_FORMAT inFormat, _In_ DWORD flags );\n\n    _Success_(return != false)\n    bool __cdecl _LoadScanline( _Out_writes_(count) XMVECTOR* pDestination, _In_ size_t count,\n                                _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DXGI_FORMAT format );\n\n    _Success_(return != false)\n    bool __cdecl _LoadScanlineLinear( _Out_writes_(count) XMVECTOR* pDestination, _In_ size_t count,\n                                      _In_reads_bytes_(size) LPCVOID pSource, _In_ size_t size, _In_ DXGI_FORMAT format, _In_ DWORD flags  );\n\n    _Success_(return != false)\n    bool __cdecl _StoreScanline( LPVOID pDestination, _In_ size_t size, _In_ DXGI_FORMAT format,\n                                 _In_reads_(count) const XMVECTOR* pSource, _In_ size_t count, _In_ float threshold = 0 );\n\n    _Success_(return != false)\n    bool __cdecl _StoreScanlineLinear( LPVOID pDestination, _In_ size_t size, _In_ DXGI_FORMAT format,\n                                       _Inout_updates_all_(count) XMVECTOR* pSource, _In_ size_t count, _In_ DWORD flags, _In_ float threshold = 0 );\n\n    _Success_(return != false)\n    bool __cdecl _StoreScanlineDither( LPVOID pDestination, _In_ size_t size, _In_ DXGI_FORMAT format,\n                                       _Inout_updates_all_(count) XMVECTOR* pSource, _In_ size_t count, _In_ float threshold, size_t y, size_t z,\n                                       _Inout_updates_all_opt_(count+2) XMVECTOR* pDiffusionErrors );\n\n    HRESULT __cdecl _ConvertToR32G32B32A32( _In_ const Image& srcImage, _Inout_ ScratchImage& image );\n\n    HRESULT __cdecl _ConvertFromR32G32B32A32( _In_ const Image& srcImage, _In_ const Image& destImage );\n    HRESULT __cdecl _ConvertFromR32G32B32A32( _In_ const Image& srcImage, _In_ DXGI_FORMAT format, _Inout_ ScratchImage& image );\n    HRESULT __cdecl _ConvertFromR32G32B32A32( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,\n                                              _In_ DXGI_FORMAT format, _Out_ ScratchImage& result );\n\n    void __cdecl _ConvertScanline( _Inout_updates_all_(count) XMVECTOR* pBuffer, _In_ size_t count,\n                                   _In_ DXGI_FORMAT outFormat, _In_ DXGI_FORMAT inFormat, _In_ DWORD flags );\n\n    //---------------------------------------------------------------------------------\n    // DDS helper functions\n    HRESULT __cdecl _EncodeDDSHeader( _In_ const TexMetadata& metadata, DWORD flags,\n                                      _Out_writes_bytes_to_opt_(maxsize, required) LPVOID pDestination, _In_ size_t maxsize, _Out_ size_t& required );\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexPMAlpha.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexPMAlpha.cpp\n//  \n// DirectX Texture Library - Premultiplied alpha operations\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nnamespace DirectX\n{\n\nstatic HRESULT _PremultiplyAlpha( _In_ const Image& srcImage, _In_ const Image& destImage )\n{\n    assert( srcImage.width == destImage.width );\n    assert( srcImage.height == destImage.height );\n\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*srcImage.width), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    const uint8_t *pSrc = srcImage.pixels;\n    uint8_t *pDest = destImage.pixels;\n    if ( !pSrc || !pDest )\n        return E_POINTER;\n\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_LoadScanline( scanline.get(), srcImage.width, pSrc, srcImage.rowPitch, srcImage.format ) )\n            return E_FAIL;\n\n        XMVECTOR* ptr = scanline.get();\n        for( size_t w = 0; w < srcImage.width; ++w )\n        {\n            XMVECTOR v = *ptr;\n            XMVECTOR alpha = XMVectorSplatW( *ptr );\n            alpha = XMVectorMultiply( v, alpha );\n            *(ptr++) = XMVectorSelect( v, alpha, g_XMSelect1110 );\n        }\n\n        if ( !_StoreScanline( pDest, destImage.rowPitch, destImage.format, scanline.get(), srcImage.width ) )\n            return E_FAIL;\n\n        pSrc += srcImage.rowPitch;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\nstatic HRESULT _PremultiplyAlphaLinear( _In_ const Image& srcImage, _In_ DWORD flags, _In_ const Image& destImage )\n{\n    assert( srcImage.width == destImage.width );\n    assert( srcImage.height == destImage.height );\n\n    static_assert( TEX_PMALPHA_SRGB_IN == TEX_FILTER_SRGB_IN, \"TEX_PMALHPA_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_PMALPHA_SRGB_OUT == TEX_FILTER_SRGB_OUT, \"TEX_PMALHPA_SRGB* should match TEX_FILTER_SRGB*\" );\n    static_assert( TEX_PMALPHA_SRGB == TEX_FILTER_SRGB, \"TEX_PMALHPA_SRGB* should match TEX_FILTER_SRGB*\" );\n    flags &= TEX_PMALPHA_SRGB;\n\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*srcImage.width), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    const uint8_t *pSrc = srcImage.pixels;\n    uint8_t *pDest = destImage.pixels;\n    if ( !pSrc || !pDest )\n        return E_POINTER;\n\n    for( size_t h = 0; h < srcImage.height; ++h )\n    {\n        if ( !_LoadScanlineLinear( scanline.get(), srcImage.width, pSrc, srcImage.rowPitch, srcImage.format, flags ) )\n            return E_FAIL;\n\n        XMVECTOR* ptr = scanline.get();\n        for( size_t w = 0; w < srcImage.width; ++w )\n        {\n            XMVECTOR v = *ptr;\n            XMVECTOR alpha = XMVectorSplatW( *ptr );\n            alpha = XMVectorMultiply( v, alpha );\n            *(ptr++) = XMVectorSelect( v, alpha, g_XMSelect1110 );\n        }\n\n        if ( !_StoreScanlineLinear( pDest, destImage.rowPitch, destImage.format, scanline.get(), srcImage.width, flags ) )\n            return E_FAIL;\n\n        pSrc += srcImage.rowPitch;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Converts to a premultiplied alpha version of the texture\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT PremultiplyAlpha( const Image& srcImage, DWORD flags, ScratchImage& image )\n{\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    if ( IsCompressed(srcImage.format)\n         || IsPlanar(srcImage.format)\n         || IsPalettized(srcImage.format)\n         || IsTypeless(srcImage.format)\n         || !HasAlpha(srcImage.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (srcImage.width > 0xFFFFFFFF) || (srcImage.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    HRESULT hr = image.Initialize2D( srcImage.format, srcImage.width, srcImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n   \n    const Image *rimage = image.GetImage( 0, 0, 0 );\n    if ( !rimage )\n    {\n        image.Release();\n        return E_POINTER;\n    }\n\n    hr = ( flags & TEX_PMALPHA_IGNORE_SRGB ) ? _PremultiplyAlpha( srcImage, *rimage ) : _PremultiplyAlphaLinear( srcImage, flags, *rimage );\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to a premultiplied alpha version of the texture (complex)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT PremultiplyAlpha( const Image* srcImages, size_t nimages, const TexMetadata& metadata, DWORD flags, ScratchImage& result )\n{\n    if ( !srcImages || !nimages )\n        return E_INVALIDARG;\n\n    if ( IsCompressed(metadata.format)\n         || IsPlanar(metadata.format)\n         || IsPalettized(metadata.format)\n         || IsTypeless(metadata.format)\n         || !HasAlpha(metadata.format) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n#ifdef _M_X64\n    if ( (metadata.width > 0xFFFFFFFF) || (metadata.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    if ( metadata.IsPMAlpha() )\n    {\n        // Already premultiplied\n        return E_FAIL;\n    }\n\n    TexMetadata mdata2 = metadata;\n    mdata2.SetAlphaMode(TEX_ALPHA_MODE_PREMULTIPLIED);\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages != result.GetImageCount() )\n    {\n        result.Release();\n        return E_FAIL;\n    }\n\n    const Image* dest = result.GetImages();\n    if ( !dest )\n    {\n        result.Release();\n        return E_POINTER;\n    }\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        const Image& src = srcImages[ index ];\n        if ( src.format != metadata.format )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n#ifdef _M_X64\n        if ( (src.width > 0xFFFFFFFF) || (src.height > 0xFFFFFFFF) )\n            return E_FAIL;\n#endif\n        const Image& dst = dest[ index ];\n        assert( dst.format == metadata.format );\n\n        if ( src.width != dst.width || src.height != dst.height )\n        {\n            result.Release();\n            return E_FAIL;\n        }\n\n        hr = ( flags & TEX_PMALPHA_IGNORE_SRGB ) ? _PremultiplyAlpha( src, dst ) : _PremultiplyAlphaLinear( src, flags, dst );\n        if ( FAILED(hr) )\n        {\n            result.Release();\n            return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexResize.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexResize.cpp\n//  \n// DirectX Texture Library - Image resizing operations\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n#include \"filters.h\"\n\nusing Microsoft::WRL::ComPtr;\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// WIC related helper functions\n//-------------------------------------------------------------------------------------\n\nextern HRESULT _ResizeSeparateColorAndAlpha( _In_ IWICImagingFactory* pWIC, _In_ IWICBitmap* original,\n                                             _In_ size_t newWidth, _In_ size_t newHeight, _In_ DWORD filter, _Inout_ const Image* img );\n\n//--- Do image resize using WIC ---\nstatic HRESULT _PerformResizeUsingWIC( _In_ const Image& srcImage, _In_ DWORD filter,\n                                       _In_ const WICPixelFormatGUID& pfGUID, _In_ const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    assert( srcImage.format == destImage.format );\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICComponentInfo> componentInfo;\n    HRESULT hr = pWIC->CreateComponentInfo( pfGUID, componentInfo.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICPixelFormatInfo2> pixelFormatInfo;\n    hr = componentInfo.As( &pixelFormatInfo );\n    if ( FAILED(hr) )\n        return hr;\n\n    BOOL supportsTransparency = FALSE;\n    hr = pixelFormatInfo->SupportsTransparency( &supportsTransparency );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmap> source;\n    hr = pWIC->CreateBitmapFromMemory( static_cast<UINT>( srcImage.width ), static_cast<UINT>( srcImage.height ), pfGUID,\n                                       static_cast<UINT>( srcImage.rowPitch ), static_cast<UINT>( srcImage.slicePitch ),\n                                       srcImage.pixels, source.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( (filter & TEX_FILTER_SEPARATE_ALPHA) && supportsTransparency )\n    {\n        hr = _ResizeSeparateColorAndAlpha( pWIC, source.Get(), destImage.width, destImage.height, filter, &destImage );\n        if ( FAILED(hr) )\n            return hr;\n    }\n    else\n    {\n        ComPtr<IWICBitmapScaler> scaler;\n        hr = pWIC->CreateBitmapScaler( scaler.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = scaler->Initialize( source.Get(), static_cast<UINT>( destImage.width ), static_cast<UINT>( destImage.height ), _GetWICInterp( filter ) );\n        if ( FAILED(hr) )\n            return hr;\n\n        WICPixelFormatGUID pfScaler;\n        hr = scaler->GetPixelFormat( &pfScaler );\n        if ( FAILED(hr) )\n            return hr;\n\n        if ( memcmp( &pfScaler, &pfGUID, sizeof(WICPixelFormatGUID) ) == 0 )\n        {\n            hr = scaler->CopyPixels( 0, static_cast<UINT>( destImage.rowPitch ), static_cast<UINT>( destImage.slicePitch ), destImage.pixels );\n            if ( FAILED(hr) )\n                return hr;\n        }\n        else\n        {\n            // The WIC bitmap scaler is free to return a different pixel format than the source image, so here we\n            // convert it back\n            ComPtr<IWICFormatConverter> FC;\n            hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n            if ( FAILED(hr) )\n                return hr;\n\n            BOOL canConvert = FALSE;\n            hr = FC->CanConvert( pfScaler, pfGUID, &canConvert );\n            if ( FAILED(hr) || !canConvert )\n            {\n                return E_UNEXPECTED;\n            }\n\n            hr = FC->Initialize( scaler.Get(), pfGUID, _GetWICDither( filter ), 0, 0, WICBitmapPaletteTypeCustom );\n            if ( FAILED(hr) )\n                return hr;\n\n            hr = FC->CopyPixels( 0, static_cast<UINT>( destImage.rowPitch ), static_cast<UINT>( destImage.slicePitch ), destImage.pixels );  \n            if ( FAILED(hr) )\n                return hr;\n        }\n    }\n\n    return S_OK;\n}\n\n\n//--- Do conversion, resize using WIC, conversion cycle ---\nstatic HRESULT _PerformResizeViaF32( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    assert( srcImage.format != DXGI_FORMAT_R32G32B32A32_FLOAT );\n    assert( srcImage.format == destImage.format );\n\n    ScratchImage temp;\n    HRESULT hr = _ConvertToR32G32B32A32( srcImage, temp );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *tsrc = temp.GetImage( 0, 0, 0 );\n    if ( !tsrc )\n        return E_POINTER;\n\n    ScratchImage rtemp;\n    hr = rtemp.Initialize2D( DXGI_FORMAT_R32G32B32A32_FLOAT, destImage.width, destImage.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *tdest = rtemp.GetImage( 0, 0, 0 );\n    if ( !tdest )\n        return E_POINTER;\n\n    hr = _PerformResizeUsingWIC( *tsrc, filter, GUID_WICPixelFormat128bppRGBAFloat, *tdest );\n    if ( FAILED(hr) )\n        return hr;\n\n    temp.Release();\n\n    hr = _ConvertFromR32G32B32A32( *tdest, destImage );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//--- determine when to use WIC vs. non-WIC paths ---\nstatic bool _UseWICFiltering( _In_ DXGI_FORMAT format, _In_ DWORD filter )\n{\n    if ( filter & TEX_FILTER_FORCE_NON_WIC )\n    {\n        // Explicit flag indicates use of non-WIC code paths\n        return false;\n    }\n\n    if ( filter & TEX_FILTER_FORCE_WIC )\n    {\n        // Explicit flag to use WIC code paths, skips all the case checks below\n        return true;\n    }\n\n    if ( IsSRGB(format) || (filter & TEX_FILTER_SRGB) )\n    {\n        // Use non-WIC code paths for sRGB correct filtering\n        return false;\n    }\n\n#if defined(_XBOX_ONE) && defined(_TITLE)\n    if ( format == DXGI_FORMAT_R16G16B16A16_FLOAT\n         || format == DXGI_FORMAT_R16_FLOAT )\n    {\n        // Use non-WIC code paths as these conversions are not supported by Xbox One XDK\n        return false;\n    }\n#endif\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    switch ( filter & TEX_FILTER_MASK )\n    {\n    case TEX_FILTER_LINEAR:\n        if ( filter & TEX_FILTER_WRAP )\n        {\n            // WIC only supports 'clamp' semantics (MIRROR is equivalent to clamp for linear)\n            return false;\n        }\n\n        if ( BitsPerColor(format) > 8 )\n        {\n            // Avoid the WIC bitmap scaler when doing Linear filtering of XR/HDR formats\n            return false;\n        }\n        break;\n\n    case TEX_FILTER_CUBIC:\n        if ( filter & ( TEX_FILTER_WRAP | TEX_FILTER_MIRROR ) )\n        {\n            // WIC only supports 'clamp' semantics\n            return false;\n        }\n\n        if ( BitsPerColor(format) > 8 )\n        {\n            // Avoid the WIC bitmap scaler when doing Cubic filtering of XR/HDR formats\n            return false;\n        }\n        break;\n\n    case TEX_FILTER_TRIANGLE:\n        // WIC does not implement this filter\n        return false;\n    }\n\n    return true;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Resize custom filters\n//-------------------------------------------------------------------------------------\n\n//--- Point Filter ---\nstatic HRESULT _ResizePointFilter( _In_ const Image& srcImage, _In_ const Image& destImage )\n{\n    assert( srcImage.pixels && destImage.pixels );\n    assert( srcImage.format == destImage.format );\n\n    // Allocate temporary space (2 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc(\n                                         ( sizeof(XMVECTOR) * (srcImage.width + destImage.width ) ), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row = target + destImage.width;\n\n#ifdef _DEBUG\n    memset( row, 0xCD, sizeof(XMVECTOR)*srcImage.width );\n#endif\n\n    const uint8_t* pSrc = srcImage.pixels;\n    uint8_t* pDest = destImage.pixels;\n\n    size_t rowPitch = srcImage.rowPitch;\n\n    size_t xinc = ( srcImage.width << 16 ) / destImage.width;\n    size_t yinc = ( srcImage.height << 16 ) / destImage.height;\n\n    size_t lasty = size_t(-1);\n\n    size_t sy = 0;\n    for( size_t y = 0; y < destImage.height; ++y )\n    {\n        if ( (lasty ^ sy) >> 16 )\n        {\n            if ( !_LoadScanline( row, srcImage.width, pSrc + ( rowPitch * (sy >> 16) ), rowPitch, srcImage.format ) )\n                return E_FAIL;\n            lasty = sy;\n        }\n\n        size_t sx = 0;\n        for( size_t x = 0; x < destImage.width; ++x )\n        {\n            target[ x ] = row[ sx >> 16 ];\n            sx += xinc;\n        }\n\n        if ( !_StoreScanline( pDest, destImage.rowPitch, destImage.format, target, destImage.width ) )\n            return E_FAIL;\n        pDest += destImage.rowPitch;\n\n        sy += yinc;\n    }\n\n    return S_OK;\n}\n\n\n//--- Box Filter ---\nstatic HRESULT _ResizeBoxFilter( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    assert( srcImage.pixels && destImage.pixels );\n    assert( srcImage.format == destImage.format );\n\n    if ( ( (destImage.width << 1) != srcImage.width ) || ( (destImage.height << 1) != srcImage.height ) )\n        return E_FAIL;\n\n    // Allocate temporary space (3 scanlines)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc(\n                                         ( sizeof(XMVECTOR) * ( srcImage.width*2 + destImage.width ) ), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* urow0 = target + destImage.width;\n    XMVECTOR* urow1 = urow0 + srcImage.width;\n\n#ifdef _DEBUG\n    memset( urow0, 0xCD, sizeof(XMVECTOR)*srcImage.width );\n    memset( urow1, 0xDD, sizeof(XMVECTOR)*srcImage.width );\n#endif\n\n    const XMVECTOR* urow2 = urow0 + 1;\n    const XMVECTOR* urow3 = urow1 + 1;\n\n    const uint8_t* pSrc = srcImage.pixels;\n    uint8_t* pDest = destImage.pixels;\n\n    size_t rowPitch = srcImage.rowPitch;\n\n    for( size_t y = 0; y < destImage.height; ++y )\n    {\n        if ( !_LoadScanlineLinear( urow0, srcImage.width, pSrc, rowPitch, srcImage.format, filter ) )\n            return E_FAIL;\n        pSrc += rowPitch;\n\n        if ( urow0 != urow1 )\n        {\n            if ( !_LoadScanlineLinear( urow1, srcImage.width, pSrc, rowPitch, srcImage.format, filter ) )\n                return E_FAIL;\n            pSrc += rowPitch;\n        }\n\n        for( size_t x = 0; x < destImage.width; ++x )\n        {\n            size_t x2 = x << 1;\n\n            AVERAGE4( target[ x ], urow0[ x2 ], urow1[ x2 ], urow2[ x2 ], urow3[ x2 ] );\n        }\n\n        if ( !_StoreScanlineLinear( pDest, destImage.rowPitch, destImage.format, target, destImage.width, filter ) )\n            return E_FAIL;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//--- Linear Filter ---\nstatic HRESULT _ResizeLinearFilter( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    assert( srcImage.pixels && destImage.pixels );\n    assert( srcImage.format == destImage.format );\n\n    // Allocate temporary space (3 scanlines, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc(\n                                         ( sizeof(XMVECTOR) * ( srcImage.width*2 + destImage.width ) ), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<LinearFilter[]> lf( new (std::nothrow) LinearFilter[ destImage.width + destImage.height ] );\n    if ( !lf )\n        return E_OUTOFMEMORY;\n\n    LinearFilter* lfX = lf.get();\n    LinearFilter* lfY = lf.get() + destImage.width;\n\n    _CreateLinearFilter( srcImage.width, destImage.width, (filter & TEX_FILTER_WRAP_U) != 0, lfX );\n    _CreateLinearFilter( srcImage.height, destImage.height, (filter & TEX_FILTER_WRAP_V) != 0, lfY );\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row0 = target + destImage.width;\n    XMVECTOR* row1 = row0 + srcImage.width;\n\n#ifdef _DEBUG\n    memset( row0, 0xCD, sizeof(XMVECTOR)*srcImage.width );\n    memset( row1, 0xDD, sizeof(XMVECTOR)*srcImage.width );\n#endif\n\n    const uint8_t* pSrc = srcImage.pixels;\n    uint8_t* pDest = destImage.pixels;\n\n    size_t rowPitch = srcImage.rowPitch;\n\n    size_t u0 = size_t(-1);\n    size_t u1 = size_t(-1);\n\n    for( size_t y = 0; y < destImage.height; ++y )\n    {\n        auto& toY = lfY[ y ];\n\n        if ( toY.u0 != u0 )\n        {\n            if ( toY.u0 != u1 )\n            {\n                u0 = toY.u0;\n\n                if ( !_LoadScanlineLinear( row0, srcImage.width, pSrc + (rowPitch * u0), rowPitch, srcImage.format, filter ) )\n                    return E_FAIL;\n            }\n            else\n            {\n                u0 = u1;\n                u1 = size_t(-1);\n\n                std::swap( row0, row1 );\n            }\n        }\n\n        if ( toY.u1 != u1 )\n        {\n            u1 = toY.u1;\n\n            if ( !_LoadScanlineLinear( row1, srcImage.width, pSrc + (rowPitch * u1), rowPitch, srcImage.format, filter ) )\n                return E_FAIL;\n        }\n\n        for( size_t x = 0; x < destImage.width; ++x )\n        {\n            auto& toX = lfX[ x ];\n\n            BILINEAR_INTERPOLATE( target[x], toX, toY, row0, row1 );\n        }\n\n        if ( !_StoreScanlineLinear( pDest, destImage.rowPitch, destImage.format, target, destImage.width, filter ) )\n            return E_FAIL;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//--- Cubic Filter ---\nstatic HRESULT _ResizeCubicFilter( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    assert( srcImage.pixels && destImage.pixels );\n    assert( srcImage.format == destImage.format );\n\n    // Allocate temporary space (5 scanlines, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc(\n                                         ( sizeof(XMVECTOR) * ( srcImage.width*4 + destImage.width ) ), 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<CubicFilter[]> cf( new (std::nothrow) CubicFilter[ destImage.width + destImage.height ] );\n    if ( !cf )\n        return E_OUTOFMEMORY;\n\n    CubicFilter* cfX = cf.get();\n    CubicFilter* cfY = cf.get() + destImage.width;\n\n    _CreateCubicFilter( srcImage.width, destImage.width, (filter & TEX_FILTER_WRAP_U) != 0, (filter & TEX_FILTER_MIRROR_U) != 0, cfX );\n    _CreateCubicFilter( srcImage.height, destImage.height, (filter & TEX_FILTER_WRAP_V) != 0, (filter & TEX_FILTER_MIRROR_V) != 0, cfY );\n\n    XMVECTOR* target = scanline.get();\n\n    XMVECTOR* row0 = target + destImage.width;\n    XMVECTOR* row1 = row0 + srcImage.width;\n    XMVECTOR* row2 = row0 + srcImage.width*2;\n    XMVECTOR* row3 = row0 + srcImage.width*3;\n\n#ifdef _DEBUG\n    memset( row0, 0xCD, sizeof(XMVECTOR)*srcImage.width );\n    memset( row1, 0xDD, sizeof(XMVECTOR)*srcImage.width );\n    memset( row2, 0xED, sizeof(XMVECTOR)*srcImage.width );\n    memset( row3, 0xFD, sizeof(XMVECTOR)*srcImage.width );\n#endif\n\n    const uint8_t* pSrc = srcImage.pixels;\n    uint8_t* pDest = destImage.pixels;\n\n    size_t rowPitch = srcImage.rowPitch;\n\n    size_t u0 = size_t(-1);\n    size_t u1 = size_t(-1);\n    size_t u2 = size_t(-1);\n    size_t u3 = size_t(-1);\n\n    for( size_t y = 0; y < destImage.height; ++y )\n    {\n        auto& toY = cfY[ y ];\n\n        // Scanline 1\n        if ( toY.u0 != u0 )\n        {\n            if ( toY.u0 != u1 && toY.u0 != u2 && toY.u0 != u3 )\n            {\n                u0 = toY.u0;\n\n                if ( !_LoadScanlineLinear( row0, srcImage.width, pSrc + (rowPitch * u0), rowPitch, srcImage.format, filter ) )\n                    return E_FAIL;\n            }\n            else if ( toY.u0 == u1 )\n            {\n                u0 = u1;\n                u1 = size_t(-1);\n\n                std::swap( row0, row1 );\n            }\n            else if ( toY.u0 == u2 )\n            {\n                u0 = u2;\n                u2 = size_t(-1);\n\n                std::swap( row0, row2 );\n            }\n            else if ( toY.u0 == u3 )\n            {\n                u0 = u3;\n                u3 = size_t(-1);\n\n                std::swap( row0, row3 );\n            }\n        }\n\n        // Scanline 2\n        if ( toY.u1 != u1 )\n        {\n            if ( toY.u1 != u2 && toY.u1 != u3 )\n            {\n                u1 = toY.u1;\n\n                if ( !_LoadScanlineLinear( row1, srcImage.width, pSrc + (rowPitch * u1), rowPitch, srcImage.format, filter ) )\n                    return E_FAIL;\n            }\n            else if ( toY.u1 == u2 )\n            {\n                u1 = u2;\n                u2 = size_t(-1);\n\n                std::swap( row1, row2 );\n            }\n            else if ( toY.u1 == u3 )\n            {\n                u1 = u3;\n                u3 = size_t(-1);\n\n                std::swap( row1, row3 );\n            }\n        }\n\n        // Scanline 3\n        if ( toY.u2 != u2 )\n        {\n            if ( toY.u2 != u3 )\n            {\n                u2 = toY.u2;\n\n                if ( !_LoadScanlineLinear( row2, srcImage.width, pSrc + (rowPitch * u2), rowPitch, srcImage.format, filter ) )\n                    return E_FAIL;\n            }\n            else\n            {\n                u2 = u3;\n                u3 = size_t(-1);\n\n                std::swap( row2, row3 );\n            }\n        }\n\n        // Scanline 4\n        if ( toY.u3 != u3 )\n        {\n            u3 = toY.u3;\n\n            if ( !_LoadScanlineLinear( row3, srcImage.width, pSrc + (rowPitch * u3), rowPitch, srcImage.format, filter ) )\n                return E_FAIL;\n        }\n\n        for( size_t x = 0; x < destImage.width; ++x )\n        {\n            auto& toX = cfX[ x ];\n\n            XMVECTOR C0, C1, C2, C3;\n\n            CUBIC_INTERPOLATE( C0, toX.x, row0[ toX.u0 ], row0[ toX.u1 ], row0[ toX.u2 ], row0[ toX.u3 ] );\n            CUBIC_INTERPOLATE( C1, toX.x, row1[ toX.u0 ], row1[ toX.u1 ], row1[ toX.u2 ], row1[ toX.u3 ] );\n            CUBIC_INTERPOLATE( C2, toX.x, row2[ toX.u0 ], row2[ toX.u1 ], row2[ toX.u2 ], row2[ toX.u3 ] );\n            CUBIC_INTERPOLATE( C3, toX.x, row3[ toX.u0 ], row3[ toX.u1 ], row3[ toX.u2 ], row3[ toX.u3 ] );\n\n            CUBIC_INTERPOLATE( target[x], toY.x, C0, C1, C2, C3 );\n        }\n\n        if ( !_StoreScanlineLinear( pDest, destImage.rowPitch, destImage.format, target, destImage.width, filter ) )\n            return E_FAIL;\n        pDest += destImage.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//--- Triangle Filter ---\nstatic HRESULT _ResizeTriangleFilter( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    assert( srcImage.pixels && destImage.pixels );\n    assert( srcImage.format == destImage.format );\n\n    using namespace TriangleFilter;\n\n    // Allocate initial temporary space (1 scanline, accumulation rows, plus X and Y filters)\n    ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast<XMVECTOR*>( _aligned_malloc( sizeof(XMVECTOR) * srcImage.width, 16 ) ) );\n    if ( !scanline )\n        return E_OUTOFMEMORY;\n\n    std::unique_ptr<TriangleRow[]> rowActive( new (std::nothrow) TriangleRow[ destImage.height ] );\n    if ( !rowActive )\n        return E_OUTOFMEMORY;\n\n    TriangleRow * rowFree = nullptr;\n\n    std::unique_ptr<Filter> tfX;\n    HRESULT hr = _Create( srcImage.width, destImage.width, (filter & TEX_FILTER_WRAP_U) != 0, tfX );\n    if ( FAILED(hr) )\n        return hr;\n\n    std::unique_ptr<Filter> tfY;\n    hr = _Create( srcImage.height, destImage.height, (filter & TEX_FILTER_WRAP_V) != 0, tfY );\n    if ( FAILED(hr) )\n        return hr;\n\n    XMVECTOR* row = scanline.get();\n\n#ifdef _DEBUG\n    memset( row, 0xCD, sizeof(XMVECTOR)*srcImage.width );\n#endif\n\n    auto xFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfX.get() ) + tfX->sizeInBytes );\n    auto yFromEnd = reinterpret_cast<const FilterFrom*>( reinterpret_cast<const uint8_t*>( tfY.get() ) + tfY->sizeInBytes );\n\n    // Count times rows get written\n    for( FilterFrom* yFrom = tfY->from; yFrom < yFromEnd; )\n    {\n        for ( size_t j = 0; j < yFrom->count; ++j )\n        {\n            size_t v = yFrom->to[ j ].u;\n            assert( v < destImage.height );\n            ++rowActive[ v ].remaining;\n        }\n\n        yFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( yFrom ) + yFrom->sizeInBytes );\n    }\n\n    // Filter image\n    const uint8_t* pSrc = srcImage.pixels;\n    size_t rowPitch = srcImage.rowPitch;\n    const uint8_t* pEndSrc = pSrc + rowPitch * srcImage.height;\n\n    uint8_t* pDest = destImage.pixels;\n\n    for( FilterFrom* yFrom = tfY->from; yFrom < yFromEnd; )\n    {\n        // Create accumulation rows as needed\n        for ( size_t j = 0; j < yFrom->count; ++j )\n        {\n            size_t v = yFrom->to[ j ].u;\n            assert( v < destImage.height );\n            TriangleRow* rowAcc = &rowActive[ v ];\n\n            if ( !rowAcc->scanline )\n            {\n                if ( rowFree )\n                {\n                    // Steal and reuse scanline from 'free row' list\n                    assert( rowFree->scanline != 0 );\n                    rowAcc->scanline.reset( rowFree->scanline.release() );\n                    rowFree = rowFree->next;\n                }\n                else\n                {\n                    rowAcc->scanline.reset( reinterpret_cast<XMVECTOR*>( _aligned_malloc( sizeof(XMVECTOR) * destImage.width, 16 ) ) );\n                    if ( !rowAcc->scanline )\n                        return E_OUTOFMEMORY;\n                }\n\n                memset( rowAcc->scanline.get(), 0, sizeof(XMVECTOR) * destImage.width );\n            }\n        }\n\n        // Load source scanline\n        if ( (pSrc + rowPitch) > pEndSrc )\n            return E_FAIL;\n\n        if ( !_LoadScanlineLinear( row, srcImage.width, pSrc, rowPitch, srcImage.format, filter ) )\n            return E_FAIL;\n\n        pSrc += rowPitch;\n\n        // Process row\n        size_t x = 0;\n        for( FilterFrom* xFrom = tfX->from; xFrom < xFromEnd; ++x )\n        {\n            for ( size_t j = 0; j < yFrom->count; ++j )\n            {\n                size_t v = yFrom->to[ j ].u;\n                assert( v < destImage.height );\n                float yweight = yFrom->to[ j ].weight;\n\n                XMVECTOR* accPtr = rowActive[ v ].scanline.get();\n                if ( !accPtr )\n                    return E_POINTER;\n\n                for ( size_t k = 0; k < xFrom->count; ++k )\n                {\n                    size_t u = xFrom->to[ k ].u;\n                    assert( u < destImage.width );\n\n                    XMVECTOR weight = XMVectorReplicate( yweight * xFrom->to[ k ].weight );\n\n                    assert( x < srcImage.width );\n                    accPtr[ u ] = XMVectorMultiplyAdd( row[ x ], weight, accPtr[ u ] );\n                }\n            }\n\n            xFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( xFrom ) + xFrom->sizeInBytes );\n        }\n\n        // Write completed accumulation rows\n        for ( size_t j = 0; j < yFrom->count; ++j )\n        {\n            size_t v = yFrom->to[ j ].u;\n            assert( v < destImage.height );\n            TriangleRow* rowAcc = &rowActive[ v ];\n\n            assert( rowAcc->remaining > 0 );\n            --rowAcc->remaining;\n\n            if ( !rowAcc->remaining )\n            {\n                XMVECTOR* pAccSrc = rowAcc->scanline.get();\n                if ( !pAccSrc )\n                    return E_POINTER;\n\n                switch( destImage.format )\n                {\n                case DXGI_FORMAT_R10G10B10A2_UNORM:\n                case DXGI_FORMAT_R10G10B10A2_UINT:\n                    {\n                        // Need to slightly bias results for floating-point error accumulation which can\n                        // be visible with harshly quantized values\n                        static const XMVECTORF32 Bias = { 0.f, 0.f, 0.f, 0.1f };\n                       \n                        XMVECTOR* ptr = pAccSrc;\n                        for( size_t i=0; i < destImage.width; ++i, ++ptr )\n                        {\n                            *ptr = XMVectorAdd( *ptr, Bias );\n                        }\n                    }\n                    break;\n                }\n\n                // This performs any required clamping\n                if ( !_StoreScanlineLinear( pDest + (destImage.rowPitch * v), destImage.rowPitch, destImage.format, pAccSrc, destImage.width, filter ) )\n                    return E_FAIL;\n\n                // Put row on freelist to reuse it's allocated scanline\n                rowAcc->next = rowFree;\n                rowFree = rowAcc;\n            }\n        }\n\n        yFrom = reinterpret_cast<FilterFrom*>( reinterpret_cast<uint8_t*>( yFrom ) + yFrom->sizeInBytes );\n    }\n\n    return S_OK;\n}\n\n\n//--- Custom filter resize ---\nstatic HRESULT _PerformResizeUsingCustomFilters( _In_ const Image& srcImage, _In_ DWORD filter, _In_ const Image& destImage )\n{\n    if ( !srcImage.pixels || !destImage.pixels )\n        return E_POINTER;\n\n    static_assert( TEX_FILTER_POINT == 0x100000, \"TEX_FILTER_ flag values don't match TEX_FILTER_MASK\" );\n\n    DWORD filter_select = ( filter & TEX_FILTER_MASK );\n    if ( !filter_select )\n    {\n        // Default filter choice\n        filter_select = ( ( (destImage.width << 1) == srcImage.width ) && ( (destImage.height << 1) == srcImage.height ) )\n                        ? TEX_FILTER_BOX : TEX_FILTER_LINEAR;\n    }\n\n    switch( filter_select )\n    {\n    case TEX_FILTER_POINT:\n        return _ResizePointFilter( srcImage, destImage );\n        \n    case TEX_FILTER_BOX:\n        return _ResizeBoxFilter( srcImage, filter, destImage );\n\n    case TEX_FILTER_LINEAR:\n        return _ResizeLinearFilter( srcImage, filter, destImage );\n\n    case TEX_FILTER_CUBIC:\n        return _ResizeCubicFilter( srcImage, filter, destImage );\n\n    case TEX_FILTER_TRIANGLE:\n        return _ResizeTriangleFilter( srcImage, filter, destImage );\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Resize image\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Resize( const Image& srcImage, size_t width, size_t height, DWORD filter, ScratchImage& image )\n{\n    if ( width == 0 || height == 0 )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( (srcImage.width > 0xFFFFFFFF) || (srcImage.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n\n    if ( (width > 0xFFFFFFFF) || (height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    if ( !srcImage.pixels )\n        return E_POINTER;\n\n    if ( IsCompressed( srcImage.format ) )\n    {\n        // We don't support resizing compressed images\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    HRESULT hr = image.Initialize2D( srcImage.format, width, height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n   \n    const Image *rimage = image.GetImage( 0, 0, 0 );\n    if ( !rimage )\n        return E_POINTER;\n\n    if ( _UseWICFiltering( srcImage.format, filter ) )\n    {\n        WICPixelFormatGUID pfGUID;\n        if ( _DXGIToWIC( srcImage.format, pfGUID, true ) )\n        {\n            // Case 1: Source format is supported by Windows Imaging Component\n            hr = _PerformResizeUsingWIC( srcImage, filter, pfGUID, *rimage );\n        }\n        else\n        {\n            // Case 2: Source format is not supported by WIC, so we have to convert, resize, and convert back\n            hr = _PerformResizeViaF32( srcImage, filter, *rimage );\n        }\n    }\n    else\n    {\n        hr = _PerformResizeUsingCustomFilters( srcImage, filter, *rimage );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Resize image (complex)\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT Resize( const Image* srcImages, size_t nimages, const TexMetadata& metadata,\n                size_t width, size_t height, DWORD filter, ScratchImage& result )\n{\n    if ( !srcImages || !nimages || width == 0 || height == 0 )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( (width > 0xFFFFFFFF) || (height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    TexMetadata mdata2 = metadata;\n    mdata2.width = width;\n    mdata2.height = height;\n    mdata2.mipLevels = 1;\n    HRESULT hr = result.Initialize( mdata2 );\n    if ( FAILED(hr) )\n        return hr;\n\n    bool usewic = _UseWICFiltering( metadata.format, filter );\n\n    WICPixelFormatGUID pfGUID = {0};\n    bool wicpf = ( usewic ) ? _DXGIToWIC( metadata.format, pfGUID, true ) : false;\n\n    switch ( metadata.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        assert( metadata.depth == 1 );\n\n        for( size_t item = 0; item < metadata.arraySize; ++item )\n        {\n            size_t srcIndex = metadata.ComputeIndex( 0, item, 0 );\n            if ( srcIndex >= nimages )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n            const Image* srcimg = &srcImages[ srcIndex ];\n            const Image* destimg = result.GetImage( 0, item, 0 );\n            if ( !srcimg || !destimg )\n            {\n                result.Release();\n                return E_POINTER;\n            }\n\n            if ( srcimg->format != metadata.format )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n#ifdef _M_X64\n            if ( (srcimg->width > 0xFFFFFFFF) || (srcimg->height > 0xFFFFFFFF) )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n#endif\n\n            if ( usewic )\n            {\n                if ( wicpf )\n                {\n                    // Case 1: Source format is supported by Windows Imaging Component\n                    hr = _PerformResizeUsingWIC( *srcimg, filter, pfGUID, *destimg );\n                }\n                else\n                {\n                    // Case 2: Source format is not supported by WIC, so we have to convert, resize, and convert back\n                    hr = _PerformResizeViaF32( *srcimg, filter, *destimg );\n                }\n            }\n            else\n            {\n                // Case 3: not using WIC resizing\n                hr = _PerformResizeUsingCustomFilters( *srcimg, filter, *destimg );\n            }\n\n            if ( FAILED(hr) )\n            {\n                result.Release();\n                return hr;\n            }\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        assert( metadata.arraySize == 1 );\n\n        for( size_t slice = 0; slice < metadata.depth; ++slice )\n        {\n            size_t srcIndex = metadata.ComputeIndex( 0, 0, slice );\n            if ( srcIndex >= nimages )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n            const Image* srcimg = &srcImages[ srcIndex ];\n            const Image* destimg = result.GetImage( 0, 0, slice );\n            if ( !srcimg || !destimg )\n            {\n                result.Release();\n                return E_POINTER;\n            }\n\n            if ( srcimg->format != metadata.format )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n\n#ifdef _M_X64\n            if ( (srcimg->width > 0xFFFFFFFF) || (srcimg->height > 0xFFFFFFFF) )\n            {\n                result.Release();\n                return E_FAIL;\n            }\n#endif\n\n            if ( usewic )\n            {\n                if ( wicpf )\n                {\n                    // Case 1: Source format is supported by Windows Imaging Component\n                    hr = _PerformResizeUsingWIC( *srcimg, filter, pfGUID, *destimg );\n                }\n                else\n                {\n                    // Case 2: Source format is not supported by WIC, so we have to convert, resize, and convert back\n                    hr = _PerformResizeViaF32( *srcimg, filter, *destimg );\n                }\n            }\n            else\n            {\n                // Case 3: not using WIC resizing\n                hr = _PerformResizeUsingCustomFilters( *srcimg, filter, *destimg );\n            }\n\n            if ( FAILED(hr) )\n            {\n                result.Release();\n                return hr;\n            }\n        }\n        break;\n\n    default:\n        result.Release();\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexTGA.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexTGA.cpp\n//  \n// DirectX Texture Library - Targa Truevision (TGA) file format reader/writer\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n//\n// The implementation here has the following limitations:\n//      * Does not support files that contain color maps (these are rare in practice)\n//      * Interleaved files are not supported (deprecated aspect of TGA format)\n//      * Only supports 8-bit grayscale; 16-, 24-, and 32-bit truecolor images\n//      * Always writes uncompressed files (i.e. can read RLE compression, but does not write it)\n//\n\nenum TGAImageType\n{\n    TGA_NO_IMAGE            = 0,\n    TGA_COLOR_MAPPED        = 1,\n    TGA_TRUECOLOR           = 2,\n    TGA_BLACK_AND_WHITE     = 3,\n    TGA_COLOR_MAPPED_RLE    = 9,\n    TGA_TRUECOLOR_RLE       = 10,\n    TGA_BLACK_AND_WHITE_RLE = 11,\n};\n\nenum TGADescriptorFlags\n{\n    TGA_FLAGS_INVERTX           = 0x10,\n    TGA_FLAGS_INVERTY           = 0x20,\n    TGA_FLAGS_INTERLEAVED_2WAY  = 0x40, // Deprecated\n    TGA_FLAGS_INTERLEAVED_4WAY  = 0x80, // Deprecated\n};\n\nconst char* g_TGA20_Signature = \"TRUEVISION-XFILE.\";\n\n#pragma pack(push,1)\nstruct TGA_HEADER\n{\n    uint8_t     bIDLength;\n    uint8_t     bColorMapType;\n    uint8_t     bImageType;\n    uint16_t    wColorMapFirst;\n    uint16_t    wColorMapLength;\n    uint8_t     bColorMapSize;\n    uint16_t    wXOrigin;\n    uint16_t    wYOrigin;\n    uint16_t    wWidth;\n    uint16_t    wHeight;\n    uint8_t     bBitsPerPixel;\n    uint8_t     bDescriptor;\n};\n\nstruct TGA_FOOTER\n{\n    uint16_t    dwExtensionOffset;\n    uint16_t    dwDeveloperOffset;\n    char        Signature[18];\n};\n\nstruct TGA_EXTENSION\n{\n    uint16_t    wSize;\n    char        szAuthorName[41];\n    char        szAuthorComment[324];\n    uint16_t    wStampMonth;\n    uint16_t    wStampDay;\n    uint16_t    wStampYear;\n    uint16_t    wStampHour;\n    uint16_t    wStampMinute;\n    uint16_t    wStampSecond;\n    char        szJobName[41];\n    uint16_t    wJobHour;\n    uint16_t    wJobMinute;\n    uint16_t    wJobSecond;\n    char        szSoftwareId[41];\n    uint16_t    wVersionNumber;\n    uint8_t     bVersionLetter;\n    uint32_t    dwKeyColor;\n    uint16_t    wPixelNumerator;\n    uint16_t    wPixelDenominator;\n    uint16_t    wGammaNumerator;\n    uint16_t    wGammaDenominator;\n    uint32_t    dwColorOffset;\n    uint32_t    dwStampOffset;\n    uint32_t    dwScanOffset;\n    uint8_t     bAttributesType;\n};\n#pragma pack(pop)\n\nenum CONVERSION_FLAGS\n{\n    CONV_FLAGS_NONE     = 0x0,\n    CONV_FLAGS_EXPAND   = 0x1,      // Conversion requires expanded pixel size\n    CONV_FLAGS_INVERTX  = 0x2,      // If set, scanlines are right-to-left\n    CONV_FLAGS_INVERTY  = 0x4,      // If set, scanlines are top-to-bottom\n    CONV_FLAGS_RLE      = 0x8,      // Source data is RLE compressed\n\n    CONV_FLAGS_SWIZZLE  = 0x10000,  // Swizzle BGR<->RGB data\n    CONV_FLAGS_888      = 0x20000,  // 24bpp format\n};\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Decodes TGA header\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecodeTGAHeader( _In_reads_bytes_(size) LPCVOID pSource, size_t size, _Out_ TexMetadata& metadata, size_t& offset,\n                                 _Inout_opt_ DWORD* convFlags )\n{\n    if ( !pSource )\n        return E_INVALIDARG;\n\n    memset( &metadata, 0, sizeof(TexMetadata) );\n\n    if ( size < sizeof(TGA_HEADER) )\n    {\n        return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n    }\n\n    auto pHeader = reinterpret_cast<const TGA_HEADER*>( pSource );\n\n    if ( pHeader->bColorMapType != 0\n         || pHeader->wColorMapLength != 0 )\n    {\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    if ( pHeader->bDescriptor & (TGA_FLAGS_INTERLEAVED_2WAY|TGA_FLAGS_INTERLEAVED_4WAY) )\n    {\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    if ( !pHeader->wWidth || !pHeader->wHeight )\n    {\n        return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n    }\n         \n    switch ( pHeader->bImageType )\n    {\n    case TGA_TRUECOLOR:\n    case TGA_TRUECOLOR_RLE:\n        switch( pHeader->bBitsPerPixel )\n        {\n        case 16:\n            metadata.format = DXGI_FORMAT_B5G5R5A1_UNORM;\n            break;\n\n        case 24:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            if ( convFlags )\n                *convFlags |= CONV_FLAGS_EXPAND;\n            // We could use DXGI_FORMAT_B8G8R8X8_UNORM, but we prefer DXGI 1.0 formats\n            break;\n\n        case 32:\n            metadata.format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            // We could use DXGI_FORMAT_B8G8R8A8_UNORM, but we prefer DXGI 1.0 formats\n            break;\n        }\n\n        if ( convFlags && (pHeader->bImageType == TGA_TRUECOLOR_RLE) )\n        {\n            *convFlags |= CONV_FLAGS_RLE;\n        }\n        break;\n\n    case TGA_BLACK_AND_WHITE:\n    case TGA_BLACK_AND_WHITE_RLE:\n        switch( pHeader->bBitsPerPixel )\n        {\n        case 8:\n            metadata.format = DXGI_FORMAT_R8_UNORM;\n            break;\n\n        default:\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n        }\n\n        if ( convFlags && (pHeader->bImageType == TGA_BLACK_AND_WHITE_RLE) )\n        {\n            *convFlags |= CONV_FLAGS_RLE;\n        }\n        break;\n\n    case TGA_NO_IMAGE:\n    case TGA_COLOR_MAPPED:\n    case TGA_COLOR_MAPPED_RLE:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_INVALID_DATA );\n    }\n\n    metadata.width = pHeader->wWidth;\n    metadata.height = pHeader->wHeight;\n    metadata.depth = metadata.arraySize = metadata.mipLevels = 1;\n    metadata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n    if ( convFlags )\n    {\n        if ( pHeader->bDescriptor & TGA_FLAGS_INVERTX )\n            *convFlags |= CONV_FLAGS_INVERTX;\n\n        if ( pHeader->bDescriptor & TGA_FLAGS_INVERTY )\n            *convFlags |= CONV_FLAGS_INVERTY;\n    }\n\n    offset = sizeof( TGA_HEADER );\n\n    if ( pHeader->bIDLength != 0 )\n    {\n        offset += pHeader->bIDLength;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Set alpha for images with all 0 alpha channel\n//-------------------------------------------------------------------------------------\nstatic HRESULT _SetAlphaChannelToOpaque( _In_ const Image* image )\n{\n    assert( image );\n\n    auto pPixels = reinterpret_cast<uint8_t*>( image->pixels );\n    if ( !pPixels )\n        return E_POINTER;\n\n    for( size_t y = 0; y < image->height; ++y )\n    {\n        _CopyScanline( pPixels, image->rowPitch, pPixels, image->rowPitch, image->format, TEXP_SCANLINE_SETALPHA );\n        pPixels += image->rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Uncompress pixel data from a TGA into the target image\n//-------------------------------------------------------------------------------------\nstatic HRESULT _UncompressPixels( _In_reads_bytes_(size) LPCVOID pSource, size_t size, _In_ const Image* image, _In_ DWORD convFlags )\n{\n    assert( pSource && size > 0 );\n\n    if ( !image || !image->pixels )\n        return E_POINTER;\n\n    // Compute TGA image data pitch\n    size_t rowPitch;\n    if ( convFlags & CONV_FLAGS_EXPAND )\n    {\n        rowPitch = image->width * 3;\n    }\n    else\n    {\n        size_t slicePitch;\n        ComputePitch( image->format, image->width, image->height, rowPitch, slicePitch, CP_FLAGS_NONE );\n    }\n\n    auto sPtr = reinterpret_cast<const uint8_t*>( pSource );\n    const uint8_t* endPtr = sPtr + size;\n\n    switch( image->format )\n    {\n    //--------------------------------------------------------------------------- 8-bit\n    case DXGI_FORMAT_R8_UNORM:\n        for( size_t y=0; y < image->height; ++y )\n        {\n            size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n            assert( offset < rowPitch);\n\n            uint8_t* dPtr = reinterpret_cast<uint8_t*>( image->pixels )\n                         + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) )\n                         + offset;\n\n            for( size_t x=0; x < image->width; )\n            {\n                if ( sPtr >= endPtr )\n                    return E_FAIL;\n\n                if ( *sPtr & 0x80 )\n                {\n                    // Repeat\n                    size_t j = (*sPtr & 0x7F) + 1;\n                    if ( ++sPtr >= endPtr )\n                        return E_FAIL;\n\n                    for( ; j > 0; --j, ++x )\n                    {\n                        if ( x >= image->width )\n                            return E_FAIL;\n\n                        *dPtr = *sPtr;\n\n                        if ( convFlags & CONV_FLAGS_INVERTX )\n                            --dPtr;\n                        else\n                            ++dPtr;\n                    }\n\n                    ++sPtr;\n                }\n                else\n                {\n                    // Literal\n                    size_t j = (*sPtr & 0x7F) + 1;\n                    ++sPtr;\n\n                    if ( sPtr+j > endPtr )\n                        return E_FAIL;\n\n                    for( ; j > 0; --j, ++x )\n                    {\n                        if ( x >= image->width )\n                            return E_FAIL;\n\n                        *dPtr = *(sPtr++);\n\n                        if ( convFlags & CONV_FLAGS_INVERTX )\n                            --dPtr;\n                        else\n                            ++dPtr;\n                    }\n                }\n            }\n        }\n        break;\n\n    //-------------------------------------------------------------------------- 16-bit\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        {\n            bool nonzeroa = false;\n            for( size_t y=0; y < image->height; ++y )\n            {\n                size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n                assert( offset*2 < rowPitch);\n\n                uint16_t* dPtr = reinterpret_cast<uint16_t*>( reinterpret_cast<uint8_t*>( image->pixels )\n                             + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) ) )\n                             + offset;\n\n                for( size_t x=0; x < image->width; )\n                {\n                    if ( sPtr >= endPtr )\n                        return E_FAIL;\n\n                    if ( *sPtr & 0x80 )\n                    {\n                        // Repeat\n                        size_t j = (*sPtr & 0x7F) + 1;\n                        ++sPtr;\n\n                        if ( sPtr+1 >= endPtr )\n                            return E_FAIL;\n\n                        uint16_t t =  *sPtr | (*(sPtr+1) << 8);\n                        if ( t & 0x8000 )\n                            nonzeroa = true;\n                        sPtr += 2;\n\n                        for( ; j > 0; --j, ++x )\n                        {\n                            if ( x >= image->width )\n                                return E_FAIL;\n\n                            *dPtr = t;\n\n                            if ( convFlags & CONV_FLAGS_INVERTX )\n                                --dPtr;\n                            else\n                                ++dPtr;\n                        }\n                    }\n                    else\n                    {\n                        // Literal\n                        size_t j = (*sPtr & 0x7F) + 1;\n                        ++sPtr;\n\n                        if ( sPtr+(j*2) > endPtr )\n                            return E_FAIL;\n\n                        for( ; j > 0; --j, ++x )\n                        {\n                            if ( x >= image->width )\n                                return E_FAIL;\n\n                            uint16_t t =  *sPtr | (*(sPtr+1) << 8);\n                            if ( t & 0x8000 )\n                                nonzeroa = true;\n                            sPtr += 2;\n                            *dPtr = t;\n\n                            if ( convFlags & CONV_FLAGS_INVERTX )\n                                --dPtr;\n                            else\n                                ++dPtr;\n                        }\n                    }\n                }\n            }\n\n            // If there are no non-zero alpha channel entries, we'll assume alpha is not used and force it to opaque\n            if ( !nonzeroa )\n            {\n                HRESULT hr = _SetAlphaChannelToOpaque( image );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n        break;\n\n    //----------------------------------------------------------------------- 24/32-bit\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        {\n            bool nonzeroa = false;\n            for( size_t y=0; y < image->height; ++y )\n            {\n                size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n\n                uint32_t* dPtr = reinterpret_cast<uint32_t*>( reinterpret_cast<uint8_t*>( image->pixels )\n                              + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) ) )\n                              + offset;\n\n                for( size_t x=0; x < image->width; )\n                {\n                    if ( sPtr >= endPtr )\n                        return E_FAIL;\n\n                    if ( *sPtr & 0x80 )\n                    {\n                        // Repeat\n                        size_t j = (*sPtr & 0x7F) + 1;\n                        ++sPtr;\n\n                        DWORD t;\n                        if ( convFlags & CONV_FLAGS_EXPAND )\n                        {\n                            assert( offset*3 < rowPitch);\n\n                            if ( sPtr+2 >= endPtr )\n                                return E_FAIL;\n\n                            // BGR -> RGBA\n                            t = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | 0xFF000000;\n                            sPtr += 3;\n\n                            nonzeroa = true;\n                        }\n                        else\n                        {\n                            assert( offset*4 < rowPitch);\n\n                            if ( sPtr+3 >= endPtr )\n                                return E_FAIL;\n\n                            // BGRA -> RGBA\n                            t = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | ( *(sPtr+3) << 24 );\n\n                            if ( *(sPtr+3) > 0 )\n                                nonzeroa = true;\n\n                            sPtr += 4;\n                        }\n\n                        for( ; j > 0; --j, ++x )\n                        {\n                            if ( x >= image->width )\n                                return E_FAIL;\n\n                            *dPtr = t;\n\n                            if ( convFlags & CONV_FLAGS_INVERTX )\n                                --dPtr;\n                            else\n                                ++dPtr;\n                        }\n                    }\n                    else\n                    {\n                        // Literal\n                        size_t j = (*sPtr & 0x7F) + 1;\n                        ++sPtr;\n\n                        if ( convFlags & CONV_FLAGS_EXPAND )\n                        {\n                            if ( sPtr+(j*3) > endPtr )\n                                return E_FAIL;\n                        }\n                        else\n                        {\n                            if ( sPtr+(j*4) > endPtr )\n                                return E_FAIL;\n                        }\n\n                        for( ; j > 0; --j, ++x )\n                        {\n                            if ( x >= image->width )\n                                return E_FAIL;\n\n                            if ( convFlags & CONV_FLAGS_EXPAND )\n                            {\n                                assert( offset*3 < rowPitch);\n\n                                if ( sPtr+2 >= endPtr )\n                                    return E_FAIL;\n\n                                // BGR -> RGBA\n                                *dPtr = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | 0xFF000000;\n                                sPtr += 3;\n\n                                nonzeroa = true;\n                            }\n                            else\n                            {\n                                assert( offset*4 < rowPitch);\n\n                                if ( sPtr+3 >= endPtr )\n                                    return E_FAIL;\n\n                                // BGRA -> RGBA\n                                *dPtr = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | ( *(sPtr+3) << 24 );\n\n                                if ( *(sPtr+3) > 0 )\n                                    nonzeroa = true;\n\n                                sPtr += 4;\n                            }\n\n                            if ( convFlags & CONV_FLAGS_INVERTX )\n                                --dPtr;\n                            else\n                                ++dPtr;\n                        }\n                    }\n                }\n            }\n\n            // If there are no non-zero alpha channel entries, we'll assume alpha is not used and force it to opaque\n            if ( !nonzeroa )\n            {\n                HRESULT hr = _SetAlphaChannelToOpaque( image );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n        break;\n\n    //---------------------------------------------------------------------------------\n    default:\n        return E_FAIL;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Copies pixel data from a TGA into the target image\n//-------------------------------------------------------------------------------------\nstatic HRESULT _CopyPixels( _In_reads_bytes_(size) LPCVOID pSource, size_t size, _In_ const Image* image, _In_ DWORD convFlags )\n{\n    assert( pSource && size > 0 );\n\n    if ( !image || !image->pixels )\n        return E_POINTER;\n\n    // Compute TGA image data pitch\n    size_t rowPitch;\n    if ( convFlags & CONV_FLAGS_EXPAND )\n    {\n        rowPitch = image->width * 3;\n    }\n    else\n    {\n        size_t slicePitch;\n        ComputePitch( image->format, image->width, image->height, rowPitch, slicePitch, CP_FLAGS_NONE );\n    }\n\n    const uint8_t* sPtr = reinterpret_cast<const uint8_t*>( pSource );\n    const uint8_t* endPtr = sPtr + size;\n\n    switch( image->format )\n    {\n    //--------------------------------------------------------------------------- 8-bit\n    case DXGI_FORMAT_R8_UNORM:\n        for( size_t y=0; y < image->height; ++y )\n        {\n            size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n            assert( offset < rowPitch);\n\n            uint8_t* dPtr = reinterpret_cast<uint8_t*>( image->pixels )\n                         + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) )\n                         + offset;\n\n            for( size_t x=0; x < image->width; ++x )\n            {\n                if ( sPtr >= endPtr )\n                    return E_FAIL;\n\n                *dPtr = *(sPtr++);\n\n                if ( convFlags & CONV_FLAGS_INVERTX )\n                    --dPtr;\n                else\n                    ++dPtr;\n            }\n        }\n        break;\n\n    //-------------------------------------------------------------------------- 16-bit\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        {\n            bool nonzeroa = false;\n            for( size_t y=0; y < image->height; ++y )\n            {\n                size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n                assert( offset*2 < rowPitch);\n\n                uint16_t* dPtr = reinterpret_cast<uint16_t*>( reinterpret_cast<uint8_t*>( image->pixels )\n                             + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) ) )\n                             + offset;\n\n                for( size_t x=0; x < image->width; ++x )\n                {\n                    if ( sPtr+1 >= endPtr )\n                        return E_FAIL;\n\n                    uint16_t t =  *sPtr | (*(sPtr+1) << 8);\n                    sPtr += 2;\n                    *dPtr = t;\n\n                    if ( t & 0x8000 )\n                        nonzeroa = true;\n\n                    if ( convFlags & CONV_FLAGS_INVERTX )\n                        --dPtr;\n                    else\n                        ++dPtr;\n                }\n            }\n\n            // If there are no non-zero alpha channel entries, we'll assume alpha is not used and force it to opaque\n            if ( !nonzeroa )\n            {\n                HRESULT hr = _SetAlphaChannelToOpaque( image );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n        break;\n\n    //----------------------------------------------------------------------- 24/32-bit\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        {\n            bool nonzeroa = false;\n            for( size_t y=0; y < image->height; ++y )\n            {\n                size_t offset = ( (convFlags & CONV_FLAGS_INVERTX ) ? (image->width - 1) : 0 );\n\n                uint32_t* dPtr = reinterpret_cast<uint32_t*>( reinterpret_cast<uint8_t*>( image->pixels )\n                              + ( image->rowPitch * ( (convFlags & CONV_FLAGS_INVERTY) ? y : (image->height - y - 1) ) ) )\n                              + offset;\n\n                for( size_t x=0; x < image->width; ++x )\n                {\n                    if ( convFlags & CONV_FLAGS_EXPAND )\n                    {\n                        assert( offset*3 < rowPitch);\n\n                        if ( sPtr+2 >= endPtr )\n                            return E_FAIL;\n\n                        // BGR -> RGBA\n                        *dPtr = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | 0xFF000000;\n                        sPtr += 3;\n\n                        nonzeroa = true;\n                    }\n                    else\n                    {\n                        assert( offset*4 < rowPitch);\n\n                        if ( sPtr+3 >= endPtr )\n                            return E_FAIL;\n\n                        // BGRA -> RGBA\n                        *dPtr = ( *sPtr << 16 ) | ( *(sPtr+1) << 8 ) | ( *(sPtr+2) ) | ( *(sPtr+3) << 24 );\n\n                        if ( *(sPtr+3) > 0 )\n                            nonzeroa = true;\n\n                        sPtr += 4;\n                    }\n\n                    if ( convFlags & CONV_FLAGS_INVERTX )\n                        --dPtr;\n                    else\n                        ++dPtr;\n                }\n            }\n\n            // If there are no non-zero alpha channel entries, we'll assume alpha is not used and force it to opaque\n            if ( !nonzeroa )\n            {\n                HRESULT hr = _SetAlphaChannelToOpaque( image );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n        break;\n\n    //---------------------------------------------------------------------------------\n    default:\n        return E_FAIL;\n    }\n\n    return S_OK;   \n}\n\n\n//-------------------------------------------------------------------------------------\n// Encodes TGA file header\n//-------------------------------------------------------------------------------------\nstatic HRESULT _EncodeTGAHeader( _In_ const Image& image, _Out_ TGA_HEADER& header, _Inout_ DWORD& convFlags )\n{\n    memset( &header, 0, sizeof(TGA_HEADER) );\n\n    if ( (image.width > 0xFFFF)\n         || (image.height > 0xFFFF) )\n    {\n         return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    header.wWidth = static_cast<uint16_t>( image.width );\n    header.wHeight = static_cast<uint16_t>( image.height );\n\n    switch( image.format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        header.bImageType = TGA_TRUECOLOR;\n        header.bBitsPerPixel = 32;\n        header.bDescriptor = TGA_FLAGS_INVERTY | 8;\n        convFlags |= CONV_FLAGS_SWIZZLE;\n        break;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        header.bImageType = TGA_TRUECOLOR;\n        header.bBitsPerPixel = 32;\n        header.bDescriptor = TGA_FLAGS_INVERTY | 8;\n        break;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        header.bImageType = TGA_TRUECOLOR;\n        header.bBitsPerPixel = 24;\n        header.bDescriptor = TGA_FLAGS_INVERTY;\n        convFlags |= CONV_FLAGS_888;\n        break;\n\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_A8_UNORM:\n        header.bImageType = TGA_BLACK_AND_WHITE;\n        header.bBitsPerPixel = 8;\n        header.bDescriptor = TGA_FLAGS_INVERTY;\n        break;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        header.bImageType = TGA_TRUECOLOR;\n        header.bBitsPerPixel = 16;\n        header.bDescriptor = TGA_FLAGS_INVERTY | 1;\n        break;\n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Copies BGRX data to form BGR 24bpp data\n//-------------------------------------------------------------------------------------\n#pragma warning(suppress: 6001 6101) // In the case where outSize is insufficient we do not write to pDestination\nstatic void _Copy24bppScanline( _Out_writes_bytes_(outSize) LPVOID pDestination, _In_ size_t outSize, \n                                _In_reads_bytes_(inSize) LPCVOID pSource, _In_ size_t inSize )\n{\n    assert( pDestination && outSize > 0 );\n    assert( pSource && inSize > 0 );\n\n    assert( pDestination != pSource );\n\n    const uint32_t * __restrict sPtr = reinterpret_cast<const uint32_t*>(pSource);\n    uint8_t * __restrict dPtr = reinterpret_cast<uint8_t*>(pDestination);\n\n    if ( inSize >= 4 && outSize >= 3 )\n    {\n        const uint8_t* endPtr = dPtr + outSize;\n\n        for( size_t count = 0; count < ( inSize - 3 ); count += 4 )\n        {\n            uint32_t t = *(sPtr++);\n\n            if ( dPtr+3 > endPtr )\n                return;\n\n            *(dPtr++) = uint8_t(t & 0xFF);              // Blue\n            *(dPtr++) = uint8_t((t & 0xFF00) >> 8);     // Green\n            *(dPtr++) = uint8_t((t & 0xFF0000) >> 16);  // Red\n        }\n    }\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Obtain metadata from TGA file in memory/on disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GetMetadataFromTGAMemory( LPCVOID pSource, size_t size, TexMetadata& metadata )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n    size_t offset;\n    return _DecodeTGAHeader( pSource, size, metadata, offset, 0 );\n}\n\n_Use_decl_annotations_\nHRESULT GetMetadataFromTGAFile( LPCWSTR szFile, TexMetadata& metadata )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( szFile, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( szFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING,\n                                                  FILE_FLAG_SEQUENTIAL_SCAN, 0 ) ) );\n#endif\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Get the file size\n    LARGE_INTEGER fileSize = {0};\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)\n    FILE_STANDARD_INFO fileInfo;\n    if ( !GetFileInformationByHandleEx( hFile.get(), FileStandardInfo, &fileInfo, sizeof(fileInfo) ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n    fileSize = fileInfo.EndOfFile;\n#else\n    if ( !GetFileSizeEx( hFile.get(), &fileSize ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n#endif\n\n    // File is too big for 32-bit allocation, so reject read (4 GB should be plenty large enough for a valid TGA file)\n    if ( fileSize.HighPart > 0 )\n    {\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n    }\n\n    // Need at least enough data to fill the standard header to be a valid TGA\n    if ( fileSize.LowPart < ( sizeof(TGA_HEADER) ) )\n    {\n        return E_FAIL;\n    }\n\n    // Read the standard header (we don't need the file footer to parse the file)\n    uint8_t header[sizeof(TGA_HEADER)];\n    DWORD bytesRead = 0;\n    if ( !ReadFile( hFile.get(), header, sizeof(TGA_HEADER), &bytesRead, 0 ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    size_t offset;\n    return _DecodeTGAHeader( header, bytesRead, metadata, offset, 0 );\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a TGA file in memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromTGAMemory( LPCVOID pSource, size_t size, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n    image.Release();\n\n    size_t offset;\n    DWORD convFlags = 0;\n    TexMetadata mdata;\n    HRESULT hr = _DecodeTGAHeader( pSource, size, mdata, offset, &convFlags );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( offset > size )\n        return E_FAIL;\n\n    auto pPixels = reinterpret_cast<LPCVOID>( reinterpret_cast<const uint8_t*>(pSource) + offset );\n\n    size_t remaining = size - offset;\n    if ( remaining == 0 )\n        return E_FAIL;\n\n    hr = image.Initialize2D( mdata.format, mdata.width, mdata.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( convFlags & CONV_FLAGS_RLE )\n    {\n        hr = _UncompressPixels( pPixels, remaining, image.GetImage(0,0,0), convFlags );\n    }\n    else\n    {\n        hr = _CopyPixels( pPixels, remaining, image.GetImage(0,0,0), convFlags );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a TGA file from disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromTGAFile( LPCWSTR szFile, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    image.Release();\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( szFile, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( szFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING,\n                                                  FILE_FLAG_SEQUENTIAL_SCAN, 0 ) ) );\n#endif\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Get the file size\n    LARGE_INTEGER fileSize = {0};\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)\n    FILE_STANDARD_INFO fileInfo;\n    if ( !GetFileInformationByHandleEx( hFile.get(), FileStandardInfo, &fileInfo, sizeof(fileInfo) ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n    fileSize = fileInfo.EndOfFile;\n#else\n    if ( !GetFileSizeEx( hFile.get(), &fileSize ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n#endif\n\n    // File is too big for 32-bit allocation, so reject read (4 GB should be plenty large enough for a valid TGA file)\n    if ( fileSize.HighPart > 0 )\n    {\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n    }\n\n    // Need at least enough data to fill the header to be a valid TGA\n    if ( fileSize.LowPart < sizeof(TGA_HEADER) )\n    {\n        return E_FAIL;\n    }\n\n    // Read the header\n    uint8_t header[sizeof(TGA_HEADER)];\n    DWORD bytesRead = 0;\n    if ( !ReadFile( hFile.get(), header, sizeof(TGA_HEADER), &bytesRead, 0 ) )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    size_t offset;\n    DWORD convFlags = 0;\n    TexMetadata mdata;\n    HRESULT hr = _DecodeTGAHeader( header, bytesRead, mdata, offset, &convFlags );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Read the pixels\n    DWORD remaining = static_cast<DWORD>( fileSize.LowPart - offset );\n    if ( remaining == 0 )\n        return E_FAIL;\n\n    if ( offset > sizeof(TGA_HEADER) )\n    {\n        // Skip past the id string\n        LARGE_INTEGER filePos = { static_cast<DWORD>(offset), 0 };\n        if ( !SetFilePointerEx( hFile.get(), filePos, 0, FILE_BEGIN ) )\n        {\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n    }\n\n    hr = image.Initialize2D( mdata.format, mdata.width, mdata.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    assert( image.GetPixels() );\n\n    if ( !(convFlags & (CONV_FLAGS_RLE | CONV_FLAGS_EXPAND | CONV_FLAGS_INVERTX)) && (convFlags & CONV_FLAGS_INVERTY) )\n    {\n        // This case we can read directly into the image buffer in place\n        if ( !ReadFile( hFile.get(), image.GetPixels(), static_cast<DWORD>( image.GetPixelsSize() ), &bytesRead, 0 ) )\n        {\n            image.Release();\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesRead != image.GetPixelsSize() )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        switch( mdata.format  )\n        {\n        case DXGI_FORMAT_R8G8B8A8_UNORM:\n            {\n                // TGA stores 32-bit data in BGRA form, need to swizzle to RGBA\n                assert( image.GetImageCount() == 1 );\n                const Image* img = image.GetImage(0,0,0);\n                if ( !img )\n                    return E_POINTER;\n\n                uint8_t *pPixels = img->pixels;\n                if ( !pPixels )\n                    return E_POINTER;\n\n                size_t rowPitch = img->rowPitch;\n\n                // Scan for non-zero alpha channel\n                bool nonzeroa = false;\n\n                for( size_t h = 0; h < img->height; ++h )\n                {\n                    const uint32_t* sPtr = reinterpret_cast<const uint32_t*>( pPixels );\n\n                    for( size_t x=0; x < img->width; ++x )\n                    {\n                        if ( (*sPtr) & 0xff000000 )\n                        {\n                            nonzeroa = true;\n                            break;\n                        }\n\n                        ++sPtr;\n                    }\n\n                    if ( nonzeroa )\n                        break;\n\n                    pPixels += rowPitch;\n                }\n\n                DWORD tflags = ( !nonzeroa ) ? TEXP_SCANLINE_SETALPHA : TEXP_SCANLINE_NONE;\n\n                // Swizzle scanlines\n                pPixels = img->pixels;\n\n                for( size_t h = 0; h < img->height; ++h )\n                {\n                    _SwizzleScanline( pPixels, rowPitch, pPixels, rowPitch, mdata.format, tflags );\n                    pPixels += rowPitch;\n                }\n            }\n            break;\n\n        // If we start using DXGI_FORMAT_B8G8R8X8_UNORM or DXGI_FORMAT_B8G8R8A8_UNORM we need to check for a fully 0 alpha channel\n     \n        case DXGI_FORMAT_B5G5R5A1_UNORM:\n            {\n                assert( image.GetImageCount() == 1 );\n                const Image* img = image.GetImage(0,0,0);\n                if ( !img )\n                    return E_POINTER;\n\n                // Scan for non-zero alpha channel\n                bool nonzeroa = false;\n\n                const uint8_t *pPixels = img->pixels;\n                if ( !pPixels )\n                    return E_POINTER;\n\n                size_t rowPitch = img->rowPitch;\n\n                for( size_t h = 0; h < img->height; ++h )\n                {\n                    const uint16_t* sPtr = reinterpret_cast<const uint16_t*>( pPixels );\n\n                    for( size_t x=0; x < img->width; ++x )\n                    {\n                        if ( *sPtr & 0x8000 )\n                        {\n                            nonzeroa = true;\n                            break;\n                        }\n\n                        ++sPtr;\n                    }\n\n                    if ( nonzeroa )\n                        break;\n\n                    pPixels += rowPitch;\n                }\n\n                // If there are no non-zero alpha channel entries, we'll assume alpha is not used and force it to opaque\n                if ( !nonzeroa )\n                {\n                    hr = _SetAlphaChannelToOpaque( img );\n                    if ( FAILED(hr) )\n                        return hr;\n                }\n            }\n            break;\n        }\n    }\n    else // RLE || EXPAND || INVERTX || !INVERTY\n    {\n        std::unique_ptr<uint8_t[]> temp( new (std::nothrow) uint8_t[ remaining ] );\n        if ( !temp )\n        {\n            image.Release();\n            return E_OUTOFMEMORY;\n        }\n\n        if ( !ReadFile( hFile.get(), temp.get(), remaining, &bytesRead, 0 ) )\n        {\n            image.Release();\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesRead != remaining )\n        {\n            image.Release();\n            return E_FAIL;\n        }\n\n        if ( convFlags & CONV_FLAGS_RLE )\n        {\n            hr = _UncompressPixels( temp.get(), remaining, image.GetImage(0,0,0), convFlags );\n        }\n        else\n        {\n            hr = _CopyPixels( temp.get(), remaining, image.GetImage(0,0,0), convFlags );\n        }\n\n        if ( FAILED(hr) )\n        {\n            image.Release();\n            return hr;\n        }\n    }\n\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a TGA file to memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToTGAMemory( const Image& image, Blob& blob )\n{\n    if ( !image.pixels )\n        return E_POINTER;\n\n    TGA_HEADER tga_header;\n    DWORD convFlags = 0;\n    HRESULT hr = _EncodeTGAHeader( image, tga_header, convFlags );\n    if ( FAILED(hr) )\n        return hr;\n\n    blob.Release();\n\n    // Determine memory required for image data\n    size_t rowPitch, slicePitch;\n    if ( convFlags & CONV_FLAGS_888 )\n    {\n        rowPitch = image.width * 3;\n        slicePitch = image.height * rowPitch;\n    }\n    else\n    {\n        ComputePitch( image.format, image.width, image.height, rowPitch, slicePitch, CP_FLAGS_NONE );\n    }\n\n    hr = blob.Initialize( sizeof(TGA_HEADER) + slicePitch );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy header\n    auto dPtr = reinterpret_cast<uint8_t*>( blob.GetBufferPointer() );\n    assert( dPtr != 0 );\n    memcpy_s( dPtr, blob.GetBufferSize(), &tga_header, sizeof(TGA_HEADER) );\n    dPtr += sizeof(TGA_HEADER);\n\n    auto pPixels = reinterpret_cast<const uint8_t*>( image.pixels );\n    assert( pPixels );\n\n    for( size_t y = 0; y < image.height; ++y )\n    {\n        // Copy pixels\n        if ( convFlags & CONV_FLAGS_888 )\n        {\n            _Copy24bppScanline( dPtr, rowPitch, pPixels, image.rowPitch );\n        }\n        else if ( convFlags & CONV_FLAGS_SWIZZLE )\n        {\n            _SwizzleScanline( dPtr, rowPitch, pPixels, image.rowPitch, image.format, TEXP_SCANLINE_NONE );\n        }\n        else\n        {\n            _CopyScanline( dPtr, rowPitch, pPixels, image.rowPitch, image.format, TEXP_SCANLINE_NONE );\n        }\n\n        dPtr += rowPitch;\n        pPixels += image.rowPitch;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a TGA file to disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToTGAFile( const Image& image, LPCWSTR szFile )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    if ( !image.pixels )\n        return E_POINTER;\n\n    TGA_HEADER tga_header;\n    DWORD convFlags = 0;\n    HRESULT hr = _EncodeTGAHeader( image, tga_header, convFlags );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Create file and write header\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( szFile, GENERIC_WRITE, 0, CREATE_ALWAYS, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( szFile, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0 ) ) );\n#endif\n    if ( !hFile )\n    {\n        return HRESULT_FROM_WIN32( GetLastError() );\n    }\n\n    // Determine size for TGA pixel data\n    size_t rowPitch, slicePitch;\n    if ( convFlags & CONV_FLAGS_888 )\n    {\n        rowPitch = image.width * 3;\n        slicePitch = image.height * rowPitch;\n    }\n    else\n    {\n        ComputePitch( image.format, image.width, image.height, rowPitch, slicePitch, CP_FLAGS_NONE );\n    }\n\n    if ( slicePitch < 65535 )\n    {\n        // For small images, it is better to create an in-memory file and write it out\n        Blob blob;\n\n        hr = SaveToTGAMemory( image, blob );\n        if ( FAILED(hr) )\n            return hr;\n\n        // Write blob\n        const DWORD bytesToWrite = static_cast<DWORD>( blob.GetBufferSize() );\n        DWORD bytesWritten;\n        if ( !WriteFile( hFile.get(), blob.GetBufferPointer(), bytesToWrite,\n                         &bytesWritten, 0 ) )\n        {\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesWritten != bytesToWrite )\n        {\n            return E_FAIL;\n        }\n    }\n    else\n    {\n        // Otherwise, write the image one scanline at a time...\n        std::unique_ptr<uint8_t[]> temp( new (std::nothrow) uint8_t[ rowPitch ] );\n        if ( !temp )\n            return E_OUTOFMEMORY;\n\n        // Write header\n        DWORD bytesWritten;\n        if ( !WriteFile( hFile.get(), &tga_header, sizeof(TGA_HEADER), &bytesWritten, 0 ) )\n        {\n            return HRESULT_FROM_WIN32( GetLastError() );\n        }\n\n        if ( bytesWritten != sizeof(TGA_HEADER) )\n            return E_FAIL;\n\n        // Write pixels\n        auto pPixels = reinterpret_cast<const uint8_t*>( image.pixels );\n\n        for( size_t y = 0; y < image.height; ++y )\n        {\n            // Copy pixels\n            if ( convFlags & CONV_FLAGS_888 )\n            {\n                _Copy24bppScanline( temp.get(), rowPitch, pPixels, image.rowPitch );\n            }\n            else if ( convFlags & CONV_FLAGS_SWIZZLE )\n            {\n                _SwizzleScanline( temp.get(), rowPitch, pPixels, image.rowPitch, image.format, TEXP_SCANLINE_NONE );\n            }\n            else\n            {\n                _CopyScanline( temp.get(), rowPitch, pPixels, image.rowPitch, image.format, TEXP_SCANLINE_NONE );\n            }\n\n            pPixels += image.rowPitch;\n\n            if ( !WriteFile( hFile.get(), temp.get(), static_cast<DWORD>( rowPitch ), &bytesWritten, 0 ) )\n            {\n                return HRESULT_FROM_WIN32( GetLastError() );\n            }\n\n            if ( bytesWritten != rowPitch )\n                return E_FAIL;\n        }\n    }\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexUtil.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexUtil.cpp\n//  \n// DirectX Texture Library - Utilities\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\n//-------------------------------------------------------------------------------------\n// WIC Pixel Format Translation Data\n//-------------------------------------------------------------------------------------\nstruct WICTranslate\n{\n    GUID        wic;\n    DXGI_FORMAT format;\n    bool        srgb;\n};\n\nstatic WICTranslate g_WICFormats[] = \n{\n    { GUID_WICPixelFormat128bppRGBAFloat,       DXGI_FORMAT_R32G32B32A32_FLOAT,         false },\n\n    { GUID_WICPixelFormat64bppRGBAHalf,         DXGI_FORMAT_R16G16B16A16_FLOAT,         false },\n    { GUID_WICPixelFormat64bppRGBA,             DXGI_FORMAT_R16G16B16A16_UNORM,         true },\n\n    { GUID_WICPixelFormat32bppRGBA,             DXGI_FORMAT_R8G8B8A8_UNORM,             true },\n    { GUID_WICPixelFormat32bppBGRA,             DXGI_FORMAT_B8G8R8A8_UNORM,             true }, // DXGI 1.1\n    { GUID_WICPixelFormat32bppBGR,              DXGI_FORMAT_B8G8R8X8_UNORM,             true }, // DXGI 1.1\n\n    { GUID_WICPixelFormat32bppRGBA1010102XR,    DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, true }, // DXGI 1.1\n    { GUID_WICPixelFormat32bppRGBA1010102,      DXGI_FORMAT_R10G10B10A2_UNORM,          true },\n\n    { GUID_WICPixelFormat16bppBGRA5551,         DXGI_FORMAT_B5G5R5A1_UNORM,             true },\n    { GUID_WICPixelFormat16bppBGR565,           DXGI_FORMAT_B5G6R5_UNORM,               true },\n\n    { GUID_WICPixelFormat32bppGrayFloat,        DXGI_FORMAT_R32_FLOAT,                  false },\n    { GUID_WICPixelFormat16bppGrayHalf,         DXGI_FORMAT_R16_FLOAT,                  false },\n    { GUID_WICPixelFormat16bppGray,             DXGI_FORMAT_R16_UNORM,                  true },\n    { GUID_WICPixelFormat8bppGray,              DXGI_FORMAT_R8_UNORM,                   true },\n\n    { GUID_WICPixelFormat8bppAlpha,             DXGI_FORMAT_A8_UNORM,                   false },\n\n    { GUID_WICPixelFormatBlackWhite,            DXGI_FORMAT_R1_UNORM,                   false },\n};\n\nstatic bool g_WIC2 = false;\n\nnamespace DirectX\n{\n\n//=====================================================================================\n// WIC Utilities\n//=====================================================================================\n\n_Use_decl_annotations_\nDXGI_FORMAT _WICToDXGI( const GUID& guid )\n{\n    for( size_t i=0; i < _countof(g_WICFormats); ++i )\n    {\n        if ( memcmp( &g_WICFormats[i].wic, &guid, sizeof(GUID) ) == 0 )\n            return g_WICFormats[i].format;\n    }\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    if ( g_WIC2 )\n    {\n        if ( memcmp( &GUID_WICPixelFormat96bppRGBFloat, &guid, sizeof(GUID) ) == 0 )\n            return DXGI_FORMAT_R32G32B32_FLOAT;\n    }\n#endif\n\n    return DXGI_FORMAT_UNKNOWN;\n}\n\n_Use_decl_annotations_\nbool _DXGIToWIC( DXGI_FORMAT format, GUID& guid, bool ignoreRGBvsBGR )\n{\n    switch( format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        if ( ignoreRGBvsBGR )\n        {\n            // If we are not doing conversion so don't really care about BGR vs RGB color-order,\n            // we can use the canonical WIC 32bppBGRA format which avoids an extra format conversion when using the WIC scaler\n            memcpy( &guid, &GUID_WICPixelFormat32bppBGRA, sizeof(GUID) );\n        }\n        else\n        {\n            memcpy( &guid, &GUID_WICPixelFormat32bppRGBA, sizeof(GUID) );      \n        }\n        return true;\n\n    case DXGI_FORMAT_D32_FLOAT:\n        memcpy( &guid, &GUID_WICPixelFormat32bppGrayFloat, sizeof(GUID) );\n        return true;\n\n    case DXGI_FORMAT_D16_UNORM:\n        memcpy( &guid, &GUID_WICPixelFormat16bppGray, sizeof(GUID) );\n        return true;    \n\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        memcpy( &guid, &GUID_WICPixelFormat32bppBGRA, sizeof(GUID) );\n        return true;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        memcpy( &guid, &GUID_WICPixelFormat32bppBGR, sizeof(GUID) );\n        return true;\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n        if ( g_WIC2 )\n        {\n            memcpy( &guid, &GUID_WICPixelFormat96bppRGBFloat, sizeof(GUID) );\n            return true;\n        }\n        break;\n#endif\n\n    default:\n        for( size_t i=0; i < _countof(g_WICFormats); ++i )\n        {\n            if ( g_WICFormats[i].format == format )\n            {\n                memcpy( &guid, &g_WICFormats[i].wic, sizeof(GUID) );\n                return true;\n            }\n        }\n        break;\n    }\n\n    memcpy( &guid, &GUID_NULL, sizeof(GUID) );\n    return false;\n}\n\nDWORD _CheckWICColorSpace( _In_ const GUID& sourceGUID, _In_ const GUID& targetGUID )\n{\n    DWORD srgb = 0;\n\n    for( size_t i=0; i < _countof(g_WICFormats); ++i )\n    {\n        if ( memcmp( &g_WICFormats[i].wic, &sourceGUID, sizeof(GUID) ) == 0 )\n        {\n            if ( g_WICFormats[i].srgb )\n                srgb |= TEX_FILTER_SRGB_IN;\n        }\n\n        if ( memcmp( &g_WICFormats[i].wic, &targetGUID, sizeof(GUID) ) == 0 )\n        {\n            if ( g_WICFormats[i].srgb )\n                srgb |= TEX_FILTER_SRGB_OUT;\n        }\n    }\n\n    if ( (srgb & (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT)) == (TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT) )\n    {\n        srgb &= ~(TEX_FILTER_SRGB_IN|TEX_FILTER_SRGB_OUT);\n    }\n\n    return srgb;\n}\n\nbool _IsWIC2()\n{\n    return g_WIC2;\n}\n\nIWICImagingFactory* _GetWIC()\n{\n    static IWICImagingFactory* s_Factory = nullptr;\n\n    if ( s_Factory )\n        return s_Factory;\n\n#if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory2,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory2),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( SUCCEEDED(hr) )\n    {\n        // WIC2 is available on Windows 8 and Windows 7 SP1 with KB 2670838 installed\n        g_WIC2 = true;\n    }\n    else\n    {\n        hr = CoCreateInstance(\n            CLSID_WICImagingFactory1,\n            nullptr,\n            CLSCTX_INPROC_SERVER,\n            __uuidof(IWICImagingFactory),\n            (LPVOID*)&s_Factory\n            );\n\n        if ( FAILED(hr) )\n        {\n            s_Factory = nullptr;\n            return nullptr;\n        }\n    }\n#else\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( FAILED(hr) )\n    {\n        s_Factory = nullptr;\n        return nullptr;\n    }\n#endif\n\n    return s_Factory;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Public helper function to get common WIC codec GUIDs\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nREFGUID GetWICCodec( WICCodecs codec )\n{\n    switch( codec )\n    {\n    case WIC_CODEC_BMP:\n        return GUID_ContainerFormatBmp;\n\n    case WIC_CODEC_JPEG:\n        return GUID_ContainerFormatJpeg;\n\n    case WIC_CODEC_PNG:\n        return GUID_ContainerFormatPng;\n\n    case WIC_CODEC_TIFF:\n        return GUID_ContainerFormatTiff;\n\n    case WIC_CODEC_GIF:\n        return GUID_ContainerFormatGif;\n\n    case WIC_CODEC_WMP:\n        return GUID_ContainerFormatWmp;\n\n    case WIC_CODEC_ICO:\n        return GUID_ContainerFormatIco;\n\n    default:\n        return GUID_NULL;\n    }\n}\n\n\n//=====================================================================================\n// DXGI Format Utilities\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Returns bits-per-pixel for a given DXGI format, or 0 on failure\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nsize_t BitsPerPixel( DXGI_FORMAT fmt )\n{\n    switch( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        return 128;\n\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_UINT:\n    case DXGI_FORMAT_R32G32B32_SINT:\n        return 96;\n\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n    case DXGI_FORMAT_R32G32_TYPELESS:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R32G32_UINT:\n    case DXGI_FORMAT_R32G32_SINT:\n    case DXGI_FORMAT_R32G8X24_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n        return 64;\n\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n    case DXGI_FORMAT_R16G16_TYPELESS:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R16G16_UINT:\n    case DXGI_FORMAT_R16G16_SNORM:\n    case DXGI_FORMAT_R16G16_SINT:\n    case DXGI_FORMAT_R32_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R32_UINT:\n    case DXGI_FORMAT_R32_SINT:\n    case DXGI_FORMAT_R24G8_TYPELESS:\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_YUY2:\n    case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n    case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n        return 32;\n\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n    case 118 /* DXGI_FORMAT_D16_UNORM_S8_UINT */:\n    case 119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */:\n    case 120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */:\n        return 24;\n\n    case DXGI_FORMAT_R8G8_TYPELESS:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R8G8_UINT:\n    case DXGI_FORMAT_R8G8_SNORM:\n    case DXGI_FORMAT_R8G8_SINT:\n    case DXGI_FORMAT_R16_TYPELESS:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R16_UINT:\n    case DXGI_FORMAT_R16_SNORM:\n    case DXGI_FORMAT_R16_SINT:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_A8P8:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        return 16;\n\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n    case DXGI_FORMAT_NV11:\n        return 12;\n\n    case DXGI_FORMAT_R8_TYPELESS:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R8_UINT:\n    case DXGI_FORMAT_R8_SNORM:\n    case DXGI_FORMAT_R8_SINT:\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n        return 8;\n\n    case DXGI_FORMAT_R1_UNORM:\n        return 1;\n\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        return 4;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return 8;\n\n    default:\n        return 0;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Returns bits-per-color-channel for a given DXGI format, or 0 on failure\n// For mixed formats, it returns the largest color-depth in the format\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nsize_t BitsPerColor( DXGI_FORMAT fmt )\n{\n    switch( static_cast<int>(fmt) )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_UINT:\n    case DXGI_FORMAT_R32G32B32_SINT:\n    case DXGI_FORMAT_R32G32_TYPELESS:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R32G32_UINT:\n    case DXGI_FORMAT_R32G32_SINT:\n    case DXGI_FORMAT_R32G8X24_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_R32_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R32_UINT:\n    case DXGI_FORMAT_R32_SINT:\n        return 32;\n\n    case DXGI_FORMAT_R24G8_TYPELESS:\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n        return 24;\n\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n    case DXGI_FORMAT_R16G16_TYPELESS:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R16G16_UINT:\n    case DXGI_FORMAT_R16G16_SNORM:\n    case DXGI_FORMAT_R16G16_SINT:\n    case DXGI_FORMAT_R16_TYPELESS:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R16_UINT:\n    case DXGI_FORMAT_R16_SNORM:\n    case DXGI_FORMAT_R16_SINT:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_P016:\n    case DXGI_FORMAT_Y216:\n        return 16;\n\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n        return 14;\n\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n        return 11;\n\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_Y210:\n        return 10;\n\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n    case DXGI_FORMAT_R8G8_TYPELESS:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R8G8_UINT:\n    case DXGI_FORMAT_R8G8_SNORM:\n    case DXGI_FORMAT_R8G8_SINT:\n    case DXGI_FORMAT_R8_TYPELESS:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R8_UINT:\n    case DXGI_FORMAT_R8_SNORM:\n    case DXGI_FORMAT_R8_SINT:\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n    case DXGI_FORMAT_YUY2:\n    case DXGI_FORMAT_NV11:\n        return 8;\n\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return 7;\n\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        return 6;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n        return 5;\n\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        return 4;\n\n    case DXGI_FORMAT_R1_UNORM:\n        return 1;\n\n    case 116 /* DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT */:\n    case 117 /* DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT */:\n        // These are Xbox One platform specific types\n        return 10;\n\n    case 118 /* DXGI_FORMAT_D16_UNORM_S8_UINT */:\n    case 119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */:\n    case 120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */:\n        // These are Xbox One platform specific types\n        return 16;\n\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n    case DXGI_FORMAT_A8P8:\n        // Palettized formats return 0 for this function\n\n    default:\n        return 0;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Computes the image row pitch in bytes, and the slice ptich (size in bytes of the image)\n// based on DXGI format, width, and height\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nvoid ComputePitch( DXGI_FORMAT fmt, size_t width, size_t height,\n                   size_t& rowPitch, size_t& slicePitch, DWORD flags )\n{\n    assert( IsValid(fmt) );\n\n    if ( IsCompressed(fmt) )\n    {\n        size_t bpb = ( fmt == DXGI_FORMAT_BC1_TYPELESS\n                     || fmt == DXGI_FORMAT_BC1_UNORM\n                     || fmt == DXGI_FORMAT_BC1_UNORM_SRGB\n                     || fmt == DXGI_FORMAT_BC4_TYPELESS\n                     || fmt == DXGI_FORMAT_BC4_UNORM\n                     || fmt == DXGI_FORMAT_BC4_SNORM) ? 8 : 16;\n        size_t nbw = std::max<size_t>( 1, (width + 3) / 4 );\n        size_t nbh = std::max<size_t>( 1, (height + 3) / 4 );\n        rowPitch = nbw * bpb;\n\n        slicePitch = rowPitch * nbh;\n    }\n    else if ( IsPacked(fmt) )\n    {\n        size_t bpe = ( fmt == DXGI_FORMAT_Y210 || fmt == DXGI_FORMAT_Y216 ) ? 8 : 4;\n        rowPitch = ( ( width + 1 ) >> 1 ) * bpe;\n\n        slicePitch = rowPitch * height;\n    }\n    else if ( fmt == DXGI_FORMAT_NV11 )\n    {\n        rowPitch = ( ( width + 3 ) >> 2 ) * 4;\n\n        // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data\n        slicePitch = rowPitch * height * 2;\n    }\n    else if ( IsPlanar(fmt) )\n    {\n        size_t bpe = ( fmt == DXGI_FORMAT_P010 || fmt == DXGI_FORMAT_P016\n                       || fmt == DXGI_FORMAT(118 /* DXGI_FORMAT_D16_UNORM_S8_UINT */)\n                       || fmt == DXGI_FORMAT(119 /* DXGI_FORMAT_R16_UNORM_X8_TYPELESS */)\n                       || fmt == DXGI_FORMAT(120 /* DXGI_FORMAT_X16_TYPELESS_G8_UINT */) ) ? 4 : 2;\n        rowPitch = ( ( width + 1 ) >> 1 ) * bpe;\n\n        slicePitch = rowPitch * ( height + ( ( height + 1 ) >> 1 ) );\n    }\n    else\n    {\n        size_t bpp;\n\n        if ( flags & CP_FLAGS_24BPP )\n            bpp = 24;\n        else if ( flags & CP_FLAGS_16BPP )\n            bpp = 16;\n        else if ( flags & CP_FLAGS_8BPP )\n            bpp = 8;\n        else\n            bpp = BitsPerPixel( fmt );\n\n        if ( flags & ( CP_FLAGS_LEGACY_DWORD | CP_FLAGS_PARAGRAPH | CP_FLAGS_YMM | CP_FLAGS_ZMM | CP_FLAGS_PAGE4K ) )\n        {\n            if ( flags & CP_FLAGS_PAGE4K )\n            {\n                rowPitch = ( ( width * bpp + 32767 ) / 32768 ) * 4096;\n                slicePitch = rowPitch * height;\n            }\n            else if ( flags & CP_FLAGS_ZMM )\n            {\n                rowPitch = ( ( width * bpp + 511 ) / 512 ) * 64;\n                slicePitch = rowPitch * height;\n            }\n            else if ( flags & CP_FLAGS_YMM )\n            {\n                rowPitch = ( ( width * bpp + 255 ) / 256) * 32;\n                slicePitch = rowPitch * height;\n            }\n            else if ( flags & CP_FLAGS_PARAGRAPH )\n            {\n                rowPitch = ( ( width * bpp + 127 ) / 128 ) * 16;\n                slicePitch = rowPitch * height;\n            }\n            else // DWORD alignment\n            {\n                // Special computation for some incorrectly created DDS files based on\n                // legacy DirectDraw assumptions about pitch alignment\n                rowPitch = ( ( width * bpp + 31 ) / 32 ) * sizeof(uint32_t);\n                slicePitch = rowPitch * height;\n            }\n        }\n        else\n        {\n            // Default byte alignment\n            rowPitch = ( width * bpp + 7 ) / 8;\n            slicePitch = rowPitch * height;\n        }\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to an SRGB equivalent type if available\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nDXGI_FORMAT MakeSRGB( DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC1_UNORM:\n        return DXGI_FORMAT_BC1_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC2_UNORM:\n        return DXGI_FORMAT_BC2_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC3_UNORM:\n        return DXGI_FORMAT_BC3_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n        return DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n        return DXGI_FORMAT_B8G8R8X8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC7_UNORM:\n        return DXGI_FORMAT_BC7_UNORM_SRGB;\n\n    default:\n        return fmt;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to a format to an equivalent TYPELESS format if available\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nDXGI_FORMAT MakeTypeless( DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        return DXGI_FORMAT_R32G32B32A32_TYPELESS;\n\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_UINT:\n    case DXGI_FORMAT_R32G32B32_SINT:\n        return DXGI_FORMAT_R32G32B32_TYPELESS;\n\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n        return DXGI_FORMAT_R16G16B16A16_TYPELESS;\n\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R32G32_UINT:\n    case DXGI_FORMAT_R32G32_SINT:\n        return DXGI_FORMAT_R32G32_TYPELESS;\n\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n        return DXGI_FORMAT_R10G10B10A2_TYPELESS;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n        return DXGI_FORMAT_R8G8B8A8_TYPELESS;\n\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R16G16_UINT:\n    case DXGI_FORMAT_R16G16_SNORM:\n    case DXGI_FORMAT_R16G16_SINT:\n        return DXGI_FORMAT_R16G16_TYPELESS;\n\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R32_UINT:\n    case DXGI_FORMAT_R32_SINT:\n        return DXGI_FORMAT_R32_TYPELESS;\n\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R8G8_UINT:\n    case DXGI_FORMAT_R8G8_SNORM:\n    case DXGI_FORMAT_R8G8_SINT:\n        return DXGI_FORMAT_R8G8_TYPELESS;\n\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R16_UINT:\n    case DXGI_FORMAT_R16_SNORM:\n    case DXGI_FORMAT_R16_SINT:\n        return DXGI_FORMAT_R16_TYPELESS;\n\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R8_UINT:\n    case DXGI_FORMAT_R8_SNORM:\n    case DXGI_FORMAT_R8_SINT:\n        return DXGI_FORMAT_R8_TYPELESS;\n\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n        return DXGI_FORMAT_BC1_TYPELESS;\n\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n        return DXGI_FORMAT_BC2_TYPELESS;\n\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n        return DXGI_FORMAT_BC3_TYPELESS;\n\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        return DXGI_FORMAT_BC4_TYPELESS;\n\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n        return DXGI_FORMAT_BC5_TYPELESS;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n        return DXGI_FORMAT_B8G8R8A8_TYPELESS;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n        return DXGI_FORMAT_B8G8R8X8_TYPELESS;\n\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n        return DXGI_FORMAT_BC6H_TYPELESS;\n\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return DXGI_FORMAT_BC7_TYPELESS;\n\n    default:\n        return fmt;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to a TYPELESS format to an equivalent UNORM format if available\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nDXGI_FORMAT MakeTypelessUNORM( DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n        return DXGI_FORMAT_R16G16B16A16_UNORM;\n\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n        return DXGI_FORMAT_R10G10B10A2_UNORM;\n\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n        return DXGI_FORMAT_R8G8B8A8_UNORM;\n\n    case DXGI_FORMAT_R16G16_TYPELESS:\n        return DXGI_FORMAT_R16G16_UNORM;\n\n    case DXGI_FORMAT_R8G8_TYPELESS:\n        return DXGI_FORMAT_R8G8_UNORM;\n\n    case DXGI_FORMAT_R16_TYPELESS:\n        return DXGI_FORMAT_R16_UNORM;\n\n    case DXGI_FORMAT_R8_TYPELESS:\n        return DXGI_FORMAT_R8_UNORM;\n\n    case DXGI_FORMAT_BC1_TYPELESS:\n        return DXGI_FORMAT_BC1_UNORM;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n        return DXGI_FORMAT_BC2_UNORM;\n\n    case DXGI_FORMAT_BC3_TYPELESS:\n        return DXGI_FORMAT_BC3_UNORM;\n\n    case DXGI_FORMAT_BC4_TYPELESS:\n        return DXGI_FORMAT_BC4_UNORM;\n\n    case DXGI_FORMAT_BC5_TYPELESS:\n        return DXGI_FORMAT_BC5_UNORM;\n\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n        return DXGI_FORMAT_B8G8R8A8_UNORM;\n\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n        return DXGI_FORMAT_B8G8R8X8_UNORM;\n\n    case DXGI_FORMAT_BC7_TYPELESS:\n        return DXGI_FORMAT_BC7_UNORM;\n\n    default:\n        return fmt;\n    }\n}\n\n\n//-------------------------------------------------------------------------------------\n// Converts to a TYPELESS format to an equivalent FLOAT format if available\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nDXGI_FORMAT MakeTypelessFLOAT( DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n        return DXGI_FORMAT_R32G32B32A32_FLOAT;\n\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n        return DXGI_FORMAT_R32G32B32_FLOAT;\n\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n        return DXGI_FORMAT_R16G16B16A16_FLOAT;\n\n    case DXGI_FORMAT_R32G32_TYPELESS:\n        return DXGI_FORMAT_R32G32_FLOAT;\n\n    case DXGI_FORMAT_R16G16_TYPELESS:\n        return DXGI_FORMAT_R16G16_FLOAT;\n\n    case DXGI_FORMAT_R32_TYPELESS:\n        return DXGI_FORMAT_R32_FLOAT;\n\n    case DXGI_FORMAT_R16_TYPELESS:\n        return DXGI_FORMAT_R16_FLOAT;\n\n    default:\n        return fmt;\n    }\n}\n\n\n//=====================================================================================\n// TexMetadata\n//=====================================================================================\n\n_Use_decl_annotations_\nsize_t TexMetadata::ComputeIndex( size_t mip, size_t item, size_t slice ) const\n{\n    if ( mip >= mipLevels )\n        return size_t(-1);\n\n    switch( dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( slice > 0 )\n            return size_t(-1);\n\n        if ( item >= arraySize )\n            return size_t(-1);\n\n        return (item*( mipLevels ) + mip);\n\n    case TEX_DIMENSION_TEXTURE3D:\n        if ( item > 0 )\n        {\n            // No support for arrays of volumes\n            return size_t(-1);\n        }\n        else\n        {\n            size_t index = 0;\n            size_t d = depth;\n\n            for( size_t level = 0; level < mip; ++level )\n            {\n                index += d;\n                if ( d > 1 )\n                    d >>= 1;\n            }\n\n            if ( slice >= d )\n                return size_t(-1);\n\n            index += slice;\n\n            return index;\n        }\n        break;\n\n    default:\n        return size_t(-1);\n    }\n}\n\n\n//=====================================================================================\n// Blob - Bitmap image container\n//=====================================================================================\n\nBlob& Blob::operator= (Blob&& moveFrom)\n{\n    if ( this != &moveFrom )\n    {\n        Release();\n\n        _buffer = moveFrom._buffer;\n        _size = moveFrom._size;\n\n        moveFrom._buffer = nullptr;\n        moveFrom._size = 0;\n    }\n    return *this;\n}\n\nvoid Blob::Release()\n{\n    if ( _buffer )\n    {\n        _aligned_free( _buffer );\n        _buffer = nullptr;\n    }\n\n    _size = 0;\n}\n\n_Use_decl_annotations_\nHRESULT Blob::Initialize( size_t size )\n{\n    if ( !size )\n        return E_INVALIDARG;\n\n    Release();\n\n    _buffer = _aligned_malloc( size, 16 );\n    if ( !_buffer )\n    {\n        Release();\n        return E_OUTOFMEMORY;\n    }\n\n    _size = size;\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTexWIC.cpp",
    "content": "//-------------------------------------------------------------------------------------\n// DirectXTexWIC.cpp\n//  \n// DirectX Texture Library - WIC-based file reader/writer\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n//-------------------------------------------------------------------------------------\n\n#include \"directxtexp.h\"\n\nusing Microsoft::WRL::ComPtr;\n\n//-------------------------------------------------------------------------------------\n// IStream support for WIC Memory routines\n//-------------------------------------------------------------------------------------\n\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) && (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)\n\n    #include <shcore.h>\n    #pragma comment(lib,\"shcore.lib\")\n\n#ifdef __cplusplus_winrt\n\n    static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )\n    {\n        auto randomAccessStream = ref new ::Windows::Storage::Streams::InMemoryRandomAccessStream();\n        return CreateStreamOverRandomAccessStream( randomAccessStream, IID_PPV_ARGS( stream ) );\n    }\n\n#else\n\n    #include <wrl\\client.h>\n    #include <wrl\\wrappers\\corewrappers.h>\n    #include <windows.storage.streams.h>\n\n    static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )\n    {\n        Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> abiStream;\n        HRESULT hr = Windows::Foundation::ActivateInstance(\n            Microsoft::WRL::Wrappers::HStringReference( RuntimeClass_Windows_Storage_Streams_InMemoryRandomAccessStream ).Get(),\n            abiStream.GetAddressOf() );\n\n        if (SUCCEEDED(hr))\n        {\n            hr = CreateStreamOverRandomAccessStream( abiStream.Get(), IID_PPV_ARGS( stream ) );\n        }\n        return hr;\n    }\n\n#endif // __cplusplus_winrt\n\n#else\n\n    #pragma prefast(suppress:28196, \"a simple wrapper around an existing annotated function\" );\n    static inline HRESULT CreateMemoryStream( _Outptr_ IStream** stream )\n    {\n        return CreateStreamOnHGlobal( 0, TRUE, stream );\n    }\n\n#endif\n\n\n//-------------------------------------------------------------------------------------\n// WIC Pixel Format nearest conversion table\n//-------------------------------------------------------------------------------------\n\nstruct WICConvert\n{\n    GUID        source;\n    GUID        target;\n};\n\nstatic WICConvert g_WICConvert[] = \n{\n    // Directly support the formats listed in XnaTexUtil::g_WICFormats, so no conversion required\n    // Note target GUID in this conversion table must be one of those directly supported formats.\n\n    { GUID_WICPixelFormat1bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat2bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat4bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat8bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n\n    { GUID_WICPixelFormat2bppGray,              GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM \n    { GUID_WICPixelFormat4bppGray,              GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM \n\n    { GUID_WICPixelFormat16bppGrayFixedPoint,   GUID_WICPixelFormat16bppGrayHalf }, // DXGI_FORMAT_R16_FLOAT \n    { GUID_WICPixelFormat32bppGrayFixedPoint,   GUID_WICPixelFormat32bppGrayFloat }, // DXGI_FORMAT_R32_FLOAT \n\n    { GUID_WICPixelFormat16bppBGR555,           GUID_WICPixelFormat16bppBGRA5551 }, // DXGI_FORMAT_B5G5R5A1_UNORM \n    { GUID_WICPixelFormat32bppBGR101010,        GUID_WICPixelFormat32bppRGBA1010102 }, // DXGI_FORMAT_R10G10B10A2_UNORM\n\n    { GUID_WICPixelFormat24bppBGR,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat24bppRGB,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat32bppPBGRA,            GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat32bppPRGBA,            GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n\n    { GUID_WICPixelFormat48bppRGB,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat48bppBGR,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppBGRA,             GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPRGBA,            GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPBGRA,            GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n\n    { GUID_WICPixelFormat48bppRGBFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat48bppBGRFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBAFixedPoint,   GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppBGRAFixedPoint,   GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBHalf,          GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat48bppRGBHalf,          GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n\n    { GUID_WICPixelFormat128bppPRGBAFloat,      GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBFloat,        GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBAFixedPoint,  GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBFixedPoint,   GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat32bppRGBE,             GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n\n    { GUID_WICPixelFormat32bppCMYK,             GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat64bppCMYK,             GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat40bppCMYKAlpha,        GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat80bppCMYKAlpha,        GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    { GUID_WICPixelFormat32bppRGB,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM\n    { GUID_WICPixelFormat64bppRGB,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPRGBAHalf,        GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n#endif\n\n    // We don't support n-channel formats\n};\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Returns the DXGI format and optionally the WIC pixel GUID to convert to\n//-------------------------------------------------------------------------------------\nstatic DXGI_FORMAT _DetermineFormat( _In_ const WICPixelFormatGUID& pixelFormat, _In_ DWORD flags,\n                                     _Out_opt_ WICPixelFormatGUID* pConvert )\n{\n    if ( pConvert )\n        memset( pConvert, 0, sizeof(WICPixelFormatGUID) );\n\n    DXGI_FORMAT format = _WICToDXGI( pixelFormat );\n\n    if ( format == DXGI_FORMAT_UNKNOWN )\n    {\n        if ( memcmp( &GUID_WICPixelFormat96bppRGBFixedPoint, &pixelFormat, sizeof(WICPixelFormatGUID) ) == 0 )\n        {\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n            if ( _IsWIC2() )\n            {\n                if ( pConvert )\n                    memcpy( pConvert, &GUID_WICPixelFormat96bppRGBFloat, sizeof(WICPixelFormatGUID) );\n                format = DXGI_FORMAT_R32G32B32_FLOAT;\n            }\n            else\n#endif\n            {\n                if ( pConvert )\n                    memcpy( pConvert, &GUID_WICPixelFormat128bppRGBAFloat, sizeof(WICPixelFormatGUID) );\n                format = DXGI_FORMAT_R32G32B32A32_FLOAT;\n            }\n        }\n        else\n        {\n            for( size_t i=0; i < _countof(g_WICConvert); ++i )\n            {\n                if ( memcmp( &g_WICConvert[i].source, &pixelFormat, sizeof(WICPixelFormatGUID) ) == 0 )\n                {\n                    if ( pConvert )\n                        memcpy( pConvert, &g_WICConvert[i].target, sizeof(WICPixelFormatGUID) );\n\n                    format = _WICToDXGI( g_WICConvert[i].target );\n                    assert( format != DXGI_FORMAT_UNKNOWN );\n                    break;\n                }\n            }\n        }\n    }\n\n    // Handle special cases based on flags\n    switch (format)\n    {\n    case DXGI_FORMAT_B8G8R8A8_UNORM:    // BGRA\n    case DXGI_FORMAT_B8G8R8X8_UNORM:    // BGRX\n        if ( flags & WIC_FLAGS_FORCE_RGB )\n        {\n            format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            if ( pConvert )\n                memcpy( pConvert, &GUID_WICPixelFormat32bppRGBA, sizeof(WICPixelFormatGUID) );\n        }\n        break;\n\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n        if ( flags & WIC_FLAGS_NO_X2_BIAS )\n        {\n            format = DXGI_FORMAT_R10G10B10A2_UNORM;\n            if ( pConvert )\n                memcpy( pConvert, &GUID_WICPixelFormat32bppRGBA1010102, sizeof(WICPixelFormatGUID) );\n        }\n        break;\n\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n        if ( flags & WIC_FLAGS_NO_16BPP ) \n        {\n            format = DXGI_FORMAT_R8G8B8A8_UNORM;\n            if ( pConvert )\n                memcpy( pConvert, &GUID_WICPixelFormat32bppRGBA, sizeof(WICPixelFormatGUID) );\n        }\n        break;\n\n    case DXGI_FORMAT_R1_UNORM:\n        if ( !(flags & WIC_FLAGS_ALLOW_MONO ) )\n        {\n            // By default we want to promote a black & white to gresycale since R1 is not a generally supported D3D format\n            format = DXGI_FORMAT_R8_UNORM;\n            if ( pConvert )\n                memcpy( pConvert, &GUID_WICPixelFormat8bppGray, sizeof(WICPixelFormatGUID) );\n        }\n    }\n\n    return format;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Determines metadata for image\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecodeMetadata( _In_ DWORD flags,\n                                _In_ IWICBitmapDecoder *decoder, _In_ IWICBitmapFrameDecode *frame,\n                                _Out_ TexMetadata& metadata, _Out_opt_ WICPixelFormatGUID* pConvert )\n{\n    if ( !decoder || !frame )\n        return E_POINTER;\n\n    memset( &metadata, 0, sizeof(TexMetadata) );\n    metadata.depth = 1;\n    metadata.mipLevels = 1;\n    metadata.dimension = TEX_DIMENSION_TEXTURE2D;\n\n    UINT w, h;\n    HRESULT hr = frame->GetSize( &w, &h );\n    if ( FAILED(hr) )\n        return hr;\n\n    metadata.width = w;\n    metadata.height = h;\n\n    if ( flags & WIC_FLAGS_ALL_FRAMES )\n    {\n        UINT fcount;\n        hr = decoder->GetFrameCount( &fcount );\n        if ( FAILED(hr) )\n            return hr;\n\n        metadata.arraySize = fcount;\n    }\n    else\n        metadata.arraySize = 1;\n\n    WICPixelFormatGUID pixelFormat;\n    hr = frame->GetPixelFormat( &pixelFormat );\n    if ( FAILED(hr) )\n        return hr;\n\n    metadata.format = _DetermineFormat( pixelFormat, flags, pConvert );\n    if ( metadata.format == DXGI_FORMAT_UNKNOWN )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    if ( !( flags & WIC_FLAGS_IGNORE_SRGB ) )\n    {\n        GUID containerFormat;\n        hr = decoder->GetContainerFormat( &containerFormat );\n        if ( FAILED(hr) )\n            return hr;\n\n        ComPtr<IWICMetadataQueryReader> metareader;\n        hr = frame->GetMetadataQueryReader( metareader.GetAddressOf() );\n        if ( SUCCEEDED(hr) )\n        {\n            // Check for sRGB colorspace metadata\n            bool sRGB = false;\n\n            PROPVARIANT value;\n            PropVariantInit( &value );\n\n            if ( memcmp( &containerFormat, &GUID_ContainerFormatPng, sizeof(GUID) ) == 0 )\n            {\n                // Check for sRGB chunk\n                if ( SUCCEEDED( metareader->GetMetadataByName( L\"/sRGB/RenderingIntent\", &value ) ) && value.vt == VT_UI1 )\n                {\n                    sRGB = true;\n                }\n            }\n#if defined(_XBOX_ONE) && defined(_TITLE)\n            else if ( memcmp( &containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID) ) == 0 )\n            {\n                if ( SUCCEEDED( metareader->GetMetadataByName( L\"/app1/ifd/exif/{ushort=40961}\", &value ) ) && value.vt == VT_UI2 && value.uiVal == 1 )\n                {\n                    sRGB = true;\n                }\n            }\n            else if ( memcmp( &containerFormat, &GUID_ContainerFormatTiff, sizeof(GUID) ) == 0 )\n            {\n                if ( SUCCEEDED( metareader->GetMetadataByName( L\"/ifd/exif/{ushort=40961}\", &value ) ) && value.vt == VT_UI2 && value.uiVal == 1 )\n                {\n                    sRGB = true;\n                }\n            }\n#else\n            else if ( SUCCEEDED( metareader->GetMetadataByName( L\"System.Image.ColorSpace\", &value ) ) && value.vt == VT_UI2 && value.uiVal == 1 )\n            {\n                sRGB = true;\n            }\n#endif\n\n            PropVariantClear( &value );\n\n            if ( sRGB )\n                metadata.format = MakeSRGB( metadata.format );\n        }\n        else if ( hr == WINCODEC_ERR_UNSUPPORTEDOPERATION )\n        {\n            // Some formats just don't support metadata (BMP, ICO, etc.), so ignore this failure\n            hr = S_OK;\n        }\n    }\n\n    return hr;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Decodes a single frame\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecodeSingleFrame( _In_ DWORD flags, _In_ const TexMetadata& metadata, _In_ const WICPixelFormatGUID& convertGUID,\n                                   _In_ IWICBitmapFrameDecode *frame, _Inout_ ScratchImage& image )\n{\n    if ( !frame )\n        return E_POINTER;\n\n    HRESULT hr = image.Initialize2D( metadata.format, metadata.width, metadata.height, 1, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    const Image *img = image.GetImage( 0, 0, 0 );\n    if ( !img )\n        return E_POINTER;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    if ( memcmp( &convertGUID, &GUID_NULL, sizeof(GUID) ) == 0 )\n    {\n        hr = frame->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n        if ( FAILED(hr) )\n            return hr;\n    }\n    else\n    {\n        ComPtr<IWICFormatConverter> FC;\n        hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        WICPixelFormatGUID pixelFormat;\n        hr = frame->GetPixelFormat( &pixelFormat );\n        if ( FAILED(hr) )\n            return hr;\n\n        BOOL canConvert = FALSE;\n        hr = FC->CanConvert( pixelFormat, convertGUID, &canConvert );\n        if ( FAILED(hr) || !canConvert )\n        {\n            return E_UNEXPECTED;\n        }\n\n        hr = FC->Initialize( frame, convertGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = FC->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n        if ( FAILED(hr) )\n            return hr;\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Decodes an image array, resizing/format converting as needed\n//-------------------------------------------------------------------------------------\nstatic HRESULT _DecodeMultiframe( _In_ DWORD flags, _In_ const TexMetadata& metadata,\n                                  _In_ IWICBitmapDecoder *decoder, _Inout_ ScratchImage& image )\n{\n    if ( !decoder )\n        return E_POINTER;\n\n    HRESULT hr = image.Initialize2D( metadata.format, metadata.width, metadata.height, metadata.arraySize, 1 );\n    if ( FAILED(hr) )\n        return hr;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    WICPixelFormatGUID sourceGUID;\n    if ( !_DXGIToWIC( metadata.format, sourceGUID ) )\n        return E_FAIL;\n\n    for( size_t index = 0; index < metadata.arraySize; ++index )\n    {\n        const Image* img = image.GetImage( 0, index, 0 );\n        if ( !img )\n            return E_POINTER;\n\n        ComPtr<IWICBitmapFrameDecode> frame;\n        hr = decoder->GetFrame( static_cast<UINT>( index ), frame.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        WICPixelFormatGUID pfGuid;\n        hr = frame->GetPixelFormat( &pfGuid );\n        if ( FAILED(hr) )\n            return hr;\n\n        UINT w, h;\n        hr = frame->GetSize( &w, &h );\n        if ( FAILED(hr) )\n            return hr;\n\n        if ( w == metadata.width && h == metadata.height )\n        {\n            // This frame does not need resized\n            if ( memcmp( &pfGuid, &sourceGUID, sizeof(WICPixelFormatGUID) ) == 0 )\n            {\n                hr = frame->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n                if ( FAILED(hr) )\n                    return hr;\n            }\n            else\n            {\n                ComPtr<IWICFormatConverter> FC;\n                hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n                if ( FAILED(hr) )\n                    return hr;\n\n                BOOL canConvert = FALSE;\n                hr = FC->CanConvert( pfGuid, sourceGUID, &canConvert );\n                if ( FAILED(hr) || !canConvert )\n                {\n                    return E_UNEXPECTED;\n                }\n\n                hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );\n                if ( FAILED(hr) )\n                    return hr;\n            \n                hr = FC->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n        else\n        {\n            // This frame needs resizing\n            ComPtr<IWICBitmapScaler> scaler;\n            hr = pWIC->CreateBitmapScaler( scaler.GetAddressOf() );\n            if ( FAILED(hr) )\n                return hr;\n\n            hr = scaler->Initialize( frame.Get(), static_cast<UINT>( metadata.width ), static_cast<UINT>( metadata.height ), _GetWICInterp( flags ) );\n            if ( FAILED(hr) )\n                return hr;\n\n            WICPixelFormatGUID pfScaler;\n            hr = scaler->GetPixelFormat( &pfScaler );\n            if ( FAILED(hr) )\n                return hr;\n\n            if ( memcmp( &pfScaler, &sourceGUID, sizeof(WICPixelFormatGUID) ) == 0 )\n            {\n                hr = scaler->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );\n                if ( FAILED(hr) )\n                    return hr;\n            }\n            else\n            {\n                // The WIC bitmap scaler is free to return a different pixel format than the source image, so here we\n                // convert it to our desired format\n                ComPtr<IWICFormatConverter> FC;\n                hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n                if ( FAILED(hr) )\n                    return hr;\n\n                BOOL canConvert = FALSE;\n                hr = FC->CanConvert( pfScaler, sourceGUID, &canConvert );\n                if ( FAILED(hr) || !canConvert )\n                {\n                    return E_UNEXPECTED;\n                }\n\n                hr = FC->Initialize( scaler.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );\n                if ( FAILED(hr) )\n                    return hr;\n\n                hr = FC->CopyPixels( 0, static_cast<UINT>( img->rowPitch ), static_cast<UINT>( img->slicePitch ), img->pixels );  \n                if ( FAILED(hr) )\n                    return hr;\n            }\n        }\n    }\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Encodes image metadata\n//-------------------------------------------------------------------------------------\nstatic HRESULT _EncodeMetadata( _In_ IWICBitmapFrameEncode* frame, _In_ const GUID& containerFormat, _In_ DXGI_FORMAT format )\n{\n    if ( !frame )\n        return E_POINTER;\n\n    ComPtr<IWICMetadataQueryWriter> metawriter;\n    HRESULT hr = frame->GetMetadataQueryWriter( metawriter.GetAddressOf() );\n    if ( SUCCEEDED( hr ) )\n    {\n        PROPVARIANT value;\n        PropVariantInit( &value );\n\n        bool sRGB = IsSRGB( format );\n\n        value.vt = VT_LPSTR;\n        value.pszVal = \"DirectXTex\";\n\n        if ( memcmp( &containerFormat, &GUID_ContainerFormatPng, sizeof(GUID) ) == 0 )\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"/tEXt/{str=Software}\", &value );\n\n            // Set sRGB chunk\n            if ( sRGB )\n            {\n                value.vt = VT_UI1;\n                value.bVal = 0;\n                (void)metawriter->SetMetadataByName( L\"/sRGB/RenderingIntent\", &value );\n            }\n        }\n#if defined(_XBOX_ONE) && defined(_TITLE)\n        else if ( memcmp( &containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID) ) == 0 )\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"/app1/ifd/{ushort=305}\", &value );\n\n            if ( sRGB )\n            {\n                // Set EXIF Colorspace of sRGB\n                value.vt = VT_UI2;\n                value.uiVal = 1;\n                (void)metawriter->SetMetadataByName( L\"/app1/ifd/exif/{ushort=40961}\", &value );\n            }\n        }\n        else if ( memcmp( &containerFormat, &GUID_ContainerFormatTiff, sizeof(GUID) ) == 0 )\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"/ifd/{ushort=305}\", &value );\n\n            if ( sRGB )\n            {\n                // Set EXIF Colorspace of sRGB\n                value.vt = VT_UI2;\n                value.uiVal = 1;\n                (void)metawriter->SetMetadataByName( L\"/ifd/exif/{ushort=40961}\", &value );\n            }\n        }\n#else\n        else\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"System.ApplicationName\", &value );\n\n            if ( sRGB )\n            {\n                // Set EXIF Colorspace of sRGB\n                value.vt = VT_UI2;\n                value.uiVal = 1;\n                (void)metawriter->SetMetadataByName( L\"System.Image.ColorSpace\", &value );\n            }\n        }\n#endif\n    }\n    else if ( hr == WINCODEC_ERR_UNSUPPORTEDOPERATION )\n    {\n        // Some formats just don't support metadata (BMP, ICO, etc.), so ignore this failure\n        hr = S_OK;\n    }\n\n    return hr;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Encodes a single frame\n//-------------------------------------------------------------------------------------\nstatic HRESULT _EncodeImage( _In_ const Image& image, _In_ DWORD flags, _In_ REFGUID containerFormat,\n                             _In_ IWICBitmapFrameEncode* frame, _In_opt_ IPropertyBag2* props, _In_opt_ const GUID* targetFormat )\n{\n    if ( !frame )\n        return E_INVALIDARG;\n\n    if ( !image.pixels )\n        return E_POINTER;\n\n    WICPixelFormatGUID pfGuid;\n    if ( !_DXGIToWIC( image.format, pfGuid ) )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    HRESULT hr = frame->Initialize( props );\n    if ( FAILED(hr) )\n        return hr;\n\n#ifdef _M_X64\n    if ( (image.width > 0xFFFFFFFF) || (image.height > 0xFFFFFFFF) )\n        return E_INVALIDARG;\n#endif\n\n    hr = frame->SetSize( static_cast<UINT>( image.width ), static_cast<UINT>( image.height ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = frame->SetResolution( 72, 72 );\n    if ( FAILED(hr) )\n        return hr;\n\n    WICPixelFormatGUID targetGuid = (targetFormat) ? (*targetFormat) : pfGuid;\n    hr = frame->SetPixelFormat( &targetGuid );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( targetFormat && memcmp( targetFormat, &targetGuid, sizeof(WICPixelFormatGUID) ) != 0 )\n    {\n        // Requested output pixel format is not supported by the WIC codec\n        return E_FAIL;\n    }\n\n    hr = _EncodeMetadata( frame, containerFormat, image.format );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( memcmp( &targetGuid, &pfGuid, sizeof(WICPixelFormatGUID) ) != 0 )\n    {\n        // Conversion required to write\n        IWICImagingFactory* pWIC = _GetWIC();\n        if ( !pWIC )\n            return E_NOINTERFACE;\n\n        ComPtr<IWICBitmap> source;\n        hr = pWIC->CreateBitmapFromMemory( static_cast<UINT>( image.width ), static_cast<UINT>( image.height ), pfGuid,\n                                           static_cast<UINT>( image.rowPitch ), static_cast<UINT>( image.slicePitch ),\n                                           image.pixels, source.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        ComPtr<IWICFormatConverter> FC;\n        hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        BOOL canConvert = FALSE;\n        hr = FC->CanConvert( pfGuid, targetGuid, &canConvert );\n        if ( FAILED(hr) || !canConvert )\n        {\n            return E_UNEXPECTED;\n        }\n\n        hr = FC->Initialize( source.Get(), targetGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );\n        if ( FAILED(hr) )\n            return hr;\n\n        WICRect rect = { 0, 0, static_cast<INT>( image.width ), static_cast<INT>( image.height ) };\n        hr = frame->WriteSource( FC.Get(), &rect );\n        if ( FAILED(hr) )\n            return hr;\n    }\n    else\n    {\n        // No conversion required\n        hr = frame->WritePixels( static_cast<UINT>( image.height ), static_cast<UINT>( image.rowPitch ), static_cast<UINT>( image.slicePitch ),\n                                 reinterpret_cast<uint8_t*>( image.pixels ) );\n        if ( FAILED(hr) )\n            return hr;\n    }\n\n    hr = frame->Commit();\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\nstatic HRESULT _EncodeSingleFrame( _In_ const Image& image, _In_ DWORD flags,\n                                   _In_ REFGUID containerFormat, _Inout_ IStream* stream,\n                                   _In_opt_ const GUID* targetFormat, _In_opt_ std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !stream )\n        return E_INVALIDARG;\n\n    // Initialize WIC\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICBitmapEncoder> encoder;\n    HRESULT hr = pWIC->CreateEncoder( containerFormat, 0, encoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = encoder->Initialize( stream, WICBitmapEncoderNoCache );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameEncode> frame;\n    ComPtr<IPropertyBag2> props;\n    hr = encoder->CreateNewFrame( frame.GetAddressOf(), props.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( memcmp( &containerFormat, &GUID_ContainerFormatBmp, sizeof(WICPixelFormatGUID) ) == 0 && _IsWIC2() )\n    {\n        // Opt-in to the WIC2 support for writing 32-bit Windows BMP files with an alpha channel\n        PROPBAG2 option = { 0 };\n        option.pstrName = L\"EnableV5Header32bppBGRA\";\n\n        VARIANT varValue;    \n        varValue.vt = VT_BOOL;\n        varValue.boolVal = VARIANT_TRUE;      \n        (void)props->Write( 1, &option, &varValue ); \n    }\n\n    if ( setCustomProps )\n    {\n        setCustomProps( props.Get() );\n    }\n\n    hr = _EncodeImage( image, flags, containerFormat, frame.Get(), props.Get(), targetFormat );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = encoder->Commit();\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Encodes an image array\n//-------------------------------------------------------------------------------------\nstatic HRESULT _EncodeMultiframe( _In_reads_(nimages) const Image* images, _In_ size_t nimages, _In_ DWORD flags,\n                                  _In_ REFGUID containerFormat, _Inout_ IStream* stream,\n                                  _In_opt_ const GUID* targetFormat, _In_opt_ std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !stream || nimages < 2 )\n        return E_INVALIDARG;\n\n    if ( !images )\n        return E_POINTER;\n\n    // Initialize WIC\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICBitmapEncoder> encoder;\n    HRESULT hr = pWIC->CreateEncoder( containerFormat, 0, encoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapEncoderInfo> einfo;\n    hr = encoder->GetEncoderInfo( einfo.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    BOOL mframe = FALSE;\n    hr = einfo->DoesSupportMultiframe( &mframe );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( !mframe )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    hr = encoder->Initialize( stream, WICBitmapEncoderNoCache );\n    if ( FAILED(hr) )\n        return hr;\n\n    for( size_t index=0; index < nimages; ++index )\n    {\n        ComPtr<IWICBitmapFrameEncode> frame;\n        ComPtr<IPropertyBag2> props;\n        hr = encoder->CreateNewFrame( frame.GetAddressOf(), props.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        if ( setCustomProps )\n        {\n            setCustomProps( props.Get() );\n        }\n\n        hr = _EncodeImage( images[index], flags, containerFormat, frame.Get(), props.Get(), targetFormat );\n        if ( FAILED(hr) )\n            return hr;\n    }\n\n    hr = encoder->Commit();\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//=====================================================================================\n// Entry-points\n//=====================================================================================\n\n//-------------------------------------------------------------------------------------\n// Obtain metadata from WIC-supported file in memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GetMetadataFromWICMemory( LPCVOID pSource, size_t size, DWORD flags, TexMetadata& metadata )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( size > 0xFFFFFFFF )\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n#endif\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    // Create input stream for memory\n    ComPtr<IWICStream> stream;\n    HRESULT hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromMemory( reinterpret_cast<BYTE*>( const_cast<void*>( pSource ) ),\n                                       static_cast<UINT>( size ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    hr = pWIC->CreateDecoderFromStream( stream.Get(), 0, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Get metadata\n    hr = _DecodeMetadata( flags, decoder.Get(), frame.Get(), metadata, 0 );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Obtain metadata from WIC-supported file on disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT GetMetadataFromWICFile( LPCWSTR szFile, DWORD flags, TexMetadata& metadata )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n    \n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    HRESULT hr = pWIC->CreateDecoderFromFilename( szFile, 0, GENERIC_READ, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Get metadata\n    hr = _DecodeMetadata( flags, decoder.Get(), frame.Get(), metadata, 0 );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a WIC-supported file in memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromWICMemory( LPCVOID pSource, size_t size, DWORD flags, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !pSource || size == 0 )\n        return E_INVALIDARG;\n\n#ifdef _M_X64\n    if ( size > 0xFFFFFFFF )\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n#endif\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    image.Release();\n\n    // Create input stream for memory\n    ComPtr<IWICStream> stream;\n    HRESULT hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromMemory( reinterpret_cast<uint8_t*>( const_cast<void*>( pSource ) ), static_cast<DWORD>( size ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    hr = pWIC->CreateDecoderFromStream( stream.Get(), 0, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Get metadata\n    TexMetadata mdata;\n    WICPixelFormatGUID convertGUID = {0};\n    hr = _DecodeMetadata( flags, decoder.Get(), frame.Get(), mdata, &convertGUID );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( (mdata.arraySize > 1) && (flags & WIC_FLAGS_ALL_FRAMES) )\n    {\n        hr = _DecodeMultiframe( flags, mdata, decoder.Get(), image );\n    }\n    else\n    {\n        hr = _DecodeSingleFrame( flags, mdata, convertGUID, frame.Get(), image );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Load a WIC-supported file from disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT LoadFromWICFile( LPCWSTR szFile, DWORD flags, TexMetadata* metadata, ScratchImage& image )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n    \n    image.Release();\n\n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    HRESULT hr = pWIC->CreateDecoderFromFilename( szFile, 0, GENERIC_READ, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Get metadata\n    TexMetadata mdata;\n    WICPixelFormatGUID convertGUID = {0};\n    hr = _DecodeMetadata( flags, decoder.Get(), frame.Get(), mdata, &convertGUID );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( (mdata.arraySize > 1) && (flags & WIC_FLAGS_ALL_FRAMES) )\n    {\n        hr = _DecodeMultiframe( flags, mdata, decoder.Get(), image );\n    }\n    else\n    {\n        hr = _DecodeSingleFrame( flags, mdata, convertGUID, frame.Get(), image );\n    }\n\n    if ( FAILED(hr) )\n    {\n        image.Release();\n        return hr;\n    }\n\n    if ( metadata )\n        memcpy( metadata, &mdata, sizeof(TexMetadata) );\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a WIC-supported file to memory\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToWICMemory( const Image& image, DWORD flags, REFGUID containerFormat, Blob& blob,\n                         const GUID* targetFormat, std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !image.pixels )\n        return E_POINTER;\n\n    blob.Release();\n\n    ComPtr<IStream> stream;\n    HRESULT hr = CreateMemoryStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = _EncodeSingleFrame( image, flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy stream data into blob\n    STATSTG stat;\n    hr = stream->Stat( &stat, STATFLAG_NONAME );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( stat.cbSize.HighPart > 0 )\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n\n    hr = blob.Initialize( stat.cbSize.LowPart );\n    if ( FAILED(hr) )\n        return hr;\n\n    LARGE_INTEGER li = { 0 };\n    hr = stream->Seek( li, STREAM_SEEK_SET, 0 );\n    if ( FAILED(hr) )\n        return hr;\n\n    DWORD bytesRead;\n    hr = stream->Read( blob.GetBufferPointer(), static_cast<ULONG>( blob.GetBufferSize() ), &bytesRead );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( bytesRead != blob.GetBufferSize() )\n        return E_FAIL;\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT SaveToWICMemory( const Image* images, size_t nimages, DWORD flags, REFGUID containerFormat, Blob& blob,\n                         const GUID* targetFormat, std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !images || nimages == 0 )\n        return E_INVALIDARG;\n\n    blob.Release();\n\n    ComPtr<IStream> stream;\n    HRESULT hr = CreateMemoryStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages > 1 )\n        hr = _EncodeMultiframe( images, nimages, flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n    else\n        hr = _EncodeSingleFrame( images[0], flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n\n    if ( FAILED(hr) )\n        return hr;\n\n    // Copy stream data into blob\n    STATSTG stat;\n    hr = stream->Stat( &stat, STATFLAG_NONAME );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( stat.cbSize.HighPart > 0 )\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n\n    hr = blob.Initialize( stat.cbSize.LowPart );\n    if ( FAILED(hr) )\n        return hr;\n\n    LARGE_INTEGER li = { 0 };\n    hr = stream->Seek( li, STREAM_SEEK_SET, 0 );\n    if ( FAILED(hr) )\n        return hr;\n\n    DWORD bytesRead;\n    hr = stream->Read( blob.GetBufferPointer(), static_cast<ULONG>( blob.GetBufferSize() ), &bytesRead );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( bytesRead != blob.GetBufferSize() )\n        return E_FAIL;\n\n    return S_OK;\n}\n\n\n//-------------------------------------------------------------------------------------\n// Save a WIC-supported file to disk\n//-------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT SaveToWICFile( const Image& image, DWORD flags, REFGUID containerFormat, LPCWSTR szFile,\n                       const GUID* targetFormat, std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !szFile )\n        return E_INVALIDARG;\n\n    if ( !image.pixels )\n        return E_POINTER;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICStream> stream;\n    HRESULT hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromFilename( szFile, GENERIC_WRITE );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = _EncodeSingleFrame( image, flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n_Use_decl_annotations_\nHRESULT SaveToWICFile( const Image* images, size_t nimages, DWORD flags, REFGUID containerFormat, LPCWSTR szFile, const GUID* targetFormat,\n                       std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !szFile || !images || nimages == 0 )\n        return E_INVALIDARG;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICStream> stream;\n    HRESULT hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromFilename( szFile, GENERIC_WRITE );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( nimages > 1 )\n        hr = _EncodeMultiframe( images, nimages, flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n    else\n        hr = _EncodeSingleFrame( images[0], flags, containerFormat, stream.Get(), targetFormat, setCustomProps );\n\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n}; // namespace\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2012.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"DirectXTex_Desktop_2012.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2012.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DirectXTex</ProjectName>\n    <ProjectGuid>{371B9FA9-4C90-4AC6-A123-ACED756D6C77}</ProjectGuid>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <OutDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2012\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2012.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\" />\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2013.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"DirectXTex_Desktop_2013.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2013.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DirectXTex</ProjectName>\n    <ProjectGuid>{371B9FA9-4C90-4AC6-A123-ACED756D6C77}</ProjectGuid>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <OutDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2013\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2013.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\" />\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2015.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2015\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"DirectXTex_Desktop_2015.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2015.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DirectXTex</ProjectName>\n    <ProjectGuid>{371B9FA9-4C90-4AC6-A123-ACED756D6C77}</ProjectGuid>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <OutDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Desktop_2015\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Desktop_2015.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\" />\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows10.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2015\nVisualStudioVersion = 14.0.22609.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"DirectXTex_Windows10.vcxproj\", \"{FB3F52B5-BFE8-43FD-836F-363735DAB738}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|ARM.ActiveCfg = Debug|ARM\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|ARM.Build.0 = Debug|ARM\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|x64.Build.0 = Debug|x64\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|x86.ActiveCfg = Debug|Win32\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Debug|x86.Build.0 = Debug|Win32\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|ARM.ActiveCfg = Release|ARM\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|ARM.Build.0 = Release|ARM\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|x64.ActiveCfg = Release|x64\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|x64.Build.0 = Release|x64\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|x86.ActiveCfg = Release|Win32\n\t\t{FB3F52B5-BFE8-43FD-836F-363735DAB738}.Release|x86.Build.0 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows10.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"DirectXTex.h\" />\n    <ClInclude Include=\"DirectXTexP.h\" />\n    <ClInclude Include=\"Filters.h\" />\n    <ClInclude Include=\"scoped.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\" />\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{fb3f52b5-bfe8-43fd-836f-363735dab738}</ProjectGuid>\n    <Keyword>StaticLibrary</Keyword>\n    <ProjectName>DirectXTex</ProjectName>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\n    <AppContainerApplication>true</AppContainerApplication>\n    <ApplicationType>Windows Store</ApplicationType>\n    <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>\n    <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>\n    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <OutDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows10\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|arm'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|arm'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <WarningLevel>Level4</WarningLevel>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PreprocessorDefinitions>_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows10.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\" />\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"DirectXTex.h\" />\n    <ClInclude Include=\"DirectXTexP.h\" />\n    <ClInclude Include=\"Filters.h\" />\n    <ClInclude Include=\"scoped.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows81.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nVisualStudioVersion = 12.0.21005.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"DirectXTex_Windows81.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|ARM = Profile|ARM\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|ARM.ActiveCfg = Debug|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|ARM.Build.0 = Debug|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|ARM.ActiveCfg = Profile|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|ARM.Build.0 = Profile|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|ARM.ActiveCfg = Release|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|ARM.Build.0 = Release|ARM\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows81.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|ARM\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|ARM\">\n      <Configuration>Profile</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>DirectXTex</ProjectName>\n    <ProjectGuid>{371B9FA9-4C90-4AC6-A123-ACED756D6C77}</ProjectGuid>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\n    <AppContainerApplication>true</AppContainerApplication>\n    <ApplicationType>Windows Store</ApplicationType>\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|ARM'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|ARM'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <OutDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\Windows81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;PROFILE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|ARM'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;PROFILE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>_UNICODE;UNICODE;NDEBUG;PROFILE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n    <Lib>\n      <AdditionalOptions>/IGNORE:4264 %(AdditionalOptions)</AdditionalOptions>\n    </Lib>\n  </ItemDefinitionGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <CLInclude Include=\"DDS.h\" />\n    <CLInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_Windows81.vcxproj.filters",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n<ItemGroup>\n<Filter Include=\"Resource Files\">\n<UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n</Filter>\n</ItemGroup>\n<ItemGroup />\n<ItemGroup>\n      <CLInclude Include=\"BC.h\" />\n      <ClCompile Include=\"BC.cpp\" />\n      <ClCompile Include=\"BC4BC5.cpp\" />\n      <ClCompile Include=\"BC6HBC7.cpp\" />\n      <CLInclude Include=\"DDS.h\" />\n      <ClInclude Include=\"filters.h\" />\n      <CLInclude Include=\"scoped.h\" />\n      <CLInclude Include=\"DirectXTex.h\" /> \n      <CLInclude Include=\"DirectXTexp.h\" /> \n      <CLInclude Include=\"DirectXTex.inl\" />\n      <ClCompile Include=\"DirectXTexCompress.cpp\" />\n      <ClCompile Include=\"DirectXTexConvert.cpp\" />\n      <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n      <ClCompile Include=\"DirectXTexDDS.cpp\" />\n      <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n      <ClCompile Include=\"DirectXTexImage.cpp\" />\n      <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n      <ClCompile Include=\"DirectXTexMisc.cpp\" />\n      <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n      <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n      <ClCompile Include=\"DirectXTexResize.cpp\" />\n      <ClCompile Include=\"DirectXTexTGA.cpp\" />\n      <ClCompile Include=\"DirectXTexUtil.cpp\" />\n      <ClCompile Include=\"DirectXTexWIC.cpp\" />\n      <ClInclude Include=\"BCDirectCompute.h\" />\n      <ClCompile Include=\"BCDirectCompute.cpp\" />\n      <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_WindowsPhone81.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nVisualStudioVersion = 12.0.30324.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex_WindowsPhone81\", \"DirectXTex_WindowsPhone81.vcxproj\", \"{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|Win32 = Debug|Win32\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|Win32 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Debug|ARM.ActiveCfg = Debug|ARM\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Debug|ARM.Build.0 = Debug|ARM\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Release|ARM.ActiveCfg = Release|ARM\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Release|ARM.Build.0 = Release|ARM\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{5709AA1F-D4E3-4138-BDD6-55C8DAF3D983}.Release|Win32.Build.0 = Release|Win32\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_WindowsPhone81.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|ARM\">\n      <Configuration>Debug</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|ARM\">\n      <Configuration>Release</Configuration>\n      <Platform>ARM</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{5709aa1f-d4e3-4138-bdd6-55c8daf3d983}</ProjectGuid>\n    <Keyword>Win32Proj</Keyword>\n    <ProjectName>DirectXTex</ProjectName>\n    <RootNamespace>DirectXTex</RootNamespace>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>\n    <AppContainerApplication>true</AppContainerApplication>\n    <ApplicationType>Windows Phone</ApplicationType>\n    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v120_wp81</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v120_wp81</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <PlatformToolset>v120_wp81</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v120_wp81</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <OutDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <OutDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <OutDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <OutDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\WindowsPhone81\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <FloatingPointModel>Fast</FloatingPointModel>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <SDLCheck>true</SDLCheck>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n      <FloatingPointModel>Fast</FloatingPointModel>\n    </ClCompile>\n    <Link>\n      <SubSystem>Console</SubSystem>\n      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\" />\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <CLInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"filters.h\" />\n    <CLInclude Include=\"scoped.h\" />\n    <CLInclude Include=\"DirectXTex.h\" />\n    <CLInclude Include=\"DirectXTexp.h\" />\n    <CLInclude Include=\"DirectXTex.inl\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_WindowsPhone81.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC4BC5.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC6HBC7.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BCDirectCompute.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompress.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexConvert.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexD3D11.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexDDS.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexImage.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMipMaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMisc.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexResize.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexTGA.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <CLInclude Include=\"BC.h\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n    <ClInclude Include=\"BCDirectCompute.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <CLInclude Include=\"DirectXTex.h\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n    <CLInclude Include=\"DDS.h\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n    <CLInclude Include=\"DirectXTex.inl\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n    <CLInclude Include=\"scoped.h\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n    <ClInclude Include=\"filters.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <CLInclude Include=\"DirectXTexp.h\">\n      <Filter>Header Files</Filter>\n    </CLInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{ae44e5d8-5e05-47c8-92f5-0d6464fff56b}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{dc9e6b8b-d350-4f63-895f-790dbd53c33e}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneADK.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex_XboxOneADK\", \"DirectXTex_XboxOneADK.vcxproj\", \"{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Durango = Debug|Durango\n\t\tProfile|Durango = Profile|Durango\n\t\tRelease|Durango = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Debug|Durango.ActiveCfg = Debug|Durango\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Debug|Durango.Build.0 = Debug|Durango\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Profile|Durango.ActiveCfg = Profile|Durango\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Profile|Durango.Build.0 = Profile|Durango\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Release|Durango.ActiveCfg = Release|Durango\n\t\t{8F6CD012-9AD4-4EE1-9CBE-7B112E5CEB39}.Release|Durango.Build.0 = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneADK.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Release|Durango\">\n      <Configuration>Release</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Durango\">\n      <Configuration>Profile</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Durango\">\n      <Configuration>Debug</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"DirectXTex.h\" />\n    <ClInclude Include=\"DirectXTexP.h\" />\n    <ClInclude Include=\"Filters.h\" />\n    <ClInclude Include=\"scoped.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <RootNamespace>DirectXTex_XboxOneADK</RootNamespace>\n    <ProjectGuid>{8f6cd012-9ad4-4ee1-9cbe-7b112e5ceb39}</ProjectGuid>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <Keyword>Win32Proj</Keyword>\n    <PlatformToolset>v110</PlatformToolset>\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\n    <TargetRuntime>Native</TargetRuntime>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneADK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">\n    <Link>\n      <AdditionalDependencies>d3d11.lib;runtimeobject.lib;mincore.lib;mincore_legacy.lib;mincore_obsolete.lib;user32.lib;uuid.lib;</AdditionalDependencies>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <Optimization>MaxSpeed</Optimization>\n      <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <WarningLevel>Level4</WarningLevel>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">\n    <Link>\n      <AdditionalDependencies>d3d11.lib;runtimeobject.lib;mincore.lib;mincore_legacy.lib;mincore_obsolete.lib;user32.lib;uuid.lib;</AdditionalDependencies>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <AdditionalUsingDirectories>$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <Optimization>MaxSpeed</Optimization>\n      <PreprocessorDefinitions>NDEBUG;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <WarningLevel>Level4</WarningLevel>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">\n    <Link>\n      <AdditionalDependencies>d3d11.lib;runtimeobject.lib;mincore.lib;mincore_legacy.lib;mincore_obsolete.lib;user32.lib;uuid.lib;</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <MinimalRebuild>false</MinimalRebuild>\n      <AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneADK.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\n    </Filter>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\n    </Filter>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"BCDirectCompute.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DDS.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DirectXTex.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DirectXTexP.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Filters.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"scoped.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\">\n      <Filter>Header Files</Filter>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC4BC5.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC6HBC7.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BCDirectCompute.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompress.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexConvert.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexD3D11.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexDDS.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexImage.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMisc.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexResize.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexTGA.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneXDK.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex_XboxOneXDK\", \"DirectXTex_XboxOneXDK.vcxproj\", \"{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Durango = Debug|Durango\n\t\tProfile|Durango = Profile|Durango\n\t\tRelease|Durango = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Debug|Durango.ActiveCfg = Debug|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Debug|Durango.Build.0 = Debug|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Profile|Durango.ActiveCfg = Profile|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Profile|Durango.Build.0 = Profile|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Release|Durango.ActiveCfg = Release|Durango\n\t\t{8424AED1-3DBF-44FA-9CF9-7FBDF1C18596}.Release|Durango.Build.0 = Release|Durango\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneXDK.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Release|Durango\">\n      <Configuration>Release</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Durango\">\n      <Configuration>Profile</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|Durango\">\n      <Configuration>Debug</Configuration>\n      <Platform>Durango</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\" />\n    <ClInclude Include=\"BCDirectCompute.h\" />\n    <ClInclude Include=\"DDS.h\" />\n    <ClInclude Include=\"DirectXTex.h\" />\n    <ClInclude Include=\"DirectXTexP.h\" />\n    <ClInclude Include=\"Filters.h\" />\n    <ClInclude Include=\"scoped.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\" />\n    <ClCompile Include=\"BC4BC5.cpp\" />\n    <ClCompile Include=\"BC6HBC7.cpp\" />\n    <ClCompile Include=\"BCDirectCompute.cpp\" />\n    <ClCompile Include=\"DirectXTexCompress.cpp\" />\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\" />\n    <ClCompile Include=\"DirectXTexConvert.cpp\" />\n    <ClCompile Include=\"DirectXTexD3D11.cpp\" />\n    <ClCompile Include=\"DirectXTexDDS.cpp\" />\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\" />\n    <ClCompile Include=\"DirectXTexImage.cpp\" />\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\" />\n    <ClCompile Include=\"DirectXTexMisc.cpp\" />\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\" />\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\" />\n    <ClCompile Include=\"DirectXTexResize.cpp\" />\n    <ClCompile Include=\"DirectXTexTGA.cpp\" />\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">Create</PrecompiledHeader>\n      <PrecompiledHeader Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">Create</PrecompiledHeader>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\" />\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <RootNamespace>DirectXTex_XboxOneXDK</RootNamespace>\n    <ProjectGuid>{8424aed1-3dbf-44fa-9cf9-7fbdf1c18596}</ProjectGuid>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <Keyword>Win32Proj</Keyword>\n    <ApplicationEnvironment>title</ApplicationEnvironment>\n    <PlatformToolset>v110</PlatformToolset>\n    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>\n    <TargetRuntime>Native</TargetRuntime>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\" Label=\"Configuration\">\n    <ConfigurationType>StaticLibrary</ConfigurationType>\n    <PlatformToolset>v110</PlatformToolset>\n    <UseDebugLibraries>true</UseDebugLibraries>\n    <CharacterSet>Unicode</CharacterSet>\n    <EmbedManifest>false</EmbedManifest>\n    <GenerateManifest>false</GenerateManifest>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">\n    <ReferencePath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</ReferencePath>\n    <LibraryPath>$(Console_SdkLibPath)</LibraryPath>\n    <LibraryWPath>$(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath)</LibraryWPath>\n    <IncludePath>$(Console_SdkIncludeRoot)</IncludePath>\n    <ExecutablePath>$(Console_SdkRoot)bin;$(VCInstallDir)bin\\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\\Tools\\bin;$(VSInstallDir)Common7\\tools;$(VSInstallDir)Common7\\ide;$(ProgramFiles)\\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);</ExecutablePath>\n    <OutDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</OutDir>\n    <IntDir>Bin\\XboxOneXDK\\$(Platform)\\$(Configuration)\\</IntDir>\n    <TargetName>DirectXTex</TargetName>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Durango'\">\n    <Link>\n      <AdditionalDependencies>d3d11_x.lib;combase.lib;kernelx.lib;uuid.lib;</AdditionalDependencies>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <Optimization>MaxSpeed</Optimization>\n      <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <WarningLevel>Level4</WarningLevel>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Durango'\">\n    <Link>\n      <AdditionalDependencies>pixEvt.lib;d3d11_x.lib;combase.lib;kernelx.lib;uuid.lib;</AdditionalDependencies>\n      <EntryPointSymbol>\n      </EntryPointSymbol>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <Optimization>MaxSpeed</Optimization>\n      <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <WarningLevel>Level4</WarningLevel>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Durango'\">\n    <Link>\n      <AdditionalDependencies>d3d11_x.lib;combase.lib;kernelx.lib;uuid.lib;</AdditionalDependencies>\n      <SubSystem>Windows</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>\n    </Link>\n    <ClCompile>\n      <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>\n      <PrecompiledHeader>Use</PrecompiledHeader>\n      <MinimalRebuild>false</MinimalRebuild>\n      <AdditionalUsingDirectories>$(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <PreprocessorDefinitions>_DEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <CompileAsWinRT>false</CompileAsWinRT>\n      <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>\n    </ClCompile>\n  </ItemDefinitionGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/DirectXTex_XboxOneXDK.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\n    </Filter>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\n    </Filter>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"BC.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"BCDirectCompute.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DDS.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DirectXTex.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"DirectXTexP.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"Filters.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"scoped.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"DirectXTex.inl\">\n      <Filter>Header Files</Filter>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"BC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC4BC5.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BC6HBC7.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"BCDirectCompute.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompress.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexCompressGPU.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexConvert.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexD3D11.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexDDS.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexFlipRotate.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexImage.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMipmaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexMisc.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexNormalMaps.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexPMAlpha.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexResize.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexTGA.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexUtil.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"DirectXTexWIC.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Filters.h",
    "content": "//-------------------------------------------------------------------------------------\n// filters.h\n//  \n// Utility header with helpers for implementing image filters\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n#include <directxmath.h>\n#include <directxpackedvector.h>\n\n#include <memory>\n\n#include \"scoped.h\"\n\nnamespace DirectX\n{\n\n//-------------------------------------------------------------------------------------\n// Box filtering helpers\n//-------------------------------------------------------------------------------------\n\nXMGLOBALCONST XMVECTORF32 g_boxScale = { 0.25f, 0.25f, 0.25f, 0.25f };\nXMGLOBALCONST XMVECTORF32 g_boxScale3D = { 0.125f, 0.125f, 0.125f, 0.125f };\n\n#define AVERAGE4( res, p0, p1, p2, p3 ) \\\n{ \\\n    XMVECTOR v = XMVectorAdd( (p0), (p1) ); \\\n    v = XMVectorAdd( v, (p2) ); \\\n    v = XMVectorAdd( v, (p3) ); \\\n    res = XMVectorMultiply( v, g_boxScale ); \\\n}\n\n#define AVERAGE8( res, p0, p1, p2, p3, p4, p5, p6, p7) \\\n{ \\\n    XMVECTOR v = XMVectorAdd( (p0), (p1) ); \\\n    v = XMVectorAdd( v, (p2) ); \\\n    v = XMVectorAdd( v, (p3) ); \\\n    v = XMVectorAdd( v, (p4) ); \\\n    v = XMVectorAdd( v, (p5) ); \\\n    v = XMVectorAdd( v, (p6) ); \\\n    v = XMVectorAdd( v, (p7) ); \\\n    res = XMVectorMultiply( v, g_boxScale3D ); \\\n}\n\n\n//-------------------------------------------------------------------------------------\n// Linear filtering helpers\n//-------------------------------------------------------------------------------------\n\nstruct LinearFilter\n{\n    size_t  u0;\n    float   weight0;\n    size_t  u1;\n    float   weight1;\n};\n\ninline void _CreateLinearFilter( _In_ size_t source, _In_ size_t dest, _In_ bool wrap, _Out_writes_(dest) LinearFilter* lf )\n{\n    assert( source > 0 );\n    assert( dest > 0 );\n    assert( lf != 0 );\n\n    float scale = float(source) / float(dest);\n\n    // Mirror is the same case as clamp for linear\n\n    for( size_t u = 0; u < dest; ++u )\n    {\n        float srcB = ( float(u) + 0.5f ) * scale + 0.5f;\n\n        ptrdiff_t isrcB = ptrdiff_t(srcB);\n        ptrdiff_t isrcA = isrcB - 1;\n        \n        if ( isrcA < 0 )\n        {\n            isrcA = ( wrap ) ? ( source - 1) : 0;\n        }\n\n        if ( size_t(isrcB) >= source )\n        {\n            isrcB = ( wrap ) ? 0 : ( source - 1);\n        }\n\n        float weight = 1.0f + float(isrcB) - srcB;\n\n        auto& entry = lf[ u ];\n        entry.u0 = size_t(isrcA);\n        entry.weight0 = weight;\n\n        entry.u1 = size_t(isrcB);\n        entry.weight1 = 1.0f - weight;\n    }\n}\n\n#define BILINEAR_INTERPOLATE( res, x, y, r0, r1 ) \\\n    res = ( y.weight0 * ( (r0)[ x.u0 ] * x.weight0 + (r0)[ x.u1 ] * x.weight1 ) ) \\\n          + ( y.weight1 * ( (r1)[ x.u0 ] * x.weight0 + (r1)[ x.u1 ] * x.weight1 ) )\n\n#define TRILINEAR_INTERPOLATE( res, x, y, z, r0, r1, r2, r3 ) \\\n    res = ( z.weight0 * ( ( y.weight0 * ( (r0)[ x.u0 ] * x.weight0 + (r0)[ x.u1 ] * x.weight1 ) ) \\\n                          + ( y.weight1 * ( (r1)[ x.u0 ] * x.weight0 + (r1)[ x.u1 ] * x.weight1 ) ) ) ) \\\n          + ( z.weight1 * ( ( y.weight0 * ( (r2)[ x.u0 ] * x.weight0 + (r2)[ x.u1 ] * x.weight1 ) ) \\\n                             + ( y.weight1 * ( (r3)[ x.u0 ] * x.weight0 + (r3)[ x.u1 ] * x.weight1 ) ) ) )\n\n\n//-------------------------------------------------------------------------------------\n// Cubic filtering helpers\n//-------------------------------------------------------------------------------------\n\nXMGLOBALCONST XMVECTORF32 g_cubicThird = { 1.f/3.f, 1.f/3.f, 1.f/3.f, 1.f/3.f }; \nXMGLOBALCONST XMVECTORF32 g_cubicSixth = { 1.f/6.f, 1.f/6.f, 1.f/6.f, 1.f/6.f }; \nXMGLOBALCONST XMVECTORF32 g_cubicHalf = { 1.f/2.f, 1.f/2.f, 1.f/2.f, 1.f/2.f };\n\ninline ptrdiff_t bounduvw( ptrdiff_t u, ptrdiff_t maxu, bool wrap, bool mirror )\n{\n    if ( wrap )\n    {\n        if ( u < 0 )\n        {\n            u = maxu + u + 1;\n        }\n        else if ( u > maxu )\n        {\n            u = u - maxu - 1;\n        }\n    }\n    else if ( mirror )\n    {\n        if ( u < 0 )\n        {\n            u = ( -u ) - 1;\n        }\n        else if ( u > maxu )\n        {\n            u = maxu - (u - maxu - 1);\n        }\n    }\n\n    // Handles clamp, but also a safety factor for degenerate images for wrap/mirror\n    u = std::min<ptrdiff_t>( u, maxu );\n    u = std::max<ptrdiff_t>( u, 0 );\n\n    return u;\n}\n\nstruct CubicFilter\n{\n    size_t  u0;\n    size_t  u1;\n    size_t  u2;\n    size_t  u3;\n    float   x;\n};\n\ninline void _CreateCubicFilter( _In_ size_t source, _In_ size_t dest, _In_ bool wrap, _In_ bool mirror, _Out_writes_(dest) CubicFilter* cf )\n{\n    assert( source > 0 );\n    assert( dest > 0 );\n    assert( cf != 0 );\n\n    float scale = float(source) / float(dest);\n\n    for( size_t u = 0; u < dest; ++u )\n    {\n        float srcB = ( float(u) + 0.5f ) * scale - 0.5f;\n\n        ptrdiff_t isrcB = bounduvw( ptrdiff_t(srcB), source - 1, wrap, mirror );\n        ptrdiff_t isrcA = bounduvw( isrcB - 1, source - 1, wrap, mirror );\n        ptrdiff_t isrcC = bounduvw( isrcB + 1, source - 1, wrap, mirror );\n        ptrdiff_t isrcD = bounduvw( isrcB + 2, source - 1, wrap, mirror );\n\n        auto& entry = cf[ u ];\n        entry.u0 = size_t(isrcA);\n        entry.u1 = size_t(isrcB);\n        entry.u2 = size_t(isrcC);\n        entry.u3 = size_t(isrcD);\n\n        float x = srcB - float(isrcB);\n        entry.x = x;\n    }\n}\n\n#define CUBIC_INTERPOLATE( res, dx, p0, p1, p2, p3 ) \\\n{ \\\n    XMVECTOR a0 = (p1); \\\n    XMVECTOR d0 = (p0) - a0; \\\n    XMVECTOR d2 = (p2) - a0; \\\n    XMVECTOR d3 = (p3) - a0; \\\n    XMVECTOR a1 = d2 - g_cubicThird*d0 - g_cubicSixth*d3; \\\n    XMVECTOR a2 = g_cubicHalf*d0 + g_cubicHalf*d2; \\\n    XMVECTOR a3 = g_cubicSixth*d3 - g_cubicSixth*d0 - g_cubicHalf*d2;  \\\n    XMVECTOR vdx = XMVectorReplicate( dx ); \\\n    XMVECTOR vdx2 = vdx * vdx; \\\n    XMVECTOR vdx3 = vdx2 * vdx; \\\n    res = a0 + a1*vdx + a2*vdx2 + a3*vdx3; \\\n}\n\n\n//-------------------------------------------------------------------------------------\n// Triangle filtering helpers\n//-------------------------------------------------------------------------------------\n\nnamespace TriangleFilter\n{\n    struct FilterTo\n    {\n        size_t      u;\n        float       weight;\n    };\n\n    struct FilterFrom\n    {\n        size_t      count;\n        size_t      sizeInBytes;\n        FilterTo    to[1]; // variable-sized array\n    };\n\n    struct Filter\n    {\n        size_t      sizeInBytes;\n        size_t      totalSize;\n        FilterFrom  from[1]; // variable-sized array\n    };\n\n    struct TriangleRow\n    {\n        size_t                      remaining;\n        TriangleRow*                next;\n        ScopedAlignedArrayXMVECTOR  scanline;\n\n        TriangleRow() : remaining(0), next(nullptr) {}\n    };\n\n    static const size_t TF_FILTER_SIZE = sizeof(Filter) - sizeof(FilterFrom);\n    static const size_t TF_FROM_SIZE = sizeof(FilterFrom) - sizeof(FilterTo);\n    static const size_t TF_TO_SIZE = sizeof(FilterTo);\n\n    static const float TF_EPSILON = 0.00001f;\n\n    inline HRESULT _Create( _In_ size_t source, _In_ size_t dest, _In_ bool wrap, _Inout_ std::unique_ptr<Filter>& tf )\n    {\n        assert( source > 0 );\n        assert( dest > 0 );\n\n        float scale = float(dest) / float(source);\n        float scaleInv = 0.5f / scale;\n\n        // Determine storage required for filter and allocate memory if needed\n        size_t totalSize = TF_FILTER_SIZE + TF_FROM_SIZE + TF_TO_SIZE;\n        float repeat = (wrap) ? 1.f : 0.f;\n\n        for( size_t u = 0; u < source; ++u )\n        {\n            float src = float(u) - 0.5f;\n            float destMin = src * scale;\n            float destMax = destMin + scale;\n\n            totalSize += TF_FROM_SIZE + TF_TO_SIZE + size_t( destMax - destMin + repeat + 1.f ) * TF_TO_SIZE * 2;\n        }\n\n        uint8_t* pFilter = nullptr;\n\n        if ( tf )\n        {\n            // See if existing filter memory block is large enough to reuse\n            if ( tf->totalSize >= totalSize )\n            {\n                pFilter = reinterpret_cast<uint8_t*>( tf.get() );\n            }\n            else\n            {\n                // Need to reallocate filter memory block\n                tf.reset( nullptr );\n            }\n        }\n\n        if ( !tf )\n        {\n            // Allocate filter memory block\n            pFilter = new (std::nothrow) uint8_t[ totalSize ];\n            if ( !pFilter )\n                return E_OUTOFMEMORY;\n\n            tf.reset( reinterpret_cast<Filter*>( pFilter ) );\n            tf->totalSize = totalSize;\n        }\n\n        assert( pFilter != 0 );\n\n        // Filter setup\n        size_t sizeInBytes = TF_FILTER_SIZE;\n        size_t accumU = 0;\n        float accumWeight = 0.f;\n\n        for( size_t u = 0; u < source; ++u )\n        {\n            // Setup from entry\n            size_t sizeFrom = sizeInBytes;\n            auto pFrom = reinterpret_cast<FilterFrom*>( pFilter + sizeInBytes );\n            sizeInBytes += TF_FROM_SIZE;\n\n            if ( sizeInBytes > totalSize )\n                return E_FAIL;\n\n            size_t toCount = 0;\n\n            // Perform two passes to capture the influences from both sides\n            for( size_t j = 0; j < 2; ++j )\n            {\n                float src = float( u + j ) - 0.5f;\n\n                float destMin = src * scale;\n                float destMax = destMin + scale;\n\n                if ( !wrap )\n                {\n                    // Clamp\n                    if ( destMin < 0.f )\n                        destMin = 0.f;\n                    if ( destMax > float(dest) )\n                        destMax = float(dest);\n                }\n\n                for( auto k = static_cast<ptrdiff_t>( floorf( destMin ) ); float(k) < destMax; ++k )\n                {\n                    float d0 = float(k);\n                    float d1 = d0 + 1.f;\n\n                    size_t u0;\n                    if ( k < 0 )\n                    {\n                        // Handle wrap\n                        u0 = size_t( k + ptrdiff_t(dest) );\n                    }\n                    else if ( k >= ptrdiff_t(dest) )\n                    {\n                        // Handle wrap\n                        u0 = size_t( k - ptrdiff_t(dest) );\n                    }\n                    else\n                    {\n                        u0 = size_t( k );\n                    }\n\n                    // Save previous accumulated weight (if any)\n                    if ( u0 != accumU )\n                    {\n                        if ( accumWeight > TF_EPSILON )\n                        {\n                            auto pTo = reinterpret_cast<FilterTo*>( pFilter + sizeInBytes );\n                            sizeInBytes += TF_TO_SIZE;\n                            ++toCount;\n\n                            if ( sizeInBytes > totalSize )\n                                return E_FAIL;\n\n                            pTo->u = accumU;\n                            pTo->weight = accumWeight;\n                        }\n\n                        accumWeight = 0.f;\n                        accumU = u0;\n                    }\n\n                    // Clip destination\n                    if ( d0 < destMin )\n                        d0 = destMin;\n                    if ( d1 > destMax )\n                        d1 = destMax;\n\n                    // Calculate average weight over destination pixel\n\n                    float weight;\n                    if ( !wrap && src < 0.f )\n                        weight = 1.f;\n                    else if ( !wrap && ( ( src + 1.f ) >= float(source) ) )\n                        weight = 0.f;\n                    else\n                        weight = (d0 + d1) * scaleInv - src;\n\n                    accumWeight += (d1 - d0) * ( j ? (1.f - weight) : weight );\n                }\n            }\n\n            // Store accumulated weight\n            if ( accumWeight > TF_EPSILON )\n            {\n                auto pTo = reinterpret_cast<FilterTo*>( pFilter + sizeInBytes );\n                sizeInBytes += TF_TO_SIZE;\n                ++toCount;\n\n                if ( sizeInBytes > totalSize )\n                    return E_FAIL;\n\n                pTo->u = accumU;\n                pTo->weight = accumWeight;\n            }\n\n            accumWeight = 0.f;\n\n            // Finalize from entry\n            pFrom->count = toCount;\n            pFrom->sizeInBytes = sizeInBytes - sizeFrom;\n        }\n\n        tf->sizeInBytes = sizeInBytes;\n\n        return S_OK;\n    }\n\n}; // namespace\n\n}; // namespace"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/BC6HEncode.hlsl",
    "content": "//--------------------------------------------------------------------------------------\n// File: BC6HEncode.hlsl\n//\n// The Compute Shader for BC6H Encoder\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n//#define REF_DEVICE\n\n#define UINTLENGTH            32\n#define NCHANNELS             3\n#define SIGNED_F16            96\n#define UNSIGNED_F16          95\n#define MAX_FLOAT             asfloat(0x7F7FFFFF)\n#define MIN_FLOAT             asfloat(0xFF7FFFFF)\n#define MAX_INT               asint(0x7FFFFFFF)\n#define MIN_INT               asint(0x80000000)\n\ncbuffer cbCS : register( b0 )\n{\n    uint g_tex_width;\n    uint g_num_block_x;\n    uint g_format;            //either SIGNED_F16 for DXGI_FORMAT_BC6H_SF16 or UNSIGNED_F16 for DXGI_FORMAT_BC6H_UF16\n    uint g_mode_id;\n    uint g_start_block_id;\n    uint g_num_total_blocks;\n};\n\nstatic const uint candidateModeMemory[14] = { 0x00, 0x01, 0x02, 0x06, 0x0A, 0x0E, 0x12, 0x16, 0x1A, 0x1E, 0x03, 0x07, 0x0B, 0x0F };\nstatic const uint candidateModeFlag[14] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };\nstatic const bool candidateModeTransformed[14] = { true, true, true, true, true, true, true, true, true, false, false, true, true, true };\nstatic const uint4 candidateModePrec[14] = { uint4(10,5,5,5), uint4(7,6,6,6),\n    uint4(11,5,4,4), uint4(11,4,5,4), uint4(11,4,4,5), uint4(9,5,5,5),\n    uint4(8,6,5,5), uint4(8,5,6,5), uint4(8,5,5,6), uint4(6,6,6,6),\n    uint4(10,10,10,10), uint4(11,9,9,9), uint4(12,8,8,8), uint4(16,4,4,4) };\n\n/*static const uint4x4 candidateSection[32] = \n{\n    {0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1}, {0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1}, {0,1,1,1, 0,1,1,1, 0,1,1,1, 0,1,1,1}, {0,0,0,1, 0,0,1,1, 0,0,1,1, 0,1,1,1},\n    {0,0,0,0, 0,0,0,1, 0,0,0,1, 0,0,1,1}, {0,0,1,1, 0,1,1,1, 0,1,1,1, 1,1,1,1}, {0,0,0,1, 0,0,1,1, 0,1,1,1, 1,1,1,1}, {0,0,0,0, 0,0,0,1, 0,0,1,1, 0,1,1,1},\n    {0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,1,1}, {0,0,1,1, 0,1,1,1, 1,1,1,1, 1,1,1,1}, {0,0,0,0, 0,0,0,1, 0,1,1,1, 1,1,1,1}, {0,0,0,0, 0,0,0,0, 0,0,0,1, 0,1,1,1},\n    {0,0,0,1, 0,1,1,1, 1,1,1,1, 1,1,1,1}, {0,0,0,0, 0,0,0,0, 1,1,1,1, 1,1,1,1}, {0,0,0,0, 1,1,1,1, 1,1,1,1, 1,1,1,1}, {0,0,0,0, 0,0,0,0, 0,0,0,0, 1,1,1,1},\n    {0,0,0,0, 1,0,0,0, 1,1,1,0, 1,1,1,1}, {0,1,1,1, 0,0,0,1, 0,0,0,0, 0,0,0,0}, {0,0,0,0, 0,0,0,0, 1,0,0,0, 1,1,1,0}, {0,1,1,1, 0,0,1,1, 0,0,0,1, 0,0,0,0},\n    {0,0,1,1, 0,0,0,1, 0,0,0,0, 0,0,0,0}, {0,0,0,0, 1,0,0,0, 1,1,0,0, 1,1,1,0}, {0,0,0,0, 0,0,0,0, 1,0,0,0, 1,1,0,0}, {0,1,1,1, 0,0,1,1, 0,0,1,1, 0,0,0,1},\n    {0,0,1,1, 0,0,0,1, 0,0,0,1, 0,0,0,0}, {0,0,0,0, 1,0,0,0, 1,0,0,0, 1,1,0,0}, {0,1,1,0, 0,1,1,0, 0,1,1,0, 0,1,1,0}, {0,0,1,1, 0,1,1,0, 0,1,1,0, 1,1,0,0},\n    {0,0,0,1, 0,1,1,1, 1,1,1,0, 1,0,0,0}, {0,0,0,0, 1,1,1,1, 1,1,1,1, 0,0,0,0}, {0,1,1,1, 0,0,0,1, 1,0,0,0, 1,1,1,0}, {0,0,1,1, 1,0,0,1, 1,0,0,1, 1,1,0,0}\n};*/\n\nstatic const uint candidateSectionBit[32] = \n{\n    0xCCCC, 0x8888, 0xEEEE, 0xECC8,\n    0xC880, 0xFEEC, 0xFEC8, 0xEC80,\n    0xC800, 0xFFEC, 0xFE80, 0xE800,\n    0xFFE8, 0xFF00, 0xFFF0, 0xF000,\n    0xF710, 0x008E, 0x7100, 0x08CE,\n    0x008C, 0x7310, 0x3100, 0x8CCE,\n    0x088C, 0x3110, 0x6666, 0x366C,\n    0x17E8, 0x0FF0, 0x718E, 0x399C\n};\n\nstatic const uint candidateFixUpIndex1D[32] = \n{\n    15,15,15,15,\n    15,15,15,15,\n    15,15,15,15,\n    15,15,15,15,\n    15, 2, 8, 2,\n     2, 8, 8,15,\n     2, 8, 2, 2,\n     8, 8, 2, 2\n};\n\n//0, 9, 18, 27, 37, 46, 55, 64\nstatic const uint aStep1[64] = {0,0,0,0,0,1,1,1,\n                              1,1,1,1,1,1,2,2,\n                              2,2,2,2,2,2,2,3,\n                              3,3,3,3,3,3,3,3,\n                              3,4,4,4,4,4,4,4,\n                              4,4,5,5,5,5,5,5,\n                              5,5,5,6,6,6,6,6,\n                              6,6,6,6,7,7,7,7};\n                                  \n//0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64\nstatic const uint aStep2[64] = { 0, 0, 0, 1, 1, 1, 1, 2,\n                               2, 2, 2, 2, 3, 3, 3, 3,\n                               4, 4, 4, 4, 5, 5, 5, 5,\n                               6, 6, 6, 6, 6, 7, 7, 7,\n                               7, 8, 8, 8, 8, 9, 9, 9,\n                               9,10,10,10,10,10,11,11,\n                              11,11,12,12,12,12,13,13,\n                              13,13,14,14,14,14,15,15};\n\nstatic const float3 RGB2LUM = float3(0.2126f, 0.7152f, 0.0722f);\n\n#define THREAD_GROUP_SIZE    64\n#define BLOCK_SIZE_Y         4\n#define BLOCK_SIZE_X         4\n#define BLOCK_SIZE           (BLOCK_SIZE_Y * BLOCK_SIZE_X)\n\n\n//Forward declaration\nuint3 float2half( float3 pixel_f );\nint3 start_quantize( uint3 pixel_h );\nvoid quantize( inout int2x3 endPoint, uint prec );\nvoid finish_quantize_0( inout int bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed );\nvoid finish_quantize_1( inout int bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed );\nvoid finish_quantize( out bool bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed );\n\nvoid start_unquantize( inout int2x3 endPoint[2], uint4 prec, bool transformed );\nvoid start_unquantize( inout int2x3 endPoint, uint4 prec, bool transformed );\nvoid unquantize( inout int2x3 color, uint prec );\nuint3 finish_unquantize( int3 color );\nvoid generate_palette_unquantized8( out uint3 palette, int3 low, int3 high, int i );\nvoid generate_palette_unquantized16( out uint3 palette, int3 low, int3 high, int i );\nfloat3 half2float(uint3 color_h );\n\nvoid block_package( inout uint4 block, int2x3 endPoint[2], uint mode_type, uint partition_index );\nvoid block_package( inout uint4 block, int2x3 endPoint, uint mode_type );\n\nvoid swap(inout int3 lhs, inout int3 rhs)\n{\n    int3 tmp = lhs;\n    lhs = rhs;\n    rhs = tmp;\n}\n\nTexture2D<float4> g_Input : register( t0 ); \nStructuredBuffer<uint4> g_InBuff : register( t1 );\n\nRWStructuredBuffer<uint4> g_OutBuff : register( u0 );\n\nstruct SharedData\n{\n    float3 pixel;\n    int3 pixel_ph;\n    float3 pixel_hr;\n    float pixel_lum;\n    float error;\n    uint best_mode;\n    uint best_partition;\n    int3 endPoint_low;\n    int3 endPoint_high;\n    float endPoint_lum_low;\n    float endPoint_lum_high;\n};\n\ngroupshared SharedData shared_temp[THREAD_GROUP_SIZE];\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid TryModeG10CS( uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID )\n{\n    const uint MAX_USED_THREAD = 16;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n#ifndef REF_DEVICE\n    if (blockID >= g_num_total_blocks)\n    {\n        return;\n    }\n#endif\n    \n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ).rgb;\n        uint3 pixel_h = float2half( shared_temp[GI].pixel );\n        shared_temp[GI].pixel_hr = half2float(pixel_h);\n        shared_temp[GI].pixel_lum = dot(shared_temp[GI].pixel_hr, RGB2LUM);\n        shared_temp[GI].pixel_ph = start_quantize( pixel_h );\n        \n        shared_temp[GI].endPoint_low = shared_temp[GI].pixel_ph;\n        shared_temp[GI].endPoint_high = shared_temp[GI].pixel_ph;\n        shared_temp[GI].endPoint_lum_low = shared_temp[GI].pixel_lum;\n        shared_temp[GI].endPoint_lum_high = shared_temp[GI].pixel_lum;\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    if (threadInBlock < 8)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 8].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 8].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 8].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 8].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 8].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 8].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 4].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 4].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 4].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 4].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 4].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 4].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 2].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 2].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 2].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 2].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 2].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 2].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 1].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 1].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 1].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 1].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 1].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 1].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    //ergod mode_type 11:14\n    if ( threadInBlock == 0 )\n    {\n        int2x3 endPoint;\n        // find_axis\n        endPoint[0] = shared_temp[threadBase + 0].endPoint_low;\n        endPoint[1] = shared_temp[threadBase + 0].endPoint_high;\n        \n        //compute_index\n        float3 span = endPoint[1] - endPoint[0];// fixed a bug in v0.2\n        float span_norm_sqr = dot( span, span );// fixed a bug in v0.2\n        float dotProduct = dot( span, shared_temp[threadBase + 0].pixel_ph - endPoint[0] );// fixed a bug in v0.2\n        if ( span_norm_sqr > 0 && dotProduct >= 0 && uint( dotProduct * 63.49999 / span_norm_sqr ) > 32 )\n        {\n            swap(endPoint[0], endPoint[1]);\n\n            shared_temp[GI].endPoint_low = endPoint[0];\n            shared_temp[GI].endPoint_high = endPoint[1];\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 4)\n    {\n        int2x3 endPoint;\n        endPoint[0] = shared_temp[threadBase + 0].endPoint_low;\n        endPoint[1] = shared_temp[threadBase + 0].endPoint_high;\n        \n        float3 span = endPoint[1] - endPoint[0];\n        float span_norm_sqr = dot( span, span );\n            \n        uint4 prec = candidateModePrec[threadInBlock + 10];\n        int2x3 endPoint_q = endPoint;\n        quantize( endPoint_q, prec.x );\n\n        bool transformed = candidateModeTransformed[threadInBlock + 10];\n        if (transformed)\n        {\n            endPoint_q[1] -= endPoint_q[0];\n        }\n        \n        bool bBadQuantize;\n        finish_quantize( bBadQuantize, endPoint_q, prec, transformed );\n        \n        start_unquantize( endPoint_q, prec, transformed );\n        \n        unquantize( endPoint_q, prec.x );\n        \n        float error = 0;\n        [loop]for ( uint j = 0; j < 16; j ++ )\n        {\n            float dotProduct = dot( span, shared_temp[threadBase + j].pixel_ph - endPoint[0] );// fixed a bug in v0.2\n            uint index = ( span_norm_sqr <= 0 || dotProduct <= 0 ) ? 0\n                : ( ( dotProduct < span_norm_sqr ) ? aStep2[ uint( dotProduct * 63.49999 / span_norm_sqr ) ] : aStep2[63] );\n                \n            uint3 pixel_rh;\n            generate_palette_unquantized16( pixel_rh, endPoint_q[0], endPoint_q[1], index );\n            float3 pixel_r = half2float( pixel_rh );\n            pixel_r -= shared_temp[threadBase + j].pixel_hr;\n            error += dot(pixel_r, pixel_r);\n        }\n        if ( bBadQuantize )\n            error = 1e20f;\n\n        shared_temp[GI].error = error;\n        shared_temp[GI].best_mode = candidateModeFlag[threadInBlock + 10];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    if (threadInBlock < 2)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 2].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 2].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 2].best_mode;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 1].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 1].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 1].best_mode;\n        }\n        \n        g_OutBuff[blockID] = uint4(asuint(shared_temp[GI].error), shared_temp[GI].best_mode, 0, 0);\n    }\n}\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid TryModeLE10CS( uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID )\n{\n    const uint MAX_USED_THREAD = 32;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n#ifndef REF_DEVICE\n    if (blockID >= g_num_total_blocks)\n    {\n        return;\n    }\n\n    if (asfloat(g_InBuff[blockID].x) < 1e-6f)\n    {\n        g_OutBuff[blockID] = g_InBuff[blockID];\n        return;\n    }\n#endif\n    \n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ).rgb;\n        uint3 pixel_h = float2half( shared_temp[GI].pixel );\n        shared_temp[GI].pixel_hr = half2float(pixel_h);\n        shared_temp[GI].pixel_lum = dot(shared_temp[GI].pixel_hr, RGB2LUM);\n        shared_temp[GI].pixel_ph = start_quantize( pixel_h );\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    //ergod mode_type 1:10\n    if (threadInBlock < 32)\n    {\n        // find_axis\n        int2x3 endPoint[2];\n        endPoint[0][0] = MAX_INT;\n        endPoint[0][1] = MIN_INT;\n        endPoint[1][0] = MAX_INT;\n        endPoint[1][1] = MIN_INT;\n        \n        float2 endPoint_lum[2];\n        endPoint_lum[0][0] = MAX_FLOAT;\n        endPoint_lum[0][1] = MIN_FLOAT;\n        endPoint_lum[1][0] = MAX_FLOAT;\n        endPoint_lum[1][1] = MIN_FLOAT;\n\n        uint bit = candidateSectionBit[threadInBlock];\n        for ( uint i = 0; i < 16; i ++ )\n        {\n            int3 pixel_ph = shared_temp[threadBase + i].pixel_ph;\n            float pixel_lum = shared_temp[threadBase + i].pixel_lum;\n            if ( (bit >> i) & 1 ) //It gets error when using \"candidateSection\" as \"endPoint_ph\" index\n            {\n                if (endPoint_lum[1][0] > pixel_lum)\n                {\n                    endPoint[1][0] = pixel_ph;\n                    endPoint_lum[1][0] = pixel_lum;\n                }\n                if (endPoint_lum[1][1] < pixel_lum)\n                {\n                    endPoint[1][1] = pixel_ph;\n                    endPoint_lum[1][1] = pixel_lum;\n                }\n            }\n            else\n            {\n                if (endPoint_lum[0][0] > pixel_lum)\n                {\n                    endPoint[0][0] = pixel_ph;\n                    endPoint_lum[0][0] = pixel_lum;\n                }\n                if (endPoint_lum[0][1] < pixel_lum)\n                {\n                    endPoint[0][1] = pixel_ph;\n                    endPoint_lum[0][1] = pixel_lum;\n                }\n            }\n        }\n        \n        //compute_index\n        float3 span[2];// fixed a bug in v0.2\n        float span_norm_sqr[2];// fixed a bug in v0.2\n        [unroll]\n        for (uint p = 0; p < 2; ++ p)\n        {\n            span[p] = endPoint[p][1] - endPoint[p][0];\n            span_norm_sqr[p] = dot( span[p], span[p] );\n\n            float dotProduct = dot( span[p], shared_temp[threadBase + (0 == p ? 0 : candidateFixUpIndex1D[threadInBlock])].pixel_ph - endPoint[p][0] );// fixed a bug in v0.2\n            if ( span_norm_sqr[p] > 0 && dotProduct >= 0 && uint( dotProduct * 63.49999 / span_norm_sqr[p] ) > 32 )\n            {\n                span[p] = -span[p];\n                swap(endPoint[p][0], endPoint[p][1]);\n            }\n        }\n\n        uint4 prec = candidateModePrec[g_mode_id];\n        int2x3 endPoint_q[2] = endPoint;\n        quantize( endPoint_q[0], prec.x );\n        quantize( endPoint_q[1], prec.x );\n\n        bool transformed = candidateModeTransformed[g_mode_id];\n        if (transformed)\n        {\n            endPoint_q[0][1] -= endPoint_q[0][0];\n            endPoint_q[1][0] -= endPoint_q[0][0];\n            endPoint_q[1][1] -= endPoint_q[0][0];\n        }\n\n        int bBadQuantize = 0;\n        finish_quantize_0( bBadQuantize, endPoint_q[0], prec, transformed );\n        finish_quantize_1( bBadQuantize, endPoint_q[1], prec, transformed );\n        \n        start_unquantize( endPoint_q, prec, transformed );\n        \n        unquantize( endPoint_q[0], prec.x );\n        unquantize( endPoint_q[1], prec.x );\n        \n        float error = 0;\n        for ( uint j = 0; j < 16; j ++ )\n        {\n            uint3 pixel_rh;\n            if ((bit >> j) & 1)\n            {\n                float dotProduct = dot( span[1], shared_temp[threadBase + j].pixel_ph - endPoint[1][0] );// fixed a bug in v0.2\n                uint index = ( span_norm_sqr[1] <= 0 || dotProduct <= 0 ) ? 0\n                        : ( ( dotProduct < span_norm_sqr[1] ) ? aStep1[ uint( dotProduct * 63.49999 / span_norm_sqr[1] ) ] : aStep1[63] );\n                generate_palette_unquantized8( pixel_rh, endPoint_q[1][0], endPoint_q[1][1], index );\n            }\n            else\n            {\n                float dotProduct = dot( span[0], shared_temp[threadBase + j].pixel_ph - endPoint[0][0] );// fixed a bug in v0.2\n                uint index = ( span_norm_sqr[0] <= 0 || dotProduct <= 0 ) ? 0\n                        : ( ( dotProduct < span_norm_sqr[0] ) ? aStep1[ uint( dotProduct * 63.49999 / span_norm_sqr[0] ) ] : aStep1[63] );\n                generate_palette_unquantized8( pixel_rh, endPoint_q[0][0], endPoint_q[0][1], index );\n            }\n\n            float3 pixel_r = half2float( pixel_rh );\n            pixel_r -= shared_temp[threadBase + j].pixel_hr;\n            error += dot(pixel_r, pixel_r);\n        }\n        if ( bBadQuantize )\n            error = 1e20f;\n\n        shared_temp[GI].error = error;\n        shared_temp[GI].best_mode = candidateModeFlag[g_mode_id];\n        shared_temp[GI].best_partition = threadInBlock;\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    if (threadInBlock < 16)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 16].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 16].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 16].best_mode;\n            shared_temp[GI].best_partition = shared_temp[GI + 16].best_partition;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 8)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 8].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 8].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 8].best_mode;\n            shared_temp[GI].best_partition = shared_temp[GI + 8].best_partition;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 4].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 4].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 4].best_mode;\n            shared_temp[GI].best_partition = shared_temp[GI + 4].best_partition;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 2].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 2].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 2].best_mode;\n            shared_temp[GI].best_partition = shared_temp[GI + 2].best_partition;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 1].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 1].error;\n            shared_temp[GI].best_mode = shared_temp[GI + 1].best_mode;\n            shared_temp[GI].best_partition = shared_temp[GI + 1].best_partition;\n        }\n        \n        if (asfloat(g_InBuff[blockID].x) > shared_temp[GI].error)\n        {\n            g_OutBuff[blockID] = uint4(asuint(shared_temp[GI].error), shared_temp[GI].best_mode, shared_temp[GI].best_partition, 0);\n        }\n        else\n        {\n            g_OutBuff[blockID] = g_InBuff[blockID];\n        }\n    }\n}\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid EncodeBlockCS(uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID)\n{\n    const uint MAX_USED_THREAD = 32;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n#ifndef REF_DEVICE\n    if (blockID >= g_num_total_blocks)\n    {\n        return;\n    }\n#endif\n\n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ).rgb;\n        shared_temp[GI].pixel_lum = dot(shared_temp[GI].pixel, RGB2LUM);\n        uint3 pixel_h = float2half( shared_temp[GI].pixel );\n        shared_temp[GI].pixel_ph = start_quantize( pixel_h );\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    uint best_mode = g_InBuff[blockID].y;\n    uint best_partition = g_InBuff[blockID].z;\n    \n    uint4 block = 0;\n\n    if (threadInBlock < 32)\n    {\n        int2x3 endPoint;\n        endPoint[0] = MAX_INT;\n        endPoint[1] = MIN_INT;\n\n        float2 endPoint_lum;\n        endPoint_lum[0] = MAX_FLOAT;\n        endPoint_lum[1] = MIN_FLOAT;\n        \n        int2 endPoint_lum_index;\n        endPoint_lum_index[0] = -1;\n        endPoint_lum_index[1] = -1;\n\n        int3 pixel_ph = shared_temp[threadBase + (threadInBlock & 0xF)].pixel_ph;\n        float pixel_lum = shared_temp[threadBase + (threadInBlock & 0xF)].pixel_lum;\n        if (threadInBlock < 16)\n        {\n            if (best_mode > 10)\n            {\n                endPoint[0] = endPoint[1] = pixel_ph;\n                endPoint_lum[0] = endPoint_lum[1] = pixel_lum;\n            }\n            else\n            {\n                uint bits = candidateSectionBit[best_partition];\n                if (0 == ((bits >> threadInBlock) & 1))\n                {\n                    endPoint[0] = endPoint[1] = pixel_ph;\n                    endPoint_lum[0] = endPoint_lum[1] = pixel_lum;\n                }\n            }\n        }\n        else\n        {\n            if (best_mode <= 10)\n            {\n                uint bits = candidateSectionBit[best_partition];\n                if (1 == ((bits >> (threadInBlock & 0xF)) & 1))\n                {\n                    endPoint[0] = endPoint[1] = pixel_ph;\n                    endPoint_lum[0] = endPoint_lum[1] = pixel_lum;\n                }\n            }\n        }\n\n        shared_temp[GI].endPoint_low = endPoint[0];\n        shared_temp[GI].endPoint_high = endPoint[1];\n        \n        shared_temp[GI].endPoint_lum_low = endPoint_lum[0];\n        shared_temp[GI].endPoint_lum_high = endPoint_lum[1];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if ((threadInBlock & 0xF) < 8)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 8].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 8].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 8].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 8].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 8].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 8].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if ((threadInBlock & 0xF) < 4)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 4].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 4].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 4].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 4].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 4].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 4].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if ((threadInBlock & 0xF) < 2)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 2].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 2].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 2].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 2].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 2].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 2].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if ((threadInBlock & 0xF) < 1)\n    {\n        if (shared_temp[GI].endPoint_lum_low > shared_temp[GI + 1].endPoint_lum_low)\n        {\n            shared_temp[GI].endPoint_low = shared_temp[GI + 1].endPoint_low;\n            shared_temp[GI].endPoint_lum_low = shared_temp[GI + 1].endPoint_lum_low;\n        }\n        if (shared_temp[GI].endPoint_lum_high < shared_temp[GI + 1].endPoint_lum_high)\n        {\n            shared_temp[GI].endPoint_high = shared_temp[GI + 1].endPoint_high;\n            shared_temp[GI].endPoint_lum_high = shared_temp[GI + 1].endPoint_lum_high;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 2)\n    {\n        // find_axis\n        int2x3 endPoint;\n        endPoint[0] = shared_temp[threadBase + threadInBlock * 16].endPoint_low;\n        endPoint[1] = shared_temp[threadBase + threadInBlock * 16].endPoint_high;\n\n        uint fixup = 0;\n        if ((1 == threadInBlock) && (best_mode <= 10))\n        {\n            fixup = candidateFixUpIndex1D[best_partition];\n        }\n        \n        float3 span = endPoint[1] - endPoint[0];\n        float span_norm_sqr = dot( span, span );\n        float dotProduct = dot( span, shared_temp[threadBase + fixup].pixel_ph - endPoint[0] );\n        if ( span_norm_sqr > 0 && dotProduct >= 0 && uint( dotProduct * 63.49999 / span_norm_sqr ) > 32 )\n        {\n            swap(endPoint[0], endPoint[1]);\n        }\n\n        shared_temp[GI].endPoint_low = endPoint[0];\n        shared_temp[GI].endPoint_high = endPoint[1];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    if (threadInBlock < 16)\n    {\n        uint bits;\n        if (best_mode > 10)\n        {\n            bits = 0;\n        }\n        else\n        {\n            bits = candidateSectionBit[best_partition];\n        }\n\n        float3 span;\n        float dotProduct;\n        if ((bits >> threadInBlock) & 1)\n        {\n            span = shared_temp[threadBase + 1].endPoint_high - shared_temp[threadBase + 1].endPoint_low;\n            dotProduct = dot( span, shared_temp[threadBase + threadInBlock].pixel_ph - shared_temp[threadBase + 1].endPoint_low );\n        }\n        else\n        {\n            span = shared_temp[threadBase + 0].endPoint_high - shared_temp[threadBase + 0].endPoint_low;\n            dotProduct = dot( span, shared_temp[threadBase + threadInBlock].pixel_ph - shared_temp[threadBase + 0].endPoint_low );\n        }\n        float span_norm_sqr = dot( span, span );\n\n        if (best_mode > 10)\n        {\n            uint index = ( span_norm_sqr <= 0 || dotProduct <= 0 ) ? 0\n                    : ( ( dotProduct < span_norm_sqr ) ? aStep2[ uint( dotProduct * 63.49999 / span_norm_sqr ) ] : aStep2[63] );\n            if (threadInBlock == 0)\n            {\n                block.z |= index << 1;\n            }\n            else if (threadInBlock < 8)\n            {\n                block.z |= index << (threadInBlock * 4);\n            }\n            else\n            {\n                block.w |= index << ((threadInBlock - 8) * 4);\n            }\n        }\n        else\n        {\n            uint index = ( span_norm_sqr <= 0 || dotProduct <= 0 ) ? 0\n                    : ( ( dotProduct < span_norm_sqr ) ? aStep1[ uint( dotProduct * 63.49999 / span_norm_sqr ) ] : aStep1[63] );\n\n            uint fixup = candidateFixUpIndex1D[best_partition];\n            int2 offset = int2((fixup != 2), (fixup == 15));\n\n            if (threadInBlock == 0)\n            {\n                block.z |= index << 18;\n            }\n            else if (threadInBlock < 3)\n            {\n                block.z |= index << (20 + (threadInBlock - 1) * 3);\n            }\n            else if (threadInBlock < 5)\n            {\n                block.z |= index << (25 + (threadInBlock - 3) * 3 + offset.x);\n            }\n            else if (threadInBlock == 5)\n            {\n                block.w |= index >> !offset.x;\n                if (!offset.x)\n                {\n                    block.z |= index << 31;\n                }\n            }\n            else if (threadInBlock < 9)\n            {\n                block.w |= index << (2 + (threadInBlock - 6) * 3 + offset.x);\n            }\n            else\n            {\n                block.w |= index << (11 + (threadInBlock - 9) * 3 + offset.y);\n            }\n        }\n        \n        shared_temp[GI].pixel_hr.xy = asfloat(block.zw);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 8)\n    {\n        shared_temp[GI].pixel_hr.xy = asfloat(asuint(shared_temp[GI].pixel_hr.xy) | asuint(shared_temp[GI + 8].pixel_hr.xy));\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        shared_temp[GI].pixel_hr.xy = asfloat(asuint(shared_temp[GI].pixel_hr.xy) | asuint(shared_temp[GI + 4].pixel_hr.xy));\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        shared_temp[GI].pixel_hr.xy = asfloat(asuint(shared_temp[GI].pixel_hr.xy) | asuint(shared_temp[GI + 2].pixel_hr.xy));\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        shared_temp[GI].pixel_hr.xy = asfloat(asuint(shared_temp[GI].pixel_hr.xy) | asuint(shared_temp[GI + 1].pixel_hr.xy));\n        \n        block.zw = asuint(shared_temp[GI].pixel_hr.xy);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    bool transformed = candidateModeTransformed[best_mode - 1];\n    uint4 prec = candidateModePrec[best_mode - 1];\n    if (threadInBlock == 2)\n    {\n        int2x3 endPoint_q;\n        endPoint_q[0] = shared_temp[threadBase + 0].endPoint_low;\n        endPoint_q[1] = shared_temp[threadBase + 0].endPoint_high;\n\n        quantize( endPoint_q, prec.x );\n        if (transformed)\n        {\n            endPoint_q[1] -= endPoint_q[0];\n        }\n\n        shared_temp[GI].endPoint_low = endPoint_q[0];\n        shared_temp[GI].endPoint_high = endPoint_q[1];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock == 3)\n    {\n        int3 ep0 = shared_temp[threadBase + 2].endPoint_low;\n        int2x3 endPoint_q;\n        endPoint_q[0] = shared_temp[threadBase + 1].endPoint_low;\n        endPoint_q[1] = shared_temp[threadBase + 1].endPoint_high;\n\n        if (best_mode <= 10)\n        {\n            quantize( endPoint_q, prec.x );\n            if (transformed)\n            {\n                endPoint_q[0] -= ep0;\n                endPoint_q[1] -= ep0;\n            }\n\n            shared_temp[GI].endPoint_low = endPoint_q[0];\n            shared_temp[GI].endPoint_high = endPoint_q[1];\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 2)\n    {\n        int2x3 endPoint_q;\n        endPoint_q[0] = shared_temp[threadBase + threadInBlock + 2].endPoint_low;\n        endPoint_q[1] = shared_temp[threadBase + threadInBlock + 2].endPoint_high;\n\n        int bBadQuantize = 0;\n        if (threadInBlock == 0)\n        {\n            if (best_mode > 10)\n            {\n                finish_quantize( bBadQuantize, endPoint_q, prec, transformed );\n            }\n            else\n            {\n                finish_quantize_0( bBadQuantize, endPoint_q, prec, transformed );\n            }\n        }\n        else // if (threadInBlock == 1)\n        {\n            if (best_mode <= 10)\n            {\n                finish_quantize_1( bBadQuantize, endPoint_q, prec, transformed );\n            }\n        }\n\n        shared_temp[GI].endPoint_low = endPoint_q[0];\n        shared_temp[GI].endPoint_high = endPoint_q[1];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    \n    if ( threadInBlock == 0 )\n    {\n        int2x3 endPoint_q[2];\n        endPoint_q[0][0] = shared_temp[threadBase + 0].endPoint_low;\n        endPoint_q[0][1] = shared_temp[threadBase + 0].endPoint_high;\n        endPoint_q[1][0] = shared_temp[threadBase + 1].endPoint_low;\n        endPoint_q[1][1] = shared_temp[threadBase + 1].endPoint_high;\n\n        if ( best_mode > 10 )\n        {\n            block_package( block, endPoint_q[0], best_mode );\n        }\n        else\n        {\n            block_package( block, endPoint_q, best_mode, best_partition );\n        }\n        \n        g_OutBuff[blockID] = block;\n    }\n}\n\nuint float2half1( float f )\n{\n    uint Result;\n\n    uint IValue = asuint(f);\n    uint Sign = (IValue & 0x80000000U) >> 16U;\n    IValue = IValue & 0x7FFFFFFFU;\n    \n    if (IValue > 0x47FFEFFFU)\n    {\n        // The number is too large to be represented as a half.  Saturate to infinity.\n        Result = 0x7FFFU;\n    }\n    else\n    {\n        if (IValue < 0x38800000U)\n        {\n            // The number is too small to be represented as a normalized half.\n            // Convert it to a denormalized value.\n            uint Shift = 113U - (IValue >> 23U);\n            IValue = (0x800000U | (IValue & 0x7FFFFFU)) >> Shift;\n        }\n        else\n        {\n            // Rebias the exponent to represent the value as a normalized half.\n            IValue += 0xC8000000U;\n        }\n\n        Result = ((IValue + 0x0FFFU + ((IValue >> 13U) & 1U)) >> 13U)&0x7FFFU; \n    }\n    return (Result|Sign);\n}\n\nuint3 float2half( float3 endPoint_f )\n{\n    //uint3 sign = asuint(endPoint_f) & 0x80000000;\n    //uint3 expo = asuint(endPoint_f) & 0x7F800000;\n    //uint3 base = asuint(endPoint_f) & 0x007FFFFF;\n    //return ( expo < 0x33800000 ) ? 0 \n    //                    //0x33800000 indicating 2^-24, which is minimal denormalized number that half can present \n    //    : ( ( expo < 0x38800000 ) ? ( sign >> 16 ) | ( ( base + 0x00800000 ) >> ( 23 - ( ( expo - 0x33800000 ) >> 23 ) ) )//fixed a bug in v0.2\n    //                    //0x38800000 indicating 2^-14, which is minimal normalized number that half can present, so need to use denormalized half presentation\n    //    : ( ( expo == 0x7F800000 || expo > 0x47000000 ) ? ( ( sign >> 16 ) | 0x7bff )\n    //                    // treat NaN as INF, treat INF (including NaN) as the maximum/minimum number that half can present\n    //                    // 0x47000000 indicating 2^15, which is maximum exponent that half can present, so cut to 0x7bff which is the maximum half number\n    //    : ( ( sign >> 16 ) | ( ( ( expo - 0x38000000 ) | base ) >> 13 ) ) ) );\n\n\n    return uint3( float2half1( endPoint_f.x ), float2half1( endPoint_f.y ), float2half1( endPoint_f.z ) );\n}\nint3 start_quantize( uint3 pixel_h )\n{\n    if ( g_format == UNSIGNED_F16 )\n    {\n        return asint( ( pixel_h << 6 ) / 31 );\n    }\n    else\n    {\n        return ( pixel_h < 0x8000 ) ? ( ( pixel_h == 0x7bff ) ? 0x7fff : asint( ( pixel_h << 5 ) / 31 ) )// fixed a bug in v0.2\n            : ( ( pixel_h == 0x7bff ) ? 0xffff8001 : -asint( ( ( 0x00007fff & pixel_h ) << 5 ) / 31 ) );// fixed a bug in v0.2\n    }\n}\nvoid quantize( inout int2x3 endPoint, uint prec )\n{\n    int iprec = asint( prec );\n    if ( g_format == UNSIGNED_F16 )\n    {\n        endPoint = ( ( iprec >= 15 ) | ( endPoint == 0 ) ) ? endPoint\n            : ( ( endPoint == asint(0xFFFF) ) ? ( ( 1 << iprec ) - 1 )\n            : ( ( ( endPoint << iprec ) + asint(0x0000) ) >> 16 ) );\n    }\n    else\n    {\n        endPoint = ( ( iprec >= 16 ) | ( endPoint == 0 ) ) ? endPoint\n            : ( ( endPoint >= 0 ) ? ( ( endPoint == asint(0x7FFF) ) ? ( ( 1 << ( iprec - 1 ) ) - 1 ) : ( ( ( endPoint << ( iprec - 1 ) ) + asint(0x0000) ) >> 15 ) ) \n            : ( ( -endPoint == asint(0x7FFF) ) ? -( ( 1 << ( iprec - 1 ) ) - 1 ) : -( ( ( -endPoint << ( iprec - 1 ) ) + asint(0x0000) ) >> 15 ) ) );\n    }\n}\nvoid finish_quantize_0( inout int bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed )\n{\n    if ( transformed )\n    {\n        bool3 bBadComponent = ( endPoint[1] >= 0 ) ? ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) )\n            : ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) );\n        bBadQuantize |= any(bBadComponent);\n\n        endPoint[0] = endPoint[0] & ( ( 1 << prec.x ) - 1 );\n        endPoint[1] = ( endPoint[1] >= 0 ) ? ( ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) ) ? ( ( 1 << ( prec.yzw - 1 ) ) - 1 ) : endPoint[1] )\n            : ( ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) ) ? ( 1 << ( prec.yzw - 1 ) ) : ( endPoint[1] & ( ( 1 << prec.yzw ) - 1 ) ) );\n    }\n    else\n    {\n        endPoint &= ( ( 1 << prec.x ) - 1 );\n    }\n}\nvoid finish_quantize_1( inout int bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed )\n{\n    if ( transformed )\n    {\n        bool2x3 bBadComponent;\n        bBadComponent[0] = ( endPoint[0] >= 0 ) ? ( endPoint[0] >= ( 1 << ( prec.yzw - 1 ) ) )\n            : ( -endPoint[0] > ( 1 << ( prec.yzw - 1 ) ) );\n        bBadComponent[1] = ( endPoint[1] >= 0 ) ? ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) )\n            : ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) );\n        bBadQuantize |= any(bBadComponent);\n\n        endPoint[0] = ( endPoint[0] >= 0 ) ? ( ( endPoint[0] >= ( 1 << ( prec.yzw - 1 ) ) ) ? ( ( 1 << ( prec.yzw - 1 ) ) - 1 ) : endPoint[0] )\n            : ( ( -endPoint[0] > ( 1 << ( prec.yzw - 1 ) ) ) ? ( 1 << ( prec.yzw - 1 ) ) : ( endPoint[0] & ( ( 1 << prec.yzw ) - 1 ) ) );\n        endPoint[1] = ( endPoint[1] >= 0 ) ? ( ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) ) ? ( ( 1 << ( prec.yzw - 1 ) ) - 1 ) : endPoint[1] )\n            : ( ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) ) ? ( 1 << ( prec.yzw - 1 ) ) : ( endPoint[1] & ( ( 1 << prec.yzw ) - 1 ) ) );\n    }\n    else\n    {\n        endPoint &= ( ( 1 << prec.x ) - 1 );\n    }\n}\nvoid finish_quantize( out bool bBadQuantize, inout int2x3 endPoint, uint4 prec, bool transformed )\n{\n    if ( transformed )\n    {\n        bool3 bBadComponent;\n        bBadComponent = ( endPoint[1] >= 0 ) ? ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) )\n            : ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) );\n        bBadQuantize = any( bBadComponent );\n\n        endPoint[0] = endPoint[0] & ( ( 1 << prec.x ) - 1 );\n        endPoint[1] = ( endPoint[1] >= 0 ) ? ( ( endPoint[1] >= ( 1 << ( prec.yzw - 1 ) ) ) ? ( ( 1 << ( prec.yzw - 1 ) ) - 1 ) : endPoint[1] )\n            : ( ( -endPoint[1] > ( 1 << ( prec.yzw - 1 ) ) ) ? ( 1 << ( prec.yzw - 1 ) ) : ( endPoint[1] & ( ( 1 << prec.yzw ) - 1 ) ) );            \n    }\n    else\n    {\n        endPoint &= ( ( 1 << prec.x ) - 1 );\n        \n        bBadQuantize = 0;\n    }\n}\n\nvoid SIGN_EXTEND( uint3 prec, inout int3 color )\n{\n    uint3 p = 1 << (prec - 1);\n    color = (color & p) ? (color & (p - 1)) - p : color;\n}\n\nvoid sign_extend( bool transformed, uint4 prec, inout int2x3 endPoint )\n{\n    if ( g_format == SIGNED_F16 )\n        SIGN_EXTEND( prec.x, endPoint[0] );\n    if ( g_format == SIGNED_F16 || transformed )\n        SIGN_EXTEND( prec.yzw, endPoint[1] );\n}\n\nvoid sign_extend( bool transformed, uint4 prec, inout int2x3 endPoint[2] )\n{\n    if ( g_format == SIGNED_F16 )\n        SIGN_EXTEND( prec.x, endPoint[0][0] );\n    if ( g_format == SIGNED_F16 || transformed )\n    {\n        SIGN_EXTEND( prec.yzw, endPoint[0][1] );\n        SIGN_EXTEND( prec.yzw, endPoint[1][0] );\n        SIGN_EXTEND( prec.yzw, endPoint[1][1] );\n    }\n}\nvoid start_unquantize( inout int2x3 endPoint[2], uint4 prec, bool transformed )\n{\n    sign_extend( transformed, prec, endPoint );\n    if ( transformed )\n    {\n        endPoint[0][1] += endPoint[0][0];\n        endPoint[1][0] += endPoint[0][0];\n        endPoint[1][1] += endPoint[0][0];\n    }\n}\nvoid start_unquantize( inout int2x3 endPoint, uint4 prec, bool transformed )\n{\n    sign_extend( transformed, prec, endPoint );\n    if ( transformed )\n        endPoint[1] += endPoint[0];\n}\nvoid unquantize( inout int2x3 color, uint prec )\n{\n    int iprec = asint( prec );\n    if (g_format == UNSIGNED_F16 )\n    {\n        if (prec < 15)\n        {\n            color = (color != 0) ? (color == ((1 << iprec) - 1) ? 0xFFFF : (((color << 16) + 0x8000) >> iprec)) : color;\n        }\n    }\n    else\n    {\n        if (prec < 16)\n        {\n            uint2x3 s = color >= 0 ? 0 : 1;\n            color = abs(color);\n            color = (color != 0) ? (color >= ((1 << (iprec - 1)) - 1) ? 0x7FFF : (((color << 15) + 0x4000) >> (iprec - 1))) : color;\n            color = s > 0 ? -color : color;\n        }\n    }\n}\nuint3 finish_unquantize( int3 color )\n{\n    if ( g_format == UNSIGNED_F16 )\n        color = ( color * 31 ) >> 6;\n    else\n    {\n        color = ( color < 0 ) ? -( ( -color * 31 ) >> 5 ) : ( color * 31 ) >> 5;\n        color = ( color < 0 ) ? ( ( -color ) | 0x8000 ) : color;\n    }\n    return asuint(color);\n}\nvoid generate_palette_unquantized8( out uint3 palette, int3 low, int3 high, int i )\n{\n    static const int aWeight3[] = {0, 9, 18, 27, 37, 46, 55, 64};\n    \n    int3 tmp = ( low * ( 64 - aWeight3[i] ) + high * aWeight3[i] + 32 ) >> 6;\n    palette = finish_unquantize( tmp );\n}\nvoid generate_palette_unquantized16( out uint3 palette, int3 low, int3 high, int i )\n{\n    static const int aWeight4[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64};\n    \n    int3 tmp = ( low * ( 64 - aWeight4[i] ) + high * aWeight4[i] + 32 ) >> 6;\n    palette = finish_unquantize( tmp );\n}\n\nfloat half2float1( uint Value )\n{\n    uint Mantissa = (uint)(Value & 0x03FF);\n\n    uint Exponent;\n    if ((Value & 0x7C00) != 0)  // The value is normalized\n    {\n        Exponent = (uint)((Value >> 10) & 0x1F);\n    }\n    else if (Mantissa != 0)     // The value is denormalized\n    {\n        // Normalize the value in the resulting float\n        Exponent = 1;\n\n        do\n        {\n            Exponent--;\n            Mantissa <<= 1;\n        } while ((Mantissa & 0x0400) == 0);\n\n        Mantissa &= 0x03FF;\n    }\n    else                        // The value is zero\n    {\n        Exponent = (uint)(-112);\n    }\n\n    uint Result = ((Value & 0x8000) << 16) | // Sign\n                      ((Exponent + 112) << 23) | // Exponent\n                      (Mantissa << 13);          // Mantissa\n\n    return asfloat(Result);\n}\n\nfloat3 half2float(uint3 color_h )\n{\n    //uint3 sign = color_h & 0x8000;\n    //uint3 expo = color_h & 0x7C00;\n    //uint3 base = color_h & 0x03FF;\n    //return ( expo == 0 ) ? asfloat( ( sign << 16 ) | asuint( float3(base) / 16777216 ) ) //16777216 = 2^24\n    //    : asfloat( ( sign << 16 ) | ( ( ( expo + 0x1C000 ) | base ) << 13 ) ); //0x1C000 = 0x1FC00 - 0x3C00\n\n    return float3( half2float1( color_h.x ), half2float1( color_h.y ), half2float1( color_h.z ) );\n}\n\nvoid block_package( inout uint4 block, int2x3 endPoint[2], uint mode_type, uint partition_index ) // for mode 1 - 10\n{\n    block.xy = 0;\n    block.z &= 0xFFFC0000;\n    \n    //block.z |= (partition_index & 0x1f) << 13;\n    \n    if ( mode_type == candidateModeFlag[0])\n    {\n        /*block.x = candidateModeMemory[0];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00007FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x01FF8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.x |= ( endPoint[1][0].g >> 2 ) & 0x00000004;\n        block.x |= ( endPoint[1][0].b >> 1 ) & 0x00000008;\n        block.x |= endPoint[1][1].b & 0x00000010;\n        block.y |= ( ( endPoint[0][0].b >> 7 ) & 0x00000007 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000000F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0003E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x0F800000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000003E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].g << 4 ) & 0x00000100 );\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000F80);\n        block.yz |= ( ( endPoint[1][1].b << uint2(27, 9) ) & uint2(0x10000000, 0x00001000) ) | ( ( endPoint[1][1].b << uint2(18, 4) ) & uint2(0x00040000, 0x00000040) );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[0] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[0] >> 1) & 1) << 1;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 2;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 3;\n        block.x |= ((endPoint[1][1].b >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0][0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0][0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0][0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0][0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0][0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0][0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1][1].g >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[1])\n    {\n        /*block.x = candidateModeMemory[1];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00000FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x003F8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000001F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0007E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x1F800000 );\n        block.x |= ( ( endPoint[1][0].g >> 3 ) & 0x00000004 ) | ( ( endPoint[1][0].g << 20 ) & 0x01000000 );\n        block.x |= ( endPoint[1][1].g >> 1 ) & 0x00000018;\n        block.x |= ( ( endPoint[1][1].b << 21 ) & 0x00800000 ) | ( ( endPoint[1][1].b << 12 ) & 0x00003000 );\n        block.x |= ( ( endPoint[1][0].b << 17 ) & 0x00400000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000007E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00001F80);\n        block.y |= ( ( endPoint[1][1].b >> 4 ) & 0x00000002 ) | ( ( endPoint[1][1].b >> 2 ) & 0x00000004 ) | ( ( endPoint[1][1].b >> 3 ) & 0x00000001 );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[1] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[1] >> 1) & 1) << 1;\n        block.x |= ((endPoint[1][0].g >> 5) & 1) << 2;\n        block.x |= ((endPoint[1][1].g >> 4) & 1) << 3;\n        block.x |= ((endPoint[1][1].g >> 5) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[1][1].b >> 0) & 1) << 12;\n        block.x |= ((endPoint[1][1].b >> 1) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[1][0].b >> 5) & 1) << 22;\n        block.x |= ((endPoint[1][1].b >> 2) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[1][1].b >> 3) & 1) << 0;\n        block.y |= ((endPoint[1][1].b >> 5) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[0][1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[0][1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[0][1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][0].r >> 5) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].r >> 5) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[2])\n    {\n        /*block.x = candidateModeMemory[2];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00007FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x01FF8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].r >> 2 ) & 0x00000100;\n        block.y |= ( endPoint[0][0].g << 7 ) & 0x00020000;\n        block.y |= ( ( endPoint[0][0].b << 17 ) & 0x08000000 ) | ( ( endPoint[0][0].b >> 7 ) & 0x00000007 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000000F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0001E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x07800000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000003E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000F80);\n        block.yz |= ( ( endPoint[1][1].b << uint2(27, 9) ) & uint2(0x10000000, 0x00001000) ) | ( ( endPoint[1][1].b << uint2(18, 4) ) & uint2(0x00040000, 0x00000040) );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[2] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[2] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[2] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[2] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[2] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0][0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0][0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0][0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0][0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0][0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0][0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[0][0].r >> 10) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][0].g >> 10) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][0].b >> 10) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[3])\n    {\n        /*block.x = candidateModeMemory[3];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00007FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x01FF8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].r >> 3 ) & 0x00000080;\n        block.y |= ( endPoint[0][0].g << 8 ) & 0x00040000;\n        block.y |= ( ( endPoint[0][0].b << 17 ) & 0x08000000 ) | ( ( endPoint[0][0].b >> 7 ) & 0x00000007 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x00000078 ) | ( ( endPoint[0][1].g << 13 ) & 0x0003E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x07800000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000001E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].g << 4 ) & 0x00000100 );\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000780);\n        block.yz |= ( endPoint[1][1].b << uint2(27, 9) ) & uint2(0x10000000, 0x00001000);\n        block.z |= ( ( endPoint[1][0].g << 7 ) & 0x00000800 );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;\n        block.z |= ( endPoint[1][1].b << 4 ) & 0x00000040;\n        block.z |= ( endPoint[1][1].b << 5 ) & 0x00000020;*/\n\n        block.x |= ((candidateModeMemory[3] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[3] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[3] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[3] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[3] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0][0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0][0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0][0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0][0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0][0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0][0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][0].r >> 10) & 1) << 7;\n        block.y |= ((endPoint[1][1].g >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[0][0].g >> 10) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][0].b >> 10) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][1].b >> 0) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][0].g >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[4])\n    {\n        /*block.x = candidateModeMemory[4];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00007FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x01FF8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].r >> 3 ) & 0x00000080;\n        block.y |= ( endPoint[0][0].g << 7 ) & 0x00020000;\n        block.y |= ( ( endPoint[0][0].b << 18 ) & 0x10000000 ) | ( ( endPoint[0][0].b >> 7 ) & 0x00000007 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x00000078 ) | ( ( endPoint[0][1].g << 13 ) & 0x0001E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x0F800000 );\n        block.y |= ( ( endPoint[1][0].g << 9 ) & 0x00001E00 ) | ( ( endPoint[1][0].b << 4 ) & 0x00000100 );\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000780);\n        block.yz |= ( endPoint[1][1].b << uint2(18, 4) ) & uint2(0x00040000, 0x00000060);\n        block.z |= ( endPoint[1][0].r << 1 ) & 0x0000001E;\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;\n        block.z |= ( ( endPoint[1][1].b << 7 ) & 0x00000800 ) | ( ( endPoint[1][1].b << 9 ) & 0x00001000 );*/\n\n        block.x |= ((candidateModeMemory[4] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[4] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[4] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[4] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[4] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0][0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0][0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0][0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0][0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0][0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0][0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][0].r >> 10) & 1) << 7;\n        block.y |= ((endPoint[1][0].b >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][0].g >> 10) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[0][0].b >> 10) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][1].b >> 1) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].b >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[5])\n    {\n        /*block.x = candidateModeMemory[5];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00003FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x00FF8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000);\n        block.y |= ( endPoint[0][0].b >> 7 ) & 0x00000003;\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000000F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0003E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x0F800000 );\n        block.x |= ( ( endPoint[1][0].g << 20 ) & 0x01000000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000003E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].g << 4 ) & 0x00000100 ) | ( ( endPoint[1][1].b >> 2 ) & 0x00000004 );\n        block.y |= ( ( endPoint[1][1].b << 27 ) & 0x10000000 );\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000F80);\n        block.yz |= ( endPoint[1][1].b << uint2(18, 4) ) & uint2(0x00040000, 0x00000040);\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;\n        block.z |= ( ( endPoint[1][1].b << 9 ) & 0x00001000 );*/\n\n        block.x |= ((candidateModeMemory[5] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[5] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[5] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[5] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[5] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0][0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0][0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0][0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1][1].g >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[6])\n    {\n        /*block.x = candidateModeMemory[6];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00001FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x007F8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].b >> 7 ) & 0x00000001;\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000001F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0003E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x0F800000 );\n        block.x |= ( ( endPoint[1][0].g << 20 ) & 0x01000000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000);\n        block.x |= ( ( endPoint[1][1].g << 9 ) & 0x00002000 ) | ( ( endPoint[1][1].b << 21 ) & 0x00800000);\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000007E);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00001F80);\n        block.y |= ( ( endPoint[1][1].b >> 2 ) & 0x00000006 );\n        block.y |= ( ( endPoint[1][1].b << 27 ) & 0x10000000 ) | ( ( endPoint[1][1].b << 18 ) & 0x00040000 );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[6] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[6] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[6] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[6] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[6] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[1][1].g >> 4) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[1][1].b >> 2) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[1][1].b >> 3) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[0][1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][0].r >> 5) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].r >> 5) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[7])\n    {\n        /*block.x = candidateModeMemory[7];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00001FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x007F8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].b >> 7 ) & 0x00000001;\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000000F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0007E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x0F800000 );\n        block.x |= ( ( endPoint[1][0].g << 20 ) & 0x01000000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000 );\n        block.x |= ( ( endPoint[1][0].g << 18 ) & 0x00800000 );\n        block.x |= ( ( endPoint[1][1].b << 13 ) & 0x00002000 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000003E);\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000F80);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].g >> 4 ) & 0x00000002 ) | ( ( endPoint[1][1].g << 4 ) & 0x00000100 ) | ( ( endPoint[1][1].b >> 2 ) & 0x00000004 );\n        block.y |= ( endPoint[1][1].b << 27 ) & 0x10000000;\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;\n        block.z |= ( ( endPoint[1][1].b << 9 ) & 0x00001000 ) | ( ( endPoint[1][1].b << 4 ) & 0x00000040 );*/\n\n        block.x |= ((candidateModeMemory[7] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[7] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[7] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[7] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[7] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[1][1].b >> 0) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[1][0].g >> 5) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[1][1].g >> 5) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1][1].g >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[0][1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1][1].b >> 1) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[8])\n    {\n        /*block.x = candidateModeMemory[8];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x00001FE0 ) | ( ( endPoint[0][0].g << 15 ) & 0x007F8000 ) | ( ( endPoint[0][0].b << 25 ) & 0xFE000000 );\n        block.y |= ( endPoint[0][0].b >> 7 ) & 0x00000001;\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000000F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0003E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x1F800000 );\n        block.x |= ( ( endPoint[1][0].g << 20 ) & 0x01000000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000 );\n        block.x |= ( ( endPoint[1][0].b << 18 ) & 0x00800000 );\n        block.x |= ( endPoint[1][1].b << 12 ) & 0x00002000;\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].g << 4 ) & 0x00000100 ) | ( ( endPoint[1][1].b >> 4 ) & 0x00000002 ) | ( ( endPoint[1][1].b >> 2 ) & 0x00000004 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000003E);\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00000F80);\n        block.y |= ( endPoint[1][1].b << 18 ) & 0x00040000;\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;\n        block.z |= ( ( endPoint[1][1].b << 9 ) & 0x00001000 ) | ( ( endPoint[1][1].b << 4 ) & 0x00000040 );*/\n\n        block.x |= ((candidateModeMemory[8] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[8] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[8] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[8] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[8] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0][0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0][0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[1][1].b >> 1) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0][0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0][0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[1][0].b >> 5) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0][0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0][0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[1][1].b >> 5) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1][1].g >> 4) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1][1].b >> 0) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[0][1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][1].b >> 2) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].b >> 3) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n    else if ( mode_type == candidateModeFlag[9])\n    {\n        /*block.x = candidateModeMemory[9];\n        block.x |= ( ( endPoint[0][0].r << 5 ) & 0x000007E0 ) | ( ( endPoint[0][0].g << 15 ) & 0x001F8000 ) | ( ( endPoint[0][0].b << 25 ) & 0x7E000000 );\n        block.y |= ( ( endPoint[0][1].r << 3 ) & 0x000001F8 ) | ( ( endPoint[0][1].g << 13 ) & 0x0007E000 ) | ( ( endPoint[0][1].b << 23 ) & 0x1F800000 );\n        block.x |= ( ( endPoint[1][0].g << 16 ) & 0x00200000 ) | ( ( endPoint[1][0].g << 20 ) & 0x01000000 );\n        block.x |= ( ( endPoint[1][0].b << 17 ) & 0x00400000 ) | ( ( endPoint[1][0].b << 10 ) & 0x00004000 );\n        block.x |= ( ( endPoint[1][1].b << 21 ) & 0x00800000 ) | ( ( endPoint[1][1].b << 12 ) & 0x00003000 );\n        block.x |= ( ( endPoint[1][1].g << 26 ) & 0x80000000 ) | ( ( endPoint[1][1].g << 7 ) & 0x00000800 );\n        block.yz |= ( endPoint[1][0].gr << uint2(9, 1) ) & uint2(0x00001E00, 0x0000007E);\n        block.yz |= ( endPoint[1][1].gr << uint2(19, 7) ) & uint2(0x00780000, 0x00001F80);\n        block.y |= ( endPoint[1][0].b << 29 ) & 0xE0000000;\n        block.y |= ( ( endPoint[1][1].b >> 4 ) & 0x00000002 ) | ( ( endPoint[1][1].b >> 2 ) & 0x00000004 ) | ( ( endPoint[1][1].b >> 3 ) & 0x00000001 );\n        block.z |= ( endPoint[1][0].b >> 3 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[9] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[9] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[9] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[9] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[9] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0][0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0][0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0][0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0][0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0][0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0][0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[1][1].g >> 4) & 1) << 11;\n        block.x |= ((endPoint[1][1].b >> 0) & 1) << 12;\n        block.x |= ((endPoint[1][1].b >> 1) & 1) << 13;\n        block.x |= ((endPoint[1][0].b >> 4) & 1) << 14;\n        block.x |= ((endPoint[0][0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0][0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0][0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0][0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0][0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0][0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[1][0].g >> 5) & 1) << 21;\n        block.x |= ((endPoint[1][0].b >> 5) & 1) << 22;\n        block.x |= ((endPoint[1][1].b >> 2) & 1) << 23;\n        block.x |= ((endPoint[1][0].g >> 4) & 1) << 24;\n        block.x |= ((endPoint[0][0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0][0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0][0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0][0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0][0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0][0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[1][1].g >> 5) & 1) << 31;\n        block.y |= ((endPoint[1][1].b >> 3) & 1) << 0;\n        block.y |= ((endPoint[1][1].b >> 5) & 1) << 1;\n        block.y |= ((endPoint[1][1].b >> 4) & 1) << 2;\n        block.y |= ((endPoint[0][1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[0][1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[0][1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[0][1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0][1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[0][1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1][0].g >> 0) & 1) << 9;\n        block.y |= ((endPoint[1][0].g >> 1) & 1) << 10;\n        block.y |= ((endPoint[1][0].g >> 2) & 1) << 11;\n        block.y |= ((endPoint[1][0].g >> 3) & 1) << 12;\n        block.y |= ((endPoint[0][1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[0][1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[0][1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[0][1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0][1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[0][1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1][1].g >> 0) & 1) << 19;\n        block.y |= ((endPoint[1][1].g >> 1) & 1) << 20;\n        block.y |= ((endPoint[1][1].g >> 2) & 1) << 21;\n        block.y |= ((endPoint[1][1].g >> 3) & 1) << 22;\n        block.y |= ((endPoint[0][1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[0][1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[0][1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[0][1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0][1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[0][1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1][0].b >> 0) & 1) << 29;\n        block.y |= ((endPoint[1][0].b >> 1) & 1) << 30;\n        block.y |= ((endPoint[1][0].b >> 2) & 1) << 31;\n        block.z |= ((endPoint[1][0].b >> 3) & 1) << 0;\n        block.z |= ((endPoint[1][0].r >> 0) & 1) << 1;\n        block.z |= ((endPoint[1][0].r >> 1) & 1) << 2;\n        block.z |= ((endPoint[1][0].r >> 2) & 1) << 3;\n        block.z |= ((endPoint[1][0].r >> 3) & 1) << 4;\n        block.z |= ((endPoint[1][0].r >> 4) & 1) << 5;\n        block.z |= ((endPoint[1][0].r >> 5) & 1) << 6;\n        block.z |= ((endPoint[1][1].r >> 0) & 1) << 7;\n        block.z |= ((endPoint[1][1].r >> 1) & 1) << 8;\n        block.z |= ((endPoint[1][1].r >> 2) & 1) << 9;\n        block.z |= ((endPoint[1][1].r >> 3) & 1) << 10;\n        block.z |= ((endPoint[1][1].r >> 4) & 1) << 11;\n        block.z |= ((endPoint[1][1].r >> 5) & 1) << 12;\n        block.z |= ((partition_index >> 0) & 1) << 13;\n        block.z |= ((partition_index >> 1) & 1) << 14;\n        block.z |= ((partition_index >> 2) & 1) << 15;\n        block.z |= ((partition_index >> 3) & 1) << 16;\n        block.z |= ((partition_index >> 4) & 1) << 17;\n    }\n}\nvoid block_package( inout uint4 block, int2x3 endPoint, uint mode_type ) // for mode 11 - 14\n{\n    /*block.x = ( ( endPoint[0].r << 5 ) & 0x00007FE0 ) | ( ( endPoint[0].g << 15 ) & 0x01FF8000 ) | ( ( endPoint[0].b << 25 ) & 0xFE000000 );\n    block.y |= ( endPoint[0].b >> 7 ) & 0x00000007;*/\n\n    block.xy = 0;\n    block.z &= 0xFFFFFFFE;\n\n\n    if ( mode_type == candidateModeFlag[10])\n    {\n       /* block.x |= candidateModeMemory[10];\n        block.y |= ( ( endPoint[1].r << 3 ) & 0x00001FF8 ) | ( ( endPoint[1].g << 13 ) & 0x007FE000 ) | ( ( endPoint[1].b << 23 ) & 0xFF800000 );\n        block.z |= ( endPoint[1].b >> 9 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[10] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[10] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[10] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[10] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[10] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1].r >> 6) & 1) << 9;\n        block.y |= ((endPoint[1].r >> 7) & 1) << 10;\n        block.y |= ((endPoint[1].r >> 8) & 1) << 11;\n        block.y |= ((endPoint[1].r >> 9) & 1) << 12;\n        block.y |= ((endPoint[1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1].g >> 6) & 1) << 19;\n        block.y |= ((endPoint[1].g >> 7) & 1) << 20;\n        block.y |= ((endPoint[1].g >> 8) & 1) << 21;\n        block.y |= ((endPoint[1].g >> 9) & 1) << 22;\n        block.y |= ((endPoint[1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1].b >> 6) & 1) << 29;\n        block.y |= ((endPoint[1].b >> 7) & 1) << 30;\n        block.y |= ((endPoint[1].b >> 8) & 1) << 31;\n        block.z |= ((endPoint[1].b >> 9) & 1) << 0;\n    }\n    else if (mode_type == candidateModeFlag[11])\n    {\n        /*block.x |= candidateModeMemory[11];\n        block.y |= ( ( endPoint[0].r << 2 ) & 0x00001000 ) | ( ( endPoint[0].g << 12 ) & 0x00400000 );\n        block.y |= ( ( endPoint[1].r << 3 ) & 0x00000FF8 ) | ( ( endPoint[1].g << 13 ) & 0x003FE000 ) | ( ( endPoint[1].b << 23 ) & 0xFF800000 );\n        block.z |= ( endPoint[0].b >> 10 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[11] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[11] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[11] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[11] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[11] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1].r >> 6) & 1) << 9;\n        block.y |= ((endPoint[1].r >> 7) & 1) << 10;\n        block.y |= ((endPoint[1].r >> 8) & 1) << 11;\n        block.y |= ((endPoint[0].r >> 10) & 1) << 12;\n        block.y |= ((endPoint[1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1].g >> 6) & 1) << 19;\n        block.y |= ((endPoint[1].g >> 7) & 1) << 20;\n        block.y |= ((endPoint[1].g >> 8) & 1) << 21;\n        block.y |= ((endPoint[0].g >> 10) & 1) << 22;\n        block.y |= ((endPoint[1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1].b >> 6) & 1) << 29;\n        block.y |= ((endPoint[1].b >> 7) & 1) << 30;\n        block.y |= ((endPoint[1].b >> 8) & 1) << 31;\n        block.z |= ((endPoint[0].b >> 10) & 1) << 0;\n    }\n    else if (mode_type == candidateModeFlag[12])// violate the spec in  [0].low\n    {\n        /*block.x |= candidateModeMemory[12];\n        block.y |= ( ( endPoint[0].r << 2 ) & 0x00001000 ) | ( ( endPoint[0].g << 12 ) & 0x00400000 );\n        block.y |= ( ( endPoint[0].r << 0 ) & 0x00000800 ) | ( ( endPoint[0].g << 10 ) & 0x00200000 );\n        block.y |= ( endPoint[0].b << 20 ) & 0x80000000;\n        block.y |= ( ( endPoint[1].r << 3 ) & 0x000007F8 ) | ( ( endPoint[1].g << 13 ) & 0x001FE000 ) | ( ( endPoint[1].b << 23 ) & 0x7F800000 );\n        block.z |= ( endPoint[0].b >> 10 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[12] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[12] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[12] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[12] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[12] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[1].r >> 4) & 1) << 7;\n        block.y |= ((endPoint[1].r >> 5) & 1) << 8;\n        block.y |= ((endPoint[1].r >> 6) & 1) << 9;\n        block.y |= ((endPoint[1].r >> 7) & 1) << 10;\n        block.y |= ((endPoint[0].r >> 11) & 1) << 11;\n        block.y |= ((endPoint[0].r >> 10) & 1) << 12;\n        block.y |= ((endPoint[1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[1].g >> 4) & 1) << 17;\n        block.y |= ((endPoint[1].g >> 5) & 1) << 18;\n        block.y |= ((endPoint[1].g >> 6) & 1) << 19;\n        block.y |= ((endPoint[1].g >> 7) & 1) << 20;\n        block.y |= ((endPoint[0].g >> 11) & 1) << 21;\n        block.y |= ((endPoint[0].g >> 10) & 1) << 22;\n        block.y |= ((endPoint[1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[1].b >> 4) & 1) << 27;\n        block.y |= ((endPoint[1].b >> 5) & 1) << 28;\n        block.y |= ((endPoint[1].b >> 6) & 1) << 29;\n        block.y |= ((endPoint[1].b >> 7) & 1) << 30;\n        block.y |= ((endPoint[0].b >> 11) & 1) << 31;\n        block.z |= ((endPoint[0].b >> 10) & 1) << 0;\n    }\n    else if (mode_type == candidateModeFlag[13])\n    {\n        /*block.x |= candidateModeMemory[13];\n        block.y |= ( ( endPoint[0].r >> 8 ) & 0x00000080 );\n        block.y |= ( ( endPoint[0].r >> 6 ) & 0x00000100 );\n        block.y |= ( ( endPoint[0].r >> 4 ) & 0x00000200 );\n        block.y |= ( ( endPoint[0].r >> 2 ) & 0x00000400 );\n        block.y |= ( ( endPoint[0].r >> 0 ) & 0x00000800 );\n        block.y |= ( ( endPoint[0].r << 2 ) & 0x00001000 );\n        block.y |= ( ( endPoint[0].g << 2 ) & 0x00020000 );\n        block.y |= ( ( endPoint[0].g << 4 ) & 0x00040000 );\n        block.y |= ( ( endPoint[0].g << 6 ) & 0x00080000 );\n        block.y |= ( ( endPoint[0].g << 8 ) & 0x00100000 );\n        block.y |= ( ( endPoint[0].g << 10 ) & 0x00200000 );\n        block.y |= ( ( endPoint[0].g << 12 ) & 0x00400000 );\n        block.y |= ( ( endPoint[0].b << 12 ) & 0x08000000 );\n        block.y |= ( ( endPoint[0].b << 14 ) & 0x10000000 );\n        block.y |= ( ( endPoint[0].b << 16 ) & 0x20000000 );\n        block.y |= ( ( endPoint[0].b << 18 ) & 0x40000000 );\n        block.y |= ( ( endPoint[0].b << 20 ) & 0x80000000 );\n        block.y |= ( ( endPoint[1].r << 3 ) & 0x00000078 ) | ( ( endPoint[1].g << 13 ) & 0x0001E000 ) | ( ( endPoint[1].b << 23 ) & 0x07800000 );        \n        block.z |= ( endPoint[0].b >> 10 ) & 0x00000001;*/\n\n        block.x |= ((candidateModeMemory[13] >> 0) & 1) << 0;\n        block.x |= ((candidateModeMemory[13] >> 1) & 1) << 1;\n        block.x |= ((candidateModeMemory[13] >> 2) & 1) << 2;\n        block.x |= ((candidateModeMemory[13] >> 3) & 1) << 3;\n        block.x |= ((candidateModeMemory[13] >> 4) & 1) << 4;\n        block.x |= ((endPoint[0].r >> 0) & 1) << 5;\n        block.x |= ((endPoint[0].r >> 1) & 1) << 6;\n        block.x |= ((endPoint[0].r >> 2) & 1) << 7;\n        block.x |= ((endPoint[0].r >> 3) & 1) << 8;\n        block.x |= ((endPoint[0].r >> 4) & 1) << 9;\n        block.x |= ((endPoint[0].r >> 5) & 1) << 10;\n        block.x |= ((endPoint[0].r >> 6) & 1) << 11;\n        block.x |= ((endPoint[0].r >> 7) & 1) << 12;\n        block.x |= ((endPoint[0].r >> 8) & 1) << 13;\n        block.x |= ((endPoint[0].r >> 9) & 1) << 14;\n        block.x |= ((endPoint[0].g >> 0) & 1) << 15;\n        block.x |= ((endPoint[0].g >> 1) & 1) << 16;\n        block.x |= ((endPoint[0].g >> 2) & 1) << 17;\n        block.x |= ((endPoint[0].g >> 3) & 1) << 18;\n        block.x |= ((endPoint[0].g >> 4) & 1) << 19;\n        block.x |= ((endPoint[0].g >> 5) & 1) << 20;\n        block.x |= ((endPoint[0].g >> 6) & 1) << 21;\n        block.x |= ((endPoint[0].g >> 7) & 1) << 22;\n        block.x |= ((endPoint[0].g >> 8) & 1) << 23;\n        block.x |= ((endPoint[0].g >> 9) & 1) << 24;\n        block.x |= ((endPoint[0].b >> 0) & 1) << 25;\n        block.x |= ((endPoint[0].b >> 1) & 1) << 26;\n        block.x |= ((endPoint[0].b >> 2) & 1) << 27;\n        block.x |= ((endPoint[0].b >> 3) & 1) << 28;\n        block.x |= ((endPoint[0].b >> 4) & 1) << 29;\n        block.x |= ((endPoint[0].b >> 5) & 1) << 30;\n        block.x |= ((endPoint[0].b >> 6) & 1) << 31;\n        block.y |= ((endPoint[0].b >> 7) & 1) << 0;\n        block.y |= ((endPoint[0].b >> 8) & 1) << 1;\n        block.y |= ((endPoint[0].b >> 9) & 1) << 2;\n        block.y |= ((endPoint[1].r >> 0) & 1) << 3;\n        block.y |= ((endPoint[1].r >> 1) & 1) << 4;\n        block.y |= ((endPoint[1].r >> 2) & 1) << 5;\n        block.y |= ((endPoint[1].r >> 3) & 1) << 6;\n        block.y |= ((endPoint[0].r >> 15) & 1) << 7;\n        block.y |= ((endPoint[0].r >> 14) & 1) << 8;\n        block.y |= ((endPoint[0].r >> 13) & 1) << 9;\n        block.y |= ((endPoint[0].r >> 12) & 1) << 10;\n        block.y |= ((endPoint[0].r >> 11) & 1) << 11;\n        block.y |= ((endPoint[0].r >> 10) & 1) << 12;\n        block.y |= ((endPoint[1].g >> 0) & 1) << 13;\n        block.y |= ((endPoint[1].g >> 1) & 1) << 14;\n        block.y |= ((endPoint[1].g >> 2) & 1) << 15;\n        block.y |= ((endPoint[1].g >> 3) & 1) << 16;\n        block.y |= ((endPoint[0].g >> 15) & 1) << 17;\n        block.y |= ((endPoint[0].g >> 14) & 1) << 18;\n        block.y |= ((endPoint[0].g >> 13) & 1) << 19;\n        block.y |= ((endPoint[0].g >> 12) & 1) << 20;\n        block.y |= ((endPoint[0].g >> 11) & 1) << 21;\n        block.y |= ((endPoint[0].g >> 10) & 1) << 22;\n        block.y |= ((endPoint[1].b >> 0) & 1) << 23;\n        block.y |= ((endPoint[1].b >> 1) & 1) << 24;\n        block.y |= ((endPoint[1].b >> 2) & 1) << 25;\n        block.y |= ((endPoint[1].b >> 3) & 1) << 26;\n        block.y |= ((endPoint[0].b >> 15) & 1) << 27;\n        block.y |= ((endPoint[0].b >> 14) & 1) << 28;\n        block.y |= ((endPoint[0].b >> 13) & 1) << 29;\n        block.y |= ((endPoint[0].b >> 12) & 1) << 30;\n        block.y |= ((endPoint[0].b >> 11) & 1) << 31;\n        block.z |= ((endPoint[0].b >> 10) & 1) << 0;\n    }\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/BC7Encode.hlsl",
    "content": "//--------------------------------------------------------------------------------------\n// File: BC7Encode.hlsl\n//\n// The Compute Shader for BC7 Encoder\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n//#define REF_DEVICE\n\n#define CHAR_LENGTH\t\t\t8\n#define NCHANNELS\t\t\t4\n#define\tBC7_UNORM\t\t\t98\n#define MAX_UINT\t\t\t0xFFFFFFFF\n#define MIN_UINT\t\t\t0\n\nstatic const uint candidateSectionBit[64] = //Associated to partition 0-63\n{\n    0xCCCC, 0x8888, 0xEEEE, 0xECC8,\n    0xC880, 0xFEEC, 0xFEC8, 0xEC80,\n    0xC800, 0xFFEC, 0xFE80, 0xE800,\n    0xFFE8, 0xFF00, 0xFFF0, 0xF000,\n    0xF710, 0x008E, 0x7100, 0x08CE,\n    0x008C, 0x7310, 0x3100, 0x8CCE,\n    0x088C, 0x3110, 0x6666, 0x366C,\n    0x17E8, 0x0FF0, 0x718E, 0x399C,\n    0xaaaa, 0xf0f0, 0x5a5a, 0x33cc, \n    0x3c3c, 0x55aa, 0x9696, 0xa55a, \n    0x73ce, 0x13c8, 0x324c, 0x3bdc, \n    0x6996, 0xc33c, 0x9966, 0x660, \n    0x272, 0x4e4, 0x4e40, 0x2720, \n    0xc936, 0x936c, 0x39c6, 0x639c, \n    0x9336, 0x9cc6, 0x817e, 0xe718, \n    0xccf0, 0xfcc, 0x7744, 0xee22, \n};\nstatic const uint candidateSectionBit2[64] = //Associated to partition 64-127\n{\n    0xaa685050, 0x6a5a5040, 0x5a5a4200, 0x5450a0a8,\n    0xa5a50000, 0xa0a05050, 0x5555a0a0, 0x5a5a5050,\n    0xaa550000, 0xaa555500, 0xaaaa5500, 0x90909090,\n    0x94949494, 0xa4a4a4a4, 0xa9a59450, 0x2a0a4250,\n    0xa5945040, 0x0a425054, 0xa5a5a500, 0x55a0a0a0,\n    0xa8a85454, 0x6a6a4040, 0xa4a45000, 0x1a1a0500,\n    0x0050a4a4, 0xaaa59090, 0x14696914, 0x69691400,\n    0xa08585a0, 0xaa821414, 0x50a4a450, 0x6a5a0200,\n    0xa9a58000, 0x5090a0a8, 0xa8a09050, 0x24242424,\n    0x00aa5500, 0x24924924, 0x24499224, 0x50a50a50,\n    0x500aa550, 0xaaaa4444, 0x66660000, 0xa5a0a5a0,\n    0x50a050a0, 0x69286928, 0x44aaaa44, 0x66666600,\n    0xaa444444, 0x54a854a8, 0x95809580, 0x96969600,\n    0xa85454a8, 0x80959580, 0xaa141414, 0x96960000,\n    0xaaaa1414, 0xa05050a0, 0xa0a5a5a0, 0x96000000,\n    0x40804080, 0xa9a8a9a8, 0xaaaaaa44, 0x2a4a5254,\n};\nstatic const uint2 candidateFixUpIndex1D[128] = \n{\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{ 2, 0},{ 8, 0},{ 2, 0},\n    { 2, 0},{ 8, 0},{ 8, 0},{15, 0},\n    { 2, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    { 8, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    \n    {15, 0},{15, 0},{ 6, 0},{ 8, 0},\n    { 2, 0},{ 8, 0},{15, 0},{15, 0},\n    { 2, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    { 2, 0},{15, 0},{15, 0},{ 6, 0},\n    { 6, 0},{ 2, 0},{ 6, 0},{ 8, 0},\n    {15, 0},{15, 0},{ 2, 0},{ 2, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{ 2, 0},{ 2, 0},{15, 0},\n    //candidateFixUpIndex1D[i][1], i < 64 should not be used\n    \n    { 3,15},{ 3, 8},{15, 8},{15, 3},\n    { 8,15},{ 3,15},{15, 3},{15, 8},\n    { 8,15},{ 8,15},{ 6,15},{ 6,15},\n    { 6,15},{ 5,15},{ 3,15},{ 3, 8},\n    { 3,15},{ 3, 8},{ 8,15},{15, 3},\n    { 3,15},{ 3, 8},{ 6,15},{10, 8},\n    { 5, 3},{ 8,15},{ 8, 6},{ 6,10},\n    { 8,15},{ 5,15},{15,10},{15, 8},\n    \n    { 8,15},{15, 3},{ 3,15},{ 5,10},\n    { 6,10},{10, 8},{ 8, 9},{15,10},\n    {15, 6},{ 3,15},{15, 8},{ 5,15},\n    {15, 3},{15, 6},{15, 6},{15, 8}, //The Spec doesn't mark the first fixed up index in this row, so I apply 15 for them, and seems correct\n    { 3,15},{15, 3},{ 5,15},{ 5,15},\n    { 5,15},{ 8,15},{ 5,15},{10,15},\n    { 5,15},{10,15},{ 8,15},{13,15},\n    {15, 3},{12,15},{ 3,15},{ 3, 8},\n};\nstatic const uint2 candidateFixUpIndex1DOrdered[128] = //Same with candidateFixUpIndex1D but order the result when i >= 64\n{\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{ 2, 0},{ 8, 0},{ 2, 0},\n    { 2, 0},{ 8, 0},{ 8, 0},{15, 0},\n    { 2, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    { 8, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    \n    {15, 0},{15, 0},{ 6, 0},{ 8, 0},\n    { 2, 0},{ 8, 0},{15, 0},{15, 0},\n    { 2, 0},{ 8, 0},{ 2, 0},{ 2, 0},\n    { 2, 0},{15, 0},{15, 0},{ 6, 0},\n    { 6, 0},{ 2, 0},{ 6, 0},{ 8, 0},\n    {15, 0},{15, 0},{ 2, 0},{ 2, 0},\n    {15, 0},{15, 0},{15, 0},{15, 0},\n    {15, 0},{ 2, 0},{ 2, 0},{15, 0},\n    //candidateFixUpIndex1DOrdered[i][1], i < 64 should not be used\n    \n    { 3,15},{ 3, 8},{ 8,15},{ 3,15},\n    { 8,15},{ 3,15},{ 3,15},{ 8,15},\n    { 8,15},{ 8,15},{ 6,15},{ 6,15},\n    { 6,15},{ 5,15},{ 3,15},{ 3, 8},\n    { 3,15},{ 3, 8},{ 8,15},{ 3,15},\n    { 3,15},{ 3, 8},{ 6,15},{ 8,10},\n    { 3, 5},{ 8,15},{ 6, 8},{ 6,10},\n    { 8,15},{ 5,15},{10,15},{ 8,15},\n    \n    { 8,15},{ 3,15},{ 3,15},{ 5,10},\n    { 6,10},{ 8,10},{ 8, 9},{10,15},\n    { 6,15},{ 3,15},{ 8,15},{ 5,15},\n    { 3,15},{ 6,15},{ 6,15},{ 8,15}, //The Spec doesn't mark the first fixed up index in this row, so I apply 15 for them, and seems correct\n    { 3,15},{ 3,15},{ 5,15},{ 5,15},\n    { 5,15},{ 8,15},{ 5,15},{10,15},\n    { 5,15},{10,15},{ 8,15},{13,15},\n    { 3,15},{12,15},{ 3,15},{ 3, 8},\n};\n//static const uint4x4 candidateRotation[4] = \n//{\n//    {1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1},\n//    {0,0,0,1},{0,1,0,0},{0,0,1,0},{1,0,0,0},\n//    {1,0,0,0},{0,0,0,1},{0,0,1,0},{0,1,0,0},\n//    {1,0,0,0},{0,1,0,0},{0,0,0,1},{0,0,1,0}\n//};\n//static const uint2 candidateIndexPrec[8] = {{3,0},{3,0},{2,0},{2,0},\n//                                            {2,3}, //color index and alpha index can exchange\n//                                            {2,2},{4,4},{2,2}};\n\nstatic const uint aWeight[3][16] = { {0,  4,  9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64},\n                                    {0,  9, 18, 27, 37, 46, 55, 64,  0,  0,  0,  0,  0,  0,  0,  0},\n                                    {0, 21, 43, 64,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0} };\n\n                                //4 bit index: 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64\nstatic const uint aStep[3][64] = {  { 0, 0, 0, 1, 1, 1, 1, 2,\n                                    2, 2, 2, 2, 3, 3, 3, 3,\n                                    4, 4, 4, 4, 5, 5, 5, 5,\n                                    6, 6, 6, 6, 6, 7, 7, 7,\n                                    7, 8, 8, 8, 8, 9, 9, 9,\n                                    9,10,10,10,10,10,11,11,\n                                   11,11,12,12,12,12,13,13,\n                                   13,13,14,14,14,14,15,15 },\n                                //3 bit index: 0, 9, 18, 27, 37, 46, 55, 64\n                                    { 0,0,0,0,0,1,1,1,\n                                    1,1,1,1,1,1,2,2,\n                                    2,2,2,2,2,2,2,3,\n                                    3,3,3,3,3,3,3,3,\n                                    3,4,4,4,4,4,4,4,\n                                    4,4,5,5,5,5,5,5,\n                                    5,5,5,6,6,6,6,6,\n                                    6,6,6,6,7,7,7,7 },\n                                //2 bit index: 0, 21, 43, 64\n                                    { 0,0,0,0,0,0,0,0,\n                                    0,0,0,1,1,1,1,1,\n                                    1,1,1,1,1,1,1,1,\n                                    1,1,1,1,1,1,1,1,\n                                    1,2,2,2,2,2,2,2,\n                                    2,2,2,2,2,2,2,2,\n                                    2,2,2,2,2,2,3,3,\n                                    3,3,3,3,3,3,3,3 } };\n\ncbuffer cbCS : register( b0 )\n{\n    uint g_tex_width;\n    uint g_num_block_x;\n    uint g_format;\n    uint g_mode_id;\n    uint g_start_block_id;\n    uint g_num_total_blocks;\n    float g_alpha_weight;\n};\n\n//Forward declaration\nuint2x4 compress_endpoints0( inout uint2x4 endPoint, uint2 P ); //Mode = 0\nuint2x4 compress_endpoints1( inout uint2x4 endPoint, uint2 P ); //Mode = 1\nuint2x4 compress_endpoints2( inout uint2x4 endPoint ); //Mode = 2\nuint2x4 compress_endpoints3( inout uint2x4 endPoint, uint2 P ); //Mode = 3\nuint2x4 compress_endpoints7( inout uint2x4 endPoint, uint2 P ); //Mode = 7\nuint2x4 compress_endpoints6( inout uint2x4 endPoint, uint2 P ); //Mode = 6\nuint2x4 compress_endpoints4( inout uint2x4 endPoint ); //Mode = 4\nuint2x4 compress_endpoints5( inout uint2x4 endPoint ); //Mode = 5\n\nvoid block_package0( out uint4 block, uint partition, uint threadBase ); //Mode0\nvoid block_package1( out uint4 block, uint partition, uint threadBase ); //Mode1\nvoid block_package2( out uint4 block, uint partition, uint threadBase ); //Mode2\nvoid block_package3( out uint4 block, uint partition, uint threadBase ); //Mode3\nvoid block_package4( out uint4 block, uint rotation, uint index_selector, uint threadBase ); //Mode4\nvoid block_package5( out uint4 block, uint rotation, uint threadBase ); //Mode5\nvoid block_package6( out uint4 block, uint threadBase ); //Mode6\nvoid block_package7( out uint4 block, uint partition, uint threadBase ); //Mode7\n\n\nvoid swap(inout uint4 lhs, inout uint4 rhs)\n{\n    uint4 tmp = lhs;\n    lhs = rhs;\n    rhs = tmp;\n}\nvoid swap(inout uint3 lhs, inout uint3 rhs)\n{\n    uint3 tmp = lhs;\n    lhs = rhs;\n    rhs = tmp;\n}\nvoid swap(inout uint lhs, inout uint rhs)\n{\n    uint tmp = lhs;\n    lhs = rhs;\n    rhs = tmp;\n}\n\nuint ComputeError(in uint4 a, in uint4 b)\n{\t\t\n\treturn dot(a.rgb, b.rgb) + g_alpha_weight * a.a*b.a;\n}\n\nvoid Ensure_A_Is_Larger( inout uint4 a, inout uint4 b )\n{\n    if ( a.x < b.x )\n        swap( a.x, b.x );\n    if ( a.y < b.y )\n        swap( a.y, b.y );\n    if ( a.z < b.z )\n        swap( a.z, b.z );\n    if ( a.w < b.w )\n        swap( a.w, b.w );\n}\n\n\nTexture2D g_Input : register( t0 ); \nStructuredBuffer<uint4> g_InBuff : register( t1 );\n\nRWStructuredBuffer<uint4> g_OutBuff : register( u0 );\n\n#define THREAD_GROUP_SIZE\t64\n#define BLOCK_SIZE_Y\t\t4\n#define BLOCK_SIZE_X\t\t4\n#define BLOCK_SIZE\t\t\t(BLOCK_SIZE_Y * BLOCK_SIZE_X)\n\nstruct BufferShared\n{\n    uint4 pixel;\n    uint error;\n    uint mode;\n    uint partition;\n    uint index_selector;\n    uint rotation;\n    uint4 endPoint_low;\n    uint4 endPoint_high;\n    uint4 endPoint_low_quantized;\n    uint4 endPoint_high_quantized;\n};\ngroupshared BufferShared shared_temp[THREAD_GROUP_SIZE];\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid TryMode456CS( uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID ) // mode 4 5 6 all have 1 subset per block, and fix-up index is always index 0\n{\n    // we process 4 BC blocks per thread group\n    const uint MAX_USED_THREAD = 16;                                                // pixels in a BC (block compressed) block\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;                      // the number of BC blocks a thread group processes = 64 / 16 = 4\n    uint blockInGroup = GI / MAX_USED_THREAD;                                       // what BC block this thread is on within this thread group\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;    // what global BC block this thread is on\n    uint threadBase = blockInGroup * MAX_USED_THREAD;                               // the first id of the pixel in this BC block in this thread group\n    uint threadInBlock = GI - threadBase;                                           // id of the pixel in this BC block\n\n#ifndef REF_DEVICE\n    if (blockID >= g_num_total_blocks)\n    {\n        return;\n    }\n#endif\n\n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = clamp(uint4(g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ) * 255), 0, 255);\n\n        shared_temp[GI].endPoint_low = shared_temp[GI].pixel;\n        shared_temp[GI].endPoint_high = shared_temp[GI].pixel;\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 8)\n    {\n        shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 8].endPoint_low);\n        shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 8].endPoint_high);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 4].endPoint_low);\n        shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 4].endPoint_high);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 2].endPoint_low);\n        shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 2].endPoint_high);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 1].endPoint_low);\n        shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 1].endPoint_high);\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    uint2x4 endPoint;\n    endPoint[0] = shared_temp[threadBase].endPoint_low;\n    endPoint[1] = shared_temp[threadBase].endPoint_high;\n\n    uint error = 0xFFFFFFFF;\n    uint mode = 0;\n    uint index_selector = 0;\n    uint rotation = 0;\n\n    uint2 indexPrec;\n    if (threadInBlock < 8) // all threads of threadInBlock < 8 will be working on trying out mode 4, since only mode 4 has index selector bit\n    {\n        if (0 == (threadInBlock & 1)) // thread 0, 2, 4, 6\n        {\n            //2 represents 2bit index precision; 1 represents 3bit index precision\n            index_selector = 0;\n            indexPrec = uint2( 2, 1 );\n        }\n        else                          // thread 1, 3, 5, 7\n        {\n            //2 represents 2bit index precision; 1 represents 3bit index precision\n            index_selector = 1;\n            indexPrec = uint2( 1, 2 );\n        }\n    }\n    else\n    {\n         //2 represents 2bit index precision\n        indexPrec = uint2( 2, 2 );\n    }\n\n    uint4 pixel_r;\n    uint color_index;\n    uint alpha_index;\n    int4 span;\n    int2 span_norm_sqr;\n    int2 dotProduct;\n    if (threadInBlock < 12) // Try mode 4 5 in threads 0..11\n    {\n        // mode 4 5 have component rotation\n        if ((threadInBlock < 2) || (8 == threadInBlock))       // rotation = 0 in thread 0, 1\n        {\n            rotation = 0;\n        }\n        else if ((threadInBlock < 4) || (9 == threadInBlock))  // rotation = 1 in thread 2, 3\n        {\n            endPoint[0].ra = endPoint[0].ar;\n            endPoint[1].ra = endPoint[1].ar;\n\n            rotation = 1;\n        }\n        else if ((threadInBlock < 6) || (10 == threadInBlock)) // rotation = 2 in thread 4, 5\n        {\n            endPoint[0].ga = endPoint[0].ag;\n            endPoint[1].ga = endPoint[1].ag;\n\n            rotation = 2;\n        }\n        else if ((threadInBlock < 8) || (11 == threadInBlock)) // rotation = 3 in thread 6, 7\n        {\n            endPoint[0].ba = endPoint[0].ab;\n            endPoint[1].ba = endPoint[1].ab;\n\n            rotation = 3;\n        }\n\n        if (threadInBlock < 8)  // try mode 4 in threads 0..7\n        {\n            // mode 4 thread distribution\n            // Thread           0\t1\t2\t3\t4\t5\t6\t7\n            // Rotation\t        0\t0\t1\t1\t2\t2\t3\t3\n            // Index selector   0\t1\t0\t1\t0\t1\t0\t1\n\n            mode = 4;\n            compress_endpoints4( endPoint );\n        }\n        else                    // try mode 5 in threads 8..11\n        {\n            // mode 5 thread distribution\n            // Thread\t 8\t9  10  11\n            // Rotation\t 0\t1   2   3\n\n            mode = 5;\n            compress_endpoints5( endPoint );\n        }\n\n        uint4 pixel = shared_temp[threadBase + 0].pixel;\n        if (1 == rotation)\n        {\n            pixel.ra = pixel.ar;\n        }\n        else if (2 == rotation)\n        {\n            pixel.ga = pixel.ag;\n        }\n        else if (3 == rotation)\n        {\n            pixel.ba = pixel.ab;\n        }\n\n        span = endPoint[1] - endPoint[0];\n        span_norm_sqr = uint2( dot( span.rgb, span.rgb ), span.a * span.a );\n        \n        // in mode 4 5 6, end point 0 must be closer to pixel 0 than end point 1, because of the fix-up index is always index 0\n        // TODO: this shouldn't be necessary here in error calculation\n        /*\n        dotProduct = int2( dot( span.rgb, pixel.rgb - endPoint[0].rgb ), span.a * ( pixel.a - endPoint[0].a ) );\n        if ( span_norm_sqr.x > 0 && dotProduct.x > 0 && uint( dotProduct.x * 63.49999 ) > uint( 32 * span_norm_sqr.x ) )\n        {\n            span.rgb = -span.rgb;\n            swap(endPoint[0].rgb, endPoint[1].rgb);\n        }\n        if ( span_norm_sqr.y > 0 && dotProduct.y > 0 && uint( dotProduct.y * 63.49999 ) > uint( 32 * span_norm_sqr.y ) )\n        {\n            span.a = -span.a;\n            swap(endPoint[0].a, endPoint[1].a);\n        }\n        */\n\t\n        // should be the same as above\n        dotProduct = int2( dot( pixel.rgb - endPoint[0].rgb, pixel.rgb - endPoint[0].rgb ), dot( pixel.rgb - endPoint[1].rgb, pixel.rgb - endPoint[1].rgb ) );\n        if ( dotProduct.x > dotProduct.y )\n        {\n            span.rgb = -span.rgb;\n            swap(endPoint[0].rgb, endPoint[1].rgb);\n        }\n        dotProduct = int2( dot( pixel.a - endPoint[0].a, pixel.a - endPoint[0].a ), dot( pixel.a - endPoint[1].a, pixel.a - endPoint[1].a ) );\n        if ( dotProduct.x > dotProduct.y )\n        {\n            span.a = -span.a;\n            swap(endPoint[0].a, endPoint[1].a);\n        }\n\n        error = 0;\n        for ( uint i = 0; i < 16; i ++ )\n        {\n            pixel = shared_temp[threadBase + i].pixel;\n            if (1 == rotation)\n            {\n                pixel.ra = pixel.ar;\n            }\n            else if (2 == rotation)\n            {\n                pixel.ga = pixel.ag;\n            }\n            else if (3 == rotation)\n            {\n                pixel.ba = pixel.ab;\n            }\n\n            dotProduct.x = dot( span.rgb, pixel.rgb - endPoint[0].rgb );\n            color_index = ( span_norm_sqr.x <= 0 /*endPoint[0] == endPoint[1]*/ || dotProduct.x <= 0 /*pixel == endPoint[0]*/ ) ? 0\n                : ( ( dotProduct.x < span_norm_sqr.x ) ? aStep[indexPrec.x][ uint( dotProduct.x * 63.49999 / span_norm_sqr.x ) ] : aStep[indexPrec.x][63] );\n            dotProduct.y = dot( span.a, pixel.a - endPoint[0].a );\n            alpha_index = ( span_norm_sqr.y <= 0 || dotProduct.y <= 0 ) ? 0\n                : ( ( dotProduct.y < span_norm_sqr.y ) ? aStep[indexPrec.y][ uint( dotProduct.y * 63.49999 / span_norm_sqr.y ) ] : aStep[indexPrec.y][63] );\n\n            // the same color_index and alpha_index should be used for reconstruction, so this should be left commented out\n            /*if (index_selector)\n            {\n                swap(color_index, alpha_index);\n            }*/\n\n            pixel_r.rgb = ( ( 64 - aWeight[indexPrec.x][color_index] ) * endPoint[0].rgb +\n                            aWeight[indexPrec.x][color_index] * endPoint[1].rgb + \n                            32 ) >> 6;\n            pixel_r.a = ( ( 64 - aWeight[indexPrec.y][alpha_index] ) * endPoint[0].a + \n                          aWeight[indexPrec.y][alpha_index] * endPoint[1].a + \n                          32 ) >> 6;\n\n            Ensure_A_Is_Larger( pixel_r, pixel );\n            pixel_r -= pixel;\n            if (1 == rotation)\n            {\n                pixel_r.ra = pixel_r.ar;\n            }\n            else if (2 == rotation)\n            {\n                pixel_r.ga = pixel_r.ag;\n            }\n            else if (3 == rotation)\n            {\n                pixel_r.ba = pixel_r.ab;\n            }\n            error += ComputeError(pixel_r, pixel_r);\n        }\n    }\n    else if (threadInBlock < 16) // Try mode 6 in threads 12..15, since in mode 4 5 6, only mode 6 has p bit\n    {\n        uint p = threadInBlock - 12;\n\n        compress_endpoints6( endPoint, uint2(p >> 0, p >> 1) & 1 );\n\n        uint4 pixel = shared_temp[threadBase + 0].pixel;\n\n        span = endPoint[1] - endPoint[0];\n        span_norm_sqr = dot( span, span );\n        dotProduct = dot( span, pixel - endPoint[0] );\n        if ( span_norm_sqr.x > 0 && dotProduct.x >= 0 && uint( dotProduct.x * 63.49999 ) > uint( 32 * span_norm_sqr.x ) )\n        {\n            span = -span;\n            swap(endPoint[0], endPoint[1]);\n        }\n            \n        error = 0;\n        for ( uint i = 0; i < 16; i ++ )\n        {\n            pixel = shared_temp[threadBase + i].pixel;\n            \n            dotProduct.x = dot( span, pixel - endPoint[0] );\n            color_index = ( span_norm_sqr.x <= 0 || dotProduct.x <= 0 ) ? 0\n                : ( ( dotProduct.x < span_norm_sqr.x ) ? aStep[0][ uint( dotProduct.x * 63.49999 / span_norm_sqr.x ) ] : aStep[0][63] );\n            \n            pixel_r = ( ( 64 - aWeight[0][color_index] ) * endPoint[0]\n                + aWeight[0][color_index] * endPoint[1] + 32 ) >> 6;\n        \n            Ensure_A_Is_Larger( pixel_r, pixel );\n            pixel_r -= pixel;\n            error += ComputeError(pixel_r, pixel_r);\n        }\n\n        mode = 6;\n        rotation = p;    // Borrow rotation for p\n    }\n\n    shared_temp[GI].error = error;\n    shared_temp[GI].mode = mode;\n    shared_temp[GI].index_selector = index_selector;\n    shared_temp[GI].rotation = rotation;\n\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 8)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 8].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 8].error;\n            shared_temp[GI].mode = shared_temp[GI + 8].mode;\n            shared_temp[GI].index_selector = shared_temp[GI + 8].index_selector;\n            shared_temp[GI].rotation = shared_temp[GI + 8].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 4].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 4].error;\n            shared_temp[GI].mode = shared_temp[GI + 4].mode;\n            shared_temp[GI].index_selector = shared_temp[GI + 4].index_selector;\n            shared_temp[GI].rotation = shared_temp[GI + 4].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 2].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 2].error;\n            shared_temp[GI].mode = shared_temp[GI + 2].mode;\n            shared_temp[GI].index_selector = shared_temp[GI + 2].index_selector;\n            shared_temp[GI].rotation = shared_temp[GI + 2].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 1].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 1].error;\n            shared_temp[GI].mode = shared_temp[GI + 1].mode;\n            shared_temp[GI].index_selector = shared_temp[GI + 1].index_selector;\n            shared_temp[GI].rotation = shared_temp[GI + 1].rotation;\n        }\n\n        g_OutBuff[blockID] = uint4(shared_temp[GI].error, (shared_temp[GI].index_selector << 31) | shared_temp[GI].mode,\n            0, shared_temp[GI].rotation); // rotation is indeed rotation for mode 4 5. for mode 6, rotation is p bit\n    }\n}\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid TryMode137CS( uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID ) // mode 1 3 7 all have 2 subsets per block\n{\n    const uint MAX_USED_THREAD = 64;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = clamp(uint4(g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ) * 255), 0, 255);\n    }\n    GroupMemoryBarrierWithGroupSync();\n\n    shared_temp[GI].error = 0xFFFFFFFF;\n\n    uint4 pixel_r;\n    uint2x4 endPoint[2];        // endPoint[0..1 for subset id][0..1 for low and high in the subset]\n    uint2x4 endPointBackup[2];\n    uint color_index;\n    if (threadInBlock < 64)\n    {\n        uint partition = threadInBlock;\n\n        endPoint[0][0] = MAX_UINT;\n        endPoint[0][1] = MIN_UINT;\n        endPoint[1][0] = MAX_UINT;\n        endPoint[1][1] = MIN_UINT;\n        uint bits = candidateSectionBit[partition];\n        for ( uint i = 0; i < 16; i ++ )\n        {\n            uint4 pixel = shared_temp[threadBase + i].pixel;\n            if ( (( bits >> i ) & 0x01) == 1 )\n            {\n                endPoint[1][0] = min( endPoint[1][0], pixel );\n                endPoint[1][1] = max( endPoint[1][1], pixel );\n            }\n            else\n            {\n                endPoint[0][0] = min( endPoint[0][0], pixel );\n                endPoint[0][1] = max( endPoint[0][1], pixel );\n            }\n        }\n\n        endPointBackup[0] = endPoint[0];\n        endPointBackup[1] = endPoint[1];\n\n        uint max_p;\n        if (1 == g_mode_id)\n        {\n            // in mode 1, there is only one p bit per subset\n            max_p = 4;\n        }\n        else\n        {\n            // in mode 3 7, there are two p bits per subset, one for each end point\n            max_p = 16;\n        }\n\n        uint rotation = 0;\n        uint error = MAX_UINT;\n        for ( uint p = 0; p < max_p; p ++ )\n        {\n            endPoint[0] = endPointBackup[0];\n            endPoint[1] = endPointBackup[1];\n\n            for ( i = 0; i < 2; i ++ ) // loop through 2 subsets\n            {\n                if (g_mode_id == 1)\n                {\n                    compress_endpoints1( endPoint[i], (p >> i) & 1 );\n                }\n                else if (g_mode_id == 3)\n                {\n                    compress_endpoints3( endPoint[i], uint2(p >> (i * 2 + 0), p >> (i * 2 + 1)) & 1 );\n                }\n                else if (g_mode_id == 7)\n                {\n                    compress_endpoints7( endPoint[i], uint2(p >> (i * 2 + 0), p >> (i * 2 + 1)) & 1 );\n                }\n            }\n\n            int4 span[2];\n            span[0] = endPoint[0][1] - endPoint[0][0];\n            span[1] = endPoint[1][1] - endPoint[1][0];\n\n            if (g_mode_id != 7)\n            {\n                span[0].w = span[1].w = 0;\n            }\n\n            int span_norm_sqr[2];\n            span_norm_sqr[0] = dot( span[0], span[0] );\n            span_norm_sqr[1] = dot( span[1], span[1] );\n\n            // TODO: again, this shouldn't be necessary here in error calculation\n            int dotProduct = dot( span[0], shared_temp[threadBase + 0].pixel - endPoint[0][0] );\n            if ( span_norm_sqr[0] > 0 && dotProduct > 0 && uint( dotProduct * 63.49999 ) > uint( 32 * span_norm_sqr[0] ) )\n            {\n                span[0] = -span[0];\n                swap(endPoint[0][0], endPoint[0][1]);\n            }\n            dotProduct = dot( span[1], shared_temp[threadBase + candidateFixUpIndex1D[partition].x].pixel - endPoint[1][0] );\n            if ( span_norm_sqr[1] > 0 && dotProduct > 0 && uint( dotProduct * 63.49999 ) > uint( 32 * span_norm_sqr[1] ) )\n            {\n                span[1] = -span[1];\n                swap(endPoint[1][0], endPoint[1][1]);\n            }\n\n            uint step_selector;\n            if (g_mode_id != 1)\n            {\n                step_selector = 2;  // mode 3 7 have 2 bit index\n            }\n            else\n            {\n                step_selector = 1;  // mode 1 has 3 bit index\n            }\n\n            uint p_error = 0;            \n            for ( i = 0; i < 16; i ++ )\n            {\n                if (((bits >> i) & 0x01) == 1)\n                {\n                    dotProduct = dot( span[1], shared_temp[threadBase + i].pixel - endPoint[1][0] );\n                    color_index = (span_norm_sqr[1] <= 0 || dotProduct <= 0) ? 0\n                        : ((dotProduct < span_norm_sqr[1]) ? aStep[step_selector][uint(dotProduct * 63.49999 / span_norm_sqr[1])] : aStep[step_selector][63]);\n                }\n                else\n                {\n                    dotProduct = dot( span[0], shared_temp[threadBase + i].pixel - endPoint[0][0] );\n                    color_index = (span_norm_sqr[0] <= 0 || dotProduct <= 0) ? 0\n                        : ((dotProduct < span_norm_sqr[0]) ? aStep[step_selector][uint(dotProduct * 63.49999 / span_norm_sqr[0])] : aStep[step_selector][63]);\n                }\n\n                uint subset_index = (bits >> i) & 0x01;\n\n                pixel_r = ((64 - aWeight[step_selector][color_index]) * endPoint[subset_index][0]\n                    + aWeight[step_selector][color_index] * endPoint[subset_index][1] + 32) >> 6;\n                if (g_mode_id != 7)\n                {\n                    pixel_r.a = 255;\n                }\n\n                uint4 pixel = shared_temp[threadBase + i].pixel;\n                Ensure_A_Is_Larger( pixel_r, pixel );\n                pixel_r -= pixel;\n                p_error += ComputeError(pixel_r, pixel_r);\n            }\n\n            if (p_error < error)\n            {\n                error = p_error;\n                rotation = p;\n            }\n        }\n\n        shared_temp[GI].error = error;\n        shared_temp[GI].mode = g_mode_id;\n        shared_temp[GI].partition = partition;\n        shared_temp[GI].rotation = rotation; // mode 1 3 7 don't have rotation, we use rotation for p bits\n    }\n    GroupMemoryBarrierWithGroupSync();\n\n    if (threadInBlock < 32)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 32].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 32].error;\n            shared_temp[GI].mode = shared_temp[GI + 32].mode;\n            shared_temp[GI].partition = shared_temp[GI + 32].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 32].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\nif (threadInBlock < 16)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 16].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 16].error;\n            shared_temp[GI].mode = shared_temp[GI + 16].mode;\n            shared_temp[GI].partition = shared_temp[GI + 16].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 16].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 8)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 8].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 8].error;\n            shared_temp[GI].mode = shared_temp[GI + 8].mode;\n            shared_temp[GI].partition = shared_temp[GI + 8].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 8].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 4].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 4].error;\n            shared_temp[GI].mode = shared_temp[GI + 4].mode;\n            shared_temp[GI].partition = shared_temp[GI + 4].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 4].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 2].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 2].error;\n            shared_temp[GI].mode = shared_temp[GI + 2].mode;\n            shared_temp[GI].partition = shared_temp[GI + 2].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 2].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 1].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 1].error;\n            shared_temp[GI].mode = shared_temp[GI + 1].mode;\n            shared_temp[GI].partition = shared_temp[GI + 1].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 1].rotation;\n        }\n\n        if (g_InBuff[blockID].x > shared_temp[GI].error)\n        {\n            g_OutBuff[blockID] = uint4(shared_temp[GI].error, shared_temp[GI].mode, shared_temp[GI].partition, shared_temp[GI].rotation); // mode 1 3 7 don't have rotation, we use rotation for p bits\n        }\n        else\n        {\n            g_OutBuff[blockID] = g_InBuff[blockID];\n        }\n    }\n}\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid TryMode02CS( uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID ) // mode 0 2 have 3 subsets per block\n{\n    const uint MAX_USED_THREAD = 64;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n    \n    if (threadInBlock < 16)\n    {\n        shared_temp[GI].pixel = clamp(uint4(g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ) * 255), 0, 255);\n    }\n    GroupMemoryBarrierWithGroupSync();\n\n    shared_temp[GI].error = 0xFFFFFFFF;\n\n    uint num_partitions;\n    if (0 == g_mode_id)\n    {\n        num_partitions = 16;\n    }\n    else\n    {\n        num_partitions = 64;\n    }\n\n    uint4 pixel_r;\n    uint2x4 endPoint[3];        // endPoint[0..1 for subset id][0..1 for low and high in the subset]\n    uint2x4 endPointBackup[3];\n    uint color_index[16];\n    if (threadInBlock < num_partitions)\n    {\n        uint partition = threadInBlock + 64;\n\n        endPoint[0][0] = MAX_UINT;\n        endPoint[0][1] = MIN_UINT;\n        endPoint[1][0] = MAX_UINT;\n        endPoint[1][1] = MIN_UINT;\n        endPoint[2][0] = MAX_UINT;\n        endPoint[2][1] = MIN_UINT;\n        uint bits2 = candidateSectionBit2[partition - 64];\n        for ( uint i = 0; i < 16; i ++ )\n        {\n            uint4 pixel = shared_temp[threadBase + i].pixel;\n            uint subset_index = ( bits2 >> ( i * 2 ) ) & 0x03;\n            if ( subset_index == 2 )\n            {\n                endPoint[2][0] = min( endPoint[2][0], pixel );\n                endPoint[2][1] = max( endPoint[2][1], pixel );\n            }\n            else if ( subset_index == 1 )\n            {\n                endPoint[1][0] = min( endPoint[1][0], pixel );\n                endPoint[1][1] = max( endPoint[1][1], pixel );\n            }\n            else\n            {\n                endPoint[0][0] = min( endPoint[0][0], pixel );\n                endPoint[0][1] = max( endPoint[0][1], pixel );\n            }\n        }\n\n        endPointBackup[0] = endPoint[0];\n        endPointBackup[1] = endPoint[1];\n        endPointBackup[2] = endPoint[2];\n\n        uint max_p;\n        if (0 == g_mode_id)\n        {\n            max_p = 64; // changed from 32 to 64\n        }\n        else\n        {\n            max_p = 1;\n        }\n\n        uint rotation = 0;\n        uint error = MAX_UINT;\n        for ( uint p = 0; p < max_p; p ++ )\n        {\n            endPoint[0] = endPointBackup[0];\n            endPoint[1] = endPointBackup[1];\n            endPoint[2] = endPointBackup[2];\n\n            for ( i = 0; i < 3; i ++ )\n            {\n                if (0 == g_mode_id)\n                {\n                    compress_endpoints0( endPoint[i], uint2(p >> (i * 2 + 0), p >> (i * 2 + 1)) & 1 );\n                }\n                else\n                {\n                    compress_endpoints2( endPoint[i] );\n                }\n            }\n\n            uint step_selector = 1 + (2 == g_mode_id);\n\n            int4 span[3];\n            span[0] = endPoint[0][1] - endPoint[0][0];\n            span[1] = endPoint[1][1] - endPoint[1][0];\n            span[2] = endPoint[2][1] - endPoint[2][0];\n            span[0].w = span[1].w = span[2].w = 0;\n            int span_norm_sqr[3];\n            span_norm_sqr[0] = dot( span[0], span[0] );\n            span_norm_sqr[1] = dot( span[1], span[1] );\n            span_norm_sqr[2] = dot( span[2], span[2] );\n\n            // TODO: again, this shouldn't be necessary here in error calculation\n            uint ci[3] = { 0, candidateFixUpIndex1D[partition].x, candidateFixUpIndex1D[partition].y };\n            for (i = 0; i < 3; i ++)\n            {\n                int dotProduct = dot( span[i], shared_temp[threadBase + ci[i]].pixel - endPoint[i][0] );\n                if ( span_norm_sqr[i] > 0 && dotProduct > 0 && uint( dotProduct * 63.49999 ) > uint( 32 * span_norm_sqr[i] ) )\n                {\n                    span[i] = -span[i];\n                    swap(endPoint[i][0], endPoint[i][1]);\n                }\n            }\n\n            uint p_error = 0;\n            for ( i = 0; i < 16; i ++ )\n            {\n                uint subset_index = ( bits2 >> ( i * 2 ) ) & 0x03;\n                if ( subset_index == 2 )\n                {\n                    int dotProduct = dot( span[2], shared_temp[threadBase + i].pixel - endPoint[2][0] );\n                    color_index[i] = ( span_norm_sqr[2] <= 0 || dotProduct <= 0 ) ? 0\n                        : ( ( dotProduct < span_norm_sqr[2] ) ? aStep[step_selector][ uint( dotProduct * 63.49999 / span_norm_sqr[2] ) ] : aStep[step_selector][63] );\n                }\n                else if ( subset_index == 1 )\n                {\n                    int dotProduct = dot( span[1], shared_temp[threadBase + i].pixel - endPoint[1][0] );\n                    color_index[i] = ( span_norm_sqr[1] <= 0 || dotProduct <= 0 ) ? 0\n                        : ( ( dotProduct < span_norm_sqr[1] ) ? aStep[step_selector][ uint( dotProduct * 63.49999 / span_norm_sqr[1] ) ] : aStep[step_selector][63] );\n                }\n                else\n                {\n                    int dotProduct = dot( span[0], shared_temp[threadBase + i].pixel - endPoint[0][0] );\n                    color_index[i] = ( span_norm_sqr[0] <= 0 || dotProduct <= 0 ) ? 0\n                        : ( ( dotProduct < span_norm_sqr[0] ) ? aStep[step_selector][ uint( dotProduct * 63.49999 / span_norm_sqr[0] ) ] : aStep[step_selector][63] );\n                }\n\n                pixel_r = ( ( 64 - aWeight[step_selector][color_index[i]] ) * endPoint[subset_index][0]\n                    + aWeight[step_selector][color_index[i]] * endPoint[subset_index][1] + 32 ) >> 6;\n                pixel_r.a = 255;\n\n                uint4 pixel = shared_temp[threadBase + i].pixel;                \n                Ensure_A_Is_Larger( pixel_r, pixel );\n                pixel_r -= pixel;\n                p_error += ComputeError(pixel_r, pixel_r);\n            }\n\n            if (p_error < error)\n            {\n                error = p_error;\n                rotation = p;    // Borrow rotation for p\n            }\n        }\n\n        shared_temp[GI].error = error;\n        shared_temp[GI].partition = partition;\n        shared_temp[GI].rotation = rotation;\n    }\n    GroupMemoryBarrierWithGroupSync();\n\n    if (threadInBlock < 32)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 32].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 32].error;\n            shared_temp[GI].partition = shared_temp[GI + 32].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 32].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 16)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 16].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 16].error;\n            shared_temp[GI].partition = shared_temp[GI + 16].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 16].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 8)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 8].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 8].error;\n            shared_temp[GI].partition = shared_temp[GI + 8].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 8].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 4)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 4].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 4].error;\n            shared_temp[GI].partition = shared_temp[GI + 4].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 4].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 2)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 2].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 2].error;\n            shared_temp[GI].partition = shared_temp[GI + 2].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 2].rotation;\n        }\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n    if (threadInBlock < 1)\n    {\n        if ( shared_temp[GI].error > shared_temp[GI + 1].error )\n        {\n            shared_temp[GI].error = shared_temp[GI + 1].error;\n            shared_temp[GI].partition = shared_temp[GI + 1].partition;\n            shared_temp[GI].rotation = shared_temp[GI + 1].rotation;\n        }\n\n        if (g_InBuff[blockID].x > shared_temp[GI].error)\n        {\n            g_OutBuff[blockID] = uint4(shared_temp[GI].error, g_mode_id, shared_temp[GI].partition, shared_temp[GI].rotation); // rotation is actually p bit for mode 0. for mode 2, rotation is always 0\n        }\n        else\n        {\n            g_OutBuff[blockID] = g_InBuff[blockID];\n        }\n    }\n}\n\n[numthreads( THREAD_GROUP_SIZE, 1, 1 )]\nvoid EncodeBlockCS(uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID)\n{\n    const uint MAX_USED_THREAD = 16;\n    uint BLOCK_IN_GROUP = THREAD_GROUP_SIZE / MAX_USED_THREAD;\n    uint blockInGroup = GI / MAX_USED_THREAD;\n    uint blockID = g_start_block_id + groupID.x * BLOCK_IN_GROUP + blockInGroup;\n    uint threadBase = blockInGroup * MAX_USED_THREAD;\n    uint threadInBlock = GI - threadBase;\n\n#ifndef REF_DEVICE\n    if (blockID >= g_num_total_blocks)\n    {\n        return;\n    }\n#endif\n\n    uint block_y = blockID / g_num_block_x;\n    uint block_x = blockID - block_y * g_num_block_x;\n    uint base_x = block_x * BLOCK_SIZE_X;\n    uint base_y = block_y * BLOCK_SIZE_Y;\n\n    uint mode = g_InBuff[blockID].y & 0x7FFFFFFF;\n    uint partition = g_InBuff[blockID].z;\n    uint index_selector = (g_InBuff[blockID].y >> 31) & 1;\n    uint rotation = g_InBuff[blockID].w;\n\n    if (threadInBlock < 16)\n    {\n        uint4 pixel = clamp(uint4(g_Input.Load( uint3( base_x + threadInBlock % 4, base_y + threadInBlock / 4, 0 ) ) * 255), 0, 255);\n\n        if ((4 == mode) || (5 == mode))\n        {\n            if (1 == rotation)\n            {\n                pixel.ra = pixel.ar;\n            }\n            else if (2 == rotation)\n            {\n                pixel.ga = pixel.ag;\n            }\n            else if (3 == rotation)\n            {\n                pixel.ba = pixel.ab;\n            }\n        }\n\n        shared_temp[GI].pixel = pixel;\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    uint bits = candidateSectionBit[partition];\n    uint bits2 = candidateSectionBit2[partition - 64];\n\n    uint2x4 ep;\n    uint2x4 ep_quantized;\n    [unroll]\n    for (int ii = 2; ii >= 0; -- ii)\n    {\n        if (threadInBlock < 16)\n        {\n            uint2x4 ep;\n            ep[0] = MAX_UINT;\n            ep[1] = MIN_UINT;\n\n            uint4 pixel = shared_temp[GI].pixel;\n\n            uint subset_index = ( bits >> threadInBlock ) & 0x01;\n            uint subset_index2 = ( bits2 >> ( threadInBlock * 2 ) ) & 0x03;\n            if (0 == ii)\n            {\n                if ((0 == mode) || (2 == mode))\n                {\n                    if (0 == subset_index2)\n                    {\n                        ep[0] = ep[1] = pixel;\n                    }\n                }\n                else if ((1 == mode) || (3 == mode) || (7 == mode))\n                {\n                    if (0 == subset_index)\n                    {\n                        ep[0] = ep[1] = pixel;\n                    }\n                }\n                else if ((4 == mode) || (5 == mode) || (6 == mode))\n                {\n                    ep[0] = ep[1] = pixel;\n                }\n            }\n            else if (1 == ii)\n            {\n                if ((0 == mode) || (2 == mode))\n                {\n                    if (1 == subset_index2)\n                    {\n                        ep[0] = ep[1] = pixel;\n                    }\n                }\n                else if ((1 == mode) || (3 == mode) || (7 == mode))\n                {\n                    if (1 == subset_index)\n                    {\n                        ep[0] = ep[1] = pixel;\n                    }\n                }\n            }\n            else\n            {\n                if ((0 == mode) || (2 == mode))\n                {\n                    if (2 == subset_index2)\n                    {\n                        ep[0] = ep[1] = pixel;\n                    }\n                }\n            }\n\n            shared_temp[GI].endPoint_low = ep[0];\n            shared_temp[GI].endPoint_high = ep[1];\n        }\n#ifdef REF_DEVICE\n        GroupMemoryBarrierWithGroupSync();\n#endif\n\n        if (threadInBlock < 8)\n        {\n            shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 8].endPoint_low);\n            shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 8].endPoint_high);\n        }\n#ifdef REF_DEVICE\n        GroupMemoryBarrierWithGroupSync();\n#endif\n        if (threadInBlock < 4)\n        {\n            shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 4].endPoint_low);\n            shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 4].endPoint_high);\n        }\n#ifdef REF_DEVICE\n        GroupMemoryBarrierWithGroupSync();\n#endif\n        if (threadInBlock < 2)\n        {\n            shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 2].endPoint_low);\n            shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 2].endPoint_high);\n        }\n#ifdef REF_DEVICE\n        GroupMemoryBarrierWithGroupSync();\n#endif\n        if (threadInBlock < 1)\n        {\n            shared_temp[GI].endPoint_low = min(shared_temp[GI].endPoint_low, shared_temp[GI + 1].endPoint_low);\n            shared_temp[GI].endPoint_high = max(shared_temp[GI].endPoint_high, shared_temp[GI + 1].endPoint_high);\n        }\n#ifdef REF_DEVICE\n        GroupMemoryBarrierWithGroupSync();\n#endif\n\n        if (ii == (int)threadInBlock)\n        {\n            ep[0] = shared_temp[threadBase].endPoint_low;\n            ep[1] = shared_temp[threadBase].endPoint_high;\n        }\n    }\n\n    if (threadInBlock < 3)\n    {\n        uint2 P;\n        if (1 == mode)\n        {\n            P = (rotation >> threadInBlock) & 1;\n        }\n        else\n        {\n            P = uint2(rotation >> (threadInBlock * 2 + 0), rotation >> (threadInBlock * 2 + 1)) & 1;\n        }\n\n        if (0 == mode)\n        {\n            ep_quantized = compress_endpoints0( ep, P );\n        }\n        else if (1 == mode)\n        {\n            ep_quantized = compress_endpoints1( ep, P );\n        }\n        else if (2 == mode)\n        {\n            ep_quantized = compress_endpoints2( ep );\n        }\n        else if (3 == mode)\n        {\n            ep_quantized = compress_endpoints3( ep, P );\n        }\n        else if (4 == mode)\n        {\n            ep_quantized = compress_endpoints4( ep );\n        }\n        else if (5 == mode)\n        {\n            ep_quantized = compress_endpoints5( ep );\n        }\n        else if (6 == mode)\n        {\n            ep_quantized = compress_endpoints6( ep, P );\n        }\n        else //if (7 == mode)\n        {\n            ep_quantized = compress_endpoints7( ep, P );\n        }\n\n        int4 span = ep[1] - ep[0];\n        if (mode < 4)\n        {\n            span.w = 0;\n        }\n\n        if ((4 == mode) || (5 == mode))\n        {\n            if (0 == threadInBlock)\n            {\n                int2 span_norm_sqr = uint2( dot( span.rgb, span.rgb ), span.a * span.a );\n                int2 dotProduct = int2( dot( span.rgb, shared_temp[threadBase + 0].pixel.rgb - ep[0].rgb ), span.a * ( shared_temp[threadBase + 0].pixel.a - ep[0].a ) );\n                if ( span_norm_sqr.x > 0 && dotProduct.x > 0 && uint( dotProduct.x * 63.49999 ) > uint( 32 * span_norm_sqr.x ) )\n                {\n                    swap(ep[0].rgb, ep[1].rgb);\n                    swap(ep_quantized[0].rgb, ep_quantized[1].rgb);\n                }\n                if ( span_norm_sqr.y > 0 && dotProduct.y > 0 && uint( dotProduct.y * 63.49999 ) > uint( 32 * span_norm_sqr.y ) )\n                {\n                    swap(ep[0].a, ep[1].a);\n                    swap(ep_quantized[0].a, ep_quantized[1].a);\t\t    \n                }\n            }\n        }\n        else //if ((0 == mode) || (2 == mode) || (1 == mode) || (3 == mode) || (7 == mode) || (6 == mode))\n        {\n            int p;\n            if (0 == threadInBlock)\n            {\n                p = 0;\n            }\n            else if (1 == threadInBlock)\n            {\n                p = candidateFixUpIndex1D[partition].x;\n            }\n            else //if (2 == threadInBlock)\n            {\n                p = candidateFixUpIndex1D[partition].y;\n            }\n\n            int span_norm_sqr = dot( span, span );\n            int dotProduct = dot( span, shared_temp[threadBase + p].pixel - ep[0] );\n            if ( span_norm_sqr > 0 && dotProduct > 0 && uint( dotProduct * 63.49999 ) > uint( 32 * span_norm_sqr ) )\n            {\n                swap(ep[0], ep[1]);\n                swap(ep_quantized[0], ep_quantized[1]);\t\t\n            }\n        }\n\n        shared_temp[GI].endPoint_low = ep[0];\n        shared_temp[GI].endPoint_high = ep[1];\n        shared_temp[GI].endPoint_low_quantized = ep_quantized[0];\n        shared_temp[GI].endPoint_high_quantized = ep_quantized[1];\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (threadInBlock < 16)\n    {\n        uint color_index = 0;\n        uint alpha_index = 0;\n\n        uint2x4 ep;\n\n        uint2 indexPrec;\n        if ((0 == mode) || (1 == mode))\n        {\n            indexPrec = 1;\n        }\n        else if (6 == mode)\n        {\n            indexPrec = 0;\n        }\n        else if (4 == mode)\n        {\n            if (0 == index_selector)\n            {\n                indexPrec = uint2(2, 1);\n            }\n            else\n            {\n                indexPrec = uint2(1, 2);\n            }\n        }\n        else\n        {\n            indexPrec = 2;\n        }\n\n        int subset_index;\n        if ((0 == mode) || (2 == mode))\n        {\n            subset_index = (bits2 >> (threadInBlock * 2)) & 0x03;\n        }\n        else if ((1 == mode) || (3 == mode) || (7 == mode))\n        {\n            subset_index = (bits >> threadInBlock) & 0x01;\n        }\n        else\n        {\n            subset_index = 0;\n        }\n\n        ep[0] = shared_temp[threadBase + subset_index].endPoint_low;\n        ep[1] = shared_temp[threadBase + subset_index].endPoint_high;\n\n        int4 span = ep[1] - ep[0];\n        if (mode < 4)\n        {\n            span.w = 0;\n        }\n\n        if ((4 == mode) || (5 == mode))\n        {\n            int2 span_norm_sqr;\n            span_norm_sqr.x = dot( span.rgb, span.rgb );\n            span_norm_sqr.y = span.a * span.a;\n            \n            int dotProduct = dot( span.rgb, shared_temp[threadBase + threadInBlock].pixel.rgb - ep[0].rgb );\n            color_index = ( span_norm_sqr.x <= 0 || dotProduct <= 0 ) ? 0\n                    : ( ( dotProduct < span_norm_sqr.x ) ? aStep[indexPrec.x][ uint( dotProduct * 63.49999 / span_norm_sqr.x ) ] : aStep[indexPrec.x][63] );\n            dotProduct = dot( span.a, shared_temp[threadBase + threadInBlock].pixel.a - ep[0].a );\n            alpha_index = ( span_norm_sqr.y <= 0 || dotProduct <= 0 ) ? 0\n                    : ( ( dotProduct < span_norm_sqr.y ) ? aStep[indexPrec.y][ uint( dotProduct * 63.49999 / span_norm_sqr.y ) ] : aStep[indexPrec.y][63] );\n\n            if (index_selector)\n            {\n                swap(color_index, alpha_index);\n            }\n        }\n        else\n        {\n            int span_norm_sqr = dot( span, span );\n\n            int dotProduct = dot( span, shared_temp[threadBase + threadInBlock].pixel - ep[0] );\n            color_index = ( span_norm_sqr <= 0 || dotProduct <= 0 ) ? 0\n                    : ( ( dotProduct < span_norm_sqr ) ? aStep[indexPrec.x][ uint( dotProduct * 63.49999 / span_norm_sqr ) ] : aStep[indexPrec.x][63] );\n        }\n\n        shared_temp[GI].error = color_index;\n        shared_temp[GI].mode = alpha_index;\n    }\n#ifdef REF_DEVICE\n    GroupMemoryBarrierWithGroupSync();\n#endif\n\n    if (0 == threadInBlock)\n    {\n        uint4 block;\n        if (0 == mode)\n        {\n            block_package0( block, partition, threadBase );\n        }\n        else if (1 == mode)\n        {\n            block_package1( block, partition, threadBase );\n        }\n        else if (2 == mode)\n        {\n            block_package2( block, partition, threadBase );\n        }\n        else if (3 == mode)\n        {\n            block_package3( block, partition, threadBase );\n        }\n        else if (4 == mode)\n        {\n            block_package4( block, rotation, index_selector, threadBase );\n        }\n        else if (5 == mode)\n        {\n            block_package5( block, rotation, threadBase );\n        }\n        else if (6 == mode)\n        {\n            block_package6( block, threadBase );\n        }\n        else //if (7 == mode)\n        {\n            block_package7( block, partition, threadBase );\n        }\n\n        g_OutBuff[blockID] = block;\n    }\n}\n\n//uint4 truncate_and_round( uint4 color, uint bits)\n//{\n//    uint precisionMask = ((1 << bits) - 1) << (8 - bits);\n//    uint precisionHalf = (1 << (7-bits));\n//\n//    uint4 truncated = color & precisionMask; \n//    uint4 rounded = min(255, color + precisionHalf) & precisionMask;\n//    \n//    uint4 truncated_bak = truncated = truncated | (truncated >> bits);\n//    uint4 rounded_bak = rounded = rounded | (rounded >> bits);\n//\n//    uint4 color_bak = color;\n//    \n//    Ensure_A_Is_Larger( rounded, color );\n//    Ensure_A_Is_Larger( truncated, color_bak );\n//\n//    if (dot(rounded - color, rounded - color) < \n//        dot(truncated - color_bak, truncated - color_bak))\n//    {\n//        return rounded_bak;\n//    }\n//    else\n//    {\n//        return truncated_bak;\n//    }\n//}\n\nuint4 quantize( uint4 color, uint uPrec )\n{\n    uint4 rnd = min(255, color + (1 << (7 - uPrec)));\n    return rnd >> (8 - uPrec);\n}\n\nuint4 unquantize( uint4 color, uint uPrec )\n{\n    color = color << (8 - uPrec);\n    return color | (color >> uPrec);\n}\n\nuint2x4 compress_endpoints0( inout uint2x4 endPoint, uint2 P )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = quantize(endPoint[j].rgbb, 5).rgb & 0xFFFFFFFE;\n\t    quantized[j].rgb |= P[j];\n        quantized[j].a = 0xFF;\n\n        endPoint[j].rgb = unquantize(quantized[j].rgbb, 5).rgb;\n        endPoint[j].a = 0xFF;\n\n        quantized[j] <<= 3;\n    }\n    return quantized;\n}\nuint2x4 compress_endpoints1( inout uint2x4 endPoint, uint2 P )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = quantize(endPoint[j].rgbb, 7).rgb & 0xFFFFFFFE;\n\t    quantized[j].rgb |= P[j];\n        quantized[j].a = 0xFF;\n\n        endPoint[j].rgb = unquantize(quantized[j].rgbb, 7).rgb;\n\t    endPoint[j].a = 0xFF;\n\n        quantized[j] <<= 1;\n    }\n    return quantized;\n}\nuint2x4 compress_endpoints2( inout uint2x4 endPoint )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = quantize(endPoint[j].rgbb, 5).rgb;\n        quantized[j].a = 0xFF;\n\n        endPoint[j].rgb = unquantize(quantized[j].rgbb, 5).rgb;\n\t    endPoint[j].a = 0xFF;    \n\n        quantized[j] <<= 3;\n    }\n    return quantized;\n}\nuint2x4 compress_endpoints3( inout uint2x4 endPoint, uint2 P )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = endPoint[j].rgb & 0xFFFFFFFE;\n\t    quantized[j].rgb |= P[j];\n        quantized[j].a = 0xFF;\n        \n        endPoint[j].rgb = quantized[j].rgb;\n        endPoint[j].a = 0xFF;\n    }\n    return quantized;\n}\nuint2x4 compress_endpoints4( inout uint2x4 endPoint )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = quantize(endPoint[j].rgbb, 5).rgb;\n        quantized[j].a = quantize(endPoint[j].a, 6).r;\n        \n        endPoint[j].rgb = unquantize(quantized[j].rgbb, 5).rgb;        \n        endPoint[j].a = unquantize(quantized[j].a, 6).r;\n\n        quantized[j].rgb <<= 3;\n        quantized[j].a <<= 2;\n    }    \n    return quantized;\n}\nuint2x4 compress_endpoints5( inout uint2x4 endPoint )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j].rgb = quantize(endPoint[j].rgbb, 7).rgb;\n        quantized[j].a = endPoint[j].a;\n\n        endPoint[j].rgb = unquantize(quantized[j].rgbb, 7).rgb;\n        // endPoint[j].a   Alpha is full precision\n\n        quantized[j].rgb <<= 1;\n    }    \n    return quantized;\n}\nuint2x4 compress_endpoints6( inout uint2x4 endPoint, uint2 P )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j] = endPoint[j] & 0xFFFFFFFE;\n\t    quantized[j] |= P[j];\n\t        \n        endPoint[j] = quantized[j];\n    }\n    return quantized;\n}\nuint2x4 compress_endpoints7( inout uint2x4 endPoint, uint2 P )\n{\n    uint2x4 quantized;\n    for ( uint j = 0; j < 2; j ++ )\n    {\n        quantized[j] = quantize(endPoint[j], 6) & 0xFFFFFFFE;\n\t    quantized[j] |= P[j];\n\n        endPoint[j] = unquantize(quantized[j], 6);\n    }\n    return quantized << 2;\n}\n\n#define get_end_point_l(subset) shared_temp[threadBase + subset].endPoint_low_quantized\n#define get_end_point_h(subset) shared_temp[threadBase + subset].endPoint_high_quantized\n#define get_color_index(index) shared_temp[threadBase + index].error\n#define get_alpha_index(index) shared_temp[threadBase + index].mode\n\nvoid block_package0( out uint4 block, uint partition, uint threadBase )\n{\n    block.x = 0x01 | ( (partition - 64) << 1 ) \n            | ( ( get_end_point_l(0).r & 0xF0 ) <<  1 ) | ( ( get_end_point_h(0).r & 0xF0 ) <<  5 ) \n            | ( ( get_end_point_l(1).r & 0xF0 ) <<  9 ) | ( ( get_end_point_h(1).r & 0xF0 ) << 13 ) \n            | ( ( get_end_point_l(2).r & 0xF0 ) << 17 ) | ( ( get_end_point_h(2).r & 0xF0 ) << 21 ) \n            | ( ( get_end_point_l(0).g & 0xF0 ) << 25 );\n    block.y = ( ( get_end_point_l(0).g & 0xF0 ) >>  7 ) | ( ( get_end_point_h(0).g & 0xF0 ) >>  3 ) \n            | ( ( get_end_point_l(1).g & 0xF0 ) <<  1 ) | ( ( get_end_point_h(1).g & 0xF0 ) <<  5 ) \n            | ( ( get_end_point_l(2).g & 0xF0 ) <<  9 ) | ( ( get_end_point_h(2).g & 0xF0 ) << 13 ) \n            | ( ( get_end_point_l(0).b & 0xF0 ) << 17 ) | ( ( get_end_point_h(0).b & 0xF0 ) << 21 )\n            | ( ( get_end_point_l(1).b & 0xF0 ) << 25 );\n    block.z = ( ( get_end_point_l(1).b & 0xF0 ) >>  7 ) | ( ( get_end_point_h(1).b & 0xF0 ) >>  3 ) \n            | ( ( get_end_point_l(2).b & 0xF0 ) <<  1 ) | ( ( get_end_point_h(2).b & 0xF0 ) <<  5 ) \n            | ( ( get_end_point_l(0).r & 0x08 ) << 10 ) | ( ( get_end_point_h(0).r & 0x08 ) << 11 ) \n            | ( ( get_end_point_l(1).r & 0x08 ) << 12 ) | ( ( get_end_point_h(1).r & 0x08 ) << 13 ) \n            | ( ( get_end_point_l(2).r & 0x08 ) << 14 ) | ( ( get_end_point_h(2).r & 0x08 ) << 15 )\n            | ( get_color_index(0) << 19 );\n    block.w = 0;\n    uint i = 1;\n    for ( ; i <= min( candidateFixUpIndex1DOrdered[partition][0], 4 ); i ++ )\n    {\n        block.z |= get_color_index(i) << ( i * 3 + 18 );\n    }\n    if ( candidateFixUpIndex1DOrdered[partition][0] < 4 ) //i = 4\n    {\n        block.z |= get_color_index(4) << 29;\n        i += 1;\n    }\n    else //i = 5\n    {\n        block.w |= ( get_color_index(4) & 0x04 ) >> 2;\n        for ( ; i <= candidateFixUpIndex1DOrdered[partition][0]; i ++ )\n            block.w |= get_color_index(i) << ( i * 3 - 14 );\n    }\n    for ( ; i <= candidateFixUpIndex1DOrdered[partition][1]; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 3 - 15 );\n    }\n    for ( ; i < 16; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 3 - 16 );\n    }\n}\nvoid block_package1( out uint4 block, uint partition, uint threadBase )\n{\n    block.x = 0x02 | ( partition << 2 ) \n            | ( ( get_end_point_l(0).r & 0xFC ) <<  6 ) | ( ( get_end_point_h(0).r & 0xFC ) << 12 ) \n            | ( ( get_end_point_l(1).r & 0xFC ) << 18 ) | ( ( get_end_point_h(1).r & 0xFC ) << 24 );\n    block.y = ( ( get_end_point_l(0).g & 0xFC ) >>  2 ) | ( ( get_end_point_h(0).g & 0xFC ) <<  4 ) \n            | ( ( get_end_point_l(1).g & 0xFC ) << 10 ) | ( ( get_end_point_h(1).g & 0xFC ) << 16 )\n            | ( ( get_end_point_l(0).b & 0xFC ) << 22 ) | ( ( get_end_point_h(0).b & 0xFC ) << 28 );\n    block.z = ( ( get_end_point_h(0).b & 0xFC ) >>  4 ) | ( ( get_end_point_l(1).b & 0xFC ) <<  2 )\n            | ( ( get_end_point_h(1).b & 0xFC ) <<  8 ) \n            | ( ( get_end_point_l(0).r & 0x02 ) << 15 ) | ( ( get_end_point_l(1).r & 0x02 ) << 16 )\n            | ( get_color_index(0) << 18 );\n    if ( candidateFixUpIndex1DOrdered[partition][0] == 15 )\n    {\n        block.w = (get_color_index(15) << 30) | (get_color_index(14) << 27) | (get_color_index(13) << 24) | (get_color_index(12) << 21) | (get_color_index(11) << 18) | (get_color_index(10) << 15)\n            | (get_color_index(9) << 12) | (get_color_index(8) << 9) | (get_color_index(7) << 6) | (get_color_index(6) << 3) | get_color_index(5);\n        block.z |= (get_color_index(4) << 29) | (get_color_index(3) << 26) | (get_color_index(2) << 23) | (get_color_index(1) << 20) | (get_color_index(0) << 18);\n    }\n    else if ( candidateFixUpIndex1DOrdered[partition][0] == 2 )\n    {\n        block.w = (get_color_index(15) << 29) | (get_color_index(14) << 26) | (get_color_index(13) << 23) | (get_color_index(12) << 20) | (get_color_index(11) << 17) | (get_color_index(10) << 14)\n            | (get_color_index(9) << 11) | (get_color_index(8) << 8) | (get_color_index(7) << 5) | (get_color_index(6) << 2) | (get_color_index(5) >> 1);\n        block.z |= (get_color_index(5) << 31) | (get_color_index(4) << 28) | (get_color_index(3) << 25) | (get_color_index(2) << 23) | (get_color_index(1) << 20) | (get_color_index(0) << 18);\n    }\n    else if ( candidateFixUpIndex1DOrdered[partition][0] == 8 )\n    {\n        block.w = (get_color_index(15) << 29) | (get_color_index(14) << 26) | (get_color_index(13) << 23) | (get_color_index(12) << 20) | (get_color_index(11) << 17) | (get_color_index(10) << 14)\n            | (get_color_index(9) << 11) | (get_color_index(8) << 9) | (get_color_index(7) << 6) | (get_color_index(6) << 3) | get_color_index(5);\n        block.z |= (get_color_index(4) << 29) | (get_color_index(3) << 26) | (get_color_index(2) << 23) | (get_color_index(1) << 20) | (get_color_index(0) << 18);\n    }\n    else //candidateFixUpIndex1DOrdered[partition] == 6\n    {\n        block.w = (get_color_index(15) << 29) | (get_color_index(14) << 26) | (get_color_index(13) << 23) | (get_color_index(12) << 20) | (get_color_index(11) << 17) | (get_color_index(10) << 14)\n            | (get_color_index(9) << 11) | (get_color_index(8) << 8) | (get_color_index(7) << 6) | (get_color_index(6) << 4) | get_color_index(5);\n        block.z |= (get_color_index(4) << 29) | (get_color_index(3) << 26) | (get_color_index(2) << 23) | (get_color_index(1) << 20) | (get_color_index(0) << 18);\n    }\n}\nvoid block_package2( out uint4 block, uint partition, uint threadBase )\n{\n    block.x = 0x04 | ( (partition - 64) << 3 ) \n            | ( ( get_end_point_l(0).r & 0xF8 ) <<  6 ) | ( ( get_end_point_h(0).r & 0xF8 ) << 11 ) \n            | ( ( get_end_point_l(1).r & 0xF8 ) << 16 ) | ( ( get_end_point_h(1).r & 0xF8 ) << 21 ) \n            | ( ( get_end_point_l(2).r & 0xF8 ) << 26 );\n    block.y = ( ( get_end_point_l(2).r & 0xF8 ) >>  6 ) | ( ( get_end_point_h(2).r & 0xF8 ) >>  1 )\n            | ( ( get_end_point_l(0).g & 0xF8 ) <<  4 ) | ( ( get_end_point_h(0).g & 0xF8 ) <<  9 ) \n            | ( ( get_end_point_l(1).g & 0xF8 ) << 14 ) | ( ( get_end_point_h(1).g & 0xF8 ) << 19 ) \n            | ( ( get_end_point_l(2).g & 0xF8 ) << 24 );\n    block.z = ( ( get_end_point_h(2).g & 0xF8 ) >>  3 ) | ( ( get_end_point_l(0).b & 0xF8 ) <<  2 )\n            | ( ( get_end_point_h(0).b & 0xF8 ) <<  7 )\t| ( ( get_end_point_l(1).b & 0xF8 ) << 12 )\n            | ( ( get_end_point_h(1).b & 0xF8 ) << 17 ) | ( ( get_end_point_l(2).b & 0xF8 ) << 22 ) \n            | ( ( get_end_point_h(2).b & 0xF8 ) << 27 );\n    block.w = ( ( get_end_point_h(2).b & 0xF8 ) >>  5 ) \n            | ( get_color_index(0) << 3 );\n    uint i = 1;\n    for ( ; i <= candidateFixUpIndex1DOrdered[partition][0]; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 + 2 );\n    }\n    for ( ; i <= candidateFixUpIndex1DOrdered[partition][1]; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 + 1 );\n    }\n    for ( ; i < 16; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 );\n    }\n}\nvoid block_package3( out uint4 block, uint partition, uint threadBase )\n{\n    block.x = 0x08 | ( partition << 4 ) \n            | ( ( get_end_point_l(0).r & 0xFE ) <<  9 ) | ( ( get_end_point_h(0).r & 0xFE ) << 16 ) \n            | ( ( get_end_point_l(1).r & 0xFE ) << 23 ) | ( ( get_end_point_h(1).r & 0xFE ) << 30 );\n    block.y = ( ( get_end_point_h(1).r & 0xFE ) >>  2 ) | ( ( get_end_point_l(0).g & 0xFE ) <<  5 )\n            | ( ( get_end_point_h(0).g & 0xFE ) << 12 ) | ( ( get_end_point_l(1).g & 0xFE ) << 19 )\n            | ( ( get_end_point_h(1).g & 0xFE ) << 26 );\n    block.z = ( ( get_end_point_h(1).g & 0xFE ) >>  6 ) | ( ( get_end_point_l(0).b & 0xFE ) <<  1 )\n            | ( ( get_end_point_h(0).b & 0xFE ) <<  8 ) | ( ( get_end_point_l(1).b & 0xFE ) << 15 )\n            | ( ( get_end_point_h(1).b & 0xFE ) << 22 )\n            | ( ( get_end_point_l(0).r & 0x01 ) << 30 ) | ( ( get_end_point_h(0).r & 0x01 ) << 31 );\n    block.w = ( ( get_end_point_l(1).r & 0x01 ) <<  0 ) | ( ( get_end_point_h(1).r & 0x01 ) <<  1 )\n            | ( get_color_index(0) << 2 );\n    uint i = 1;\n    for ( ; i <= candidateFixUpIndex1DOrdered[partition][0]; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 + 1 );\n    }\n    for ( ; i < 16; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 );\n    }\n}\nvoid block_package4( out uint4 block, uint rotation, uint index_selector, uint threadBase )\n{\n    block.x = 0x10 | ( (rotation & 3) << 5 ) | ( (index_selector & 1) << 7 )\n            | ( ( get_end_point_l(0).r & 0xF8 ) <<  5 ) | ( ( get_end_point_h(0).r & 0xF8 ) << 10 )\n            | ( ( get_end_point_l(0).g & 0xF8 ) << 15 ) | ( ( get_end_point_h(0).g & 0xF8 ) << 20 )\n            | ( ( get_end_point_l(0).b & 0xF8 ) << 25 );\n\n    block.y = ( ( get_end_point_l(0).b & 0xF8 ) >>  7 ) | ( ( get_end_point_h(0).b & 0xF8 ) >>  2 )\n            | ( ( get_end_point_l(0).a & 0xFC ) <<  4 ) | ( ( get_end_point_h(0).a & 0xFC ) << 10 )\n            | ( (get_color_index(0) & 1) << 18 ) | ( get_color_index(1) << 19 ) | ( get_color_index(2) << 21 ) | ( get_color_index(3) << 23 ) \n            | ( get_color_index(4) << 25 ) | ( get_color_index(5) << 27 ) | ( get_color_index(6) << 29 ) | ( get_color_index(7) << 31 );\n\n    block.z = ( get_color_index(7) >>  1 ) | ( get_color_index(8) <<  1 ) | ( get_color_index(9) <<  3 ) | ( get_color_index(10)<<  5 )\n            | ( get_color_index(11)<<  7 ) | ( get_color_index(12)<<  9 ) | ( get_color_index(13)<< 11 ) | ( get_color_index(14)<< 13 )\n            | ( get_color_index(15)<< 15 ) | ( (get_alpha_index(0) & 3) << 17 ) | ( get_alpha_index(1) << 19 ) | ( get_alpha_index(2) << 22 )\n            | ( get_alpha_index(3) << 25 ) | ( get_alpha_index(4) << 28 ) | ( get_alpha_index(5) << 31 );\n\n    block.w = ( get_alpha_index(5) >>  1 ) | ( get_alpha_index(6) <<  2 ) | ( get_alpha_index(7) <<  5 ) | ( get_alpha_index(8) <<  8 ) \n            | ( get_alpha_index(9) << 11 ) | ( get_alpha_index(10)<< 14 ) | ( get_alpha_index(11)<< 17 ) | ( get_alpha_index(12)<< 20 ) \n            | ( get_alpha_index(13)<< 23 ) | ( get_alpha_index(14)<< 26 ) | ( get_alpha_index(15)<< 29 );\n}\nvoid block_package5( out uint4 block, uint rotation, uint threadBase )\n{\n    block.x = 0x20 | ( rotation << 6 )\n            | ( ( get_end_point_l(0).r & 0xFE ) <<  7 ) | ( ( get_end_point_h(0).r & 0xFE ) << 14 )\n            | ( ( get_end_point_l(0).g & 0xFE ) << 21 ) | ( ( get_end_point_h(0).g & 0xFE ) << 28 );\n    block.y = ( ( get_end_point_h(0).g & 0xFE ) >>  4 ) | ( ( get_end_point_l(0).b & 0xFE ) <<  3 )\n            | ( ( get_end_point_h(0).b & 0xFE ) << 10 )\t| ( get_end_point_l(0).a << 18 ) | ( get_end_point_h(0).a << 26 );\n    block.z = ( get_end_point_h(0).a >>  6 )\n            | ( get_color_index(0) <<  2 ) | ( get_color_index(1) <<  3 ) | ( get_color_index(2) <<  5 ) | ( get_color_index(3) <<  7 ) \n            | ( get_color_index(4) <<  9 ) | ( get_color_index(5) << 11 ) | ( get_color_index(6) << 13 ) | ( get_color_index(7) << 15 )\n            | ( get_color_index(8) << 17 ) | ( get_color_index(9) << 19 ) | ( get_color_index(10)<< 21 ) | ( get_color_index(11)<< 23 ) \n            | ( get_color_index(12)<< 25 ) | ( get_color_index(13)<< 27 ) | ( get_color_index(14)<< 29 ) | ( get_color_index(15)<< 31 );\n    block.w =  ( get_color_index(15)>> 1 ) | ( get_alpha_index(0) <<  1 ) | ( get_alpha_index(1) <<  2 ) | ( get_alpha_index(2) <<  4 )\n            | ( get_alpha_index(3) <<  6 ) | ( get_alpha_index(4) <<  8 ) | ( get_alpha_index(5) << 10 ) | ( get_alpha_index(6) << 12 )\n            | ( get_alpha_index(7) << 14 ) | ( get_alpha_index(8) << 16 ) | ( get_alpha_index(9) << 18 ) | ( get_alpha_index(10)<< 20 ) \n            | ( get_alpha_index(11)<< 22 ) | ( get_alpha_index(12)<< 24 ) | ( get_alpha_index(13)<< 26 ) | ( get_alpha_index(14)<< 28 )\n            | ( get_alpha_index(15)<< 30 );\n}\nvoid block_package6( out uint4 block, uint threadBase )\n{\n    block.x = 0x40\n            | ( ( get_end_point_l(0).r & 0xFE ) <<  6 ) | ( ( get_end_point_h(0).r & 0xFE ) << 13 )\n            | ( ( get_end_point_l(0).g & 0xFE ) << 20 ) | ( ( get_end_point_h(0).g & 0xFE ) << 27 );\n    block.y = ( ( get_end_point_h(0).g & 0xFE ) >>  5 ) | ( ( get_end_point_l(0).b & 0xFE ) <<  2 )\n            | ( ( get_end_point_h(0).b & 0xFE ) <<  9 )\t| ( ( get_end_point_l(0).a & 0xFE ) << 16 )\n            | ( ( get_end_point_h(0).a & 0xFE ) << 23 )\n            | ( get_end_point_l(0).r & 0x01 ) << 31;\n    block.z = ( get_end_point_h(0).r & 0x01 )\n            | ( get_color_index(0) <<  1 ) | ( get_color_index(1) <<  4 ) | ( get_color_index(2) <<  8 ) | ( get_color_index(3) << 12 ) \n            | ( get_color_index(4) << 16 ) | ( get_color_index(5) << 20 ) | ( get_color_index(6) << 24 ) | ( get_color_index(7) << 28 );\n    block.w = ( get_color_index(8) <<  0 ) | ( get_color_index(9) <<  4 ) | ( get_color_index(10)<<  8 ) | ( get_color_index(11)<< 12 ) \n            | ( get_color_index(12)<< 16 ) | ( get_color_index(13)<< 20 ) | ( get_color_index(14)<< 24 ) | ( get_color_index(15)<< 28 );\n}\nvoid block_package7( out uint4 block, uint partition, uint threadBase )\n{\n    block.x = 0x80 | ( partition << 8 ) \n            | ( ( get_end_point_l(0).r & 0xF8 ) << 11 ) | ( ( get_end_point_h(0).r & 0xF8 ) << 16 ) \n            | ( ( get_end_point_l(1).r & 0xF8 ) << 21 ) | ( ( get_end_point_h(1).r & 0xF8 ) << 26 );\n    block.y = ( ( get_end_point_h(1).r & 0xF8 ) >>  6 ) | ( ( get_end_point_l(0).g & 0xF8 ) >>  1 )\n            | ( ( get_end_point_h(0).g & 0xF8 ) <<  4 ) | ( ( get_end_point_l(1).g & 0xF8 ) <<  9 ) \n            | ( ( get_end_point_h(1).g & 0xF8 ) << 14 )\t| ( ( get_end_point_l(0).b & 0xF8 ) << 19 ) \n            | ( ( get_end_point_h(0).b & 0xF8 ) << 24 );\n    block.z = ( ( get_end_point_l(1).b & 0xF8 ) >>  3 )\t| ( ( get_end_point_h(1).b & 0xF8 ) <<  2 ) \n            | ( ( get_end_point_l(0).a & 0xF8 ) <<  7 ) | ( ( get_end_point_h(0).a & 0xF8 ) << 12 ) \n            | ( ( get_end_point_l(1).a & 0xF8 ) << 17 ) | ( ( get_end_point_h(1).a & 0xF8 ) << 22 ) \n            | ( ( get_end_point_l(0).r & 0x04 ) << 28 ) | ( ( get_end_point_h(0).r & 0x04 ) << 29 );\n    block.w = ( ( get_end_point_l(1).r & 0x04 ) >>  2 ) | ( ( get_end_point_h(1).r & 0x04 ) >>  1 )\n            | ( get_color_index(0) <<  2 );\n    uint i = 1;\n    for ( ; i <= candidateFixUpIndex1DOrdered[partition][0]; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 + 1 );\n    }\n    for ( ; i < 16; i ++ )\n    {\n        block.w |= get_color_index(i) << ( i * 2 );\n    }\n}"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/CompileShaders.cmd",
    "content": "@echo off\nrem THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\nrem ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\nrem THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\nrem PARTICULAR PURPOSE.\nrem\nrem Copyright (c) Microsoft Corporation. All rights reserved.\n\nsetlocal\nset error=0\n\ncall :CompileShader BC7Encode TryMode456CS\ncall :CompileShader BC7Encode TryMode137CS\ncall :CompileShader BC7Encode TryMode02CS\ncall :CompileShader BC7Encode EncodeBlockCS\n\ncall :CompileShader BC6HEncode TryModeG10CS\ncall :CompileShader BC6HEncode TryModeLE10CS\ncall :CompileShader BC6HEncode EncodeBlockCS\n\necho.\n\nif %error% == 0 (\n    echo Shaders compiled ok\n) else (\n    echo There were shader compilation errors!\n)\n\nendlocal\nexit /b\n\n:CompileShader\nset fxc=fxc /nologo %1.hlsl /Tcs_4_0 /Zpc /Qstrip_reflect /Qstrip_debug /E%2 /FhCompiled\\%1_%2.inc /Vn%1_%2\necho.\necho %fxc%\n%fxc% || set error=1\nexit /b\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 0x0000cccc, 15, 0, 0},\n                              { 0x00008888, 15, 0, 0},\n                              { 0x0000eeee, 15, 0, 0},\n                              { 0x0000ecc8, 15, 1, 0},\n                              { 0x0000c880, 15, 1, 0},\n                              { 0x0000feec, 15, 1, 1},\n                              { 0x0000fec8, 15, 1, 1},\n                              { 0x0000ec80, 15, 2, 1},\n                              { 0x0000c800, 15, 2, 1},\n                              { 0x0000ffec, 15, 2, 1},\n                              { 0x0000fe80, 15, 2, 1},\n                              { 0x0000e800, 15, 2, 1},\n                              { 0x0000ffe8, 15, 3, 1},\n                              { 0x0000ff00, 15, 3, 1},\n                              { 0x0000fff0, 15, 3, 2},\n                              { 0x0000f000, 15, 3, 2},\n                              { 0x0000f710, 15, 4, 2},\n                              { 142, 2, 4, 2},\n                              { 0x00007100, 8, 4, 2},\n                              { 2254, 2, 4, 2},\n                              { 140, 2, 5, 2},\n                              { 0x00007310, 8, 5, 2},\n                              { 0x00003100, 8, 5, 2},\n                              { 0x00008cce, 15, 5, 3},\n                              { 2188, 2, 6, 3},\n                              { 0x00003110, 8, 6, 3},\n                              { 0x00006666, 2, 6, 3},\n                              { 0x0000366c, 2, 6, 3},\n                              { 6120, 8, 6, 3},\n                              { 4080, 8, 7, 3},\n                              { 0x0000718e, 2, 7, 3},\n                              { 0x0000399c, 2, 7, 3},\n                              { -1, 0, 7, 3},\n                              { -1, 0, 8, 4},\n                              { -1, 0, 8, 4},\n                              { -1, 0, 8, 4},\n                              { -1, 0, 8, 4},\n                              { -1, 0, 9, 4},\n                              { -1, 0, 9, 4},\n                              { -1, 0, 9, 4},\n                              { -1, 0, 9, 4},\n                              { 0, 0, 10, 4},\n                              { 0, 0, 10, 5},\n                              { -1, 0, 10, 5},\n                              { -1, 0, 10, 5},\n                              { -1, 0, 10, 5},\n                              { 0, 0, 11, 5},\n                              { 0, 0, 11, 5},\n                              { 0, 0, 11, 5},\n                              { 0, 0, 11, 5},\n                              { 0, 0, 12, 5},\n                              { 0, 0, 12, 6},\n                              { 0, 0, 12, 6},\n                              { 0, 0, 12, 6},\n                              { 0, 0, 13, 6},\n                              { 0, 0, 13, 6},\n                              { 0, 0, 13, 6},\n                              { 0, 0, 13, 6},\n                              { 0, 0, 14, 6},\n                              { 0, 0, 14, 6},\n                              { 0, 0, 14, 7},\n                              { 0, 0, 14, 7},\n                              { 0, 0, 15, 7},\n                              { 0, 0, 15, 7},\n                              { 10, 5, 5, 5},\n                              { 7, 6, 6, 6},\n                              { 11, 5, 4, 4},\n                              { 11, 4, 5, 4},\n                              { 11, 4, 4, 5},\n                              { 9, 5, 5, 5},\n                              { 8, 6, 5, 5},\n                              { 8, 5, 6, 5},\n                              { 8, 5, 5, 6},\n                              { 6, 6, 6, 6},\n                              { 10, 10, 10, 10},\n                              { 11, 9, 9, 9},\n                              { 12, 8, 8, 8},\n                              { 16, 4, 4, 4} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_resource_structured t1, 16 \ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 18\ndcl_tgsm_structured g0, 84, 64\ndcl_thread_group 64, 1, 1\nushr r0.x, vThreadIDInGroupFlattened.x, l(5)\nishl r0.y, vThreadGroupID.x, l(1)\niadd r0.y, r0.y, cb0[1].x\niadd r0.x, r0.x, r0.y\nuge r0.y, r0.x, cb0[1].y\nif_nz r0.y\n  ret \nendif \nand r0.y, vThreadIDInGroupFlattened.x, l(32)\niadd r0.z, -r0.y, vThreadIDInGroupFlattened.x\nult r1.xyzw, r0.zzzz, l(16, 32, 2, 8)\nif_nz r1.x\n  udiv r0.w, null, r0.x, cb0[0].y\n  imad r2.x, -r0.w, cb0[0].y, r0.x\n  ishl r2.x, r2.x, l(2)\n  ishl r0.w, r0.w, l(2)\n  and r2.y, r0.z, l(3)\n  iadd r2.x, r2.y, r2.x\n  ushr r3.x, r0.z, l(2)\n  iadd r2.y, r0.w, r3.x\n  mov r2.zw, l(0,0,0,0)\n  ld r2.xyzw, r2.xyzw, t0.xyzw\n  dp3 r0.w, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)\n  store_structured g0.x, vThreadIDInGroupFlattened.x, l(36), r0.w\n  ushr r3.xyz, r2.xyzx, l(16)\n  and r3.xyz, r3.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  and r4.xyzw, r2.xxyy, l(0x7fffffff, 0x007fffff, 0x7fffffff, 0x007fffff)\n  ult r2.xy, l(0x47ffefff, 0x47ffefff, 0, 0), r4.xzxx\n  ult r5.xy, r4.xzxx, l(0x38800000, 0x38800000, 0, 0)\n  ushr r5.zw, r4.xxxz, l(23)\n  iadd r5.zw, -r5.zzzw, l(0, 0, 113, 113)\n  iadd r4.yw, r4.yyyw, l(0, 0x00800000, 0, 0x00800000)\n  ushr r6.x, r4.y, r5.z\n  ushr r6.y, r4.w, r5.w\n  iadd r4.xy, r4.xzxx, l(0xc8000000, 0xc8000000, 0, 0)\n  movc r4.xy, r5.xyxx, r6.xyxx, r4.xyxx\n  iadd r4.zw, r4.xxxy, l(0, 0, 4095, 4095)\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(1, 1, 0, 0)\n  iadd r4.xy, r4.xyxx, r4.zwzz\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(0x00007fff, 0x00007fff, 0, 0)\n  movc r2.xy, r2.xyxx, l(0x00007fff,0x00007fff,0,0), r4.xyxx\n  iadd r4.xy, r3.xyxx, r2.xyxx\n  and r2.xy, r2.zzzz, l(0x7fffffff, 0x007fffff, 0, 0)\n  ult r0.w, l(0x47ffefff), r2.x\n  ult r2.z, r2.x, l(0x38800000)\n  ushr r2.w, r2.x, l(23)\n  iadd r2.w, -r2.w, l(113)\n  iadd r2.y, r2.y, l(0x00800000)\n  ushr r2.y, r2.y, r2.w\n  iadd r2.x, r2.x, l(0xc8000000)\n  movc r2.x, r2.z, r2.y, r2.x\n  iadd r2.y, r2.x, l(4095)\n  ushr r2.x, r2.x, l(13)\n  and r2.x, r2.x, l(1)\n  iadd r2.x, r2.x, r2.y\n  ushr r2.x, r2.x, l(13)\n  and r2.x, r2.x, l(0x00007fff)\n  movc r0.w, r0.w, l(0x00007fff), r2.x\n  iadd r4.z, r3.z, r0.w\n  ieq r0.w, cb0[0].z, l(95)\n  ishl r2.xyz, r4.xyzx, l(6)\n  udiv r2.xyz, null, r2.xyzx, l(31, 31, 31, 0)\n  ult r3.xyz, r4.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ieq r5.xyz, r4.xyzx, l(0x00007bff, 0x00007bff, 0x00007bff, 0)\n  ishl r4.xyz, r4.xyzx, l(5)\n  udiv r6.xyz, null, r4.xyzx, l(31, 31, 31, 0)\n  movc r6.xyz, r5.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r6.xyzx\n  and r4.xyz, r4.xyzx, l(0x000fffe0, 0x000fffe0, 0x000fffe0, 0)\n  udiv r4.xyz, null, r4.xyzx, l(31, 31, 31, 0)\n  ineg r4.xyz, r4.xyzx\n  movc r4.xyz, r5.xyzx, l(0xffff8001,0xffff8001,0xffff8001,0), r4.xyzx\n  movc r3.xyz, r3.xyzx, r6.xyzx, r4.xyzx\n  movc r2.xyz, r0.wwww, r2.xyzx, r3.xyzx\n  store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(12), r2.xyzx\nendif \nld_structured r2.xy, r0.x, l(4), t1.xyxx\nif_nz r1.y\n  and r0.w, r0.z, l(15)\n  iadd r1.y, r0.w, r0.y\n  ld_structured r3.xyz, r1.y, l(12), g0.xyzx\n  ld_structured r3.w, r1.y, l(36), g0.xxxx\n  if_nz r1.x\n    ult r1.y, l(10), r2.x\n    if_nz r1.y\n      mov r4.xyzw, r3.xyzx\n      mov r5.xyzw, r3.yzww\n    else \n      ushr r1.y, icb[r2.y + 0].x, r0.z\n      and r1.y, r1.y, l(1)\n      movc r4.xyzw, r1.yyyy, l(0x7fffffff,0x7fffffff,0x7fffffff,-0.000000), r3.xyzx\n      movc r5.xyzw, r1.yyyy, l(-0.000000,-0.000000,340282346638528860000000000000000000000.000000,-340282346638528860000000000000000000000.000000), r3.yzww\n    endif \n  else \n    uge r1.y, l(10), r2.x\n    if_nz r1.y\n      ushr r0.w, icb[r2.y + 0].x, r0.w\n      and r0.w, r0.w, l(1)\n      ieq r0.w, r0.w, l(1)\n      movc r4.xyzw, r0.wwww, r3.xyzx, l(0x7fffffff,0x7fffffff,0x7fffffff,-0.000000)\n      movc r5.xyzw, r0.wwww, r3.yzww, l(-0.000000,-0.000000,340282346638528860000000000000000000000.000000,-340282346638528860000000000000000000000.000000)\n    else \n      mov r4.xyzw, l(0x7fffffff,0x7fffffff,0x7fffffff,-0.000000)\n      mov r5.xyzw, l(-0.000000,-0.000000,340282346638528860000000000000000000000.000000,-340282346638528860000000000000000000000.000000)\n    endif \n  endif \n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r4.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(68), r5.xyzw\nendif \nand r0.w, r0.z, l(15)\nult r3.xyzw, r0.wwww, l(8, 4, 2, 1)\nif_nz r3.x\n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r5.x, r0.w, l(76), g0.xxxx\n  lt r1.y, r5.x, r4.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r5.x\n  endif \n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r5.x, r0.w, l(80), g0.xxxx\n  lt r1.y, r4.x, r5.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r5.x\n  endif \nendif \nif_nz r3.y\n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r5.x, r0.w, l(76), g0.xxxx\n  lt r1.y, r5.x, r4.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r5.x\n  endif \n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r5.x, r0.w, l(80), g0.xxxx\n  lt r1.y, r4.x, r5.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r5.x\n  endif \nendif \nif_nz r3.z\n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r5.x, r0.w, l(76), g0.xxxx\n  lt r1.y, r5.x, r4.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r5.x\n  endif \n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r5.x, r0.w, l(80), g0.xxxx\n  lt r1.y, r4.x, r5.x\n  if_nz r1.y\n    ld_structured r4.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r4.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r5.x\n  endif \nendif \nif_nz r3.w\n  ld_structured r3.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r4.x, r0.w, l(76), g0.xxxx\n  lt r1.y, r4.x, r3.x\n  if_nz r1.y\n    ld_structured r3.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r3.xyzx\n  endif \n  ld_structured r3.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r4.x, r0.w, l(80), g0.xxxx\n  lt r1.y, r3.x, r4.x\n  if_nz r1.y\n    ld_structured r3.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r3.xyzx\n  endif \nendif \nif_nz r1.z\n  ishl r0.w, r0.z, l(4)\n  iadd r0.w, r0.w, r0.y\n  ld_structured r3.xyz, r0.w, l(52), g0.xyzx\n  ld_structured r4.xyz, r0.w, l(64), g0.xyzx\n  ieq r0.w, r0.z, l(1)\n  uge r1.y, l(10), r2.x\n  and r0.w, r0.w, r1.y\n  if_nz r0.w\n    mov r0.w, icb[r2.y + 0].y\n  else \n    mov r0.w, l(0)\n  endif \n  iadd r5.xyz, -r3.xyzx, r4.xyzx\n  itof r5.xyz, r5.xyzx\n  dp3 r1.y, r5.xyzx, r5.xyzx\n  iadd r0.w, r0.w, r0.y\n  ld_structured r6.xyz, r0.w, l(12), g0.xyzx\n  iadd r6.xyz, -r3.xyzx, r6.xyzx\n  itof r6.xyz, r6.xyzx\n  dp3 r0.w, r5.xyzx, r6.xyzx\n  lt r2.z, l(0.000000), r1.y\n  ge r2.w, r0.w, l(0.000000)\n  and r2.z, r2.w, r2.z\n  mul r0.w, r0.w, l(63.499989)\n  div r0.w, r0.w, r1.y\n  ftou r0.w, r0.w\n  ult r0.w, l(32), r0.w\n  and r0.w, r0.w, r2.z\n  mov r4.w, r3.x\n  mov r3.w, r4.x\n  movc r5.xyzw, r0.wwww, r4.xyzw, r3.xyzw\n  movc r2.zw, r0.wwww, r3.yyyz, r4.yyyz\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r5.xyzw\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(68), r2.zwzz\nendif \nif_nz r1.x\n  ult r0.w, l(10), r2.x\n  if_nz r0.w\n    mov r1.x, l(0)\n  else \n    mov r1.x, icb[r2.y + 0].x\n  endif \n  ushr r1.x, r1.x, r0.z\n  and r1.x, r1.x, l(1)\n  if_nz r1.x\n    iadd r1.x, r0.y, l(1)\n    ld_structured r3.xyz, r1.x, l(64), g0.xyzx\n    ld_structured r4.xyz, r1.x, l(52), g0.xyzx\n    iadd r3.xyz, r3.xyzx, -r4.xyzx\n    itof r3.xyz, r3.xyzx\n    ld_structured r5.xyz, vThreadIDInGroupFlattened.x, l(12), g0.xyzx\n    iadd r4.xyz, -r4.xyzx, r5.xyzx\n    itof r4.xyz, r4.xyzx\n    dp3 r1.x, r3.xyzx, r4.xyzx\n  else \n    ld_structured r4.xyz, r0.y, l(64), g0.xyzx\n    ld_structured r5.xyz, r0.y, l(52), g0.xyzx\n    iadd r4.xyz, r4.xyzx, -r5.xyzx\n    itof r3.xyz, r4.xyzx\n    ld_structured r4.xyz, vThreadIDInGroupFlattened.x, l(12), g0.xyzx\n    iadd r4.xyz, -r5.xyzx, r4.xyzx\n    itof r4.xyz, r4.xyzx\n    dp3 r1.x, r3.xyzx, r4.xyzx\n  endif \n  dp3 r1.y, r3.xyzx, r3.xyzx\n  if_nz r0.w\n    ge r0.w, l(0.000000), r1.y\n    ge r2.z, l(0.000000), r1.x\n    or r0.w, r0.w, r2.z\n    lt r2.z, r1.x, r1.y\n    mul r2.w, r1.x, l(63.499989)\n    div r2.w, r2.w, r1.y\n    ftou r2.w, r2.w\n    movc r2.z, r2.z, icb[r2.w + 0].z, l(15)\n    movc r0.w, r0.w, l(0), r2.z\n    ishl r3.x, r0.w, l(1)\n    ult r2.z, r0.z, l(8)\n    ishl r2.w, r0.z, l(2)\n    ishl r4.x, r0.w, r2.w\n    iadd r2.w, r2.w, l(-32)\n    ishl r4.w, r0.w, r2.w\n    mov r4.yz, l(0,0,0,0)\n    movc r2.zw, r2.zzzz, r4.xxxy, r4.zzzw\n    mov r3.y, l(0)\n    movc r3.xy, r0.zzzz, r2.zwzz, r3.xyxx\n  else \n    ge r0.w, l(0.000000), r1.y\n    ge r2.z, l(0.000000), r1.x\n    or r0.w, r0.w, r2.z\n    lt r2.z, r1.x, r1.y\n    mul r1.x, r1.x, l(63.499989)\n    div r1.x, r1.x, r1.y\n    ftou r1.x, r1.x\n    movc r1.x, r2.z, icb[r1.x + 0].w, l(7)\n    movc r0.w, r0.w, l(0), r1.x\n    if_z r0.z\n      ishl r3.x, r0.w, l(18)\n      mov r3.y, l(0)\n    else \n      ult r1.x, r0.z, l(3)\n      if_nz r1.x\n        imad r1.x, r0.z, l(3), l(17)\n        ishl r3.x, r0.w, r1.x\n        mov r3.y, l(0)\n      else \n        ine r1.x, l(2), icb[r2.y + 0].y\n        ieq r1.y, l(15), icb[r2.y + 0].y\n        and r2.zw, r1.xxxy, l(0, 0, 1, 1)\n        ult r1.y, r0.z, l(5)\n        if_nz r1.y\n          imad r1.y, r0.z, l(3), r2.z\n          iadd r1.y, r1.y, l(16)\n          ishl r3.x, r0.w, r1.y\n          mov r3.y, l(0)\n        else \n          ieq r1.y, r0.z, l(5)\n          movc r4.x, r1.x, l(0), l(1)\n          ushr r4.y, r0.w, r4.x\n          ishl r4.z, r0.w, l(31)\n          movc r4.x, r1.x, l(0), r4.z\n          ult r1.x, r0.z, l(9)\n          imad r2.zw, r0.zzzz, l(0, 0, 3, 3), r2.zzzw\n          iadd r2.zw, r2.zzzw, l(0, 0, -16, -16)\n          ishl r2.z, r0.w, r2.z\n          ishl r0.w, r0.w, r2.w\n          movc r5.y, r1.x, r2.z, r0.w\n          mov r5.x, l(0)\n          movc r3.xy, r1.yyyy, r4.xyxx, r5.xyxx\n        endif \n      endif \n    endif \n  endif \n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(24), r3.xyxx\nelse \n  mov r3.xy, l(0,0,0,0)\nendif \nif_nz r1.w\n  ld_structured r4.xy, vThreadIDInGroupFlattened.x, l(24), g0.xyxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r5.xy, r0.w, l(24), g0.xyxx\n  or r1.xy, r4.xyxx, r5.xyxx\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(24), r1.xyxx\nendif \nult r1.xy, r0.zzzz, l(4, 1, 0, 0)\nif_nz r1.x\n  ld_structured r4.xy, vThreadIDInGroupFlattened.x, l(24), g0.xyxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r5.xy, r0.w, l(24), g0.xyxx\n  or r1.xw, r4.xxxy, r5.xxxy\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(24), r1.xwxx\nendif \nif_nz r1.z\n  ld_structured r4.xy, vThreadIDInGroupFlattened.x, l(24), g0.xyxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r5.xy, r0.w, l(24), g0.xyxx\n  or r1.xw, r4.xxxy, r5.xxxy\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(24), r1.xwxx\nendif \nif_nz r1.y\n  ld_structured r4.xy, vThreadIDInGroupFlattened.x, l(24), g0.xyxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r5.xy, r0.w, l(24), g0.xyxx\n  or r3.xy, r4.xyxx, r5.xyxx\nendif \niadd r0.w, r2.x, l(-1)\nieq r1.xy, r0.zzzz, l(2, 3, 0, 0)\nif_nz r1.x\n  ld_structured r4.xyz, r0.y, l(52), g0.xyzx\n  ld_structured r5.xyz, r0.y, l(64), g0.xyzx\n  ieq r1.x, cb0[0].z, l(95)\n  if_nz r1.x\n    ige r1.x, icb[r0.w + 64].x, l(15)\n    and r1.x, r1.x, l(1)\n    movc r6.xyz, r4.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r7.xyz, r5.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r6.xyz, r1.xxxx, r6.xyzx\n    or r7.xyz, r1.xxxx, r7.xyzx\n    ieq r8.xyz, r4.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ieq r9.xyz, r5.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ishl r1.x, l(1), icb[r0.w + 64].x\n    iadd r1.x, r1.x, l(-1)\n    ishl r10.xyz, r4.xyzx, icb[r0.w + 64].x\n    ishl r11.xyz, r5.xyzx, icb[r0.w + 64].x\n    ishr r10.xyz, r10.xyzx, l(16)\n    ishr r11.xyz, r11.xyzx, l(16)\n    movc r8.xyz, r8.xyzx, r1.xxxx, r10.xyzx\n    movc r9.xyz, r9.xyzx, r1.xxxx, r11.xyzx\n    movc r6.xyz, r6.xyzx, r4.xyzx, r8.xyzx\n    movc r7.xyz, r7.xyzx, r5.xyzx, r9.xyzx\n  else \n    ige r1.x, icb[r0.w + 64].x, l(16)\n    and r1.x, r1.x, l(1)\n    movc r8.xyz, r4.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r9.xyz, r5.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r8.xyz, r1.xxxx, r8.xyzx\n    or r9.xyz, r1.xxxx, r9.xyzx\n    ige r10.xyz, r4.xyzx, l(0, 0, 0, 0)\n    ige r11.xyz, r5.xyzx, l(0, 0, 0, 0)\n    ieq r12.xyz, r4.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r13.xyz, r5.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r1.x, l(-1), icb[r0.w + 64].x\n    ishl r1.w, l(1), r1.x\n    iadd r2.z, r1.w, l(-1)\n    ishl r14.xyz, r4.xyzx, r1.x\n    ishl r15.xyz, r5.xyzx, r1.x\n    ishr r14.xyz, r14.xyzx, l(15)\n    ishr r15.xyz, r15.xyzx, l(15)\n    movc r12.xyz, r12.xyzx, r2.zzzz, r14.xyzx\n    movc r13.xyz, r13.xyzx, r2.zzzz, r15.xyzx\n    ineg r14.xyz, r4.xyzx\n    ineg r15.xyz, r5.xyzx\n    ieq r16.xyz, r14.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r17.xyz, r15.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r1.w, -r1.w, l(1)\n    ishl r14.xyz, r14.xyzx, r1.x\n    ishl r15.xyz, r15.xyzx, r1.x\n    ishr r14.xyz, r14.xyzx, l(15)\n    ishr r15.xyz, r15.xyzx, l(15)\n    ineg r14.xyz, r14.xyzx\n    ineg r15.xyz, r15.xyzx\n    movc r14.xyz, r16.xyzx, r1.wwww, r14.xyzx\n    movc r15.xyz, r17.xyzx, r1.wwww, r15.xyzx\n    movc r10.xyz, r10.xyzx, r12.xyzx, r14.xyzx\n    movc r11.xyz, r11.xyzx, r13.xyzx, r15.xyzx\n    movc r6.xyz, r8.xyzx, r4.xyzx, r10.xyzx\n    movc r7.xyz, r9.xyzx, r5.xyzx, r11.xyzx\n  endif \n  iadd r4.xyz, -r6.xyzx, r7.xyzx\n  movc r4.xyz, icb[r0.w + 32].xxxx, r4.xyzx, r7.xyzx\n  mov r6.w, r4.x\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(68), r4.yzyy\nendif \nif_nz r1.y\n  iadd r1.xy, r0.yyyy, l(2, 1, 0, 0)\n  ld_structured r4.xyz, r1.x, l(52), g0.xyzx\n  ld_structured r5.xyz, r1.y, l(52), g0.xyzx\n  ld_structured r6.xyz, r1.y, l(64), g0.xyzx\n  uge r1.x, l(10), r2.x\n  if_nz r1.x\n    ieq r1.x, cb0[0].z, l(95)\n    if_nz r1.x\n      ige r1.x, icb[r0.w + 64].x, l(15)\n      and r1.x, r1.x, l(1)\n      movc r7.xyz, r5.xyzx, l(0,0,0,0), l(1,1,1,0)\n      movc r8.xyz, r6.xyzx, l(0,0,0,0), l(1,1,1,0)\n      or r7.xyz, r1.xxxx, r7.xyzx\n      or r1.xyw, r1.xxxx, r8.xyxz\n      ieq r8.xyz, r5.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n      ieq r9.xyz, r6.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n      ishl r2.z, l(1), icb[r0.w + 64].x\n      iadd r2.z, r2.z, l(-1)\n      ishl r10.xyz, r5.xyzx, icb[r0.w + 64].x\n      ishl r11.xyz, r6.xyzx, icb[r0.w + 64].x\n      ishr r10.xyz, r10.xyzx, l(16)\n      ishr r11.xyz, r11.xyzx, l(16)\n      movc r8.xyz, r8.xyzx, r2.zzzz, r10.xyzx\n      movc r9.xyz, r9.xyzx, r2.zzzz, r11.xyzx\n      movc r7.xyz, r7.xyzx, r5.xyzx, r8.xyzx\n      movc r1.xyw, r1.xyxw, r6.xyxz, r9.xyxz\n    else \n      ige r2.z, icb[r0.w + 64].x, l(16)\n      and r2.z, r2.z, l(1)\n      movc r8.xyz, r5.xyzx, l(0,0,0,0), l(1,1,1,0)\n      movc r9.xyz, r6.xyzx, l(0,0,0,0), l(1,1,1,0)\n      or r8.xyz, r2.zzzz, r8.xyzx\n      or r9.xyz, r2.zzzz, r9.xyzx\n      ige r10.xyz, r5.xyzx, l(0, 0, 0, 0)\n      ige r11.xyz, r6.xyzx, l(0, 0, 0, 0)\n      ieq r12.xyz, r5.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n      ieq r13.xyz, r6.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n      iadd r2.z, l(-1), icb[r0.w + 64].x\n      ishl r2.w, l(1), r2.z\n      iadd r4.w, r2.w, l(-1)\n      ishl r14.xyz, r5.xyzx, r2.z\n      ishl r15.xyz, r6.xyzx, r2.z\n      ishr r14.xyz, r14.xyzx, l(15)\n      ishr r15.xyz, r15.xyzx, l(15)\n      movc r12.xyz, r12.xyzx, r4.wwww, r14.xyzx\n      movc r13.xyz, r13.xyzx, r4.wwww, r15.xyzx\n      ineg r14.xyz, r5.xyzx\n      ineg r15.xyz, r6.xyzx\n      ieq r16.xyz, r14.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n      ieq r17.xyz, r15.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n      iadd r2.w, -r2.w, l(1)\n      ishl r14.xyz, r14.xyzx, r2.z\n      ishl r15.xyz, r15.xyzx, r2.z\n      ishr r14.xyz, r14.xyzx, l(15)\n      ishr r15.xyz, r15.xyzx, l(15)\n      ineg r14.xyz, r14.xyzx\n      ineg r15.xyz, r15.xyzx\n      movc r14.xyz, r16.xyzx, r2.wwww, r14.xyzx\n      movc r15.xyz, r17.xyzx, r2.wwww, r15.xyzx\n      movc r10.xyz, r10.xyzx, r12.xyzx, r14.xyzx\n      movc r11.xyz, r11.xyzx, r13.xyzx, r15.xyzx\n      movc r7.xyz, r8.xyzx, r5.xyzx, r10.xyzx\n      movc r1.xyw, r9.xyxz, r6.xyxz, r11.xyxz\n    endif \n    iadd r5.xyz, -r4.xyzx, r7.xyzx\n    iadd r4.xyz, -r4.xyzx, r1.xywx\n    mov r5.w, r4.x\n    mov r7.w, r1.x\n    movc r5.xyzw, icb[r0.w + 32].xxxx, r5.xyzw, r7.xyzw\n    movc r1.xy, icb[r0.w + 32].xxxx, r4.yzyy, r1.ywyy\n    store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r5.xyzw\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(68), r1.xyxx\n  endif \nendif \nif_nz r1.z\n  iadd r1.x, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r4.xyz, r1.x, l(52), g0.xyzx\n  ld_structured r1.xyz, r1.x, l(64), g0.yzxx\n  if_z r0.z\n    ult r1.w, l(10), r2.x\n    if_nz r1.w\n      ishl r5.x, l(1), icb[r0.w + 64].x\n      ishl r5.y, l(1), icb[r0.w + 64].y\n      ishl r5.z, l(1), icb[r0.w + 64].z\n      ishl r5.w, l(1), icb[r0.w + 64].w\n      ige r6.xyz, r1.zxyz, l(0, 0, 0, 0)\n      iadd r7.xyz, l(-1, -1, -1, 0), icb[r0.w + 64].yzwy\n      ishl r8.x, l(1), r7.x\n      ishl r8.y, l(1), r7.y\n      ishl r8.z, l(1), r7.z\n      ige r7.xyz, r1.zxyz, r8.xyzx\n      iadd r9.xyz, r8.xyzx, l(-1, -1, -1, 0)\n      movc r7.xyz, r7.xyzx, r9.xyzx, r1.zxyz\n      ineg r9.xyz, r1.zxyz\n      ilt r9.xyz, r8.xyzx, r9.xyzx\n      iadd r5.xyzw, r5.xyzw, l(-1, -1, -1, -1)\n      and r5.yzw, r1.zzxy, r5.yyzw\n      movc r5.yzw, r9.xxyz, r8.xxyz, r5.yyzw\n      movc r5.yzw, r6.xxyz, r7.xxyz, r5.yyzw\n      mov r4.w, r1.z\n      and r6.xyzw, r4.xyzw, r5.xxxx\n      and r2.zw, r1.xxxy, r5.xxxx\n      mov r7.xyz, r6.xyzx\n      mov r7.w, r5.y\n      movc r4.xyzw, icb[r0.w + 32].xxxx, r7.xyzw, r6.xyzw\n      movc r1.xy, icb[r0.w + 32].xxxx, r5.zwzz, r2.zwzz\n    else \n      if_nz icb[r0.w + 32].x\n        ishl r5.x, l(1), icb[r0.w + 64].x\n        ishl r5.y, l(1), icb[r0.w + 64].y\n        ishl r5.z, l(1), icb[r0.w + 64].z\n        ishl r5.w, l(1), icb[r0.w + 64].w\n        iadd r5.xyzw, r5.xyzw, l(-1, -1, -1, -1)\n        and r4.xyz, r4.xyzx, r5.xxxx\n        ige r6.xyz, r1.zxyz, l(0, 0, 0, 0)\n        iadd r7.xyz, l(-1, -1, -1, 0), icb[r0.w + 64].yzwy\n        ishl r8.x, l(1), r7.x\n        ishl r8.y, l(1), r7.y\n        ishl r8.z, l(1), r7.z\n        ige r7.xyz, r1.zxyz, r8.xyzx\n        iadd r9.xyz, r8.xyzx, l(-1, -1, -1, 0)\n        movc r7.xyz, r7.xyzx, r9.xyzx, r1.zxyz\n        ineg r9.xyz, r1.zxyz\n        ilt r9.xyz, r8.xyzx, r9.xyzx\n        and r5.xyz, r1.zxyz, r5.yzwy\n        movc r5.xyz, r9.xyzx, r8.xyzx, r5.xyzx\n        movc r1.xyz, r6.yzxy, r7.yzxy, r5.yzxy\n        mov r4.w, r1.z\n      else \n        ishl r1.w, l(1), icb[r0.w + 64].x\n        iadd r1.w, r1.w, l(-1)\n        mov r4.w, r1.z\n        and r4.xyzw, r1.wwww, r4.xyzw\n        and r1.xy, r1.wwww, r1.xyxx\n      endif \n    endif \n  else \n    uge r1.w, l(10), r2.x\n    if_nz r1.w\n      if_nz icb[r0.w + 32].x\n        ige r5.xyz, r4.xyzx, l(0, 0, 0, 0)\n        iadd r6.xyz, l(-1, -1, -1, 0), icb[r0.w + 64].yzwy\n        ishl r7.x, l(1), r6.x\n        ishl r7.y, l(1), r6.y\n        ishl r7.z, l(1), r6.z\n        ige r6.xyz, r4.xyzx, r7.xyzx\n        iadd r8.xyz, r7.xyzx, l(-1, -1, -1, 0)\n        movc r6.xyz, r6.xyzx, r8.xyzx, r4.xyzx\n        ineg r9.xyz, r4.xyzx\n        ilt r9.xyz, r7.xyzx, r9.xyzx\n        ishl r10.x, l(1), icb[r0.w + 64].y\n        ishl r10.y, l(1), icb[r0.w + 64].z\n        ishl r10.z, l(1), icb[r0.w + 64].w\n        iadd r10.xyz, r10.xyzx, l(-1, -1, -1, 0)\n        and r11.xyz, r4.xyzx, r10.xyzx\n        movc r9.xyz, r9.xyzx, r7.xyzx, r11.xyzx\n        movc r4.xyz, r5.xyzx, r6.xyzx, r9.xyzx\n        ige r5.xyz, r1.zxyz, l(0, 0, 0, 0)\n        ige r6.xyz, r1.zxyz, r7.xyzx\n        movc r6.xyz, r6.xyzx, r8.xyzx, r1.zxyz\n        ineg r8.xyz, r1.zxyz\n        ilt r8.xyz, r7.xyzx, r8.xyzx\n        and r9.xyz, r1.zxyz, r10.xyzx\n        movc r7.xyz, r8.xyzx, r7.xyzx, r9.xyzx\n        movc r1.xyz, r5.yzxy, r6.yzxy, r7.yzxy\n        mov r4.w, r1.z\n      else \n        ishl r0.w, l(1), icb[r0.w + 64].x\n        iadd r0.w, r0.w, l(-1)\n        mov r4.w, r1.z\n        and r4.xyzw, r0.wwww, r4.xyzw\n        and r1.xy, r0.wwww, r1.xyxx\n      endif \n    else \n      mov r4.w, r1.z\n    endif \n  endif \n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r4.xyzw\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(68), r1.xyxx\nendif \nif_z r0.z\n  ld_structured r1.xyzw, r0.y, l(52), g0.xyzw\n  ld_structured r4.xy, r0.y, l(68), g0.xyxx\n  ult r0.z, l(10), r2.x\n  if_nz r0.z\n    and r3.w, r3.x, l(-2)\n    ieq r0.z, r2.x, l(11)\n    if_nz r0.z\n      ishl r5.x, r1.x, l(5)\n      ishl r5.y, r1.y, l(15)\n      ishl r5.z, r1.z, l(25)\n      ishl r5.w, r1.w, l(3)\n      and r5.xyzw, r5.xyzw, l(32, 0x00008000, 0x02000000, 8)\n      iadd r0.z, r5.x, l(3)\n      ishr r0.w, r1.x, l(1)\n      ishr r2.z, r1.x, l(2)\n      ishr r2.w, r1.x, l(3)\n      ishr r4.z, r1.x, l(4)\n      ishl r6.x, r0.w, l(6)\n      ishl r6.y, r2.z, l(7)\n      ishl r6.z, r2.w, l(8)\n      ishl r6.w, r4.z, l(9)\n      and r6.xyzw, r6.xyzw, l(64, 128, 256, 512)\n      iadd r0.z, r0.z, r6.x\n      iadd r0.z, r6.y, r0.z\n      iadd r0.z, r6.z, r0.z\n      iadd r0.z, r6.w, r0.z\n      ishr r0.w, r1.x, l(5)\n      ishr r2.z, r1.x, l(6)\n      ishr r2.w, r1.x, l(7)\n      ishr r4.z, r1.x, l(8)\n      ishl r6.x, r0.w, l(10)\n      ishl r6.y, r2.z, l(11)\n      ishl r6.z, r2.w, l(12)\n      ishl r6.w, r4.z, l(13)\n      and r6.xyzw, r6.xyzw, l(1024, 2048, 4096, 8192)\n      iadd r0.z, r0.z, r6.x\n      iadd r0.z, r6.y, r0.z\n      iadd r0.z, r6.z, r0.z\n      iadd r0.z, r6.w, r0.z\n      ishr r0.w, r1.x, l(9)\n      ishr r2.z, r1.y, l(1)\n      ishr r2.w, r1.y, l(2)\n      ishr r4.z, r1.y, l(3)\n      ishl r6.x, r0.w, l(14)\n      ishl r6.y, r2.z, l(16)\n      ishl r6.z, r2.w, l(17)\n      ishl r6.w, r4.z, l(18)\n      and r6.xyzw, r6.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n      iadd r0.z, r0.z, r6.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r6.y, r0.z\n      iadd r0.z, r6.z, r0.z\n      iadd r0.z, r6.w, r0.z\n      ishr r0.w, r1.y, l(4)\n      ishr r2.z, r1.y, l(5)\n      ishr r2.w, r1.y, l(6)\n      ishr r4.z, r1.y, l(7)\n      ishl r6.x, r0.w, l(19)\n      ishl r6.y, r2.z, l(20)\n      ishl r6.z, r2.w, l(21)\n      ishl r6.w, r4.z, l(22)\n      and r6.xyzw, r6.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n      iadd r0.z, r0.z, r6.x\n      iadd r0.z, r6.y, r0.z\n      iadd r0.z, r6.z, r0.z\n      iadd r0.z, r6.w, r0.z\n      ishr r0.w, r1.y, l(8)\n      ishr r2.z, r1.y, l(9)\n      ishr r2.w, r1.z, l(1)\n      ishr r4.z, r1.z, l(2)\n      ishl r6.x, r0.w, l(23)\n      ishl r6.y, r2.z, l(24)\n      ishl r6.z, r2.w, l(26)\n      ishl r6.w, r4.z, l(27)\n      and r6.xyzw, r6.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n      iadd r0.z, r0.z, r6.x\n      iadd r0.z, r6.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r6.z, r0.z\n      iadd r0.z, r6.w, r0.z\n      ishr r0.w, r1.z, l(3)\n      ishr r2.z, r1.z, l(4)\n      ishr r2.w, r1.z, l(5)\n      ishr r4.z, r1.z, l(6)\n      ishl r5.x, r0.w, l(28)\n      ishl r5.y, r2.z, l(29)\n      ishl r5.z, r2.w, l(30)\n      ishl r0.w, r4.z, l(31)\n      and r5.xyz, r5.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r3.x, r0.w, r0.z\n      ishr r0.z, r1.z, l(7)\n      ishr r0.w, r1.z, l(8)\n      ishr r2.z, r1.z, l(9)\n      ishr r2.w, r1.w, l(1)\n      and r0.z, r0.z, l(1)\n      ishl r5.x, r0.w, l(1)\n      ishl r5.y, r2.z, l(2)\n      ishl r5.z, r2.w, l(4)\n      and r5.xyz, r5.xyzx, l(2, 4, 16, 0)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.w, r0.z\n      iadd r0.z, r5.z, r0.z\n      ishr r0.w, r1.w, l(2)\n      ishr r2.z, r1.w, l(3)\n      ishr r2.w, r1.w, l(4)\n      ishr r4.z, r1.w, l(5)\n      ishl r5.x, r0.w, l(5)\n      ishl r5.y, r2.z, l(6)\n      ishl r5.z, r2.w, l(7)\n      ishl r5.w, r4.z, l(8)\n      and r5.xyzw, r5.xyzw, l(32, 64, 128, 256)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishr r0.w, r1.w, l(6)\n      ishr r2.z, r1.w, l(7)\n      ishr r2.w, r1.w, l(8)\n      ishr r4.z, r1.w, l(9)\n      ishl r5.x, r0.w, l(9)\n      ishl r5.y, r2.z, l(10)\n      ishl r5.z, r2.w, l(11)\n      ishl r5.w, r4.z, l(12)\n      and r5.xyzw, r5.xyzw, l(512, 1024, 2048, 4096)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishl r5.x, r4.x, l(13)\n      ishl r5.y, r4.y, l(23)\n      and r2.zw, r5.xxxy, l(0, 0, 8192, 0x00800000)\n      iadd r0.z, r0.z, r2.z\n      ishr r0.w, r4.x, l(1)\n      ishr r2.z, r4.x, l(2)\n      ishr r4.z, r4.x, l(3)\n      ishr r4.w, r4.x, l(4)\n      ishl r5.x, r0.w, l(14)\n      ishl r5.y, r2.z, l(15)\n      ishl r5.z, r4.z, l(16)\n      ishl r5.w, r4.w, l(17)\n      and r5.xyzw, r5.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishr r0.w, r4.x, l(5)\n      ishr r2.z, r4.x, l(6)\n      ishr r4.z, r4.x, l(7)\n      ishr r4.w, r4.x, l(8)\n      ishl r5.x, r0.w, l(18)\n      ishl r5.y, r2.z, l(19)\n      ishl r5.z, r4.z, l(20)\n      ishl r5.w, r4.w, l(21)\n      and r5.xyzw, r5.xyzw, l(0x00040000, 0x00080000, 0x00100000, 0x00200000)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishr r0.w, r4.x, l(9)\n      ishr r2.z, r4.y, l(1)\n      ishr r4.z, r4.y, l(2)\n      ishr r4.w, r4.y, l(3)\n      ishl r5.x, r0.w, l(22)\n      ishl r5.y, r2.z, l(24)\n      ishl r5.z, r4.z, l(25)\n      ishl r5.w, r4.w, l(26)\n      and r5.xyzw, r5.xyzw, l(0x00400000, 0x01000000, 0x02000000, 0x04000000)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r2.w, r0.z\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishr r0.w, r4.y, l(4)\n      ishr r2.z, r4.y, l(5)\n      ishr r2.w, r4.y, l(6)\n      ishr r4.z, r4.y, l(7)\n      ishl r5.x, r0.w, l(27)\n      ishl r5.y, r2.z, l(28)\n      ishl r5.z, r2.w, l(29)\n      ishl r5.w, r4.z, l(30)\n      and r5.xyzw, r5.xyzw, l(0x08000000, 0x10000000, 0x20000000, 0x40000000)\n      iadd r0.z, r0.z, r5.x\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r5.z, r0.z\n      iadd r0.z, r5.w, r0.z\n      ishr r0.w, r4.y, l(8)\n      ishr r2.z, r4.y, l(9)\n      ishl r0.w, r0.w, l(31)\n      iadd r3.z, r0.w, r0.z\n      and r0.z, r2.z, l(1)\n      iadd r3.w, r0.z, r3.w\n    else \n      ieq r0.z, r2.x, l(12)\n      if_nz r0.z\n        ishl r5.x, r1.x, l(5)\n        ishl r5.y, r1.y, l(15)\n        ishl r5.z, r1.z, l(25)\n        ishl r5.w, r1.w, l(3)\n        and r5.xyzw, r5.xyzw, l(32, 0x00008000, 0x02000000, 8)\n        iadd r0.z, r5.x, l(7)\n        ishr r0.w, r1.x, l(1)\n        ishr r2.z, r1.x, l(2)\n        ishr r2.w, r1.x, l(3)\n        ishr r4.z, r1.x, l(4)\n        ishl r6.x, r0.w, l(6)\n        ishl r6.y, r2.z, l(7)\n        ishl r6.z, r2.w, l(8)\n        ishl r6.w, r4.z, l(9)\n        and r6.xyzw, r6.xyzw, l(64, 128, 256, 512)\n        iadd r0.z, r0.z, r6.x\n        iadd r0.z, r6.y, r0.z\n        iadd r0.z, r6.z, r0.z\n        iadd r0.z, r6.w, r0.z\n        ishr r0.w, r1.x, l(5)\n        ishr r2.z, r1.x, l(6)\n        ishr r2.w, r1.x, l(7)\n        ishr r4.z, r1.x, l(8)\n        ishl r6.x, r0.w, l(10)\n        ishl r6.y, r2.z, l(11)\n        ishl r6.z, r2.w, l(12)\n        ishl r6.w, r4.z, l(13)\n        and r6.xyzw, r6.xyzw, l(1024, 2048, 4096, 8192)\n        iadd r0.z, r0.z, r6.x\n        iadd r0.z, r6.y, r0.z\n        iadd r0.z, r6.z, r0.z\n        iadd r0.z, r6.w, r0.z\n        ishr r0.w, r1.x, l(9)\n        ishr r2.z, r1.y, l(1)\n        ishr r2.w, r1.y, l(2)\n        ishr r4.z, r1.y, l(3)\n        ishl r6.x, r0.w, l(14)\n        ishl r6.y, r2.z, l(16)\n        ishl r6.z, r2.w, l(17)\n        ishl r6.w, r4.z, l(18)\n        and r6.xyzw, r6.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n        iadd r0.z, r0.z, r6.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r6.y, r0.z\n        iadd r0.z, r6.z, r0.z\n        iadd r0.z, r6.w, r0.z\n        ishr r0.w, r1.y, l(4)\n        ishr r2.z, r1.y, l(5)\n        ishr r2.w, r1.y, l(6)\n        ishr r4.z, r1.y, l(7)\n        ishl r6.x, r0.w, l(19)\n        ishl r6.y, r2.z, l(20)\n        ishl r6.z, r2.w, l(21)\n        ishl r6.w, r4.z, l(22)\n        and r6.xyzw, r6.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n        iadd r0.z, r0.z, r6.x\n        iadd r0.z, r6.y, r0.z\n        iadd r0.z, r6.z, r0.z\n        iadd r0.z, r6.w, r0.z\n        ishr r0.w, r1.y, l(8)\n        ishr r2.z, r1.y, l(9)\n        ishr r2.w, r1.z, l(1)\n        ishr r4.z, r1.z, l(2)\n        ishl r6.x, r0.w, l(23)\n        ishl r6.y, r2.z, l(24)\n        ishl r6.z, r2.w, l(26)\n        ishl r6.w, r4.z, l(27)\n        and r6.xyzw, r6.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n        iadd r0.z, r0.z, r6.x\n        iadd r0.z, r6.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r6.z, r0.z\n        iadd r0.z, r6.w, r0.z\n        ishr r0.w, r1.z, l(3)\n        ishr r2.z, r1.z, l(4)\n        ishr r2.w, r1.z, l(5)\n        ishr r4.z, r1.z, l(6)\n        ishl r5.x, r0.w, l(28)\n        ishl r5.y, r2.z, l(29)\n        ishl r5.z, r2.w, l(30)\n        ishl r0.w, r4.z, l(31)\n        and r5.xyz, r5.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r3.x, r0.w, r0.z\n        ishr r0.z, r1.z, l(7)\n        ishr r0.w, r1.z, l(8)\n        ishr r2.z, r1.z, l(9)\n        ishr r2.w, r1.w, l(1)\n        and r0.z, r0.z, l(1)\n        ishl r5.x, r0.w, l(1)\n        ishl r5.y, r2.z, l(2)\n        ishl r5.z, r2.w, l(4)\n        and r5.xyz, r5.xyzx, l(2, 4, 16, 0)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.w, r0.z\n        iadd r0.z, r5.z, r0.z\n        ishr r0.w, r1.w, l(2)\n        ishr r2.z, r1.w, l(3)\n        ishr r2.w, r1.w, l(4)\n        ishr r4.z, r1.w, l(5)\n        ishl r5.x, r0.w, l(5)\n        ishl r5.y, r2.z, l(6)\n        ishl r5.z, r2.w, l(7)\n        ishl r5.w, r4.z, l(8)\n        and r5.xyzw, r5.xyzw, l(32, 64, 128, 256)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r5.w, r0.z\n        ishr r0.w, r1.w, l(6)\n        ishr r2.z, r1.w, l(7)\n        ishr r2.w, r1.w, l(8)\n        ishr r4.z, r1.x, l(10)\n        ishl r5.x, r0.w, l(9)\n        ishl r5.y, r2.z, l(10)\n        ishl r5.z, r2.w, l(11)\n        ishl r5.w, r4.z, l(12)\n        and r5.xyzw, r5.xyzw, l(512, 1024, 2048, 4096)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r5.w, r0.z\n        ishl r5.x, r4.x, l(13)\n        ishl r5.y, r4.y, l(23)\n        and r2.zw, r5.xxxy, l(0, 0, 8192, 0x00800000)\n        iadd r0.z, r0.z, r2.z\n        ishr r0.w, r4.x, l(1)\n        ishr r2.z, r4.x, l(2)\n        ishr r4.z, r4.x, l(3)\n        ishr r4.w, r4.x, l(4)\n        ishl r5.x, r0.w, l(14)\n        ishl r5.y, r2.z, l(15)\n        ishl r5.z, r4.z, l(16)\n        ishl r5.w, r4.w, l(17)\n        and r5.xyzw, r5.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r5.w, r0.z\n        ishr r0.w, r4.x, l(5)\n        ishr r2.z, r4.x, l(6)\n        ishr r4.z, r4.x, l(7)\n        ishr r4.w, r4.x, l(8)\n        ishl r5.x, r0.w, l(18)\n        ishl r5.y, r2.z, l(19)\n        ishl r5.z, r4.z, l(20)\n        ishl r5.w, r4.w, l(21)\n        and r5.xyzw, r5.xyzw, l(0x00040000, 0x00080000, 0x00100000, 0x00200000)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r5.w, r0.z\n        ishr r4.zw, r1.yyyz, l(10)\n        ishl r0.w, r4.z, l(22)\n        and r0.w, r0.w, l(0x00400000)\n        iadd r0.z, r0.w, r0.z\n        iadd r0.z, r2.w, r0.z\n        ishr r0.w, r4.y, l(1)\n        ishr r2.z, r4.y, l(2)\n        ishr r2.w, r4.y, l(3)\n        ishr r4.z, r4.y, l(4)\n        ishl r5.x, r0.w, l(24)\n        ishl r5.y, r2.z, l(25)\n        ishl r5.z, r2.w, l(26)\n        ishl r5.w, r4.z, l(27)\n        and r5.xyzw, r5.xyzw, l(0x01000000, 0x02000000, 0x04000000, 0x08000000)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r5.w, r0.z\n        ishr r0.w, r4.y, l(5)\n        ishr r2.z, r4.y, l(6)\n        ishr r2.w, r4.y, l(7)\n        ishr r4.z, r4.y, l(8)\n        ishl r5.x, r0.w, l(28)\n        ishl r5.y, r2.z, l(29)\n        ishl r5.z, r2.w, l(30)\n        ishl r0.w, r4.z, l(31)\n        and r5.xyz, r5.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n        iadd r0.z, r0.z, r5.x\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r5.z, r0.z\n        iadd r3.z, r0.w, r0.z\n        and r0.z, r4.w, l(1)\n        iadd r3.w, r0.z, r3.w\n      else \n        ieq r0.z, r2.x, l(13)\n        if_nz r0.z\n          ishl r5.x, r1.x, l(5)\n          ishl r5.y, r1.y, l(15)\n          ishl r5.z, r1.z, l(25)\n          ishl r5.w, r1.w, l(3)\n          and r5.xyzw, r5.xyzw, l(32, 0x00008000, 0x02000000, 8)\n          iadd r0.z, r5.x, l(11)\n          ishr r0.w, r1.x, l(1)\n          ishr r2.z, r1.x, l(2)\n          ishr r2.w, r1.x, l(3)\n          ishr r4.z, r1.x, l(4)\n          ishl r6.x, r0.w, l(6)\n          ishl r6.y, r2.z, l(7)\n          ishl r6.z, r2.w, l(8)\n          ishl r6.w, r4.z, l(9)\n          and r6.xyzw, r6.xyzw, l(64, 128, 256, 512)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r1.x, l(5)\n          ishr r2.z, r1.x, l(6)\n          ishr r2.w, r1.x, l(7)\n          ishr r4.z, r1.x, l(8)\n          ishl r6.x, r0.w, l(10)\n          ishl r6.y, r2.z, l(11)\n          ishl r6.z, r2.w, l(12)\n          ishl r6.w, r4.z, l(13)\n          and r6.xyzw, r6.xyzw, l(1024, 2048, 4096, 8192)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r1.x, l(9)\n          ishr r2.z, r1.y, l(1)\n          ishr r2.w, r1.y, l(2)\n          ishr r4.z, r1.y, l(3)\n          ishl r6.x, r0.w, l(14)\n          ishl r6.y, r2.z, l(16)\n          ishl r6.z, r2.w, l(17)\n          ishl r6.w, r4.z, l(18)\n          and r6.xyzw, r6.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r5.y, r0.z\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r1.y, l(4)\n          ishr r2.z, r1.y, l(5)\n          ishr r2.w, r1.y, l(6)\n          ishr r4.z, r1.y, l(7)\n          ishl r6.x, r0.w, l(19)\n          ishl r6.y, r2.z, l(20)\n          ishl r6.z, r2.w, l(21)\n          ishl r6.w, r4.z, l(22)\n          and r6.xyzw, r6.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r1.y, l(8)\n          ishr r2.z, r1.y, l(9)\n          ishr r2.w, r1.z, l(1)\n          ishr r4.z, r1.z, l(2)\n          ishl r6.x, r0.w, l(23)\n          ishl r6.y, r2.z, l(24)\n          ishl r6.z, r2.w, l(26)\n          ishl r6.w, r4.z, l(27)\n          and r6.xyzw, r6.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r5.z, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r1.z, l(3)\n          ishr r2.z, r1.z, l(4)\n          ishr r2.w, r1.z, l(5)\n          ishr r4.z, r1.z, l(6)\n          ishl r5.x, r0.w, l(28)\n          ishl r5.y, r2.z, l(29)\n          ishl r5.z, r2.w, l(30)\n          ishl r0.w, r4.z, l(31)\n          and r5.xyz, r5.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n          iadd r0.z, r0.z, r5.x\n          iadd r0.z, r5.y, r0.z\n          iadd r0.z, r5.z, r0.z\n          iadd r3.x, r0.w, r0.z\n          ishr r0.z, r1.z, l(7)\n          ishr r0.w, r1.z, l(8)\n          ishr r2.z, r1.z, l(9)\n          ishr r2.w, r1.w, l(1)\n          and r0.z, r0.z, l(1)\n          ishl r5.x, r0.w, l(1)\n          ishl r5.y, r2.z, l(2)\n          ishl r5.z, r2.w, l(4)\n          and r5.xyz, r5.xyzx, l(2, 4, 16, 0)\n          iadd r0.z, r0.z, r5.x\n          iadd r0.z, r5.y, r0.z\n          iadd r0.z, r5.w, r0.z\n          iadd r0.z, r5.z, r0.z\n          ishr r0.w, r1.w, l(2)\n          ishr r2.z, r1.w, l(3)\n          ishr r2.w, r1.w, l(4)\n          ishr r4.z, r1.w, l(5)\n          ishl r5.x, r0.w, l(5)\n          ishl r5.y, r2.z, l(6)\n          ishl r5.z, r2.w, l(7)\n          ishl r5.w, r4.z, l(8)\n          and r5.xyzw, r5.xyzw, l(32, 64, 128, 256)\n          iadd r0.z, r0.z, r5.x\n          iadd r0.z, r5.y, r0.z\n          iadd r0.z, r5.z, r0.z\n          iadd r0.z, r5.w, r0.z\n          ishr r0.w, r1.w, l(6)\n          ishr r2.z, r1.w, l(7)\n          ishr r2.w, r1.x, l(10)\n          ishr r4.z, r1.y, l(11)\n          ishl r5.x, r0.w, l(9)\n          ishl r5.y, r2.z, l(10)\n          ishl r5.z, r2.w, l(12)\n          ishl r5.w, r4.z, l(21)\n          and r5.xyzw, r5.xyzw, l(512, 1024, 4096, 0x00200000)\n          iadd r0.z, r0.z, r5.x\n          iadd r0.z, r5.y, r0.z\n          and r0.w, r1.x, l(2048)\n          iadd r0.z, r0.w, r0.z\n          iadd r0.z, r5.z, r0.z\n          ishl r5.x, r4.x, l(13)\n          ishl r5.y, r4.y, l(23)\n          and r2.zw, r5.xxxy, l(0, 0, 8192, 0x00800000)\n          iadd r0.z, r0.z, r2.z\n          ishr r0.w, r4.x, l(1)\n          ishr r2.z, r4.x, l(2)\n          ishr r4.z, r4.x, l(3)\n          ishr r4.w, r4.x, l(4)\n          ishl r6.x, r0.w, l(14)\n          ishl r6.y, r2.z, l(15)\n          ishl r6.z, r4.z, l(16)\n          ishl r6.w, r4.w, l(17)\n          and r6.xyzw, r6.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r0.w, r4.x, l(5)\n          ishr r2.z, r4.x, l(6)\n          ishr r4.z, r4.x, l(7)\n          ishr r4.w, r4.y, l(1)\n          ishl r6.x, r0.w, l(18)\n          ishl r6.y, r2.z, l(19)\n          ishl r6.z, r4.z, l(20)\n          ishl r6.w, r4.w, l(24)\n          and r6.xyzw, r6.xyzw, l(0x00040000, 0x00080000, 0x00100000, 0x01000000)\n          iadd r0.z, r0.z, r6.x\n          iadd r0.z, r6.y, r0.z\n          iadd r0.z, r6.z, r0.z\n          iadd r0.z, r5.w, r0.z\n          ishr r4.zw, r1.yyyz, l(10)\n          ishr r0.w, r1.z, l(11)\n          ishl r2.z, r4.z, l(22)\n          ishl r0.w, r0.w, l(31)\n          and r2.z, r2.z, l(0x00400000)\n          iadd r0.z, r0.z, r2.z\n          iadd r0.z, r2.w, r0.z\n          iadd r0.z, r6.w, r0.z\n          ishr r2.z, r4.y, l(2)\n          ishr r2.w, r4.y, l(3)\n          ishr r4.z, r4.y, l(4)\n          ishr r5.x, r4.y, l(5)\n          ishl r6.x, r2.z, l(25)\n          ishl r6.y, r2.w, l(26)\n          ishl r6.z, r4.z, l(27)\n          ishl r6.w, r5.x, l(28)\n          and r5.xyzw, r6.xyzw, l(0x02000000, 0x04000000, 0x08000000, 0x10000000)\n          iadd r0.z, r0.z, r5.x\n          iadd r0.z, r5.y, r0.z\n          iadd r0.z, r5.z, r0.z\n          iadd r0.z, r5.w, r0.z\n          ishr r2.z, r4.y, l(6)\n          ishr r2.w, r4.y, l(7)\n          ishl r5.x, r2.z, l(29)\n          ishl r5.y, r2.w, l(30)\n          and r2.zw, r5.xxxy, l(0, 0, 0x20000000, 0x40000000)\n          iadd r0.z, r0.z, r2.z\n          iadd r0.z, r2.w, r0.z\n          iadd r3.z, r0.w, r0.z\n          and r0.z, r4.w, l(1)\n          iadd r3.w, r0.z, r3.w\n        else \n          ieq r0.z, r2.x, l(14)\n          if_nz r0.z\n            ishl r5.x, r1.x, l(5)\n            ishl r5.y, r1.y, l(15)\n            ishl r5.z, r1.z, l(25)\n            ishl r5.w, r1.w, l(3)\n            and r5.xyzw, r5.xyzw, l(32, 0x00008000, 0x02000000, 8)\n            iadd r0.z, r5.x, l(15)\n            ishr r0.w, r1.x, l(1)\n            ishr r2.z, r1.x, l(2)\n            ishr r2.w, r1.x, l(3)\n            ishr r4.z, r1.x, l(4)\n            ishl r6.x, r0.w, l(6)\n            ishl r6.y, r2.z, l(7)\n            ishl r6.z, r2.w, l(8)\n            ishl r6.w, r4.z, l(9)\n            and r6.xyzw, r6.xyzw, l(64, 128, 256, 512)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r1.x, l(5)\n            ishr r2.z, r1.x, l(6)\n            ishr r2.w, r1.x, l(7)\n            ishr r4.z, r1.x, l(8)\n            ishl r6.x, r0.w, l(10)\n            ishl r6.y, r2.z, l(11)\n            ishl r6.z, r2.w, l(12)\n            ishl r6.w, r4.z, l(13)\n            and r6.xyzw, r6.xyzw, l(1024, 2048, 4096, 8192)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r1.x, l(9)\n            ishr r2.z, r1.y, l(1)\n            ishr r2.w, r1.y, l(2)\n            ishr r4.z, r1.y, l(3)\n            ishl r6.x, r0.w, l(14)\n            ishl r6.y, r2.z, l(16)\n            ishl r6.z, r2.w, l(17)\n            ishl r6.w, r4.z, l(18)\n            and r6.xyzw, r6.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r1.y, l(4)\n            ishr r2.z, r1.y, l(5)\n            ishr r2.w, r1.y, l(6)\n            ishr r4.z, r1.y, l(7)\n            ishl r6.x, r0.w, l(19)\n            ishl r6.y, r2.z, l(20)\n            ishl r6.z, r2.w, l(21)\n            ishl r6.w, r4.z, l(22)\n            and r6.xyzw, r6.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r1.y, l(8)\n            ishr r2.z, r1.y, l(9)\n            ishr r2.w, r1.z, l(1)\n            ishr r4.z, r1.z, l(2)\n            ishl r6.x, r0.w, l(23)\n            ishl r6.y, r2.z, l(24)\n            ishl r6.z, r2.w, l(26)\n            ishl r6.w, r4.z, l(27)\n            and r6.xyzw, r6.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r5.z, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r1.z, l(3)\n            ishr r2.z, r1.z, l(4)\n            ishr r2.w, r1.z, l(5)\n            ishr r4.z, r1.z, l(6)\n            ishl r5.x, r0.w, l(28)\n            ishl r5.y, r2.z, l(29)\n            ishl r5.z, r2.w, l(30)\n            ishl r0.w, r4.z, l(31)\n            and r5.xyz, r5.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r5.z, r0.z\n            iadd r3.x, r0.w, r0.z\n            ishr r0.z, r1.z, l(7)\n            ishr r0.w, r1.z, l(8)\n            ishr r2.z, r1.z, l(9)\n            ishr r2.w, r1.w, l(1)\n            and r0.z, r0.z, l(1)\n            ishl r5.x, r0.w, l(1)\n            ishl r5.y, r2.z, l(2)\n            ishl r5.z, r2.w, l(4)\n            and r5.xyz, r5.xyzx, l(2, 4, 16, 0)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r5.w, r0.z\n            iadd r0.z, r5.z, r0.z\n            ishr r0.w, r1.w, l(2)\n            ishr r2.z, r1.w, l(3)\n            ishr r2.w, r1.x, l(15)\n            ishr r4.z, r1.x, l(14)\n            ishl r5.x, r0.w, l(5)\n            ishl r5.y, r2.z, l(6)\n            ishl r5.z, r2.w, l(7)\n            ishl r5.w, r4.z, l(8)\n            and r5.xyzw, r5.xyzw, l(32, 64, 128, 256)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r5.z, r0.z\n            iadd r0.z, r5.w, r0.z\n            ishr r0.w, r1.x, l(13)\n            ishr r2.z, r1.x, l(12)\n            ishr r2.w, r1.x, l(10)\n            ishr r4.z, r1.y, l(15)\n            ishl r5.x, r0.w, l(9)\n            ishl r5.y, r2.z, l(10)\n            ishl r5.z, r2.w, l(12)\n            ishl r5.w, r4.z, l(17)\n            and r5.xyzw, r5.xyzw, l(512, 1024, 4096, 0x00020000)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r5.y, r0.z\n            and r0.w, r1.x, l(2048)\n            iadd r0.z, r0.w, r0.z\n            iadd r0.z, r5.z, r0.z\n            ishl r5.x, r4.x, l(13)\n            ishl r5.y, r4.y, l(23)\n            and r2.zw, r5.xxxy, l(0, 0, 8192, 0x00800000)\n            iadd r0.z, r0.z, r2.z\n            ishr r4.zw, r4.xxxy, l(1)\n            ishr r0.w, r4.x, l(2)\n            ishr r2.z, r4.x, l(3)\n            ishl r6.x, r4.z, l(14)\n            ishl r6.y, r0.w, l(15)\n            ishl r6.z, r2.z, l(16)\n            ishl r6.w, r4.w, l(24)\n            and r6.xyzw, r6.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x01000000)\n            iadd r0.z, r0.z, r6.x\n            iadd r0.z, r6.y, r0.z\n            iadd r0.z, r6.z, r0.z\n            iadd r0.z, r5.w, r0.z\n            ishr r0.w, r1.y, l(14)\n            ishr r2.z, r1.y, l(13)\n            ishr r4.z, r1.y, l(12)\n            ishr r4.w, r1.y, l(11)\n            ishl r5.x, r0.w, l(18)\n            ishl r5.y, r2.z, l(19)\n            ishl r5.z, r4.z, l(20)\n            ishl r5.w, r4.w, l(21)\n            and r5.xyzw, r5.xyzw, l(0x00040000, 0x00080000, 0x00100000, 0x00200000)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r5.z, r0.z\n            iadd r0.z, r5.w, r0.z\n            ishr r0.w, r1.y, l(10)\n            ishr r2.z, r1.z, l(15)\n            ishr r4.z, r1.z, l(14)\n            ishr r4.w, r1.z, l(13)\n            ishl r5.x, r0.w, l(22)\n            ishl r5.y, r2.z, l(27)\n            ishl r5.z, r4.z, l(28)\n            ishl r5.w, r4.w, l(29)\n            and r5.xyzw, r5.xyzw, l(0x00400000, 0x08000000, 0x10000000, 0x20000000)\n            iadd r0.z, r0.z, r5.x\n            iadd r0.z, r2.w, r0.z\n            iadd r0.z, r6.w, r0.z\n            ishr r0.w, r4.y, l(2)\n            ishr r2.z, r4.y, l(3)\n            ishl r6.x, r0.w, l(25)\n            ishl r6.y, r2.z, l(26)\n            and r2.zw, r6.xxxy, l(0, 0, 0x02000000, 0x04000000)\n            iadd r0.z, r0.z, r2.z\n            iadd r0.z, r2.w, r0.z\n            iadd r0.z, r5.y, r0.z\n            iadd r0.z, r5.z, r0.z\n            iadd r0.z, r5.w, r0.z\n            ishr r0.w, r1.z, l(12)\n            ishr r2.z, r1.z, l(11)\n            ishr r2.w, r1.z, l(10)\n            ishl r0.w, r0.w, l(30)\n            ishl r2.z, r2.z, l(31)\n            and r0.w, r0.w, l(0x40000000)\n            iadd r0.z, r0.w, r0.z\n            iadd r3.z, r2.z, r0.z\n            and r0.z, r2.w, l(1)\n            iadd r3.w, r0.z, r3.w\n          else \n            mov r3.xz, l(0,0,0,0)\n          endif \n        endif \n      endif \n    endif \n  else \n    iadd r0.y, r0.y, l(1)\n    ld_structured r5.xyzw, r0.y, l(52), g0.xyzw\n    ld_structured r6.xy, r0.y, l(68), g0.xyxx\n    and r3.w, r3.x, l(0xfffc0000)\n    ieq r0.y, r2.x, l(1)\n    if_nz r0.y\n      ishr r0.yz, r5.yyzy, l(4)\n      ishr r0.w, r5.y, l(1)\n      ishr r2.z, r5.y, l(2)\n      ishl r7.x, r0.y, l(2)\n      ishl r7.y, r0.z, l(3)\n      ishl r7.z, r0.w, l(10)\n      ishl r7.w, r2.z, l(11)\n      and r7.xyzw, r7.xyzw, l(4, 8, 1024, 2048)\n      iadd r0.y, r7.y, r7.x\n      and r0.z, r6.y, l(16)\n      iadd r0.y, r0.z, r0.y\n      ishl r8.x, r1.x, l(5)\n      ishl r8.y, r1.y, l(15)\n      ishl r8.z, r1.z, l(25)\n      ishl r8.w, r1.w, l(3)\n      and r8.xyzw, r8.xyzw, l(32, 0x00008000, 0x02000000, 8)\n      iadd r0.y, r0.y, r8.x\n      ishr r0.z, r1.x, l(1)\n      ishr r0.w, r1.x, l(2)\n      ishr r2.z, r1.x, l(3)\n      ishr r2.w, r1.x, l(4)\n      ishl r9.x, r0.z, l(6)\n      ishl r9.y, r0.w, l(7)\n      ishl r9.z, r2.z, l(8)\n      ishl r9.w, r2.w, l(9)\n      and r9.xyzw, r9.xyzw, l(64, 128, 256, 512)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r9.z, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r1.x, l(5)\n      ishr r0.w, r1.x, l(6)\n      ishr r2.z, r1.x, l(7)\n      ishr r2.w, r1.x, l(8)\n      ishl r9.x, r0.z, l(10)\n      ishl r9.y, r0.w, l(11)\n      ishl r9.z, r2.z, l(12)\n      ishl r9.w, r2.w, l(13)\n      and r9.xyzw, r9.xyzw, l(1024, 2048, 4096, 8192)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r9.z, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r1.x, l(9)\n      ishr r0.w, r1.y, l(1)\n      ishr r2.z, r1.y, l(2)\n      ishr r2.w, r1.y, l(3)\n      ishl r9.x, r0.z, l(14)\n      ishl r9.y, r0.w, l(16)\n      ishl r9.z, r2.z, l(17)\n      ishl r9.w, r2.w, l(18)\n      and r9.xyzw, r9.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r9.z, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r1.y, l(4)\n      ishr r0.w, r1.y, l(5)\n      ishr r2.z, r1.y, l(6)\n      ishr r2.w, r1.y, l(7)\n      ishl r9.x, r0.z, l(19)\n      ishl r9.y, r0.w, l(20)\n      ishl r9.z, r2.z, l(21)\n      ishl r9.w, r2.w, l(22)\n      and r9.xyzw, r9.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r9.z, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r1.y, l(8)\n      ishr r0.w, r1.y, l(9)\n      ishr r2.z, r1.z, l(1)\n      ishr r2.w, r1.z, l(2)\n      ishl r9.x, r0.z, l(23)\n      ishl r9.y, r0.w, l(24)\n      ishl r9.z, r2.z, l(26)\n      ishl r9.w, r2.w, l(27)\n      and r9.xyzw, r9.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      iadd r0.y, r9.z, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r1.z, l(3)\n      ishr r0.w, r1.z, l(4)\n      ishr r2.z, r1.z, l(5)\n      ishr r2.w, r1.z, l(6)\n      ishl r8.x, r0.z, l(28)\n      ishl r8.y, r0.w, l(29)\n      ishl r8.z, r2.z, l(30)\n      ishl r0.z, r2.w, l(31)\n      and r8.xyz, r8.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n      iadd r0.y, r0.y, r8.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      iadd r3.x, r0.z, r0.y\n      ishr r0.y, r1.z, l(7)\n      ishr r0.z, r1.z, l(8)\n      ishr r0.w, r1.z, l(9)\n      ishr r2.z, r1.w, l(1)\n      and r0.y, r0.y, l(1)\n      ishl r8.x, r0.z, l(1)\n      ishl r8.y, r0.w, l(2)\n      ishl r8.z, r2.z, l(4)\n      and r8.xyz, r8.xyzx, l(2, 4, 16, 0)\n      iadd r0.y, r0.y, r8.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.w, r0.y\n      iadd r0.y, r8.z, r0.y\n      ishr r0.z, r1.w, l(2)\n      ishr r0.w, r1.w, l(3)\n      ishr r2.z, r1.w, l(4)\n      ishl r8.x, r0.z, l(5)\n      ishl r8.y, r0.w, l(6)\n      ishl r8.z, r2.z, l(7)\n      and r8.xyz, r8.xyzx, l(32, 64, 128, 0)\n      iadd r0.y, r0.y, r8.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      ishr r0.z, r6.x, l(4)\n      ishr r0.w, r6.x, l(1)\n      ishr r2.z, r6.x, l(2)\n      ishr r2.w, r6.x, l(3)\n      ishl r8.x, r0.z, l(8)\n      ishl r8.y, r0.w, l(20)\n      ishl r8.z, r2.z, l(21)\n      ishl r8.w, r2.w, l(22)\n      and r8.xyzw, r8.xyzw, l(256, 0x00100000, 0x00200000, 0x00400000)\n      iadd r0.y, r0.y, r8.x\n      ishl r9.x, r5.y, l(9)\n      ishl r9.y, r5.z, l(29)\n      ishl r9.z, r5.x, l(1)\n      ishl r9.w, r5.w, l(7)\n      and r9.xyzw, r9.xyzw, l(512, 0x20000000, 2, 128)\n      iadd r0.y, r0.y, r9.x\n      iadd r0.y, r7.z, r0.y\n      iadd r0.y, r7.w, r0.y\n      ishr r0.zw, r5.yyyz, l(3)\n      ishr r2.z, r5.z, l(1)\n      ishr r2.w, r5.z, l(2)\n      ishl r7.x, r0.z, l(12)\n      ishl r7.y, r2.z, l(30)\n      ishl r0.z, r2.w, l(31)\n      and r2.zw, r7.xxxy, l(0, 0, 4096, 0x40000000)\n      iadd r0.y, r0.y, r2.z\n      ishl r7.x, r4.x, l(13)\n      ishl r7.y, r4.y, l(23)\n      and r4.zw, r7.xxxy, l(0, 0, 8192, 0x00800000)\n      iadd r0.y, r0.y, r4.z\n      ishr r2.z, r4.x, l(1)\n      ishr r4.z, r4.x, l(2)\n      ishr r6.z, r4.x, l(3)\n      ishr r6.w, r4.x, l(4)\n      ishl r7.x, r2.z, l(14)\n      ishl r7.y, r4.z, l(15)\n      ishl r7.z, r6.z, l(16)\n      ishl r7.w, r6.w, l(17)\n      and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n      iadd r0.y, r0.y, r7.x\n      iadd r0.y, r7.y, r0.y\n      iadd r0.y, r7.z, r0.y\n      iadd r0.y, r7.w, r0.y\n      ishl r7.x, r6.y, l(18)\n      ishl r7.y, r6.x, l(19)\n      and r6.zw, r7.xxxy, l(0, 0, 0x00040000, 0x00080000)\n      iadd r0.y, r0.y, r6.z\n      iadd r0.y, r6.w, r0.y\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      iadd r0.y, r8.w, r0.y\n      iadd r0.y, r4.w, r0.y\n      ishr r2.z, r4.y, l(1)\n      ishr r4.z, r4.y, l(2)\n      ishr r4.w, r4.y, l(3)\n      ishr r6.z, r4.y, l(4)\n      ishl r7.x, r2.z, l(24)\n      ishl r7.y, r4.z, l(25)\n      ishl r7.z, r4.w, l(26)\n      ishl r7.w, r6.z, l(27)\n      and r7.xyzw, r7.xyzw, l(0x01000000, 0x02000000, 0x04000000, 0x08000000)\n      iadd r0.y, r0.y, r7.x\n      iadd r0.y, r7.y, r0.y\n      iadd r0.y, r7.z, r0.y\n      iadd r0.y, r7.w, r0.y\n      ishr r2.z, r6.y, l(1)\n      ishr r4.z, r6.y, l(2)\n      ishr r4.w, r6.y, l(3)\n      ishl r7.x, r2.z, l(28)\n      ishl r7.y, r4.z, l(6)\n      ishl r7.z, r4.w, l(12)\n      and r7.xyz, r7.xyzx, l(0x10000000, 64, 4096, 0)\n      iadd r0.y, r0.y, r7.x\n      iadd r0.y, r9.y, r0.y\n      iadd r0.y, r2.w, r0.y\n      iadd r3.z, r0.z, r0.y\n      and r0.y, r0.w, l(1)\n      iadd r0.y, r0.y, r3.w\n      iadd r0.y, r9.z, r0.y\n      ishr r0.z, r5.x, l(1)\n      ishr r0.w, r5.x, l(2)\n      ishr r2.z, r5.x, l(3)\n      ishr r2.w, r5.x, l(4)\n      ishl r8.x, r0.z, l(2)\n      ishl r8.y, r0.w, l(3)\n      ishl r8.z, r2.z, l(4)\n      ishl r8.w, r2.w, l(5)\n      and r8.xyzw, r8.xyzw, l(4, 8, 16, 32)\n      iadd r0.y, r0.y, r8.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      iadd r0.y, r8.w, r0.y\n      iadd r0.y, r7.y, r0.y\n      iadd r0.y, r9.w, r0.y\n      ishr r0.z, r5.w, l(1)\n      ishr r0.w, r5.w, l(2)\n      ishr r2.z, r5.w, l(3)\n      ishr r2.w, r5.w, l(4)\n      ishl r8.x, r0.z, l(8)\n      ishl r8.y, r0.w, l(9)\n      ishl r8.z, r2.z, l(10)\n      ishl r8.w, r2.w, l(11)\n      and r8.xyzw, r8.xyzw, l(256, 512, 1024, 2048)\n      iadd r0.y, r0.y, r8.x\n      iadd r0.y, r8.y, r0.y\n      iadd r0.y, r8.z, r0.y\n      iadd r0.y, r8.w, r0.y\n      iadd r0.y, r7.z, r0.y\n      ishl r0.z, r2.y, l(13)\n      and r0.z, r0.z, l(8192)\n      iadd r0.y, r0.z, r0.y\n      ushr r0.z, r2.y, l(1)\n      ushr r0.w, r2.y, l(2)\n      ushr r2.z, r2.y, l(3)\n      ushr r2.w, r2.y, l(4)\n      ishl r7.x, r0.z, l(14)\n      ishl r7.y, r0.w, l(15)\n      ishl r7.z, r2.z, l(16)\n      ishl r7.w, r2.w, l(17)\n      and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n      iadd r0.y, r0.y, r7.x\n      iadd r0.y, r7.y, r0.y\n      iadd r0.y, r7.z, r0.y\n      iadd r3.w, r7.w, r0.y\n    else \n      ieq r0.y, r2.x, l(2)\n      if_nz r0.y\n        ishr r0.yz, r5.yyzy, l(5)\n        ishr r2.zw, r5.zzzy, l(4)\n        ishl r7.x, r0.y, l(2)\n        ishl r7.y, r2.z, l(14)\n        ishl r7.z, r0.z, l(22)\n        ishl r7.w, r2.w, l(24)\n        and r7.xyzw, r7.xyzw, l(4, 0x00004000, 0x00400000, 0x01000000)\n        iadd r0.y, r7.x, l(1)\n        ishr r0.z, r6.x, l(4)\n        ishr r0.w, r6.x, l(5)\n        ishr r2.z, r6.y, l(1)\n        ishr r2.w, r6.y, l(2)\n        ishl r8.x, r0.z, l(3)\n        ishl r8.y, r0.w, l(4)\n        ishl r8.z, r2.z, l(13)\n        ishl r8.w, r2.w, l(23)\n        and r8.xyzw, r8.xyzw, l(8, 16, 8192, 0x00800000)\n        iadd r0.y, r0.y, r8.x\n        iadd r0.y, r8.y, r0.y\n        ishl r9.x, r1.x, l(5)\n        ishl r9.y, r1.y, l(15)\n        ishl r9.z, r1.z, l(25)\n        ishl r9.w, r1.w, l(3)\n        and r9.xyzw, r9.xyzw, l(32, 0x00008000, 0x02000000, 8)\n        iadd r0.y, r0.y, r9.x\n        ishr r0.z, r1.x, l(1)\n        ishr r0.w, r1.x, l(2)\n        ishr r2.z, r1.x, l(3)\n        ishr r2.w, r1.x, l(4)\n        ishl r10.x, r0.z, l(6)\n        ishl r10.y, r0.w, l(7)\n        ishl r10.z, r2.z, l(8)\n        ishl r10.w, r2.w, l(9)\n        and r10.xyzw, r10.xyzw, l(64, 128, 256, 512)\n        iadd r0.y, r0.y, r10.x\n        iadd r0.y, r10.y, r0.y\n        iadd r0.y, r10.z, r0.y\n        iadd r0.y, r10.w, r0.y\n        ishr r0.z, r1.x, l(5)\n        ishr r0.w, r1.x, l(6)\n        ishr r2.z, r1.y, l(1)\n        ishr r2.w, r1.y, l(2)\n        ishl r10.x, r0.z, l(10)\n        ishl r10.y, r0.w, l(11)\n        ishl r10.z, r2.z, l(16)\n        ishl r10.w, r2.w, l(17)\n        and r10.xyzw, r10.xyzw, l(1024, 2048, 0x00010000, 0x00020000)\n        iadd r0.y, r0.y, r10.x\n        iadd r0.y, r10.y, r0.y\n        ishl r8.x, r6.y, l(12)\n        ishl r8.y, r6.x, l(19)\n        and r0.zw, r8.xxxy, l(0, 0, 4096, 0x00080000)\n        iadd r0.y, r0.z, r0.y\n        iadd r0.y, r8.z, r0.y\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r9.y, r0.y\n        iadd r0.y, r10.z, r0.y\n        iadd r0.y, r10.w, r0.y\n        ishr r0.z, r1.y, l(3)\n        ishr r2.z, r1.y, l(4)\n        ishr r2.w, r1.y, l(5)\n        ishr r4.z, r1.y, l(6)\n        ishl r10.x, r0.z, l(18)\n        ishl r10.y, r2.z, l(19)\n        ishl r10.z, r2.w, l(20)\n        ishl r10.w, r4.z, l(21)\n        and r10.xyzw, r10.xyzw, l(0x00040000, 0x00080000, 0x00100000, 0x00200000)\n        iadd r0.y, r0.y, r10.x\n        iadd r0.y, r10.y, r0.y\n        iadd r0.y, r10.z, r0.y\n        iadd r0.y, r10.w, r0.y\n        iadd r0.y, r7.z, r0.y\n        iadd r0.y, r8.w, r0.y\n        iadd r0.y, r7.w, r0.y\n        iadd r0.y, r9.z, r0.y\n        ishr r0.z, r1.z, l(1)\n        ishr r2.z, r1.z, l(2)\n        ishr r2.w, r1.z, l(3)\n        ishr r4.z, r1.z, l(4)\n        ishl r7.x, r0.z, l(26)\n        ishl r7.y, r2.z, l(27)\n        ishl r7.z, r2.w, l(28)\n        ishl r7.w, r4.z, l(29)\n        and r7.xyzw, r7.xyzw, l(0x04000000, 0x08000000, 0x10000000, 0x20000000)\n        iadd r0.y, r0.y, r7.x\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r7.z, r0.y\n        iadd r0.y, r7.w, r0.y\n        ishr r0.z, r1.z, l(5)\n        ishr r2.z, r1.z, l(6)\n        ishr r2.w, r1.w, l(1)\n        ishr r4.z, r1.w, l(2)\n        ishl r7.x, r0.z, l(30)\n        ishl r0.z, r2.z, l(31)\n        ishl r7.z, r2.w, l(4)\n        ishl r7.w, r4.z, l(5)\n        and r7.xyz, r7.xzwx, l(0x40000000, 16, 32, 0)\n        iadd r0.y, r0.y, r7.x\n        iadd r3.x, r0.z, r0.y\n        ishr r0.y, r6.y, l(3)\n        ishr r0.z, r6.y, l(5)\n        ishr r2.z, r6.y, l(4)\n        ishr r2.w, r6.x, l(1)\n        and r0.y, r0.y, l(1)\n        ishl r8.x, r0.z, l(1)\n        ishl r8.y, r2.z, l(2)\n        ishl r8.z, r2.w, l(20)\n        and r8.xyz, r8.xyzx, l(2, 4, 0x00100000, 0)\n        iadd r0.y, r0.y, r8.x\n        iadd r0.y, r8.y, r0.y\n        iadd r0.y, r9.w, r0.y\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r7.z, r0.y\n        ishr r0.z, r1.w, l(3)\n        ishr r2.z, r1.w, l(4)\n        ishr r2.w, r1.w, l(5)\n        ishl r7.x, r0.z, l(6)\n        ishl r7.y, r2.z, l(7)\n        ishl r7.z, r2.w, l(8)\n        and r7.xyz, r7.xyzx, l(64, 128, 256, 0)\n        iadd r0.y, r0.y, r7.x\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r7.z, r0.y\n        ishl r7.x, r5.y, l(9)\n        ishl r7.y, r5.z, l(29)\n        ishl r7.z, r5.x, l(1)\n        ishl r7.w, r5.w, l(7)\n        and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n        iadd r0.y, r0.y, r7.x\n        ishr r2.zw, r5.yyyz, l(1)\n        ishr r0.z, r5.y, l(2)\n        ishr r4.z, r5.y, l(3)\n        ishl r9.x, r2.z, l(10)\n        ishl r9.y, r0.z, l(11)\n        ishl r9.z, r4.z, l(12)\n        ishl r9.w, r2.w, l(30)\n        and r9.xyzw, r9.xyzw, l(1024, 2048, 4096, 0x40000000)\n        iadd r0.y, r0.y, r9.x\n        iadd r0.y, r9.y, r0.y\n        iadd r0.y, r9.z, r0.y\n        ishl r8.x, r4.x, l(13)\n        ishl r8.y, r4.y, l(23)\n        and r2.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n        iadd r0.y, r0.y, r2.z\n        ishr r0.z, r4.x, l(1)\n        ishr r2.z, r4.x, l(2)\n        ishr r4.z, r4.x, l(3)\n        ishr r4.w, r4.x, l(4)\n        ishl r10.x, r0.z, l(14)\n        ishl r10.y, r2.z, l(15)\n        ishl r10.z, r4.z, l(16)\n        ishl r10.w, r4.w, l(17)\n        and r10.xyzw, r10.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n        iadd r0.y, r0.y, r10.x\n        iadd r0.y, r10.y, r0.y\n        iadd r0.y, r10.z, r0.y\n        iadd r0.y, r10.w, r0.y\n        ishr r0.z, r4.x, l(5)\n        ishr r2.z, r4.y, l(1)\n        ishr r4.z, r4.y, l(2)\n        ishr r4.w, r4.y, l(3)\n        ishl r10.x, r0.z, l(18)\n        ishl r10.y, r2.z, l(24)\n        ishl r10.z, r4.z, l(25)\n        ishl r10.w, r4.w, l(26)\n        and r10.xyzw, r10.xyzw, l(0x00040000, 0x01000000, 0x02000000, 0x04000000)\n        iadd r0.y, r0.y, r10.x\n        iadd r0.y, r0.w, r0.y\n        iadd r0.y, r8.z, r0.y\n        ishr r0.z, r6.x, l(2)\n        ishr r0.w, r6.x, l(3)\n        ishl r8.x, r0.z, l(21)\n        ishl r8.y, r0.w, l(22)\n        and r0.zw, r8.xxxy, l(0, 0, 0x00200000, 0x00400000)\n        iadd r0.y, r0.z, r0.y\n        iadd r0.y, r0.w, r0.y\n        iadd r0.y, r2.w, r0.y\n        iadd r0.y, r10.y, r0.y\n        iadd r0.y, r10.z, r0.y\n        iadd r0.y, r10.w, r0.y\n        ishr r0.z, r4.y, l(4)\n        ishr r0.w, r4.y, l(5)\n        ishl r8.x, r0.z, l(27)\n        ishl r8.y, r0.w, l(28)\n        and r0.zw, r8.xxxy, l(0, 0, 0x08000000, 0x10000000)\n        iadd r0.y, r0.z, r0.y\n        iadd r0.y, r0.w, r0.y\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r9.w, r0.y\n        ishr r0.zw, r5.zzzx, l(2)\n        ishr r2.z, r5.z, l(3)\n        ishr r2.w, r5.x, l(1)\n        ishl r8.x, r0.z, l(31)\n        ishl r8.y, r2.w, l(2)\n        ishl r8.z, r0.w, l(3)\n        iadd r3.z, r0.y, r8.x\n        and r0.y, r2.z, l(1)\n        iadd r0.y, r0.y, r3.w\n        iadd r0.y, r7.z, r0.y\n        and r0.zw, r8.yyyz, l(0, 0, 4, 8)\n        iadd r0.y, r0.z, r0.y\n        iadd r0.y, r0.w, r0.y\n        ishr r0.z, r5.x, l(3)\n        ishr r0.w, r5.x, l(4)\n        ishr r2.z, r5.x, l(5)\n        ishr r2.w, r5.w, l(1)\n        ishl r8.x, r0.z, l(4)\n        ishl r8.y, r0.w, l(5)\n        ishl r8.z, r2.z, l(6)\n        ishl r8.w, r2.w, l(8)\n        and r8.xyzw, r8.xyzw, l(16, 32, 64, 256)\n        iadd r0.y, r0.y, r8.x\n        iadd r0.y, r8.y, r0.y\n        iadd r0.y, r8.z, r0.y\n        iadd r0.y, r7.w, r0.y\n        iadd r0.y, r8.w, r0.y\n        ishr r0.z, r5.w, l(2)\n        ishr r0.w, r5.w, l(3)\n        ishr r2.z, r5.w, l(4)\n        ishr r2.w, r5.w, l(5)\n        ishl r7.x, r0.z, l(9)\n        ishl r7.y, r0.w, l(10)\n        ishl r7.z, r2.z, l(11)\n        ishl r7.w, r2.w, l(12)\n        and r7.xyzw, r7.xyzw, l(512, 1024, 2048, 4096)\n        iadd r0.y, r0.y, r7.x\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r7.z, r0.y\n        iadd r0.y, r7.w, r0.y\n        ishl r0.z, r2.y, l(13)\n        and r0.z, r0.z, l(8192)\n        iadd r0.y, r0.z, r0.y\n        ushr r0.z, r2.y, l(1)\n        ushr r0.w, r2.y, l(2)\n        ushr r2.z, r2.y, l(3)\n        ushr r2.w, r2.y, l(4)\n        ishl r7.x, r0.z, l(14)\n        ishl r7.y, r0.w, l(15)\n        ishl r7.z, r2.z, l(16)\n        ishl r7.w, r2.w, l(17)\n        and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n        iadd r0.y, r0.y, r7.x\n        iadd r0.y, r7.y, r0.y\n        iadd r0.y, r7.z, r0.y\n        iadd r3.w, r7.w, r0.y\n      else \n        ieq r0.y, r2.x, l(3)\n        if_nz r0.y\n          ishl r7.x, r1.x, l(5)\n          ishl r7.y, r1.y, l(15)\n          ishl r7.z, r1.z, l(25)\n          ishl r7.w, r1.w, l(3)\n          and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n          iadd r0.y, r7.x, l(2)\n          ishr r0.z, r1.x, l(1)\n          ishr r0.w, r1.x, l(2)\n          ishr r2.z, r1.x, l(3)\n          ishr r2.w, r1.x, l(4)\n          ishl r8.x, r0.z, l(6)\n          ishl r8.y, r0.w, l(7)\n          ishl r8.z, r2.z, l(8)\n          ishl r8.w, r2.w, l(9)\n          and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r1.x, l(5)\n          ishr r0.w, r1.x, l(6)\n          ishr r2.z, r1.x, l(7)\n          ishr r2.w, r1.x, l(8)\n          ishl r8.x, r0.z, l(10)\n          ishl r8.y, r0.w, l(11)\n          ishl r8.z, r2.z, l(12)\n          ishl r8.w, r2.w, l(13)\n          and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 8192)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r1.x, l(9)\n          ishr r0.w, r1.y, l(1)\n          ishr r2.z, r1.y, l(2)\n          ishr r2.w, r1.y, l(3)\n          ishl r8.x, r0.z, l(14)\n          ishl r8.y, r0.w, l(16)\n          ishl r8.z, r2.z, l(17)\n          ishl r8.w, r2.w, l(18)\n          and r8.xyzw, r8.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r1.y, l(4)\n          ishr r0.w, r1.y, l(5)\n          ishr r2.z, r1.y, l(6)\n          ishr r2.w, r1.y, l(7)\n          ishl r8.x, r0.z, l(19)\n          ishl r8.y, r0.w, l(20)\n          ishl r8.z, r2.z, l(21)\n          ishl r8.w, r2.w, l(22)\n          and r8.xyzw, r8.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r1.y, l(8)\n          ishr r0.w, r1.y, l(9)\n          ishr r2.z, r1.z, l(1)\n          ishr r2.w, r1.z, l(2)\n          ishl r8.x, r0.z, l(23)\n          ishl r8.y, r0.w, l(24)\n          ishl r8.z, r2.z, l(26)\n          ishl r8.w, r2.w, l(27)\n          and r8.xyzw, r8.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r7.z, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r1.z, l(3)\n          ishr r0.w, r1.z, l(4)\n          ishr r2.z, r1.z, l(5)\n          ishr r2.w, r1.z, l(6)\n          ishl r7.x, r0.z, l(28)\n          ishl r7.y, r0.w, l(29)\n          ishl r7.z, r2.z, l(30)\n          ishl r0.z, r2.w, l(31)\n          and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n          iadd r0.y, r0.y, r7.x\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r7.z, r0.y\n          iadd r3.x, r0.z, r0.y\n          ishr r0.y, r1.z, l(7)\n          ishr r0.z, r1.z, l(8)\n          ishr r0.w, r1.z, l(9)\n          ishr r2.z, r1.w, l(1)\n          and r0.y, r0.y, l(1)\n          ishl r7.x, r0.z, l(1)\n          ishl r7.y, r0.w, l(2)\n          ishl r7.z, r2.z, l(4)\n          and r7.xyz, r7.xyzx, l(2, 4, 16, 0)\n          iadd r0.y, r0.y, r7.x\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r7.w, r0.y\n          iadd r0.y, r7.z, r0.y\n          ishr r0.z, r1.w, l(2)\n          ishr r0.w, r1.w, l(3)\n          ishr r2.z, r1.w, l(4)\n          ishr r2.w, r1.x, l(10)\n          ishl r7.x, r0.z, l(5)\n          ishl r7.y, r0.w, l(6)\n          ishl r7.z, r2.z, l(7)\n          ishl r7.w, r2.w, l(8)\n          and r7.xyzw, r7.xyzw, l(32, 64, 128, 256)\n          iadd r0.y, r0.y, r7.x\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r7.z, r0.y\n          iadd r0.y, r7.w, r0.y\n          ishl r7.x, r5.y, l(9)\n          ishl r7.y, r5.z, l(29)\n          ishl r7.z, r5.x, l(1)\n          ishl r7.w, r5.w, l(7)\n          and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n          iadd r0.y, r0.y, r7.x\n          ishr r0.zw, r5.yyyz, l(1)\n          ishr r2.z, r5.y, l(2)\n          ishr r2.w, r5.y, l(3)\n          ishl r8.x, r0.z, l(10)\n          ishl r8.y, r2.z, l(11)\n          ishl r8.z, r2.w, l(12)\n          ishl r8.w, r0.w, l(30)\n          and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 0x40000000)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          iadd r0.y, r8.z, r0.y\n          ishl r8.x, r4.x, l(13)\n          ishl r8.y, r4.y, l(23)\n          and r0.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n          iadd r0.y, r0.z, r0.y\n          ishr r2.zw, r4.xxxy, l(1)\n          ishr r0.z, r4.x, l(2)\n          ishr r4.z, r4.x, l(3)\n          ishl r9.x, r2.z, l(14)\n          ishl r9.y, r0.z, l(15)\n          ishl r9.z, r4.z, l(16)\n          ishl r9.w, r2.w, l(24)\n          and r9.xyzw, r9.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x01000000)\n          iadd r0.y, r0.y, r9.x\n          iadd r0.y, r9.y, r0.y\n          iadd r0.y, r9.z, r0.y\n          ishr r2.zw, r1.yyyz, l(10)\n          ishl r8.x, r2.z, l(17)\n          ishl r8.y, r2.w, l(27)\n          and r2.zw, r8.xxxy, l(0, 0, 0x00020000, 0x08000000)\n          iadd r0.y, r0.y, r2.z\n          ishl r8.x, r6.y, l(18)\n          ishl r8.y, r6.x, l(19)\n          and r4.zw, r8.xxxy, l(0, 0, 0x00040000, 0x00080000)\n          iadd r0.y, r0.y, r4.z\n          iadd r0.y, r4.w, r0.y\n          ishr r4.zw, r6.xxxy, l(1)\n          ishr r0.z, r6.x, l(2)\n          ishr r2.z, r6.x, l(3)\n          ishl r10.x, r4.z, l(20)\n          ishl r10.y, r0.z, l(21)\n          ishl r10.z, r2.z, l(22)\n          ishl r10.w, r4.w, l(28)\n          and r10.xyzw, r10.xyzw, l(0x00100000, 0x00200000, 0x00400000, 0x10000000)\n          iadd r0.y, r0.y, r10.x\n          iadd r0.y, r10.y, r0.y\n          iadd r0.y, r10.z, r0.y\n          iadd r0.y, r0.w, r0.y\n          iadd r0.y, r9.w, r0.y\n          ishr r0.z, r4.y, l(2)\n          ishr r0.w, r4.y, l(3)\n          ishl r8.x, r0.z, l(25)\n          ishl r8.y, r0.w, l(26)\n          and r0.zw, r8.xxxy, l(0, 0, 0x02000000, 0x04000000)\n          iadd r0.y, r0.z, r0.y\n          iadd r0.y, r0.w, r0.y\n          iadd r0.y, r2.w, r0.y\n          iadd r0.y, r10.w, r0.y\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.zw, r5.zzzx, l(2)\n          ishr r2.z, r5.z, l(3)\n          ishr r2.w, r5.x, l(1)\n          ishl r8.x, r0.z, l(31)\n          ishl r8.y, r2.w, l(2)\n          ishl r8.z, r0.w, l(3)\n          iadd r3.z, r0.y, r8.x\n          and r0.y, r2.z, l(1)\n          iadd r0.y, r0.y, r3.w\n          iadd r0.y, r7.z, r0.y\n          and r0.zw, r8.yyyz, l(0, 0, 4, 8)\n          iadd r0.y, r0.z, r0.y\n          iadd r0.y, r0.w, r0.y\n          ishr r0.z, r5.x, l(3)\n          ishr r0.w, r5.x, l(4)\n          ishr r2.z, r5.w, l(1)\n          ishr r2.w, r5.w, l(2)\n          ishl r8.x, r0.z, l(4)\n          ishl r8.y, r0.w, l(5)\n          ishl r8.z, r2.z, l(8)\n          ishl r8.w, r2.w, l(9)\n          and r8.xyzw, r8.xyzw, l(16, 32, 256, 512)\n          iadd r0.y, r0.y, r8.x\n          iadd r0.y, r8.y, r0.y\n          ishr r0.z, r6.y, l(2)\n          ishr r0.w, r6.y, l(3)\n          ishl r7.x, r0.z, l(6)\n          ishl r7.y, r0.w, l(12)\n          and r0.zw, r7.xxxy, l(0, 0, 64, 4096)\n          iadd r0.y, r0.z, r0.y\n          iadd r0.y, r7.w, r0.y\n          iadd r0.y, r8.z, r0.y\n          iadd r0.y, r8.w, r0.y\n          ishr r0.z, r5.w, l(3)\n          ishr r2.z, r5.w, l(4)\n          ishl r7.x, r0.z, l(10)\n          ishl r7.y, r2.z, l(11)\n          and r2.zw, r7.xxxy, l(0, 0, 1024, 2048)\n          iadd r0.y, r0.y, r2.z\n          iadd r0.y, r2.w, r0.y\n          iadd r0.y, r0.w, r0.y\n          ishl r0.z, r2.y, l(13)\n          and r0.z, r0.z, l(8192)\n          iadd r0.y, r0.z, r0.y\n          ushr r0.z, r2.y, l(1)\n          ushr r0.w, r2.y, l(2)\n          ushr r2.z, r2.y, l(3)\n          ushr r2.w, r2.y, l(4)\n          ishl r7.x, r0.z, l(14)\n          ishl r7.y, r0.w, l(15)\n          ishl r7.z, r2.z, l(16)\n          ishl r7.w, r2.w, l(17)\n          and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n          iadd r0.y, r0.y, r7.x\n          iadd r0.y, r7.y, r0.y\n          iadd r0.y, r7.z, r0.y\n          iadd r3.w, r7.w, r0.y\n        else \n          ieq r0.y, r2.x, l(4)\n          if_nz r0.y\n            ishl r7.x, r1.x, l(5)\n            ishl r7.y, r1.y, l(15)\n            ishl r7.z, r1.z, l(25)\n            ishl r7.w, r1.w, l(3)\n            and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n            iadd r0.y, r7.x, l(6)\n            ishr r0.z, r1.x, l(1)\n            ishr r0.w, r1.x, l(2)\n            ishr r2.z, r1.x, l(3)\n            ishr r2.w, r1.x, l(4)\n            ishl r8.x, r0.z, l(6)\n            ishl r8.y, r0.w, l(7)\n            ishl r8.z, r2.z, l(8)\n            ishl r8.w, r2.w, l(9)\n            and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r1.x, l(5)\n            ishr r0.w, r1.x, l(6)\n            ishr r2.z, r1.x, l(7)\n            ishr r2.w, r1.x, l(8)\n            ishl r8.x, r0.z, l(10)\n            ishl r8.y, r0.w, l(11)\n            ishl r8.z, r2.z, l(12)\n            ishl r8.w, r2.w, l(13)\n            and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 8192)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r1.x, l(9)\n            ishr r0.w, r1.y, l(1)\n            ishr r2.z, r1.y, l(2)\n            ishr r2.w, r1.y, l(3)\n            ishl r8.x, r0.z, l(14)\n            ishl r8.y, r0.w, l(16)\n            ishl r8.z, r2.z, l(17)\n            ishl r8.w, r2.w, l(18)\n            and r8.xyzw, r8.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r1.y, l(4)\n            ishr r0.w, r1.y, l(5)\n            ishr r2.z, r1.y, l(6)\n            ishr r2.w, r1.y, l(7)\n            ishl r8.x, r0.z, l(19)\n            ishl r8.y, r0.w, l(20)\n            ishl r8.z, r2.z, l(21)\n            ishl r8.w, r2.w, l(22)\n            and r8.xyzw, r8.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r1.y, l(8)\n            ishr r0.w, r1.y, l(9)\n            ishr r2.z, r1.z, l(1)\n            ishr r2.w, r1.z, l(2)\n            ishl r8.x, r0.z, l(23)\n            ishl r8.y, r0.w, l(24)\n            ishl r8.z, r2.z, l(26)\n            ishl r8.w, r2.w, l(27)\n            and r8.xyzw, r8.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r7.z, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r1.z, l(3)\n            ishr r0.w, r1.z, l(4)\n            ishr r2.z, r1.z, l(5)\n            ishr r2.w, r1.z, l(6)\n            ishl r7.x, r0.z, l(28)\n            ishl r7.y, r0.w, l(29)\n            ishl r7.z, r2.z, l(30)\n            ishl r0.z, r2.w, l(31)\n            and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r7.z, r0.y\n            iadd r3.x, r0.z, r0.y\n            ishr r0.y, r1.z, l(7)\n            ishr r0.z, r1.z, l(8)\n            ishr r0.w, r1.z, l(9)\n            ishr r2.z, r1.w, l(1)\n            and r0.y, r0.y, l(1)\n            ishl r7.x, r0.z, l(1)\n            ishl r7.y, r0.w, l(2)\n            ishl r7.z, r2.z, l(4)\n            and r7.xyz, r7.xyzx, l(2, 4, 16, 0)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r7.w, r0.y\n            iadd r0.y, r7.z, r0.y\n            ishr r0.z, r1.w, l(2)\n            ishr r0.w, r1.w, l(3)\n            ishr r2.zw, r1.xxxy, l(10)\n            ishl r7.x, r0.z, l(5)\n            ishl r7.y, r0.w, l(6)\n            ishl r7.z, r2.z, l(7)\n            ishl r7.w, r2.w, l(18)\n            and r7.xyzw, r7.xyzw, l(32, 64, 128, 0x00040000)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r7.z, r0.y\n            ishr r0.z, r6.x, l(4)\n            ishr r0.w, r6.x, l(1)\n            ishr r2.z, r6.x, l(2)\n            ishr r2.w, r6.x, l(3)\n            ishl r8.x, r0.z, l(8)\n            ishl r8.y, r0.w, l(20)\n            ishl r8.z, r2.z, l(21)\n            ishl r8.w, r2.w, l(22)\n            and r8.xyzw, r8.xyzw, l(256, 0x00100000, 0x00200000, 0x00400000)\n            iadd r0.y, r0.y, r8.x\n            ishl r9.x, r5.y, l(9)\n            ishl r9.y, r5.z, l(29)\n            ishl r9.z, r5.x, l(1)\n            ishl r9.w, r5.w, l(7)\n            and r9.xyzw, r9.xyzw, l(512, 0x20000000, 2, 128)\n            iadd r0.y, r0.y, r9.x\n            ishr r0.zw, r5.yyyz, l(1)\n            ishr r2.z, r5.y, l(2)\n            ishr r2.w, r5.y, l(3)\n            ishl r10.x, r0.z, l(10)\n            ishl r10.y, r2.z, l(11)\n            ishl r10.z, r2.w, l(12)\n            ishl r10.w, r0.w, l(30)\n            and r10.xyzw, r10.xyzw, l(1024, 2048, 4096, 0x40000000)\n            iadd r0.y, r0.y, r10.x\n            iadd r0.y, r10.y, r0.y\n            iadd r0.y, r10.z, r0.y\n            ishl r7.x, r4.x, l(13)\n            ishl r7.y, r4.y, l(23)\n            and r0.zw, r7.xxxy, l(0, 0, 8192, 0x00800000)\n            iadd r0.y, r0.z, r0.y\n            ishr r0.z, r4.x, l(1)\n            ishr r2.z, r4.x, l(2)\n            ishr r2.w, r4.x, l(3)\n            ishr r4.z, r4.x, l(4)\n            ishl r11.x, r0.z, l(14)\n            ishl r11.y, r2.z, l(15)\n            ishl r11.z, r2.w, l(16)\n            ishl r11.w, r4.z, l(17)\n            and r11.xyzw, r11.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n            iadd r0.y, r0.y, r11.x\n            iadd r0.y, r11.y, r0.y\n            iadd r0.y, r11.z, r0.y\n            iadd r0.y, r11.w, r0.y\n            iadd r0.y, r7.w, r0.y\n            ishl r7.x, r6.x, l(19)\n            ishl r7.y, r6.y, l(5)\n            and r2.zw, r7.xxxy, l(0, 0, 0x00080000, 32)\n            iadd r0.y, r0.y, r2.z\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            iadd r0.y, r0.w, r0.y\n            ishr r0.z, r4.y, l(1)\n            ishr r0.w, r4.y, l(2)\n            ishr r2.z, r4.y, l(3)\n            ishl r7.x, r0.z, l(24)\n            ishl r7.y, r0.w, l(25)\n            ishl r7.z, r2.z, l(26)\n            and r7.xyz, r7.xyzx, l(0x01000000, 0x02000000, 0x04000000, 0)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r7.z, r0.y\n            ishr r0.z, r1.z, l(10)\n            ishl r0.z, r0.z, l(27)\n            and r0.z, r0.z, l(0x08000000)\n            iadd r0.y, r0.z, r0.y\n            ishr r0.z, r6.y, l(1)\n            ishr r0.w, r6.y, l(2)\n            ishr r2.z, r6.y, l(3)\n            ishl r7.x, r0.z, l(28)\n            ishl r7.y, r0.w, l(6)\n            ishl r7.z, r2.z, l(12)\n            and r7.xyz, r7.xyzx, l(0x10000000, 64, 4096, 0)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r9.y, r0.y\n            iadd r0.y, r10.w, r0.y\n            ishr r0.zw, r5.zzzx, l(2)\n            ishr r2.z, r5.z, l(3)\n            ishr r4.z, r5.x, l(1)\n            ishl r8.x, r0.z, l(31)\n            ishl r8.y, r4.z, l(2)\n            ishl r8.z, r0.w, l(3)\n            iadd r3.z, r0.y, r8.x\n            and r0.y, r2.z, l(1)\n            iadd r0.y, r0.y, r3.w\n            iadd r0.y, r9.z, r0.y\n            and r0.zw, r8.yyyz, l(0, 0, 4, 8)\n            iadd r0.y, r0.z, r0.y\n            iadd r0.y, r0.w, r0.y\n            ishr r0.zw, r5.xxxw, l(3)\n            ishr r2.z, r5.w, l(1)\n            ishr r4.z, r5.w, l(2)\n            ishl r8.x, r0.z, l(4)\n            ishl r8.y, r2.z, l(8)\n            ishl r8.z, r4.z, l(9)\n            ishl r8.w, r0.w, l(10)\n            and r8.xyzw, r8.xyzw, l(16, 256, 512, 1024)\n            iadd r0.y, r0.y, r8.x\n            iadd r0.y, r2.w, r0.y\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r9.w, r0.y\n            iadd r0.y, r8.y, r0.y\n            iadd r0.y, r8.z, r0.y\n            iadd r0.y, r8.w, r0.y\n            ishr r0.z, r5.y, l(4)\n            ishl r0.z, r0.z, l(11)\n            and r0.z, r0.z, l(2048)\n            iadd r0.y, r0.z, r0.y\n            iadd r0.y, r7.z, r0.y\n            ishl r0.z, r2.y, l(13)\n            and r0.z, r0.z, l(8192)\n            iadd r0.y, r0.z, r0.y\n            ushr r0.z, r2.y, l(1)\n            ushr r0.w, r2.y, l(2)\n            ushr r2.z, r2.y, l(3)\n            ushr r2.w, r2.y, l(4)\n            ishl r7.x, r0.z, l(14)\n            ishl r7.y, r0.w, l(15)\n            ishl r7.z, r2.z, l(16)\n            ishl r7.w, r2.w, l(17)\n            and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n            iadd r0.y, r0.y, r7.x\n            iadd r0.y, r7.y, r0.y\n            iadd r0.y, r7.z, r0.y\n            iadd r3.w, r7.w, r0.y\n          else \n            ieq r0.y, r2.x, l(5)\n            if_nz r0.y\n              ishl r7.x, r1.x, l(5)\n              ishl r7.y, r1.y, l(15)\n              ishl r7.z, r1.z, l(25)\n              ishl r7.w, r1.w, l(3)\n              and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n              iadd r0.y, r7.x, l(10)\n              ishr r0.z, r1.x, l(1)\n              ishr r0.w, r1.x, l(2)\n              ishr r2.z, r1.x, l(3)\n              ishr r2.w, r1.x, l(4)\n              ishl r8.x, r0.z, l(6)\n              ishl r8.y, r0.w, l(7)\n              ishl r8.z, r2.z, l(8)\n              ishl r8.w, r2.w, l(9)\n              and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r1.x, l(5)\n              ishr r0.w, r1.x, l(6)\n              ishr r2.z, r1.x, l(7)\n              ishr r2.w, r1.x, l(8)\n              ishl r8.x, r0.z, l(10)\n              ishl r8.y, r0.w, l(11)\n              ishl r8.z, r2.z, l(12)\n              ishl r8.w, r2.w, l(13)\n              and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 8192)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r1.x, l(9)\n              ishr r0.w, r1.y, l(1)\n              ishr r2.z, r1.y, l(2)\n              ishr r2.w, r1.y, l(3)\n              ishl r8.x, r0.z, l(14)\n              ishl r8.y, r0.w, l(16)\n              ishl r8.z, r2.z, l(17)\n              ishl r8.w, r2.w, l(18)\n              and r8.xyzw, r8.xyzw, l(0x00004000, 0x00010000, 0x00020000, 0x00040000)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r1.y, l(4)\n              ishr r0.w, r1.y, l(5)\n              ishr r2.z, r1.y, l(6)\n              ishr r2.w, r1.y, l(7)\n              ishl r8.x, r0.z, l(19)\n              ishl r8.y, r0.w, l(20)\n              ishl r8.z, r2.z, l(21)\n              ishl r8.w, r2.w, l(22)\n              and r8.xyzw, r8.xyzw, l(0x00080000, 0x00100000, 0x00200000, 0x00400000)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r1.y, l(8)\n              ishr r0.w, r1.y, l(9)\n              ishr r2.z, r1.z, l(1)\n              ishr r2.w, r1.z, l(2)\n              ishl r8.x, r0.z, l(23)\n              ishl r8.y, r0.w, l(24)\n              ishl r8.z, r2.z, l(26)\n              ishl r8.w, r2.w, l(27)\n              and r8.xyzw, r8.xyzw, l(0x00800000, 0x01000000, 0x04000000, 0x08000000)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r1.z, l(3)\n              ishr r0.w, r1.z, l(4)\n              ishr r2.z, r1.z, l(5)\n              ishr r2.w, r1.z, l(6)\n              ishl r7.x, r0.z, l(28)\n              ishl r7.y, r0.w, l(29)\n              ishl r7.z, r2.z, l(30)\n              ishl r0.z, r2.w, l(31)\n              and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              iadd r3.x, r0.z, r0.y\n              ishr r0.y, r1.z, l(7)\n              ishr r0.z, r1.z, l(8)\n              ishr r0.w, r1.z, l(9)\n              ishr r2.z, r1.w, l(1)\n              and r0.y, r0.y, l(1)\n              ishl r7.x, r0.z, l(1)\n              ishl r7.y, r0.w, l(2)\n              ishl r7.z, r2.z, l(4)\n              and r7.xyz, r7.xyzx, l(2, 4, 16, 0)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.w, r0.y\n              iadd r0.y, r7.z, r0.y\n              ishr r0.z, r1.w, l(2)\n              ishr r0.w, r1.w, l(3)\n              ishr r2.zw, r1.xxxy, l(10)\n              ishl r7.x, r0.z, l(5)\n              ishl r7.y, r0.w, l(6)\n              ishl r7.z, r2.z, l(7)\n              ishl r7.w, r2.w, l(17)\n              and r7.xyzw, r7.xyzw, l(32, 64, 128, 0x00020000)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              ishr r0.z, r5.z, l(4)\n              ishr r0.w, r5.y, l(1)\n              ishr r2.z, r5.y, l(2)\n              ishr r2.w, r5.y, l(3)\n              ishl r8.x, r0.z, l(8)\n              ishl r8.y, r0.w, l(10)\n              ishl r8.z, r2.z, l(11)\n              ishl r8.w, r2.w, l(12)\n              and r8.xyzw, r8.xyzw, l(256, 1024, 2048, 4096)\n              iadd r0.y, r0.y, r8.x\n              ishl r9.x, r5.y, l(9)\n              ishl r9.y, r5.z, l(29)\n              ishl r9.z, r5.x, l(1)\n              ishl r9.w, r5.w, l(7)\n              and r9.xyzw, r9.xyzw, l(512, 0x20000000, 2, 128)\n              iadd r0.y, r0.y, r9.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishl r7.x, r4.x, l(13)\n              ishl r7.y, r4.y, l(23)\n              and r0.zw, r7.xxxy, l(0, 0, 8192, 0x00800000)\n              iadd r0.y, r0.z, r0.y\n              ishr r2.zw, r4.xxxy, l(1)\n              ishr r0.z, r4.x, l(2)\n              ishr r4.z, r4.x, l(3)\n              ishl r8.x, r2.z, l(14)\n              ishl r8.y, r0.z, l(15)\n              ishl r8.z, r4.z, l(16)\n              ishl r8.w, r2.w, l(24)\n              and r8.xyzw, r8.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x01000000)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r7.w, r0.y\n              ishl r7.x, r6.y, l(18)\n              ishl r7.y, r6.x, l(19)\n              and r2.zw, r7.xxxy, l(0, 0, 0x00040000, 0x00080000)\n              iadd r0.y, r0.y, r2.z\n              iadd r0.y, r2.w, r0.y\n              ishr r2.zw, r6.xxxy, l(1)\n              ishr r0.z, r6.x, l(2)\n              ishr r4.z, r6.x, l(3)\n              ishl r7.x, r2.z, l(20)\n              ishl r7.y, r0.z, l(21)\n              ishl r7.z, r4.z, l(22)\n              ishl r7.w, r2.w, l(5)\n              and r7.xyzw, r7.xyzw, l(0x00100000, 0x00200000, 0x00400000, 32)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              iadd r0.y, r0.w, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r4.y, l(2)\n              ishr r0.w, r4.y, l(3)\n              ishr r2.z, r4.y, l(4)\n              ishl r7.x, r0.z, l(25)\n              ishl r7.y, r0.w, l(26)\n              ishl r7.z, r2.z, l(27)\n              and r7.xyz, r7.xyzx, l(0x02000000, 0x04000000, 0x08000000, 0)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              ishr r0.z, r1.z, l(10)\n              ishl r0.z, r0.z, l(28)\n              and r0.z, r0.z, l(0x10000000)\n              iadd r0.y, r0.z, r0.y\n              iadd r0.y, r9.y, r0.y\n              ishr r0.zw, r5.zzzx, l(1)\n              ishr r2.z, r5.z, l(2)\n              ishr r2.w, r5.z, l(3)\n              ishl r7.x, r0.z, l(30)\n              ishl r0.z, r2.z, l(31)\n              ishl r7.z, r0.w, l(2)\n              and r4.zw, r7.xxxz, l(0, 0, 0x40000000, 4)\n              iadd r0.y, r0.y, r4.z\n              iadd r3.z, r0.z, r0.y\n              and r0.y, r2.w, l(1)\n              iadd r0.y, r0.y, r3.w\n              iadd r0.y, r9.z, r0.y\n              iadd r0.y, r4.w, r0.y\n              ishr r0.zw, r5.xxxw, l(2)\n              ishr r2.z, r5.x, l(3)\n              ishr r2.w, r5.w, l(1)\n              ishl r8.x, r0.z, l(3)\n              ishl r8.y, r2.z, l(4)\n              ishl r8.z, r2.w, l(8)\n              ishl r8.w, r0.w, l(9)\n              and r8.xyzw, r8.xyzw, l(8, 16, 256, 512)\n              iadd r0.y, r0.y, r8.x\n              iadd r0.y, r8.y, r0.y\n              iadd r0.y, r7.w, r0.y\n              ishr r0.z, r6.y, l(2)\n              ishr r0.w, r6.y, l(4)\n              ishr r2.z, r6.y, l(3)\n              ishl r7.x, r0.z, l(6)\n              ishl r7.y, r0.w, l(11)\n              ishl r7.z, r2.z, l(12)\n              and r7.xyz, r7.xyzx, l(64, 2048, 4096, 0)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r9.w, r0.y\n              iadd r0.y, r8.z, r0.y\n              iadd r0.y, r8.w, r0.y\n              ishr r0.z, r5.w, l(3)\n              ishl r0.z, r0.z, l(10)\n              and r0.z, r0.z, l(1024)\n              iadd r0.y, r0.z, r0.y\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              ishl r0.z, r2.y, l(13)\n              and r0.z, r0.z, l(8192)\n              iadd r0.y, r0.z, r0.y\n              ushr r0.z, r2.y, l(1)\n              ushr r0.w, r2.y, l(2)\n              ushr r2.z, r2.y, l(3)\n              ushr r2.w, r2.y, l(4)\n              ishl r7.x, r0.z, l(14)\n              ishl r7.y, r0.w, l(15)\n              ishl r7.z, r2.z, l(16)\n              ishl r7.w, r2.w, l(17)\n              and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n              iadd r0.y, r0.y, r7.x\n              iadd r0.y, r7.y, r0.y\n              iadd r0.y, r7.z, r0.y\n              iadd r3.w, r7.w, r0.y\n            else \n              ieq r0.y, r2.x, l(6)\n              if_nz r0.y\n                ishl r7.x, r1.x, l(5)\n                ishl r7.y, r1.y, l(15)\n                ishl r7.z, r1.z, l(25)\n                ishl r7.w, r1.w, l(3)\n                and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n                iadd r0.y, r7.x, l(14)\n                ishr r0.z, r1.x, l(1)\n                ishr r0.w, r1.x, l(2)\n                ishr r2.z, r1.x, l(3)\n                ishr r2.w, r1.x, l(4)\n                ishl r8.x, r0.z, l(6)\n                ishl r8.y, r0.w, l(7)\n                ishl r8.z, r2.z, l(8)\n                ishl r8.w, r2.w, l(9)\n                and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n                iadd r0.y, r0.y, r8.x\n                iadd r0.y, r8.y, r0.y\n                iadd r0.y, r8.z, r0.y\n                iadd r0.y, r8.w, r0.y\n                ishr r0.z, r1.x, l(5)\n                ishr r0.w, r1.x, l(6)\n                ishr r2.z, r1.x, l(7)\n                ishr r2.w, r1.x, l(8)\n                ishl r8.x, r0.z, l(10)\n                ishl r8.y, r0.w, l(11)\n                ishl r8.z, r2.z, l(12)\n                ishl r8.w, r2.w, l(13)\n                and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 8192)\n                iadd r0.y, r0.y, r8.x\n                iadd r0.y, r8.y, r0.y\n                iadd r0.y, r8.z, r0.y\n                iadd r0.y, r8.w, r0.y\n                ishr r0.zw, r5.zzzy, l(4)\n                ishr r2.z, r5.y, l(1)\n                ishr r2.w, r5.y, l(2)\n                ishl r8.x, r0.z, l(14)\n                ishl r8.y, r0.w, l(24)\n                ishl r8.z, r2.z, l(10)\n                ishl r8.w, r2.w, l(11)\n                and r8.xyzw, r8.xyzw, l(0x00004000, 0x01000000, 1024, 2048)\n                iadd r0.y, r0.y, r8.x\n                iadd r0.y, r7.y, r0.y\n                ishr r0.z, r1.y, l(1)\n                ishr r0.w, r1.y, l(2)\n                ishr r2.z, r1.y, l(3)\n                ishr r2.w, r1.y, l(4)\n                ishl r9.x, r0.z, l(16)\n                ishl r9.y, r0.w, l(17)\n                ishl r9.z, r2.z, l(18)\n                ishl r9.w, r2.w, l(19)\n                and r9.xyzw, r9.xyzw, l(0x00010000, 0x00020000, 0x00040000, 0x00080000)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r9.y, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                ishr r0.z, r1.y, l(5)\n                ishr r0.w, r1.y, l(6)\n                ishr r2.z, r1.y, l(7)\n                ishr r2.w, r1.y, l(8)\n                ishl r9.x, r0.z, l(20)\n                ishl r9.y, r0.w, l(21)\n                ishl r9.z, r2.z, l(22)\n                ishl r9.w, r2.w, l(23)\n                and r9.xyzw, r9.xyzw, l(0x00100000, 0x00200000, 0x00400000, 0x00800000)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r9.y, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                iadd r0.y, r8.y, r0.y\n                iadd r0.y, r7.z, r0.y\n                ishr r0.z, r1.z, l(1)\n                ishr r0.w, r1.z, l(2)\n                ishr r2.z, r1.z, l(3)\n                ishr r2.w, r1.z, l(4)\n                ishl r9.x, r0.z, l(26)\n                ishl r9.y, r0.w, l(27)\n                ishl r9.z, r2.z, l(28)\n                ishl r9.w, r2.w, l(29)\n                and r9.xyzw, r9.xyzw, l(0x04000000, 0x08000000, 0x10000000, 0x20000000)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r9.y, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                ishr r0.z, r1.z, l(5)\n                ishr r0.w, r1.z, l(6)\n                ishr r2.z, r1.z, l(7)\n                ishr r2.w, r1.z, l(8)\n                ishl r7.x, r0.z, l(30)\n                ishl r0.z, r0.w, l(31)\n                ishl r7.z, r2.w, l(1)\n                and r4.zw, r7.xxxz, l(0, 0, 0x40000000, 2)\n                iadd r0.y, r0.y, r4.z\n                iadd r3.x, r0.z, r0.y\n                and r0.y, r2.z, l(1)\n                iadd r0.y, r4.w, r0.y\n                ishr r0.zw, r6.yyyx, l(4)\n                ishr r2.z, r6.x, l(1)\n                ishr r2.w, r6.x, l(2)\n                ishl r9.x, r0.z, l(2)\n                ishl r9.y, r0.w, l(8)\n                ishl r9.z, r2.z, l(20)\n                ishl r9.w, r2.w, l(21)\n                and r9.xyzw, r9.xyzw, l(4, 256, 0x00100000, 0x00200000)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r7.w, r0.y\n                ishr r0.z, r1.w, l(1)\n                ishr r0.w, r1.w, l(2)\n                ishr r2.z, r1.w, l(3)\n                ishr r2.w, r1.w, l(4)\n                ishl r7.x, r0.z, l(4)\n                ishl r7.y, r0.w, l(5)\n                ishl r7.z, r2.z, l(6)\n                ishl r7.w, r2.w, l(7)\n                and r7.xyzw, r7.xyzw, l(16, 32, 64, 128)\n                iadd r0.y, r0.y, r7.x\n                iadd r0.y, r7.y, r0.y\n                iadd r0.y, r7.z, r0.y\n                iadd r0.y, r7.w, r0.y\n                iadd r0.y, r9.y, r0.y\n                ishl r7.x, r5.y, l(9)\n                ishl r7.y, r5.z, l(29)\n                ishl r7.z, r5.x, l(1)\n                ishl r7.w, r5.w, l(7)\n                and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n                iadd r0.y, r0.y, r7.x\n                iadd r0.y, r8.z, r0.y\n                iadd r0.y, r8.w, r0.y\n                ishr r0.zw, r5.yyyz, l(3)\n                ishr r2.z, r5.z, l(1)\n                ishr r2.w, r5.z, l(2)\n                ishl r8.x, r0.z, l(12)\n                ishl r8.y, r2.z, l(30)\n                ishl r0.z, r2.w, l(31)\n                and r2.zw, r8.xxxy, l(0, 0, 4096, 0x40000000)\n                iadd r0.y, r0.y, r2.z\n                ishl r8.x, r4.x, l(13)\n                ishl r8.y, r4.y, l(23)\n                and r4.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n                iadd r0.y, r0.y, r4.z\n                ishr r2.z, r4.x, l(1)\n                ishr r4.z, r4.x, l(2)\n                ishr r6.z, r4.x, l(3)\n                ishr r6.w, r4.x, l(4)\n                ishl r8.x, r2.z, l(14)\n                ishl r8.y, r4.z, l(15)\n                ishl r8.z, r6.z, l(16)\n                ishl r8.w, r6.w, l(17)\n                and r8.xyzw, r8.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                iadd r0.y, r0.y, r8.x\n                iadd r0.y, r8.y, r0.y\n                iadd r0.y, r8.z, r0.y\n                iadd r0.y, r8.w, r0.y\n                ishl r8.x, r6.y, l(18)\n                ishl r8.y, r6.x, l(19)\n                and r6.zw, r8.xxxy, l(0, 0, 0x00040000, 0x00080000)\n                iadd r0.y, r0.y, r6.z\n                iadd r0.y, r6.w, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                ishr r6.zw, r6.xxxy, l(3)\n                ishr r2.z, r6.y, l(1)\n                ishr r4.z, r6.y, l(2)\n                ishl r8.x, r6.z, l(22)\n                ishl r8.y, r2.z, l(28)\n                ishl r8.z, r4.z, l(6)\n                ishl r8.w, r6.w, l(12)\n                and r8.xyzw, r8.xyzw, l(0x00400000, 0x10000000, 64, 4096)\n                iadd r0.y, r0.y, r8.x\n                iadd r0.y, r4.w, r0.y\n                ishr r2.z, r4.y, l(1)\n                ishr r4.z, r4.y, l(2)\n                ishr r4.w, r4.y, l(3)\n                ishr r6.z, r4.y, l(4)\n                ishl r9.x, r2.z, l(24)\n                ishl r9.y, r4.z, l(25)\n                ishl r9.z, r4.w, l(26)\n                ishl r9.w, r6.z, l(27)\n                and r9.xyzw, r9.xyzw, l(0x01000000, 0x02000000, 0x04000000, 0x08000000)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r9.y, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                iadd r0.y, r8.y, r0.y\n                iadd r0.y, r7.y, r0.y\n                iadd r0.y, r2.w, r0.y\n                iadd r3.z, r0.z, r0.y\n                and r0.y, r0.w, l(1)\n                iadd r0.y, r0.y, r3.w\n                iadd r0.y, r7.z, r0.y\n                ishr r0.z, r5.x, l(1)\n                ishr r0.w, r5.x, l(2)\n                ishr r2.z, r5.x, l(3)\n                ishr r2.w, r5.x, l(4)\n                ishl r9.x, r0.z, l(2)\n                ishl r9.y, r0.w, l(3)\n                ishl r9.z, r2.z, l(4)\n                ishl r9.w, r2.w, l(5)\n                and r9.xyzw, r9.xyzw, l(4, 8, 16, 32)\n                iadd r0.y, r0.y, r9.x\n                iadd r0.y, r9.y, r0.y\n                iadd r0.y, r9.z, r0.y\n                iadd r0.y, r9.w, r0.y\n                iadd r0.y, r8.z, r0.y\n                iadd r0.y, r7.w, r0.y\n                ishr r0.z, r5.w, l(1)\n                ishr r0.w, r5.w, l(2)\n                ishr r2.z, r5.w, l(3)\n                ishr r2.w, r5.w, l(4)\n                ishl r7.x, r0.z, l(8)\n                ishl r7.y, r0.w, l(9)\n                ishl r7.z, r2.z, l(10)\n                ishl r7.w, r2.w, l(11)\n                and r7.xyzw, r7.xyzw, l(256, 512, 1024, 2048)\n                iadd r0.y, r0.y, r7.x\n                iadd r0.y, r7.y, r0.y\n                iadd r0.y, r7.z, r0.y\n                iadd r0.y, r7.w, r0.y\n                iadd r0.y, r8.w, r0.y\n                ishl r0.z, r2.y, l(13)\n                and r0.z, r0.z, l(8192)\n                iadd r0.y, r0.z, r0.y\n                ushr r0.z, r2.y, l(1)\n                ushr r0.w, r2.y, l(2)\n                ushr r2.z, r2.y, l(3)\n                ushr r2.w, r2.y, l(4)\n                ishl r7.x, r0.z, l(14)\n                ishl r7.y, r0.w, l(15)\n                ishl r7.z, r2.z, l(16)\n                ishl r7.w, r2.w, l(17)\n                and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                iadd r0.y, r0.y, r7.x\n                iadd r0.y, r7.y, r0.y\n                iadd r0.y, r7.z, r0.y\n                iadd r3.w, r7.w, r0.y\n              else \n                ieq r0.y, r2.x, l(7)\n                if_nz r0.y\n                  ishl r7.x, r1.x, l(5)\n                  ishl r7.y, r1.y, l(15)\n                  ishl r7.z, r1.z, l(25)\n                  ishl r7.w, r1.w, l(3)\n                  and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n                  iadd r0.y, r7.x, l(18)\n                  ishr r0.z, r1.x, l(1)\n                  ishr r0.w, r1.x, l(2)\n                  ishr r2.z, r1.x, l(3)\n                  ishr r2.w, r1.x, l(4)\n                  ishl r8.x, r0.z, l(6)\n                  ishl r8.y, r0.w, l(7)\n                  ishl r8.z, r2.z, l(8)\n                  ishl r8.w, r2.w, l(9)\n                  and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r1.x, l(5)\n                  ishr r0.w, r1.x, l(6)\n                  ishr r2.z, r1.x, l(7)\n                  ishr r2.w, r1.y, l(1)\n                  ishl r8.x, r0.z, l(10)\n                  ishl r8.y, r0.w, l(11)\n                  ishl r8.z, r2.z, l(12)\n                  ishl r8.w, r2.w, l(16)\n                  and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 0x00010000)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  ishr r0.zw, r6.xxxy, l(4)\n                  ishr r2.z, r6.y, l(2)\n                  ishr r2.w, r6.y, l(3)\n                  ishl r9.x, r0.z, l(13)\n                  ishl r9.y, r2.z, l(23)\n                  ishl r9.z, r2.w, l(1)\n                  ishl r9.w, r0.w, l(2)\n                  and r9.xyzw, r9.xyzw, l(8192, 0x00800000, 2, 4)\n                  iadd r0.y, r0.y, r9.x\n                  ishr r0.zw, r5.zzzy, l(4)\n                  ishr r2.z, r5.y, l(1)\n                  ishr r2.w, r5.y, l(2)\n                  ishl r10.x, r0.z, l(14)\n                  ishl r10.y, r0.w, l(24)\n                  ishl r10.z, r2.z, l(10)\n                  ishl r10.w, r2.w, l(11)\n                  and r10.xyzw, r10.xyzw, l(0x00004000, 0x01000000, 1024, 2048)\n                  iadd r0.y, r0.y, r10.x\n                  iadd r0.y, r7.y, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r1.y, l(2)\n                  ishr r0.w, r1.y, l(3)\n                  ishr r2.z, r1.y, l(4)\n                  ishr r2.w, r1.y, l(5)\n                  ishl r8.x, r0.z, l(17)\n                  ishl r8.y, r0.w, l(18)\n                  ishl r8.z, r2.z, l(19)\n                  ishl r8.w, r2.w, l(20)\n                  and r8.xyzw, r8.xyzw, l(0x00020000, 0x00040000, 0x00080000, 0x00100000)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r1.y, l(6)\n                  ishr r0.w, r1.y, l(7)\n                  ishr r2.z, r1.z, l(1)\n                  ishr r2.w, r1.z, l(2)\n                  ishl r8.x, r0.z, l(21)\n                  ishl r8.y, r0.w, l(22)\n                  ishl r8.z, r2.z, l(26)\n                  ishl r8.w, r2.w, l(27)\n                  and r8.xyzw, r8.xyzw, l(0x00200000, 0x00400000, 0x04000000, 0x08000000)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r9.y, r0.y\n                  iadd r0.y, r10.y, r0.y\n                  iadd r0.y, r7.z, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r1.z, l(3)\n                  ishr r0.w, r1.z, l(4)\n                  ishr r2.z, r1.z, l(5)\n                  ishr r2.w, r1.z, l(6)\n                  ishl r7.x, r0.z, l(28)\n                  ishl r7.y, r0.w, l(29)\n                  ishl r7.z, r2.z, l(30)\n                  ishl r0.z, r2.w, l(31)\n                  and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n                  iadd r0.y, r0.y, r7.x\n                  iadd r0.y, r7.y, r0.y\n                  iadd r0.y, r7.z, r0.y\n                  iadd r3.x, r0.z, r0.y\n                  ishr r0.y, r1.z, l(7)\n                  ishr r0.z, r1.w, l(1)\n                  ishr r0.w, r1.w, l(2)\n                  ishr r2.z, r1.w, l(3)\n                  and r0.y, r0.y, l(1)\n                  iadd r0.y, r9.z, r0.y\n                  iadd r0.y, r9.w, r0.y\n                  iadd r0.y, r7.w, r0.y\n                  ishl r7.x, r0.z, l(4)\n                  ishl r7.y, r0.w, l(5)\n                  ishl r7.z, r2.z, l(6)\n                  and r7.xyz, r7.xyzx, l(16, 32, 64, 0)\n                  iadd r0.y, r0.y, r7.x\n                  iadd r0.y, r7.y, r0.y\n                  iadd r0.y, r7.z, r0.y\n                  ishr r0.z, r1.w, l(4)\n                  ishr r0.w, r1.w, l(5)\n                  ishl r7.x, r0.z, l(7)\n                  ishl r7.y, r0.w, l(8)\n                  and r0.zw, r7.xxxy, l(0, 0, 128, 256)\n                  iadd r0.y, r0.z, r0.y\n                  iadd r0.y, r0.w, r0.y\n                  ishl r7.x, r5.y, l(9)\n                  ishl r7.y, r5.z, l(29)\n                  ishl r7.z, r5.x, l(1)\n                  ishl r7.w, r5.w, l(7)\n                  and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n                  iadd r0.y, r0.y, r7.x\n                  iadd r0.y, r10.z, r0.y\n                  iadd r0.y, r10.w, r0.y\n                  ishr r0.zw, r5.yyyz, l(3)\n                  ishr r2.z, r5.z, l(1)\n                  ishr r2.w, r5.z, l(2)\n                  ishl r8.x, r0.z, l(12)\n                  ishl r8.y, r2.z, l(30)\n                  ishl r0.z, r2.w, l(31)\n                  and r2.zw, r8.xxxy, l(0, 0, 4096, 0x40000000)\n                  iadd r0.y, r0.y, r2.z\n                  ishl r8.x, r4.x, l(13)\n                  ishl r8.y, r4.y, l(23)\n                  and r4.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n                  iadd r0.y, r0.y, r4.z\n                  ishr r2.z, r4.x, l(1)\n                  ishr r4.z, r4.x, l(2)\n                  ishr r6.z, r4.x, l(3)\n                  ishr r6.w, r4.x, l(4)\n                  ishl r8.x, r2.z, l(14)\n                  ishl r8.y, r4.z, l(15)\n                  ishl r8.z, r6.z, l(16)\n                  ishl r8.w, r6.w, l(17)\n                  and r8.xyzw, r8.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishl r8.x, r6.y, l(18)\n                  ishl r8.y, r6.x, l(19)\n                  and r6.zw, r8.xxxy, l(0, 0, 0x00040000, 0x00080000)\n                  iadd r0.y, r0.y, r6.z\n                  iadd r0.y, r6.w, r0.y\n                  ishr r6.zw, r6.xxxy, l(1)\n                  ishr r2.z, r6.x, l(2)\n                  ishr r4.z, r6.x, l(3)\n                  ishl r8.x, r6.z, l(20)\n                  ishl r8.y, r2.z, l(21)\n                  ishl r8.z, r4.z, l(22)\n                  ishl r8.w, r6.w, l(28)\n                  and r8.xyzw, r8.xyzw, l(0x00100000, 0x00200000, 0x00400000, 0x10000000)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r4.w, r0.y\n                  ishr r2.z, r4.y, l(1)\n                  ishr r4.z, r4.y, l(2)\n                  ishr r4.w, r4.y, l(3)\n                  ishr r6.z, r4.y, l(4)\n                  ishl r9.x, r2.z, l(24)\n                  ishl r9.y, r4.z, l(25)\n                  ishl r9.z, r4.w, l(26)\n                  ishl r9.w, r6.z, l(27)\n                  and r9.xyzw, r9.xyzw, l(0x01000000, 0x02000000, 0x04000000, 0x08000000)\n                  iadd r0.y, r0.y, r9.x\n                  iadd r0.y, r9.y, r0.y\n                  iadd r0.y, r9.z, r0.y\n                  iadd r0.y, r9.w, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  iadd r0.y, r7.y, r0.y\n                  iadd r0.y, r2.w, r0.y\n                  iadd r3.z, r0.z, r0.y\n                  and r0.y, r0.w, l(1)\n                  iadd r0.y, r0.y, r3.w\n                  iadd r0.y, r7.z, r0.y\n                  ishr r0.z, r5.x, l(1)\n                  ishr r0.w, r5.x, l(2)\n                  ishr r2.z, r5.x, l(3)\n                  ishr r2.w, r5.x, l(4)\n                  ishl r8.x, r0.z, l(2)\n                  ishl r8.y, r0.w, l(3)\n                  ishl r8.z, r2.z, l(4)\n                  ishl r8.w, r2.w, l(5)\n                  and r8.xyzw, r8.xyzw, l(4, 8, 16, 32)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r5.x, l(5)\n                  ishr r0.w, r5.w, l(1)\n                  ishr r2.z, r5.w, l(2)\n                  ishr r2.w, r5.w, l(3)\n                  ishl r8.x, r0.z, l(6)\n                  ishl r8.y, r0.w, l(8)\n                  ishl r8.z, r2.z, l(9)\n                  ishl r8.w, r2.w, l(10)\n                  and r8.xyzw, r8.xyzw, l(64, 256, 512, 1024)\n                  iadd r0.y, r0.y, r8.x\n                  iadd r0.y, r7.w, r0.y\n                  iadd r0.y, r8.y, r0.y\n                  iadd r0.y, r8.z, r0.y\n                  iadd r0.y, r8.w, r0.y\n                  ishr r0.z, r5.w, l(4)\n                  ishr r0.w, r5.w, l(5)\n                  ishl r7.x, r0.z, l(11)\n                  ishl r7.y, r0.w, l(12)\n                  and r0.zw, r7.xxxy, l(0, 0, 2048, 4096)\n                  iadd r0.y, r0.z, r0.y\n                  iadd r0.y, r0.w, r0.y\n                  ishl r0.z, r2.y, l(13)\n                  and r0.z, r0.z, l(8192)\n                  iadd r0.y, r0.z, r0.y\n                  ushr r0.z, r2.y, l(1)\n                  ushr r0.w, r2.y, l(2)\n                  ushr r2.z, r2.y, l(3)\n                  ushr r2.w, r2.y, l(4)\n                  ishl r7.x, r0.z, l(14)\n                  ishl r7.y, r0.w, l(15)\n                  ishl r7.z, r2.z, l(16)\n                  ishl r7.w, r2.w, l(17)\n                  and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                  iadd r0.y, r0.y, r7.x\n                  iadd r0.y, r7.y, r0.y\n                  iadd r0.y, r7.z, r0.y\n                  iadd r3.w, r7.w, r0.y\n                else \n                  ieq r0.y, r2.x, l(8)\n                  if_nz r0.y\n                    ishl r7.x, r1.x, l(5)\n                    ishl r7.y, r1.y, l(15)\n                    ishl r7.z, r1.z, l(25)\n                    ishl r7.w, r1.w, l(3)\n                    and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n                    iadd r0.y, r7.x, l(22)\n                    ishr r0.z, r1.x, l(1)\n                    ishr r0.w, r1.x, l(2)\n                    ishr r2.z, r1.x, l(3)\n                    ishr r2.w, r1.x, l(4)\n                    ishl r8.x, r0.z, l(6)\n                    ishl r8.y, r0.w, l(7)\n                    ishl r8.z, r2.z, l(8)\n                    ishl r8.w, r2.w, l(9)\n                    and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r0.z, r1.x, l(5)\n                    ishr r0.w, r1.x, l(6)\n                    ishr r2.z, r1.x, l(7)\n                    ishr r2.w, r1.y, l(1)\n                    ishl r8.x, r0.z, l(10)\n                    ishl r8.y, r0.w, l(11)\n                    ishl r8.z, r2.z, l(12)\n                    ishl r8.w, r2.w, l(16)\n                    and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 0x00010000)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    ishl r8.x, r6.y, l(13)\n                    ishl r8.y, r6.x, l(19)\n                    and r0.zw, r8.xxxy, l(0, 0, 8192, 0x00080000)\n                    iadd r0.y, r0.z, r0.y\n                    ishr r2.zw, r5.zzzy, l(4)\n                    ishr r0.z, r5.y, l(5)\n                    ishr r4.z, r5.y, l(1)\n                    ishl r9.x, r2.z, l(14)\n                    ishl r9.y, r0.z, l(23)\n                    ishl r9.z, r2.w, l(24)\n                    ishl r9.w, r4.z, l(10)\n                    and r9.xyzw, r9.xyzw, l(0x00004000, 0x00800000, 0x01000000, 1024)\n                    iadd r0.y, r0.y, r9.x\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r0.z, r1.y, l(2)\n                    ishr r2.z, r1.y, l(3)\n                    ishr r2.w, r1.y, l(4)\n                    ishr r4.z, r1.y, l(5)\n                    ishl r8.x, r0.z, l(17)\n                    ishl r8.y, r2.z, l(18)\n                    ishl r8.z, r2.w, l(19)\n                    ishl r8.w, r4.z, l(20)\n                    and r8.xyzw, r8.xyzw, l(0x00020000, 0x00040000, 0x00080000, 0x00100000)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r0.z, r1.y, l(6)\n                    ishr r2.z, r1.y, l(7)\n                    ishr r2.w, r1.z, l(1)\n                    ishr r4.z, r1.z, l(2)\n                    ishl r8.x, r0.z, l(21)\n                    ishl r8.y, r2.z, l(22)\n                    ishl r8.z, r2.w, l(26)\n                    ishl r8.w, r4.z, l(27)\n                    and r8.xyzw, r8.xyzw, l(0x00200000, 0x00400000, 0x04000000, 0x08000000)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r9.y, r0.y\n                    iadd r0.y, r9.z, r0.y\n                    iadd r0.y, r7.z, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r0.z, r1.z, l(3)\n                    ishr r2.z, r1.z, l(4)\n                    ishr r2.w, r1.z, l(5)\n                    ishr r4.z, r1.z, l(6)\n                    ishl r7.x, r0.z, l(28)\n                    ishl r7.y, r2.z, l(29)\n                    ishl r7.z, r2.w, l(30)\n                    ishl r0.z, r4.z, l(31)\n                    and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n                    iadd r0.y, r0.y, r7.x\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r7.z, r0.y\n                    iadd r3.x, r0.z, r0.y\n                    ishr r0.y, r1.z, l(7)\n                    ishr r0.z, r1.w, l(1)\n                    ishr r2.z, r1.w, l(2)\n                    ishr r2.w, r1.w, l(3)\n                    and r0.y, r0.y, l(1)\n                    ishr r4.z, r6.x, l(5)\n                    ishr r6.zw, r6.yyyx, l(4)\n                    ishr r4.w, r6.x, l(1)\n                    ishl r8.x, r4.z, l(1)\n                    ishl r8.y, r6.z, l(2)\n                    ishl r8.z, r6.w, l(8)\n                    ishl r8.w, r4.w, l(20)\n                    and r8.xyzw, r8.xyzw, l(2, 4, 256, 0x00100000)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r7.w, r0.y\n                    ishl r7.x, r0.z, l(4)\n                    ishl r7.y, r2.z, l(5)\n                    ishl r7.z, r2.w, l(6)\n                    and r7.xyz, r7.xyzx, l(16, 32, 64, 0)\n                    iadd r0.y, r0.y, r7.x\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r7.z, r0.y\n                    ishr r0.z, r1.w, l(4)\n                    ishl r0.z, r0.z, l(7)\n                    and r0.z, r0.z, l(128)\n                    iadd r0.y, r0.z, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    ishl r7.x, r5.y, l(9)\n                    ishl r7.y, r5.z, l(29)\n                    ishl r7.z, r5.x, l(1)\n                    ishl r7.w, r5.w, l(7)\n                    and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n                    iadd r0.y, r0.y, r7.x\n                    iadd r0.y, r9.w, r0.y\n                    ishr r2.zw, r5.yyyz, l(2)\n                    ishr r0.z, r5.y, l(3)\n                    ishr r4.z, r5.z, l(1)\n                    ishl r8.x, r2.z, l(11)\n                    ishl r8.y, r0.z, l(12)\n                    ishl r8.z, r4.z, l(30)\n                    ishl r0.z, r2.w, l(31)\n                    and r8.xyz, r8.xyzx, l(2048, 4096, 0x40000000, 0)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r8.y, r0.y\n                    ishl r8.x, r4.x, l(13)\n                    ishl r8.y, r4.y, l(23)\n                    and r2.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n                    iadd r0.y, r0.y, r2.z\n                    ishr r2.z, r4.x, l(1)\n                    ishr r4.z, r4.x, l(2)\n                    ishr r4.w, r4.x, l(3)\n                    ishr r6.z, r4.x, l(4)\n                    ishl r9.x, r2.z, l(14)\n                    ishl r9.y, r4.z, l(15)\n                    ishl r9.z, r4.w, l(16)\n                    ishl r9.w, r6.z, l(17)\n                    and r9.xyzw, r9.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                    iadd r0.y, r0.y, r9.x\n                    iadd r0.y, r9.y, r0.y\n                    iadd r0.y, r9.z, r0.y\n                    iadd r0.y, r9.w, r0.y\n                    ishr r2.z, r4.x, l(5)\n                    ishr r4.z, r4.y, l(1)\n                    ishr r4.w, r4.y, l(2)\n                    ishr r6.z, r4.y, l(3)\n                    ishl r9.x, r2.z, l(18)\n                    ishl r9.y, r4.z, l(24)\n                    ishl r9.z, r4.w, l(25)\n                    ishl r9.w, r6.z, l(26)\n                    and r9.xyzw, r9.xyzw, l(0x00040000, 0x01000000, 0x02000000, 0x04000000)\n                    iadd r0.y, r0.y, r9.x\n                    iadd r0.y, r0.w, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r4.zw, r6.xxxy, l(2)\n                    ishr r0.w, r6.x, l(3)\n                    ishr r2.z, r6.y, l(1)\n                    ishl r10.x, r4.z, l(21)\n                    ishl r10.y, r0.w, l(22)\n                    ishl r10.z, r2.z, l(28)\n                    ishl r10.w, r4.w, l(6)\n                    and r10.xyzw, r10.xyzw, l(0x00200000, 0x00400000, 0x10000000, 64)\n                    iadd r0.y, r0.y, r10.x\n                    iadd r0.y, r10.y, r0.y\n                    iadd r0.y, r2.w, r0.y\n                    iadd r0.y, r9.y, r0.y\n                    iadd r0.y, r9.z, r0.y\n                    iadd r0.y, r9.w, r0.y\n                    ishr r0.w, r4.y, l(4)\n                    ishl r0.w, r0.w, l(27)\n                    and r0.w, r0.w, l(0x08000000)\n                    iadd r0.y, r0.w, r0.y\n                    iadd r0.y, r10.z, r0.y\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    iadd r3.z, r0.z, r0.y\n                    ishr r0.yz, r5.zzxz, l(3)\n                    ishr r0.w, r5.x, l(1)\n                    ishr r2.z, r5.x, l(2)\n                    and r0.y, r0.y, l(1)\n                    iadd r0.y, r0.y, r3.w\n                    iadd r0.y, r7.z, r0.y\n                    ishl r7.x, r0.w, l(2)\n                    ishl r7.y, r2.z, l(3)\n                    ishl r7.z, r0.z, l(4)\n                    and r7.xyz, r7.xyzx, l(4, 8, 16, 0)\n                    iadd r0.y, r0.y, r7.x\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r7.z, r0.y\n                    ishr r0.z, r5.x, l(4)\n                    ishr r0.w, r5.w, l(1)\n                    ishr r2.z, r5.w, l(2)\n                    ishr r2.w, r5.w, l(3)\n                    ishl r8.x, r0.z, l(5)\n                    ishl r8.y, r0.w, l(8)\n                    ishl r8.z, r2.z, l(9)\n                    ishl r8.w, r2.w, l(10)\n                    and r8.xyzw, r8.xyzw, l(32, 256, 512, 1024)\n                    iadd r0.y, r0.y, r8.x\n                    iadd r0.y, r10.w, r0.y\n                    iadd r0.y, r7.w, r0.y\n                    iadd r0.y, r8.y, r0.y\n                    iadd r0.y, r8.z, r0.y\n                    iadd r0.y, r8.w, r0.y\n                    ishr r0.z, r5.w, l(4)\n                    ishl r0.z, r0.z, l(11)\n                    and r0.z, r0.z, l(2048)\n                    iadd r0.y, r0.z, r0.y\n                    ishr r0.z, r6.y, l(3)\n                    ishl r0.z, r0.z, l(12)\n                    and r0.z, r0.z, l(4096)\n                    iadd r0.y, r0.z, r0.y\n                    ishl r0.z, r2.y, l(13)\n                    and r0.z, r0.z, l(8192)\n                    iadd r0.y, r0.z, r0.y\n                    ushr r0.z, r2.y, l(1)\n                    ushr r0.w, r2.y, l(2)\n                    ushr r2.z, r2.y, l(3)\n                    ushr r2.w, r2.y, l(4)\n                    ishl r7.x, r0.z, l(14)\n                    ishl r7.y, r0.w, l(15)\n                    ishl r7.z, r2.z, l(16)\n                    ishl r7.w, r2.w, l(17)\n                    and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                    iadd r0.y, r0.y, r7.x\n                    iadd r0.y, r7.y, r0.y\n                    iadd r0.y, r7.z, r0.y\n                    iadd r3.w, r7.w, r0.y\n                  else \n                    ieq r0.y, r2.x, l(9)\n                    if_nz r0.y\n                      ishl r7.x, r1.x, l(5)\n                      ishl r7.y, r1.y, l(15)\n                      ishl r7.z, r1.z, l(25)\n                      ishl r7.w, r1.w, l(3)\n                      and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n                      iadd r0.y, r7.x, l(26)\n                      ishr r0.z, r1.x, l(1)\n                      ishr r0.w, r1.x, l(2)\n                      ishr r2.z, r1.x, l(3)\n                      ishr r2.w, r1.x, l(4)\n                      ishl r8.x, r0.z, l(6)\n                      ishl r8.y, r0.w, l(7)\n                      ishl r8.z, r2.z, l(8)\n                      ishl r8.w, r2.w, l(9)\n                      and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r8.y, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      iadd r0.y, r8.w, r0.y\n                      ishr r0.z, r1.x, l(5)\n                      ishr r0.w, r1.x, l(6)\n                      ishr r2.z, r1.x, l(7)\n                      ishr r2.w, r1.y, l(1)\n                      ishl r8.x, r0.z, l(10)\n                      ishl r8.y, r0.w, l(11)\n                      ishl r8.z, r2.z, l(12)\n                      ishl r8.w, r2.w, l(16)\n                      and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 0x00010000)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r8.y, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      ishr r0.z, r6.y, l(1)\n                      ishr r0.w, r6.y, l(5)\n                      ishr r2.zw, r6.yyyx, l(4)\n                      ishl r9.x, r0.z, l(13)\n                      ishl r9.y, r0.w, l(1)\n                      ishl r9.z, r2.z, l(2)\n                      ishl r9.w, r2.w, l(8)\n                      and r9.xyzw, r9.xyzw, l(8192, 2, 4, 256)\n                      iadd r0.y, r0.y, r9.x\n                      ishr r0.zw, r5.zzzy, l(4)\n                      ishr r2.z, r5.z, l(5)\n                      ishr r2.w, r5.y, l(1)\n                      ishl r10.x, r0.z, l(14)\n                      ishl r10.y, r2.z, l(23)\n                      ishl r10.z, r0.w, l(24)\n                      ishl r10.w, r2.w, l(10)\n                      and r10.xyzw, r10.xyzw, l(0x00004000, 0x00800000, 0x01000000, 1024)\n                      iadd r0.y, r0.y, r10.x\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r8.w, r0.y\n                      ishr r0.z, r1.y, l(2)\n                      ishr r0.w, r1.y, l(3)\n                      ishr r2.z, r1.y, l(4)\n                      ishr r2.w, r1.y, l(5)\n                      ishl r8.x, r0.z, l(17)\n                      ishl r8.y, r0.w, l(18)\n                      ishl r8.z, r2.z, l(19)\n                      ishl r8.w, r2.w, l(20)\n                      and r8.xyzw, r8.xyzw, l(0x00020000, 0x00040000, 0x00080000, 0x00100000)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r8.y, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      iadd r0.y, r8.w, r0.y\n                      ishr r0.z, r1.y, l(6)\n                      ishr r0.w, r1.y, l(7)\n                      ishr r2.z, r1.z, l(1)\n                      ishr r2.w, r1.z, l(2)\n                      ishl r8.x, r0.z, l(21)\n                      ishl r8.y, r0.w, l(22)\n                      ishl r8.z, r2.z, l(26)\n                      ishl r8.w, r2.w, l(27)\n                      and r8.xyzw, r8.xyzw, l(0x00200000, 0x00400000, 0x04000000, 0x08000000)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r8.y, r0.y\n                      iadd r0.y, r10.y, r0.y\n                      iadd r0.y, r10.z, r0.y\n                      iadd r0.y, r7.z, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      iadd r0.y, r8.w, r0.y\n                      ishr r0.z, r1.z, l(3)\n                      ishr r0.w, r1.z, l(4)\n                      ishr r2.z, r1.z, l(5)\n                      ishr r2.w, r1.z, l(6)\n                      ishl r7.x, r0.z, l(28)\n                      ishl r7.y, r0.w, l(29)\n                      ishl r7.z, r2.z, l(30)\n                      ishl r0.z, r2.w, l(31)\n                      and r7.xyz, r7.xyzx, l(0x10000000, 0x20000000, 0x40000000, 0)\n                      iadd r0.y, r0.y, r7.x\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r7.z, r0.y\n                      iadd r3.x, r0.z, r0.y\n                      ishr r0.y, r1.z, l(7)\n                      ishr r0.z, r1.w, l(1)\n                      ishr r0.w, r1.w, l(2)\n                      ishr r2.z, r1.w, l(3)\n                      and r0.y, r0.y, l(1)\n                      iadd r0.y, r9.y, r0.y\n                      iadd r0.y, r9.z, r0.y\n                      iadd r0.y, r7.w, r0.y\n                      ishl r7.x, r0.z, l(4)\n                      ishl r7.y, r0.w, l(5)\n                      ishl r7.z, r2.z, l(6)\n                      and r7.xyz, r7.xyzx, l(16, 32, 64, 0)\n                      iadd r0.y, r0.y, r7.x\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r7.z, r0.y\n                      ishr r0.z, r1.w, l(4)\n                      ishl r0.z, r0.z, l(7)\n                      and r0.z, r0.z, l(128)\n                      iadd r0.y, r0.z, r0.y\n                      iadd r0.y, r9.w, r0.y\n                      ishl r7.x, r5.y, l(9)\n                      ishl r7.y, r5.z, l(29)\n                      ishl r7.z, r5.x, l(1)\n                      ishl r7.w, r5.w, l(7)\n                      and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n                      iadd r0.y, r0.y, r7.x\n                      iadd r0.y, r10.w, r0.y\n                      ishr r0.zw, r5.yyyz, l(2)\n                      ishr r2.z, r5.y, l(3)\n                      ishr r2.w, r5.z, l(1)\n                      ishl r8.x, r0.z, l(11)\n                      ishl r8.y, r2.z, l(12)\n                      ishl r8.z, r2.w, l(30)\n                      ishl r0.z, r0.w, l(31)\n                      and r8.xyz, r8.xyzx, l(2048, 4096, 0x40000000, 0)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r8.y, r0.y\n                      ishl r8.x, r4.x, l(13)\n                      ishl r8.y, r4.y, l(23)\n                      and r2.zw, r8.xxxy, l(0, 0, 8192, 0x00800000)\n                      iadd r0.y, r0.y, r2.z\n                      ishr r0.w, r4.x, l(1)\n                      ishr r2.z, r4.x, l(2)\n                      ishr r4.z, r4.x, l(3)\n                      ishr r4.w, r4.x, l(4)\n                      ishl r9.x, r0.w, l(14)\n                      ishl r9.y, r2.z, l(15)\n                      ishl r9.z, r4.z, l(16)\n                      ishl r9.w, r4.w, l(17)\n                      and r9.xyzw, r9.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                      iadd r0.y, r0.y, r9.x\n                      iadd r0.y, r9.y, r0.y\n                      iadd r0.y, r9.z, r0.y\n                      iadd r0.y, r9.w, r0.y\n                      ishl r8.x, r6.y, l(18)\n                      ishl r8.y, r6.x, l(19)\n                      and r4.zw, r8.xxxy, l(0, 0, 0x00040000, 0x00080000)\n                      iadd r0.y, r0.y, r4.z\n                      iadd r0.y, r4.w, r0.y\n                      ishr r0.w, r6.x, l(1)\n                      ishr r4.zw, r6.xxxy, l(2)\n                      ishr r2.z, r6.x, l(3)\n                      ishl r9.x, r0.w, l(20)\n                      ishl r9.y, r4.z, l(21)\n                      ishl r9.z, r2.z, l(22)\n                      ishl r9.w, r4.w, l(6)\n                      and r9.xyzw, r9.xyzw, l(0x00100000, 0x00200000, 0x00400000, 64)\n                      iadd r0.y, r0.y, r9.x\n                      iadd r0.y, r9.y, r0.y\n                      iadd r0.y, r9.z, r0.y\n                      iadd r0.y, r2.w, r0.y\n                      ishr r0.w, r4.y, l(1)\n                      ishr r2.z, r4.y, l(2)\n                      ishr r2.w, r4.y, l(3)\n                      ishr r4.z, r4.y, l(4)\n                      ishl r10.x, r0.w, l(24)\n                      ishl r10.y, r2.z, l(25)\n                      ishl r10.z, r2.w, l(26)\n                      ishl r10.w, r4.z, l(27)\n                      and r10.xyzw, r10.xyzw, l(0x01000000, 0x02000000, 0x04000000, 0x08000000)\n                      iadd r0.y, r0.y, r10.x\n                      iadd r0.y, r10.y, r0.y\n                      iadd r0.y, r10.z, r0.y\n                      iadd r0.y, r10.w, r0.y\n                      ishr r0.w, r4.y, l(5)\n                      ishl r0.w, r0.w, l(28)\n                      and r0.w, r0.w, l(0x10000000)\n                      iadd r0.y, r0.w, r0.y\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      iadd r3.z, r0.z, r0.y\n                      ishr r0.yz, r5.zzxz, l(3)\n                      ishr r0.w, r5.x, l(1)\n                      ishr r2.z, r5.x, l(2)\n                      and r0.y, r0.y, l(1)\n                      iadd r0.y, r0.y, r3.w\n                      iadd r0.y, r7.z, r0.y\n                      ishl r7.x, r0.w, l(2)\n                      ishl r7.y, r2.z, l(3)\n                      ishl r7.z, r0.z, l(4)\n                      and r7.xyz, r7.xyzx, l(4, 8, 16, 0)\n                      iadd r0.y, r0.y, r7.x\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r7.z, r0.y\n                      ishr r0.z, r5.x, l(4)\n                      ishr r0.w, r5.w, l(1)\n                      ishr r2.z, r5.w, l(2)\n                      ishr r2.w, r5.w, l(3)\n                      ishl r8.x, r0.z, l(5)\n                      ishl r8.y, r0.w, l(8)\n                      ishl r8.z, r2.z, l(9)\n                      ishl r8.w, r2.w, l(10)\n                      and r8.xyzw, r8.xyzw, l(32, 256, 512, 1024)\n                      iadd r0.y, r0.y, r8.x\n                      iadd r0.y, r9.w, r0.y\n                      iadd r0.y, r7.w, r0.y\n                      iadd r0.y, r8.y, r0.y\n                      iadd r0.y, r8.z, r0.y\n                      iadd r0.y, r8.w, r0.y\n                      ishr r0.z, r5.w, l(4)\n                      ishl r0.z, r0.z, l(11)\n                      and r0.z, r0.z, l(2048)\n                      iadd r0.y, r0.z, r0.y\n                      ishr r0.z, r6.y, l(3)\n                      ishl r0.z, r0.z, l(12)\n                      and r0.z, r0.z, l(4096)\n                      iadd r0.y, r0.z, r0.y\n                      ishl r0.z, r2.y, l(13)\n                      and r0.z, r0.z, l(8192)\n                      iadd r0.y, r0.z, r0.y\n                      ushr r0.z, r2.y, l(1)\n                      ushr r0.w, r2.y, l(2)\n                      ushr r2.z, r2.y, l(3)\n                      ushr r2.w, r2.y, l(4)\n                      ishl r7.x, r0.z, l(14)\n                      ishl r7.y, r0.w, l(15)\n                      ishl r7.z, r2.z, l(16)\n                      ishl r7.w, r2.w, l(17)\n                      and r7.xyzw, r7.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                      iadd r0.y, r0.y, r7.x\n                      iadd r0.y, r7.y, r0.y\n                      iadd r0.y, r7.z, r0.y\n                      iadd r3.w, r7.w, r0.y\n                    else \n                      ieq r0.y, r2.x, l(10)\n                      if_nz r0.y\n                        ishl r7.x, r1.x, l(5)\n                        ishl r7.y, r1.y, l(15)\n                        ishl r7.z, r1.z, l(25)\n                        ishl r7.w, r1.w, l(3)\n                        and r7.xyzw, r7.xyzw, l(32, 0x00008000, 0x02000000, 8)\n                        iadd r0.y, r7.x, l(30)\n                        ishr r0.z, r1.x, l(1)\n                        ishr r0.w, r1.x, l(2)\n                        ishr r2.x, r1.x, l(3)\n                        ishr r2.z, r1.x, l(4)\n                        ishl r8.x, r0.z, l(6)\n                        ishl r8.y, r0.w, l(7)\n                        ishl r8.z, r2.x, l(8)\n                        ishl r8.w, r2.z, l(9)\n                        and r8.xyzw, r8.xyzw, l(64, 128, 256, 512)\n                        iadd r0.y, r0.y, r8.x\n                        iadd r0.y, r8.y, r0.y\n                        iadd r0.y, r8.z, r0.y\n                        iadd r0.y, r8.w, r0.y\n                        ishr r0.z, r1.x, l(5)\n                        ishr r0.w, r1.y, l(1)\n                        ishr r1.x, r1.y, l(2)\n                        ishr r2.x, r1.y, l(3)\n                        ishl r8.x, r0.z, l(10)\n                        ishl r8.y, r0.w, l(16)\n                        ishl r8.z, r1.x, l(17)\n                        ishl r8.w, r2.x, l(18)\n                        and r8.xyzw, r8.xyzw, l(1024, 0x00010000, 0x00020000, 0x00040000)\n                        iadd r0.y, r0.y, r8.x\n                        ishr r0.z, r6.x, l(4)\n                        ishr r0.w, r6.y, l(1)\n                        ishr r1.x, r6.y, l(2)\n                        ishr r2.x, r6.x, l(5)\n                        ishl r9.x, r0.z, l(11)\n                        ishl r9.y, r0.w, l(13)\n                        ishl r9.z, r1.x, l(23)\n                        ishl r0.z, r2.x, l(31)\n                        and r2.xzw, r9.xxyz, l(2048, 0, 8192, 0x00800000)\n                        iadd r0.y, r0.y, r2.x\n                        ishl r9.x, r6.y, l(12)\n                        ishl r9.y, r6.x, l(19)\n                        and r4.zw, r9.xxxy, l(0, 0, 4096, 0x00080000)\n                        iadd r0.y, r0.y, r4.z\n                        iadd r0.y, r2.z, r0.y\n                        ishr r2.xz, r5.zzyz, l(4)\n                        ishr r6.zw, r5.yyyz, l(5)\n                        ishl r9.x, r2.x, l(14)\n                        ishl r9.y, r6.z, l(21)\n                        ishl r9.z, r6.w, l(22)\n                        ishl r9.w, r2.z, l(24)\n                        and r9.xyzw, r9.xyzw, l(0x00004000, 0x00200000, 0x00400000, 0x01000000)\n                        iadd r0.y, r0.y, r9.x\n                        iadd r0.y, r7.y, r0.y\n                        iadd r0.y, r8.y, r0.y\n                        iadd r0.y, r8.z, r0.y\n                        iadd r0.y, r8.w, r0.y\n                        ishr r0.w, r1.y, l(4)\n                        ishr r1.x, r1.y, l(5)\n                        ishr r1.y, r1.z, l(1)\n                        ishr r2.x, r1.z, l(2)\n                        ishl r8.x, r0.w, l(19)\n                        ishl r8.y, r1.x, l(20)\n                        ishl r8.z, r1.y, l(26)\n                        ishl r8.w, r2.x, l(27)\n                        and r8.xyzw, r8.xyzw, l(0x00080000, 0x00100000, 0x04000000, 0x08000000)\n                        iadd r0.y, r0.y, r8.x\n                        iadd r0.y, r8.y, r0.y\n                        iadd r0.y, r9.y, r0.y\n                        iadd r0.y, r9.z, r0.y\n                        iadd r0.y, r2.w, r0.y\n                        iadd r0.y, r9.w, r0.y\n                        iadd r0.y, r7.z, r0.y\n                        iadd r0.y, r8.z, r0.y\n                        iadd r0.y, r8.w, r0.y\n                        ishr r0.w, r1.z, l(3)\n                        ishr r1.x, r1.z, l(4)\n                        ishr r1.y, r1.z, l(5)\n                        ishr r1.z, r1.w, l(1)\n                        ishl r8.x, r0.w, l(28)\n                        ishl r8.y, r1.x, l(29)\n                        ishl r8.z, r1.y, l(30)\n                        ishl r8.w, r1.z, l(4)\n                        and r8.xyzw, r8.xyzw, l(0x10000000, 0x20000000, 0x40000000, 16)\n                        iadd r0.y, r0.y, r8.x\n                        iadd r0.y, r8.y, r0.y\n                        iadd r0.y, r8.z, r0.y\n                        iadd r3.x, r0.z, r0.y\n                        ishr r0.y, r6.y, l(3)\n                        ishr r0.z, r6.y, l(5)\n                        ishr r0.w, r6.y, l(4)\n                        ishr r1.x, r6.x, l(1)\n                        and r0.y, r0.y, l(1)\n                        ishl r7.x, r0.z, l(1)\n                        ishl r7.y, r0.w, l(2)\n                        ishl r7.z, r1.x, l(20)\n                        and r1.xyz, r7.xyzx, l(2, 4, 0x00100000, 0)\n                        iadd r0.y, r0.y, r1.x\n                        iadd r0.y, r1.y, r0.y\n                        iadd r0.y, r7.w, r0.y\n                        iadd r0.y, r8.w, r0.y\n                        ishr r0.z, r1.w, l(2)\n                        ishr r0.w, r1.w, l(3)\n                        ishr r1.x, r1.w, l(4)\n                        ishr r1.y, r1.w, l(5)\n                        ishl r7.x, r0.z, l(5)\n                        ishl r7.y, r0.w, l(6)\n                        ishl r7.z, r1.x, l(7)\n                        ishl r7.w, r1.y, l(8)\n                        and r7.xyzw, r7.xyzw, l(32, 64, 128, 256)\n                        iadd r0.y, r0.y, r7.x\n                        iadd r0.y, r7.y, r0.y\n                        iadd r0.y, r7.z, r0.y\n                        iadd r0.y, r7.w, r0.y\n                        ishl r7.x, r5.y, l(9)\n                        ishl r7.y, r5.z, l(29)\n                        ishl r7.z, r5.x, l(1)\n                        ishl r7.w, r5.w, l(7)\n                        and r7.xyzw, r7.xyzw, l(512, 0x20000000, 2, 128)\n                        iadd r0.y, r0.y, r7.x\n                        ishr r0.zw, r5.yyyz, l(1)\n                        ishr r1.x, r5.y, l(2)\n                        ishr r1.y, r5.y, l(3)\n                        ishl r8.x, r0.z, l(10)\n                        ishl r8.y, r1.x, l(11)\n                        ishl r8.z, r1.y, l(12)\n                        ishl r8.w, r0.w, l(30)\n                        and r8.xyzw, r8.xyzw, l(1024, 2048, 4096, 0x40000000)\n                        iadd r0.y, r0.y, r8.x\n                        iadd r0.y, r8.y, r0.y\n                        iadd r0.y, r8.z, r0.y\n                        ishl r1.x, r4.x, l(13)\n                        ishl r1.y, r4.y, l(23)\n                        and r0.zw, r1.xxxy, l(0, 0, 8192, 0x00800000)\n                        iadd r0.y, r0.z, r0.y\n                        ishr r0.z, r4.x, l(1)\n                        ishr r1.x, r4.x, l(2)\n                        ishr r1.y, r4.x, l(3)\n                        ishr r1.w, r4.x, l(4)\n                        ishl r9.x, r0.z, l(14)\n                        ishl r9.y, r1.x, l(15)\n                        ishl r9.z, r1.y, l(16)\n                        ishl r9.w, r1.w, l(17)\n                        and r9.xyzw, r9.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                        iadd r0.y, r0.y, r9.x\n                        iadd r0.y, r9.y, r0.y\n                        iadd r0.y, r9.z, r0.y\n                        iadd r0.y, r9.w, r0.y\n                        ishr r0.z, r4.x, l(5)\n                        ishr r1.x, r4.y, l(1)\n                        ishr r1.y, r4.y, l(2)\n                        ishr r1.w, r4.y, l(3)\n                        ishl r9.x, r0.z, l(18)\n                        ishl r9.y, r1.x, l(24)\n                        ishl r9.z, r1.y, l(25)\n                        ishl r9.w, r1.w, l(26)\n                        and r9.xyzw, r9.xyzw, l(0x00040000, 0x01000000, 0x02000000, 0x04000000)\n                        iadd r0.y, r0.y, r9.x\n                        iadd r0.y, r4.w, r0.y\n                        iadd r0.y, r1.z, r0.y\n                        ishr r0.z, r6.x, l(2)\n                        ishr r1.x, r6.x, l(3)\n                        ishl r6.x, r0.z, l(21)\n                        ishl r6.y, r1.x, l(22)\n                        and r1.xy, r6.xyxx, l(0x00200000, 0x00400000, 0, 0)\n                        iadd r0.y, r0.y, r1.x\n                        iadd r0.y, r1.y, r0.y\n                        iadd r0.y, r0.w, r0.y\n                        iadd r0.y, r9.y, r0.y\n                        iadd r0.y, r9.z, r0.y\n                        iadd r0.y, r9.w, r0.y\n                        ishr r0.z, r4.y, l(4)\n                        ishr r0.w, r4.y, l(5)\n                        ishl r1.x, r0.z, l(27)\n                        ishl r1.y, r0.w, l(28)\n                        and r0.zw, r1.xxxy, l(0, 0, 0x08000000, 0x10000000)\n                        iadd r0.y, r0.z, r0.y\n                        iadd r0.y, r0.w, r0.y\n                        iadd r0.y, r7.y, r0.y\n                        iadd r0.y, r8.w, r0.y\n                        ishr r0.zw, r5.zzzx, l(2)\n                        ishr r1.x, r5.z, l(3)\n                        ishr r1.y, r5.x, l(1)\n                        ishl r4.x, r0.z, l(31)\n                        ishl r4.y, r1.y, l(2)\n                        ishl r4.z, r0.w, l(3)\n                        iadd r3.z, r0.y, r4.x\n                        and r0.y, r1.x, l(1)\n                        iadd r0.y, r0.y, r3.w\n                        iadd r0.y, r7.z, r0.y\n                        and r0.zw, r4.yyyz, l(0, 0, 4, 8)\n                        iadd r0.y, r0.z, r0.y\n                        iadd r0.y, r0.w, r0.y\n                        ishr r0.z, r5.x, l(3)\n                        ishr r0.w, r5.x, l(4)\n                        ishr r1.x, r5.x, l(5)\n                        ishr r1.y, r5.w, l(1)\n                        ishl r4.x, r0.z, l(4)\n                        ishl r4.y, r0.w, l(5)\n                        ishl r4.z, r1.x, l(6)\n                        ishl r4.w, r1.y, l(8)\n                        and r1.xyzw, r4.xyzw, l(16, 32, 64, 256)\n                        iadd r0.y, r0.y, r1.x\n                        iadd r0.y, r1.y, r0.y\n                        iadd r0.y, r1.z, r0.y\n                        iadd r0.y, r7.w, r0.y\n                        iadd r0.y, r1.w, r0.y\n                        ishr r0.z, r5.w, l(2)\n                        ishr r0.w, r5.w, l(3)\n                        ishr r1.x, r5.w, l(4)\n                        ishr r1.y, r5.w, l(5)\n                        ishl r4.x, r0.z, l(9)\n                        ishl r4.y, r0.w, l(10)\n                        ishl r4.z, r1.x, l(11)\n                        ishl r4.w, r1.y, l(12)\n                        and r1.xyzw, r4.xyzw, l(512, 1024, 2048, 4096)\n                        iadd r0.y, r0.y, r1.x\n                        iadd r0.y, r1.y, r0.y\n                        iadd r0.y, r1.z, r0.y\n                        iadd r0.y, r1.w, r0.y\n                        ishl r0.z, r2.y, l(13)\n                        and r0.z, r0.z, l(8192)\n                        iadd r0.y, r0.z, r0.y\n                        ushr r0.z, r2.y, l(1)\n                        ushr r0.w, r2.y, l(2)\n                        ushr r1.x, r2.y, l(3)\n                        ushr r1.y, r2.y, l(4)\n                        ishl r2.x, r0.z, l(14)\n                        ishl r2.y, r0.w, l(15)\n                        ishl r2.z, r1.x, l(16)\n                        ishl r2.w, r1.y, l(17)\n                        and r1.xyzw, r2.xyzw, l(0x00004000, 0x00008000, 0x00010000, 0x00020000)\n                        iadd r0.y, r0.y, r1.x\n                        iadd r0.y, r1.y, r0.y\n                        iadd r0.y, r1.z, r0.y\n                        iadd r3.w, r1.w, r0.y\n                      else \n                        mov r3.xz, l(0,0,0,0)\n                      endif \n                    endif \n                  endif \n                endif \n              endif \n            endif \n          endif \n        endif \n      endif \n    endif \n  endif \n  store_structured u0.xyzw, r0.x, l(0), r3.xzwy\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC6HEncode_EncodeBlockCS[] =\n{\n     68,  88,  66,  67, 175, 105, \n     37,  89, 105, 238,  20, 239, \n     19, 200,  75,   5,  33, 255, \n     18, 179,   1,   0,   0,   0, \n     20, 173,   1,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88, 192, 172,   1,   0, \n     64,   0,   5,   0,  48, 107, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,  58,   1, \n      0,   0, 204, 204,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    136, 136,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 238, 238, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 200, 236,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n    128, 200,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0, 236, 254, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0, 200, 254,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n    128, 236,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   0,   0, 200, \n      0,   0,  15,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0, 236, 255,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n    128, 254,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   0,   0, 232, \n      0,   0,  15,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0, 232, 255,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,   0, \n      0, 255,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   0, 240, 255, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,   0, 240,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   2,   0,   0,   0, \n     16, 247,   0,   0,  15,   0, \n      0,   0,   4,   0,   0,   0, \n      2,   0,   0,   0, 142,   0, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0,   0, 113,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,   2,   0,   0,   0, \n    206,   8,   0,   0,   2,   0, \n      0,   0,   4,   0,   0,   0, \n      2,   0,   0,   0, 140,   0, \n      0,   0,   2,   0,   0,   0, \n      5,   0,   0,   0,   2,   0, \n      0,   0,  16, 115,   0,   0, \n      8,   0,   0,   0,   5,   0, \n      0,   0,   2,   0,   0,   0, \n      0,  49,   0,   0,   8,   0, \n      0,   0,   5,   0,   0,   0, \n      2,   0,   0,   0, 206, 140, \n      0,   0,  15,   0,   0,   0, \n      5,   0,   0,   0,   3,   0, \n      0,   0, 140,   8,   0,   0, \n      2,   0,   0,   0,   6,   0, \n      0,   0,   3,   0,   0,   0, \n     16,  49,   0,   0,   8,   0, \n      0,   0,   6,   0,   0,   0, \n      3,   0,   0,   0, 102, 102, \n      0,   0,   2,   0,   0,   0, \n      6,   0,   0,   0,   3,   0, \n      0,   0, 108,  54,   0,   0, \n      2,   0,   0,   0,   6,   0, \n      0,   0,   3,   0,   0,   0, \n    232,  23,   0,   0,   8,   0, \n      0,   0,   6,   0,   0,   0, \n      3,   0,   0,   0, 240,  15, \n      0,   0,   8,   0,   0,   0, \n      7,   0,   0,   0,   3,   0, \n      0,   0, 142, 113,   0,   0, \n      2,   0,   0,   0,   7,   0, \n      0,   0,   3,   0,   0,   0, \n    156,  57,   0,   0,   2,   0, \n      0,   0,   7,   0,   0,   0, \n      3,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      7,   0,   0,   0,   3,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   4,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   4,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      4,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      9,   0,   0,   0,   4,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,   9,   0, \n      0,   0,   4,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   5,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      5,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n     10,   0,   0,   0,   5,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  11,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   7,   0,   0,   0, \n     10,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   7,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,  11,   0,   0,   0, \n      5,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n     11,   0,   0,   0,   4,   0, \n      0,   0,   5,   0,   0,   0, \n      4,   0,   0,   0,  11,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   5,   0, \n      0,   0,   9,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      8,   0,   0,   0,   6,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   8,   0, \n      0,   0,   5,   0,   0,   0, \n      6,   0,   0,   0,   5,   0, \n      0,   0,   8,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,  10,   0, \n      0,   0,  10,   0,   0,   0, \n     10,   0,   0,   0,  10,   0, \n      0,   0,  11,   0,   0,   0, \n      9,   0,   0,   0,   9,   0, \n      0,   0,   9,   0,   0,   0, \n     12,   0,   0,   0,   8,   0, \n      0,   0,   8,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     88,  24,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0, 162,   0, \n      0,   4,   0, 112,  16,   0, \n      1,   0,   0,   0,  16,   0, \n      0,   0, 158,   0,   0,   4, \n      0, 224,  17,   0,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     95,   0,   0,   2,   0,  64, \n      2,   0,  95,   0,   0,   2, \n     18,  16,   2,   0, 104,   0, \n      0,   2,  18,   0,   0,   0, \n    160,   0,   0,   5,   0, 240, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   0,  64,   0, \n      0,   0, 155,   0,   0,   4, \n     64,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   6,  18,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  16,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   8,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10, 128,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     80,   0,   0,   8,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  62,   0,   0,   1, \n     21,   0,   0,   1,   1,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16, 128,  65,   0,   0,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,  79,   0,   0,  10, \n    242,   0,  16,   0,   1,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     78,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      0, 208,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     35,   0,   0,  11,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16, 128,  65,   0, \n      0,   0,   0,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   8, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  45,   0, \n      0,   7, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,  16,   0,   0,  10, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 208, 179,  89,  62, \n     89,  23,  55,  63, 152, 221, \n    147,  61,   0,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      4,   0,   0,   0,   6,   5, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 127, 255, 255, 127,   0, \n    255, 255, 255, 127, 255, 255, \n    127,   0,  79,   0,   0,  10, \n     50,   0,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 239, 255,  71, 255, 239, \n    255,  71,   0,   0,   0,   0, \n      0,   0,   0,   0, 134,   0, \n     16,   0,   4,   0,   0,   0, \n     79,   0,   0,  10,  50,   0, \n     16,   0,   5,   0,   0,   0, \n    134,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0, 128,  56,   0,   0, \n    128,  56,   0,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 194,   0,  16,   0, \n      5,   0,   0,   0,   6,   8, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,  11, \n    194,   0,  16,   0,   5,   0, \n      0,   0, 166,  14,  16, 128, \n     65,   0,   0,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 113,   0,   0,   0, \n    113,   0,   0,   0,  30,   0, \n      0,  10, 162,   0,  16,   0, \n      4,   0,   0,   0,  86,  13, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   0,   0,   0, \n    128,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,  10,  50,   0,  16,   0, \n      4,   0,   0,   0, 134,   0, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0, 200,   0,   0,   0, 200, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      5,   0,   0,   0,  70,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  30,   0,   0,  10, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 255,  15, \n      0,   0, 255,  15,   0,   0, \n     85,   0,   0,   7,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,  10,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0, 230,  10, \n     16,   0,   4,   0,   0,   0, \n     85,   0,   0,   7,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,  10,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n     50,   0,  16,   0,   2,   0, \n      0,   0,  70,   0,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  30,   0,   0,   7, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      3,   0,   0,   0,  70,   0, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,  10,  50,   0, \n     16,   0,   2,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    127,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 255, 239, 255,  71, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0, 128,  56, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  30,   0, \n      0,   8, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16, 128,  65,   0,   0,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0, 113,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0, 128,   0,  85,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0, 200, \n     55,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    255,  15,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0, 255, 127,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 127,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  32,   0, \n      0,   8, 130,   0,  16,   0, \n      0,   0,   0,   0,  42, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  95,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  78,   0, \n      0,  11, 114,   0,  16,   0, \n      2,   0,   0,   0,   0, 208, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,  31,   0, \n      0,   0,   0,   0,   0,   0, \n     79,   0,   0,  10, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255, 123, \n      0,   0, 255, 123,   0,   0, \n    255, 123,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   6,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 224, 255,  15,   0, \n    224, 255,  15,   0, 224, 255, \n     15,   0,   0,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   4,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   1, 128, \n    255, 255,   1, 128, 255, 255, \n      1, 128, 255, 255,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  70, 112,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     79,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5, 242,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   5, 242,   0, \n     16,   0,   5,   0,   0,   0, \n    150,  15,  16,   0,   3,   0, \n      0,   0,  18,   0,   0,   1, \n     85,   0,   0,   8,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     86,   5,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    255, 127, 255, 255, 255, 127, \n      0,   0,   0, 128,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     86,   5,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0, 128,   0,   0, \n      0, 128, 255, 255, 127, 127, \n    255, 255, 127, 255, 150,  15, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1,  18,   0, \n      0,   1,  80,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     85,   0,   0,   8, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     32,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  12, 242,   0,  16,   0, \n      4,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    255, 127, 255, 255, 255, 127, \n      0,   0,   0, 128,  55,   0, \n      0,  12, 242,   0,  16,   0, \n      5,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n    150,  15,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0, 128,   0,   0, \n      0, 128, 255, 255, 127, 127, \n    255, 255, 127, 255,  18,   0, \n      0,   1,  54,   0,   0,   8, \n    242,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    255, 127, 255, 255, 255, 127, \n      0,   0,   0, 128,  54,   0, \n      0,   8, 242,   0,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0, 128, \n      0,   0,   0, 128, 255, 255, \n    127, 127, 255, 255, 127, 255, \n     21,   0,   0,   1,  21,   0, \n      0,   1, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  79,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   3,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1, 167,   0,   0,   8, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      3,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   3,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     32,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  80,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 144, 144,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     21,   0,   0,   1,  30,   0, \n      0,   8, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     43,   0,   0,   5, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  16,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   8, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     43,   0,   0,   5, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  16,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     49,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  29,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  28,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  55,   0, \n      0,   9, 194,   0,  16,   0, \n      2,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   3,   0, \n      0,   0,  86,   9,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n    230,  10,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   6,  18,   0,  16,   0, \n      1,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  21,   0, \n      0,   1,  85,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      4,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n    167,   0,   0,   8, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     16,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  18,   0, \n      0,   1, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      5,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   8, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     16,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  21,   0, \n      0,   1,  16,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     29,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  29,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     49,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  56,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  14,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     28,   0,   0,   5, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,  10, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42, 144, \n    144,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  79,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 224, 255, \n    255, 255,  41,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   8,  98,   0, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n    194,   0,  16,   0,   2,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   4,   0,   0,   0, \n    166,  14,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n    230,  10,  16,   0,   2,   0, \n      0,   0,  70,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  29,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     29,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  49,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     56,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  28,   0,   0,   5, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  10,  18,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     58, 144, 144,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   0,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     79,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      1,   0,   0,   0,  35,   0, \n      0,   9,  18,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  18,   0, \n      0,   1,  39,   0,   0,   8, \n     18,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  26, 144, \n    144,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  32,   0, \n      0,   8,  34,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     26, 144, 144,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  79,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  55,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  79,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  35,   0,   0,  12, \n    194,   0,  16,   0,   2,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   3,   0,   0,   0, \n    166,  14,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0, 166,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 240, 255, \n    255, 255, 240, 255, 255, 255, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   1,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1, 168,   0,   0,   8, \n     50, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  70,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   8, \n     50,   0,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   8, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  50,   0,  16,   0, \n      1,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   5,   0, \n      0,   0, 168,   0,   0,   8, \n     50, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  70,   0,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1,  79,   0,   0,  10, \n     50,   0,  16,   0,   1,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n    146,   0,  16,   0,   1,   0, \n      0,   0,   6,   4,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n    198,   0,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n    146,   0,  16,   0,   1,   0, \n      0,   0,   6,   4,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n    198,   0,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     50,   0,  16,   0,   3,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  32,   0,   0,  10, \n     50,   0,  16,   0,   1,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     32,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     42, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  95,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  33,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0,   6,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   9,  18,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10, 144, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   9, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  18,   0, \n      0,   1,  33,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   8,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,   6,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   9,  18,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16, 128,  65,   0, \n      0,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n    246,  15,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n    246,  15,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   8, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,  11, 114,   0,  16,   0, \n      4,   0,   0,   0,   6, 144, \n    208,   0,  32,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     68,   0,   0,   0, 150,   5, \n     16,   0,   4,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,  10,  50,   0,  16,   0, \n      1,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  80,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     32,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     42, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  95,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  33,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   7,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  60,   0, \n      0,   7, 178,   0,  16,   0, \n      1,   0,   0,   0,   6,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   8,  16,   0,   8,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10, 144, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   9, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 178,   0,  16,   0, \n      1,   0,   0,   0,  70,  12, \n     16,   0,   1,   0,   0,   0, \n     70,   8,  16,   0,   6,   0, \n      0,   0,  70,   8,  16,   0, \n      9,   0,   0,   0,  18,   0, \n      0,   1,  33,   0,   0,   9, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   8,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0, 166,  10, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   9,  66,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0, 246,  15,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0, 246,  15,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16, 128,  65,   0, \n      0,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 178,   0,  16,   0, \n      1,   0,   0,   0,  70,   8, \n     16,   0,   9,   0,   0,   0, \n     70,   8,  16,   0,   6,   0, \n      0,   0,  70,   8,  16,   0, \n     11,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   8, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   8, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      4,   0,   0,   0,  70,   3, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  11, 242,   0,  16,   0, \n      5,   0,   0,   0,   6, 144, \n    208,   0,  32,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n     55,   0,   0,  11,  50,   0, \n     16,   0,   1,   0,   0,   0, \n      6, 144, 208,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0, 150,   5, \n     16,   0,   4,   0,   0,   0, \n    214,   5,  16,   0,   1,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70,   0, \n     16,   0,   1,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   6, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n    150, 240,  17,   0,   0,   0, \n      0,   0,  31,   0,   0,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   9,  34,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  26, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   9,  66,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   9, 130,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  58, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     38,   9,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  12, 114,   0,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   0,   0,   0,   0, \n    150, 151, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  33,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   0,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     38,   9,  16,   0,   1,   0, \n      0,   0,  34,   0,   0,   7, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   1,   0, \n      0,   7, 226,   0,  16,   0, \n      5,   0,   0,   0, 166,   4, \n     16,   0,   1,   0,   0,   0, \n     86,  14,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   5,   0, \n      0,   0,   6,   9,  16,   0, \n      9,   0,   0,   0,   6,   9, \n     16,   0,   8,   0,   0,   0, \n     86,  14,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   5,   0, \n      0,   0,   6,   9,  16,   0, \n      6,   0,   0,   0,   6,   9, \n     16,   0,   7,   0,   0,   0, \n     86,  14,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n      6,   0,  16,   0,   5,   0, \n      0,   0,   1,   0,   0,   7, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      1,   0,   0,   0,   6,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  55,   0, \n      0,  11, 242,   0,  16,   0, \n      4,   0,   0,   0,   6, 144, \n    208,   0,  32,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,  11,  50,   0, \n     16,   0,   1,   0,   0,   0, \n      6, 144, 208,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0, 230,  10, \n     16,   0,   5,   0,   0,   0, \n    230,  10,  16,   0,   2,   0, \n      0,   0,  18,   0,   0,   1, \n     31,   0,   4,   5,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n     18,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n     34,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  26, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n     66,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n    130,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  58, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      1,   0,   0,   7, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   6,   0,  16,   0, \n      5,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,  12, \n    114,   0,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      0,   0,   0,   0, 150, 151, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  38,   9,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  38,   9,  16,   0, \n      1,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n      9,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n     34,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n    150,   7,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   1,   0, \n      0,   0, 150,   4,  16,   0, \n      6,   0,   0,   0, 150,   4, \n     16,   0,   7,   0,   0,   0, \n    150,   4,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  18,   0, \n      0,   1,  41,   0,   0,   9, \n    130,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,   0,   0,   7, \n    242,   0,  16,   0,   4,   0, \n      0,   0, 246,  15,  16,   0, \n      1,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n      1,   0,   0,   7,  50,   0, \n     16,   0,   1,   0,   0,   0, \n    246,  15,  16,   0,   1,   0, \n      0,   0,  70,   0,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     18,   0,   0,   1,  80,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   4,   5, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,  12, \n    114,   0,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      0,   0,   0,   0, 150, 151, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     34,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   9,  18,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     26, 144, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   9,  34,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42, 144, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   9,  66,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     58, 144, 208,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     38,   9,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  33,   0, \n      0,   7, 114,   0,  16,   0, \n      6,   0,   0,   0,  38,   9, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     38,   9,  16,   0,   1,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  38,   9,  16,   0, \n      1,   0,   0,   0,  34,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  38,   9,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   1,   0,   0,   0, \n    150,   4,  16,   0,   5,   0, \n      0,   0, 150,   4,  16,   0, \n      6,   0,   0,   0, 150,   4, \n     16,   0,   7,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  18,   0,   0,   1, \n     41,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     64,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,   0,   0,   7, 242,   0, \n     16,   0,   4,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,   1,   0, \n      0,   7,  50,   0,  16,   0, \n      1,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   0,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     18,   0,   0,   1,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70,   0, \n     16,   0,   1,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      0,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 254, 255, 255, 255, \n     32,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   4,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,   0,  64,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   2, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  64,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n      0,  64,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   2, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   4,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n      0,  64,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   4,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  32,   0,   0, \n      0,   0, 128,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,  32,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      4,   0,   0,   0,  86,   9, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,  64,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,  32,   0, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   2,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,  64,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,   0,   0, \n      4,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   4,   0,   0, \n      0,   8,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   2,   0, \n      0,   0,   4,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,  16,   0,   0, \n      0,   0,  32,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   1,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   4,   0,   0,   0, \n     86,   9,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n     64,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  32,   0,   0, \n      0,  64,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,  32,   0, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   2,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,  64,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,   0,   0, \n      4,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   4,   0,   0, \n      0,   8,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   2,   0, \n      0,   0,   4,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   1, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n     64,   0,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,  32,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   2, \n      0,   0,   0,   4,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  64, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   8, \n     82,   0,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  18,   0,   0,   1, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n    252, 255,  32,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  98,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   6,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   2, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   4,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n      0,  64,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   4,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   1,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   0,   0,  32,   2,   0, \n      0,   0, 128,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   0,  64,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   4,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   8,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  16, \n     64,   0,   0,   0,   0,  16, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  98,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   6,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      2,   0,   0,   0, 166,   6, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   0,  64, \n      0,   0,   0,   0,  64,   0, \n      0,   0,   0,   1,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n     10,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   8,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,  32, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n    134,   3,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  64,  16,   0, \n      0,   0,  32,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  64,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   2, \n      0,   0,   0,   0,   0,  32, \n      2,   0,   0,   0, 128,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      0,  64,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,   0,   4,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   0,   0, \n      0,   0,   6,   4,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   8,   0,   0, \n      0,  16,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166,   2,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,  86,   9, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   1,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   4,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,   0,  64,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   0, \n      0,  32,   2,   0,   0,   0, \n    128,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0,  86,   9,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   0,  64,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  32,   0,   0, \n      0,   0, 128,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   1,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      2,   0,   0,   0,  86,   9, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   8,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0,   0,  16,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   2,   0,   0, \n      0,   4,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0, 166,   2,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  64,   0,   0,   0, \n      0,  16,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   4,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,   0,  64,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   0,   4,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   1,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   0,   0,  32,   2,   0, \n      0,   0, 128,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      0,   0,   0,   0,  86,   9, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,   0,   0,  64, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   0,   0, \n      0,   0,   6,   4,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     11,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  11,   0,   0,   0, \n     70,  14,  16,   0,  11,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  11,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     11,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  11,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  11,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,  32,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  16,  64,   0,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0, 166,   2,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,  12,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   8,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   2, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   4,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n      0,  64,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   4,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   1,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   0, \n      0,  32,   2,   0,   0,   0, \n    128,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,   4, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   1,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n     32,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  16,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166,   2,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   4,   0,   0,   0, \n      6,   8,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  64, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,  12, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   2, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      0,   0,   0,   0, 166,   6, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   0,   1,   0,   4, \n      0,   0,   0,   8,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,  32, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   8,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  64,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      0,   0,   0,   0,  86,   1, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      0,   1,   0,   0,   0,   0, \n     16,   0,   0,   0,  32,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   0,   0,  32,   2,   0, \n      0,   0, 128,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   4,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   0,  64,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   4,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   8,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   6,   0, \n      0,   0,   6,   4,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,  64,   0,   0,   0, \n      0,  16,  64,   0,   0,   0, \n      0,  16,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      1,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0,   6,   4,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0, 166,   6,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,   0, \n      0,   1,   0,   4,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0,   0,   4,   0,   0, \n      0,   8,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  16, \n      0,   0,   0,  32,   0,   0, \n      0,  64,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   0,   0, \n      0,   0,   6,   4,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   0, \n      0,  32,   2,   0,   0,   0, \n    128,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      0,   0,   0,   0,  86,   9, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      0,  64,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      6,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      6,   0,   0,   0,   6,   4, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0,   0,  16, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,   4, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,  32,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   2,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     64,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   4, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      1,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n      8,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   2,   0,   0,   0, \n    166,   6,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   4, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      2,   0,   0,   0,   4,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   6,   0, \n      0,   0,  86,   1,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   0,   1, \n      0,   0,   0,   0,  16,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    128,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   2, \n      0,   0,   0,   0,   0,  32, \n      2,   0,   0,   0, 128,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      2,   0,   0,   0,  86,   9, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   8,   0,   0, \n      0,  16,   0,   0,   0,   0, \n      0,  64,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,   0,   4,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,  16,  64,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     98,   0,  16,   0,   0,   0, \n      0,   0, 166,   8,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,   0,   4,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   8,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  16,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   2, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,   0,   2, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,   0,   1,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   2,   0, \n      0,   0,  86,   1,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,  32, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   0,   1, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166,   6,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n     10,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0,   0, 128,   0, \n      0,   0,   0,   1,   0,   4, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      2,   0,   0,   0,   4,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  32,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   4,   0,   0,   0,   8, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,  16,   0,   0, \n      0,  32,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 128,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   2,   0,   0, \n      0,   0,   0,  32,   2,   0, \n      0,   0, 128,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0,  86,   9,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,   0,   0,   0,  64, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  32, \n      0,   0,   0,   0, 128,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0, 128, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,  64,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  27,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n      0,   0,   0,   8,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,  16,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  98,   0, \n     16,   0,   0,   0,   0,   0, \n    166,   8,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n      0,   4,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   8,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,  16, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,  32,   0, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   2,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,  64,   0,   0,   0, \n    128,   0,   0,   0,   0,   1, \n      0,   0,   0,   2,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   4,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   4,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,   1,   0, \n      0,  10, 210,   0,  16,   0, \n      2,   0,   0,   0,   6,   9, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   8, \n      0,   0,   0,   0,   0,   0, \n      0,  32,   0,   0,   0,   0, \n    128,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  19,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   4,   0, \n      0,   0,   6,   4,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  16, \n      0,   0,   0,   0,   8,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     82,   0,  16,   0,   2,   0, \n      0,   0, 166,   9,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 194,   0, \n     16,   0,   6,   0,   0,   0, \n     86,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,  32,   0,   0,   0, \n     64,   0,   0,   0,   0,   1, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   0,   0,   4,   0,   0, \n      0,   8,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  16,   0,   0,   0,  32, \n      0,   0,   0,  64,  16,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   1,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   2,   0,   0,   0,   0, \n      0,  32,   2,   0,   0,   0, \n    128,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0,  86,   9,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   4,   0,   0,   0,   8, \n      0,   0,   0,  16,   0,   0, \n      0,   0,   0,  64,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,  32,   0,   0, \n      0,   0, 128,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  42,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  42,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   1,   0,   0, \n      0,   2,   0,   0,   0,   4, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  42,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,   1,   0, \n      0,  10,  50,   0,  16,   0, \n      1,   0,   0,   0,  70,   0, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   1,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   8, \n      0,   0,   0,  16,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    194,   0,  16,   0,   0,   0, \n      0,   0, 166,   2,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n     86,   9,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     42,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   1,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,  16,   0,   0,   0, \n     32,   0,   0,   0,  64,   0, \n      0,   0,   0,   1,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     42,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  42,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  42,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      1,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   2, \n      0,   0,   0,   4,   0,   0, \n      0,   8,   0,   0,   0,  16, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,  32, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   1,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      1,   0,   0,   0,   2,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   8, \n     82,   0,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n    168,   0,   0,   9, 242, 224, \n     17,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0, 134,   7, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1,  62,   0, \n      0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC6HEncode_TryModeG10CS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 10, 5, 5, 5},\n                              { 7, 6, 6, 6},\n                              { 11, 5, 4, 4},\n                              { 11, 4, 5, 4},\n                              { 11, 4, 4, 5},\n                              { 9, 5, 5, 5},\n                              { 8, 6, 5, 5},\n                              { 8, 5, 6, 5},\n                              { 8, 5, 5, 6},\n                              { 6, 6, 6, 6},\n                              { 10, 10, 10, 10},\n                              { 11, 9, 9, 9},\n                              { 12, 8, 8, 8},\n                              { 16, 4, 4, 4},\n                              { -1, 0, 0, 0},\n                              { -1, 0, 4, 0},\n                              { -1, 0, 9, 0},\n                              { -1, 1, 13, 0},\n                              { -1, 1, 17, 0},\n                              { -1, 1, 21, 0},\n                              { -1, 1, 26, 0},\n                              { -1, 2, 30, 0},\n                              { -1, 2, 34, 0},\n                              { 0, 2, 38, 0},\n                              { 0, 2, 43, 0},\n                              { -1, 2, 47, 0},\n                              { -1, 3, 51, 0},\n                              { -1, 3, 55, 0},\n                              { 0, 3, 60, 0},\n                              { 0, 3, 64, 0},\n                              { 0, 4, 0, 0},\n                              { 0, 4, 0, 0},\n                              { 0, 4, 0, 0},\n                              { 0, 4, 0, 0},\n                              { 0, 5, 0, 0},\n                              { 0, 5, 0, 0},\n                              { 0, 5, 0, 0},\n                              { 0, 5, 0, 0},\n                              { 0, 6, 0, 0},\n                              { 0, 6, 0, 0},\n                              { 0, 6, 0, 0},\n                              { 0, 6, 0, 0},\n                              { 0, 6, 0, 0},\n                              { 0, 7, 0, 0},\n                              { 0, 7, 0, 0},\n                              { 0, 7, 0, 0},\n                              { 0, 7, 0, 0},\n                              { 0, 8, 0, 0},\n                              { 0, 8, 0, 0},\n                              { 0, 8, 0, 0},\n                              { 0, 8, 0, 0},\n                              { 0, 9, 0, 0},\n                              { 0, 9, 0, 0},\n                              { 0, 9, 0, 0},\n                              { 0, 9, 0, 0},\n                              { 0, 10, 0, 0},\n                              { 0, 10, 0, 0},\n                              { 0, 10, 0, 0},\n                              { 0, 10, 0, 0},\n                              { 0, 10, 0, 0},\n                              { 0, 11, 0, 0},\n                              { 0, 11, 0, 0},\n                              { 0, 11, 0, 0},\n                              { 0, 11, 0, 0},\n                              { 0, 12, 0, 0},\n                              { 0, 12, 0, 0},\n                              { 0, 12, 0, 0},\n                              { 0, 12, 0, 0},\n                              { 0, 13, 0, 0},\n                              { 0, 13, 0, 0},\n                              { 0, 13, 0, 0},\n                              { 0, 13, 0, 0},\n                              { 0, 14, 0, 0},\n                              { 0, 14, 0, 0},\n                              { 0, 14, 0, 0},\n                              { 0, 14, 0, 0},\n                              { 0, 15, 0, 0},\n                              { 0, 15, 0, 0} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 19\ndcl_tgsm_structured g0, 84, 64\ndcl_thread_group 64, 1, 1\nushr r0.x, vThreadIDInGroupFlattened.x, l(4)\nishl r0.y, vThreadGroupID.x, l(2)\niadd r0.y, r0.y, cb0[1].x\niadd r0.x, r0.x, r0.y\nuge r0.y, r0.x, cb0[1].y\nif_nz r0.y\n  ret \nendif \nand r0.y, vThreadIDInGroupFlattened.x, l(48)\niadd r0.z, -r0.y, vThreadIDInGroupFlattened.x\nult r1.xyzw, r0.zzzz, l(16, 8, 4, 2)\nif_nz r1.x\n  udiv r0.w, null, r0.x, cb0[0].y\n  imad r1.x, -r0.w, cb0[0].y, r0.x\n  ishl r1.x, r1.x, l(2)\n  ishl r0.w, r0.w, l(2)\n  and r2.x, r0.z, l(3)\n  iadd r2.x, r1.x, r2.x\n  ushr r1.x, r0.z, l(2)\n  iadd r2.y, r0.w, r1.x\n  mov r2.zw, l(0,0,0,0)\n  ld r2.xyzw, r2.xyzw, t0.xyzw\n  ushr r3.xyz, r2.xyzx, l(16)\n  and r3.xyz, r3.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  and r4.xyzw, r2.xxyy, l(0x7fffffff, 0x007fffff, 0x7fffffff, 0x007fffff)\n  ult r2.xy, l(0x47ffefff, 0x47ffefff, 0, 0), r4.xzxx\n  ult r5.xy, r4.xzxx, l(0x38800000, 0x38800000, 0, 0)\n  ushr r5.zw, r4.xxxz, l(23)\n  iadd r5.zw, -r5.zzzw, l(0, 0, 113, 113)\n  iadd r4.yw, r4.yyyw, l(0, 0x00800000, 0, 0x00800000)\n  ushr r6.x, r4.y, r5.z\n  ushr r6.y, r4.w, r5.w\n  iadd r4.xy, r4.xzxx, l(0xc8000000, 0xc8000000, 0, 0)\n  movc r4.xy, r5.xyxx, r6.xyxx, r4.xyxx\n  iadd r4.zw, r4.xxxy, l(0, 0, 4095, 4095)\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(1, 1, 0, 0)\n  iadd r4.xy, r4.xyxx, r4.zwzz\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(0x00007fff, 0x00007fff, 0, 0)\n  movc r2.xy, r2.xyxx, l(0x00007fff,0x00007fff,0,0), r4.xyxx\n  iadd r4.xy, r3.xyxx, r2.xyxx\n  and r2.xy, r2.zzzz, l(0x7fffffff, 0x007fffff, 0, 0)\n  ult r0.w, l(0x47ffefff), r2.x\n  ult r1.x, r2.x, l(0x38800000)\n  ushr r2.z, r2.x, l(23)\n  iadd r2.z, -r2.z, l(113)\n  iadd r2.y, r2.y, l(0x00800000)\n  ushr r2.y, r2.y, r2.z\n  iadd r2.x, r2.x, l(0xc8000000)\n  movc r1.x, r1.x, r2.y, r2.x\n  iadd r2.x, r1.x, l(4095)\n  ushr r1.x, r1.x, l(13)\n  and r1.x, r1.x, l(1)\n  iadd r1.x, r1.x, r2.x\n  ushr r1.x, r1.x, l(13)\n  and r1.x, r1.x, l(0x00007fff)\n  movc r0.w, r0.w, l(0x00007fff), r1.x\n  iadd r4.z, r3.z, r0.w\n  and r2.xyzw, r4.xxyy, l(1023, 0x00007c00, 1023, 0x00007c00)\n  if_nz r2.y\n    ushr r0.w, r4.x, l(10)\n    and r0.w, r0.w, l(31)\n  else \n    if_nz r2.x\n      ishl r1.x, r2.x, l(1)\n      mov r2.y, r1.x\n      mov r0.w, l(0)\n      loop \n        and r3.x, r2.y, l(1024)\n        breakc_nz r3.x\n        iadd r0.w, r0.w, l(-1)\n        ishl r2.y, r2.y, l(1)\n      endloop \n      and r2.x, r2.y, l(1022)\n    else \n      mov r2.x, l(0)\n      mov r0.w, l(-112)\n    endif \n  endif \n  ishl r3.xyz, r4.xyzx, l(16)\n  and r3.xyz, r3.xyzx, l(0x80000000, 0x80000000, 0x80000000, 0)\n  ishl r0.w, r0.w, l(23)\n  iadd r0.w, r0.w, l(0x38000000)\n  or r0.w, r0.w, r3.x\n  ishl r1.x, r2.x, l(13)\n  iadd r5.x, r0.w, r1.x\n  if_nz r2.w\n    ushr r0.w, r4.y, l(10)\n    and r0.w, r0.w, l(31)\n  else \n    if_nz r2.z\n      ishl r1.x, r2.z, l(1)\n      mov r2.x, r1.x\n      mov r0.w, l(0)\n      loop \n        and r2.y, r2.x, l(1024)\n        breakc_nz r2.y\n        iadd r0.w, r0.w, l(-1)\n        ishl r2.x, r2.x, l(1)\n      endloop \n      and r2.z, r2.x, l(1022)\n    else \n      mov r2.z, l(0)\n      mov r0.w, l(-112)\n    endif \n  endif \n  ishl r0.w, r0.w, l(23)\n  iadd r0.w, r0.w, l(0x38000000)\n  or r0.w, r0.w, r3.y\n  ishl r1.x, r2.z, l(13)\n  iadd r5.y, r0.w, r1.x\n  and r2.xy, r4.zzzz, l(1023, 0x00007c00, 0, 0)\n  if_nz r2.y\n    ushr r0.w, r4.z, l(10)\n    and r0.w, r0.w, l(31)\n  else \n    if_nz r2.x\n      ishl r1.x, r2.x, l(1)\n      mov r2.y, r1.x\n      mov r0.w, l(0)\n      loop \n        and r2.z, r2.y, l(1024)\n        breakc_nz r2.z\n        iadd r0.w, r0.w, l(-1)\n        ishl r2.y, r2.y, l(1)\n      endloop \n      and r2.x, r2.y, l(1022)\n    else \n      mov r2.x, l(0)\n      mov r0.w, l(-112)\n    endif \n  endif \n  ishl r0.w, r0.w, l(23)\n  iadd r0.w, r0.w, l(0x38000000)\n  or r0.w, r0.w, r3.z\n  ishl r1.x, r2.x, l(13)\n  iadd r5.z, r0.w, r1.x\n  store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(24), r5.xyzx\n  dp3 r2.w, r5.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)\n  ieq r0.w, cb0[0].z, l(95)\n  ishl r3.xyz, r4.xyzx, l(6)\n  udiv r3.xyz, null, r3.xyzx, l(31, 31, 31, 0)\n  ult r5.xyz, r4.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ieq r6.xyz, r4.xyzx, l(0x00007bff, 0x00007bff, 0x00007bff, 0)\n  ishl r4.xyz, r4.xyzx, l(5)\n  udiv r7.xyz, null, r4.xyzx, l(31, 31, 31, 0)\n  movc r7.xyz, r6.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r7.xyzx\n  and r4.xyz, r4.xyzx, l(0x000fffe0, 0x000fffe0, 0x000fffe0, 0)\n  udiv r4.xyz, null, r4.xyzx, l(31, 31, 31, 0)\n  ineg r4.xyz, r4.xyzx\n  movc r4.xyz, r6.xyzx, l(0xffff8001,0xffff8001,0xffff8001,0), r4.xyzx\n  movc r4.xyz, r5.xyzx, r7.xyzx, r4.xyzx\n  movc r2.xyz, r0.wwww, r3.xyzx, r4.xyzx\n  store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(12), r2.xyzx\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r2.xyzx\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(68), r2.yzww\nendif \nif_nz r1.y\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r3.x, r0.w, l(76), g0.xxxx\n  lt r1.x, r3.x, r2.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r3.x\n  endif \n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r3.x, r0.w, l(80), g0.xxxx\n  lt r1.x, r2.x, r3.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r3.x\n  endif \nendif \nif_nz r1.z\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r3.x, r0.w, l(76), g0.xxxx\n  lt r1.x, r3.x, r2.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r3.x\n  endif \n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r3.x, r0.w, l(80), g0.xxxx\n  lt r1.x, r2.x, r3.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r3.x\n  endif \nendif \nif_nz r1.w\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r3.x, r0.w, l(76), g0.xxxx\n  lt r1.x, r3.x, r2.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(76), r3.x\n  endif \n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r3.x, r0.w, l(80), g0.xxxx\n  lt r1.x, r2.x, r3.x\n  if_nz r1.x\n    ld_structured r2.xyz, r0.w, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r2.xyzx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(80), r3.x\n  endif \nendif \nult r0.w, r0.z, l(1)\nif_nz r0.w\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(76), g0.xxxx\n  iadd r1.x, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r3.x, r1.x, l(76), g0.xxxx\n  lt r1.y, r3.x, r2.x\n  if_nz r1.y\n    ld_structured r2.xyz, r1.x, l(52), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(52), r2.xyzx\n  endif \n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(80), g0.xxxx\n  ld_structured r3.x, r1.x, l(80), g0.xxxx\n  lt r1.y, r2.x, r3.x\n  if_nz r1.y\n    ld_structured r2.xyz, r1.x, l(64), g0.xyzx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(64), r2.xyzx\n  endif \nendif \nif_z r0.z\n  ld_structured r2.xyz, r0.y, l(52), g0.xyzx\n  ld_structured r3.xyz, r0.y, l(64), g0.xyzx\n  iadd r4.xyz, -r2.xyzx, r3.xyzx\n  itof r4.xyz, r4.xyzx\n  dp3 r1.x, r4.xyzx, r4.xyzx\n  ld_structured r5.xyz, r0.y, l(12), g0.xyzx\n  iadd r5.xyz, -r2.xyzx, r5.xyzx\n  itof r5.xyz, r5.xyzx\n  dp3 r1.y, r4.xyzx, r5.xyzx\n  lt r2.w, l(0.000000), r1.x\n  ge r4.x, r1.y, l(0.000000)\n  and r2.w, r2.w, r4.x\n  mul r1.y, r1.y, l(63.499989)\n  div r1.x, r1.y, r1.x\n  ftou r1.x, r1.x\n  ult r1.x, l(32), r1.x\n  and r1.x, r1.x, r2.w\n  if_nz r1.x\n    mov r3.w, r2.x\n    store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(68), r2.yzyy\n  endif \nendif \nif_nz r1.z\n  ld_structured r2.xyz, r0.y, l(52), g0.xyzx\n  ld_structured r3.xyz, r0.y, l(64), g0.xyzx\n  ineg r1.xyz, r2.xyzx\n  iadd r4.xyz, r1.xyzx, r3.xyzx\n  itof r4.xyz, r4.xyzx\n  dp3 r2.w, r4.xyzx, r4.xyzx\n  iadd r5.yz, r0.zzzz, l(0, 10, 11, 0)\n  ieq r6.xy, cb0[0].zzzz, l(95, 96, 0, 0)\n  if_nz r6.x\n    ige r0.z, icb[r5.y + 0].x, l(15)\n    and r0.z, r0.z, l(1)\n    movc r7.xyz, r2.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r8.xyz, r3.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r7.xyz, r0.zzzz, r7.xyzx\n    or r8.xyz, r0.zzzz, r8.xyzx\n    ieq r9.xyz, r2.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ieq r10.xyz, r3.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ishl r0.z, l(1), icb[r5.y + 0].x\n    iadd r0.z, r0.z, l(-1)\n    ishl r11.xyz, r2.xyzx, icb[r5.y + 0].x\n    ishl r12.xyz, r3.xyzx, icb[r5.y + 0].x\n    ishr r11.xyz, r11.xyzx, l(16)\n    ishr r12.xyz, r12.xyzx, l(16)\n    movc r9.xyz, r9.xyzx, r0.zzzz, r11.xyzx\n    movc r10.xyz, r10.xyzx, r0.zzzz, r12.xyzx\n    movc r7.xyz, r7.xyzx, r2.xyzx, r9.xyzx\n    movc r8.xyz, r8.xyzx, r3.xyzx, r10.xyzx\n  else \n    ige r0.z, icb[r5.y + 0].x, l(16)\n    and r0.z, r0.z, l(1)\n    movc r9.xyz, r2.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r10.xyz, r3.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r9.xyz, r0.zzzz, r9.xyzx\n    or r10.xyz, r0.zzzz, r10.xyzx\n    ige r11.xyz, r2.xyzx, l(0, 0, 0, 0)\n    ige r12.xyz, r3.xyzx, l(0, 0, 0, 0)\n    ieq r13.xyz, r2.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r14.xyz, r3.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r0.z, l(-1), icb[r5.y + 0].x\n    ishl r3.w, l(1), r0.z\n    iadd r4.w, r3.w, l(-1)\n    ishl r15.xyz, r2.xyzx, r0.z\n    ishl r16.xyz, r3.xyzx, r0.z\n    ishr r15.xyz, r15.xyzx, l(15)\n    ishr r16.xyz, r16.xyzx, l(15)\n    movc r13.xyz, r13.xyzx, r4.wwww, r15.xyzx\n    movc r14.xyz, r14.xyzx, r4.wwww, r16.xyzx\n    ineg r15.xyz, r3.xyzx\n    ieq r16.xyz, r1.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r17.xyz, r15.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r3.w, -r3.w, l(1)\n    ishl r18.xyz, r1.xyzx, r0.z\n    ishl r15.xyz, r15.xyzx, r0.z\n    ishr r18.xyz, r18.xyzx, l(15)\n    ishr r15.xyz, r15.xyzx, l(15)\n    ineg r18.xyz, r18.xyzx\n    ineg r15.xyz, r15.xyzx\n    movc r16.xyz, r16.xyzx, r3.wwww, r18.xyzx\n    movc r15.xyz, r17.xyzx, r3.wwww, r15.xyzx\n    movc r11.xyz, r11.xyzx, r13.xyzx, r16.xyzx\n    movc r12.xyz, r12.xyzx, r14.xyzx, r15.xyzx\n    movc r7.xyz, r9.xyzx, r2.xyzx, r11.xyzx\n    movc r8.xyz, r10.xyzx, r3.xyzx, r12.xyzx\n  endif \n  iadd r2.xyz, -r7.xyzx, r8.xyzx\n  movc r2.xyz, icb[r5.y + 14].xxxx, r2.xyzx, r8.xyzx\n  ige r3.xyz, r2.xyzx, l(0, 0, 0, 0)\n  iadd r8.xyzw, l(-1, -1, -1, -1), icb[r5.y + 0].xyzw\n  ishl r9.x, l(1), r8.x\n  ishl r9.y, l(1), r8.y\n  ishl r9.z, l(1), r8.z\n  ishl r9.w, l(1), r8.w\n  ige r8.yzw, r2.xxyz, r9.yyzw\n  ineg r10.xyz, r2.xyzx\n  ilt r10.xyz, r9.yzwy, r10.xyzx\n  movc r11.xyz, r3.xyzx, r8.yzwy, r10.xyzx\n  or r0.z, r11.y, r11.x\n  or r11.x, r11.z, r0.z\n  ishl r12.x, l(1), icb[r5.y + 0].x\n  ishl r12.y, l(1), icb[r5.y + 0].y\n  ishl r12.z, l(1), icb[r5.y + 0].z\n  ishl r12.w, l(1), icb[r5.y + 0].w\n  iadd r12.xyzw, r12.xyzw, l(-1, -1, -1, -1)\n  and r7.xyz, r7.xyzx, r12.xxxx\n  iadd r13.xyzw, r9.yzwx, l(-1, -1, -1, -1)\n  movc r8.yzw, r8.yyzw, r13.xxyz, r2.xxyz\n  and r12.yzw, r2.xxyz, r12.yyzw\n  movc r10.xyz, r10.xyzx, r9.yzwy, r12.yzwy\n  movc r11.yzw, r3.xxyz, r8.yyzw, r10.xxyz\n  and r3.yzw, r2.xxyz, r12.xxxx\n  mov r3.x, l(0)\n  movc r3.xyzw, icb[r5.y + 14].xxxx, r11.xyzw, r3.xyzw\n  and r2.xyz, r9.xxxx, r7.xyzx\n  and r8.yzw, r7.xxyz, r13.wwww\n  iadd r8.yzw, -r9.xxxx, r8.yyzw\n  movc r2.xyz, r2.xyzx, r8.yzwy, r7.xyzx\n  movc r2.xyz, r6.yyyy, r2.xyzx, r7.xyzx\n  or r0.z, r6.y, icb[r5.y + 14].x\n  and r6.yzw, r9.yyzw, r3.yyzw\n  and r7.xyz, r13.xyzx, r3.yzwy\n  iadd r7.xyz, -r9.yzwy, r7.xyzx\n  movc r6.yzw, r6.yyzw, r7.xxyz, r3.yyzw\n  movc r3.yzw, r0.zzzz, r6.yyzw, r3.yyzw\n  iadd r6.yzw, r2.xxyz, r3.yyzw\n  movc r3.yzw, icb[r5.y + 14].xxxx, r6.yyzw, r3.yyzw\n  ult r6.yz, icb[r5.y + 0].xxxx, l(0, 15, 16, 0)\n  ieq r7.xyz, r12.xxxx, r2.xyzx\n  ieq r8.yzw, r12.xxxx, r3.yyzw\n  ishl r9.xyz, r2.xyzx, l(16)\n  ishl r10.xyz, r3.yzwy, l(16)\n  iadd r9.xyz, r9.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  iadd r10.xyz, r10.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ushr r9.xyz, r9.xyzx, icb[r5.y + 0].x\n  ushr r10.xyz, r10.xyzx, icb[r5.y + 0].x\n  movc r7.xyz, r7.xyzx, l(0x0000ffff,0x0000ffff,0x0000ffff,0), r9.xyzx\n  movc r8.yzw, r8.yyzw, l(0,0x0000ffff,0x0000ffff,0x0000ffff), r10.xxyz\n  movc r7.xyz, r2.xyzx, r7.xyzx, l(0,0,0,0)\n  movc r8.yzw, r3.yyzw, r8.yyzw, l(0,0,0,0)\n  movc r7.xyz, r6.yyyy, r7.xyzx, r2.xyzx\n  movc r8.yzw, r6.yyyy, r8.yyzw, r3.yyzw\n  ige r9.xyz, r2.xyzx, l(0, 0, 0, 0)\n  ige r10.xyz, r3.yzwy, l(0, 0, 0, 0)\n  imax r11.xyz, -r2.xyzx, r2.xyzx\n  imax r12.xyz, -r3.yzwy, r3.yzwy\n  ige r13.xyz, r11.xyzx, r13.wwww\n  ige r14.xyz, r12.xyzx, r13.wwww\n  ishl r15.xyz, r11.xyzx, l(15)\n  ishl r16.xyz, r12.xyzx, l(15)\n  iadd r15.xyz, r15.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  iadd r16.xyz, r16.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  ushr r15.xyz, r15.xyzx, r8.x\n  ushr r16.xyz, r16.xyzx, r8.x\n  movc r13.xyz, r13.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r15.xyzx\n  movc r14.xyz, r14.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r16.xyzx\n  movc r11.xyz, r11.xyzx, r13.xyzx, l(0,0,0,0)\n  movc r12.xyz, r12.xyzx, r14.xyzx, l(0,0,0,0)\n  ineg r13.xyz, r11.xyzx\n  ineg r14.xyz, r12.xyzx\n  movc r9.xyz, r9.xyzx, r11.xyzx, r13.xyzx\n  movc r10.xyz, r10.xyzx, r12.xyzx, r14.xyzx\n  movc r2.xyz, r6.zzzz, r9.xyzx, r2.xyzx\n  movc r3.yzw, r6.zzzz, r10.xxyz, r3.yyzw\n  movc r2.xyz, r6.xxxx, r7.xyzx, r2.xyzx\n  movc r3.yzw, r6.xxxx, r8.yyzw, r3.yyzw\n  ge r0.z, l(0.000000), r2.w\n  mov r4.w, cb0[0].z\n  mov r5.yw, l(0,0,0,0)\n  loop \n    uge r6.x, r5.w, l(16)\n    breakc_nz r6.x\n    iadd r6.x, r0.y, r5.w\n    ld_structured r7.xyz, r6.x, l(12), g0.xyzx\n    iadd r6.yzw, r1.xxyz, r7.xxyz\n    itof r6.yzw, r6.yyzw\n    dp3 r6.y, r4.xyzx, r6.yzwy\n    ge r6.z, l(0.000000), r6.y\n    or r6.z, r0.z, r6.z\n    lt r6.w, r6.y, r2.w\n    mul r6.y, r6.y, l(63.499989)\n    div r6.y, r6.y, r2.w\n    ftou r6.y, r6.y\n    movc r6.y, r6.w, icb[r6.y + 14].y, l(15)\n    movc r6.y, r6.z, l(0), r6.y\n    iadd r6.z, l(64), -icb[r6.y + 14].z\n    imul null, r7.xyz, r3.yzwy, icb[r6.y + 14].zzzz\n    imad r6.yzw, r2.xxyz, r6.zzzz, r7.xxyz\n    iadd r6.yzw, r6.yyzw, l(0, 32, 32, 32)\n    ishr r6.yzw, r6.yyzw, l(6)\n    ieq r7.x, r4.w, l(95)\n    imul null, r7.yzw, r6.yyzw, l(0, 31, 31, 31)\n    ishr r8.xyz, r7.yzwy, l(6)\n    ilt r9.xyz, r6.yzwy, l(0, 0, 0, 0)\n    imul null, r6.yzw, r6.yyzw, l(0, -31, -31, -31)\n    ishr r6.yzw, r6.yyzw, l(5)\n    ineg r6.yzw, r6.yyzw\n    ishr r7.yzw, r7.yyzw, l(5)\n    movc r6.yzw, r9.xxyz, r6.yyzw, r7.yyzw\n    ilt r7.yzw, r6.yyzw, l(0, 0, 0, 0)\n    ineg r9.xyz, r6.yzwy\n    or r9.xyz, r9.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n    movc r6.yzw, r7.yyzw, r9.xxyz, r6.yyzw\n    movc r6.yzw, r7.xxxx, r8.xxyz, r6.yyzw\n    and r7.xyzw, r6.yyzz, l(1023, 0x00007c00, 1023, 0x00007c00)\n    if_nz r7.y\n      ushr r7.y, r6.y, l(10)\n      and r7.y, r7.y, l(31)\n    else \n      if_nz r7.x\n        ishl r8.x, r7.x, l(1)\n        mov r8.y, r8.x\n        mov r7.y, l(0)\n        loop \n          and r8.z, r8.y, l(1024)\n          breakc_nz r8.z\n          iadd r7.y, r7.y, l(-1)\n          ishl r8.y, r8.y, l(1)\n        endloop \n        and r7.x, r8.y, l(1022)\n      else \n        mov r7.xy, l(0,-112,0,0)\n      endif \n    endif \n    ishl r8.xzw, r6.yyzw, l(16)\n    and r8.xzw, r8.xxzw, l(0x80000000, 0, 0x80000000, 0x80000000)\n    ishl r6.y, r7.y, l(23)\n    iadd r6.y, r6.y, l(0x38000000)\n    or r6.y, r6.y, r8.x\n    ishl r7.x, r7.x, l(13)\n    iadd r9.x, r6.y, r7.x\n    if_nz r7.w\n      ushr r6.y, r6.z, l(10)\n      and r6.y, r6.y, l(31)\n    else \n      if_nz r7.z\n        ishl r6.z, r7.z, l(1)\n        mov r7.x, r6.z\n        mov r6.y, l(0)\n        loop \n          and r7.w, r7.x, l(1024)\n          breakc_nz r7.w\n          iadd r6.y, r6.y, l(-1)\n          ishl r7.x, r7.x, l(1)\n        endloop \n        and r7.z, r7.x, l(1022)\n      else \n        mov r7.z, l(0)\n        mov r6.y, l(-112)\n      endif \n    endif \n    ishl r6.z, r6.y, l(23)\n    iadd r6.z, r6.z, l(0x38000000)\n    or r6.z, r6.z, r8.z\n    ishl r7.z, r7.z, l(13)\n    iadd r9.y, r6.z, r7.z\n    and r7.zw, r6.wwww, l(0, 0, 1023, 0x00007c00)\n    if_nz r7.w\n      ushr r6.z, r6.w, l(10)\n      and r6.z, r6.z, l(31)\n    else \n      if_nz r7.z\n        ishl r6.w, r7.z, l(1)\n        mov r7.w, r6.w\n        mov r6.z, l(0)\n        loop \n          and r8.x, r7.w, l(1024)\n          breakc_nz r8.x\n          iadd r6.z, r6.z, l(-1)\n          ishl r7.w, r7.w, l(1)\n        endloop \n        and r7.z, r7.w, l(1022)\n      else \n        mov r7.z, l(0)\n        mov r6.z, l(-112)\n      endif \n    endif \n    ishl r6.w, r6.z, l(23)\n    iadd r6.w, r6.w, l(0x38000000)\n    or r6.w, r6.w, r8.w\n    ishl r7.z, r7.z, l(13)\n    iadd r9.z, r6.w, r7.z\n    ld_structured r10.xyz, r6.x, l(24), g0.xyzx\n    add r8.xzw, r9.xxyz, -r10.xxyz\n    dp3 r6.x, r8.xzwx, r8.xzwx\n    add r5.y, r5.y, r6.x\n    iadd r5.w, r5.w, l(1)\n  endloop \n  movc r5.x, r3.x, l(100000002004087730000.000000), r5.y\n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(40), r5.xzxx\nendif \nif_nz r1.w\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r2.yz, r0.y, l(40), g0.xxyx\n  lt r0.z, r2.y, r1.x\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(40), r2.xzxx\n  endif \nendif \nif_nz r0.w\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r2.yz, r0.y, l(40), g0.xxyx\n  lt r0.z, r2.y, r1.x\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(40), r2.xzxx\n  endif \n  ld_structured r1.xy, vThreadIDInGroupFlattened.x, l(40), g0.xyxx\n  mov r1.zw, l(0,0,0,0)\n  store_structured u0.xyzw, r0.x, l(0), r1.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC6HEncode_TryModeG10CS[] =\n{\n     68,  88,  66,  67, 170,  22, \n     38, 105,   9,   0,  89, 149, \n    206, 186, 157, 215, 127,  90, \n    232, 184,   1,   0,   0,   0, \n    148,  63,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88,  64,  63,   0,   0, \n     64,   0,   5,   0, 208,  15, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,  58,   1, \n      0,   0,  10,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      7,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,  11,   0, \n      0,   0,   5,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,  11,   0,   0,   0, \n      4,   0,   0,   0,   5,   0, \n      0,   0,   4,   0,   0,   0, \n     11,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      5,   0,   0,   0,   9,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   8,   0,   0,   0, \n      6,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      8,   0,   0,   0,   5,   0, \n      0,   0,   6,   0,   0,   0, \n      5,   0,   0,   0,   8,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n     10,   0,   0,   0,  10,   0, \n      0,   0,  10,   0,   0,   0, \n     10,   0,   0,   0,  11,   0, \n      0,   0,   9,   0,   0,   0, \n      9,   0,   0,   0,   9,   0, \n      0,   0,  12,   0,   0,   0, \n      8,   0,   0,   0,   8,   0, \n      0,   0,   8,   0,   0,   0, \n     16,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0, 255, 255, \n    255, 255,   1,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0, 255, 255, 255, 255, \n      1,   0,   0,   0,  17,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 255, 255, 255,   1,   0, \n      0,   0,  21,   0,   0,   0, \n      0,   0,   0,   0, 255, 255, \n    255, 255,   1,   0,   0,   0, \n     26,   0,   0,   0,   0,   0, \n      0,   0, 255, 255, 255, 255, \n      2,   0,   0,   0,  30,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 255, 255, 255,   2,   0, \n      0,   0,  34,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     38,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  43,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 255, 255, 255,   2,   0, \n      0,   0,  47,   0,   0,   0, \n      0,   0,   0,   0, 255, 255, \n    255, 255,   3,   0,   0,   0, \n     51,   0,   0,   0,   0,   0, \n      0,   0, 255, 255, 255, 255, \n      3,   0,   0,   0,  55,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  60,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     64,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  11,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     88,  24,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0, 158,   0, \n      0,   4,   0, 224,  17,   0, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  95,   0,   0,   2, \n      0,  64,   2,   0,  95,   0, \n      0,   2,  18,  16,   2,   0, \n    104,   0,   0,   2,  19,   0, \n      0,   0, 160,   0,   0,   5, \n      0, 240,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   0, \n     64,   0,   0,   0, 155,   0, \n      0,   4,  64,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   6, \n     18,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  16,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  30,   0,   0,   8, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  80,   0,   0,   8, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  26, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  62,   0, \n      0,   1,  21,   0,   0,   1, \n      1,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  48,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16, 128,  65,   0, \n      0,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,  79,   0, \n      0,  10, 242,   0,  16,   0, \n      1,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  78,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   0, 208,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  35,   0,   0,  11, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   8, 194,   0,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     45,   0,   0,   7, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  70, 126,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   4,   0,   0,   0, \n      6,   5,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    127,   0, 255, 255, 255, 127, \n    255, 255, 127,   0,  79,   0, \n      0,  10,  50,   0,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255, 239, 255,  71, \n    255, 239, 255,  71,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    134,   0,  16,   0,   4,   0, \n      0,   0,  79,   0,   0,  10, \n     50,   0,  16,   0,   5,   0, \n      0,   0, 134,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 128,  56, \n      0,   0, 128,  56,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 194,   0, \n     16,   0,   5,   0,   0,   0, \n      6,   8,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  30,   0, \n      0,  11, 194,   0,  16,   0, \n      5,   0,   0,   0, 166,  14, \n     16, 128,  65,   0,   0,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 113,   0, \n      0,   0, 113,   0,   0,   0, \n     30,   0,   0,  10, 162,   0, \n     16,   0,   4,   0,   0,   0, \n     86,  13,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    128,   0,   0,   0,   0,   0, \n      0,   0, 128,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,  10,  50,   0, \n     16,   0,   4,   0,   0,   0, \n    134,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0, 200,   0,   0, \n      0, 200,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   0,  16,   0,   6,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,  10, 194,   0,  16,   0, \n      4,   0,   0,   0,   6,   4, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    255,  15,   0,   0, 255,  15, \n      0,   0,  85,   0,   0,   7, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,  10,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n    230,  10,  16,   0,   4,   0, \n      0,   0,  85,   0,   0,   7, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,  10,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12,  50,   0,  16,   0, \n      2,   0,   0,   0,  70,   0, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   0,  16,   0,   2,   0, \n      0,   0,   1,   0,   0,  10, \n     50,   0,  16,   0,   2,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 127, \n    255, 255, 127,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 255, 239, \n    255,  71,  10,   0,  16,   0, \n      2,   0,   0,   0,  79,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n    128,  56,  85,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   8,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16, 128,  65,   0, \n      0,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 113,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0, 128,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0, 200,  55,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 255,  15,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 127, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 255, 127,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   5,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   3,   0,   0,   0, 124, \n      0,   0, 255,   3,   0,   0, \n      0, 124,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 144, 255, \n    255, 255,  21,   0,   0,   1, \n     21,   0,   0,   1,  41,   0, \n      0,   7, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,  56,  60,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  18,   0, \n      0,   1,  31,   0,   4,   3, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,   1,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   4,   0,   0, \n      3,   0,   4,   3,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    254,   3,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   5, \n     66,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 144, 255, 255, 255, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,   0, \n      0,  10,  50,   0,  16,   0, \n      2,   0,   0,   0, 166,  10, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255,   3, \n      0,   0,   0, 124,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  18,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   4,   0,   0, \n      3,   0,   4,   3,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    254,   3,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   5, \n     18,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 144, 255, 255, 255, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     16,   0,   0,  10, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n    208, 179,  89,  62,  89,  23, \n     55,  63, 152, 221, 147,  61, \n      0,   0,   0,   0,  32,   0, \n      0,   8, 130,   0,  16,   0, \n      0,   0,   0,   0,  42, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  95,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  78,   0, \n      0,  11, 114,   0,  16,   0, \n      3,   0,   0,   0,   0, 208, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,  31,   0, \n      0,   0,   0,   0,   0,   0, \n     79,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255, 123, \n      0,   0, 255, 123,   0,   0, \n    255, 123,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   7,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 224, 255,  15,   0, \n    224, 255,  15,   0, 224, 255, \n     15,   0,   0,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   4,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   1, 128, \n    255, 255,   1, 128, 255, 255, \n      1, 128, 255, 255,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0, 150,  15,  16,   0, \n      2,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1, 167,   0,   0,   8, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  80,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     80,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  79,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  76,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  80,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      0,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   8, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     43,   0,   0,   5, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  16,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  16,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  49,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     29,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  56,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  28,   0, \n      0,   5,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     79,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n    150,   5,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     16,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,  10,  98,   0,  16,   0, \n      5,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  11, \n     50,   0,  16,   0,   6,   0, \n      0,   0, 166, 138,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n     95,   0,   0,   0,  96,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      6,   0,   0,   0,  33,   0, \n      0,   8,  66,   0,  16,   0, \n      0,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  60,   0,   0,   7, \n    114,   0,  16,   0,   8,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   8, \n     66,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   8, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   8, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  18,   0,   0,   1, \n     33,   0,   0,   8,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n    166,  10,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n     10,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   8,  66,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  10, 144, 144,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0, 246,  15, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0, 246,  15, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16, 128,  65,   0, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     18,   0,   0,   0,  70,   2, \n     16,   0,  18,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n    246,  15,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n    246,  15,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   8, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,  11, 114,   0,  16,   0, \n      2,   0,   0,   0,   6, 144, \n    208,   0,  14,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  11, 242,   0,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n     70, 158, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  33,   0, \n      0,   7, 226,   0,  16,   0, \n      8,   0,   0,   0,   6,   9, \n     16,   0,   2,   0,   0,   0, \n     86,  14,  16,   0,   9,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  34,   0, \n      0,   7, 114,   0,  16,   0, \n     10,   0,   0,   0, 150,   7, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0, 150,   7, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     11,   0,   0,   0,  10,   0, \n     16,   0,  11,   0,   0,   0, \n     60,   0,   0,   7,  18,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   8,  18,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     41,   0,   0,   8,  34,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  26, 144, 144,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  41,   0,   0,   8, \n     66,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  42, 144, \n    144,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   8, 130,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     58, 144, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,  12,   0,   0,   0, \n     70,  14,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   1,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      6,   0,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,  13,   0, \n      0,   0, 150,   3,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n     55,   0,   0,   9, 226,   0, \n     16,   0,   8,   0,   0,   0, \n     86,  14,  16,   0,   8,   0, \n      0,   0,   6,   9,  16,   0, \n     13,   0,   0,   0,   6,   9, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,   7, 226,   0, \n     16,   0,  12,   0,   0,   0, \n      6,   9,  16,   0,   2,   0, \n      0,   0,  86,  14,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n    150,   7,  16,   0,   9,   0, \n      0,   0, 150,   7,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n     11,   0,   0,   0,   6,   9, \n     16,   0,   3,   0,   0,   0, \n     86,  14,  16,   0,   8,   0, \n      0,   0,   6,   9,  16,   0, \n     10,   0,   0,   0,   1,   0, \n      0,   7, 226,   0,  16,   0, \n      3,   0,   0,   0,   6,   9, \n     16,   0,   2,   0,   0,   0, \n      6,   0,  16,   0,  12,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  11, 242,   0,  16,   0, \n      3,   0,   0,   0,   6, 144, \n    208,   0,  14,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n     11,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n      1,   0,   0,   7, 114,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,   0, \n      0,   7, 226,   0,  16,   0, \n      8,   0,   0,   0,   6,   9, \n     16,   0,   7,   0,   0,   0, \n    246,  15,  16,   0,  13,   0, \n      0,   0,  30,   0,   0,   8, \n    226,   0,  16,   0,   8,   0, \n      0,   0,   6,   0,  16, 128, \n     65,   0,   0,   0,   9,   0, \n      0,   0,  86,  14,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n    150,   7,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  86,   5, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  60,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     10, 144, 208,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,   0, \n      0,   7, 226,   0,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   9,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0, 150,   7, \n     16,   0,   3,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,   7,   0,   0,   0, \n    150,   7,  16, 128,  65,   0, \n      0,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   6,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,   6,   9, \n     16,   0,   7,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,  86,  14, \n     16,   0,   6,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n    226,   0,  16,   0,   6,   0, \n      0,   0,   6,   9,  16,   0, \n      2,   0,   0,   0,  86,  14, \n     16,   0,   3,   0,   0,   0, \n     55,   0,   0,  11, 226,   0, \n     16,   0,   3,   0,   0,   0, \n      6, 144, 208,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  86,  14, \n     16,   0,   6,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  79,   0,   0,  11, \n     98,   0,  16,   0,   6,   0, \n      0,   0,   6, 144, 144,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  16,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0,   6,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  32,   0,   0,   7, \n    226,   0,  16,   0,   8,   0, \n      0,   0,   6,   0,  16,   0, \n     12,   0,   0,   0,  86,  14, \n     16,   0,   3,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     10,   0,   0,   0, 150,   7, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   8, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     10, 144, 144,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     85,   0,   0,   8, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  10, 144, 144,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,  12, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  55,   0,   0,  12, \n    226,   0,  16,   0,   8,   0, \n      0,   0,  86,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      6,   9,  16,   0,  10,   0, \n      0,   0,  55,   0,   0,  12, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n    226,   0,  16,   0,   8,   0, \n      0,   0,  86,  14,  16,   0, \n      3,   0,   0,   0,  86,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  86,   5,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   8,   0, \n      0,   0,  86,   5,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   8,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n    150,   7,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  36,   0, \n      0,   8, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     36,   0,   0,   8, 114,   0, \n     16,   0,  12,   0,   0,   0, \n    150,   7,  16, 128,  65,   0, \n      0,   0,   3,   0,   0,   0, \n    150,   7,  16,   0,   3,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0, 246,  15, \n     16,   0,  13,   0,   0,   0, \n     33,   0,   0,   7, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0, 246,  15,  16,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n      2,  64,   0,   0,   0,  64, \n      0,   0,   0,  64,   0,   0, \n      0,  64,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   2,   0, \n      0,   0, 166,  10,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0, 166,  10,  16,   0, \n      6,   0,   0,   0,   6,   9, \n     16,   0,  10,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   2,   0, \n      0,   0,   6,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0,   6,   0,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   8,   0,   0,   0, \n     86,  14,  16,   0,   3,   0, \n      0,   0,  29,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     42, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   8, 162,   0, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  48,   0,   0,   1, \n     80,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   3,   0, \n      4,   3,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    226,   0,  16,   0,   6,   0, \n      0,   0,   6,   9,  16,   0, \n      1,   0,   0,   0,   6,   9, \n     16,   0,   7,   0,   0,   0, \n     43,   0,   0,   5, 226,   0, \n     16,   0,   6,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,  16,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0, 150,   7, \n     16,   0,   6,   0,   0,   0, \n     29,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  49,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     56,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  28,   0,   0,   5, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  55,   0, \n      0,  11,  34,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     26, 144, 208,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     30,   0,   0,  10,  66,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  42, 144, 208, 128, \n     65,   0,   0,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  38,   0, \n      0,  10,   0, 208,   0,   0, \n    114,   0,  16,   0,   7,   0, \n      0,   0, 150,   7,  16,   0, \n      3,   0,   0,   0, 166, 154, \n    208,   0,  14,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  35,   0,   0,   9, \n    226,   0,  16,   0,   6,   0, \n      0,   0,   6,   9,  16,   0, \n      2,   0,   0,   0, 166,  10, \n     16,   0,   6,   0,   0,   0, \n      6,   9,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,  10, \n    226,   0,  16,   0,   6,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,  32,   0,   0,   0, \n     42,   0,   0,   7, 226,   0, \n     16,   0,   6,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  32,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  95,   0, \n      0,   0,  38,   0,   0,  11, \n      0, 208,   0,   0, 226,   0, \n     16,   0,   7,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0, 150,   7, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  34,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0, 150,   7,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     38,   0,   0,  11,   0, 208, \n      0,   0, 226,   0,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0, 225, 255, 255, 255, \n    225, 255, 255, 255, 225, 255, \n    255, 255,  42,   0,   0,   7, \n    226,   0,  16,   0,   6,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     40,   0,   0,   5, 226,   0, \n     16,   0,   6,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,  42,   0,   0,   7, \n    226,   0,  16,   0,   7,   0, \n      0,   0,  86,  14,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     55,   0,   0,   9, 226,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   9,  16,   0,   9,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   7,   0,   0,   0, \n     34,   0,   0,  10, 226,   0, \n     16,   0,   7,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n      9,   0,   0,   0, 150,   7, \n     16,   0,   6,   0,   0,   0, \n     60,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      6,   0,   0,   0,  86,  14, \n     16,   0,   7,   0,   0,   0, \n      6,   9,  16,   0,   9,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      6,   0,   0,   0,   6,   0, \n     16,   0,   7,   0,   0,   0, \n      6,   9,  16,   0,   8,   0, \n      0,   0,  86,  14,  16,   0, \n      6,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0,  86,  10, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 255,   3, \n      0,   0,   0, 124,   0,   0, \n    255,   3,   0,   0,   0, 124, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   7,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  18,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,   8,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   0,   4,   0,   0, \n      3,   0,   4,   3,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n    254,   3,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   8, \n     50,   0,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0, 144, 255, \n    255, 255,   0,   0,   0,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     41,   0,   0,   7, 210,   0, \n     16,   0,   8,   0,   0,   0, \n     86,  14,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,  10, 210,   0,  16,   0, \n      8,   0,   0,   0,   6,  14, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0, 128,   0,   0,   0,   0, \n      0,   0,   0, 128,   0,   0, \n      0, 128,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      7,   0,   0,   0,  85,   0, \n      0,   7,  34,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0, 144, 255, \n    255, 255,  21,   0,   0,   1, \n     21,   0,   0,   1,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  56, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   7,   0,   0,   0, \n    246,  15,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 255,   3,   0,   0, \n      0, 124,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      7,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     10,   0,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0, 144, 255, \n    255, 255,  21,   0,   0,   1, \n     21,   0,   0,   1,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  56, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n      0,   0,   0,   8, 210,   0, \n     16,   0,   8,   0,   0,   0, \n      6,   9,  16,   0,   9,   0, \n      0,   0,   6,   9,  16, 128, \n     65,   0,   0,   0,  10,   0, \n      0,   0,  16,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0, 134,   3,  16,   0, \n      8,   0,   0,   0, 134,   3, \n     16,   0,   8,   0,   0,   0, \n      0,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     55,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n    236, 120, 173,  96,  26,   0, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n    134,   0,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     98,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 241,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n    134,   0,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  98,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 241, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0, 134,   0, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1, 167,   0, \n      0,   8,  50,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     54,   0,   0,   8, 194,   0, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 168,   0,   0,   9, \n    242, 224,  17,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     62,   0,   0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC6HEncode_TryModeLE10CS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 0x0000cccc, 15, -1, 0},\n                              { 0x00008888, 15, -1, 9},\n                              { 0x0000eeee, 15, -1, 18},\n                              { 0x0000ecc8, 15, -1, 27},\n                              { 0x0000c880, 15, -1, 37},\n                              { 0x0000feec, 15, -1, 46},\n                              { 0x0000fec8, 15, -1, 55},\n                              { 0x0000ec80, 15, -1, 64},\n                              { 0x0000c800, 15, -1, 0},\n                              { 0x0000ffec, 15, 0, 0},\n                              { 0x0000fe80, 15, 0, 0},\n                              { 0x0000e800, 15, -1, 0},\n                              { 0x0000ffe8, 15, -1, 0},\n                              { 0x0000ff00, 15, -1, 0},\n                              { 0x0000fff0, 15, 0, 0},\n                              { 0x0000f000, 15, 0, 0},\n                              { 0x0000f710, 15, 0, 0},\n                              { 142, 2, 0, 0},\n                              { 0x00007100, 8, 0, 0},\n                              { 2254, 2, 0, 0},\n                              { 140, 2, 0, 0},\n                              { 0x00007310, 8, 0, 0},\n                              { 0x00003100, 8, 0, 0},\n                              { 0x00008cce, 15, 0, 0},\n                              { 2188, 2, 0, 0},\n                              { 0x00003110, 8, 0, 0},\n                              { 0x00006666, 2, 0, 0},\n                              { 0x0000366c, 2, 0, 0},\n                              { 6120, 8, 0, 0},\n                              { 4080, 8, 0, 0},\n                              { 0x0000718e, 2, 0, 0},\n                              { 0x0000399c, 2, 0, 0},\n                              { 10, 5, 5, 5},\n                              { 7, 6, 6, 6},\n                              { 11, 5, 4, 4},\n                              { 11, 4, 5, 4},\n                              { 11, 4, 4, 5},\n                              { 9, 5, 5, 5},\n                              { 8, 6, 5, 5},\n                              { 8, 5, 6, 5},\n                              { 8, 5, 5, 6},\n                              { 6, 6, 6, 6},\n                              { 10, 10, 10, 10},\n                              { 11, 9, 9, 9},\n                              { 12, 8, 8, 8},\n                              { 16, 4, 4, 4},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_resource_structured t1, 16 \ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 25\ndcl_indexableTemp x0[6], 4\ndcl_indexableTemp x1[2], 4\ndcl_tgsm_structured g0, 84, 64\ndcl_thread_group 64, 1, 1\nushr r0.x, vThreadIDInGroupFlattened.x, l(5)\nishl r0.y, vThreadGroupID.x, l(1)\niadd r0.y, r0.y, cb0[1].x\niadd r0.x, r0.x, r0.y\nuge r0.y, r0.x, cb0[1].y\nif_nz r0.y\n  ret \nendif \nld_structured r1.x, r0.x, l(0), t1.xxxx\nlt r0.y, r1.x, l(0.000001)\nif_nz r0.y\n  ld_structured r2.xyzw, r0.x, l(0), t1.xyzw\n  store_structured u0.xyzw, r0.x, l(0), r2.xyzw\n  ret \nendif \nand r0.y, vThreadIDInGroupFlattened.x, l(32)\niadd r2.z, -r0.y, vThreadIDInGroupFlattened.x\nult r3.xyzw, r2.zzzz, l(16, 32, 8, 4)\nif_nz r3.x\n  udiv r0.z, null, r0.x, cb0[0].y\n  imad r0.w, -r0.z, cb0[0].y, r0.x\n  ishl r0.w, r0.w, l(2)\n  ishl r0.z, r0.z, l(2)\n  and r1.y, r2.z, l(3)\n  iadd r4.x, r0.w, r1.y\n  ushr r0.w, r2.z, l(2)\n  iadd r4.y, r0.w, r0.z\n  mov r4.zw, l(0,0,0,0)\n  ld r4.xyzw, r4.xyzw, t0.xyzw\n  ushr r1.yzw, r4.xxyz, l(16)\n  and r1.yzw, r1.yyzw, l(0, 0x00008000, 0x00008000, 0x00008000)\n  and r5.xyzw, r4.xxyy, l(0x7fffffff, 0x007fffff, 0x7fffffff, 0x007fffff)\n  ult r0.zw, l(0, 0, 0x47ffefff, 0x47ffefff), r5.xxxz\n  ult r4.xy, r5.xzxx, l(0x38800000, 0x38800000, 0, 0)\n  ushr r6.xy, r5.xzxx, l(23)\n  iadd r6.xy, -r6.xyxx, l(113, 113, 0, 0)\n  iadd r5.yw, r5.yyyw, l(0, 0x00800000, 0, 0x00800000)\n  ushr r7.x, r5.y, r6.x\n  ushr r7.y, r5.w, r6.y\n  iadd r5.xy, r5.xzxx, l(0xc8000000, 0xc8000000, 0, 0)\n  movc r4.xy, r4.xyxx, r7.xyxx, r5.xyxx\n  iadd r5.xy, r4.xyxx, l(4095, 4095, 0, 0)\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(1, 1, 0, 0)\n  iadd r4.xy, r4.xyxx, r5.xyxx\n  ushr r4.xy, r4.xyxx, l(13)\n  and r4.xy, r4.xyxx, l(0x00007fff, 0x00007fff, 0, 0)\n  movc r0.zw, r0.zzzw, l(0,0,0x00007fff,0x00007fff), r4.xxxy\n  iadd r5.xy, r1.yzyy, r0.zwzz\n  and r0.zw, r4.zzzz, l(0, 0, 0x7fffffff, 0x007fffff)\n  ult r1.y, l(0x47ffefff), r0.z\n  ult r1.z, r0.z, l(0x38800000)\n  ushr r2.w, r0.z, l(23)\n  iadd r2.w, -r2.w, l(113)\n  iadd r0.w, r0.w, l(0x00800000)\n  ushr r0.w, r0.w, r2.w\n  iadd r0.z, r0.z, l(0xc8000000)\n  movc r0.z, r1.z, r0.w, r0.z\n  iadd r0.w, r0.z, l(4095)\n  ushr r0.z, r0.z, l(13)\n  and r0.z, r0.z, l(1)\n  iadd r0.z, r0.z, r0.w\n  ushr r0.z, r0.z, l(13)\n  and r0.z, r0.z, l(0x00007fff)\n  movc r0.z, r1.y, l(0x00007fff), r0.z\n  iadd r5.z, r1.w, r0.z\n  and r4.xyzw, r5.xxyy, l(1023, 0x00007c00, 1023, 0x00007c00)\n  if_nz r4.y\n    ushr r0.z, r5.x, l(10)\n    and r0.z, r0.z, l(31)\n  else \n    if_nz r4.x\n      ishl r0.w, r4.x, l(1)\n      mov r1.y, r0.w\n      mov r0.z, l(0)\n      loop \n        and r1.z, r1.y, l(1024)\n        breakc_nz r1.z\n        iadd r0.z, r0.z, l(-1)\n        ishl r1.y, r1.y, l(1)\n      endloop \n      and r4.x, r1.y, l(1022)\n    else \n      mov r4.x, l(0)\n      mov r0.z, l(-112)\n    endif \n  endif \n  ishl r1.yzw, r5.xxyz, l(16)\n  and r1.yzw, r1.yyzw, l(0, 0x80000000, 0x80000000, 0x80000000)\n  ishl r0.z, r0.z, l(23)\n  iadd r0.z, r0.z, l(0x38000000)\n  or r0.z, r0.z, r1.y\n  ishl r0.w, r4.x, l(13)\n  iadd r6.x, r0.w, r0.z\n  if_nz r4.w\n    ushr r0.z, r5.y, l(10)\n    and r0.z, r0.z, l(31)\n  else \n    if_nz r4.z\n      ishl r0.w, r4.z, l(1)\n      mov r1.y, r0.w\n      mov r0.z, l(0)\n      loop \n        and r2.w, r1.y, l(1024)\n        breakc_nz r2.w\n        iadd r0.z, r0.z, l(-1)\n        ishl r1.y, r1.y, l(1)\n      endloop \n      and r4.z, r1.y, l(1022)\n    else \n      mov r4.z, l(0)\n      mov r0.z, l(-112)\n    endif \n  endif \n  ishl r0.z, r0.z, l(23)\n  iadd r0.z, r0.z, l(0x38000000)\n  or r0.z, r0.z, r1.z\n  ishl r0.w, r4.z, l(13)\n  iadd r6.y, r0.w, r0.z\n  and r0.zw, r5.zzzz, l(0, 0, 1023, 0x00007c00)\n  if_nz r0.w\n    ushr r0.w, r5.z, l(10)\n    and r0.w, r0.w, l(31)\n  else \n    if_nz r0.z\n      ishl r1.y, r0.z, l(1)\n      mov r1.z, r1.y\n      mov r0.w, l(0)\n      loop \n        and r2.w, r1.z, l(1024)\n        breakc_nz r2.w\n        iadd r0.w, r0.w, l(-1)\n        ishl r1.z, r1.z, l(1)\n      endloop \n      and r0.z, r1.z, l(1022)\n    else \n      mov r0.zw, l(0,0,0,-112)\n    endif \n  endif \n  ishl r0.w, r0.w, l(23)\n  iadd r0.w, r0.w, l(0x38000000)\n  or r0.w, r0.w, r1.w\n  ishl r0.z, r0.z, l(13)\n  iadd r6.z, r0.z, r0.w\n  dp3 r6.w, r6.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(24), r6.xyzw\n  ieq r0.z, cb0[0].z, l(95)\n  ishl r1.yzw, r5.xxyz, l(6)\n  udiv r1.yzw, null, r1.yyzw, l(0, 31, 31, 31)\n  ult r4.xyz, r5.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ieq r6.xyz, r5.xyzx, l(0x00007bff, 0x00007bff, 0x00007bff, 0)\n  ishl r5.xyz, r5.xyzx, l(5)\n  udiv r7.xyz, null, r5.xyzx, l(31, 31, 31, 0)\n  movc r7.xyz, r6.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r7.xyzx\n  and r5.xyz, r5.xyzx, l(0x000fffe0, 0x000fffe0, 0x000fffe0, 0)\n  udiv r5.xyz, null, r5.xyzx, l(31, 31, 31, 0)\n  ineg r5.xyz, r5.xyzx\n  movc r5.xyz, r6.xyzx, l(0xffff8001,0xffff8001,0xffff8001,0), r5.xyzx\n  movc r4.xyz, r4.xyzx, r7.xyzx, r5.xyzx\n  movc r1.yzw, r0.zzzz, r1.yyzw, r4.xxyz\n  store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(12), r1.yzwy\nendif \nif_nz r3.y\n  mov x0[0].x, l(0x7fffffff)\n  mov x0[1].x, l(0x7fffffff)\n  mov x0[2].x, l(0x7fffffff)\n  mov x0[0].y, l(-0.000000)\n  mov x0[1].y, l(-0.000000)\n  mov x0[2].y, l(-0.000000)\n  mov x0[3].x, l(0x7fffffff)\n  mov x0[4].x, l(0x7fffffff)\n  mov x0[5].x, l(0x7fffffff)\n  mov x0[3].y, l(-0.000000)\n  mov x0[4].y, l(-0.000000)\n  mov x0[5].y, l(-0.000000)\n  mov x1[0].x, l(340282346638528860000000000000000000000.000000)\n  mov x1[0].y, l(-340282346638528860000000000000000000000.000000)\n  mov x1[1].x, l(340282346638528860000000000000000000000.000000)\n  mov x1[1].y, l(-340282346638528860000000000000000000000.000000)\n  mov r0.z, l(0)\n  loop \n    uge r0.w, r0.z, l(16)\n    breakc_nz r0.w\n    iadd r0.w, r0.z, r0.y\n    ld_structured r4.xyz, r0.w, l(12), g0.xyzx\n    ld_structured r5.x, r0.w, l(36), g0.xxxx\n    ushr r0.w, icb[r2.z + 0].x, r0.z\n    and r0.w, r0.w, l(1)\n    if_nz r0.w\n      mov r0.w, x1[1].x\n      lt r1.y, r5.x, r0.w\n      mov r1.z, x0[3].x\n      movc r1.z, r1.y, r4.x, r1.z\n      mov x0[3].x, r1.z\n      mov r1.z, x0[4].x\n      movc r1.z, r1.y, r4.y, r1.z\n      mov x0[4].x, r1.z\n      mov r1.z, x0[5].x\n      movc r1.z, r1.y, r4.z, r1.z\n      mov x0[5].x, r1.z\n      movc r0.w, r1.y, r5.x, r0.w\n      mov x1[1].x, r0.w\n      mov r0.w, x1[1].y\n      lt r1.y, r0.w, r5.x\n      mov r1.z, x0[3].y\n      movc r1.z, r1.y, r4.x, r1.z\n      mov x0[3].y, r1.z\n      mov r1.z, x0[4].y\n      movc r1.z, r1.y, r4.y, r1.z\n      mov x0[4].y, r1.z\n      mov r1.z, x0[5].y\n      movc r1.z, r1.y, r4.z, r1.z\n      mov x0[5].y, r1.z\n      movc r0.w, r1.y, r5.x, r0.w\n      mov x1[1].y, r0.w\n    else \n      mov r0.w, x1[0].x\n      lt r1.y, r5.x, r0.w\n      mov r1.z, x0[0].x\n      movc r1.z, r1.y, r4.x, r1.z\n      mov x0[0].x, r1.z\n      mov r1.z, x0[1].x\n      movc r1.z, r1.y, r4.y, r1.z\n      mov x0[1].x, r1.z\n      mov r1.z, x0[2].x\n      movc r1.z, r1.y, r4.z, r1.z\n      mov x0[2].x, r1.z\n      movc r0.w, r1.y, r5.x, r0.w\n      mov x1[0].x, r0.w\n      mov r0.w, x1[0].y\n      lt r1.y, r0.w, r5.x\n      mov r1.z, x0[0].y\n      movc r1.z, r1.y, r4.x, r1.z\n      mov x0[0].y, r1.z\n      mov r1.z, x0[1].y\n      movc r1.z, r1.y, r4.y, r1.z\n      mov x0[1].y, r1.z\n      mov r1.z, x0[2].y\n      movc r1.z, r1.y, r4.z, r1.z\n      mov x0[2].y, r1.z\n      movc r0.w, r1.y, r5.x, r0.w\n      mov x1[0].y, r0.w\n    endif \n    iadd r0.z, r0.z, l(1)\n  endloop \n  mov r4.x, x0[0].y\n  mov r4.y, x0[1].y\n  mov r4.z, x0[2].y\n  mov r0.z, x0[0].x\n  mov r0.w, x0[1].x\n  mov r1.y, x0[2].x\n  ineg r5.xy, r0.zwzz\n  ineg r5.z, r1.y\n  iadd r6.xyz, r4.xyzx, r5.xyzx\n  itof r6.xyz, r6.xyzx\n  dp3 r1.z, r6.xyzx, r6.xyzx\n  ld_structured r7.xyz, r0.y, l(12), g0.xyzx\n  iadd r5.xyz, r5.xyzx, r7.xyzx\n  itof r5.xyz, r5.xyzx\n  dp3 r1.w, r6.xyzx, r5.xyzx\n  lt r2.w, l(0.000000), r1.z\n  ge r3.y, r1.w, l(0.000000)\n  and r2.w, r2.w, r3.y\n  mul r1.w, r1.w, l(63.499989)\n  div r1.w, r1.w, r1.z\n  ftou r1.w, r1.w\n  ult r1.w, l(32), r1.w\n  and r1.w, r1.w, r2.w\n  movc r5.xyz, r1.wwww, -r6.xyzx, r6.xyzx\n  movc r6.xy, r1.wwww, r4.xyxx, r0.zwzz\n  movc r6.z, r1.w, r4.z, r1.y\n  movc r7.xy, r1.wwww, r0.zwzz, r4.xyxx\n  movc r7.z, r1.w, r1.y, r4.z\n  mov r4.x, x0[3].y\n  mov r4.y, x0[4].y\n  mov r4.z, x0[5].y\n  mov r0.z, x0[3].x\n  mov r0.w, x0[4].x\n  mov r1.y, x0[5].x\n  ineg r8.xy, r0.zwzz\n  ineg r8.z, r1.y\n  iadd r9.xyz, r4.xyzx, r8.xyzx\n  itof r9.xyz, r9.xyzx\n  dp3 r1.w, r9.xyzx, r9.xyzx\n  iadd r2.w, r0.y, icb[r2.z + 0].y\n  ld_structured r10.xyz, r2.w, l(12), g0.xyzx\n  iadd r8.xyz, r8.xyzx, r10.xyzx\n  itof r8.xyz, r8.xyzx\n  dp3 r2.w, r9.xyzx, r8.xyzx\n  lt r3.y, l(0.000000), r1.w\n  ge r4.w, r2.w, l(0.000000)\n  and r3.y, r3.y, r4.w\n  mul r2.w, r2.w, l(63.499989)\n  div r2.w, r2.w, r1.w\n  ftou r2.w, r2.w\n  ult r2.w, l(32), r2.w\n  and r2.w, r2.w, r3.y\n  movc r8.xyz, r2.wwww, -r9.xyzx, r9.xyzx\n  movc r9.xy, r2.wwww, r4.xyxx, r0.zwzz\n  movc r9.z, r2.w, r4.z, r1.y\n  movc r10.xy, r2.wwww, r0.zwzz, r4.xyxx\n  movc r10.z, r2.w, r1.y, r4.z\n  ieq r0.zw, cb0[0].zzzz, l(0, 0, 95, 96)\n  if_nz r0.z\n    mov r1.y, cb0[0].w\n    ige r2.w, icb[r1.y + 32].x, l(15)\n    and r2.w, r2.w, l(1)\n    movc r4.xyz, r6.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r11.xyz, r7.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r4.xyz, r2.wwww, r4.xyzx\n    or r11.xyz, r2.wwww, r11.xyzx\n    ieq r12.xyz, r6.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ieq r13.xyz, r7.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ishl r3.y, l(1), icb[r1.y + 32].x\n    iadd r3.y, r3.y, l(-1)\n    ishl r14.xyz, r6.xyzx, icb[r1.y + 32].x\n    ishl r15.xyz, r7.xyzx, icb[r1.y + 32].x\n    ishr r14.xyz, r14.xyzx, l(16)\n    ishr r15.xyz, r15.xyzx, l(16)\n    movc r12.xyz, r12.xyzx, r3.yyyy, r14.xyzx\n    movc r13.xyz, r13.xyzx, r3.yyyy, r15.xyzx\n    movc r4.xyz, r4.xyzx, r6.xyzx, r12.xyzx\n    movc r11.xyz, r11.xyzx, r7.xyzx, r13.xyzx\n    movc r12.xyz, r9.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r13.xyz, r10.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r12.xyz, r2.wwww, r12.xyzx\n    or r13.xyz, r2.wwww, r13.xyzx\n    ieq r14.xyz, r9.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    ieq r15.xyz, r10.xyzx, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0)\n    mov r1.y, cb0[0].w\n    ishl r16.xyz, r9.xyzx, icb[r1.y + 32].x\n    ishl r17.xyz, r10.xyzx, icb[r1.y + 32].x\n    ishr r16.xyz, r16.xyzx, l(16)\n    ishr r17.xyz, r17.xyzx, l(16)\n    movc r14.xyz, r14.xyzx, r3.yyyy, r16.xyzx\n    movc r15.xyz, r15.xyzx, r3.yyyy, r17.xyzx\n    movc r12.xyz, r12.xyzx, r9.xyzx, r14.xyzx\n    movc r13.xyz, r13.xyzx, r10.xyzx, r15.xyzx\n  else \n    mov r1.y, cb0[0].w\n    ige r2.w, icb[r1.y + 32].x, l(16)\n    and r2.w, r2.w, l(1)\n    movc r14.xyz, r6.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r15.xyz, r7.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r14.xyz, r2.wwww, r14.xyzx\n    or r15.xyz, r2.wwww, r15.xyzx\n    ige r16.xyz, r6.xyzx, l(0, 0, 0, 0)\n    ige r17.xyz, r7.xyzx, l(0, 0, 0, 0)\n    ieq r18.xyz, r6.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r19.xyz, r7.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r1.y, l(-1), icb[r1.y + 32].x\n    ishl r3.y, l(1), r1.y\n    iadd r4.w, r3.y, l(-1)\n    ishl r20.xyz, r6.xyzx, r1.y\n    ishl r21.xyz, r7.xyzx, r1.y\n    ishr r20.xyz, r20.xyzx, l(15)\n    ishr r21.xyz, r21.xyzx, l(15)\n    movc r18.xyz, r18.xyzx, r4.wwww, r20.xyzx\n    movc r19.xyz, r19.xyzx, r4.wwww, r21.xyzx\n    ineg r20.xyz, r6.xyzx\n    ineg r21.xyz, r7.xyzx\n    ieq r22.xyz, r20.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r23.xyz, r21.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    iadd r3.y, -r3.y, l(1)\n    ishl r20.xyz, r20.xyzx, r1.y\n    ishl r21.xyz, r21.xyzx, r1.y\n    ishr r20.xyz, r20.xyzx, l(15)\n    ishr r21.xyz, r21.xyzx, l(15)\n    ineg r20.xyz, r20.xyzx\n    ineg r21.xyz, r21.xyzx\n    movc r20.xyz, r22.xyzx, r3.yyyy, r20.xyzx\n    movc r21.xyz, r23.xyzx, r3.yyyy, r21.xyzx\n    movc r16.xyz, r16.xyzx, r18.xyzx, r20.xyzx\n    movc r17.xyz, r17.xyzx, r19.xyzx, r21.xyzx\n    movc r4.xyz, r14.xyzx, r6.xyzx, r16.xyzx\n    movc r11.xyz, r15.xyzx, r7.xyzx, r17.xyzx\n    movc r7.xyz, r9.xyzx, l(0,0,0,0), l(1,1,1,0)\n    movc r14.xyz, r10.xyzx, l(0,0,0,0), l(1,1,1,0)\n    or r7.xyz, r2.wwww, r7.xyzx\n    or r14.xyz, r2.wwww, r14.xyzx\n    ige r15.xyz, r9.xyzx, l(0, 0, 0, 0)\n    ige r16.xyz, r10.xyzx, l(0, 0, 0, 0)\n    ieq r17.xyz, r9.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r18.xyz, r10.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ishl r19.xyz, r9.xyzx, r1.y\n    ishl r20.xyz, r10.xyzx, r1.y\n    ishr r19.xyz, r19.xyzx, l(15)\n    ishr r20.xyz, r20.xyzx, l(15)\n    movc r17.xyz, r17.xyzx, r4.wwww, r19.xyzx\n    movc r18.xyz, r18.xyzx, r4.wwww, r20.xyzx\n    ineg r19.xyz, r9.xyzx\n    ineg r20.xyz, r10.xyzx\n    ieq r21.xyz, r19.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ieq r22.xyz, r20.xyzx, l(0x00007fff, 0x00007fff, 0x00007fff, 0)\n    ishl r19.xyz, r19.xyzx, r1.y\n    ishl r20.xyz, r20.xyzx, r1.y\n    ishr r19.xyz, r19.xyzx, l(15)\n    ishr r20.xyz, r20.xyzx, l(15)\n    ineg r19.xyz, r19.xyzx\n    ineg r20.xyz, r20.xyzx\n    movc r19.xyz, r21.xyzx, r3.yyyy, r19.xyzx\n    movc r20.xyz, r22.xyzx, r3.yyyy, r20.xyzx\n    movc r15.xyz, r15.xyzx, r17.xyzx, r19.xyzx\n    movc r16.xyz, r16.xyzx, r18.xyzx, r20.xyzx\n    movc r12.xyz, r7.xyzx, r9.xyzx, r15.xyzx\n    movc r13.xyz, r14.xyzx, r10.xyzx, r16.xyzx\n  endif \n  iadd r7.xyz, -r4.xyzx, r11.xyzx\n  mov r1.y, cb0[0].w\n  movc r7.xyz, icb[r1.y + 0].zzzz, r7.xyzx, r11.xyzx\n  iadd r10.xyz, -r4.xyzx, r12.xyzx\n  movc r10.xyz, icb[r1.y + 0].zzzz, r10.xyzx, r12.xyzx\n  iadd r11.xyz, -r4.xyzx, r13.xyzx\n  movc r11.xyz, icb[r1.y + 0].zzzz, r11.xyzx, r13.xyzx\n  if_nz icb[r1.y + 0].z\n    ige r12.xyz, r7.xyzx, l(0, 0, 0, 0)\n    iadd r13.xyz, l(-1, -1, -1, 0), icb[r1.y + 32].yzwy\n    ishl r14.x, l(1), r13.x\n    ishl r14.y, l(1), r13.y\n    ishl r14.z, l(1), r13.z\n    ige r13.xyz, r7.xyzx, r14.xyzx\n    ineg r15.xyz, r7.xyzx\n    ilt r15.xyz, r14.xyzx, r15.xyzx\n    movc r16.xyz, r12.xyzx, r13.xyzx, r15.xyzx\n    or r2.w, r16.y, r16.x\n    or r2.w, r16.z, r2.w\n    ishl r16.x, l(1), icb[r1.y + 32].x\n    ishl r16.y, l(1), icb[r1.y + 32].y\n    ishl r16.z, l(1), icb[r1.y + 32].z\n    ishl r16.w, l(1), icb[r1.y + 32].w\n    iadd r16.xyzw, r16.xyzw, l(-1, -1, -1, -1)\n    and r17.xyz, r4.xyzx, r16.xxxx\n    iadd r18.xyz, r14.xyzx, l(-1, -1, -1, 0)\n    movc r13.xyz, r13.xyzx, r18.xyzx, r7.xyzx\n    and r19.xyz, r7.xyzx, r16.yzwy\n    movc r15.xyz, r15.xyzx, r14.xyzx, r19.xyzx\n    movc r12.xyz, r12.xyzx, r13.xyzx, r15.xyzx\n    ige r13.xyz, r10.xyzx, l(0, 0, 0, 0)\n    ige r15.xyz, r10.xyzx, r14.xyzx\n    ineg r19.xyz, r10.xyzx\n    ilt r19.xyz, r14.xyzx, r19.xyzx\n    movc r20.xyz, r13.xyzx, r15.xyzx, r19.xyzx\n    ige r21.xyz, r11.xyzx, l(0, 0, 0, 0)\n    ige r22.xyz, r11.xyzx, r14.xyzx\n    ineg r23.xyz, r11.xyzx\n    ilt r23.xyz, r14.xyzx, r23.xyzx\n    movc r24.xyz, r21.xyzx, r22.xyzx, r23.xyzx\n    or r20.xyz, r20.xyzx, r24.xyzx\n    or r3.y, r20.y, r20.x\n    or r3.y, r20.z, r3.y\n    or r2.w, r2.w, r3.y\n    and r2.w, r2.w, l(1)\n    movc r15.xyz, r15.xyzx, r18.xyzx, r10.xyzx\n    and r20.xyz, r10.xyzx, r16.yzwy\n    movc r19.xyz, r19.xyzx, r14.xyzx, r20.xyzx\n    movc r13.xyz, r13.xyzx, r15.xyzx, r19.xyzx\n    movc r15.xyz, r22.xyzx, r18.xyzx, r11.xyzx\n    and r16.xyz, r11.xyzx, r16.yzwy\n    movc r14.xyz, r23.xyzx, r14.xyzx, r16.xyzx\n    movc r14.xyz, r21.xyzx, r15.xyzx, r14.xyzx\n  else \n    ishl r3.y, l(1), icb[r1.y + 32].x\n    iadd r3.y, r3.y, l(-1)\n    and r17.xyz, r3.yyyy, r4.xyzx\n    and r12.xyz, r3.yyyy, r7.xyzx\n    and r13.xyz, r3.yyyy, r10.xyzx\n    and r14.xyz, r3.yyyy, r11.xyzx\n    mov r2.w, l(0)\n  endif \n  iadd r4.xyzw, l(-1, -1, -1, -1), icb[r1.y + 32].xyzw\n  ishl r7.x, l(1), r4.x\n  ishl r7.y, l(1), r4.y\n  ishl r7.z, l(1), r4.z\n  ishl r7.w, l(1), r4.w\n  and r4.yzw, r7.xxxx, r17.xxyz\n  iadd r10.xyzw, r7.xyzw, l(-1, -1, -1, -1)\n  and r11.xyz, r10.xxxx, r17.xyzx\n  iadd r11.xyz, -r7.xxxx, r11.xyzx\n  movc r4.yzw, r4.yyzw, r11.xxyz, r17.xxyz\n  movc r4.yzw, r0.wwww, r4.yyzw, r17.xxyz\n  or r0.w, r0.w, icb[r1.y + 0].z\n  and r11.xyz, r7.yzwy, r12.xyzx\n  and r15.xyz, r10.yzwy, r12.xyzx\n  iadd r15.xyz, -r7.yzwy, r15.xyzx\n  movc r11.xyz, r11.xyzx, r15.xyzx, r12.xyzx\n  movc r11.xyz, r0.wwww, r11.xyzx, r12.xyzx\n  and r12.xyz, r7.yzwy, r13.xyzx\n  and r15.xyz, r10.yzwy, r13.xyzx\n  iadd r15.xyz, -r7.yzwy, r15.xyzx\n  movc r12.xyz, r12.xyzx, r15.xyzx, r13.xyzx\n  movc r12.xyz, r0.wwww, r12.xyzx, r13.xyzx\n  and r13.xyz, r7.yzwy, r14.xyzx\n  and r10.yzw, r10.yyzw, r14.xxyz\n  iadd r7.xyz, -r7.yzwy, r10.yzwy\n  movc r7.xyz, r13.xyzx, r7.xyzx, r14.xyzx\n  movc r7.xyz, r0.wwww, r7.xyzx, r14.xyzx\n  iadd r10.yzw, r4.yyzw, r11.xxyz\n  movc r10.yzw, icb[r1.y + 0].zzzz, r10.yyzw, r11.xxyz\n  iadd r11.xyz, r4.yzwy, r12.xyzx\n  movc r11.xyz, icb[r1.y + 0].zzzz, r11.xyzx, r12.xyzx\n  iadd r12.xyz, r4.yzwy, r7.xyzx\n  movc r7.xyz, icb[r1.y + 0].zzzz, r12.xyzx, r7.xyzx\n  ult r12.xy, icb[r1.y + 32].xxxx, l(15, 16, 0, 0)\n  ishl r0.w, l(1), icb[r1.y + 32].x\n  iadd r0.w, r0.w, l(-1)\n  ieq r13.xyz, r0.wwww, r4.yzwy\n  ieq r14.xyz, r0.wwww, r10.yzwy\n  ishl r15.xyz, r4.yzwy, l(16)\n  ishl r16.xyz, r10.yzwy, l(16)\n  iadd r15.xyz, r15.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  iadd r16.xyz, r16.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ushr r15.xyz, r15.xyzx, icb[r1.y + 32].x\n  ushr r16.xyz, r16.xyzx, icb[r1.y + 32].x\n  movc r13.xyz, r13.xyzx, l(0x0000ffff,0x0000ffff,0x0000ffff,0), r15.xyzx\n  movc r14.xyz, r14.xyzx, l(0x0000ffff,0x0000ffff,0x0000ffff,0), r16.xyzx\n  movc r13.xyz, r4.yzwy, r13.xyzx, l(0,0,0,0)\n  movc r14.xyz, r10.yzwy, r14.xyzx, l(0,0,0,0)\n  movc r13.xyz, r12.xxxx, r13.xyzx, r4.yzwy\n  movc r14.xyz, r12.xxxx, r14.xyzx, r10.yzwy\n  ige r15.xyz, r4.yzwy, l(0, 0, 0, 0)\n  ige r16.xyz, r10.yzwy, l(0, 0, 0, 0)\n  imax r17.xyz, -r4.yzwy, r4.yzwy\n  imax r18.xyz, -r10.yzwy, r10.yzwy\n  ige r19.xyz, r17.xyzx, r10.xxxx\n  ige r20.xyz, r18.xyzx, r10.xxxx\n  ishl r21.xyz, r17.xyzx, l(15)\n  ishl r22.xyz, r18.xyzx, l(15)\n  iadd r21.xyz, r21.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  iadd r22.xyz, r22.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  ushr r21.xyz, r21.xyzx, r4.x\n  ushr r22.xyz, r22.xyzx, r4.x\n  movc r19.xyz, r19.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r21.xyzx\n  movc r20.xyz, r20.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r22.xyzx\n  movc r17.xyz, r17.xyzx, r19.xyzx, l(0,0,0,0)\n  movc r18.xyz, r18.xyzx, r20.xyzx, l(0,0,0,0)\n  ineg r19.xyz, r17.xyzx\n  ineg r20.xyz, r18.xyzx\n  movc r15.xyz, r15.xyzx, r17.xyzx, r19.xyzx\n  movc r16.xyz, r16.xyzx, r18.xyzx, r20.xyzx\n  movc r4.yzw, r12.yyyy, r15.xxyz, r4.yyzw\n  movc r10.yzw, r12.yyyy, r16.xxyz, r10.yyzw\n  movc r4.yzw, r0.zzzz, r13.xxyz, r4.yyzw\n  movc r10.yzw, r0.zzzz, r14.xxyz, r10.yyzw\n  ieq r13.xyz, r0.wwww, r11.xyzx\n  ieq r14.xyz, r0.wwww, r7.xyzx\n  ishl r15.xyz, r11.xyzx, l(16)\n  ishl r16.xyz, r7.xyzx, l(16)\n  iadd r15.xyz, r15.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  iadd r16.xyz, r16.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n  ushr r15.xyz, r15.xyzx, icb[r1.y + 32].x\n  ushr r16.xyz, r16.xyzx, icb[r1.y + 32].x\n  movc r13.xyz, r13.xyzx, l(0x0000ffff,0x0000ffff,0x0000ffff,0), r15.xyzx\n  movc r14.xyz, r14.xyzx, l(0x0000ffff,0x0000ffff,0x0000ffff,0), r16.xyzx\n  movc r13.xyz, r11.xyzx, r13.xyzx, l(0,0,0,0)\n  movc r14.xyz, r7.xyzx, r14.xyzx, l(0,0,0,0)\n  movc r13.xyz, r12.xxxx, r13.xyzx, r11.xyzx\n  movc r12.xzw, r12.xxxx, r14.xxyz, r7.xxyz\n  ige r14.xyz, r11.xyzx, l(0, 0, 0, 0)\n  ige r15.xyz, r7.xyzx, l(0, 0, 0, 0)\n  imax r16.xyz, -r11.xyzx, r11.xyzx\n  imax r17.xyz, -r7.xyzx, r7.xyzx\n  ige r18.xyz, r16.xyzx, r10.xxxx\n  ige r19.xyz, r17.xyzx, r10.xxxx\n  ishl r20.xyz, r16.xyzx, l(15)\n  ishl r21.xyz, r17.xyzx, l(15)\n  iadd r20.xyz, r20.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  iadd r21.xyz, r21.xyzx, l(0x00004000, 0x00004000, 0x00004000, 0)\n  ushr r20.xyz, r20.xyzx, r4.x\n  ushr r21.xyz, r21.xyzx, r4.x\n  movc r18.xyz, r18.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r20.xyzx\n  movc r19.xyz, r19.xyzx, l(0x00007fff,0x00007fff,0x00007fff,0), r21.xyzx\n  movc r16.xyz, r16.xyzx, r18.xyzx, l(0,0,0,0)\n  movc r17.xyz, r17.xyzx, r19.xyzx, l(0,0,0,0)\n  ineg r18.xyz, r16.xyzx\n  ineg r19.xyz, r17.xyzx\n  movc r14.xyz, r14.xyzx, r16.xyzx, r18.xyzx\n  movc r15.xyz, r15.xyzx, r17.xyzx, r19.xyzx\n  movc r11.xyz, r12.yyyy, r14.xyzx, r11.xyzx\n  movc r7.xyz, r12.yyyy, r15.xyzx, r7.xyzx\n  movc r11.xyz, r0.zzzz, r13.xyzx, r11.xyzx\n  movc r7.xyz, r0.zzzz, r12.xzwx, r7.xyzx\n  ge r0.zw, l(0.000000, 0.000000, 0.000000, 0.000000), r1.wwwz\n  mov r1.y, cb0[0].z\n  mov r3.y, l(0)\n  mov r4.x, l(0)\n  loop \n    uge r5.w, r4.x, l(16)\n    breakc_nz r5.w\n    ushr r5.w, icb[r2.z + 0].x, r4.x\n    and r5.w, r5.w, l(1)\n    if_nz r5.w\n      iadd r5.w, r0.y, r4.x\n      ld_structured r12.xyz, r5.w, l(12), g0.xyzx\n      iadd r12.xyz, -r9.xyzx, r12.xyzx\n      itof r12.xyz, r12.xyzx\n      dp3 r5.w, r8.xyzx, r12.xyzx\n      ge r6.w, l(0.000000), r5.w\n      or r6.w, r0.z, r6.w\n      lt r7.w, r5.w, r1.w\n      mul r5.w, r5.w, l(63.499989)\n      div r5.w, r5.w, r1.w\n      ftou r5.w, r5.w\n      movc r5.w, r7.w, icb[r5.w + 46].x, l(7)\n      movc r5.w, r6.w, l(0), r5.w\n      iadd r6.w, l(64), -icb[r5.w + 0].w\n      imul null, r12.xyz, r7.xyzx, icb[r5.w + 0].wwww\n      imad r12.xyz, r11.xyzx, r6.wwww, r12.xyzx\n      iadd r12.xyz, r12.xyzx, l(32, 32, 32, 0)\n      ishr r12.xyz, r12.xyzx, l(6)\n      ieq r5.w, r1.y, l(95)\n      imul null, r13.xyz, r12.xyzx, l(31, 31, 31, 0)\n      ishr r14.xyz, r13.xyzx, l(6)\n      ilt r15.xyz, r12.xyzx, l(0, 0, 0, 0)\n      imul null, r12.xyz, r12.xyzx, l(-31, -31, -31, 0)\n      ishr r12.xyz, r12.xyzx, l(5)\n      ineg r12.xyz, r12.xyzx\n      ishr r13.xyz, r13.xyzx, l(5)\n      movc r12.xyz, r15.xyzx, r12.xyzx, r13.xyzx\n      ilt r13.xyz, r12.xyzx, l(0, 0, 0, 0)\n      ineg r15.xyz, r12.xyzx\n      or r15.xyz, r15.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n      movc r12.xyz, r13.xyzx, r15.xyzx, r12.xyzx\n      movc r12.xyz, r5.wwww, r14.xyzx, r12.xyzx\n    else \n      iadd r5.w, r0.y, r4.x\n      ld_structured r13.xyz, r5.w, l(12), g0.xyzx\n      iadd r13.xyz, -r6.xyzx, r13.xyzx\n      itof r13.xyz, r13.xyzx\n      dp3 r5.w, r5.xyzx, r13.xyzx\n      ge r6.w, l(0.000000), r5.w\n      or r6.w, r0.w, r6.w\n      lt r7.w, r5.w, r1.z\n      mul r5.w, r5.w, l(63.499989)\n      div r5.w, r5.w, r1.z\n      ftou r5.w, r5.w\n      movc r5.w, r7.w, icb[r5.w + 46].x, l(7)\n      movc r5.w, r6.w, l(0), r5.w\n      iadd r6.w, l(64), -icb[r5.w + 0].w\n      imul null, r13.xyz, r10.yzwy, icb[r5.w + 0].wwww\n      imad r13.xyz, r4.yzwy, r6.wwww, r13.xyzx\n      iadd r13.xyz, r13.xyzx, l(32, 32, 32, 0)\n      ishr r13.xyz, r13.xyzx, l(6)\n      ieq r5.w, r1.y, l(95)\n      imul null, r14.xyz, r13.xyzx, l(31, 31, 31, 0)\n      ishr r15.xyz, r14.xyzx, l(6)\n      ilt r16.xyz, r13.xyzx, l(0, 0, 0, 0)\n      imul null, r13.xyz, r13.xyzx, l(-31, -31, -31, 0)\n      ishr r13.xyz, r13.xyzx, l(5)\n      ineg r13.xyz, r13.xyzx\n      ishr r14.xyz, r14.xyzx, l(5)\n      movc r13.xyz, r16.xyzx, r13.xyzx, r14.xyzx\n      ilt r14.xyz, r13.xyzx, l(0, 0, 0, 0)\n      ineg r16.xyz, r13.xyzx\n      or r16.xyz, r16.xyzx, l(0x00008000, 0x00008000, 0x00008000, 0)\n      movc r13.xyz, r14.xyzx, r16.xyzx, r13.xyzx\n      movc r12.xyz, r5.wwww, r15.xyzx, r13.xyzx\n    endif \n    and r13.xy, r12.xxxx, l(1023, 0x00007c00, 0, 0)\n    if_nz r13.y\n      ushr r5.w, r12.x, l(10)\n      and r5.w, r5.w, l(31)\n    else \n      if_nz r13.x\n        ishl r6.w, r13.x, l(1)\n        mov r7.w, r6.w\n        mov r5.w, l(0)\n        loop \n          and r8.w, r7.w, l(1024)\n          breakc_nz r8.w\n          iadd r5.w, r5.w, l(-1)\n          ishl r7.w, r7.w, l(1)\n        endloop \n        and r13.x, r7.w, l(1022)\n      else \n        mov r13.x, l(0)\n        mov r5.w, l(-112)\n      endif \n    endif \n    ishl r6.w, r12.x, l(16)\n    and r6.w, r6.w, l(0x80000000)\n    ishl r8.w, r5.w, l(23)\n    iadd r8.w, r8.w, l(0x38000000)\n    or r6.w, r6.w, r8.w\n    ishl r8.w, r13.x, l(13)\n    iadd r13.x, r6.w, r8.w\n    and r12.xw, r12.yyyy, l(1023, 0, 0, 0x00007c00)\n    if_nz r12.w\n      ushr r6.w, r12.y, l(10)\n      and r6.w, r6.w, l(31)\n    else \n      if_nz r12.x\n        ishl r8.w, r12.x, l(1)\n        mov r9.w, r8.w\n        mov r6.w, l(0)\n        loop \n          and r10.x, r9.w, l(1024)\n          breakc_nz r10.x\n          iadd r6.w, r6.w, l(-1)\n          ishl r9.w, r9.w, l(1)\n        endloop \n        and r12.x, r9.w, l(1022)\n      else \n        mov r12.x, l(0)\n        mov r6.w, l(-112)\n      endif \n    endif \n    ishl r8.w, r12.y, l(16)\n    and r8.w, r8.w, l(0x80000000)\n    ishl r10.x, r6.w, l(23)\n    iadd r10.x, r10.x, l(0x38000000)\n    or r8.w, r8.w, r10.x\n    ishl r10.x, r12.x, l(13)\n    iadd r13.y, r8.w, r10.x\n    and r12.xy, r12.zzzz, l(1023, 0x00007c00, 0, 0)\n    if_nz r12.y\n      ushr r8.w, r12.z, l(10)\n      and r8.w, r8.w, l(31)\n    else \n      if_nz r12.x\n        ishl r10.x, r12.x, l(1)\n        mov r11.w, r10.x\n        mov r8.w, l(0)\n        loop \n          and r12.y, r11.w, l(1024)\n          breakc_nz r12.y\n          iadd r8.w, r8.w, l(-1)\n          ishl r11.w, r11.w, l(1)\n        endloop \n        and r12.x, r11.w, l(1022)\n      else \n        mov r12.x, l(0)\n        mov r8.w, l(-112)\n      endif \n    endif \n    ishl r10.x, r12.z, l(16)\n    and r10.x, r10.x, l(0x80000000)\n    ishl r12.y, r8.w, l(23)\n    iadd r12.y, r12.y, l(0x38000000)\n    or r10.x, r10.x, r12.y\n    ishl r12.x, r12.x, l(13)\n    iadd r13.z, r10.x, r12.x\n    iadd r10.x, r0.y, r4.x\n    ld_structured r12.xyz, r10.x, l(24), g0.xyzx\n    add r12.xyz, -r12.xyzx, r13.xyzx\n    dp3 r10.x, r12.xyzx, r12.xyzx\n    add r3.y, r3.y, r10.x\n    iadd r4.x, r4.x, l(1)\n  endloop \n  movc r2.x, r2.w, l(100000002004087730000.000000), r3.y\n  iadd r2.y, cb0[0].w, l(1)\n  store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r2.xyzx\nendif \nif_nz r3.x\n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(16)\n  ld_structured r5.yzw, r0.y, l(40), g0.xxyz\n  lt r0.z, r5.y, r4.x\n  if_nz r0.z\n    ld_structured r5.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r5.xzwx\n  endif \nendif \nif_nz r3.z\n  ld_structured r4.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r5.yzw, r0.y, l(40), g0.xxyz\n  lt r0.z, r5.y, r4.x\n  if_nz r0.z\n    ld_structured r5.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r5.xzwx\n  endif \nendif \nif_nz r3.w\n  ld_structured r3.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r4.yzw, r0.y, l(40), g0.xxyz\n  lt r0.z, r4.y, r3.x\n  if_nz r0.z\n    ld_structured r4.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r4.xzwx\n  endif \nendif \nult r0.yz, r2.zzzz, l(0, 2, 1, 0)\nif_nz r0.y\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r3.yzw, r0.y, l(40), g0.xxyz\n  lt r0.w, r3.y, r2.x\n  if_nz r0.w\n    ld_structured r3.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r3.xzwx\n  endif \nendif \nif_nz r0.z\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r3.yzw, r0.y, l(40), g0.xxyz\n  lt r0.z, r3.y, r2.x\n  if_nz r0.z\n    ld_structured r3.x, r0.y, l(40), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(40), r3.xzwx\n  endif \n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(40), g0.xxxx\n  lt r0.y, r2.x, r1.x\n  if_nz r0.y\n    ld_structured r1.xyz, vThreadIDInGroupFlattened.x, l(40), g0.xyzx\n    mov r1.w, l(0)\n  else \n    ld_structured r1.xyzw, r0.x, l(0), t1.xyzw\n  endif \n  store_structured u0.xyzw, r0.x, l(0), r1.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC6HEncode_TryModeLE10CS[] =\n{\n     68,  88,  66,  67, 191,  79, \n    190,  54, 160, 248,   4, 120, \n    116, 121, 130, 112,  95, 120, \n    188,  77,   1,   0,   0,   0, \n     32,  97,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88, 204,  96,   0,   0, \n     64,   0,   5,   0,  51,  24, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0, 186,   1, \n      0,   0, 204, 204,   0,   0, \n     15,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n    136, 136,   0,   0,  15,   0, \n      0,   0, 255, 255, 255, 255, \n      9,   0,   0,   0, 238, 238, \n      0,   0,  15,   0,   0,   0, \n    255, 255, 255, 255,  18,   0, \n      0,   0, 200, 236,   0,   0, \n     15,   0,   0,   0, 255, 255, \n    255, 255,  27,   0,   0,   0, \n    128, 200,   0,   0,  15,   0, \n      0,   0, 255, 255, 255, 255, \n     37,   0,   0,   0, 236, 254, \n      0,   0,  15,   0,   0,   0, \n    255, 255, 255, 255,  46,   0, \n      0,   0, 200, 254,   0,   0, \n     15,   0,   0,   0, 255, 255, \n    255, 255,  55,   0,   0,   0, \n    128, 236,   0,   0,  15,   0, \n      0,   0, 255, 255, 255, 255, \n     64,   0,   0,   0,   0, 200, \n      0,   0,  15,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0, 236, 255,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    128, 254,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0, 232, \n      0,   0,  15,   0,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0, 232, 255,   0,   0, \n     15,   0,   0,   0, 255, 255, \n    255, 255,   0,   0,   0,   0, \n      0, 255,   0,   0,  15,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0, 240, 255, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0, 240,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     16, 247,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 142,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0, 113,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    206,   8,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 140,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  16, 115,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  49,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 206, 140, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 140,   8,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     16,  49,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 102, 102, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 108,  54,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    232,  23,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 240,  15, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 142, 113,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    156,  57,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   7,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n     11,   0,   0,   0,   5,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,  11,   0, \n      0,   0,   4,   0,   0,   0, \n      5,   0,   0,   0,   4,   0, \n      0,   0,  11,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   5,   0,   0,   0, \n      9,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      5,   0,   0,   0,   8,   0, \n      0,   0,   6,   0,   0,   0, \n      5,   0,   0,   0,   5,   0, \n      0,   0,   8,   0,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,   5,   0,   0,   0, \n      8,   0,   0,   0,   5,   0, \n      0,   0,   5,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n     10,   0,   0,   0,  10,   0, \n      0,   0,  10,   0,   0,   0, \n     11,   0,   0,   0,   9,   0, \n      0,   0,   9,   0,   0,   0, \n      9,   0,   0,   0,  12,   0, \n      0,   0,   8,   0,   0,   0, \n      8,   0,   0,   0,   8,   0, \n      0,   0,  16,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  89,   0, \n      0,   4,  70, 142,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  88,  24,   0,   4, \n      0, 112,  16,   0,   0,   0, \n      0,   0,  85,  85,   0,   0, \n    162,   0,   0,   4,   0, 112, \n     16,   0,   1,   0,   0,   0, \n     16,   0,   0,   0, 158,   0, \n      0,   4,   0, 224,  17,   0, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  95,   0,   0,   2, \n      0,  64,   2,   0,  95,   0, \n      0,   2,  18,  16,   2,   0, \n    104,   0,   0,   2,  25,   0, \n      0,   0, 105,   0,   0,   4, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   4,   0,   0,   0, \n    105,   0,   0,   4,   1,   0, \n      0,   0,   2,   0,   0,   0, \n      4,   0,   0,   0, 160,   0, \n      0,   5,   0, 240,  17,   0, \n      0,   0,   0,   0,  84,   0, \n      0,   0,  64,   0,   0,   0, \n    155,   0,   0,   4,  64,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   6,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  16, \n      2,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   8,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 128,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  80,   0, \n      0,   8,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     62,   0,   0,   1,  21,   0, \n      0,   1, 167,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n      6, 112,  16,   0,   1,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 189,  55, 134,  53, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 126, \n     16,   0,   1,   0,   0,   0, \n    168,   0,   0,   9, 242, 224, \n     17,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     62,   0,   0,   1,  21,   0, \n      0,   1,   1,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n     79,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n     16,   0,   0,   0,  32,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      3,   0,   0,   0,  78,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,   0, 208, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  26, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  35,   0, \n      0,  11, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16, 128,  65,   0,   0,   0, \n      0,   0,   0,   0,  26, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   8, 194,   0, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  45,   0,   0,   7, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,  70, 126, \n     16,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 226,   0, \n     16,   0,   1,   0,   0,   0, \n      6,   9,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,  10, 226,   0,  16,   0, \n      1,   0,   0,   0,  86,  14, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   5,   0, \n      0,   0,   6,   5,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 127, \n    255, 255, 127,   0, 255, 255, \n    255, 127, 255, 255, 127,   0, \n     79,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 239, 255,  71, 255, 239, \n    255,  71,   6,   8,  16,   0, \n      5,   0,   0,   0,  79,   0, \n      0,  10,  50,   0,  16,   0, \n      4,   0,   0,   0, 134,   0, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n    128,  56,   0,   0, 128,  56, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     50,   0,  16,   0,   6,   0, \n      0,   0, 134,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,  11,  50,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   0,  16, 128,  65,   0, \n      0,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 113,   0, \n      0,   0, 113,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,  10, \n    162,   0,  16,   0,   5,   0, \n      0,   0,  86,  13,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 128,   0,   0,   0, \n      0,   0,   0,   0, 128,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  85,   0, \n      0,   7,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  30,   0,   0,  10, \n     50,   0,  16,   0,   5,   0, \n      0,   0, 134,   0,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0, 200, \n      0,   0,   0, 200,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      7,   0,   0,   0,  70,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,  10,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    255,  15,   0,   0, 255,  15, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      5,   0,   0,   0,  85,   0, \n      0,   7,  50,   0,  16,   0, \n      4,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,   1,   0,   0,  10, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  12, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166,  14,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   6,   4, \n     16,   0,   4,   0,   0,   0, \n     30,   0,   0,   7,  50,   0, \n     16,   0,   5,   0,   0,   0, \n    150,   5,  16,   0,   1,   0, \n      0,   0, 230,  10,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0, 166,  10, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    255, 255, 255, 127, 255, 255, \n    127,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 239, 255,  71,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0, 128,  56,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,   8, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16, 128, \n     65,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    113,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n    128,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 200,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 255,  15, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 127,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 127, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   4,   0, \n      0,   0,   6,   5,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255,   3,   0,   0, \n      0, 124,   0,   0, 255,   3, \n      0,   0,   0, 124,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  18,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  48,   0,   0,   1, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   4,   0,   0,   3,   0, \n      4,   3,  42,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 254,   3, \n      0,   0,  18,   0,   0,   1, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    144, 255, 255, 255,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     41,   0,   0,   7, 226,   0, \n     16,   0,   1,   0,   0,   0, \n      6,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,  10, 226,   0,  16,   0, \n      1,   0,   0,   0,  86,  14, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0, 128,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      4,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 144, 255, \n    255, 255,  21,   0,   0,   1, \n     21,   0,   0,   1,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  56, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166,  10,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 255,   3,   0,   0, \n      0, 124,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   8, 194,   0,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 144, 255, 255, 255, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  16,   0, \n      0,  10, 130,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 208, 179, \n     89,  62,  89,  23,  55,  63, \n    152, 221, 147,  61,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  32,   0, \n      0,   8,  66,   0,  16,   0, \n      0,   0,   0,   0,  42, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  95,   0,   0,   0, \n     41,   0,   0,   7, 226,   0, \n     16,   0,   1,   0,   0,   0, \n      6,   9,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  78,   0, \n      0,  11, 226,   0,  16,   0, \n      1,   0,   0,   0,   0, 208, \n      0,   0,  86,  14,  16,   0, \n      1,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     79,   0,   0,  10, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0, 255, 123, \n      0,   0, 255, 123,   0,   0, \n    255, 123,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   7,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 224, 255,  15,   0, \n    224, 255,  15,   0, 224, 255, \n     15,   0,   0,   0,   0,   0, \n     78,   0,   0,  11, 114,   0, \n     16,   0,   5,   0,   0,   0, \n      0, 208,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n     31,   0,   0,   0,   0,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   1, 128, \n    255, 255,   1, 128, 255, 255, \n      1, 128, 255, 255,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      1,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     86,  14,  16,   0,   1,   0, \n      0,   0,   6,   9,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     12,   0,   0,   0, 150,   7, \n     16,   0,   1,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 127, 127,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 127, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 127, 127,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 127, 255,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   8, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 144, 144,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  48,  32,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     49,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,  48, \n     32,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  49,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  48,  32,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      1,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,  48, \n     32,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  21,   0,   0,   1, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  54,   0,   0,   6, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  40,   0,   0,   5, \n     50,   0,  16,   0,   5,   0, \n      0,   0, 230,  10,  16,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5,  66,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  43,   0, \n      0,   5, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     16,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,  16,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  49,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     29,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  28,   0, \n      0,   5, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0, 246,  15,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,   6,   0,   0,   0, \n    246,  15,  16,   0,   1,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0, 230,  10, \n     16,   0,   0,   0,   0,   0, \n     55,   0,   0,   9,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,   7,   0,   0,   0, \n    246,  15,  16,   0,   1,   0, \n      0,   0, 230,  10,  16,   0, \n      0,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n     55,   0,   0,   9,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     40,   0,   0,   5,  50,   0, \n     16,   0,   8,   0,   0,   0, \n    230,  10,  16,   0,   0,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  16,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   8, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  26, 144, \n    144,   0,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  16,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  49,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     29,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  28,   0, \n      0,   5, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16, 128,  65,   0,   0,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,   9,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0,  70,   0,  16,   0, \n      4,   0,   0,   0, 230,  10, \n     16,   0,   0,   0,   0,   0, \n     55,   0,   0,   9,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,  10,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0, 230,  10,  16,   0, \n      0,   0,   0,   0,  70,   0, \n     16,   0,   4,   0,   0,   0, \n     55,   0,   0,   9,  66,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     32,   0,   0,  11, 194,   0, \n     16,   0,   0,   0,   0,   0, \n    166, 138,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     95,   0,   0,   0,  96,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,   9, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10, 144, 208,   0, \n     32,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   4,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n     11,   0,   0,   0, 246,  15, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   9,  34,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   9, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   9, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0, 246,  15, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  60,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   9, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   9, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   6, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  58, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,   9, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10, 144, 208,   0, \n     32,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,  14,   0,   0,   0, \n    246,  15,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0, 246,  15, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     18,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   9,  34,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  10, 144, 208,   0, \n     32,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0, 246,  15,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0, 246,  15,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     22,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  23,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,   8,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16, 128,  65,   0, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  22,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  23,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     17,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0, 246,  15, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  60,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0,   0,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0, 246,  15, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0, 246,  15, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     32,   0,   0,  10, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,  10, 114,   0,  16,   0, \n     22,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      2,  64,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n    255, 127,   0,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  22,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   8, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      1,   0,   0,   0,  58, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0, 166, 154, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,  10, 114,   0,  16,   0, \n     10,   0,   0,   0, 166, 154, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  55,   0, \n      0,  10, 114,   0,  16,   0, \n     11,   0,   0,   0, 166, 154, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  31,   0,   4,   4, \n     42, 144, 144,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     33,   0,   0,  10, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   0,   0,   0,   0, \n    150, 151, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     14,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,  14,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n     13,   0,   0,   0,  33,   0, \n      0,   7, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  34,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n     16,   0,   0,   0,  10,   0, \n     16,   0,  16,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,  16,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   9,  18,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   9,  34,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     26, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   9,  66,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     42, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   9, 130,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     58, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n     16,   0,   0,   0,  70,  14, \n     16,   0,  16,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   1,   0,   0,   7, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   6,   0, \n     16,   0,  16,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,   0, \n      0,   7, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n    150,   7,  16,   0,  16,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     33,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     34,   0,   0,   7, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,  22,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  23,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  34,   0,   0,   7, \n    114,   0,  16,   0,  23,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  23,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  24,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     22,   0,   0,   0,  70,   2, \n     16,   0,  23,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     24,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0, 150,   7, \n     16,   0,  16,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  19,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  22,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      1,   0,   0,   7, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0, 150,   7,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  23,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  18,   0, \n      0,   1,  41,   0,   0,   9, \n     34,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  10, 144, \n    208,   0,  32,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n      1,   0,   0,   7, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   1,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0,  86,   5, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  86,   5,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      1,   0,   0,   7, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     21,   0,   0,   1,  30,   0, \n      0,  12, 242,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n     70, 158, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,   0,   0,   7, \n    226,   0,  16,   0,   4,   0, \n      0,   0,   6,   0,  16,   0, \n      7,   0,   0,   0,   6,   9, \n     16,   0,  17,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   1,   0, \n      0,   7, 114,   0,  16,   0, \n     11,   0,   0,   0,   6,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,  11,   0, \n      0,   0,   6,   0,  16, 128, \n     65,   0,   0,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      4,   0,   0,   0,  86,  14, \n     16,   0,   4,   0,   0,   0, \n      6,   9,  16,   0,  11,   0, \n      0,   0,   6,   9,  16,   0, \n     17,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      4,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     86,  14,  16,   0,   4,   0, \n      0,   0,   6,   9,  16,   0, \n     17,   0,   0,   0,  60,   0, \n      0,   8, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42, 144, 144,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n    150,   7,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   1,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0, 150,   7, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,   8, \n    114,   0,  16,   0,  15,   0, \n      0,   0, 150,   7,  16, 128, \n     65,   0,   0,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   1,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0, 150,   7, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,  15,   0, \n      0,   0, 150,   7,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,  15,   0,   0,   0, \n    150,   7,  16, 128,  65,   0, \n      0,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  12,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   1,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0, 150,   7,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,   0,   0,   7, 226,   0, \n     16,   0,  10,   0,   0,   0, \n     86,  14,  16,   0,  10,   0, \n      0,   0,   6,   9,  16,   0, \n     14,   0,   0,   0,  30,   0, \n      0,   8, 114,   0,  16,   0, \n      7,   0,   0,   0, 150,   7, \n     16, 128,  65,   0,   0,   0, \n      7,   0,   0,   0, 150,   7, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,   7,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     30,   0,   0,   7, 226,   0, \n     16,   0,  10,   0,   0,   0, \n     86,  14,  16,   0,   4,   0, \n      0,   0,   6,   9,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,  10, 226,   0,  16,   0, \n     10,   0,   0,   0, 166, 154, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  86,  14, \n     16,   0,  10,   0,   0,   0, \n      6,   9,  16,   0,  11,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  11,   0, \n      0,   0, 150,   7,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     55,   0,   0,  10, 114,   0, \n     16,   0,  11,   0,   0,   0, \n    166, 154, 144,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0, 150,   7, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  55,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0, 166, 154, 144,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     79,   0,   0,  12,  50,   0, \n     16,   0,  12,   0,   0,   0, \n      6, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   2,  64, \n      0,   0,  15,   0,   0,   0, \n     16,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     41,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  10, 144, 208,   0, \n     32,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  32,   0, \n      0,   7, 114,   0,  16,   0, \n     13,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n    150,   7,  16,   0,   4,   0, \n      0,   0,  32,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0, 150,   7, \n     16,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n    150,   7,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     16,   0,   0,   0, 150,   7, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   2,  64, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0, 150,   7, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     14,   0,   0,   0, 150,   7, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,   6,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0, 150,   7,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,   6,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0, 150,   7,  16,   0, \n     10,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n     15,   0,   0,   0, 150,   7, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  16,   0, \n      0,   0, 150,   7,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     36,   0,   0,   8, 114,   0, \n     16,   0,  17,   0,   0,   0, \n    150,   7,  16, 128,  65,   0, \n      0,   0,   4,   0,   0,   0, \n    150,   7,  16,   0,   4,   0, \n      0,   0,  36,   0,   0,   8, \n    114,   0,  16,   0,  18,   0, \n      0,   0, 150,   7,  16, 128, \n     65,   0,   0,   0,  10,   0, \n      0,   0, 150,   7,  16,   0, \n     10,   0,   0,   0,  33,   0, \n      0,   7, 114,   0,  16,   0, \n     19,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n      6,   0,  16,   0,  10,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,   6,   0, \n     16,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     22,   0,   0,   0,  70,   2, \n     16,   0,  18,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,  64,   0,   0,   0,  64, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  22,   0,   0,   0, \n     70,   2,  16,   0,  22,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  22,   0, \n      0,   0,  70,   2,  16,   0, \n     22,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  22,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      4,   0,   0,   0,  86,   5, \n     16,   0,  12,   0,   0,   0, \n      6,   9,  16,   0,  15,   0, \n      0,   0,  86,  14,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n     10,   0,   0,   0,  86,   5, \n     16,   0,  12,   0,   0,   0, \n      6,   9,  16,   0,  16,   0, \n      0,   0,  86,  14,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      4,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      6,   9,  16,   0,  13,   0, \n      0,   0,  86,  14,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n     10,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      6,   9,  16,   0,  14,   0, \n      0,   0,  86,  14,  16,   0, \n     10,   0,   0,   0,  32,   0, \n      0,   7, 114,   0,  16,   0, \n     13,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  32,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,   2,  64, \n      0,   0,   0, 128,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   9, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n     10, 144, 208,   0,  32,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     15,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n      0,   0, 255, 255,   0,   0, \n    255, 255,   0,   0,   0,   0, \n      0,   0,  70,   2,  16,   0, \n     16,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,   6,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 210,   0,  16,   0, \n     12,   0,   0,   0,   6,   0, \n     16,   0,  12,   0,   0,   0, \n      6,   9,  16,   0,  14,   0, \n      0,   0,   6,   9,  16,   0, \n      7,   0,   0,   0,  33,   0, \n      0,  10, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,  10, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     36,   0,   0,   8, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  36,   0,   0,   8, \n    114,   0,  16,   0,  17,   0, \n      0,   0,  70,   2,  16, 128, \n     65,   0,   0,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  33,   0, \n      0,   7, 114,   0,  16,   0, \n     18,   0,   0,   0,  70,   2, \n     16,   0,  16,   0,   0,   0, \n      6,   0,  16,   0,  10,   0, \n      0,   0,  33,   0,   0,   7, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0,   6,   0, \n     16,   0,  10,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n      1,  64,   0,   0,  15,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   2,  64, \n      0,   0,   0,  64,   0,   0, \n      0,  64,   0,   0,   0,  64, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  64,   0,   0,   0,  64, \n      0,   0,   0,  64,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 127,   0,   0, 255, 127, \n      0,   0, 255, 127,   0,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,  12, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  86,   5, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  86,   5, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n    134,   3,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  29,   0, \n      0,  10, 194,   0,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    246,  11,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  42, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  85,   0,   0,   8, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  10, 144, 144,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  16,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  29,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  49,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  28,   0, \n      0,   5, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     55,   0,   0,  11, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  10, 144, 208,   0, \n     46,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  58, 144, \n    144, 128,  65,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  38,   0,   0,   9, \n      0, 208,   0,   0, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0, 246, 159, 144,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  35,   0,   0,   9, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0, 246,  15, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  32,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  95,   0, \n      0,   0,  38,   0,   0,  11, \n      0, 208,   0,   0, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n     31,   0,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  34,   0,   0,  10, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     38,   0,   0,  11,   0, 208, \n      0,   0, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n      2,  64,   0,   0, 225, 255, \n    255, 255, 225, 255, 255, 255, \n    225, 255, 255, 255,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     34,   0,   0,  10, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     60,   0,   0,  10, 114,   0, \n     16,   0,  15,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0, 246,  15, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  18,   0, \n      0,   1,  30,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  43,   0,   0,   5, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  16,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  29,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  49,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  28,   0, \n      0,   5, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     55,   0,   0,  11, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  10, 144, 208,   0, \n     46,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  58, 144, \n    144, 128,  65,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  38,   0,   0,   9, \n      0, 208,   0,   0, 114,   0, \n     16,   0,  13,   0,   0,   0, \n    150,   7,  16,   0,  10,   0, \n      0,   0, 246, 159, 144,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  35,   0,   0,   9, \n    114,   0,  16,   0,  13,   0, \n      0,   0, 150,   7,  16,   0, \n      4,   0,   0,   0, 246,  15, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,   0,   0,   0,   0, \n     42,   0,   0,   7, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  32,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  95,   0, \n      0,   0,  38,   0,   0,  11, \n      0, 208,   0,   0, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n     31,   0,   0,   0,  31,   0, \n      0,   0,  31,   0,   0,   0, \n      0,   0,   0,   0,  42,   0, \n      0,   7, 114,   0,  16,   0, \n     15,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  34,   0,   0,  10, \n    114,   0,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     38,   0,   0,  11,   0, 208, \n      0,   0, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      2,  64,   0,   0, 225, 255, \n    255, 255, 225, 255, 255, 255, \n    225, 255, 255, 255,   0,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     40,   0,   0,   5, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  42,   0,   0,   7, \n    114,   0,  16,   0,  14,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     55,   0,   0,   9, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     34,   0,   0,  10, 114,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  40,   0, \n      0,   5, 114,   0,  16,   0, \n     16,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     60,   0,   0,  10, 114,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 128,   0,   0,   0, 128, \n      0,   0,   0, 128,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  14,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     12,   0,   0,   0, 246,  15, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,  21,   0, \n      0,   1,   1,   0,   0,  10, \n     50,   0,  16,   0,  13,   0, \n      0,   0,   6,   0,  16,   0, \n     12,   0,   0,   0,   2,  64, \n      0,   0, 255,   3,   0,   0, \n      0, 124,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,  13,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  18,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,  13,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,  13,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  48,   0,   0,   1, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   4,   0,   0,   3,   0, \n      4,   3,  58,   0,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0, 255, 255, \n    255, 255,  41,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,   1,   0, \n      0,   7,  18,   0,  16,   0, \n     13,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0, 254,   3, \n      0,   0,  18,   0,   0,   1, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    144, 255, 255, 255,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0, 128,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,  56,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,   1,   0, \n      0,  10, 146,   0,  16,   0, \n     12,   0,   0,   0,  86,   5, \n     16,   0,  12,   0,   0,   0, \n      2,  64,   0,   0, 255,   3, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0, 124, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,  12,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  18,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,  12,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,   1,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   0,   4,   0,   0, \n      3,   0,   4,   3,  10,   0, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n      1,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n    254,   3,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   5, \n     18,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0, 144, 255, 255, 255, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0, 128,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  56, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n      1,   0,   0,  10,  50,   0, \n     16,   0,  12,   0,   0,   0, \n    166,  10,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   3,   0,   0,   0, 124, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n     12,   0,   0,   0,  85,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,  10,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  10,   0,  16,   0, \n     12,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,  11,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,   1,   0, \n      0,   7,  34,   0,  16,   0, \n     12,   0,   0,   0,  58,   0, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,   0,   4, \n      0,   0,   3,   0,   4,   3, \n     26,   0,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     41,   0,   0,   7, 130,   0, \n     16,   0,  11,   0,   0,   0, \n     58,   0,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,   1,   0,   0,   7, \n     18,   0,  16,   0,  12,   0, \n      0,   0,  58,   0,  16,   0, \n     11,   0,   0,   0,   1,  64, \n      0,   0, 254,   3,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  18,   0,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0, 144, 255, \n    255, 255,  21,   0,   0,   1, \n     21,   0,   0,   1,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0, 128, \n     41,   0,   0,   7,  34,   0, \n     16,   0,  12,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n     12,   0,   0,   0,  26,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,  56,  60,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,  12,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     10,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n     13,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n      0,   0,   0,   8, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  16,   0,   0,   7, \n     18,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n      0,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     55,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    236, 120, 173,  96,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     30,   0,   0,   8,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0, 167,   0, \n      0,   9, 226,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,   6, 249,  17,   0, \n      0,   0,   0,   0,  49,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n    114, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0, 134,   3,  16,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   3,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n    134,   3,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      3,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 226,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 249, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0, 134,   3, \n     16,   0,   4,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  79,   0,   0,  10, \n     98,   0,  16,   0,   0,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0,  49,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  40,   0,   0,   0, \n    134,   3,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 226,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 249, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  40,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8, 114, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0, 134,   3, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     49,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 114,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     40,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 126, \n     16,   0,   1,   0,   0,   0, \n     21,   0,   0,   1, 168,   0, \n      0,   9, 242, 224,  17,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1,  62,   0,   0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC7Encode_EncodeBlockCS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 0x0000cccc, -0.000000, 15, 0},\n                              { 0x00008888, 65981199646559862000000000.000000, 15, 0},\n                              { 0x0000eeee, 15358528172589056.000000, 15, 0},\n                              { 0x0000ecc8, 3584194248704.000000, 15, 0},\n                              { 0x0000c880, -0.000000, 15, 0},\n                              { 0x0000feec, -0.000000, 15, 0},\n                              { 0x0000fec8, 14680365989888.000000, 15, 0},\n                              { 0x0000ec80, 15362462362632192.000000, 15, 0},\n                              { 0x0000c800, -0.000000, 15, 0},\n                              { 0x0000ffec, -0.000000, 15, 0},\n                              { 0x0000fe80, -0.000000, 15, 0},\n                              { 0x0000e800, -0.000000, 15, 0},\n                              { 0x0000ffe8, -0.000000, 15, 0},\n                              { 0x0000ff00, -0.000000, 15, 0},\n                              { 0x0000fff0, -0.000000, 15, 0},\n                              { 0x0000f000, 0.000000, 15, 0},\n                              { 0x0000f710, -0.000000, 15, 0},\n                              { 142, 0.000000, 2, 0},\n                              { 0x00007100, -0.000000, 8, 0},\n                              { 2254, 22076467445760.000000, 2, 0},\n                              { 140, -0.000000, 2, 0},\n                              { 0x00007310, 70798013459086900000000000.000000, 8, 0},\n                              { 0x00003100, -0.000000, 8, 0},\n                              { 0x00008cce, 0.000000, 15, 0},\n                              { 2188, 0x0050a4a4, 2, 0},\n                              { 0x00003110, -0.000000, 8, 0},\n                              { 0x00006666, 0.000000, 2, 0},\n                              { 0x0000366c, 17610885206241624000000000.000000, 2, 0},\n                              { 6120, -0.000000, 8, 0},\n                              { 4080, -0.000000, 8, 0},\n                              { 0x0000718e, 22097854464.000000, 2, 0},\n                              { 0x0000399c, 65888818352238725000000000.000000, 2, 0},\n                              { 0x0000aaaa, -0.000000, 15, 0},\n                              { 0x0000f0f0, 19411582976.000000, 15, 0},\n                              { 0x00005a5a, -0.000000, 6, 0},\n                              { 0x000033cc, 0.000000, 8, 0},\n                              { 0x00003c3c, 0.000000, 2, 0},\n                              { 0x000055aa, 0.000000, 8, 0},\n                              { 0x00009696, 0.000000, 15, 0},\n                              { 0x0000a55a, 22151331840.000000, 15, 0},\n                              { 0x000073ce, 9304358912.000000, 2, 0},\n                              { 5064, -0.000000, 8, 0},\n                              { 0x0000324c, 271536072765004600000000.000000, 2, 0},\n                              { 0x00003bdc, -0.000000, 2, 0},\n                              { 0x00006996, 21517107200.000000, 2, 0},\n                              { 0x0000c33c, 12724757752857623000000000.000000, 15, 0},\n                              { 0x00009966, 1365.320801, 15, 0},\n                              { 1632, 272006464738884190000000.000000, 6, 0},\n                              { 626, -0.000000, 6, 0},\n                              { 1252, 5783798415360.000000, 2, 0},\n                              { 0x00004e40, -0.000000, 6, 0},\n                              { 0x00002720, -0.000000, 8, 0},\n                              { 0x0000c936, -0.000000, 15, 0},\n                              { 0x0000936c, -0.000000, 15, 0},\n                              { 0x000039c6, -0.000000, 2, 0},\n                              { 0x0000639c, -0.000000, 2, 0},\n                              { 0x00009336, -0.000000, 15, 0},\n                              { 0x00009cc6, -0.000000, 15, 0},\n                              { 0x0000817e, -0.000000, 15, 0},\n                              { 0x0000e718, -0.000000, 15, 0},\n                              { 0x0000ccf0, 4.007874, 15, 0},\n                              { 4044, -0.000000, 2, 0},\n                              { 0x00007744, -0.000000, 2, 0},\n                              { 0x0000ee22, 0.000000, 15, 0},\n                              { 0, 0, 3, 15},\n                              { 0, 0, 3, 8},\n                              { 0, 0, 15, 8},\n                              { 1, 0, 15, 3},\n                              { 1, 0, 8, 15},\n                              { 1, 0, 3, 15},\n                              { 1, 0, 15, 3},\n                              { 2, 0, 15, 8},\n                              { 2, 0, 8, 15},\n                              { 2, 0, 8, 15},\n                              { 2, 0, 6, 15},\n                              { 2, 0, 6, 15},\n                              { 3, 0, 6, 15},\n                              { 3, 0, 5, 15},\n                              { 3, 0, 3, 15},\n                              { 3, 0, 3, 8},\n                              { 4, 0, 3, 15},\n                              { 4, 0, 3, 8},\n                              { 4, 0, 8, 15},\n                              { 4, 0, 15, 3},\n                              { 5, 0, 3, 15},\n                              { 5, 0, 3, 8},\n                              { 5, 0, 6, 15},\n                              { 5, 0, 10, 8},\n                              { 6, 0, 5, 3},\n                              { 6, 0, 8, 15},\n                              { 6, 0, 8, 6},\n                              { 6, 0, 6, 10},\n                              { 6, 0, 8, 15},\n                              { 7, 0, 5, 15},\n                              { 7, 0, 15, 10},\n                              { 7, 0, 15, 8},\n                              { 7, 0, 8, 15},\n                              { 8, 0, 15, 3},\n                              { 8, 0, 3, 15},\n                              { 8, 0, 5, 10},\n                              { 8, 0, 6, 10},\n                              { 9, 0, 10, 8},\n                              { 9, 0, 8, 9},\n                              { 9, 0, 15, 10},\n                              { 9, 0, 15, 6},\n                              { 10, 0, 3, 15},\n                              { 10, 0, 15, 8},\n                              { 10, 0, 5, 15},\n                              { 10, 0, 15, 3},\n                              { 10, 0, 15, 6},\n                              { 11, 0, 15, 6},\n                              { 11, 0, 15, 8},\n                              { 11, 0, 3, 15},\n                              { 11, 0, 15, 3},\n                              { 12, 0, 5, 15},\n                              { 12, 0, 5, 15},\n                              { 12, 0, 5, 15},\n                              { 12, 0, 8, 15},\n                              { 13, 0, 5, 15},\n                              { 13, 0, 10, 15},\n                              { 13, 0, 5, 15},\n                              { 13, 0, 10, 15},\n                              { 14, 0, 8, 15},\n                              { 14, 0, 13, 15},\n                              { 14, 0, 15, 3},\n                              { 14, 0, 12, 15},\n                              { 15, 0, 3, 15},\n                              { 15, 0, 3, 8},\n                              { 0, 15, 0, 0},\n                              { 0, 15, 0, 0},\n                              { 0, 15, 0, 0},\n                              { 0, 15, 0, 0},\n                              { 0, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 1, 15, 0, 0},\n                              { 2, 15, 0, 0},\n                              { 2, 15, 0, 0},\n                              { 2, 15, 0, 0},\n                              { 2, 2, 0, 0},\n                              { 2, 8, 0, 0},\n                              { 2, 2, 0, 0},\n                              { 2, 2, 0, 0},\n                              { 2, 8, 0, 0},\n                              { 2, 8, 0, 0},\n                              { 3, 15, 0, 0},\n                              { 3, 2, 0, 0},\n                              { 3, 8, 0, 0},\n                              { 3, 2, 0, 0},\n                              { 3, 2, 0, 0},\n                              { 3, 8, 0, 0},\n                              { 3, 8, 0, 0},\n                              { 3, 2, 0, 0},\n                              { 3, 2, 0, 0},\n                              { 3, 15, 0, 0},\n                              { 4, 15, 0, 0},\n                              { 4, 6, 0, 0},\n                              { 4, 8, 0, 0},\n                              { 4, 2, 0, 0},\n                              { 4, 8, 0, 0},\n                              { 4, 15, 0, 0},\n                              { 4, 15, 0, 0},\n                              { 4, 2, 0, 0},\n                              { 4, 8, 0, 0},\n                              { 5, 2, 0, 0},\n                              { 5, 2, 0, 0},\n                              { 5, 2, 0, 0},\n                              { 5, 15, 0, 0},\n                              { 5, 15, 0, 0},\n                              { 5, 6, 0, 0},\n                              { 5, 6, 0, 0},\n                              { 5, 2, 0, 0},\n                              { 5, 6, 0, 0},\n                              { 6, 8, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 6, 2, 0, 0},\n                              { 6, 2, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 6, 15, 0, 0},\n                              { 7, 15, 0, 0},\n                              { 7, 2, 0, 0},\n                              { 7, 2, 0, 0},\n                              { 7, 15, 0, 0},\n                              { 0, 3, 15, 0},\n                              { 0, 3, 8, 0},\n                              { 0, 8, 15, 0},\n                              { 0, 3, 15, 0},\n                              { 0, 8, 15, 0},\n                              { 0, 3, 15, 0},\n                              { 0, 3, 15, 0},\n                              { 0, 8, 15, 0},\n                              { 0, 8, 15, 0},\n                              { 0, 8, 15, 0},\n                              { 0, 6, 15, 0},\n                              { 1, 6, 15, 0},\n                              { 1, 6, 15, 0},\n                              { 1, 5, 15, 0},\n                              { 1, 3, 15, 0},\n                              { 1, 3, 8, 0},\n                              { 1, 3, 15, 0},\n                              { 1, 3, 8, 0},\n                              { 1, 8, 15, 0},\n                              { 1, 3, 15, 0},\n                              { 1, 3, 15, 0},\n                              { 1, 3, 8, 0},\n                              { 1, 6, 15, 0},\n                              { 1, 8, 10, 0},\n                              { 1, 3, 5, 0},\n                              { 1, 8, 15, 0},\n                              { 1, 6, 8, 0},\n                              { 1, 6, 10, 0},\n                              { 1, 8, 15, 0},\n                              { 1, 5, 15, 0},\n                              { 1, 10, 15, 0},\n                              { 1, 8, 15, 0},\n                              { 1, 8, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 5, 10, 0},\n                              { 2, 6, 10, 0},\n                              { 2, 8, 10, 0},\n                              { 2, 8, 9, 0},\n                              { 2, 10, 15, 0},\n                              { 2, 6, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 8, 15, 0},\n                              { 2, 5, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 6, 15, 0},\n                              { 2, 6, 15, 0},\n                              { 2, 8, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 3, 15, 0},\n                              { 2, 5, 15, 0},\n                              { 2, 5, 15, 0},\n                              { 2, 5, 15, 0},\n                              { 2, 8, 15, 0},\n                              { 3, 5, 15, 0},\n                              { 3, 10, 15, 0},\n                              { 3, 5, 15, 0},\n                              { 3, 10, 15, 0},\n                              { 3, 8, 15, 0},\n                              { 3, 13, 15, 0},\n                              { 3, 3, 15, 0},\n                              { 3, 12, 15, 0},\n                              { 3, 3, 15, 0},\n                              { 3, 3, 8, 0} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_resource_structured t1, 16 \ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 15\ndcl_tgsm_structured g0, 100, 64\ndcl_thread_group 64, 1, 1\nushr r0.x, vThreadIDInGroupFlattened.x, l(4)\nishl r0.y, vThreadGroupID.x, l(2)\niadd r0.y, r0.y, cb0[1].x\niadd r0.x, r0.x, r0.y\nuge r0.y, r0.x, cb0[1].y\nif_nz r0.y\n  ret \nendif \nand r0.y, vThreadIDInGroupFlattened.x, l(48)\niadd r0.z, -r0.y, vThreadIDInGroupFlattened.x\nld_structured r1.xyz, r0.x, l(4), t1.xyzx\nand r0.w, r1.x, l(0x7fffffff)\nld_structured r2.x, r0.x, l(4), t1.xxxx\nushr r1.x, r2.x, l(31)\nult r2.xyzw, r0.zzzz, l(16, 8, 4, 2)\nif_nz r2.x\n  udiv r1.w, null, r0.x, cb0[0].y\n  imad r3.x, -r1.w, cb0[0].y, r0.x\n  ishl r3.x, r3.x, l(2)\n  ishl r1.w, r1.w, l(2)\n  and r3.y, r0.z, l(3)\n  iadd r3.x, r3.y, r3.x\n  ushr r4.x, r0.z, l(2)\n  iadd r3.y, r1.w, r4.x\n  mov r3.zw, l(0,0,0,0)\n  ld r3.xyzw, r3.xyzw, t0.xyzw\n  mul r3.xyzw, r3.xyzw, l(255.000000, 255.000000, 255.000000, 255.000000)\n  ftou r3.xyzw, r3.xyzw\n  umin r3.xyzw, r3.xyzw, l(255, 255, 255, 255)\n  ieq r4.xy, r0.wwww, l(4, 5, 0, 0)\n  or r1.w, r4.y, r4.x\n  ieq r4.xyz, r1.zzzz, l(1, 2, 3, 0)\n  movc r5.zw, r4.zzzz, r3.wwwz, r3.zzzw\n  mov r5.xy, r3.xyxx\n  movc r5.yzw, r4.yyyy, r3.wwzy, r5.yyzw\n  movc r4.xyzw, r4.xxxx, r3.wyzx, r5.xyzw\n  movc r3.xyzw, r1.wwww, r4.xyzw, r3.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(0), r3.xyzw\nendif \niadd r1.w, r1.y, l(-64)\nif_nz r2.x\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(0), g0.xyzw\n  ishl r4.x, r0.z, l(1)\n  ushr r4.x, icb[r1.w + 0].y, r4.x\n  and r4.x, r4.x, l(3)\n  ieq r4.yz, r0.wwww, l(0, 0, 2, 0)\n  or r4.y, r4.z, r4.y\n  ieq r4.x, r4.x, l(2)\n  movc r5.xyzw, r4.xxxx, r3.xyzw, l(-1,-1,-1,-1)\n  and r3.xyzw, r3.xyzw, r4.xxxx\n  movc r5.xyzw, r4.yyyy, r5.xyzw, l(-1,-1,-1,-1)\n  and r3.xyzw, r3.xyzw, r4.yyyy\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\nendif \nif_nz r2.y\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r4.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r5.x, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r6.xyzw, r5.x, l(36), g0.xyzw\n  ld_structured r5.xyzw, r5.x, l(52), g0.xyzw\n  umin r3.xyzw, r3.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r3.xyzw\n  umax r3.xyzw, r4.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\nendif \nif_nz r2.z\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r4.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r5.x, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r6.xyzw, r5.x, l(36), g0.xyzw\n  ld_structured r5.xyzw, r5.x, l(52), g0.xyzw\n  umin r3.xyzw, r3.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r3.xyzw\n  umax r3.xyzw, r4.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\nendif \nif_nz r2.w\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r4.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r5.x, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r6.xyzw, r5.x, l(36), g0.xyzw\n  ld_structured r5.xyzw, r5.x, l(52), g0.xyzw\n  umin r3.xyzw, r3.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r3.xyzw\n  umax r3.xyzw, r4.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\nendif \nult r3.xy, r0.zzzz, l(1, 3, 0, 0)\nif_nz r3.x\n  ld_structured r4.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r5.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r3.z, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r6.xyzw, r3.z, l(36), g0.xyzw\n  ld_structured r7.xyzw, r3.z, l(52), g0.xyzw\n  umin r4.xyzw, r4.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r4.xyzw\n  umax r4.xyzw, r5.xyzw, r7.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r4.xyzw\nendif \nieq r3.zw, r0.zzzz, l(0, 0, 2, 1)\nif_nz r3.z\n  ld_structured r4.xyzw, r0.y, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.y, l(52), g0.xyzw\nendif \nif_nz r2.x\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(0), g0.xyzw\n  ushr r3.z, icb[r1.y + 0].x, r0.z\n  and r3.z, r3.z, l(1)\n  ishl r7.x, r0.z, l(1)\n  ushr r7.x, icb[r1.w + 0].y, r7.x\n  and r7.x, r7.x, l(3)\n  ieq r8.xyzw, r0.wwww, l(0, 2, 1, 3)\n  ieq r7.x, r7.x, l(1)\n  movc r9.xyzw, r7.xxxx, r6.xyzw, l(-1,-1,-1,-1)\n  and r7.xyzw, r6.xyzw, r7.xxxx\n  or r8.xy, r8.ywyy, r8.xzxx\n  ieq r8.z, r0.w, l(7)\n  or r8.y, r8.z, r8.y\n  ieq r3.z, r3.z, l(1)\n  movc r10.xyzw, r3.zzzz, r6.xyzw, l(-1,-1,-1,-1)\n  and r6.xyzw, r6.xyzw, r3.zzzz\n  movc r10.xyzw, r8.yyyy, r10.xyzw, l(-1,-1,-1,-1)\n  and r6.xyzw, r6.xyzw, r8.yyyy\n  movc r9.xyzw, r8.xxxx, r9.xyzw, r10.xyzw\n  movc r6.xyzw, r8.xxxx, r7.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.y\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r3.z, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r8.xyzw, r3.z, l(36), g0.xyzw\n  ld_structured r9.xyzw, r3.z, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.z\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r3.z, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r8.xyzw, r3.z, l(36), g0.xyzw\n  ld_structured r9.xyzw, r3.z, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.w\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r3.z, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r8.xyzw, r3.z, l(36), g0.xyzw\n  ld_structured r9.xyzw, r3.z, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r3.x\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r3.z, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r8.xyzw, r3.z, l(36), g0.xyzw\n  ld_structured r9.xyzw, r3.z, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r3.w\n  ld_structured r4.xyzw, r0.y, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.y, l(52), g0.xyzw\nendif \nif_nz r2.x\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(0), g0.xyzw\n  ushr r3.z, icb[r1.y + 0].x, r0.z\n  and r3.z, r3.z, l(1)\n  ishl r7.x, r0.z, l(1)\n  ushr r7.x, icb[r1.w + 0].y, r7.x\n  and r7.x, r7.x, l(3)\n  ieq r8.xyzw, r0.wwww, l(0, 2, 1, 3)\n  movc r9.xyzw, r7.xxxx, l(-1,-1,-1,-1), r6.xyzw\n  movc r7.xyzw, r7.xxxx, l(0,0,0,0), r6.xyzw\n  or r8.xy, r8.ywyy, r8.xzxx\n  ieq r10.xyzw, r0.wwww, l(7, 4, 5, 6)\n  or r8.y, r8.y, r10.x\n  movc r11.xyzw, r3.zzzz, l(-1,-1,-1,-1), r6.xyzw\n  movc r12.xyzw, r3.zzzz, l(0,0,0,0), r6.xyzw\n  or r3.z, r10.z, r10.y\n  or r3.z, r10.w, r3.z\n  movc r10.xyzw, r3.zzzz, r6.xyzw, l(-1,-1,-1,-1)\n  and r6.xyzw, r6.xyzw, r3.zzzz\n  movc r10.xyzw, r8.yyyy, r11.xyzw, r10.xyzw\n  movc r6.xyzw, r8.yyyy, r12.xyzw, r6.xyzw\n  movc r9.xyzw, r8.xxxx, r9.xyzw, r10.xyzw\n  movc r6.xyzw, r8.xxxx, r7.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.y\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r2.y, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r8.xyzw, r2.y, l(36), g0.xyzw\n  ld_structured r9.xyzw, r2.y, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.z\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r2.y, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r8.xyzw, r2.y, l(36), g0.xyzw\n  ld_structured r9.xyzw, r2.y, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r2.w\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r2.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r8.xyzw, r2.y, l(36), g0.xyzw\n  ld_structured r9.xyzw, r2.y, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_nz r3.x\n  ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r7.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r2.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r8.xyzw, r2.y, l(36), g0.xyzw\n  ld_structured r9.xyzw, r2.y, l(52), g0.xyzw\n  umin r6.xyzw, r6.xyzw, r8.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r6.xyzw\n  umax r6.xyzw, r7.xyzw, r9.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r6.xyzw\nendif \nif_z r0.z\n  ld_structured r4.xyzw, r0.y, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.y, l(52), g0.xyzw\nendif \nif_nz r3.y\n  ieq r2.yzw, r0.wwww, l(0, 1, 4, 5)\n  ushr r3.x, r1.z, r0.z\n  and r3.x, r3.x, l(1)\n  ishl r3.y, r0.z, l(1)\n  ushr r6.x, r1.z, r3.y\n  iadd r3.y, r3.y, l(1)\n  ushr r6.y, r1.z, r3.y\n  and r3.yz, r6.xxyx, l(0, 1, 1, 0)\n  movc r3.xy, r2.yyyy, r3.xxxx, r3.yzyy\n  if_z r0.w\n    iadd r6.xyz, r4.xyzx, l(4, 4, 4, 0)\n    umin r6.xyz, r6.xyzx, l(255, 255, 255, 0)\n    ushr r6.xyz, r6.xyzx, l(3)\n    and r6.xyz, r6.xyzx, l(30, 30, 30, 0)\n    iadd r6.xyz, r3.xxxx, r6.xyzx\n    ishl r6.xyz, r6.xyzx, l(3)\n    ushr r7.xyz, r6.xyzx, l(5)\n    iadd r7.xyz, r6.xyzx, r7.xyzx\n    iadd r8.xyz, r5.xyzx, l(4, 4, 4, 0)\n    umin r8.xyz, r8.xyzx, l(255, 255, 255, 0)\n    ushr r8.xyz, r8.xyzx, l(3)\n    and r8.xyz, r8.xyzx, l(30, 30, 30, 0)\n    iadd r8.xyz, r3.yyyy, r8.xyzx\n    ishl r8.xyz, r8.xyzx, l(3)\n    ushr r9.xyz, r8.xyzx, l(5)\n    iadd r5.xyz, r8.xyzx, r9.xyzx\n    mov r5.w, l(255)\n    mov r4.xyw, l(255,2040,0,2040)\n  else \n    if_nz r2.y\n      iadd r9.xyz, r4.xyzx, l(1, 1, 1, 0)\n      umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n      ushr r9.xyz, r9.xyzx, l(1)\n      and r9.xyz, r9.xyzx, l(126, 126, 126, 0)\n      iadd r9.xyz, r3.xxxx, r9.xyzx\n      ishl r6.xyz, r9.xyzx, l(1)\n      ushr r9.xyz, r6.xyzx, l(7)\n      iadd r7.xyz, r6.xyzx, r9.xyzx\n      iadd r9.xyz, r5.xyzx, l(1, 1, 1, 0)\n      umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n      ushr r9.xyz, r9.xyzx, l(1)\n      and r9.xyz, r9.xyzx, l(126, 126, 126, 0)\n      iadd r9.xyz, r3.yyyy, r9.xyzx\n      ishl r8.xyz, r9.xyzx, l(1)\n      ushr r9.xyz, r8.xyzx, l(7)\n      iadd r5.xyz, r8.xyzx, r9.xyzx\n      mov r5.w, l(255)\n      mov r4.xyw, l(255,510,0,510)\n    else \n      ieq r2.y, r0.w, l(2)\n      if_nz r2.y\n        iadd r9.xyz, r4.xyzx, l(4, 4, 4, 0)\n        umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n        and r6.xyz, r9.xyzx, l(248, 248, 248, 0)\n        ushr r9.xyz, r9.xyzx, l(5)\n        iadd r7.xyz, r6.xyzx, r9.xyzx\n        iadd r9.xyz, r5.xyzx, l(4, 4, 4, 0)\n        umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n        and r8.xyz, r9.xyzx, l(248, 248, 248, 0)\n        ushr r9.xyz, r9.xyzx, l(5)\n        iadd r5.xyz, r8.xyzx, r9.xyzx\n        mov r5.w, l(255)\n        mov r4.xyw, l(255,2040,0,2040)\n      else \n        ieq r2.y, r0.w, l(3)\n        if_nz r2.y\n          and r9.xyz, r4.xyzx, l(-2, -2, -2, 0)\n          iadd r6.xyz, r3.xxxx, r9.xyzx\n          and r9.xyz, r5.xyzx, l(-2, -2, -2, 0)\n          iadd r8.xyz, r3.yyyy, r9.xyzx\n          mov r7.xyz, r6.xyzx\n          mov r5.xyz, r8.xyzx\n          mov r5.w, l(255)\n          mov r4.xyw, l(255,255,0,255)\n        else \n          ieq r2.y, r0.w, l(4)\n          if_nz r2.y\n            iadd r9.xyzw, r4.xyzw, l(4, 4, 4, 2)\n            umin r9.xyzw, r9.xyzw, l(255, 255, 255, 255)\n            and r6.xyzw, r9.xyzw, l(248, 248, 248, 252)\n            ushr r10.xyz, r9.xyzx, l(5)\n            ushr r10.w, r9.w, l(6)\n            iadd r7.xyzw, r6.xyzw, r10.xyzw\n            iadd r9.xyzw, r5.xyzw, l(4, 4, 4, 2)\n            umin r9.xyzw, r9.xyzw, l(255, 255, 255, 255)\n            and r4.xyzw, r9.xwzy, l(248, 252, 248, 248)\n            ushr r10.xyz, r9.xyzx, l(5)\n            ushr r10.w, r9.w, l(6)\n            iadd r5.xyzw, r4.xwzy, r10.xyzw\n            mov r8.xyz, r4.xwzx\n            mov r4.x, r7.w\n            mov r4.w, r6.w\n          else \n            ieq r2.y, r0.w, l(5)\n            if_nz r2.y\n              iadd r9.xyz, r4.xyzx, l(1, 1, 1, 0)\n              umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n              and r6.xyz, r9.xyzx, l(254, 254, 254, 0)\n              ushr r9.xyz, r9.xyzx, l(7)\n              iadd r7.xyz, r6.xyzx, r9.xyzx\n              iadd r9.xyz, r5.xyzx, l(1, 1, 1, 0)\n              umin r9.xyz, r9.xyzx, l(255, 255, 255, 0)\n              and r8.xyz, r9.xyzx, l(254, 254, 254, 0)\n              ushr r9.xyz, r9.xyzx, l(7)\n              iadd r5.xyz, r8.xyzx, r9.xyzx\n              mov r4.x, r4.w\n              mov r4.y, r5.w\n            else \n              ieq r2.y, r0.w, l(6)\n              if_nz r2.y\n                and r9.xyzw, r4.xyzw, l(-2, -2, -2, -2)\n                iadd r6.xyzw, r3.xxxx, r9.xyzw\n                and r9.xyzw, r5.xyzw, l(-2, -2, -2, -2)\n                iadd r4.xyzw, r3.yyyy, r9.xwzy\n                mov r7.xyz, r6.xyzx\n                mov r5.xyzw, r4.xwzy\n                mov r8.xyz, r4.xwzx\n                mov r4.xw, r6.wwww\n              else \n                iadd r9.xyzw, r4.xyzw, l(2, 2, 2, 2)\n                umin r9.xyzw, r9.xyzw, l(255, 255, 255, 255)\n                ushr r9.xyzw, r9.xyzw, l(2)\n                and r9.xyzw, r9.xyzw, l(62, 62, 62, 62)\n                iadd r9.xyzw, r3.xxxx, r9.xyzw\n                ishl r6.xyzw, r9.xyzw, l(2)\n                ushr r10.xyzw, r6.xyzw, l(6)\n                iadd r4.xyzw, r6.wxzy, r10.wxzy\n                iadd r10.xyzw, r5.xyzw, l(2, 2, 2, 2)\n                umin r10.xyzw, r10.xyzw, l(255, 255, 255, 255)\n                ushr r10.xyzw, r10.xyzw, l(2)\n                and r10.xyzw, r10.xyzw, l(62, 62, 62, 62)\n                iadd r10.xyzw, r3.yyyy, r10.xwyz\n                ishl r8.xyzw, r10.xzwy, l(2)\n                ushr r11.xyzw, r8.xyzw, l(6)\n                iadd r5.xyzw, r8.xyzw, r11.xyzw\n                mov r10.x, r9.w\n                ishl r3.xy, r10.xyxx, l(2)\n                mov r7.xyz, r4.ywzy\n                mov r4.yw, r3.yyyx\n              endif \n            endif \n          endif \n        endif \n      endif \n    endif \n  endif \n  ineg r9.xyz, r7.xyzx\n  ineg r9.w, r4.x\n  iadd r10.xyzw, r5.xyzw, r9.xyzw\n  ult r2.y, r0.w, l(4)\n  movc r2.y, r2.y, l(0), r10.w\n  or r2.z, r2.w, r2.z\n  if_nz r2.z\n    if_z r0.z\n      imul null, r2.zw, r10.xxxy, r10.xxxy\n      iadd r2.z, r2.w, r2.z\n      imad r2.z, r10.z, r10.z, r2.z\n      imul null, r2.w, r2.y, r2.y\n      ld_structured r11.xyzw, r0.y, l(0), g0.xyzw\n      iadd r3.xyz, -r7.xyzx, r11.xyzx\n      imul null, r3.xy, r3.xyxx, r10.xyxx\n      iadd r3.x, r3.y, r3.x\n      imad r3.x, r10.z, r3.z, r3.x\n      iadd r3.y, -r4.x, r11.w\n      imul null, r3.y, r2.y, r3.y\n      ilt r3.z, l(0), r2.z\n      ilt r10.w, l(0), r3.x\n      and r3.z, r3.z, r10.w\n      itof r3.x, r3.x\n      mul r3.x, r3.x, l(63.499989)\n      ftou r3.x, r3.x\n      ishl r2.z, r2.z, l(5)\n      ult r2.z, r2.z, r3.x\n      and r2.z, r2.z, r3.z\n      movc r11.xyz, r2.zzzz, r5.xyzx, r7.xyzx\n      movc r5.xyz, r2.zzzz, r7.xyzx, r5.xyzx\n      movc r12.xyz, r2.zzzz, r8.xyzx, r6.xyzx\n      movc r8.xyz, r2.zzzz, r6.xyzx, r8.xyzx\n      ilt r2.z, l(0), r2.w\n      ilt r3.x, l(0), r3.y\n      and r2.z, r2.z, r3.x\n      itof r3.x, r3.y\n      mul r3.x, r3.x, l(63.499989)\n      ftou r3.x, r3.x\n      ishl r2.w, r2.w, l(5)\n      ult r2.w, r2.w, r3.x\n      and r2.z, r2.w, r2.z\n      mov r4.z, r5.w\n      movc r13.xyzw, r2.zzzz, r4.zxyw, r4.xzwy\n      mov r11.w, r13.x\n      mov r5.w, r13.y\n      mov r12.w, r13.z\n      mov r6.xyzw, r12.xyzw\n      mov r8.w, r13.w\n    else \n      mov r7.w, r4.x\n      mov r11.xyzw, r7.xyzw\n      mov r6.w, r4.w\n      mov r8.w, r4.y\n    endif \n  else \n    if_z r0.z\n      mov r2.z, l(0)\n    else \n      if_nz r3.w\n        mov r2.z, icb[r1.y + 0].z\n      else \n        mov r2.z, icb[r1.y + 0].w\n      endif \n    endif \n    imul null, r3.xy, r10.xyxx, r10.xyxx\n    iadd r2.w, r3.y, r3.x\n    imad r2.w, r10.z, r10.z, r2.w\n    imad r2.w, r2.y, r2.y, r2.w\n    iadd r2.z, r0.y, r2.z\n    ld_structured r3.xyzw, r2.z, l(0), g0.xyzw\n    iadd r3.xyzw, r9.xyzw, r3.xyzw\n    imul null, r3.xy, r3.xyxx, r10.xyxx\n    iadd r2.z, r3.y, r3.x\n    imad r2.z, r10.z, r3.z, r2.z\n    imad r2.y, r2.y, r3.w, r2.z\n    ilt r2.z, l(0), r2.w\n    ilt r3.x, l(0), r2.y\n    and r2.z, r2.z, r3.x\n    itof r2.y, r2.y\n    mul r2.y, r2.y, l(63.499989)\n    ftou r2.y, r2.y\n    ishl r2.w, r2.w, l(5)\n    ult r2.y, r2.w, r2.y\n    and r2.y, r2.y, r2.z\n    mov r7.w, r4.x\n    movc r11.xyzw, r2.yyyy, r5.xyzw, r7.xyzw\n    movc r5.xyzw, r2.yyyy, r7.xyzw, r5.xyzw\n    mov r8.w, r4.y\n    mov r4.xyz, r6.xyzx\n    movc r6.xyzw, r2.yyyy, r8.xyzw, r4.xyzw\n    movc r8.xyzw, r2.yyyy, r4.xyzw, r8.xyzw\n  endif \n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r11.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(68), r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(84), r8.xyzw\nendif \nif_nz r2.x\n  ieq r2.xyzw, r0.wwww, l(0, 1, 6, 4)\n  or r3.x, r2.y, r2.x\n  movc r3.yz, r1.xxxx, l(0,1,2,0), l(0,2,1,0)\n  movc r3.yz, r2.wwww, r3.yyzy, l(0,2,2,0)\n  movc r3.yz, r2.zzzz, l(0,0,0,0), r3.yyzy\n  movc r3.xy, r3.xxxx, l(1,1,0,0), r3.yzyy\n  ieq r4.xyzw, r0.wwww, l(2, 3, 7, 5)\n  ishl r2.z, r0.z, l(1)\n  ushr r1.w, icb[r1.w + 0].y, r2.z\n  and r1.w, r1.w, l(3)\n  or r2.xyz, r2.xywx, r4.xywx\n  or r2.y, r4.z, r2.y\n  ushr r2.w, icb[r1.y + 0].x, r0.z\n  and r2.y, r2.y, r2.w\n  and r2.y, r2.y, l(1)\n  movc r1.w, r2.x, r1.w, r2.y\n  iadd r1.w, r0.y, r1.w\n  ld_structured r4.xyzw, r1.w, l(36), g0.xyzw\n  ld_structured r5.xyzw, r1.w, l(52), g0.xyzw\n  iadd r5.xyzw, -r4.xyzw, r5.xyzw\n  ult r1.w, r0.w, l(4)\n  movc r1.w, r1.w, l(0), r5.w\n  if_nz r2.z\n    imul null, r2.xy, r5.xyxx, r5.xyxx\n    iadd r2.x, r2.y, r2.x\n    imad r2.x, r5.z, r5.z, r2.x\n    imul null, r2.y, r1.w, r1.w\n    ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(0), g0.xyzw\n    iadd r7.xyzw, -r4.xyzw, r6.xyzw\n    imul null, r2.zw, r5.xxxy, r7.xxxy\n    iadd r2.z, r2.w, r2.z\n    imad r2.z, r5.z, r7.z, r2.z\n    ige r2.w, l(0), r2.x\n    ige r3.z, l(0), r2.z\n    or r2.w, r2.w, r3.z\n    ilt r3.z, r2.z, r2.x\n    itof r2.xz, r2.xxzx\n    mul r2.z, r2.z, l(63.499989)\n    div r2.x, r2.z, r2.x\n    ftou r2.x, r2.x\n    ishl r3.yw, r3.xxxy, l(6)\n    iadd r2.x, r2.x, r3.y\n    iadd r6.xy, r3.ywyy, l(11, 11, 0, 0)\n    udiv null, r6.xy, r6.xyxx, l(68, 68, 0, 0)\n    ult r7.xy, r3.ywyy, l(1, 1, 0, 0)\n    movc r6.xy, r7.xyxx, l(15,15,0,0), r6.xyxx\n    movc r2.x, r3.z, icb[r2.x + 64].x, r6.x\n    movc r7.y, r2.w, l(0), r2.x\n    imul null, r2.x, r1.w, r7.w\n    ige r2.zw, l(0, 0, 0, 0), r2.yyyx\n    or r2.z, r2.w, r2.z\n    ilt r2.w, r2.x, r2.y\n    itof r2.xy, r2.xyxx\n    mul r2.x, r2.x, l(63.499989)\n    div r2.x, r2.x, r2.y\n    ftou r2.x, r2.x\n    iadd r2.x, r2.x, r3.w\n    movc r2.x, r2.w, icb[r2.x + 64].x, r6.y\n    movc r7.x, r2.z, l(0), r2.x\n    movc r2.xy, r1.xxxx, r7.xyxx, r7.yxyy\n  else \n    imul null, r2.zw, r5.xxxy, r5.xxxy\n    iadd r2.z, r2.w, r2.z\n    imad r2.z, r5.z, r5.z, r2.z\n    imad r2.z, r1.w, r1.w, r2.z\n    ld_structured r6.xyzw, vThreadIDInGroupFlattened.x, l(0), g0.xyzw\n    iadd r4.xyzw, -r4.xyzw, r6.xyzw\n    imul null, r3.yz, r4.xxyx, r5.xxyx\n    iadd r2.w, r3.z, r3.y\n    imad r2.w, r5.z, r4.z, r2.w\n    imad r1.w, r1.w, r4.w, r2.w\n    ige r2.w, l(0), r2.z\n    ige r3.y, l(0), r1.w\n    or r2.w, r2.w, r3.y\n    ilt r3.y, r1.w, r2.z\n    itof r1.w, r1.w\n    mul r1.w, r1.w, l(63.499989)\n    itof r2.z, r2.z\n    div r1.w, r1.w, r2.z\n    ftou r1.w, r1.w\n    ishl r2.z, r3.x, l(6)\n    iadd r1.w, r1.w, r2.z\n    iadd r3.x, r2.z, l(11)\n    udiv null, r3.x, r3.x, l(68)\n    ult r2.z, r2.z, l(1)\n    movc r2.z, r2.z, l(15), r3.x\n    movc r1.w, r3.y, icb[r1.w + 64].x, r2.z\n    movc r2.x, r2.w, l(0), r1.w\n    mov r2.y, l(0)\n  endif \n  store_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r2.xyxx\nendif \nif_z r0.z\n  if_z r0.w\n    ishl r0.z, r1.y, l(1)\n    iadd r0.z, r0.z, l(-128)\n    iadd r0.z, r0.z, l(1)\n    ld_structured r2.xyz, r0.y, l(68), g0.xyzx\n    ishl r3.x, r2.x, l(1)\n    ishl r3.y, r2.y, l(25)\n    ishl r3.z, r2.z, l(17)\n    and r3.xyz, r3.xyzx, l(480, 0xe0000000, 0x01e00000, 0)\n    or r0.z, r0.z, r3.x\n    ld_structured r4.xyz, r0.y, l(84), g0.xyzx\n    ishl r5.x, r4.x, l(5)\n    ishl r5.y, r4.z, l(21)\n    and r2.xw, r5.xxxy, l(7680, 0, 0, 0x1e000000)\n    or r0.z, r0.z, r2.x\n    iadd r3.xw, r0.yyyy, l(1, 0, 0, 2)\n    ld_structured r5.xyz, r3.x, l(68), g0.xyzx\n    ishl r6.x, r5.x, l(9)\n    ishl r6.y, r5.y, l(1)\n    ishl r6.z, r5.z, l(25)\n    and r6.xyz, r6.xyzx, l(0x0001e000, 480, 0xe0000000, 0)\n    or r0.z, r0.z, r6.x\n    ld_structured r7.xyz, r3.x, l(84), g0.xyzx\n    ishl r8.x, r7.x, l(13)\n    ishl r8.y, r7.y, l(5)\n    and r4.xw, r8.xxxy, l(0x001e0000, 0, 0, 7680)\n    or r0.z, r0.z, r4.x\n    ld_structured r8.xyz, r3.w, l(68), g0.xyzx\n    ishl r9.x, r8.x, l(17)\n    ishl r9.y, r8.y, l(9)\n    ishl r9.z, r8.z, l(1)\n    and r9.xyz, r9.xyzx, l(0x01e00000, 0x0001e000, 480, 0)\n    or r0.z, r0.z, r9.x\n    ld_structured r10.xyz, r3.w, l(84), g0.xyzx\n    ishl r11.x, r10.x, l(21)\n    ishl r11.y, r10.y, l(13)\n    ishl r11.z, r10.z, l(5)\n    and r11.xyz, r11.xyzx, l(0x1e000000, 0x001e0000, 7680, 0)\n    or r0.z, r0.z, r11.x\n    or r12.x, r3.y, r0.z\n    ld_structured r13.xy, r0.y, l(68), g0.xyxx\n    ushr r0.z, r13.y, l(7)\n    and r0.z, r0.z, l(1)\n    ushr r1.w, r4.y, l(3)\n    and r1.w, r1.w, l(30)\n    iadd r0.z, r0.z, r1.w\n    iadd r0.z, r6.y, r0.z\n    iadd r0.z, r4.w, r0.z\n    iadd r0.z, r9.y, r0.z\n    iadd r0.z, r11.y, r0.z\n    iadd r0.z, r3.z, r0.z\n    iadd r0.z, r2.w, r0.z\n    iadd r12.y, r6.z, r0.z\n    ld_structured r2.x, r3.x, l(76), g0.xxxx\n    ushr r0.z, r2.x, l(7)\n    and r0.z, r0.z, l(1)\n    ushr r1.w, r7.z, l(3)\n    and r1.w, r1.w, l(30)\n    iadd r0.z, r0.z, r1.w\n    iadd r0.z, r9.z, r0.z\n    iadd r0.z, r11.z, r0.z\n    ishl r1.w, r13.x, l(10)\n    and r1.w, r1.w, l(8192)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r0.y, l(84), g0.xxxx\n    ishl r1.w, r2.x, l(11)\n    and r1.w, r1.w, l(0x00004000)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r3.x, l(68), g0.xxxx\n    ishl r1.w, r2.x, l(12)\n    and r1.w, r1.w, l(0x00008000)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r3.x, l(84), g0.xxxx\n    ishl r1.w, r2.x, l(13)\n    and r1.w, r1.w, l(0x00010000)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r3.w, l(68), g0.xxxx\n    ishl r1.w, r2.x, l(14)\n    and r1.w, r1.w, l(0x00020000)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r3.w, l(84), g0.xxxx\n    ishl r1.w, r2.x, l(15)\n    and r1.w, r1.w, l(0x00040000)\n    iadd r0.z, r0.z, r1.w\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    ishl r1.w, r2.x, l(19)\n    iadd r0.z, r0.z, r1.w\n    umin r1.w, l(4), icb[r1.y + 128].y\n    mov r12.z, r0.z\n    mov r2.x, l(1)\n    loop \n      ult r2.y, r1.w, r2.x\n      breakc_nz r2.y\n      iadd r2.y, r0.y, r2.x\n      ld_structured r3.x, r2.y, l(16), g0.xxxx\n      imad r2.y, r2.x, l(3), l(18)\n      ishl r2.y, r3.x, r2.y\n      or r12.z, r2.y, r12.z\n      iadd r2.x, r2.x, l(1)\n    endloop \n    ult r0.z, icb[r1.y + 128].y, l(4)\n    if_nz r0.z\n      iadd r0.z, r0.y, l(4)\n      ld_structured r3.x, r0.z, l(16), g0.xxxx\n      ishl r0.z, r3.x, l(29)\n      or r12.z, r0.z, r12.z\n      iadd r2.z, r2.x, l(1)\n      mov r2.y, l(0)\n    else \n      iadd r0.z, r0.y, l(4)\n      ld_structured r3.x, r0.z, l(16), g0.xxxx\n      ushr r0.z, r3.x, l(2)\n      and r0.z, r0.z, l(1)\n      mov r2.y, r0.z\n      mov r2.z, r2.x\n      loop \n        ult r1.w, icb[r1.y + 128].y, r2.z\n        breakc_nz r1.w\n        iadd r1.w, r0.y, r2.z\n        ld_structured r3.x, r1.w, l(16), g0.xxxx\n        imad r1.w, r2.z, l(3), l(-14)\n        ishl r1.w, r3.x, r1.w\n        or r2.y, r1.w, r2.y\n        iadd r2.z, r2.z, l(1)\n      endloop \n    endif \n    mov r0.z, r2.y\n    mov r1.w, r2.z\n    loop \n      ult r2.x, icb[r1.y + 128].z, r1.w\n      breakc_nz r2.x\n      iadd r2.x, r0.y, r1.w\n      ld_structured r3.x, r2.x, l(16), g0.xxxx\n      imad r2.x, r1.w, l(3), l(-15)\n      ishl r2.x, r3.x, r2.x\n      or r0.z, r0.z, r2.x\n      iadd r1.w, r1.w, l(1)\n    endloop \n    mov r12.w, r0.z\n    mov r2.x, r1.w\n    loop \n      uge r2.y, r2.x, l(16)\n      breakc_nz r2.y\n      iadd r2.y, r0.y, r2.x\n      ld_structured r3.x, r2.y, l(16), g0.xxxx\n      imad r2.y, r2.x, l(3), l(-16)\n      ishl r2.y, r3.x, r2.y\n      or r12.w, r2.y, r12.w\n      iadd r2.x, r2.x, l(1)\n    endloop \n  else \n    ieq r0.z, r0.w, l(1)\n    if_nz r0.z\n      ishl r0.z, r1.y, l(2)\n      iadd r0.z, r0.z, l(2)\n      ld_structured r2.xyz, r0.y, l(68), g0.xyzx\n      ishl r3.x, r2.x, l(6)\n      ishl r3.y, r2.z, l(22)\n      and r2.xz, r3.xxyx, l(0x00003f00, 0, 0x3f000000, 0)\n      or r0.z, r0.z, r2.x\n      ld_structured r3.xyz, r0.y, l(84), g0.xyzx\n      ishl r4.x, r3.x, l(12)\n      ishl r4.y, r3.y, l(4)\n      ishl r4.z, r3.z, l(28)\n      and r3.xyz, r4.xyzx, l(0x000fc000, 4032, 0xc0000000, 0)\n      or r0.z, r0.z, r3.x\n      iadd r1.w, r0.y, l(1)\n      ld_structured r4.xyz, r1.w, l(68), g0.xyzx\n      ishl r5.x, r4.x, l(18)\n      ishl r5.y, r4.y, l(10)\n      ishl r5.z, r4.z, l(2)\n      and r4.xyz, r5.xyzx, l(0x03f00000, 0x0003f000, 1008, 0)\n      or r0.z, r0.z, r4.x\n      ld_structured r5.xyz, r1.w, l(84), g0.xyzx\n      ishl r6.x, r5.x, l(24)\n      ishl r6.y, r5.y, l(16)\n      ishl r6.z, r5.z, l(8)\n      and r5.xyz, r6.xyzx, l(0xfc000000, 0x00fc0000, 0x0000fc00, 0)\n      or r12.x, r0.z, r5.x\n      ushr r0.z, r2.y, l(2)\n      and r0.z, r0.z, l(63)\n      iadd r0.z, r3.y, r0.z\n      iadd r0.z, r4.y, r0.z\n      iadd r0.z, r5.y, r0.z\n      iadd r0.z, r2.z, r0.z\n      iadd r12.y, r3.z, r0.z\n      ld_structured r2.x, r0.y, l(92), g0.xxxx\n      ushr r0.z, r2.x, l(4)\n      and r0.z, r0.z, l(15)\n      iadd r0.z, r4.z, r0.z\n      iadd r0.z, r5.z, r0.z\n      ld_structured r2.x, r0.y, l(68), g0.xxxx\n      ishl r2.x, r2.x, l(15)\n      and r2.x, r2.x, l(0x00010000)\n      iadd r0.z, r0.z, r2.x\n      ld_structured r2.x, r1.w, l(68), g0.xxxx\n      ishl r2.x, r2.x, l(16)\n      and r2.x, r2.x, l(0x00020000)\n      iadd r0.z, r0.z, r2.x\n      ld_structured r2.x, r0.y, l(16), g0.xxxx\n      ishl r2.x, r2.x, l(18)\n      iadd r0.z, r0.z, r2.x\n      ieq r2.y, l(15), icb[r1.y + 128].y\n      if_nz r2.y\n        iadd r3.xyzw, r0.yyyy, l(15, 14, 13, 12)\n        ld_structured r4.x, r3.x, l(16), g0.xxxx\n        ishl r2.y, r4.x, l(30)\n        ld_structured r4.x, r3.y, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(27)\n        or r2.y, r2.z, r2.y\n        ld_structured r4.x, r3.z, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(24)\n        or r2.y, r2.z, r2.y\n        ld_structured r3.x, r3.w, l(16), g0.xxxx\n        ishl r2.z, r3.x, l(21)\n        or r2.y, r2.z, r2.y\n        iadd r3.xyzw, r0.yyyy, l(11, 10, 9, 8)\n        ld_structured r4.x, r3.x, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(18)\n        or r2.y, r2.z, r2.y\n        ld_structured r4.x, r3.y, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(15)\n        or r2.y, r2.z, r2.y\n        ld_structured r4.x, r3.z, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(12)\n        or r2.y, r2.z, r2.y\n        ld_structured r3.x, r3.w, l(16), g0.xxxx\n        ishl r2.z, r3.x, l(9)\n        or r2.y, r2.z, r2.y\n        iadd r3.xyzw, r0.yyyy, l(7, 6, 5, 4)\n        ld_structured r4.x, r3.x, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(6)\n        or r2.y, r2.z, r2.y\n        ld_structured r4.x, r3.y, l(16), g0.xxxx\n        ishl r2.z, r4.x, l(3)\n        or r2.y, r2.z, r2.y\n        ld_structured r4.x, r3.z, l(16), g0.xxxx\n        or r12.w, r2.y, r4.x\n        ld_structured r3.x, r3.w, l(16), g0.xxxx\n        ishl r2.y, r3.x, l(29)\n        iadd r2.zw, r0.yyyy, l(0, 0, 3, 2)\n        ld_structured r3.x, r2.z, l(16), g0.xxxx\n        ishl r2.z, r3.x, l(26)\n        or r2.y, r2.z, r2.y\n        ld_structured r3.x, r2.w, l(16), g0.xxxx\n        ishl r2.z, r3.x, l(23)\n        or r2.y, r2.z, r2.y\n        ld_structured r3.x, r1.w, l(16), g0.xxxx\n        ishl r2.z, r3.x, l(20)\n        or r2.y, r2.z, r2.y\n        or r2.y, r2.x, r2.y\n        or r12.z, r0.z, r2.y\n      else \n        ieq r2.y, l(2), icb[r1.y + 128].y\n        if_nz r2.y\n          iadd r3.xyzw, r0.yyyy, l(15, 14, 13, 12)\n          ld_structured r4.x, r3.x, l(16), g0.xxxx\n          ishl r2.y, r4.x, l(29)\n          ld_structured r4.x, r3.y, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(26)\n          or r2.y, r2.z, r2.y\n          ld_structured r4.x, r3.z, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(23)\n          or r2.y, r2.z, r2.y\n          ld_structured r3.x, r3.w, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(20)\n          or r2.y, r2.z, r2.y\n          iadd r3.xyzw, r0.yyyy, l(11, 10, 9, 8)\n          ld_structured r4.x, r3.x, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(17)\n          or r2.y, r2.z, r2.y\n          ld_structured r4.x, r3.y, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(14)\n          or r2.y, r2.z, r2.y\n          ld_structured r4.x, r3.z, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(11)\n          or r2.y, r2.z, r2.y\n          ld_structured r3.x, r3.w, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(8)\n          or r2.y, r2.z, r2.y\n          iadd r3.xyzw, r0.yyyy, l(7, 6, 5, 4)\n          ld_structured r4.x, r3.x, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(5)\n          or r2.y, r2.z, r2.y\n          ld_structured r4.x, r3.y, l(16), g0.xxxx\n          ishl r2.z, r4.x, l(2)\n          or r2.y, r2.z, r2.y\n          ld_structured r4.x, r3.z, l(16), g0.xxxx\n          ushr r2.z, r4.x, l(1)\n          or r12.w, r2.z, r2.y\n          ishl r2.y, r4.x, l(31)\n          ld_structured r3.x, r3.w, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(28)\n          or r2.y, r2.z, r2.y\n          iadd r2.zw, r0.yyyy, l(0, 0, 3, 2)\n          ld_structured r3.x, r2.z, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(25)\n          or r2.y, r2.z, r2.y\n          ld_structured r3.x, r2.w, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(23)\n          or r2.y, r2.z, r2.y\n          ld_structured r3.x, r1.w, l(16), g0.xxxx\n          ishl r2.z, r3.x, l(20)\n          or r2.y, r2.z, r2.y\n          or r2.y, r2.x, r2.y\n          or r12.z, r0.z, r2.y\n        else \n          ieq r2.y, l(8), icb[r1.y + 128].y\n          if_nz r2.y\n            iadd r3.xyzw, r0.yyyy, l(15, 14, 13, 12)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.y, r4.x, l(29)\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(26)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(23)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(20)\n            or r2.y, r2.z, r2.y\n            iadd r3.xyzw, r0.yyyy, l(11, 10, 9, 8)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(17)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(14)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(11)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(9)\n            or r2.y, r2.z, r2.y\n            iadd r3.xyzw, r0.yyyy, l(7, 6, 5, 4)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(6)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(3)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            or r12.w, r2.y, r4.x\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.y, r3.x, l(29)\n            iadd r2.zw, r0.yyyy, l(0, 0, 3, 2)\n            ld_structured r3.x, r2.z, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(26)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r2.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(23)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r1.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(20)\n            or r2.y, r2.z, r2.y\n            or r2.y, r2.x, r2.y\n            or r12.z, r0.z, r2.y\n          else \n            iadd r3.xyzw, r0.yyyy, l(15, 14, 13, 12)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.y, r4.x, l(29)\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(26)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(23)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(20)\n            or r2.y, r2.z, r2.y\n            iadd r3.xyzw, r0.yyyy, l(11, 10, 9, 8)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(17)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(14)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(11)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(8)\n            or r2.y, r2.z, r2.y\n            iadd r3.xyzw, r0.yyyy, l(7, 6, 5, 4)\n            ld_structured r4.x, r3.x, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(6)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.y, l(16), g0.xxxx\n            ishl r2.z, r4.x, l(4)\n            or r2.y, r2.z, r2.y\n            ld_structured r4.x, r3.z, l(16), g0.xxxx\n            or r12.w, r2.y, r4.x\n            ld_structured r3.x, r3.w, l(16), g0.xxxx\n            ishl r2.y, r3.x, l(29)\n            iadd r2.zw, r0.yyyy, l(0, 0, 3, 2)\n            ld_structured r3.x, r2.z, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(26)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r2.w, l(16), g0.xxxx\n            ishl r2.z, r3.x, l(23)\n            or r2.y, r2.z, r2.y\n            ld_structured r3.x, r1.w, l(16), g0.xxxx\n            ishl r1.w, r3.x, l(20)\n            or r1.w, r1.w, r2.y\n            or r1.w, r2.x, r1.w\n            or r12.z, r0.z, r1.w\n          endif \n        endif \n      endif \n    else \n      ieq r0.z, r0.w, l(2)\n      if_nz r0.z\n        ishl r0.z, r1.y, l(3)\n        iadd r0.z, r0.z, l(-512)\n        iadd r0.z, r0.z, l(4)\n        ld_structured r2.xyz, r0.y, l(68), g0.xyzx\n        ishl r3.x, r2.x, l(6)\n        ishl r3.y, r2.y, l(4)\n        ishl r3.z, r2.z, l(2)\n        and r3.xyz, r3.xyzx, l(0x00003e00, 3968, 992, 0)\n        or r0.z, r0.z, r3.x\n        ld_structured r4.xyz, r0.y, l(84), g0.xyzx\n        ishl r5.x, r4.x, l(11)\n        ishl r5.y, r4.y, l(9)\n        ishl r5.z, r4.z, l(7)\n        and r5.xyz, r5.xyzx, l(0x0007c000, 0x0001f000, 0x00007c00, 0)\n        or r0.z, r0.z, r5.x\n        iadd r2.xw, r0.yyyy, l(1, 0, 0, 2)\n        ld_structured r6.xyz, r2.x, l(68), g0.xyzx\n        ishl r7.x, r6.x, l(16)\n        ishl r7.y, r6.y, l(14)\n        ishl r7.z, r6.z, l(12)\n        and r7.xyz, r7.xyzx, l(0x00f80000, 0x003e0000, 0x000f8000, 0)\n        or r0.z, r0.z, r7.x\n        ld_structured r8.xyz, r2.x, l(84), g0.xyzx\n        ishl r9.x, r8.x, l(21)\n        ishl r9.y, r8.y, l(19)\n        ishl r9.z, r8.z, l(17)\n        and r9.xyz, r9.xyzx, l(0x1f000000, 0x07c00000, 0x01f00000, 0)\n        or r0.z, r0.z, r9.x\n        ld_structured r10.xyz, r2.w, l(68), g0.xyzx\n        ishl r11.x, r10.x, l(26)\n        ishl r11.y, r10.y, l(24)\n        ishl r11.z, r10.z, l(22)\n        and r11.xyz, r11.xyzx, l(0xe0000000, 0xf8000000, 0x3e000000, 0)\n        or r12.x, r0.z, r11.x\n        ld_structured r13.x, r2.w, l(68), g0.xxxx\n        ushr r0.z, r13.x, l(6)\n        and r0.z, r0.z, l(3)\n        ld_structured r13.xyz, r2.w, l(84), g0.xyzx\n        ushr r14.x, r13.x, l(1)\n        ushr r14.y, r13.y, l(3)\n        and r3.xw, r14.xxxy, l(124, 0, 0, 31)\n        iadd r0.z, r0.z, r3.x\n        iadd r0.z, r3.y, r0.z\n        iadd r0.z, r5.y, r0.z\n        iadd r0.z, r7.y, r0.z\n        iadd r0.z, r9.y, r0.z\n        iadd r12.y, r11.y, r0.z\n        iadd r0.z, r3.z, r3.w\n        iadd r0.z, r5.z, r0.z\n        iadd r0.z, r7.z, r0.z\n        iadd r0.z, r9.z, r0.z\n        iadd r0.z, r11.z, r0.z\n        ishl r1.w, r13.z, l(27)\n        and r1.w, r1.w, l(0xc0000000)\n        iadd r12.z, r0.z, r1.w\n        ld_structured r2.x, r2.w, l(92), g0.xxxx\n        ushr r0.z, r2.x, l(5)\n        and r0.z, r0.z, l(7)\n        ld_structured r2.x, r0.y, l(16), g0.xxxx\n        ishl r1.w, r2.x, l(3)\n        iadd r0.z, r0.z, r1.w\n        mov r1.w, r0.z\n        mov r2.x, l(1)\n        loop \n          ult r2.y, icb[r1.y + 128].y, r2.x\n          breakc_nz r2.y\n          iadd r2.y, r0.y, r2.x\n          ld_structured r3.x, r2.y, l(16), g0.xxxx\n          ishl r2.y, r2.x, l(1)\n          iadd r2.y, r2.y, l(2)\n          ishl r2.y, r3.x, r2.y\n          or r1.w, r1.w, r2.y\n          iadd r2.x, r2.x, l(1)\n        endloop \n        mov r0.z, r1.w\n        mov r2.y, r2.x\n        loop \n          ult r2.z, icb[r1.y + 128].z, r2.y\n          breakc_nz r2.z\n          iadd r2.z, r0.y, r2.y\n          ld_structured r3.x, r2.z, l(16), g0.xxxx\n          ishl r2.z, r2.y, l(1)\n          iadd r2.z, r2.z, l(1)\n          ishl r2.z, r3.x, r2.z\n          or r0.z, r0.z, r2.z\n          iadd r2.y, r2.y, l(1)\n        endloop \n        mov r12.w, r0.z\n        mov r1.w, r2.y\n        loop \n          uge r2.x, r1.w, l(16)\n          breakc_nz r2.x\n          iadd r2.x, r0.y, r1.w\n          ld_structured r3.x, r2.x, l(16), g0.xxxx\n          ishl r2.x, r1.w, l(1)\n          ishl r2.x, r3.x, r2.x\n          or r12.w, r2.x, r12.w\n          iadd r1.w, r1.w, l(1)\n        endloop \n      else \n        ieq r0.z, r0.w, l(3)\n        if_nz r0.z\n          ishl r0.z, r1.y, l(4)\n          iadd r0.z, r0.z, l(8)\n          ld_structured r2.xyz, r0.y, l(68), g0.xyzx\n          ishl r3.x, r2.x, l(9)\n          ishl r3.y, r2.y, l(5)\n          ishl r3.z, r2.z, l(1)\n          and r3.xyz, r3.xyzx, l(0x0001fc00, 8128, 508, 0)\n          or r0.z, r0.z, r3.x\n          ld_structured r4.xyz, r0.y, l(84), g0.xyzx\n          ishl r5.x, r4.x, l(16)\n          ishl r5.y, r4.y, l(12)\n          ishl r5.z, r4.z, l(8)\n          and r5.xyz, r5.xyzx, l(0x00fe0000, 0x000fe000, 0x0000fe00, 0)\n          or r0.z, r0.z, r5.x\n          iadd r1.w, r0.y, l(1)\n          ld_structured r6.xyz, r1.w, l(68), g0.xyzx\n          ishl r7.x, r6.x, l(23)\n          ishl r7.y, r6.y, l(19)\n          ishl r7.z, r6.z, l(15)\n          and r7.xyz, r7.xyzx, l(0x7f000000, 0x07f00000, 0x007f0000, 0)\n          or r0.z, r0.z, r7.x\n          ld_structured r8.xyz, r1.w, l(84), g0.xyzx\n          ishl r9.x, r8.x, l(30)\n          ishl r9.y, r8.y, l(26)\n          ishl r9.z, r8.z, l(22)\n          and r9.xyz, r9.xyzx, l(0x80000000, 0xf8000000, 0x3f800000, 0)\n          or r12.x, r0.z, r9.x\n          ld_structured r10.xy, r1.w, l(84), g0.xyxx\n          ushr r11.x, r10.x, l(2)\n          ushr r11.y, r10.y, l(6)\n          and r2.xw, r11.xxxy, l(63, 0, 0, 3)\n          iadd r2.xy, r3.yzyy, r2.xwxx\n          iadd r2.xy, r5.yzyy, r2.xyxx\n          iadd r2.xy, r7.yzyy, r2.xyxx\n          iadd r2.xy, r9.yzyy, r2.xyxx\n          ld_structured r3.x, r0.y, l(68), g0.xxxx\n          ishl r0.z, r3.x, l(30)\n          and r0.z, r0.z, l(0x40000000)\n          iadd r0.z, r0.z, r2.y\n          ld_structured r3.x, r0.y, l(84), g0.xxxx\n          ishl r2.y, r3.x, l(31)\n          iadd r12.z, r0.z, r2.y\n          ld_structured r3.x, r1.w, l(68), g0.xxxx\n          and r0.z, r3.x, l(1)\n          ld_structured r3.x, r1.w, l(84), g0.xxxx\n          ishl r1.w, r3.x, l(1)\n          and r1.w, r1.w, l(2)\n          iadd r0.z, r0.z, r1.w\n          ld_structured r3.x, r0.y, l(16), g0.xxxx\n          ishl r1.w, r3.x, l(2)\n          iadd r0.z, r0.z, r1.w\n          mov r1.w, r0.z\n          mov r2.y, l(1)\n          loop \n            ult r2.z, icb[r1.y + 128].y, r2.y\n            breakc_nz r2.z\n            iadd r2.z, r0.y, r2.y\n            ld_structured r3.x, r2.z, l(16), g0.xxxx\n            ishl r2.z, r2.y, l(1)\n            iadd r2.z, r2.z, l(1)\n            ishl r2.z, r3.x, r2.z\n            or r1.w, r1.w, r2.z\n            iadd r2.y, r2.y, l(1)\n          endloop \n          mov r12.w, r1.w\n          mov r0.z, r2.y\n          loop \n            uge r2.z, r0.z, l(16)\n            breakc_nz r2.z\n            iadd r2.z, r0.z, r0.y\n            ld_structured r3.x, r2.z, l(16), g0.xxxx\n            ishl r2.z, r0.z, l(1)\n            ishl r2.z, r3.x, r2.z\n            or r12.w, r2.z, r12.w\n            iadd r0.z, r0.z, l(1)\n          endloop \n          mov r12.y, r2.x\n        else \n          ieq r0.z, r0.w, l(4)\n          if_nz r0.z\n            ishl r0.z, r1.z, l(5)\n            and r0.z, r0.z, l(96)\n            iadd r0.z, r0.z, l(16)\n            ishl r1.x, r1.x, l(7)\n            iadd r0.z, r0.z, r1.x\n            ld_structured r2.xyzw, r0.y, l(68), g0.xyzw\n            ishl r3.x, r2.x, l(5)\n            ishl r3.y, r2.y, l(15)\n            ishl r3.z, r2.z, l(25)\n            ishl r3.w, r2.w, l(4)\n            and r2.xyzw, r3.xyzw, l(7936, 0x007c0000, 0xf0000000, 4032)\n            iadd r0.z, r0.z, r2.x\n            ld_structured r3.xyzw, r0.y, l(84), g0.xyzw\n            ishl r4.xz, r3.xxwx, l(10)\n            ishl r4.y, r3.y, l(20)\n            and r3.xyw, r4.xyxz, l(0x0003e000, 0x0f800000, 0, 0x0003f000)\n            iadd r0.z, r0.z, r3.x\n            iadd r0.z, r2.y, r0.z\n            iadd r0.z, r3.y, r0.z\n            iadd r12.x, r2.z, r0.z\n            ld_structured r4.x, r0.y, l(76), g0.xxxx\n            ushr r0.z, r4.x, l(7)\n            and r0.z, r0.z, l(1)\n            ushr r1.x, r3.z, l(2)\n            and r1.x, r1.x, l(62)\n            iadd r0.z, r0.z, r1.x\n            iadd r0.z, r2.w, r0.z\n            iadd r0.z, r3.w, r0.z\n            ld_structured r2.xy, r0.y, l(16), g0.xyxx\n            ishl r3.x, r2.x, l(18)\n            ishl r3.y, r2.y, l(17)\n            and r1.xw, r3.xxxy, l(0x00040000, 0, 0, 0x00060000)\n            iadd r0.z, r0.z, r1.x\n            iadd r2.xyzw, r0.yyyy, l(1, 2, 3, 4)\n            ld_structured r3.xy, r2.x, l(16), g0.xyxx\n            ishl r3.xy, r3.xyxx, l(19)\n            iadd r0.z, r0.z, r3.x\n            ld_structured r4.xy, r2.y, l(16), g0.xyxx\n            ishl r1.x, r4.x, l(21)\n            ishl r2.x, r4.y, l(22)\n            or r0.z, r0.z, r1.x\n            ld_structured r4.xy, r2.z, l(16), g0.xyxx\n            ishl r1.x, r4.x, l(23)\n            ishl r2.y, r4.y, l(25)\n            or r0.z, r0.z, r1.x\n            ld_structured r4.xy, r2.w, l(16), g0.xyxx\n            ishl r1.x, r4.x, l(25)\n            ishl r2.z, r4.y, l(28)\n            or r0.z, r0.z, r1.x\n            iadd r4.xyzw, r0.yyyy, l(5, 6, 7, 8)\n            ld_structured r5.xy, r4.x, l(16), g0.xyxx\n            ishl r1.x, r5.x, l(27)\n            ishl r2.w, r5.y, l(31)\n            or r0.z, r0.z, r1.x\n            ld_structured r5.xy, r4.y, l(16), g0.xyxx\n            ishl r1.x, r5.x, l(29)\n            ishl r3.x, r5.y, l(2)\n            or r0.z, r0.z, r1.x\n            ld_structured r5.xy, r4.z, l(16), g0.xyxx\n            ishl r1.x, r5.x, l(31)\n            ishl r3.z, r5.y, l(5)\n            or r12.y, r0.z, r1.x\n            ld_structured r5.x, r4.z, l(16), g0.xxxx\n            ushr r0.z, r5.x, l(1)\n            ld_structured r5.xy, r4.w, l(16), g0.xyxx\n            ishl r1.x, r5.x, l(1)\n            ishl r3.w, r5.y, l(8)\n            or r0.z, r0.z, r1.x\n            iadd r5.xyzw, r0.yyyy, l(9, 10, 11, 12)\n            ld_structured r6.xy, r5.x, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(3)\n            ishl r4.y, r6.y, l(11)\n            or r0.z, r0.z, r1.x\n            ld_structured r6.xy, r5.y, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(5)\n            ishl r4.z, r6.y, l(14)\n            or r0.z, r0.z, r1.x\n            ld_structured r6.xy, r5.z, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(7)\n            ishl r4.w, r6.y, l(17)\n            or r0.z, r0.z, r1.x\n            ld_structured r5.xy, r5.w, l(16), g0.xyxx\n            ishl r1.x, r5.x, l(9)\n            ishl r5.x, r5.y, l(20)\n            or r0.z, r0.z, r1.x\n            iadd r5.yzw, r0.yyyy, l(0, 13, 14, 15)\n            ld_structured r6.xy, r5.y, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(11)\n            ishl r5.y, r6.y, l(23)\n            or r0.z, r0.z, r1.x\n            ld_structured r6.xy, r5.z, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(13)\n            ishl r5.z, r6.y, l(26)\n            or r0.z, r0.z, r1.x\n            ld_structured r6.xy, r5.w, l(16), g0.xyxx\n            ishl r1.x, r6.x, l(15)\n            ishl r5.w, r6.y, l(29)\n            or r0.z, r0.z, r1.x\n            or r0.z, r1.w, r0.z\n            or r0.z, r3.y, r0.z\n            or r0.z, r2.x, r0.z\n            or r0.z, r2.y, r0.z\n            or r0.z, r2.z, r0.z\n            or r12.z, r2.w, r0.z\n            ld_structured r2.x, r4.x, l(20), g0.xxxx\n            ushr r0.z, r2.x, l(1)\n            or r0.z, r3.x, r0.z\n            or r0.z, r3.z, r0.z\n            or r0.z, r3.w, r0.z\n            or r0.z, r4.y, r0.z\n            or r0.z, r4.z, r0.z\n            or r0.z, r4.w, r0.z\n            or r0.z, r5.x, r0.z\n            or r0.z, r5.y, r0.z\n            or r0.z, r5.z, r0.z\n            or r12.w, r5.w, r0.z\n          else \n            ieq r0.z, r0.w, l(5)\n            if_nz r0.z\n              ishl r0.z, r1.z, l(6)\n              iadd r0.z, r0.z, l(32)\n              ld_structured r2.xyzw, r0.y, l(68), g0.xyzw\n              ishl r3.x, r2.x, l(7)\n              ishl r3.y, r2.y, l(21)\n              ishl r3.z, r2.z, l(3)\n              ishl r1.x, r2.w, l(18)\n              and r2.xyz, r3.xyzx, l(0x00007f00, 0x1fc00000, 2032, 0)\n              or r0.z, r0.z, r2.x\n              ld_structured r3.xyzw, r0.y, l(84), g0.xyzw\n              ishl r4.x, r3.x, l(14)\n              ishl r4.y, r3.y, l(28)\n              ishl r4.z, r3.z, l(10)\n              ishl r1.z, r3.w, l(26)\n              and r3.xyz, r4.xyzx, l(0x003f8000, 0xe0000000, 0x0003f800, 0)\n              or r0.z, r0.z, r3.x\n              or r0.z, r2.y, r0.z\n              or r12.x, r3.y, r0.z\n              ld_structured r4.x, r0.y, l(88), g0.xxxx\n              ushr r0.z, r4.x, l(4)\n              and r0.z, r0.z, l(15)\n              iadd r0.z, r2.z, r0.z\n              iadd r0.z, r3.z, r0.z\n              iadd r0.z, r1.x, r0.z\n              or r12.y, r1.z, r0.z\n              ld_structured r2.x, r0.y, l(96), g0.xxxx\n              ushr r0.z, r2.x, l(6)\n              ld_structured r2.xy, r0.y, l(16), g0.xyxx\n              ishl r1.x, r2.x, l(2)\n              ishl r1.z, r2.y, l(1)\n              or r0.z, r0.z, r1.x\n              iadd r2.xyzw, r0.yyyy, l(1, 2, 3, 4)\n              ld_structured r3.xy, r2.x, l(16), g0.xyxx\n              ishl r1.x, r3.x, l(3)\n              ishl r1.w, r3.y, l(2)\n              or r0.z, r0.z, r1.x\n              ld_structured r3.xy, r2.y, l(16), g0.xyxx\n              ishl r1.x, r3.x, l(5)\n              ishl r2.x, r3.y, l(4)\n              or r0.z, r0.z, r1.x\n              ld_structured r3.xy, r2.z, l(16), g0.xyxx\n              ishl r1.x, r3.x, l(7)\n              ishl r2.y, r3.y, l(6)\n              or r0.z, r0.z, r1.x\n              ld_structured r3.xy, r2.w, l(16), g0.xyxx\n              ishl r1.x, r3.x, l(9)\n              ishl r2.z, r3.y, l(8)\n              or r0.z, r0.z, r1.x\n              iadd r3.xyzw, r0.yyyy, l(5, 6, 7, 8)\n              ld_structured r4.xy, r3.x, l(16), g0.xyxx\n              ishl r1.x, r4.x, l(11)\n              ishl r2.w, r4.y, l(10)\n              or r0.z, r0.z, r1.x\n              ld_structured r4.xy, r3.y, l(16), g0.xyxx\n              ishl r1.x, r4.x, l(13)\n              ishl r3.x, r4.y, l(12)\n              or r0.z, r0.z, r1.x\n              ld_structured r4.xy, r3.z, l(16), g0.xyxx\n              ishl r1.x, r4.x, l(15)\n              ishl r3.y, r4.y, l(14)\n              or r0.z, r0.z, r1.x\n              ld_structured r4.xy, r3.w, l(16), g0.xyxx\n              ishl r1.x, r4.x, l(17)\n              ishl r3.z, r4.y, l(16)\n              or r0.z, r0.z, r1.x\n              iadd r4.xyzw, r0.yyyy, l(9, 10, 11, 12)\n              ld_structured r5.xy, r4.x, l(16), g0.xyxx\n              ishl r1.x, r5.x, l(19)\n              ishl r3.w, r5.y, l(18)\n              or r0.z, r0.z, r1.x\n              ld_structured r5.xy, r4.y, l(16), g0.xyxx\n              ishl r1.x, r5.x, l(21)\n              ishl r4.x, r5.y, l(20)\n              or r0.z, r0.z, r1.x\n              ld_structured r5.xy, r4.z, l(16), g0.xyxx\n              ishl r1.x, r5.x, l(23)\n              ishl r4.y, r5.y, l(22)\n              or r0.z, r0.z, r1.x\n              ld_structured r5.xy, r4.w, l(16), g0.xyxx\n              ishl r1.x, r5.x, l(25)\n              ishl r4.z, r5.y, l(24)\n              or r0.z, r0.z, r1.x\n              iadd r5.xyz, r0.yyyy, l(13, 14, 15, 0)\n              ld_structured r6.xy, r5.x, l(16), g0.xyxx\n              ishl r1.x, r6.x, l(27)\n              ishl r4.w, r6.y, l(26)\n              or r0.z, r0.z, r1.x\n              ld_structured r6.xy, r5.y, l(16), g0.xyxx\n              ishl r1.x, r6.x, l(29)\n              ishl r5.x, r6.y, l(28)\n              or r0.z, r0.z, r1.x\n              ld_structured r6.xy, r5.z, l(16), g0.xyxx\n              ishl r1.x, r6.x, l(31)\n              ishl r5.y, r6.y, l(30)\n              or r12.z, r0.z, r1.x\n              ld_structured r6.x, r5.z, l(16), g0.xxxx\n              ushr r0.z, r6.x, l(1)\n              or r0.z, r1.z, r0.z\n              or r0.z, r1.w, r0.z\n              or r0.z, r2.x, r0.z\n              or r0.z, r2.y, r0.z\n              or r0.z, r2.z, r0.z\n              or r0.z, r2.w, r0.z\n              or r0.z, r3.x, r0.z\n              or r0.z, r3.y, r0.z\n              or r0.z, r3.z, r0.z\n              or r0.z, r3.w, r0.z\n              or r0.z, r4.x, r0.z\n              or r0.z, r4.y, r0.z\n              or r0.z, r4.z, r0.z\n              or r0.z, r4.w, r0.z\n              or r0.z, r5.x, r0.z\n              or r12.w, r5.y, r0.z\n            else \n              ieq r0.z, r0.w, l(6)\n              if_nz r0.z\n                ld_structured r2.xyzw, r0.y, l(68), g0.xyzw\n                ishl r3.x, r2.x, l(6)\n                ishl r3.y, r2.y, l(20)\n                ishl r3.z, r2.z, l(2)\n                ishl r3.w, r2.w, l(16)\n                and r2.xyzw, r3.xyzw, l(0x00003f80, 0x0fe00000, 1016, 0x00fe0000)\n                iadd r0.z, r2.x, l(64)\n                ld_structured r3.xyzw, r0.y, l(84), g0.xyzw\n                ishl r4.x, r3.x, l(13)\n                ishl r4.y, r3.y, l(27)\n                ishl r4.z, r3.z, l(9)\n                ishl r4.w, r3.w, l(23)\n                and r3.xyzw, r4.xyzw, l(0x001fc000, 0xf0000000, 0x0001fc00, 0x7f000000)\n                iadd r0.z, r0.z, r3.x\n                iadd r0.z, r2.y, r0.z\n                iadd r12.x, r3.y, r0.z\n                ld_structured r4.xy, r0.y, l(84), g0.xyxx\n                ushr r0.z, r4.y, l(5)\n                and r0.z, r0.z, l(7)\n                iadd r0.z, r2.z, r0.z\n                iadd r0.z, r3.z, r0.z\n                iadd r0.z, r2.w, r0.z\n                iadd r0.z, r3.w, r0.z\n                ld_structured r2.x, r0.y, l(68), g0.xxxx\n                ishl r0.w, r2.x, l(31)\n                iadd r12.y, r0.w, r0.z\n                and r0.z, r4.x, l(1)\n                ld_structured r2.x, r0.y, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(1)\n                iadd r0.z, r0.w, r0.z\n                iadd r2.xyzw, r0.yyyy, l(1, 2, 3, 4)\n                ld_structured r3.x, r2.x, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(4)\n                or r0.z, r0.w, r0.z\n                ld_structured r3.x, r2.y, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(8)\n                or r0.z, r0.w, r0.z\n                ld_structured r3.x, r2.z, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(12)\n                or r0.z, r0.w, r0.z\n                ld_structured r2.x, r2.w, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(16)\n                or r0.z, r0.w, r0.z\n                iadd r2.xyzw, r0.yyyy, l(5, 6, 7, 8)\n                ld_structured r3.x, r2.x, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(20)\n                or r0.z, r0.w, r0.z\n                ld_structured r3.x, r2.y, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(24)\n                or r0.z, r0.w, r0.z\n                ld_structured r3.x, r2.z, l(16), g0.xxxx\n                ishl r0.w, r3.x, l(28)\n                or r12.z, r0.w, r0.z\n                ld_structured r2.x, r2.w, l(16), g0.xxxx\n                iadd r3.xyzw, r0.yyyy, l(9, 10, 11, 12)\n                ld_structured r4.x, r3.x, l(16), g0.xxxx\n                ishl r0.z, r4.x, l(4)\n                or r0.z, r0.z, r2.x\n                ld_structured r2.x, r3.y, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(8)\n                or r0.z, r0.w, r0.z\n                ld_structured r2.x, r3.z, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(12)\n                or r0.z, r0.w, r0.z\n                ld_structured r2.x, r3.w, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(16)\n                or r0.z, r0.w, r0.z\n                iadd r1.xzw, r0.yyyy, l(13, 0, 14, 15)\n                ld_structured r2.x, r1.x, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(20)\n                or r0.z, r0.w, r0.z\n                ld_structured r2.x, r1.z, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(24)\n                or r0.z, r0.w, r0.z\n                ld_structured r2.x, r1.w, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(28)\n                or r12.w, r0.w, r0.z\n              else \n                ishl r0.z, r1.y, l(8)\n                iadd r0.z, r0.z, l(128)\n                ld_structured r2.xyzw, r0.y, l(68), g0.xyzw\n                ishl r3.x, r2.x, l(11)\n                ishl r3.y, r2.z, l(19)\n                ishl r3.z, r2.w, l(7)\n                and r1.xzw, r3.xxyz, l(0x0007c000, 0, 0x07c00000, 0x00007c00)\n                or r0.z, r0.z, r1.x\n                ld_structured r3.xyzw, r0.y, l(84), g0.xyzw\n                ishl r4.x, r3.x, l(16)\n                ishl r4.y, r3.y, l(4)\n                ishl r4.z, r3.z, l(24)\n                ishl r4.w, r3.w, l(12)\n                and r4.xyzw, r4.xyzw, l(0x00f80000, 3968, 0xf8000000, 0x000f8000)\n                or r0.z, r0.z, r4.x\n                iadd r0.w, r0.y, l(1)\n                ld_structured r5.xyzw, r0.w, l(68), g0.xyzw\n                ishl r6.x, r5.x, l(21)\n                ishl r6.y, r5.y, l(9)\n                ishl r6.z, r5.w, l(17)\n                and r6.xyz, r6.xyzx, l(0x1f000000, 0x0001f000, 0x01f00000, 0)\n                or r0.z, r0.z, r6.x\n                ld_structured r7.xyzw, r0.w, l(84), g0.xyzw\n                ishl r8.x, r7.x, l(26)\n                ishl r8.y, r7.y, l(14)\n                ishl r8.z, r7.z, l(2)\n                ishl r8.w, r7.w, l(22)\n                and r8.xyzw, r8.xyzw, l(0xe0000000, 0x003e0000, 992, 0x3e000000)\n                or r12.x, r0.z, r8.x\n                ld_structured r9.x, r0.w, l(84), g0.xxxx\n                ushr r10.x, r9.x, l(6)\n                ushr r10.y, r9.x, l(1)\n                and r6.xw, r10.xxxy, l(3, 0, 0, 2)\n                ushr r0.z, r2.y, l(1)\n                and r0.z, r0.z, l(124)\n                iadd r0.z, r0.z, r6.x\n                iadd r0.z, r4.y, r0.z\n                iadd r0.z, r6.y, r0.z\n                iadd r0.z, r8.y, r0.z\n                iadd r0.z, r1.z, r0.z\n                iadd r12.y, r4.z, r0.z\n                ushr r0.z, r5.z, l(3)\n                and r0.z, r0.z, l(31)\n                iadd r0.z, r8.z, r0.z\n                iadd r0.z, r1.w, r0.z\n                iadd r0.z, r4.w, r0.z\n                iadd r0.z, r6.z, r0.z\n                iadd r0.z, r8.w, r0.z\n                ld_structured r2.x, r0.y, l(68), g0.xxxx\n                ishl r1.x, r2.x, l(28)\n                and r1.x, r1.x, l(0x40000000)\n                iadd r0.z, r0.z, r1.x\n                ld_structured r2.x, r0.y, l(84), g0.xxxx\n                ishl r1.x, r2.x, l(29)\n                and r1.x, r1.x, l(0x80000000)\n                iadd r12.z, r0.z, r1.x\n                ld_structured r2.x, r0.w, l(68), g0.xxxx\n                ushr r0.z, r2.x, l(2)\n                and r0.z, r0.z, l(1)\n                iadd r0.z, r6.w, r0.z\n                ld_structured r2.x, r0.y, l(16), g0.xxxx\n                ishl r0.w, r2.x, l(2)\n                iadd r0.z, r0.w, r0.z\n                mov r0.w, r0.z\n                mov r1.x, l(1)\n                loop \n                  ult r1.z, icb[r1.y + 128].y, r1.x\n                  breakc_nz r1.z\n                  iadd r1.z, r0.y, r1.x\n                  ld_structured r2.x, r1.z, l(16), g0.xxxx\n                  ishl r1.z, r1.x, l(1)\n                  iadd r1.z, r1.z, l(1)\n                  ishl r1.z, r2.x, r1.z\n                  or r0.w, r0.w, r1.z\n                  iadd r1.x, r1.x, l(1)\n                endloop \n                mov r12.w, r0.w\n                mov r0.z, r1.x\n                loop \n                  uge r1.y, r0.z, l(16)\n                  breakc_nz r1.y\n                  iadd r1.y, r0.z, r0.y\n                  ld_structured r2.x, r1.y, l(16), g0.xxxx\n                  ishl r1.y, r0.z, l(1)\n                  ishl r1.y, r2.x, r1.y\n                  or r12.w, r1.y, r12.w\n                  iadd r0.z, r0.z, l(1)\n                endloop \n              endif \n            endif \n          endif \n        endif \n      endif \n    endif \n  endif \n  store_structured u0.xyzw, r0.x, l(0), r12.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC7Encode_EncodeBlockCS[] =\n{\n     68,  88,  66,  67,  38, 175, \n    165, 204,  73, 182, 127, 102, \n    182, 246, 162, 152,  80, 235, \n     28, 253,   1,   0,   0,   0, \n    200, 193,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88, 116, 193,   0,   0, \n     64,   0,   5,   0,  93,  48, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,   2,   4, \n      0,   0, 204, 204,   0,   0, \n     80,  80, 104, 170,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    136, 136,   0,   0,  64,  80, \n     90, 106,  15,   0,   0,   0, \n      0,   0,   0,   0, 238, 238, \n      0,   0,   0,  66,  90,  90, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 200, 236,   0,   0, \n    168, 160,  80,  84,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    128, 200,   0,   0,   0,   0, \n    165, 165,  15,   0,   0,   0, \n      0,   0,   0,   0, 236, 254, \n      0,   0,  80,  80, 160, 160, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 200, 254,   0,   0, \n    160, 160,  85,  85,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    128, 236,   0,   0,  80,  80, \n     90,  90,  15,   0,   0,   0, \n      0,   0,   0,   0,   0, 200, \n      0,   0,   0,   0,  85, 170, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 236, 255,   0,   0, \n      0,  85,  85, 170,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    128, 254,   0,   0,   0,  85, \n    170, 170,  15,   0,   0,   0, \n      0,   0,   0,   0,   0, 232, \n      0,   0, 144, 144, 144, 144, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 232, 255,   0,   0, \n    148, 148, 148, 148,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0, 255,   0,   0, 164, 164, \n    164, 164,  15,   0,   0,   0, \n      0,   0,   0,   0, 240, 255, \n      0,   0,  80, 148, 165, 169, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0, 240,   0,   0, \n     80,  66,  10,  42,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     16, 247,   0,   0,  64,  80, \n    148, 165,  15,   0,   0,   0, \n      0,   0,   0,   0, 142,   0, \n      0,   0,  84,  80,  66,  10, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0, 113,   0,   0, \n      0, 165, 165, 165,   8,   0, \n      0,   0,   0,   0,   0,   0, \n    206,   8,   0,   0, 160, 160, \n    160,  85,   2,   0,   0,   0, \n      0,   0,   0,   0, 140,   0, \n      0,   0,  84,  84, 168, 168, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  16, 115,   0,   0, \n     64,  64, 106, 106,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  49,   0,   0,   0,  80, \n    164, 164,   8,   0,   0,   0, \n      0,   0,   0,   0, 206, 140, \n      0,   0,   0,   5,  26,  26, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 140,   8,   0,   0, \n    164, 164,  80,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     16,  49,   0,   0, 144, 144, \n    165, 170,   8,   0,   0,   0, \n      0,   0,   0,   0, 102, 102, \n      0,   0,  20, 105, 105,  20, \n      2,   0,   0,   0,   0,   0, \n      0,   0, 108,  54,   0,   0, \n      0,  20, 105, 105,   2,   0, \n      0,   0,   0,   0,   0,   0, \n    232,  23,   0,   0, 160, 133, \n    133, 160,   8,   0,   0,   0, \n      0,   0,   0,   0, 240,  15, \n      0,   0,  20,  20, 130, 170, \n      8,   0,   0,   0,   0,   0, \n      0,   0, 142, 113,   0,   0, \n     80, 164, 164,  80,   2,   0, \n      0,   0,   0,   0,   0,   0, \n    156,  57,   0,   0,   0,   2, \n     90, 106,   2,   0,   0,   0, \n      0,   0,   0,   0, 170, 170, \n      0,   0,   0, 128, 165, 169, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 240, 240,   0,   0, \n    168, 160, 144,  80,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     90,  90,   0,   0,  80, 144, \n    160, 168,   6,   0,   0,   0, \n      0,   0,   0,   0, 204,  51, \n      0,   0,  36,  36,  36,  36, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  60,  60,   0,   0, \n      0,  85, 170,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n    170,  85,   0,   0,  36,  73, \n    146,  36,   8,   0,   0,   0, \n      0,   0,   0,   0, 150, 150, \n      0,   0,  36, 146,  73,  36, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  90, 165,   0,   0, \n     80,  10, 165,  80,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    206, 115,   0,   0,  80, 165, \n     10,  80,   2,   0,   0,   0, \n      0,   0,   0,   0, 200,  19, \n      0,   0,  68,  68, 170, 170, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  76,  50,   0,   0, \n      0,   0, 102, 102,   2,   0, \n      0,   0,   0,   0,   0,   0, \n    220,  59,   0,   0, 160, 165, \n    160, 165,   2,   0,   0,   0, \n      0,   0,   0,   0, 150, 105, \n      0,   0, 160,  80, 160,  80, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  60, 195,   0,   0, \n     40, 105,  40, 105,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    102, 153,   0,   0,  68, 170, \n    170,  68,  15,   0,   0,   0, \n      0,   0,   0,   0,  96,   6, \n      0,   0,   0, 102, 102, 102, \n      6,   0,   0,   0,   0,   0, \n      0,   0, 114,   2,   0,   0, \n     68,  68,  68, 170,   6,   0, \n      0,   0,   0,   0,   0,   0, \n    228,   4,   0,   0, 168,  84, \n    168,  84,   2,   0,   0,   0, \n      0,   0,   0,   0,  64,  78, \n      0,   0, 128, 149, 128, 149, \n      6,   0,   0,   0,   0,   0, \n      0,   0,  32,  39,   0,   0, \n      0, 150, 150, 150,   8,   0, \n      0,   0,   0,   0,   0,   0, \n     54, 201,   0,   0, 168,  84, \n     84, 168,  15,   0,   0,   0, \n      0,   0,   0,   0, 108, 147, \n      0,   0, 128, 149, 149, 128, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 198,  57,   0,   0, \n     20,  20,  20, 170,   2,   0, \n      0,   0,   0,   0,   0,   0, \n    156,  99,   0,   0,   0,   0, \n    150, 150,   2,   0,   0,   0, \n      0,   0,   0,   0,  54, 147, \n      0,   0,  20,  20, 170, 170, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 198, 156,   0,   0, \n    160,  80,  80, 160,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    126, 129,   0,   0, 160, 165, \n    165, 160,  15,   0,   0,   0, \n      0,   0,   0,   0,  24, 231, \n      0,   0,   0,   0,   0, 150, \n     15,   0,   0,   0,   0,   0, \n      0,   0, 240, 204,   0,   0, \n    128,  64, 128,  64,  15,   0, \n      0,   0,   0,   0,   0,   0, \n    204,  15,   0,   0, 168, 169, \n    168, 169,   2,   0,   0,   0, \n      0,   0,   0,   0,  68, 119, \n      0,   0,  68, 170, 170, 170, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  34, 238,   0,   0, \n     84,  82,  74,  42,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   8,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   8,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      3,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   6,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     10,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     10,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  10,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     10,   0,   0,   0,   9,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,   8,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   9,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n     10,   0,   0,   0,   9,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,  11,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,  11,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   8,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,  11,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,  12,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n     12,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,  12,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,  13,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,  15,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     15,   0,   0,   0,  14,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,  14,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0,  15,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,  14,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0,  15,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   8,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   6,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      6,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     10,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      6,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   8,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     10,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  10,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     10,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  13,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  12,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n     89,   0,   0,   4,  70, 142, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  88,  24, \n      0,   4,   0, 112,  16,   0, \n      0,   0,   0,   0,  85,  85, \n      0,   0, 162,   0,   0,   4, \n      0, 112,  16,   0,   1,   0, \n      0,   0,  16,   0,   0,   0, \n    158,   0,   0,   4,   0, 224, \n     17,   0,   0,   0,   0,   0, \n     16,   0,   0,   0,  95,   0, \n      0,   2,   0,  64,   2,   0, \n     95,   0,   0,   2,  18,  16, \n      2,   0, 104,   0,   0,   2, \n     15,   0,   0,   0, 160,   0, \n      0,   5,   0, 240,  17,   0, \n      0,   0,   0,   0, 100,   0, \n      0,   0,  64,   0,   0,   0, \n    155,   0,   0,   4,  64,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   6,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  16, \n      2,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   8,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 128,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  80,   0, \n      0,   8,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     62,   0,   0,   1,  21,   0, \n      0,   1,   1,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  48,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  70, 114, \n     16,   0,   1,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 127, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   6, 112,  16,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  79,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,  16,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     78,   0,   0,   9, 130,   0, \n     16,   0,   1,   0,   0,   0, \n      0, 208,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     35,   0,   0,  11,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16, 128,  65,   0, \n      0,   0,   1,   0,   0,   0, \n     26, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   8, \n    194,   0,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  45,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,  56,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 127,  67, \n      0,   0, 127,  67,   0,   0, \n    127,  67,   0,   0, 127,  67, \n     28,   0,   0,   5, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  84,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n     32,   0,   0,  10,  50,   0, \n     16,   0,   4,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  32,   0,   0,  10, \n    114,   0,  16,   0,   4,   0, \n      0,   0, 166,  10,  16,   0, \n      1,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,   9, 194,   0, \n     16,   0,   5,   0,   0,   0, \n    166,  10,  16,   0,   4,   0, \n      0,   0, 246,  11,  16,   0, \n      3,   0,   0,   0, 166,  14, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   5,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,   5,   0, \n      0,   0,  86,   5,  16,   0, \n      4,   0,   0,   0, 246,   6, \n     16,   0,   3,   0,   0,   0, \n     86,  14,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,   4,   0, \n      0,   0,   6,   0,  16,   0, \n      4,   0,   0,   0, 118,   2, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,   3,   0, \n      0,   0, 246,  15,  16,   0, \n      1,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 192, 255, 255, 255, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   8,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26, 144, 144,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     32,   0,   0,  10,  98,   0, \n     16,   0,   4,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  32,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,   5,   0,   0,   0, \n      6,   0,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n      1,   0,   0,   7, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,   6,   0,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,  12, 242,   0,  16,   0, \n      5,   0,   0,   0,  86,   5, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   1,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   7, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  18,   0,  16,   0, \n      5,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      6,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  83,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     58,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      4,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     21,   0,   0,   1,  79,   0, \n      0,  10,  50,   0,  16,   0, \n      3,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      5,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n     21,   0,   0,   1,  32,   0, \n      0,  10, 194,   0,  16,   0, \n      3,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   8, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  10, 144, 144,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   8,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26, 144, 144,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     32,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n      3,   0,   0,   0,  32,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,  12, \n    242,   0,  16,   0,   9,   0, \n      0,   0,   6,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   1,   0,   0,   7, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,   6,   0, \n     16,   0,   7,   0,   0,   0, \n     60,   0,   0,   7,  50,   0, \n     16,   0,   8,   0,   0,   0, \n    214,   5,  16,   0,   8,   0, \n      0,   0, 134,   0,  16,   0, \n      8,   0,   0,   0,  32,   0, \n      0,   7,  66,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n     32,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  12, 242,   0,  16,   0, \n     10,   0,   0,   0, 166,  10, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,   1,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n    166,  10,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,  12, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  86,   5,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   1,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  86,   5, \n     16,   0,   8,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n      6,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      7,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      6,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  66,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  83,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      7,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      3,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   8,  66,   0,  16,   0, \n      3,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   8, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26, 144, 144,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  32,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0,   3,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,   9,   0,   0,   0, \n      6,   0,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,   7,   0,   0,   0, \n      6,   0,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     60,   0,   0,   7,  50,   0, \n     16,   0,   8,   0,   0,   0, \n    214,   5,  16,   0,   8,   0, \n      0,   0, 134,   0,  16,   0, \n      8,   0,   0,   0,  32,   0, \n      0,  10, 242,   0,  16,   0, \n     10,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   7,   0, \n      0,   0,   4,   0,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,  11,   0,   0,   0, \n    166,  10,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,  12, 242,   0, \n     16,   0,  12,   0,   0,   0, \n    166,  10,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,  12, \n    242,   0,  16,   0,  10,   0, \n      0,   0, 166,  10,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255, 255, 255, 255, 255, \n    255, 255,   1,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0, 166,  10, \n     16,   0,   3,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     86,   5,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n     11,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     86,   5,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n     12,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n      6,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      7,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      6,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   7,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  34,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      8,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  83,   0, \n      0,   7, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      7,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      0,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  32,   0,   0,  10, \n    226,   0,  16,   0,   2,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   4,   0, \n      0,   0,   5,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,   0,   0,  10,  98,   0, \n     16,   0,   3,   0,   0,   0, \n      6,   1,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n      6,   0,  16,   0,   3,   0, \n      0,   0, 150,   5,  16,   0, \n      3,   0,   0,   0,  31,   0, \n      0,   3,  58,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n     30,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   6,   0, \n      0,   0,   6,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     30,   0,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  86,   5, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255,   0,   0,   0,  54,   0, \n      0,   8, 178,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    248,   7,   0,   0,   0,   0, \n      0,   0, 248,   7,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 126,   0, \n      0,   0, 126,   0,   0,   0, \n    126,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   9,   0, \n      0,   0,   6,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    126,   0,   0,   0, 126,   0, \n      0,   0, 126,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  86,   5, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255,   0,   0,   0,  54,   0, \n      0,   8, 178,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    254,   1,   0,   0,   0,   0, \n      0,   0, 254,   1,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n     84,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0, 255,   0, \n      0,   0,  54,   0,   0,   8, \n    178,   0,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 248,   7, \n      0,   0,   0,   0,   0,   0, \n    248,   7,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n    254, 255, 255, 255, 254, 255, \n    255, 255, 254, 255, 255, 255, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      6,   0,   0,   0,   6,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255,   0,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,  54,   0, \n      0,   5, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     54,   0,   0,   5, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255,   0,   0,   0,  54,   0, \n      0,   8, 178,   0,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0, 255,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   2,   0,   0,   0, \n     84,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      6,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0, 252,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   2,   0,   0,   0, \n     84,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      4,   0,   0,   0, 198,   6, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 248,   0, \n      0,   0, 252,   0,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      5,   0,   0,   0, 198,   6, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,  54,   0,   0,   5, \n    114,   0,  16,   0,   8,   0, \n      0,   0, 198,   2,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n    254,   0,   0,   0, 254,   0, \n      0,   0, 254,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0, 254,   0,   0,   0, \n    254,   0,   0,   0, 254,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255, 254, 255, 255, 255, \n     30,   0,   0,   7, 242,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0, 254, 255, \n    255, 255, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255,  30,   0,   0,   7, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  86,   5,  16,   0, \n      3,   0,   0,   0, 198,   6, \n     16,   0,   9,   0,   0,   0, \n     54,   0,   0,   5, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   5, \n    242,   0,  16,   0,   5,   0, \n      0,   0, 198,   6,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5, 114,   0,  16,   0, \n      8,   0,   0,   0, 198,   2, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 146,   0, \n     16,   0,   4,   0,   0,   0, \n    246,  15,  16,   0,   6,   0, \n      0,   0,  18,   0,   0,   1, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,  84,   0, \n      0,  10, 242,   0,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,  85,   0,   0,   7, \n    242,   0,  16,   0,   9,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      9,   0,   0,   0,   6,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      4,   0,   0,   0,  54,   6, \n     16,   0,   6,   0,   0,   0, \n     54,   6,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n     84,   0,   0,  10, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,  85,   0, \n      0,   7, 242,   0,  16,   0, \n     10,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  10,   0,   0,   0, \n     86,   5,  16,   0,   3,   0, \n      0,   0, 198,   9,  16,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7, 242,   0,  16,   0, \n      8,   0,   0,   0, 134,   7, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n    242,   0,  16,   0,  11,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n     11,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   5, 114,   0,  16,   0, \n      7,   0,   0,   0, 214,   6, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 162,   0, \n     16,   0,   4,   0,   0,   0, \n     86,   1,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     40,   0,   0,   5, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  40,   0,   0,   5, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     10,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   9,   0, \n      0,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     55,   0,   0,   9,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      0,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n     10,   0,   0,   0,   6,   4, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,  11,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16, 128,  65,   0, \n      0,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,  70,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  35,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   8, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n     11,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     34,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  34,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     43,   0,   0,   5,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  56,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     28,   0,   0,   5,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  11,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   5,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,  12,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   8,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  34,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     34,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  43,   0,   0,   5, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  56,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  28,   0,   0,   5, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,  13,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,  38,  13,  16,   0, \n      4,   0,   0,   0, 134,   7, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  11,   0,   0,   0, \n     10,   0,  16,   0,  13,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n     13,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,  13,   0,   0,   0, \n     54,   0,   0,   5, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     70,  14,  16,   0,  12,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   5, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5, 242,   0,  16,   0, \n     11,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,  21,   0, \n      0,   1,  18,   0,   0,   1, \n     31,   0,   0,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42, 144, 144,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      2,   0,   0,   0,  58, 144, \n    144,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  50,   0,  16,   0, \n      3,   0,   0,   0,  70,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   0,  16,   0,  10,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,  70,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  35,   0,   0,   9, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  34,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     34,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  43,   0,   0,   5, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  56,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  28,   0,   0,   5, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,  11,   0,   0,   0, \n     86,   5,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16,   0,   7,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     86,   5,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      7,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   5, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      6,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      8,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,  21,   0, \n      0,   1, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n     11,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  32,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   6,   0, \n      0,   0,   4,   0,   0,   0, \n     60,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  55,   0, \n      0,  15,  98,   0,  16,   0, \n      3,   0,   0,   0,   6,   0, \n     16,   0,   1,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12,  98,   0,  16,   0, \n      3,   0,   0,   0, 246,  15, \n     16,   0,   2,   0,   0,   0, \n     86,   6,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12,  98,   0,  16,   0, \n      3,   0,   0,   0, 166,  10, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  86,   6,  16,   0, \n      3,   0,   0,   0,  55,   0, \n      0,  12,  50,   0,  16,   0, \n      3,   0,   0,   0,   6,   0, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 150,   5,  16,   0, \n      3,   0,   0,   0,  32,   0, \n      0,  10, 242,   0,  16,   0, \n      4,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   2,   0, \n      0,   0,   3,   0,   0,   0, \n      7,   0,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   8, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26, 144, 144,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     60,   0,   0,   7, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     70,   3,  16,   0,   2,   0, \n      0,   0,  70,   3,  16,   0, \n      4,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   8, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10, 144, 144,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   8, 242,   0,  16,   0, \n      5,   0,   0,   0,  70,  14, \n     16, 128,  65,   0,   0,   0, \n      4,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      2,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     50,   0,  16,   0,   2,   0, \n      0,   0,  70,   0,  16,   0, \n      5,   0,   0,   0,  70,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   8, \n    242,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      6,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   6,   4, \n     16,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  33,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  33,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  34,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  43,   0,   0,   5, \n     82,   0,  16,   0,   2,   0, \n      0,   0,   6,   2,  16,   0, \n      2,   0,   0,   0,  56,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  14,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     28,   0,   0,   5,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n    162,   0,  16,   0,   3,   0, \n      0,   0,   6,   4,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  30,   0, \n      0,  10,  50,   0,  16,   0, \n      6,   0,   0,   0, 214,   5, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0,  11,   0, \n      0,   0,  11,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  78,   0,   0,  11, \n      0, 208,   0,   0,  50,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   0,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n     68,   0,   0,   0,  68,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  79,   0, \n      0,  10,  50,   0,  16,   0, \n      7,   0,   0,   0, 214,   5, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,  12, \n     50,   0,  16,   0,   6,   0, \n      0,   0,  70,   0,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,  15,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     70,   0,  16,   0,   6,   0, \n      0,   0,  55,   0,   0,  11, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9,  34,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     33,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  86,   1,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  34,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     43,   0,   0,   5,  50,   0, \n     16,   0,   2,   0,   0,   0, \n     70,   0,  16,   0,   2,   0, \n      0,   0,  56,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  28,   0, \n      0,   5,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  55,   0, \n      0,  11,  18,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     10, 144, 208,   0,  64,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,   9,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   0,  16,   0,   1,   0, \n      0,   0,  70,   0,  16,   0, \n      7,   0,   0,   0,  22,   5, \n     16,   0,   7,   0,   0,   0, \n     18,   0,   0,   1,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   6,   4, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      6,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     70,  14,  16, 128,  65,   0, \n      0,   0,   4,   0,   0,   0, \n     70,  14,  16,   0,   6,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  98,   0, \n     16,   0,   3,   0,   0,   0, \n      6,   1,  16,   0,   4,   0, \n      0,   0,   6,   1,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  35,   0,   0,   9, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  35,   0,   0,   9, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,  33,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     33,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  34,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     43,   0,   0,   5, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     43,   0,   0,   5,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  14,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     28,   0,   0,   5, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  78,   0,   0,   8, \n      0, 208,   0,   0,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  79,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,  11, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  55,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     21,   0,   0,   1, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70,   0, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      0,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  31,   0, \n      0,   3,  58,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 128, 255, 255, 255, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0, 224,   1, \n      0,   0,   0,   0,   0, 224, \n      0,   0, 224,   1,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     84,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,   1,   0,   0,  10, \n    146,   0,  16,   0,   2,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,  30,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  30, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 146,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0, 224,   1,   0, \n    224,   1,   0,   0,   0,   0, \n      0, 224,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  13,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,  10, 146,   0, \n     16,   0,   4,   0,   0,   0, \n      6,   4,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,  30,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,  30,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   9,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 224,   1, \n      0, 224,   1,   0, 224,   1, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n     11,   0,   0,   0,  10,   0, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,  11,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  30,   0,   0,  30,   0, \n      0,  30,   0,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  11,   0,   0,   0, \n     60,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n     13,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  76,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  32,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,  64,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0, 128,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   1,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   4,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  84,   0, \n      0,   9, 130,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     26, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  48,   0,   0,   1, \n     79,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   3,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n     12,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     79,   0,   0,   9,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  12,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  48,   0,   0,   1, \n     79,   0,   0,   9, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      3,   0,   4,   3,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n    242, 255, 255, 255,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  21,   0,   0,   1, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  48,   0, \n      0,   1,  79,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  42, 144, 208,   0, \n    128,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   3,   0,   4,   3, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     35,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 241, 255, 255, 255, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  48,   0,   0,   1, \n     80,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   3,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 240, 255, \n    255, 255,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n     12,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,  10,  82,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   1,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  63,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  63, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   0, 192,  15,   0, \n    192,  15,   0,   0,   0,   0, \n      0, 192,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 240,   3, \n      0, 240,   3,   0, 240,   3, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      6,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0, 252,   0,   0, 252,   0, \n      0, 252,   0,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     18,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  63,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  92,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   1,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   2,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  18,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  32,   0, \n      0,   9,  34,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     26, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  15,   0, \n      0,   0,  14,   0,   0,   0, \n     13,   0,   0,   0,  12,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n     11,   0,   0,   0,  10,   0, \n      0,   0,   9,   0,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      7,   0,   0,   0,   6,   0, \n      0,   0,   5,   0,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  30,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  26, 144, \n    208,   0, 128,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,  15,   0,   0,   0, \n     14,   0,   0,   0,  13,   0, \n      0,   0,  12,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  11,   0, \n      0,   0,  10,   0,   0,   0, \n      9,   0,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  14,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   7,   0, \n      0,   0,   6,   0,   0,   0, \n      5,   0,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    194,   0,  16,   0,   2,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   9,  34,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  26, 144, 208,   0, \n    128,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n     15,   0,   0,   0,  14,   0, \n      0,   0,  13,   0,   0,   0, \n     12,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,  11,   0,   0,   0, \n     10,   0,   0,   0,   9,   0, \n      0,   0,   8,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  11,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   7,   0,   0,   0, \n      6,   0,   0,   0,   5,   0, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     12,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n     30,   0,   0,  10, 194,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     18,   0,   0,   1,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  15,   0, \n      0,   0,  14,   0,   0,   0, \n     13,   0,   0,   0,  12,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  29,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n     11,   0,   0,   0,  10,   0, \n      0,   0,   9,   0,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      7,   0,   0,   0,   6,   0, \n      0,   0,   5,   0,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  30,   0, \n      0,  10, 194,   0,  16,   0, \n      2,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0, 254, \n    255, 255,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  62,   0,   0, 128,  15, \n      0,   0, 224,   3,   0,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0,   0, 192,   7,   0, \n      0, 240,   1,   0,   0, 124, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  30,   0, \n      0,  10, 146,   0,  16,   0, \n      2,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 248,   0, \n      0,   0,  62,   0,   0, 128, \n     15,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,  31,   0,   0, 192,   7, \n      0,   0, 240,   1,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  11,   0,   0,   0, \n     10,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n     11,   0,   0,   0,  26,   0, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0, 224,   0,   0, \n      0, 248,   0,   0,   0,  62, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  18,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  11,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n     13,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n     14,   0,   0,   0,  10,   0, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 146,   0, \n     16,   0,   3,   0,   0,   0, \n      6,   4,  16,   0,  14,   0, \n      0,   0,   2,  64,   0,   0, \n    124,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,  11,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     11,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,  13,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0, 192,  30,   0,   0,   7, \n     66,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     92,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  48,   0,   0,   1, \n     79,   0,   0,   9,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      3,   0,   4,   3,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  48,   0,   0,   1, \n     79,   0,   0,   9,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42, 144, 208,   0, 128,   0, \n      0,   0,  26,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      3,   0,   4,   3,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  48,   0,   0,   1, \n     80,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   3,   0, \n      4,   3,  10,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     12,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 242,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   0, 252,   1,   0, \n    192,  31,   0,   0, 252,   1, \n      0,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      5,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n    254,   0,   0, 224,  15,   0, \n      0, 254,   0,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 114,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  19,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0, 127,   0,   0, 240,   7, \n      0,   0, 127,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     84,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   9,   0,   0,   0, \n     10,   0,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   9,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,  22,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0, 128,   0,   0, \n      0, 248,   0,   0, 128,  63, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  18,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,  11,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,  11,   0,   0,   0, \n     26,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,   1,   0, \n      0,  10, 146,   0,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,  11,   0,   0,   0, \n      2,  64,   0,   0,  63,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     50,   0,  16,   0,   2,   0, \n      0,   0, 150,   5,  16,   0, \n      3,   0,   0,   0, 198,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  50,   0, \n     16,   0,   2,   0,   0,   0, \n    150,   5,  16,   0,   5,   0, \n      0,   0,  70,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  50,   0,  16,   0, \n      2,   0,   0,   0, 150,   5, \n     16,   0,   7,   0,   0,   0, \n     70,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     50,   0,  16,   0,   2,   0, \n      0,   0, 150,   5,  16,   0, \n      9,   0,   0,   0,  70,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     30,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,  64,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     84,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     84,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     48,   0,   0,   1,  79,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  26, 144, \n    208,   0, 128,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   3,   0, \n      4,   3,  42,   0,  16,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  54,   0,   0,   5, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  58,   0,  16,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,  12,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  54,   0,   0,   5, \n     34,   0,  16,   0,  12,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  96,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  25,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,  31,   0,   0,   0,   0, \n    124,   0,   0,   0,   0, 240, \n    192,  15,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     82,   0,  16,   0,   4,   0, \n      0,   0,   6,   3,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,   1,   0, \n      0,  10, 178,   0,  16,   0, \n      3,   0,   0,   0,  70,   8, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0, 224, \n      3,   0,   0,   0, 128,  15, \n      0,   0,   0,   0,   0, 240, \n      3,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     76,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     62,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n      1,   0,   0,  10, 146,   0, \n     16,   0,   1,   0,   0,   0, \n      6,   4,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   3,   0, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     22,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   5,   0,   0,   0, \n      6,   0,   0,   0,   7,   0, \n      0,   0,   8,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     29,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     31,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      5,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   9,   0, \n      0,   0,  10,   0,   0,   0, \n     11,   0,   0,   0,  12,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     17,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,   9,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,  10, \n    226,   0,  16,   0,   5,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  14,   0, \n      0,   0,  15,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     11,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  23,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,  12,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     12,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     68,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  21,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     18,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      2,  64,   0,   0,   0, 127, \n      0,   0,   0,   0, 192,  31, \n    240,   7,   0,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     84,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  10,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     26,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   0, 128, \n     63,   0,   0,   0,   0, 224, \n      0, 248,   3,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  18,   0,  16,   0, \n     12,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  88,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     15,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  34,   0,  16,   0, \n     12,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  96,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   3,   0,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   5,   0, \n      0,   0,   6,   0,   0,   0, \n      7,   0,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     10,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     14,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n     50,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,  17,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  86,   5,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   9,   0,   0,   0, \n     10,   0,   0,   0,  11,   0, \n      0,   0,  12,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  18,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     21,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     23,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n     25,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n     13,   0,   0,   0,  14,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      6,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  27,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  26,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,  30,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     20,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    128,  63,   0,   0,   0,   0, \n    224,  15, 248,   3,   0,   0, \n      0,   0, 254,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  84,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  13,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     27,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   9,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  23,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      0, 192,  31,   0,   0,   0, \n      0, 240,   0, 252,   1,   0, \n      0,   0,   0, 127,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  50,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,  12,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   2,   0, \n      0,   0,   3,   0,   0,   0, \n      4,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  12,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   5,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      5,   0,   0,   0,   6,   0, \n      0,   0,   7,   0,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  20,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n      3,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   9,   0, \n      0,   0,  10,   0,   0,   0, \n     11,   0,   0,   0,  12,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     12,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 210,   0,  16,   0, \n      1,   0,   0,   0,  86,   5, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  13,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,  15,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  20,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  60,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     12,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  18,   0,   0,   1, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 128,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  11,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,  10, \n    210,   0,  16,   0,   1,   0, \n      0,   0,   6,   9,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   0, 192,   7,   0, \n      0,   0,   0,   0,   0,   0, \n    192,   7,   0, 124,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 248,   0, \n    128,  15,   0,   0,   0,   0, \n      0, 248,   0, 128,  15,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  68,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,   1,  64, \n      0,   0,  21,   0,   0,   0, \n     41,   0,   0,   7,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     26,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      9,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n      1,  64,   0,   0,  17,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,  31, \n      0, 240,   1,   0,   0,   0, \n    240,   1,   0,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  26,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   8,   0, \n      0,   0,  26,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,  14,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,  22,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0, 224, \n      0,   0,  62,   0, 224,   3, \n      0,   0,   0,   0,   0,  62, \n     60,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 146,   0, \n     16,   0,   6,   0,   0,   0, \n      6,   4,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 124,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     85,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  31,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  28,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,  64, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  84,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  29,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0, 128, \n     30,   0,   0,   7,  66,   0, \n     16,   0,  12,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  68,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  48,   0, \n      0,   1,  79,   0,   0,   9, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26, 144, 208,   0, \n    128,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   3,   0,   4,   3, \n     42,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7,  66,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     66,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   1,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  12,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  48,   0, \n      0,   1,  80,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      3,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   1,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  34,   0,  16,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n     12,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     21,   0,   0,   1, 168,   0, \n      0,   9, 242, 224,  17,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n     12,   0,   0,   0,  21,   0, \n      0,   1,  62,   0,   0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC7Encode_TryMode02CS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { -0.000000, 15, 0, 0},\n                              { 65981199646559862000000000.000000, 15, 0, 0},\n                              { 15358528172589056.000000, 15, 0, 0},\n                              { 3584194248704.000000, 15, 0, 1},\n                              { -0.000000, 15, 0, 1},\n                              { -0.000000, 15, 0, 1},\n                              { 14680365989888.000000, 15, 0, 1},\n                              { 15362462362632192.000000, 15, 0, 2},\n                              { -0.000000, 15, 0, 2},\n                              { -0.000000, 15, 0, 2},\n                              { -0.000000, 15, 0, 2},\n                              { -0.000000, 15, 0, 2},\n                              { -0.000000, 15, 0, 3},\n                              { -0.000000, 15, 0, 3},\n                              { -0.000000, 15, 0, 3},\n                              { 0.000000, 15, 0, 3},\n                              { -0.000000, 15, 0, 4},\n                              { 0.000000, 2, 0, 4},\n                              { -0.000000, 8, 0, 4},\n                              { 22076467445760.000000, 2, 0, 4},\n                              { -0.000000, 2, 0, 5},\n                              { 70798013459086900000000000.000000, 8, 0, 5},\n                              { -0.000000, 8, 0, 5},\n                              { 0.000000, 15, 0, 5},\n                              { 0x0050a4a4, 2, 0, 6},\n                              { -0.000000, 8, 0, 6},\n                              { 0.000000, 2, 0, 6},\n                              { 17610885206241624000000000.000000, 2, 0, 6},\n                              { -0.000000, 8, 0, 6},\n                              { -0.000000, 8, 0, 7},\n                              { 22097854464.000000, 2, 0, 7},\n                              { 65888818352238725000000000.000000, 2, 0, 7},\n                              { -0.000000, 15, 0, 7},\n                              { 19411582976.000000, 15, 0, 8},\n                              { -0.000000, 6, 0, 8},\n                              { 0.000000, 8, 0, 8},\n                              { 0.000000, 2, 0, 8},\n                              { 0.000000, 8, 0, 9},\n                              { 0.000000, 15, 0, 9},\n                              { 22151331840.000000, 15, 0, 9},\n                              { 9304358912.000000, 2, 0, 9},\n                              { -0.000000, 8, 0, 10},\n                              { 271536072765004600000000.000000, 2, 0, 10},\n                              { -0.000000, 2, 0, 10},\n                              { 21517107200.000000, 2, 0, 10},\n                              { 12724757752857623000000000.000000, 15, 0, 10},\n                              { 1365.320801, 15, 0, 11},\n                              { 272006464738884190000000.000000, 6, 0, 11},\n                              { -0.000000, 6, 0, 11},\n                              { 5783798415360.000000, 2, 0, 11},\n                              { -0.000000, 6, 0, 12},\n                              { -0.000000, 8, 0, 12},\n                              { -0.000000, 15, 0, 12},\n                              { -0.000000, 15, 0, 12},\n                              { -0.000000, 2, 0, 13},\n                              { -0.000000, 2, 0, 13},\n                              { -0.000000, 15, 0, 13},\n                              { -0.000000, 15, 0, 13},\n                              { -0.000000, 15, 0, 14},\n                              { -0.000000, 15, 0, 14},\n                              { 4.007874, 15, 0, 14},\n                              { -0.000000, 2, 0, 14},\n                              { -0.000000, 2, 0, 15},\n                              { 0.000000, 15, 0, 15},\n                              { 0, 3, 15, 0},\n                              { 4, 3, 8, 0},\n                              { 9, 15, 8, 0},\n                              { 13, 15, 3, 0},\n                              { 17, 8, 15, 0},\n                              { 21, 3, 15, 1},\n                              { 26, 15, 3, 1},\n                              { 30, 15, 8, 1},\n                              { 34, 8, 15, 1},\n                              { 38, 8, 15, 1},\n                              { 43, 6, 15, 1},\n                              { 47, 6, 15, 1},\n                              { 51, 6, 15, 1},\n                              { 55, 5, 15, 1},\n                              { 60, 3, 15, 2},\n                              { 64, 3, 8, 2},\n                              { 0, 3, 15, 2},\n                              { 9, 3, 8, 2},\n                              { 18, 8, 15, 2},\n                              { 27, 15, 3, 2},\n                              { 37, 3, 15, 2},\n                              { 46, 3, 8, 2},\n                              { 55, 6, 15, 2},\n                              { 64, 10, 8, 3},\n                              { 0, 5, 3, 3},\n                              { 0, 8, 15, 3},\n                              { 0, 8, 6, 3},\n                              { 0, 6, 10, 3},\n                              { 0, 8, 15, 3},\n                              { 0, 5, 15, 3},\n                              { 0, 15, 10, 3},\n                              { 0, 15, 8, 3},\n                              { 0, 8, 15, 3},\n                              { 21, 15, 3, 4},\n                              { 43, 3, 15, 4},\n                              { 64, 5, 10, 4},\n                              { 0, 6, 10, 4},\n                              { 0, 10, 8, 4},\n                              { 0, 8, 9, 4},\n                              { 0, 15, 10, 4},\n                              { 0, 15, 6, 4},\n                              { 0, 3, 15, 4},\n                              { 0, 15, 8, 5},\n                              { 0, 5, 15, 5},\n                              { 0, 15, 3, 5},\n                              { 0, 15, 6, 5},\n                              { 0, 15, 6, 5},\n                              { 0, 15, 8, 5},\n                              { 0, 3, 15, 5},\n                              { 0, 15, 3, 5},\n                              { 0, 5, 15, 5},\n                              { 0, 5, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 8, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 10, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 10, 15, 6},\n                              { 0, 8, 15, 6},\n                              { 0, 13, 15, 6},\n                              { 0, 15, 3, 7},\n                              { 0, 12, 15, 7},\n                              { 0, 3, 15, 7},\n                              { 0, 3, 8, 7},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_resource_structured t1, 16 \ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 29\ndcl_indexableTemp x0[12], 4\ndcl_indexableTemp x1[3], 4\ndcl_indexableTemp x2[3], 4\ndcl_indexableTemp x3[3], 4\ndcl_tgsm_structured g0, 100, 64\ndcl_thread_group 64, 1, 1\niadd r0.x, vThreadGroupID.x, cb0[1].x\nult r1.xyzw, vThreadIDInGroupFlattened.xxxx, l(16, 32, 8, 4)\nif_nz r1.x\n  udiv r0.y, null, r0.x, cb0[0].y\n  imad r0.z, -r0.y, cb0[0].y, r0.x\n  ishl r0.z, r0.z, l(2)\n  ishl r0.y, r0.y, l(2)\n  and r0.w, vThreadIDInGroupFlattened.x, l(3)\n  iadd r2.x, r0.w, r0.z\n  ushr r0.z, vThreadIDInGroupFlattened.x, l(2)\n  iadd r2.y, r0.z, r0.y\n  mov r2.zw, l(0,0,0,0)\n  ld r2.xyzw, r2.xyzw, t0.xyzw\n  mul r2.xyzw, r2.xyzw, l(255.000000, 255.000000, 255.000000, 255.000000)\n  ftou r2.xyzw, r2.xyzw\n  umin r2.xyzw, r2.xyzw, l(255, 255, 255, 255)\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(0), r2.xyzw\nendif \nsync_g_t\nstore_structured g0.x, vThreadIDInGroupFlattened.x, l(16), l(-1)\nmovc r0.y, cb0[0].w, l(64), l(16)\nult r0.y, vThreadIDInGroupFlattened.x, r0.y\nif_nz r0.y\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(64)\n  mov x0[0].x, l(-1)\n  mov x0[1].x, l(-1)\n  mov x0[2].x, l(-1)\n  mov x0[0].y, l(0)\n  mov x0[1].y, l(0)\n  mov x0[2].y, l(0)\n  mov x0[4].x, l(-1)\n  mov x0[5].x, l(-1)\n  mov x0[6].x, l(-1)\n  mov x0[4].y, l(0)\n  mov x0[5].y, l(0)\n  mov x0[6].y, l(0)\n  mov x0[8].x, l(-1)\n  mov x0[9].x, l(-1)\n  mov x0[10].x, l(-1)\n  mov x0[8].y, l(0)\n  mov x0[9].y, l(0)\n  mov x0[10].y, l(0)\n  iadd r0.z, r0.y, l(-64)\n  mov r0.w, l(0)\n  loop \n    uge r2.x, r0.w, l(16)\n    breakc_nz r2.x\n    ld_structured r2.xyz, r0.w, l(0), g0.xyzx\n    ishl r2.w, r0.w, l(1)\n    ushr r2.w, icb[r0.z + 0].x, r2.w\n    and r2.w, r2.w, l(3)\n    ieq r3.x, r2.w, l(2)\n    if_nz r3.x\n      mov r3.x, x0[8].x\n      mov r3.y, x0[9].x\n      mov r3.z, x0[10].x\n      umin r3.xyz, r2.xyzx, r3.xyzx\n      mov x0[8].x, r3.x\n      mov x0[9].x, r3.y\n      mov x0[10].x, r3.z\n      mov r3.x, x0[8].y\n      mov r3.y, x0[9].y\n      mov r3.z, x0[10].y\n      umax r3.xyz, r2.xyzx, r3.xyzx\n      mov x0[8].y, r3.x\n      mov x0[9].y, r3.y\n      mov x0[10].y, r3.z\n    else \n      ieq r2.w, r2.w, l(1)\n      if_nz r2.w\n        mov r3.x, x0[4].x\n        mov r3.y, x0[5].x\n        mov r3.z, x0[6].x\n        umin r3.xyz, r2.xyzx, r3.xyzx\n        mov x0[4].x, r3.x\n        mov x0[5].x, r3.y\n        mov x0[6].x, r3.z\n        mov r3.x, x0[4].y\n        mov r3.y, x0[5].y\n        mov r3.z, x0[6].y\n        umax r3.xyz, r2.xyzx, r3.xyzx\n        mov x0[4].y, r3.x\n        mov x0[5].y, r3.y\n        mov x0[6].y, r3.z\n      else \n        mov r3.x, x0[0].x\n        mov r3.y, x0[1].x\n        mov r3.z, x0[2].x\n        umin r3.xyz, r2.xyzx, r3.xyzx\n        mov x0[0].x, r3.x\n        mov x0[1].x, r3.y\n        mov x0[2].x, r3.z\n        mov r3.x, x0[0].y\n        mov r3.y, x0[1].y\n        mov r3.z, x0[2].y\n        umax r2.xyz, r2.xyzx, r3.xyzx\n        mov x0[0].y, r2.x\n        mov x0[1].y, r2.y\n        mov x0[2].y, r2.z\n      endif \n    endif \n    iadd r0.w, r0.w, l(1)\n  endloop \n  mov r2.x, x0[0].x\n  mov r2.y, x0[1].x\n  mov r2.z, x0[2].x\n  mov r3.x, x0[0].y\n  mov r3.y, x0[1].y\n  mov r3.z, x0[2].y\n  mov r4.x, x0[4].x\n  mov r4.y, x0[5].x\n  mov r4.z, x0[6].x\n  mov r5.x, x0[4].y\n  mov r5.y, x0[5].y\n  mov r5.z, x0[6].y\n  mov r6.x, x0[8].x\n  mov r6.y, x0[9].x\n  mov r6.z, x0[10].x\n  mov r7.x, x0[8].y\n  mov r7.y, x0[9].y\n  mov r7.z, x0[10].y\n  movc r0.w, cb0[0].w, l(1), l(64)\n  iadd r2.xyz, r2.xyzx, l(4, 4, 4, 0)\n  umin r2.xyz, r2.xyzx, l(255, 255, 255, 0)\n  ushr r8.xyz, r2.xyzx, l(3)\n  and r8.xyz, r8.xyzx, l(30, 30, 30, 0)\n  iadd r3.xyz, r3.xyzx, l(4, 4, 4, 0)\n  umin r3.xyz, r3.xyzx, l(255, 255, 255, 0)\n  ushr r9.xyz, r3.xyzx, l(3)\n  and r9.xyz, r9.xyzx, l(30, 30, 30, 0)\n  and r10.xyz, r2.xyzx, l(248, 248, 248, 0)\n  ushr r2.xyz, r2.xyzx, l(5)\n  iadd r2.xyz, r2.xyzx, r10.xyzx\n  and r10.xyz, r3.xyzx, l(248, 248, 248, 0)\n  ushr r3.xyz, r3.xyzx, l(5)\n  iadd r3.xyz, r3.xyzx, r10.xyzx\n  iadd r4.xyz, r4.xyzx, l(4, 4, 4, 0)\n  umin r4.xyz, r4.xyzx, l(255, 255, 255, 0)\n  ushr r10.xyz, r4.xyzx, l(3)\n  and r10.xyz, r10.xyzx, l(30, 30, 30, 0)\n  iadd r5.xyz, r5.xyzx, l(4, 4, 4, 0)\n  umin r5.xyz, r5.xyzx, l(255, 255, 255, 0)\n  ushr r11.xyz, r5.xyzx, l(3)\n  and r11.xyz, r11.xyzx, l(30, 30, 30, 0)\n  and r12.xyz, r4.xyzx, l(248, 248, 248, 0)\n  ushr r4.xyz, r4.xyzx, l(5)\n  iadd r4.xyz, r4.xyzx, r12.xyzx\n  and r12.xyz, r5.xyzx, l(248, 248, 248, 0)\n  ushr r5.xyz, r5.xyzx, l(5)\n  iadd r5.xyz, r5.xyzx, r12.xyzx\n  iadd r6.xyz, r6.xyzx, l(4, 4, 4, 0)\n  umin r6.xyz, r6.xyzx, l(255, 255, 255, 0)\n  ushr r12.xyz, r6.xyzx, l(3)\n  and r12.xyz, r12.xyzx, l(30, 30, 30, 0)\n  iadd r7.xyz, r7.xyzx, l(4, 4, 4, 0)\n  umin r7.xyz, r7.xyzx, l(255, 255, 255, 0)\n  ushr r13.xyz, r7.xyzx, l(3)\n  and r13.xyz, r13.xyzx, l(30, 30, 30, 0)\n  and r14.xyz, r6.xyzx, l(248, 248, 248, 0)\n  ushr r6.xyz, r6.xyzx, l(5)\n  iadd r6.xyz, r6.xyzx, r14.xyzx\n  and r14.xyz, r7.xyzx, l(248, 248, 248, 0)\n  ushr r7.xyz, r7.xyzx, l(5)\n  iadd r7.xyz, r7.xyzx, r14.xyzx\n  mov r2.w, r3.z\n  mov r3.w, r2.y\n  mov r4.w, r5.z\n  mov r5.w, r4.y\n  mov r6.w, r7.z\n  mov r7.w, r6.y\n  mov r14.y, l(255)\n  mov r2.y, cb0[0].w\n  mov r15.xy, l(0,-1,0,0)\n  mov r16.x, l(0)\n  loop \n    uge r3.z, r16.x, r0.w\n    breakc_nz r3.z\n    ieq r3.z, r2.y, l(2)\n    if_z r2.y\n      ushr r16.y, r16.x, l(1)\n      and r14.zw, r16.xxxy, l(0, 0, 1, 1)\n      iadd r17.xyz, r8.xyzx, r14.zzzz\n      ishl r17.xyz, r17.xyzx, l(3)\n      ushr r18.xyz, r17.xyzx, l(5)\n      iadd r17.xzw, r17.zzxy, r18.zzxy\n      iadd r18.xyz, r9.xyzx, r14.wwww\n      ishl r18.xyz, r18.xyzx, l(3)\n      ushr r19.xyz, r18.xyzx, l(5)\n      iadd r18.xyz, r18.yxzy, r19.yxzy\n      mov r17.y, r18.z\n      mov r18.w, r17.w\n      mov r14.zw, r18.wwwx\n      mov r18.x, r17.z\n    else \n      mov r17.xy, r2.zwzz\n      mov r14.zw, r3.wwwy\n      mov r18.x, r2.x\n      mov r18.y, r3.x\n    endif \n    mov x0[3].xy, l(255,255,0,0)\n    mov x0[2].xy, r17.xyxx\n    mov x0[1].xy, r14.zwzz\n    mov x0[0].xy, r18.xyxx\n    if_z r2.y\n      ushr r19.x, r16.x, l(2)\n      ushr r19.y, r16.x, l(3)\n      and r15.zw, r19.xxxy, l(0, 0, 1, 1)\n      iadd r19.xyz, r10.xyzx, r15.zzzz\n      ishl r19.xyz, r19.xyzx, l(3)\n      ushr r20.xyz, r19.xyzx, l(5)\n      iadd r19.xzw, r19.zzxy, r20.zzxy\n      iadd r20.xyz, r11.xyzx, r15.wwww\n      ishl r20.xyz, r20.xyzx, l(3)\n      ushr r21.xyz, r20.xyzx, l(5)\n      iadd r20.xyz, r20.yxzy, r21.yxzy\n      mov r19.y, r20.z\n      mov r20.w, r19.w\n      mov r15.zw, r20.wwwx\n      mov r20.x, r19.z\n    else \n      mov r19.xy, r4.zwzz\n      mov r15.zw, r5.wwwy\n      mov r20.x, r4.x\n      mov r20.y, r5.x\n    endif \n    mov x0[7].xy, l(255,255,0,0)\n    mov x0[6].xy, r19.xyxx\n    mov x0[5].xy, r15.zwzz\n    mov x0[4].xy, r20.xyxx\n    if_z r2.y\n      ushr r21.x, r16.x, l(4)\n      ushr r21.y, r16.x, l(5)\n      and r16.zw, r21.xxxy, l(0, 0, 1, 1)\n      iadd r21.xyz, r12.xyzx, r16.zzzz\n      ishl r21.xyz, r21.xyzx, l(3)\n      ushr r22.xyz, r21.xyzx, l(5)\n      iadd r21.xzw, r21.zzxy, r22.zzxy\n      iadd r22.xyz, r13.xyzx, r16.wwww\n      ishl r22.xyz, r22.xyzx, l(3)\n      ushr r23.xyz, r22.xyzx, l(5)\n      iadd r22.xyz, r22.yxzy, r23.yxzy\n      mov r21.y, r22.z\n      mov r22.w, r21.w\n      mov r16.zw, r22.wwwx\n      mov r22.x, r21.z\n    else \n      mov r21.xy, r6.zwzz\n      mov r16.zw, r7.wwwy\n      mov r22.x, r6.x\n      mov r22.y, r7.x\n    endif \n    mov x0[11].xy, l(255,255,0,0)\n    mov x0[10].xy, r21.xyxx\n    mov x0[9].xy, r16.zwzz\n    mov x0[8].xy, r22.xyxx\n    ineg r23.x, r18.x\n    ineg r23.y, r14.z\n    ineg r23.z, r17.x\n    mov r18.z, r14.w\n    mov r18.w, r17.y\n    iadd r17.xyz, r18.yzwy, r23.xyzx\n    mov x1[0].xyz, r17.xyzx\n    ineg r18.x, r20.x\n    ineg r18.y, r15.z\n    ineg r18.z, r19.x\n    mov r20.z, r15.w\n    mov r20.w, r19.y\n    iadd r18.xyz, r18.xyzx, r20.yzwy\n    mov x1[1].xyz, r18.xyzx\n    ineg r19.x, r22.x\n    ineg r19.y, r16.z\n    ineg r19.z, r21.x\n    mov r22.z, r16.w\n    mov r22.w, r21.y\n    iadd r19.xyz, r19.xyzx, r22.yzwy\n    mov x1[2].xyz, r19.xyzx\n    mov x1[2].w, l(0)\n    mov x1[1].w, l(0)\n    mov x1[0].w, l(0)\n    imul null, r14.zw, r17.xxxy, r17.xxxy\n    iadd r4.y, r14.w, r14.z\n    imad r4.y, r17.z, r17.z, r4.y\n    mov x2[0].x, r4.y\n    imul null, r14.zw, r18.xxxy, r18.xxxy\n    iadd r5.z, r14.w, r14.z\n    imad r5.z, r18.z, r18.z, r5.z\n    mov x2[1].x, r5.z\n    imul null, r14.zw, r19.xxxy, r19.xxxy\n    iadd r6.y, r14.w, r14.z\n    imad r6.y, r19.z, r19.z, r6.y\n    mov x2[2].x, r6.y\n    mov x3[0].x, l(0)\n    mov x3[1].x, icb[r0.y + 0].y\n    mov x3[2].x, icb[r0.y + 0].z\n    mov r7.z, l(0)\n    loop \n      uge r8.w, r7.z, l(3)\n      breakc_nz r8.w\n      mov r17.xyzw, x1[r7.z + 0].xyzw\n      mov r8.w, x3[r7.z + 0].x\n      ld_structured r18.xyzw, r8.w, l(0), g0.xyzw\n      ishl r8.w, r7.z, l(2)\n      mov r9.w, x0[r8.w + 0].x\n      mov r10.w, x0[r8.w + 1].x\n      mov r11.w, x0[r8.w + 2].x\n      mov r12.w, x0[r8.w + 3].x\n      ineg r19.x, r9.w\n      ineg r19.y, r10.w\n      ineg r19.z, r11.w\n      ineg r19.w, r12.w\n      iadd r18.xyzw, r18.xyzw, r19.xyzw\n      imul null, r14.zw, r17.xxxy, r18.xxxy\n      iadd r13.w, r14.w, r14.z\n      imad r13.w, r17.z, r18.z, r13.w\n      imad r13.w, r17.w, r18.w, r13.w\n      mov r14.z, x2[r7.z + 0].x\n      ilt r14.w, l(0), r14.z\n      ilt r15.z, l(0), r13.w\n      and r14.w, r14.w, r15.z\n      itof r13.w, r13.w\n      mul r13.w, r13.w, l(63.499989)\n      ftou r13.w, r13.w\n      ishl r14.z, r14.z, l(5)\n      ult r13.w, r14.z, r13.w\n      and r13.w, r13.w, r14.w\n      if_nz r13.w\n        ineg r17.xyzw, r17.xyzw\n        mov x1[r7.z + 0].xyzw, r17.xyzw\n        mov r13.w, x0[r8.w + 0].y\n        mov r14.z, x0[r8.w + 1].y\n        mov r14.w, x0[r8.w + 2].y\n        mov r15.z, x0[r8.w + 3].y\n        mov x0[r8.w + 0].x, r13.w\n        mov x0[r8.w + 1].x, r14.z\n        mov x0[r8.w + 2].x, r14.w\n        mov x0[r8.w + 3].x, r15.z\n        mov x0[r8.w + 0].y, r9.w\n        mov x0[r8.w + 1].y, r10.w\n        mov x0[r8.w + 2].y, r11.w\n        mov x0[r8.w + 3].y, r12.w\n      endif \n      iadd r7.z, r7.z, l(1)\n    endloop \n    mov r17.xyzw, x1[2].xyzw\n    mov r7.z, x0[8].x\n    mov r8.w, x0[9].x\n    mov r9.w, x0[10].x\n    mov r10.w, x0[11].x\n    ineg r18.x, r7.z\n    ineg r18.y, r8.w\n    ineg r18.z, r9.w\n    ineg r18.w, r10.w\n    ige r11.w, l(0), r6.y\n    itof r12.w, r6.y\n    movc r19.xyz, r3.zzzz, l(128,3,32,0), l(64,7,16,0)\n    mov r20.xyzw, x1[1].xyzw\n    mov r3.z, x0[4].x\n    mov r13.w, x0[5].x\n    mov r14.z, x0[6].x\n    mov r14.w, x0[7].x\n    ineg r21.x, r3.z\n    ineg r21.y, r13.w\n    ineg r21.zw, r14.zzzw\n    ige r15.z, l(0), r5.z\n    itof r15.w, r5.z\n    mov r22.xyzw, x1[0].xyzw\n    mov r16.z, x0[0].x\n    mov r16.w, x0[1].x\n    mov r19.w, x0[2].x\n    mov r23.x, x0[3].x\n    ineg r24.xy, r16.zwzz\n    ineg r24.z, r19.w\n    ineg r24.w, r23.x\n    ige r23.y, l(0), r4.y\n    itof r23.z, r4.y\n    mov r23.w, l(0)\n    mov r16.y, l(0)\n    loop \n      uge r25.x, r23.w, l(16)\n      breakc_nz r25.x\n      ishl r25.x, r23.w, l(1)\n      ushr r25.x, icb[r0.z + 0].x, r25.x\n      and r25.x, r25.x, l(3)\n      ieq r25.y, r25.x, l(2)\n      if_nz r25.y\n        ld_structured r26.xyzw, r23.w, l(0), g0.xyzw\n        iadd r26.xyzw, r18.xyzw, r26.xyzw\n        imul null, r25.yz, r17.xxyx, r26.xxyx\n        iadd r25.y, r25.z, r25.y\n        imad r25.y, r17.z, r26.z, r25.y\n        imad r25.y, r17.w, r26.w, r25.y\n        ige r25.z, l(0), r25.y\n        or r25.z, r11.w, r25.z\n        ilt r25.w, r25.y, r6.y\n        itof r25.y, r25.y\n        mul r25.y, r25.y, l(63.499989)\n        div r25.y, r25.y, r12.w\n        ftou r25.y, r25.y\n        iadd r25.y, r19.x, r25.y\n        movc r25.y, r25.w, icb[r25.y + 0].w, r19.y\n        movc r25.y, r25.z, l(0), r25.y\n      else \n        ieq r25.z, r25.x, l(1)\n        if_nz r25.z\n          ld_structured r26.xyzw, r23.w, l(0), g0.xyzw\n          iadd r26.xyzw, r21.xyzw, r26.xyzw\n          imul null, r25.zw, r20.xxxy, r26.xxxy\n          iadd r25.z, r25.w, r25.z\n          imad r25.z, r20.z, r26.z, r25.z\n          imad r25.z, r20.w, r26.w, r25.z\n          ige r25.w, l(0), r25.z\n          or r25.w, r15.z, r25.w\n          ilt r26.x, r25.z, r5.z\n          itof r25.z, r25.z\n          mul r25.z, r25.z, l(63.499989)\n          div r25.z, r25.z, r15.w\n          ftou r25.z, r25.z\n          iadd r25.z, r19.x, r25.z\n          movc r25.z, r26.x, icb[r25.z + 0].w, r19.y\n          movc r25.y, r25.w, l(0), r25.z\n        else \n          ld_structured r26.xyzw, r23.w, l(0), g0.xyzw\n          iadd r26.xyzw, r24.xyzw, r26.xyzw\n          imul null, r25.zw, r22.xxxy, r26.xxxy\n          iadd r25.z, r25.w, r25.z\n          imad r25.z, r22.z, r26.z, r25.z\n          imad r25.z, r22.w, r26.w, r25.z\n          ige r25.w, l(0), r25.z\n          or r25.w, r23.y, r25.w\n          ilt r26.x, r25.z, r4.y\n          itof r25.z, r25.z\n          mul r25.z, r25.z, l(63.499989)\n          div r25.z, r25.z, r23.z\n          ftou r25.z, r25.z\n          iadd r25.z, r19.x, r25.z\n          movc r25.z, r26.x, icb[r25.z + 0].w, r19.y\n          movc r25.y, r25.w, l(0), r25.z\n        endif \n      endif \n      iadd r25.y, r19.z, r25.y\n      iadd r25.z, l(64), -icb[r25.y + 64].x\n      ishl r25.x, r25.x, l(2)\n      mov r26.x, x0[r25.x + 0].x\n      mov r26.y, x0[r25.x + 1].x\n      mov r26.z, x0[r25.x + 2].x\n      mov r27.x, x0[r25.x + 0].y\n      mov r27.y, x0[r25.x + 1].y\n      mov r27.z, x0[r25.x + 2].y\n      imul null, r25.xyw, r27.xyxz, icb[r25.y + 64].xxxx\n      imad r25.xyz, r25.zzzz, r26.xyzx, r25.xywx\n      iadd r25.xyz, r25.xyzx, l(32, 32, 32, 0)\n      ushr r25.xyw, r25.xyxz, l(6)\n      ld_structured r26.xyzw, r23.w, l(0), g0.xyzw\n      ult r27.xyz, r25.xywx, r26.xyzx\n      mov r25.z, r26.x\n      movc r27.xw, r27.xxxx, r25.zzzx, r25.xxxz\n      mov r25.xz, r26.yyzy\n      movc r25.xyzw, r27.yyzz, r25.xyzw, r25.yxwz\n      ult r26.x, l(255), r26.w\n      mov r14.x, r26.w\n      movc r26.xw, r26.xxxx, r14.yyyx, r14.xxxy\n      ineg r28.x, r27.w\n      ineg r28.yz, r25.yywy\n      ineg r28.w, r26.x\n      mov r26.x, r27.x\n      mov r26.yz, r25.xxzx\n      iadd r25.xyzw, r28.xyzw, r26.xyzw\n      imul null, r25.xy, r25.xyxx, r25.xyxx\n      iadd r14.x, r25.y, r25.x\n      imad r14.x, r25.z, r25.z, r14.x\n      utof r14.x, r14.x\n      utof r25.x, r25.w\n      mul r25.x, r25.x, r25.x\n      mad r14.x, r25.x, cb0[1].z, r14.x\n      ftou r14.x, r14.x\n      iadd r16.y, r14.x, r16.y\n      iadd r23.w, r23.w, l(1)\n    endloop \n    ult r3.z, r16.y, r15.y\n    movc r15.xy, r3.zzzz, r16.xyxx, r15.xyxx\n    iadd r16.x, r16.x, l(1)\n  endloop \n  store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r15.y\n  store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r0.y\n  store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r15.x\nendif \nsync_g_t\nif_nz r1.y\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(32)\n  ld_structured r3.x, r0.y, l(16), g0.xxxx\n  ld_structured r4.x, r0.y, l(24), g0.xxxx\n  ld_structured r5.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r3.x, r2.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r4.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r5.x\n  endif \nendif \nif_nz r1.x\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(16)\n  ld_structured r3.x, r0.y, l(16), g0.xxxx\n  ld_structured r4.x, r0.y, l(24), g0.xxxx\n  ld_structured r5.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r3.x, r2.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r4.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r5.x\n  endif \nendif \nif_nz r1.z\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r3.x, r0.y, l(16), g0.xxxx\n  ld_structured r4.x, r0.y, l(24), g0.xxxx\n  ld_structured r5.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r3.x, r2.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r4.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r5.x\n  endif \nendif \nif_nz r1.w\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r2.x, r0.y, l(16), g0.xxxx\n  ld_structured r3.x, r0.y, l(24), g0.xxxx\n  ld_structured r4.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r2.x, r1.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r2.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r4.x\n  endif \nendif \nult r0.yz, vThreadIDInGroupFlattened.xxxx, l(0, 2, 1, 0)\nif_nz r0.y\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r2.x, r0.y, l(16), g0.xxxx\n  ld_structured r3.x, r0.y, l(24), g0.xxxx\n  ld_structured r4.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r2.x, r1.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r2.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r4.x\n  endif \nendif \nif_nz r0.z\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r2.x, r0.y, l(16), g0.xxxx\n  ld_structured r3.x, r0.y, l(24), g0.xxxx\n  ld_structured r4.x, r0.y, l(32), g0.xxxx\n  ult r0.y, r2.x, r1.x\n  if_nz r0.y\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(16), r2.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(24), r3.x\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r4.x\n  endif \n  ld_structured r1.x, r0.x, l(0), t1.xxxx\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  ult r0.y, r2.x, r1.x\n  if_nz r0.y\n    ld_structured r2.z, vThreadIDInGroupFlattened.x, l(24), g0.xxxx\n    ld_structured r2.w, vThreadIDInGroupFlattened.x, l(32), g0.xxxx\n    mov r2.y, cb0[0].w\n  else \n    ld_structured r2.xyzw, r0.x, l(0), t1.xyzw\n  endif \n  store_structured u0.xyzw, r0.x, l(0), r2.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC7Encode_TryMode02CS[] =\n{\n     68,  88,  66,  67, 122,   4, \n    188,  46, 162, 127,  38, 170, \n     88, 175, 162, 101, 250, 119, \n     32, 234,   1,   0,   0,   0, \n    172,  70,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88,  88,  70,   0,   0, \n     64,   0,   5,   0, 150,  17, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,   2,   3, \n      0,   0,  80,  80, 104, 170, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     64,  80,  90, 106,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,  66, \n     90,  90,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 168, 160,  80,  84, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0, 165, 165,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  80,  80, \n    160, 160,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0, 160, 160,  85,  85, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     80,  80,  90,  90,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n     85, 170,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,  85,  85, 170, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,  85, 170, 170,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0, 144, 144, \n    144, 144,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0, 148, 148, 148, 148, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n    164, 164, 164, 164,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  80, 148, \n    165, 169,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  80,  66,  10,  42, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     64,  80, 148, 165,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  84,  80, \n     66,  10,   2,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0, 165, 165, 165, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n    160, 160, 160,  85,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  84,  84, \n    168, 168,   2,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  64,  64, 106, 106, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,  80, 164, 164,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   5, \n     26,  26,  15,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0, 164, 164,  80,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n    144, 144, 165, 170,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  20, 105, \n    105,  20,   2,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,  20, 105, 105, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n    160, 133, 133, 160,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  20,  20, \n    130, 170,   8,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  80, 164, 164,  80, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   2,  90, 106,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0, 128, \n    165, 169,  15,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0, 168, 160, 144,  80, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     80, 144, 160, 168,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  36,  36, \n     36,  36,   8,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   0,  85, 170,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     36,  73, 146,  36,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,  36, 146, \n     73,  36,  15,   0,   0,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,  80,  10, 165,  80, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     80, 165,  10,  80,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,  68,  68, \n    170, 170,   8,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   0,   0, 102, 102, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n    160, 165, 160, 165,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0, 160,  80, \n    160,  80,   2,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  40, 105,  40, 105, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     68, 170, 170,  68,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   0, 102, \n    102, 102,   6,   0,   0,   0, \n      0,   0,   0,   0,  11,   0, \n      0,   0,  68,  68,  68, 170, \n      6,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n    168,  84, 168,  84,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0, 128, 149, \n    128, 149,   6,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   0, 150, 150, 150, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n    168,  84,  84, 168,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0, 128, 149, \n    149, 128,  15,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,  20,  20,  20, 170, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0, 150, 150,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  20,  20, \n    170, 170,  15,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0, 160,  80,  80, 160, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n    160, 165, 165, 160,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0, 150,  15,   0,   0,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   0, 128,  64, 128,  64, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n    168, 169, 168, 169,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,  68, 170, \n    170, 170,   2,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  84,  82,  74,  42, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  17,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  21,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,   0,  34,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     38,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,  43,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,  47,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     51,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,  60,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n     64,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,   9,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   2,   0,   0,   0, \n     18,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      2,   0,   0,   0,  27,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,  37,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n     46,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      2,   0,   0,   0,  55,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,  64,   0,   0,   0, \n     10,   0,   0,   0,   8,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   3,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,   6,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  10,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n     21,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      4,   0,   0,   0,  43,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   4,   0, \n      0,   0,  64,   0,   0,   0, \n      5,   0,   0,   0,  10,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,   9,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  10,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   8,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n     15,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     88,  24,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0, 162,   0, \n      0,   4,   0, 112,  16,   0, \n      1,   0,   0,   0,  16,   0, \n      0,   0, 158,   0,   0,   4, \n      0, 224,  17,   0,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     95,   0,   0,   2,   0,  64, \n      2,   0,  95,   0,   0,   2, \n     18,  16,   2,   0, 104,   0, \n      0,   2,  29,   0,   0,   0, \n    105,   0,   0,   4,   0,   0, \n      0,   0,  12,   0,   0,   0, \n      4,   0,   0,   0, 105,   0, \n      0,   4,   1,   0,   0,   0, \n      3,   0,   0,   0,   4,   0, \n      0,   0, 105,   0,   0,   4, \n      2,   0,   0,   0,   3,   0, \n      0,   0,   4,   0,   0,   0, \n    105,   0,   0,   4,   3,   0, \n      0,   0,   3,   0,   0,   0, \n      4,   0,   0,   0, 160,   0, \n      0,   5,   0, 240,  17,   0, \n      0,   0,   0,   0, 100,   0, \n      0,   0,  64,   0,   0,   0, \n    155,   0,   0,   4,  64,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,  16, \n      2,   0,  10, 128,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  79,   0,   0,   9, \n    242,   0,  16,   0,   1,   0, \n      0,   0,   6,  64,   2,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  78,   0,   0,   9, \n     34,   0,  16,   0,   0,   0, \n      0,   0,   0, 208,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  35,   0,   0,  11, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   6,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   8, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  45,   0, \n      0,   7, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,  56,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 127,  67, \n      0,   0, 127,  67,   0,   0, \n    127,  67,   0,   0, 127,  67, \n     28,   0,   0,   5, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  84,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n    190,  24,   0,   1, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     55,   0,   0,  10,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  79,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 192, 255, \n    255, 255,  54,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,  80,   0,   0,   7, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      3,   0,   4,   3,  10,   0, \n     16,   0,   2,   0,   0,   0, \n    167,   0,   0,   9, 114,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 242, \n     17,   0,   0,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   8, 130,   0,  16,   0, \n      2,   0,   0,   0,  10, 144, \n    144,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  32,   0, \n      0,   7,  18,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  84,   0,   0,   7, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     83,   0,   0,   7, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     84,   0,   0,   7, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  83,   0, \n      0,   7, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  18,   0,   0,   1, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     84,   0,   0,   7, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      3,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  83,   0, \n      0,   7, 114,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   6,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   7,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   7,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   7,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     55,   0,   0,  10, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n     30,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n     84,   0,   0,  10, 114,   0, \n     16,   0,   3,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      9,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,  30,   0,   0,   0, \n     30,   0,   0,   0,  30,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   2,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,   3,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,   3,   0, \n      0,   0,  70,   2,  16,   0, \n      3,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  10,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n     30,   0,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      2,  64,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n     30,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n      4,   0,   0,   0,   2,  64, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      4,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      5,   0,   0,   0,  70,   2, \n     16,   0,   5,   0,   0,   0, \n     70,   2,  16,   0,  12,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n     84,   0,   0,  10, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     12,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  12,   0, \n      0,   0,  70,   2,  16,   0, \n     12,   0,   0,   0,   2,  64, \n      0,   0,  30,   0,   0,   0, \n     30,   0,   0,   0,  30,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      4,   0,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n     30,   0,   0,   0,  30,   0, \n      0,   0,  30,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      2,  64,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   4,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     14,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   8,  50,   0, \n     16,   0,  15,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0, 255, 255, 255, 255, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  16,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,  80,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n     16,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      3,   0,   4,   3,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     32,   0,   0,   7,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  31,   0, \n      0,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  34,   0,  16,   0, \n     16,   0,   0,   0,  10,   0, \n     16,   0,  16,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,  14,   0, \n      0,   0,   6,   4,  16,   0, \n     16,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0, 166,  10,  16,   0, \n     14,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     17,   0,   0,   0,  70,   2, \n     16,   0,  17,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     17,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 210,   0, \n     16,   0,  17,   0,   0,   0, \n    166,   4,  16,   0,  17,   0, \n      0,   0, 166,   4,  16,   0, \n     18,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     18,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n    246,  15,  16,   0,  14,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  18,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     18,   0,   0,   0,  22,   6, \n     16,   0,  18,   0,   0,   0, \n     22,   6,  16,   0,  19,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,  17,   0, \n      0,   0,  42,   0,  16,   0, \n     18,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  17,   0,   0,   0, \n     54,   0,   0,   5, 194,   0, \n     16,   0,  14,   0,   0,   0, \n    246,   3,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  18,   0, \n      0,   0,  42,   0,  16,   0, \n     17,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   5, \n     50,   0,  16,   0,  17,   0, \n      0,   0, 230,  10,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   5, 194,   0,  16,   0, \n     14,   0,   0,   0, 246,   7, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  18,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,  18,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  54,   0,   0,   9, \n     50,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     50,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     70,   0,  16,   0,  17,   0, \n      0,   0,  54,   0,   0,   6, \n     50,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n    230,  10,  16,   0,  14,   0, \n      0,   0,  54,   0,   0,   6, \n     50,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     70,   0,  16,   0,  18,   0, \n      0,   0,  31,   0,   0,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,  19,   0, \n      0,   0,  10,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,  19,   0,   0,   0, \n     10,   0,  16,   0,  16,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n     15,   0,   0,   0,   6,   4, \n     16,   0,  19,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0, 166,  10, \n     16,   0,  15,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  19,   0,   0,   0, \n     70,   2,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    210,   0,  16,   0,  19,   0, \n      0,   0, 166,   4,  16,   0, \n     19,   0,   0,   0, 166,   4, \n     16,   0,  20,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0, 246,  15,  16,   0, \n     15,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     22,   6,  16,   0,  20,   0, \n      0,   0,  22,   6,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     19,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,  54,   0,   0,   5, \n    194,   0,  16,   0,  15,   0, \n      0,   0, 246,   3,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  19,   0,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   5,  50,   0,  16,   0, \n     19,   0,   0,   0, 230,  10, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 194,   0, \n     16,   0,  15,   0,   0,   0, \n    246,   7,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     20,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1,  54,   0, \n      0,   9,  50,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  50,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  70,   0,  16,   0, \n     19,   0,   0,   0,  54,   0, \n      0,   6,  50,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0, 230,  10,  16,   0, \n     15,   0,   0,   0,  54,   0, \n      0,   6,  50,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  70,   0,  16,   0, \n     20,   0,   0,   0,  31,   0, \n      0,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  18,   0,  16,   0, \n     21,   0,   0,   0,  10,   0, \n     16,   0,  16,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  21,   0, \n      0,   0,  10,   0,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,  16,   0,   0,   0, \n      6,   4,  16,   0,  21,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n    166,  10,  16,   0,  16,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  22,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 210,   0,  16,   0, \n     21,   0,   0,   0, 166,   4, \n     16,   0,  21,   0,   0,   0, \n    166,   4,  16,   0,  22,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  22,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0, 246,  15, \n     16,   0,  16,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  22,   0,   0,   0, \n     70,   2,  16,   0,  22,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     23,   0,   0,   0,  70,   2, \n     16,   0,  22,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  22,   0, \n      0,   0,  22,   6,  16,   0, \n     22,   0,   0,   0,  22,   6, \n     16,   0,  23,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,  21,   0,   0,   0, \n     42,   0,  16,   0,  22,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,  22,   0, \n      0,   0,  58,   0,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   5, 194,   0,  16,   0, \n     16,   0,   0,   0, 246,   3, \n     16,   0,  22,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  22,   0,   0,   0, \n     42,   0,  16,   0,  21,   0, \n      0,   0,  18,   0,   0,   1, \n     54,   0,   0,   5,  50,   0, \n     16,   0,  21,   0,   0,   0, \n    230,  10,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   5, \n    194,   0,  16,   0,  16,   0, \n      0,   0, 246,   7,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n     22,   0,   0,   0,  10,   0, \n     16,   0,   6,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,  22,   0,   0,   0, \n     10,   0,  16,   0,   7,   0, \n      0,   0,  21,   0,   0,   1, \n     54,   0,   0,   9,  50,  48, \n     32,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  50,  48, \n     32,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,  70,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  50,  48, \n     32,   0,   0,   0,   0,   0, \n      9,   0,   0,   0, 230,  10, \n     16,   0,  16,   0,   0,   0, \n     54,   0,   0,   6,  50,  48, \n     32,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  70,   0, \n     16,   0,  22,   0,   0,   0, \n     40,   0,   0,   5,  18,   0, \n     16,   0,  23,   0,   0,   0, \n     10,   0,  16,   0,  18,   0, \n      0,   0,  40,   0,   0,   5, \n     34,   0,  16,   0,  23,   0, \n      0,   0,  42,   0,  16,   0, \n     14,   0,   0,   0,  40,   0, \n      0,   5,  66,   0,  16,   0, \n     23,   0,   0,   0,  10,   0, \n     16,   0,  17,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,  18,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  26,   0,  16,   0, \n     17,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     17,   0,   0,   0, 150,   7, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  23,   0, \n      0,   0,  54,   0,   0,   6, \n    114,  48,  32,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     70,   2,  16,   0,  17,   0, \n      0,   0,  40,   0,   0,   5, \n     18,   0,  16,   0,  18,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  40,   0, \n      0,   5,  34,   0,  16,   0, \n     18,   0,   0,   0,  42,   0, \n     16,   0,  15,   0,   0,   0, \n     40,   0,   0,   5,  66,   0, \n     16,   0,  18,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     15,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     20,   0,   0,   0,  26,   0, \n     16,   0,  19,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  18,   0,   0,   0, \n     70,   2,  16,   0,  18,   0, \n      0,   0, 150,   7,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   6, 114,  48,  32,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  70,   2,  16,   0, \n     18,   0,   0,   0,  40,   0, \n      0,   5,  18,   0,  16,   0, \n     19,   0,   0,   0,  10,   0, \n     16,   0,  22,   0,   0,   0, \n     40,   0,   0,   5,  34,   0, \n     16,   0,  19,   0,   0,   0, \n     42,   0,  16,   0,  16,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,  19,   0, \n      0,   0,  10,   0,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n     22,   0,   0,   0,  58,   0, \n     16,   0,  16,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  22,   0,   0,   0, \n     26,   0,  16,   0,  21,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  19,   0, \n      0,   0,  70,   2,  16,   0, \n     19,   0,   0,   0, 150,   7, \n     16,   0,  22,   0,   0,   0, \n     54,   0,   0,   6, 114,  48, \n     32,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  19,   0,   0,   0, \n     54,   0,   0,   6, 130,  48, \n     32,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,  48, \n     32,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,  48, \n     32,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0, 194,   0,  16,   0, \n     14,   0,   0,   0,   6,   4, \n     16,   0,  17,   0,   0,   0, \n      6,   4,  16,   0,  17,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n     35,   0,   0,   9,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     42,   0,  16,   0,  17,   0, \n      0,   0,  42,   0,  16,   0, \n     17,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0, 194,   0,  16,   0, \n     14,   0,   0,   0,   6,   4, \n     16,   0,  18,   0,   0,   0, \n      6,   4,  16,   0,  18,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n     35,   0,   0,   9,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,  18,   0, \n      0,   0,  42,   0,  16,   0, \n     18,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   2,   0,   0,   0, \n      1,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0, 194,   0,  16,   0, \n     14,   0,   0,   0,   6,   4, \n     16,   0,  19,   0,   0,   0, \n      6,   4,  16,   0,  19,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n     35,   0,   0,   9,  34,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,  19,   0, \n      0,   0,  42,   0,  16,   0, \n     19,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   7,  18,  48, \n     32,   0,   3,   0,   0,   0, \n      1,   0,   0,   0,  26, 144, \n    144,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   7,  18,  48,  32,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,  42, 144, 144,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,  80,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n      3,   0,   4,   3,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     54,   0,   0,   7, 242,   0, \n     16,   0,  17,   0,   0,   0, \n     70,  62,  32,   4,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   7, 130,   0,  16,   0, \n      8,   0,   0,   0,  10,  48, \n     32,   4,   3,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     10,  48,  32,   4,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  54,   0, \n      0,   8, 130,   0,  16,   0, \n     10,   0,   0,   0,  10,  48, \n     32,   6,   0,   0,   0,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     54,   0,   0,   8, 130,   0, \n     16,   0,  11,   0,   0,   0, \n     10,  48,  32,   6,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   8, \n    130,   0,  16,   0,  12,   0, \n      0,   0,  10,  48,  32,   6, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  40,   0, \n      0,   5,  18,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     40,   0,   0,   5,  34,   0, \n     16,   0,  19,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     11,   0,   0,   0,  40,   0, \n      0,   5, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  12,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  18,   0,   0,   0, \n     70,  14,  16,   0,  18,   0, \n      0,   0,  70,  14,  16,   0, \n     19,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    194,   0,  16,   0,  14,   0, \n      0,   0,   6,   4,  16,   0, \n     17,   0,   0,   0,   6,   4, \n     16,   0,  18,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  42,   0,  16,   0, \n     14,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     13,   0,   0,   0,  42,   0, \n     16,   0,  17,   0,   0,   0, \n     42,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     13,   0,   0,   0,  58,   0, \n     16,   0,  17,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  54,   0, \n      0,   7,  66,   0,  16,   0, \n     14,   0,   0,   0,  10,  48, \n     32,   4,   2,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  34,   0,   0,   7, \n    130,   0,  16,   0,  14,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n     34,   0,   0,   7,  66,   0, \n     16,   0,  15,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n     42,   0,  16,   0,  15,   0, \n      0,   0,  43,   0,   0,   5, \n    130,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  56,   0, \n      0,   7, 130,   0,  16,   0, \n     13,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  28,   0,   0,   5, \n    130,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,  13,   0, \n      0,   0,  42,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  31,   0, \n      4,   3,  58,   0,  16,   0, \n     13,   0,   0,   0,  40,   0, \n      0,   5, 242,   0,  16,   0, \n     17,   0,   0,   0,  70,  14, \n     16,   0,  17,   0,   0,   0, \n     54,   0,   0,   7, 242,  48, \n     32,   4,   1,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n     17,   0,   0,   0,  54,   0, \n      0,   7, 130,   0,  16,   0, \n     13,   0,   0,   0,  26,  48, \n     32,   4,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   8, \n     66,   0,  16,   0,  14,   0, \n      0,   0,  26,  48,  32,   6, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  54,   0, \n      0,   8, 130,   0,  16,   0, \n     14,   0,   0,   0,  26,  48, \n     32,   6,   0,   0,   0,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     54,   0,   0,   8,  66,   0, \n     16,   0,  15,   0,   0,   0, \n     26,  48,  32,   6,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  54,   0,   0,   7, \n     18,  48,  32,   4,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n     54,   0,   0,   8,  18,  48, \n     32,   6,   0,   0,   0,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,  14,   0, \n      0,   0,  54,   0,   0,   8, \n     18,  48,  32,   6,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  54,   0, \n      0,   8,  18,  48,  32,   6, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  42,   0, \n     16,   0,  15,   0,   0,   0, \n     54,   0,   0,   7,  34,  48, \n     32,   4,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  54,   0, \n      0,   8,  34,  48,  32,   6, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     54,   0,   0,   8,  34,  48, \n     32,   6,   0,   0,   0,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,  11,   0, \n      0,   0,  54,   0,   0,   8, \n     34,  48,  32,   6,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n     12,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   7, \n     66,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  54,   0, \n      0,   6, 242,   0,  16,   0, \n     17,   0,   0,   0,  70,  62, \n     32,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      7,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      8,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      9,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     10,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,  40,   0, \n      0,   5,  18,   0,  16,   0, \n     18,   0,   0,   0,  42,   0, \n     16,   0,   7,   0,   0,   0, \n     40,   0,   0,   5,  34,   0, \n     16,   0,  18,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  40,   0, \n      0,   5, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     33,   0,   0,   7, 130,   0, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      6,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n     12,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     55,   0,   0,  15, 114,   0, \n     16,   0,  19,   0,   0,   0, \n    166,  10,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    128,   0,   0,   0,   3,   0, \n      0,   0,  32,   0,   0,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,  64,   0,   0,   0, \n      7,   0,   0,   0,  16,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 242,   0, \n     16,   0,  20,   0,   0,   0, \n     70,  62,  32,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,  14,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,  14,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     40,   0,   0,   5,  18,   0, \n     16,   0,  21,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  40,   0,   0,   5, \n     34,   0,  16,   0,  21,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  40,   0, \n      0,   5, 194,   0,  16,   0, \n     21,   0,   0,   0, 166,  14, \n     16,   0,  14,   0,   0,   0, \n     33,   0,   0,   7,  66,   0, \n     16,   0,  15,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n     15,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   6, 242,   0, \n     16,   0,  22,   0,   0,   0, \n     70,  62,  32,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,  16,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,  16,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,  19,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,  23,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     40,   0,   0,   5,  50,   0, \n     16,   0,  24,   0,   0,   0, \n    230,  10,  16,   0,  16,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,  24,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  40,   0, \n      0,   5, 130,   0,  16,   0, \n     24,   0,   0,   0,  10,   0, \n     16,   0,  23,   0,   0,   0, \n     33,   0,   0,   7,  34,   0, \n     16,   0,  23,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,  43,   0, \n      0,   5,  66,   0,  16,   0, \n     23,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  23,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,  16,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  48,   0, \n      0,   1,  80,   0,   0,   7, \n     18,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      3,   0,   4,   3,  10,   0, \n     16,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  25,   0,   0,   0, \n     58,   0,  16,   0,  23,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   8,  18,   0,  16,   0, \n     25,   0,   0,   0,  10, 144, \n    144,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n      1,   0,   0,   7,  18,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  32,   0, \n      0,   7,  34,   0,  16,   0, \n     25,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,  25,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,  26,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  26,   0, \n      0,   0,  70,  14,  16,   0, \n     18,   0,   0,   0,  70,  14, \n     16,   0,  26,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  98,   0,  16,   0, \n     25,   0,   0,   0,   6,   1, \n     16,   0,  17,   0,   0,   0, \n      6,   1,  16,   0,  26,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9,  34,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  17,   0, \n      0,   0,  42,   0,  16,   0, \n     26,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9,  34,   0, \n     16,   0,  25,   0,   0,   0, \n     58,   0,  16,   0,  17,   0, \n      0,   0,  58,   0,  16,   0, \n     26,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     33,   0,   0,   7,  66,   0, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n     25,   0,   0,   0,  60,   0, \n      0,   7,  66,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  34,   0,   0,   7, \n    130,   0,  16,   0,  25,   0, \n      0,   0,  26,   0,  16,   0, \n     25,   0,   0,   0,  26,   0, \n     16,   0,   6,   0,   0,   0, \n     43,   0,   0,   5,  34,   0, \n     16,   0,  25,   0,   0,   0, \n     26,   0,  16,   0,  25,   0, \n      0,   0,  56,   0,   0,   7, \n     34,   0,  16,   0,  25,   0, \n      0,   0,  26,   0,  16,   0, \n     25,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7,  34,   0, \n     16,   0,  25,   0,   0,   0, \n     26,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     12,   0,   0,   0,  28,   0, \n      0,   5,  34,   0,  16,   0, \n     25,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,  26,   0,  16,   0, \n     25,   0,   0,   0,  55,   0, \n      0,  10,  34,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  25,   0,   0,   0, \n     58, 144, 144,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     26,   0,  16,   0,  19,   0, \n      0,   0,  55,   0,   0,   9, \n     34,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,  25,   0, \n      0,   0,  18,   0,   0,   1, \n     32,   0,   0,   7,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n     25,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n     26,   0,   0,   0,  58,   0, \n     16,   0,  23,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     26,   0,   0,   0,  70,  14, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  26,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0, 194,   0, \n     16,   0,  25,   0,   0,   0, \n      6,   4,  16,   0,  20,   0, \n      0,   0,   6,   4,  16,   0, \n     26,   0,   0,   0,  30,   0, \n      0,   7,  66,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  35,   0,   0,   9, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  26,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  35,   0,   0,   9, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0,  58,   0, \n     16,   0,  26,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  33,   0,   0,   7, \n    130,   0,  16,   0,  25,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n     25,   0,   0,   0,  34,   0, \n      0,   7,  18,   0,  16,   0, \n     26,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  43,   0,   0,   5, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  56,   0, \n      0,   7,  66,   0,  16,   0, \n     25,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  14,   0,   0,   7, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  15,   0,   0,   0, \n     28,   0,   0,   5,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     55,   0,   0,  10,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  26,   0, \n      0,   0,  58, 144, 144,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  26,   0,  16,   0, \n     19,   0,   0,   0,  55,   0, \n      0,   9,  34,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  18,   0, \n      0,   1, 167,   0,   0,   9, \n    242,   0,  16,   0,  26,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  26,   0, \n      0,   0,  70,  14,  16,   0, \n     24,   0,   0,   0,  70,  14, \n     16,   0,  26,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0, 194,   0,  16,   0, \n     25,   0,   0,   0,   6,   4, \n     16,   0,  22,   0,   0,   0, \n      6,   4,  16,   0,  26,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     25,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  22,   0, \n      0,   0,  42,   0,  16,   0, \n     26,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     58,   0,  16,   0,  22,   0, \n      0,   0,  58,   0,  16,   0, \n     26,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     33,   0,   0,   7, 130,   0, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  60,   0, \n      0,   7, 130,   0,  16,   0, \n     25,   0,   0,   0,  26,   0, \n     16,   0,  23,   0,   0,   0, \n     58,   0,  16,   0,  25,   0, \n      0,   0,  34,   0,   0,   7, \n     18,   0,  16,   0,  26,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  26,   0, \n     16,   0,   4,   0,   0,   0, \n     43,   0,   0,   5,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  56,   0,   0,   7, \n     66,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     14,   0,   0,   7,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     23,   0,   0,   0,  28,   0, \n      0,   5,  66,   0,  16,   0, \n     25,   0,   0,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  55,   0, \n      0,  10,  66,   0,  16,   0, \n     25,   0,   0,   0,  10,   0, \n     16,   0,  26,   0,   0,   0, \n     58, 144, 144,   0,  42,   0, \n     16,   0,  25,   0,   0,   0, \n     26,   0,  16,   0,  19,   0, \n      0,   0,  55,   0,   0,   9, \n     34,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     25,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  30,   0, \n      0,   7,  34,   0,  16,   0, \n     25,   0,   0,   0,  42,   0, \n     16,   0,  19,   0,   0,   0, \n     26,   0,  16,   0,  25,   0, \n      0,   0,  30,   0,   0,  10, \n     66,   0,  16,   0,  25,   0, \n      0,   0,   1,  64,   0,   0, \n     64,   0,   0,   0,  10, 144, \n    208, 128,  65,   0,   0,   0, \n     64,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     41,   0,   0,   7,  18,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   7,  18,   0,  16,   0, \n     26,   0,   0,   0,  10,  48, \n     32,   4,   0,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,  54,   0,   0,   8, \n     34,   0,  16,   0,  26,   0, \n      0,   0,  10,  48,  32,   6, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n     25,   0,   0,   0,  54,   0, \n      0,   8,  66,   0,  16,   0, \n     26,   0,   0,   0,  10,  48, \n     32,   6,   0,   0,   0,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n     54,   0,   0,   7,  18,   0, \n     16,   0,  27,   0,   0,   0, \n     26,  48,  32,   4,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     25,   0,   0,   0,  54,   0, \n      0,   8,  34,   0,  16,   0, \n     27,   0,   0,   0,  26,  48, \n     32,   6,   0,   0,   0,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n     54,   0,   0,   8,  66,   0, \n     16,   0,  27,   0,   0,   0, \n     26,  48,  32,   6,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,  38,   0,   0,  10, \n      0, 208,   0,   0, 178,   0, \n     16,   0,  25,   0,   0,   0, \n     70,   8,  16,   0,  27,   0, \n      0,   0,   6, 144, 208,   0, \n     64,   0,   0,   0,  26,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9, 114,   0, \n     16,   0,  25,   0,   0,   0, \n    166,  10,  16,   0,  25,   0, \n      0,   0,  70,   2,  16,   0, \n     26,   0,   0,   0,  70,   3, \n     16,   0,  25,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  25,   0,   0,   0, \n     70,   2,  16,   0,  25,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,  32,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 178,   0,  16,   0, \n     25,   0,   0,   0,  70,   8, \n     16,   0,  25,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,  26,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n    114,   0,  16,   0,  27,   0, \n      0,   0,  70,   3,  16,   0, \n     25,   0,   0,   0,  70,   2, \n     16,   0,  26,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  26,   0, \n      0,   0,  55,   0,   0,   9, \n    146,   0,  16,   0,  27,   0, \n      0,   0,   6,   0,  16,   0, \n     27,   0,   0,   0, 166,   2, \n     16,   0,  25,   0,   0,   0, \n      6,   8,  16,   0,  25,   0, \n      0,   0,  54,   0,   0,   5, \n     82,   0,  16,   0,  25,   0, \n      0,   0,  86,   6,  16,   0, \n     26,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n     25,   0,   0,   0,  86,  10, \n     16,   0,  27,   0,   0,   0, \n     70,  14,  16,   0,  25,   0, \n      0,   0,  22,  11,  16,   0, \n     25,   0,   0,   0,  79,   0, \n      0,   7,  18,   0,  16,   0, \n     26,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     58,   0,  16,   0,  26,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  14,   0, \n      0,   0,  58,   0,  16,   0, \n     26,   0,   0,   0,  55,   0, \n      0,   9, 146,   0,  16,   0, \n     26,   0,   0,   0,   6,   0, \n     16,   0,  26,   0,   0,   0, \n     86,   1,  16,   0,  14,   0, \n      0,   0,   6,   4,  16,   0, \n     14,   0,   0,   0,  40,   0, \n      0,   5,  18,   0,  16,   0, \n     28,   0,   0,   0,  58,   0, \n     16,   0,  27,   0,   0,   0, \n     40,   0,   0,   5,  98,   0, \n     16,   0,  28,   0,   0,   0, \n     86,   7,  16,   0,  25,   0, \n      0,   0,  40,   0,   0,   5, \n    130,   0,  16,   0,  28,   0, \n      0,   0,  10,   0,  16,   0, \n     26,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n     26,   0,   0,   0,  10,   0, \n     16,   0,  27,   0,   0,   0, \n     54,   0,   0,   5,  98,   0, \n     16,   0,  26,   0,   0,   0, \n      6,   2,  16,   0,  25,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  25,   0, \n      0,   0,  70,  14,  16,   0, \n     28,   0,   0,   0,  70,  14, \n     16,   0,  26,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  50,   0,  16,   0, \n     25,   0,   0,   0,  70,   0, \n     16,   0,  25,   0,   0,   0, \n     70,   0,  16,   0,  25,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,  14,   0, \n      0,   0,  26,   0,  16,   0, \n     25,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n     35,   0,   0,   9,  18,   0, \n     16,   0,  14,   0,   0,   0, \n     42,   0,  16,   0,  25,   0, \n      0,   0,  42,   0,  16,   0, \n     25,   0,   0,   0,  10,   0, \n     16,   0,  14,   0,   0,   0, \n     86,   0,   0,   5,  18,   0, \n     16,   0,  14,   0,   0,   0, \n     10,   0,  16,   0,  14,   0, \n      0,   0,  86,   0,   0,   5, \n     18,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     25,   0,   0,   0,  56,   0, \n      0,   7,  18,   0,  16,   0, \n     25,   0,   0,   0,  10,   0, \n     16,   0,  25,   0,   0,   0, \n     10,   0,  16,   0,  25,   0, \n      0,   0,  50,   0,   0,  10, \n     18,   0,  16,   0,  14,   0, \n      0,   0,  10,   0,  16,   0, \n     25,   0,   0,   0,  42, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,  14,   0,   0,   0, \n     28,   0,   0,   5,  18,   0, \n     16,   0,  14,   0,   0,   0, \n     10,   0,  16,   0,  14,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,  16,   0, \n      0,   0,  10,   0,  16,   0, \n     14,   0,   0,   0,  26,   0, \n     16,   0,  16,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,  23,   0,   0,   0, \n     58,   0,  16,   0,  23,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  79,   0,   0,   7, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n     16,   0,   0,   0,  26,   0, \n     16,   0,  15,   0,   0,   0, \n     55,   0,   0,   9,  50,   0, \n     16,   0,  15,   0,   0,   0, \n    166,  10,  16,   0,   3,   0, \n      0,   0,  70,   0,  16,   0, \n     16,   0,   0,   0,  70,   0, \n     16,   0,  15,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,  16,   0,   0,   0, \n     10,   0,  16,   0,  16,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  26,   0,  16,   0, \n     15,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n     10,   0,  16,   0,  15,   0, \n      0,   0,  21,   0,   0,   1, \n    190,  24,   0,   1,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     42,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n     10,   0,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     79,   0,   0,   9,  98,   0, \n     16,   0,   0,   0,   0,   0, \n      6,  64,   2,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,  10,   0, \n     16,   0,   4,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  24,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0, 168,   0, \n      0,   8,  18, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     24,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n    168,   0,   0,   8,  18, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,   6, 112, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  24,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    130,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      2,   0,   0,   0,  58, 128, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  18,   0, \n      0,   1, 167,   0,   0,   9, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 126,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n    168,   0,   0,   9, 242, 224, \n     17,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1,  62,   0, \n      0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC7Encode_TryMode137CS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 0x0000cccc, 15, 0, 0},\n                              { 0x00008888, 15, 0, 0},\n                              { 0x0000eeee, 15, 0, 0},\n                              { 0x0000ecc8, 15, 0, 1},\n                              { 0x0000c880, 15, 0, 1},\n                              { 0x0000feec, 15, 0, 1},\n                              { 0x0000fec8, 15, 0, 1},\n                              { 0x0000ec80, 15, 0, 2},\n                              { 0x0000c800, 15, 0, 2},\n                              { 0x0000ffec, 15, 0, 2},\n                              { 0x0000fe80, 15, 0, 2},\n                              { 0x0000e800, 15, 0, 2},\n                              { 0x0000ffe8, 15, 0, 3},\n                              { 0x0000ff00, 15, 0, 3},\n                              { 0x0000fff0, 15, 0, 3},\n                              { 0x0000f000, 15, 0, 3},\n                              { 0x0000f710, 15, 0, 4},\n                              { 142, 2, 0, 4},\n                              { 0x00007100, 8, 0, 4},\n                              { 2254, 2, 0, 4},\n                              { 140, 2, 0, 5},\n                              { 0x00007310, 8, 0, 5},\n                              { 0x00003100, 8, 0, 5},\n                              { 0x00008cce, 15, 0, 5},\n                              { 2188, 2, 0, 6},\n                              { 0x00003110, 8, 0, 6},\n                              { 0x00006666, 2, 0, 6},\n                              { 0x0000366c, 2, 0, 6},\n                              { 6120, 8, 0, 6},\n                              { 4080, 8, 0, 7},\n                              { 0x0000718e, 2, 0, 7},\n                              { 0x0000399c, 2, 0, 7},\n                              { 0x0000aaaa, 15, 0, 7},\n                              { 0x0000f0f0, 15, 0, 8},\n                              { 0x00005a5a, 6, 0, 8},\n                              { 0x000033cc, 8, 0, 8},\n                              { 0x00003c3c, 2, 0, 8},\n                              { 0x000055aa, 8, 0, 9},\n                              { 0x00009696, 15, 0, 9},\n                              { 0x0000a55a, 15, 0, 9},\n                              { 0x000073ce, 2, 0, 9},\n                              { 5064, 8, 0, 10},\n                              { 0x0000324c, 2, 0, 10},\n                              { 0x00003bdc, 2, 0, 10},\n                              { 0x00006996, 2, 0, 10},\n                              { 0x0000c33c, 15, 0, 10},\n                              { 0x00009966, 15, 0, 11},\n                              { 1632, 6, 0, 11},\n                              { 626, 6, 0, 11},\n                              { 1252, 2, 0, 11},\n                              { 0x00004e40, 6, 0, 12},\n                              { 0x00002720, 8, 0, 12},\n                              { 0x0000c936, 15, 0, 12},\n                              { 0x0000936c, 15, 0, 12},\n                              { 0x000039c6, 2, 0, 13},\n                              { 0x0000639c, 2, 0, 13},\n                              { 0x00009336, 15, 0, 13},\n                              { 0x00009cc6, 15, 0, 13},\n                              { 0x0000817e, 15, 0, 14},\n                              { 0x0000e718, 15, 0, 14},\n                              { 0x0000ccf0, 15, 0, 14},\n                              { 4044, 2, 0, 14},\n                              { 0x00007744, 2, 0, 15},\n                              { 0x0000ee22, 15, 0, 15},\n                              { 0, 3, 15, 0},\n                              { 4, 3, 8, 0},\n                              { 9, 15, 8, 0},\n                              { 13, 15, 3, 0},\n                              { 17, 8, 15, 0},\n                              { 21, 3, 15, 1},\n                              { 26, 15, 3, 1},\n                              { 30, 15, 8, 1},\n                              { 34, 8, 15, 1},\n                              { 38, 8, 15, 1},\n                              { 43, 6, 15, 1},\n                              { 47, 6, 15, 1},\n                              { 51, 6, 15, 1},\n                              { 55, 5, 15, 1},\n                              { 60, 3, 15, 2},\n                              { 64, 3, 8, 2},\n                              { 0, 3, 15, 2},\n                              { 9, 3, 8, 2},\n                              { 18, 8, 15, 2},\n                              { 27, 15, 3, 2},\n                              { 37, 3, 15, 2},\n                              { 46, 3, 8, 2},\n                              { 55, 6, 15, 2},\n                              { 64, 10, 8, 3},\n                              { 0, 5, 3, 3},\n                              { 0, 8, 15, 3},\n                              { 0, 8, 6, 3},\n                              { 0, 6, 10, 3},\n                              { 0, 8, 15, 3},\n                              { 0, 5, 15, 3},\n                              { 0, 15, 10, 3},\n                              { 0, 15, 8, 3},\n                              { 0, 8, 15, 3},\n                              { 21, 15, 3, 4},\n                              { 43, 3, 15, 4},\n                              { 64, 5, 10, 4},\n                              { 0, 6, 10, 4},\n                              { 0, 10, 8, 4},\n                              { 0, 8, 9, 4},\n                              { 0, 15, 10, 4},\n                              { 0, 15, 6, 4},\n                              { 0, 3, 15, 4},\n                              { 0, 15, 8, 5},\n                              { 0, 5, 15, 5},\n                              { 0, 15, 3, 5},\n                              { 0, 15, 6, 5},\n                              { 0, 15, 6, 5},\n                              { 0, 15, 8, 5},\n                              { 0, 3, 15, 5},\n                              { 0, 15, 3, 5},\n                              { 0, 5, 15, 5},\n                              { 0, 5, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 8, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 10, 15, 6},\n                              { 0, 5, 15, 6},\n                              { 0, 10, 15, 6},\n                              { 0, 8, 15, 6},\n                              { 0, 13, 15, 6},\n                              { 0, 15, 3, 7},\n                              { 0, 12, 15, 7},\n                              { 0, 3, 15, 7},\n                              { 0, 3, 8, 7},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 1},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 2},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3},\n                              { 0, 0, 0, 3} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_resource_structured t1, 16 \ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 29\ndcl_indexableTemp x0[8], 4\ndcl_tgsm_structured g0, 100, 64\ndcl_thread_group 64, 1, 1\niadd r0.x, vThreadGroupID.x, cb0[1].x\nult r1.xyzw, vThreadIDInGroupFlattened.xxxx, l(16, 32, 8, 4)\nif_nz r1.x\n  udiv r0.y, null, r0.x, cb0[0].y\n  imad r0.z, -r0.y, cb0[0].y, r0.x\n  ishl r0.z, r0.z, l(2)\n  ishl r0.y, r0.y, l(2)\n  and r0.w, vThreadIDInGroupFlattened.x, l(3)\n  iadd r2.x, r0.w, r0.z\n  ushr r0.z, vThreadIDInGroupFlattened.x, l(2)\n  iadd r2.y, r0.z, r0.y\n  mov r2.zw, l(0,0,0,0)\n  ld r2.xyzw, r2.xyzw, t0.xyzw\n  mul r2.xyzw, r2.xyzw, l(255.000000, 255.000000, 255.000000, 255.000000)\n  ftou r2.xyzw, r2.xyzw\n  umin r2.xyzw, r2.xyzw, l(255, 255, 255, 255)\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(0), r2.xyzw\nendif \nsync_g_t\nmov x0[0].x, l(-1)\nmov x0[1].x, l(-1)\nmov x0[2].x, l(-1)\nmov x0[3].x, l(-1)\nmov x0[0].y, l(0)\nmov x0[1].y, l(0)\nmov x0[2].y, l(0)\nmov x0[3].y, l(0)\nmov x0[4].x, l(-1)\nmov x0[5].x, l(-1)\nmov x0[6].x, l(-1)\nmov x0[7].x, l(-1)\nmov x0[4].y, l(0)\nmov x0[5].y, l(0)\nmov x0[6].y, l(0)\nmov x0[7].y, l(0)\nmov r0.y, l(0)\nloop \n  uge r0.z, r0.y, l(16)\n  breakc_nz r0.z\n  ld_structured r2.xyzw, r0.y, l(0), g0.xyzw\n  mov r0.z, vThreadIDInGroupFlattened.x\n  ushr r0.z, icb[r0.z + 0].x, r0.y\n  and r0.z, r0.z, l(1)\n  ieq r0.z, r0.z, l(1)\n  if_nz r0.z\n    mov r3.x, x0[4].x\n    mov r3.y, x0[5].x\n    mov r3.z, x0[6].x\n    mov r3.w, x0[7].x\n    umin r3.xyzw, r2.xyzw, r3.xyzw\n    mov x0[4].x, r3.x\n    mov x0[5].x, r3.y\n    mov x0[6].x, r3.z\n    mov x0[7].x, r3.w\n    mov r3.x, x0[4].y\n    mov r3.y, x0[5].y\n    mov r3.z, x0[6].y\n    mov r3.w, x0[7].y\n    umax r3.xyzw, r2.xyzw, r3.xyzw\n    mov x0[4].y, r3.x\n    mov x0[5].y, r3.y\n    mov x0[6].y, r3.z\n    mov x0[7].y, r3.w\n  else \n    mov r3.x, x0[0].x\n    mov r3.y, x0[1].x\n    mov r3.z, x0[2].x\n    mov r3.w, x0[3].x\n    umin r3.xyzw, r2.xyzw, r3.xyzw\n    mov x0[0].x, r3.x\n    mov x0[1].x, r3.y\n    mov x0[2].x, r3.z\n    mov x0[3].x, r3.w\n    mov r3.x, x0[0].y\n    mov r3.y, x0[1].y\n    mov r3.z, x0[2].y\n    mov r3.w, x0[3].y\n    umax r2.xyzw, r2.xyzw, r3.xyzw\n    mov x0[0].y, r2.x\n    mov x0[1].y, r2.y\n    mov x0[2].y, r2.z\n    mov x0[3].y, r2.w\n  endif \n  iadd r0.y, r0.y, l(1)\nendloop \nmov r2.x, x0[0].x\nmov r2.y, x0[1].x\nmov r2.z, x0[2].x\nmov r2.w, x0[3].x\nmov r3.x, x0[0].y\nmov r3.y, x0[1].y\nmov r3.z, x0[2].y\nmov r3.w, x0[3].y\nmov r4.x, x0[4].x\nmov r4.y, x0[5].x\nmov r4.z, x0[6].x\nmov r4.w, x0[7].x\nmov r5.x, x0[4].y\nmov r5.y, x0[5].y\nmov r5.z, x0[6].y\nmov r5.w, x0[7].y\nieq r0.y, cb0[0].w, l(1)\nmovc r0.y, r0.y, l(4), l(16)\niadd r6.xyz, r2.xyzx, l(1, 1, 1, 0)\numin r6.xyz, r6.xyzx, l(255, 255, 255, 0)\nushr r6.xyz, r6.xyzx, l(1)\nand r6.xyz, r6.xyzx, l(126, 126, 126, 0)\niadd r7.xyz, r3.xyzx, l(1, 1, 1, 0)\numin r7.xyz, r7.xyzx, l(255, 255, 255, 0)\nushr r7.xyz, r7.xyzx, l(1)\nand r7.xyz, r7.xyzx, l(126, 126, 126, 0)\niadd r8.xyz, r4.xyzx, l(1, 1, 1, 0)\nand r9.xyz, r2.xyzx, l(-2, -2, -2, 0)\nand r10.xyz, r3.xyzx, l(-2, -2, -2, 0)\numin r8.xyz, r8.xyzx, l(255, 255, 255, 0)\niadd r11.xyzw, r2.xyzw, l(2, 2, 2, 2)\numin r11.xyzw, r11.xyzw, l(255, 255, 255, 255)\nushr r11.xyzw, r11.xyzw, l(2)\nand r11.xyzw, r11.xyzw, l(62, 62, 62, 62)\niadd r12.xyzw, r3.xyzw, l(2, 2, 2, 2)\numin r12.xyzw, r12.xyzw, l(255, 255, 255, 255)\nushr r12.xyzw, r12.xyzw, l(2)\nand r12.xyzw, r12.xyzw, l(62, 62, 62, 62)\nushr r8.xyz, r8.xyzx, l(1)\nand r8.xyz, r8.xyzx, l(126, 126, 126, 0)\niadd r13.xyz, r5.xyzx, l(1, 1, 1, 0)\numin r13.xyz, r13.xyzx, l(255, 255, 255, 0)\nushr r13.xyz, r13.xyzx, l(1)\nand r13.xyz, r13.xyzx, l(126, 126, 126, 0)\nand r14.xyz, r4.xyzx, l(-2, -2, -2, 0)\nand r15.xyz, r5.xyzx, l(-2, -2, -2, 0)\niadd r16.xyzw, r4.xyzw, l(2, 2, 2, 2)\numin r16.xyzw, r16.xyzw, l(255, 255, 255, 255)\nushr r16.xyzw, r16.xyzw, l(2)\nand r16.xyzw, r16.xyzw, l(62, 62, 62, 62)\niadd r17.xyzw, r5.xyzw, l(2, 2, 2, 2)\numin r17.xyzw, r17.xyzw, l(255, 255, 255, 255)\nushr r17.xyzw, r17.xyzw, l(2)\nand r17.xyzw, r17.xyzw, l(62, 62, 62, 62)\nmov r0.z, cb0[0].w\nmov r0.w, l(0)\nmov r18.y, l(-1)\nmov r19.x, l(0)\nloop \n  uge r6.w, r19.x, r0.y\n  breakc_nz r6.w\n  mov x0[0].x, r2.x\n  mov x0[1].x, r2.y\n  mov x0[2].x, r2.z\n  mov x0[3].x, r2.w\n  mov x0[0].y, r3.x\n  mov x0[1].y, r3.y\n  mov x0[2].y, r3.z\n  mov x0[3].y, r3.w\n  mov x0[4].x, r4.x\n  mov x0[5].x, r4.y\n  mov x0[6].x, r4.z\n  mov x0[7].x, r4.w\n  mov x0[4].y, r5.x\n  mov x0[5].y, r5.y\n  mov x0[6].y, r5.z\n  mov x0[7].y, r5.w\n  ieq r6.w, r0.z, l(1)\n  if_nz r6.w\n    and r6.w, r19.x, l(1)\n    iadd r20.xyz, r6.wwww, r6.xyzx\n    ishl r20.xyz, r20.xyzx, l(1)\n    ushr r21.xyz, r20.xyzx, l(7)\n    iadd r20.xyz, r20.xyzx, r21.xyzx\n    iadd r21.xyz, r6.wwww, r7.xyzx\n    ishl r21.xyz, r21.xyzx, l(1)\n    ushr r22.xyz, r21.xyzx, l(7)\n    iadd r21.xyz, r21.xyzx, r22.xyzx\n    mov x0[0].x, r20.x\n    mov x0[1].x, r20.y\n    mov x0[2].x, r20.z\n    mov x0[3].x, l(255)\n    mov x0[0].y, r21.x\n    mov x0[1].y, r21.y\n    mov x0[2].y, r21.z\n    mov x0[3].y, l(255)\n    ushr r6.w, r19.x, l(1)\n    and r6.w, r6.w, l(1)\n    iadd r20.xyz, r6.wwww, r8.xyzx\n    ishl r20.xyz, r20.xyzx, l(1)\n    ushr r21.xyz, r20.xyzx, l(7)\n    iadd r20.xyz, r20.xyzx, r21.xyzx\n    iadd r21.xyz, r6.wwww, r13.xyzx\n    ishl r21.xyz, r21.xyzx, l(1)\n    ushr r22.xyz, r21.xyzx, l(7)\n    iadd r21.xyz, r21.xyzx, r22.xyzx\n    mov x0[4].x, r20.x\n    mov x0[5].x, r20.y\n    mov x0[6].x, r20.z\n    mov x0[7].x, l(255)\n    mov x0[4].y, r21.x\n    mov x0[5].y, r21.y\n    mov x0[6].y, r21.z\n    mov x0[7].y, l(255)\n  else \n    ieq r6.w, r0.z, l(3)\n    if_nz r6.w\n      ushr r19.y, r19.x, l(1)\n      and r19.zw, r19.xxxy, l(0, 0, 1, 1)\n      iadd r20.xyz, r9.xyzx, r19.zzzz\n      iadd r21.xyz, r10.xyzx, r19.wwww\n      mov x0[0].x, r20.x\n      mov x0[1].x, r20.y\n      mov x0[2].x, r20.z\n      mov x0[3].x, l(255)\n      mov x0[0].y, r21.x\n      mov x0[1].y, r21.y\n      mov x0[2].y, r21.z\n      mov x0[3].y, l(255)\n    else \n      ieq r7.w, r0.z, l(7)\n      if_nz r7.w\n        ushr r19.y, r19.x, l(1)\n        and r19.zw, r19.xxxy, l(0, 0, 1, 1)\n        iadd r20.xyzw, r11.xyzw, r19.zzzz\n        ishl r20.xyzw, r20.xyzw, l(2)\n        ushr r21.xyzw, r20.xyzw, l(6)\n        iadd r20.xyzw, r20.xyzw, r21.xyzw\n        iadd r21.xyzw, r12.xyzw, r19.wwww\n        ishl r21.xyzw, r21.xyzw, l(2)\n        ushr r22.xyzw, r21.xyzw, l(6)\n        iadd r21.xyzw, r21.xyzw, r22.xyzw\n        mov x0[0].x, r20.x\n        mov x0[1].x, r20.y\n        mov x0[2].x, r20.z\n        mov x0[3].x, r20.w\n        mov x0[0].y, r21.x\n        mov x0[1].y, r21.y\n        mov x0[2].y, r21.z\n        mov x0[3].y, r21.w\n      endif \n    endif \n    if_nz r6.w\n      ushr r20.x, r19.x, l(2)\n      ushr r20.y, r19.x, l(3)\n      and r19.zw, r20.xxxy, l(0, 0, 1, 1)\n      iadd r20.xyz, r14.xyzx, r19.zzzz\n      iadd r21.xyz, r15.xyzx, r19.wwww\n      mov x0[4].x, r20.x\n      mov x0[5].x, r20.y\n      mov x0[6].x, r20.z\n      mov x0[7].x, l(255)\n      mov x0[4].y, r21.x\n      mov x0[5].y, r21.y\n      mov x0[6].y, r21.z\n      mov x0[7].y, l(255)\n    else \n      ieq r6.w, r0.z, l(7)\n      if_nz r6.w\n        ushr r20.x, r19.x, l(2)\n        ushr r20.y, r19.x, l(3)\n        and r19.zw, r20.xxxy, l(0, 0, 1, 1)\n        iadd r20.xyzw, r16.xyzw, r19.zzzz\n        ishl r20.xyzw, r20.xyzw, l(2)\n        ushr r21.xyzw, r20.xyzw, l(6)\n        iadd r20.xyzw, r20.xyzw, r21.xyzw\n        iadd r21.xyzw, r17.xyzw, r19.wwww\n        ishl r21.xyzw, r21.xyzw, l(2)\n        ushr r22.xyzw, r21.xyzw, l(6)\n        iadd r21.xyzw, r21.xyzw, r22.xyzw\n        mov x0[4].x, r20.x\n        mov x0[5].x, r20.y\n        mov x0[6].x, r20.z\n        mov x0[7].x, r20.w\n        mov x0[4].y, r21.x\n        mov x0[5].y, r21.y\n        mov x0[6].y, r21.z\n        mov x0[7].y, r21.w\n      endif \n    endif \n  endif \n  mov r20.x, x0[0].y\n  mov r20.y, x0[1].y\n  mov r20.z, x0[2].y\n  mov r20.w, x0[3].y\n  mov r6.w, x0[0].x\n  mov r7.w, x0[1].x\n  mov r8.w, x0[2].x\n  mov r9.w, x0[3].x\n  ineg r21.x, r6.w\n  ineg r21.y, r7.w\n  ineg r21.z, r8.w\n  ineg r21.w, r9.w\n  iadd r22.xyzw, r20.xyzw, r21.xyzw\n  mov r23.x, x0[4].y\n  mov r23.y, x0[5].y\n  mov r23.z, x0[6].y\n  mov r23.w, x0[7].y\n  mov r10.w, x0[4].x\n  mov r13.w, x0[5].x\n  mov r14.w, x0[6].x\n  mov r15.w, x0[7].x\n  ineg r24.x, r10.w\n  ineg r24.y, r13.w\n  ineg r24.z, r14.w\n  ineg r24.w, r15.w\n  iadd r23.xyzw, r23.xyzw, r24.xyzw\n  ine r19.zw, r0.zzzz, l(0, 0, 7, 1)\n  movc r23.w, r19.z, l(0), r23.w\n  movc r22.w, r19.z, l(0), r22.w\n  imul null, r24.xy, r22.xyxx, r22.xyxx\n  iadd r10.w, r24.y, r24.x\n  imad r10.w, r22.z, r22.z, r10.w\n  imad r10.w, r22.w, r22.w, r10.w\n  imul null, r24.xy, r23.xyxx, r23.xyxx\n  iadd r13.w, r24.y, r24.x\n  imad r13.w, r23.z, r23.z, r13.w\n  imad r13.w, r23.w, r23.w, r13.w\n  ld_structured r24.xyzw, l(0), l(0), g0.xyzw\n  iadd r21.xyzw, r21.xyzw, r24.xyzw\n  imul null, r21.xy, r21.xyxx, r22.xyxx\n  iadd r14.w, r21.y, r21.x\n  imad r14.w, r22.z, r21.z, r14.w\n  imad r14.w, r22.w, r21.w, r14.w\n  ilt r15.w, l(0), r10.w\n  ilt r18.w, l(0), r14.w\n  and r15.w, r15.w, r18.w\n  itof r14.w, r14.w\n  mul r14.w, r14.w, l(63.499989)\n  ftou r14.w, r14.w\n  ishl r18.w, r10.w, l(5)\n  ult r14.w, r18.w, r14.w\n  and r14.w, r14.w, r15.w\n  ineg r21.xyzw, r22.xyzw\n  movc r21.xyzw, r14.wwww, r21.xyzw, r22.xyzw\n  movc r15.w, r14.w, r20.x, r6.w\n  mov x0[0].x, r15.w\n  mov r18.w, x0[1].x\n  movc r18.w, r14.w, r20.y, r18.w\n  mov x0[1].x, r18.w\n  mov r20.x, x0[2].x\n  movc r20.x, r14.w, r20.z, r20.x\n  mov x0[2].x, r20.x\n  mov r20.y, x0[3].x\n  movc r20.y, r14.w, r20.w, r20.y\n  mov x0[3].x, r20.y\n  mov r20.z, x0[0].y\n  movc r6.w, r14.w, r6.w, r20.z\n  mov x0[0].y, r6.w\n  mov r6.w, x0[1].y\n  movc r6.w, r14.w, r7.w, r6.w\n  mov x0[1].y, r6.w\n  mov r6.w, x0[2].y\n  movc r6.w, r14.w, r8.w, r6.w\n  mov x0[2].y, r6.w\n  mov r6.w, x0[3].y\n  movc r6.w, r14.w, r9.w, r6.w\n  mov x0[3].y, r6.w\n  mov r6.w, vThreadIDInGroupFlattened.x\n  mov r7.w, icb[r6.w + 0].y\n  ld_structured r22.xyzw, r7.w, l(0), g0.xyzw\n  mov r7.w, x0[4].x\n  mov r8.w, x0[5].x\n  mov r9.w, x0[6].x\n  mov r14.w, x0[7].x\n  ineg r24.x, r7.w\n  ineg r24.y, r8.w\n  ineg r24.z, r9.w\n  ineg r24.w, r14.w\n  iadd r22.xyzw, r22.xyzw, r24.xyzw\n  imul null, r20.zw, r22.xxxy, r23.xxxy\n  iadd r20.z, r20.w, r20.z\n  imad r20.z, r23.z, r22.z, r20.z\n  imad r20.z, r23.w, r22.w, r20.z\n  ilt r20.w, l(0), r13.w\n  ilt r22.x, l(0), r20.z\n  and r20.w, r20.w, r22.x\n  itof r20.z, r20.z\n  mul r20.z, r20.z, l(63.499989)\n  ftou r20.z, r20.z\n  ishl r22.x, r13.w, l(5)\n  ult r20.z, r22.x, r20.z\n  and r20.z, r20.z, r20.w\n  ineg r22.xyzw, r23.xyzw\n  movc r22.xyzw, r20.zzzz, r22.xyzw, r23.xyzw\n  mov r20.w, x0[4].y\n  mov r23.x, x0[5].y\n  mov r23.y, x0[6].y\n  mov r23.z, x0[7].y\n  movc r20.w, r20.z, r20.w, r7.w\n  mov x0[4].x, r20.w\n  mov r23.w, x0[5].x\n  movc r23.x, r20.z, r23.x, r23.w\n  mov x0[5].x, r23.x\n  mov r23.w, x0[6].x\n  movc r23.y, r20.z, r23.y, r23.w\n  mov x0[6].x, r23.y\n  mov r23.w, x0[7].x\n  movc r23.z, r20.z, r23.z, r23.w\n  mov x0[7].x, r23.z\n  mov r23.w, x0[4].y\n  movc r7.w, r20.z, r7.w, r23.w\n  mov x0[4].y, r7.w\n  mov r7.w, x0[5].y\n  movc r7.w, r20.z, r8.w, r7.w\n  mov x0[5].y, r7.w\n  mov r7.w, x0[6].y\n  movc r7.w, r20.z, r9.w, r7.w\n  mov x0[6].y, r7.w\n  mov r7.w, x0[7].y\n  movc r7.w, r20.z, r14.w, r7.w\n  mov x0[7].y, r7.w\n  ineg r24.x, r20.w\n  ineg r24.yzw, r23.xxyz\n  ige r7.w, l(0), r13.w\n  itof r8.w, r13.w\n  movc r23.xyz, r19.wwww, l(32,128,3,0), l(16,64,7,0)\n  ineg r25.x, r15.w\n  ineg r25.y, r18.w\n  ineg r25.zw, r20.xxxy\n  ige r9.w, l(0), r10.w\n  itof r14.w, r10.w\n  mov r15.w, l(0)\n  mov r19.y, l(0)\n  loop \n    uge r18.w, r15.w, l(16)\n    breakc_nz r18.w\n    ushr r18.w, icb[r6.w + 0].x, r15.w\n    and r18.w, r18.w, l(1)\n    ieq r19.w, r18.w, l(1)\n    if_nz r19.w\n      ld_structured r20.xyzw, r15.w, l(0), g0.xyzw\n      iadd r20.xyzw, r24.xyzw, r20.xyzw\n      imul null, r20.xy, r20.xyxx, r22.xyxx\n      iadd r19.w, r20.y, r20.x\n      imad r19.w, r22.z, r20.z, r19.w\n      imad r19.w, r22.w, r20.w, r19.w\n      ige r20.x, l(0), r19.w\n      or r20.x, r7.w, r20.x\n      ilt r20.y, r19.w, r13.w\n      itof r19.w, r19.w\n      mul r19.w, r19.w, l(63.499989)\n      div r19.w, r19.w, r8.w\n      ftou r19.w, r19.w\n      iadd r19.w, r19.w, r23.y\n      movc r19.w, r20.y, icb[r19.w + 0].w, r23.z\n      movc r19.w, r20.x, l(0), r19.w\n    else \n      ld_structured r20.xyzw, r15.w, l(0), g0.xyzw\n      iadd r20.xyzw, r25.xyzw, r20.xyzw\n      imul null, r20.xy, r20.xyxx, r21.xyxx\n      iadd r20.x, r20.y, r20.x\n      imad r20.x, r21.z, r20.z, r20.x\n      imad r20.x, r21.w, r20.w, r20.x\n      ige r20.y, l(0), r20.x\n      or r20.y, r9.w, r20.y\n      ilt r20.z, r20.x, r10.w\n      itof r20.x, r20.x\n      mul r20.x, r20.x, l(63.499989)\n      div r20.x, r20.x, r14.w\n      ftou r20.x, r20.x\n      iadd r20.x, r20.x, r23.y\n      movc r20.x, r20.z, icb[r20.x + 0].w, r23.z\n      movc r19.w, r20.y, l(0), r20.x\n    endif \n    iadd r19.w, r19.w, r23.x\n    iadd r20.x, l(64), -icb[r19.w + 64].x\n    ishl r18.w, r18.w, l(2)\n    mov r26.x, x0[r18.w + 0].x\n    mov r26.y, x0[r18.w + 1].x\n    mov r26.z, x0[r18.w + 2].x\n    mov r26.w, x0[r18.w + 3].x\n    mov r27.x, x0[r18.w + 0].y\n    mov r27.y, x0[r18.w + 1].y\n    mov r27.z, x0[r18.w + 2].y\n    mov r27.w, x0[r18.w + 3].y\n    imul null, r27.xyzw, r27.xyzw, icb[r19.w + 64].xxxx\n    imad r20.xyzw, r20.xxxx, r26.xyzw, r27.xyzw\n    iadd r20.xyzw, r20.xyzw, l(32, 32, 32, 32)\n    ushr r20.xyzw, r20.xzyw, l(6)\n    movc r20.w, r19.z, l(255), r20.w\n    ld_structured r26.xyzw, r15.w, l(0), g0.xyzw\n    ult r27.xyz, r20.xzyx, r26.xyzx\n    mov r28.xz, r26.xxyx\n    mov r28.yw, r20.xxxz\n    movc r28.xyzw, r27.xxyy, r28.xyzw, r28.yxwz\n    mov r20.xz, r26.zzwz\n    movc r20.xy, r27.zzzz, r20.xyxx, r20.yxyy\n    ult r18.w, r20.w, r26.w\n    movc r26.xw, r18.wwww, r20.wwwz, r20.zzzw\n    ineg r27.xy, r28.ywyy\n    ineg r27.z, r20.y\n    ineg r27.w, r26.x\n    mov r26.xy, r28.xzxx\n    mov r26.z, r20.x\n    iadd r20.xyzw, r27.xyzw, r26.xyzw\n    imul null, r20.xy, r20.xyxx, r20.xyxx\n    iadd r18.w, r20.y, r20.x\n    imad r18.w, r20.z, r20.z, r18.w\n    utof r18.w, r18.w\n    utof r19.w, r20.w\n    mul r19.w, r19.w, r19.w\n    mad r18.w, r19.w, cb0[1].z, r18.w\n    ftou r18.w, r18.w\n    iadd r19.y, r18.w, r19.y\n    iadd r15.w, r15.w, l(1)\n  endloop \n  ult r6.w, r19.y, r18.y\n  mov r18.x, r0.w\n  movc r18.xy, r6.wwww, r19.xyxx, r18.xyxx\n  iadd r19.x, r19.x, l(1)\n  mov r0.w, r18.x\nendloop \nmov r18.x, cb0[0].w\nmov r18.z, vThreadIDInGroupFlattened.x\nstore_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r18.yxzy\nstore_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r0.w\nsync_g_t\nif_nz r1.y\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(32)\n  ld_structured r2.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r3.x, r0.y, l(32), g0.xxxx\n  ult r0.z, r2.y, r18.y\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r2.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r3.x\n  endif \nendif \nif_nz r1.x\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(16)\n  ld_structured r3.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r4.x, r0.y, l(32), g0.xxxx\n  ult r0.z, r3.y, r2.x\n  if_nz r0.z\n    ld_structured r3.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r3.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r4.x\n  endif \nendif \nif_nz r1.z\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r3.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r4.x, r0.y, l(32), g0.xxxx\n  ult r0.z, r3.y, r2.x\n  if_nz r0.z\n    ld_structured r3.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r3.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r4.x\n  endif \nendif \nif_nz r1.w\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r2.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r3.x, r0.y, l(32), g0.xxxx\n  ult r0.z, r2.y, r1.x\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r2.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r3.x\n  endif \nendif \nult r0.yz, vThreadIDInGroupFlattened.xxxx, l(0, 2, 1, 0)\nif_nz r0.y\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r2.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r3.x, r0.y, l(32), g0.xxxx\n  ult r0.w, r2.y, r1.x\n  if_nz r0.w\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r2.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r3.x\n  endif \nendif \nif_nz r0.z\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r2.yzw, r0.y, l(16), g0.xxyz\n  ld_structured r3.x, r0.y, l(32), g0.xxxx\n  ult r0.z, r2.y, r1.x\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xyz, vThreadIDInGroupFlattened.x, l(16), r2.xzwx\n    store_structured g0.x, vThreadIDInGroupFlattened.x, l(32), r3.x\n  endif \n  ld_structured r1.x, r0.x, l(0), t1.xxxx\n  ld_structured r2.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  ult r0.y, r2.x, r1.x\n  if_nz r0.y\n    ld_structured r1.xyz, vThreadIDInGroupFlattened.x, l(16), g0.xyzx\n    ld_structured r1.w, vThreadIDInGroupFlattened.x, l(32), g0.xxxx\n  else \n    ld_structured r1.xyzw, r0.x, l(0), t1.xyzw\n  endif \n  store_structured u0.xyzw, r0.x, l(0), r1.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC7Encode_TryMode137CS[] =\n{\n     68,  88,  66,  67,  24, 142, \n     44, 233, 135,  73, 185,  32, \n    139,  70, 101,   2, 121, 203, \n    167, 180,   1,   0,   0,   0, \n    144,  73,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88,  60,  73,   0,   0, \n     64,   0,   5,   0,  79,  18, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,   2,   3, \n      0,   0, 204, 204,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n    136, 136,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 238, 238, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0, 200, 236,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n    128, 200,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0, 236, 254, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0, 200, 254,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n    128, 236,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0, 200, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0, 236, 255,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n    128, 254,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0, 232, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0, 232, 255,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0, 255,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0, 240, 255, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0, 240,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     16, 247,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0, 142,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0, 113,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n    206,   8,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0, 140,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  16, 115,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,  49,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0, 206, 140, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0, 140,   8,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     16,  49,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0, 102, 102, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0, 108,  54,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n    232,  23,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0, 240,  15, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0, 142, 113,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n    156,  57,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0, 170, 170, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0, 240, 240,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     90,  90,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0, 204,  51, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  60,  60,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n    170,  85,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0, 150, 150, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,  90, 165,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n    206, 115,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0, 200,  19, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  76,  50,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n    220,  59,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0, 150, 105, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  60, 195,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n    102, 153,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,  96,   6, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  11,   0, \n      0,   0, 114,   2,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n    228,   4,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,  64,  78, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,  32,  39,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n     54, 201,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0, 108, 147, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0, 198,  57,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n    156,  99,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  54, 147, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0, 198, 156,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n    126, 129,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,  24, 231, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   0, 240, 204,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n    204,  15,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,  68, 119, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  34, 238,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   3,   0,   0,   0, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  17,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   0,   0, \n      0,   0,  21,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,   1,   0, \n      0,   0,  34,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     38,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,  43,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,  47,   0,   0,   0, \n      6,   0,   0,   0,  15,   0, \n      0,   0,   1,   0,   0,   0, \n     51,   0,   0,   0,   6,   0, \n      0,   0,  15,   0,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   0,  60,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n     64,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,   9,   0,   0,   0, \n      3,   0,   0,   0,   8,   0, \n      0,   0,   2,   0,   0,   0, \n     18,   0,   0,   0,   8,   0, \n      0,   0,  15,   0,   0,   0, \n      2,   0,   0,   0,  27,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   2,   0, \n      0,   0,  37,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   2,   0,   0,   0, \n     46,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      2,   0,   0,   0,  55,   0, \n      0,   0,   6,   0,   0,   0, \n     15,   0,   0,   0,   2,   0, \n      0,   0,  64,   0,   0,   0, \n     10,   0,   0,   0,   8,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   3,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,   6,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  10,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      8,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n     21,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      4,   0,   0,   0,  43,   0, \n      0,   0,   3,   0,   0,   0, \n     15,   0,   0,   0,   4,   0, \n      0,   0,  64,   0,   0,   0, \n      5,   0,   0,   0,  10,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  10,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,   9,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,  10,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   8,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   3,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n     15,   0,   0,   0,   8,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  15,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      3,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,  15,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     15,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,  15,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   3,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n     15,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  15,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   8,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     88,  24,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0, 162,   0, \n      0,   4,   0, 112,  16,   0, \n      1,   0,   0,   0,  16,   0, \n      0,   0, 158,   0,   0,   4, \n      0, 224,  17,   0,   0,   0, \n      0,   0,  16,   0,   0,   0, \n     95,   0,   0,   2,   0,  64, \n      2,   0,  95,   0,   0,   2, \n     18,  16,   2,   0, 104,   0, \n      0,   2,  29,   0,   0,   0, \n    105,   0,   0,   4,   0,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0, 160,   0, \n      0,   5,   0, 240,  17,   0, \n      0,   0,   0,   0, 100,   0, \n      0,   0,  64,   0,   0,   0, \n    155,   0,   0,   4,  64,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,  16, \n      2,   0,  10, 128,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  79,   0,   0,   9, \n    242,   0,  16,   0,   1,   0, \n      0,   0,   6,  64,   2,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,  32,   0,   0,   0, \n      8,   0,   0,   0,   4,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  78,   0,   0,   9, \n     34,   0,  16,   0,   0,   0, \n      0,   0,   0, 208,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  35,   0,   0,  11, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   3,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   6,  66,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  54,   0,   0,   8, \n    194,   0,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  45,   0, \n      0,   7, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70, 126,  16,   0,   0,   0, \n      0,   0,  56,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0, 127,  67, \n      0,   0, 127,  67,   0,   0, \n    127,  67,   0,   0, 127,  67, \n     28,   0,   0,   5, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  84,   0,   0,  10, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n    190,  24,   0,   1,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n    255, 255, 255, 255,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7,  66,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     42,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  54,   0,   0,   4, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n     85,   0,   0,   8,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     10, 144, 144,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     32,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,   3,   0,   0,   0, \n     18,   0,   0,   1,  54,   0, \n      0,   6,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      3,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   3,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   3,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     54,   0,   0,   6,  18,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6,  34,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6,  66,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   5,   0,   0,   0, \n     26,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     32,   0,   0,   8,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     58, 128,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     84,   0,   0,  10, 114,   0, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,   6,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,   2,  64, \n      0,   0, 126,   0,   0,   0, \n    126,   0,   0,   0, 126,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      7,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    126,   0,   0,   0, 126,   0, \n      0,   0, 126,   0,   0,   0, \n      0,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  70,   2,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255,   0,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n    254, 255, 255, 255, 254, 255, \n    255, 255, 254, 255, 255, 255, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,  11,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n     84,   0,   0,  10, 242,   0, \n     16,   0,  11,   0,   0,   0, \n     70,  14,  16,   0,  11,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,  85,   0, \n      0,   7, 242,   0,  16,   0, \n     11,   0,   0,   0,  70,  14, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,  10, \n    242,   0,  16,   0,  11,   0, \n      0,   0,  70,  14,  16,   0, \n     11,   0,   0,   0,   2,  64, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,  12,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,  84,   0, \n      0,  10, 242,   0,  16,   0, \n     12,   0,   0,   0,  70,  14, \n     16,   0,  12,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,  85,   0,   0,   7, \n    242,   0,  16,   0,  12,   0, \n      0,   0,  70,  14,  16,   0, \n     12,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  12,   0,   0,   0, \n     70,  14,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0, 126,   0,   0,   0, \n    126,   0,   0,   0, 126,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n     13,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n    126,   0,   0,   0, 126,   0, \n      0,   0, 126,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     14,   0,   0,   0,  70,   2, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 254, 255, \n    255, 255, 254, 255, 255, 255, \n    254, 255, 255, 255,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   2,  16,   0, \n      5,   0,   0,   0,   2,  64, \n      0,   0, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255,   0,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,  16,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,  84,   0, \n      0,  10, 242,   0,  16,   0, \n     16,   0,   0,   0,  70,  14, \n     16,   0,  16,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,  85,   0,   0,   7, \n    242,   0,  16,   0,  16,   0, \n      0,   0,  70,  14,  16,   0, \n     16,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,  16,   0,   0,   0, \n     70,  14,  16,   0,  16,   0, \n      0,   0,   2,  64,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  30,   0, \n      0,  10, 242,   0,  16,   0, \n     17,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n      2,  64,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,  84,   0,   0,  10, \n    242,   0,  16,   0,  17,   0, \n      0,   0,  70,  14,  16,   0, \n     17,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n     85,   0,   0,   7, 242,   0, \n     16,   0,  17,   0,   0,   0, \n     70,  14,  16,   0,  17,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n     17,   0,   0,   0,  70,  14, \n     16,   0,  17,   0,   0,   0, \n      2,  64,   0,   0,  62,   0, \n      0,   0,  62,   0,   0,   0, \n     62,   0,   0,   0,  62,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  58, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     18,   0,   0,   0,   1,  64, \n      0,   0, 255, 255, 255, 255, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  48,   0,   0,   1, \n     80,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   3,   0, \n      4,   3,  58,   0,  16,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      5,   0,   0,   0,  32,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n    246,  15,  16,   0,   6,   0, \n      0,   0,  70,   2,  16,   0, \n      6,   0,   0,   0,  41,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     21,   0,   0,   0, 246,  15, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  22,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  22,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 255,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      1,  64,   0,   0, 255,   0, \n      0,   0,  85,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   6,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0, 246,  15, \n     16,   0,   6,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  41,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  20,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0, 246,  15,  16,   0, \n      6,   0,   0,   0,  70,   2, \n     16,   0,  13,   0,   0,   0, \n     41,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  21,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     22,   0,   0,   0,  70,   2, \n     16,   0,  21,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     21,   0,   0,   0,  70,   2, \n     16,   0,  22,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  10,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  26,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  19,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,  19,   0,   0,   0, \n      6,   4,  16,   0,  19,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n     20,   0,   0,   0,  70,   2, \n     16,   0,   9,   0,   0,   0, \n    166,  10,  16,   0,  19,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  21,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0, 246,  15, \n     16,   0,  19,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   1,  64, \n      0,   0, 255,   0,   0,   0, \n     18,   0,   0,   1,  32,   0, \n      0,   7, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   7,   0, \n      0,   0,  31,   0,   4,   3, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  19,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,  19,   0,   0,   0, \n      6,   4,  16,   0,  19,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  11,   0,   0,   0, \n    166,  10,  16,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n    242,   0,  16,   0,  20,   0, \n      0,   0,  70,  14,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7, 242,   0, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  20,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  21,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  21,   0, \n      0,   0,  70,  14,  16,   0, \n     12,   0,   0,   0, 246,  15, \n     16,   0,  19,   0,   0,   0, \n     41,   0,   0,   7, 242,   0, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  21,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7, 242,   0,  16,   0, \n     22,   0,   0,   0,  70,  14, \n     16,   0,  21,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  21,   0, \n      0,   0,  70,  14,  16,   0, \n     21,   0,   0,   0,  70,  14, \n     16,   0,  22,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  18,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,  20,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  21,   0,   0,   0, \n     54,   0,   0,   6,  34,  48, \n     32,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,  21,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7,  34,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,   1,   0, \n      0,  10, 194,   0,  16,   0, \n     19,   0,   0,   0,   6,   4, \n     16,   0,  20,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  20,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0, 166,  10, \n     16,   0,  19,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  21,   0,   0,   0, \n     70,   2,  16,   0,  15,   0, \n      0,   0, 246,  15,  16,   0, \n     19,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n    255,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n     21,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n    255,   0,   0,   0,  18,   0, \n      0,   1,  32,   0,   0,   7, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     85,   0,   0,   7,  18,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n      2,   0,   0,   0,  85,   0, \n      0,   7,  34,   0,  16,   0, \n     20,   0,   0,   0,  10,   0, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,  19,   0, \n      0,   0,   6,   4,  16,   0, \n     20,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  16,   0, \n      0,   0, 166,  10,  16,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7, 242,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n    242,   0,  16,   0,  21,   0, \n      0,   0,  70,  14,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  20,   0, \n      0,   0,  70,  14,  16,   0, \n     21,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     21,   0,   0,   0,  70,  14, \n     16,   0,  17,   0,   0,   0, \n    246,  15,  16,   0,  19,   0, \n      0,   0,  41,   0,   0,   7, \n    242,   0,  16,   0,  21,   0, \n      0,   0,  70,  14,  16,   0, \n     21,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     85,   0,   0,   7, 242,   0, \n     16,   0,  22,   0,   0,   0, \n     70,  14,  16,   0,  21,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     21,   0,   0,   0,  70,  14, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  22,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     10,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,  21,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  21,   0, \n      0,   1,  54,   0,   0,   6, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,  20,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,  20,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  20,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   7,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   8,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  40,   0,   0,   5, \n     18,   0,  16,   0,  21,   0, \n      0,   0,  58,   0,  16,   0, \n      6,   0,   0,   0,  40,   0, \n      0,   5,  34,   0,  16,   0, \n     21,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     40,   0,   0,   5,  66,   0, \n     16,   0,  21,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  40,   0,   0,   5, \n    130,   0,  16,   0,  21,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     22,   0,   0,   0,  70,  14, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  21,   0, \n      0,   0,  54,   0,   0,   6, \n     18,   0,  16,   0,  23,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,  23,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,  23,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  23,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  13,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  14,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  15,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  40,   0,   0,   5, \n     18,   0,  16,   0,  24,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  40,   0, \n      0,   5,  34,   0,  16,   0, \n     24,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n     40,   0,   0,   5,  66,   0, \n     16,   0,  24,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  40,   0,   0,   5, \n    130,   0,  16,   0,  24,   0, \n      0,   0,  58,   0,  16,   0, \n     15,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     23,   0,   0,   0,  70,  14, \n     16,   0,  23,   0,   0,   0, \n     70,  14,  16,   0,  24,   0, \n      0,   0,  39,   0,   0,  10, \n    194,   0,  16,   0,  19,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   1,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,  23,   0,   0,   0, \n     42,   0,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  23,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,  22,   0,   0,   0, \n     42,   0,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  22,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  50,   0,  16,   0, \n     24,   0,   0,   0,  70,   0, \n     16,   0,  22,   0,   0,   0, \n     70,   0,  16,   0,  22,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n     24,   0,   0,   0,  10,   0, \n     16,   0,  24,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,  22,   0, \n      0,   0,  42,   0,  16,   0, \n     22,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  22,   0, \n      0,   0,  58,   0,  16,   0, \n     22,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  50,   0,  16,   0, \n     24,   0,   0,   0,  70,   0, \n     16,   0,  23,   0,   0,   0, \n     70,   0,  16,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,  13,   0, \n      0,   0,  26,   0,  16,   0, \n     24,   0,   0,   0,  10,   0, \n     16,   0,  24,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     42,   0,  16,   0,  23,   0, \n      0,   0,  42,   0,  16,   0, \n     23,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,  23,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,  24,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  21,   0, \n      0,   0,  70,  14,  16,   0, \n     24,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     50,   0,  16,   0,  21,   0, \n      0,   0,  70,   0,  16,   0, \n     21,   0,   0,   0,  70,   0, \n     16,   0,  22,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,  14,   0,   0,   0, \n     26,   0,  16,   0,  21,   0, \n      0,   0,  10,   0,  16,   0, \n     21,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  22,   0,   0,   0, \n     42,   0,  16,   0,  21,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  22,   0,   0,   0, \n     58,   0,  16,   0,  21,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  34,   0, \n      0,   7, 130,   0,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  34,   0,   0,   7, \n    130,   0,  16,   0,  18,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,  15,   0,   0,   0, \n     58,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,  14,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  28,   0, \n      0,   5, 130,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n     41,   0,   0,   7, 130,   0, \n     16,   0,  18,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  79,   0, \n      0,   7, 130,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,  14,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  15,   0,   0,   0, \n     40,   0,   0,   5, 242,   0, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  22,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,  21,   0, \n      0,   0, 246,  15,  16,   0, \n     14,   0,   0,   0,  70,  14, \n     16,   0,  21,   0,   0,   0, \n     70,  14,  16,   0,  22,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  15,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   6, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     34,   0,  16,   0,  20,   0, \n      0,   0,  10,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n     34,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,  20,   0,   0,   0, \n     26,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     18,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     66,   0,  16,   0,  20,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,   7,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  26,  48,  32,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   6, \n     34,  48,  32,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  54,   0,   0,   4, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  10,  64,   2,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     26, 144, 144,   0,  58,   0, \n     16,   0,   6,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,  22,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   7,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n     54,   0,   0,   6, 130,   0, \n     16,   0,  14,   0,   0,   0, \n     10,  48,  32,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n     40,   0,   0,   5,  18,   0, \n     16,   0,  24,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  40,   0,   0,   5, \n     34,   0,  16,   0,  24,   0, \n      0,   0,  58,   0,  16,   0, \n      8,   0,   0,   0,  40,   0, \n      0,   5,  66,   0,  16,   0, \n     24,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     40,   0,   0,   5, 130,   0, \n     16,   0,  24,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  30,   0,   0,   7, \n    242,   0,  16,   0,  22,   0, \n      0,   0,  70,  14,  16,   0, \n     22,   0,   0,   0,  70,  14, \n     16,   0,  24,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0, 194,   0,  16,   0, \n     20,   0,   0,   0,   6,   4, \n     16,   0,  22,   0,   0,   0, \n      6,   4,  16,   0,  23,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     35,   0,   0,   9,  66,   0, \n     16,   0,  20,   0,   0,   0, \n     42,   0,  16,   0,  23,   0, \n      0,   0,  42,   0,  16,   0, \n     22,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     35,   0,   0,   9,  66,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  23,   0, \n      0,   0,  58,   0,  16,   0, \n     22,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     34,   0,   0,   7, 130,   0, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  34,   0, \n      0,   7,  18,   0,  16,   0, \n     22,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,   1,   0,   0,   7, \n    130,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0,  10,   0, \n     16,   0,  22,   0,   0,   0, \n     43,   0,   0,   5,  66,   0, \n     16,   0,  20,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  56,   0,   0,   7, \n     66,   0,  16,   0,  20,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     28,   0,   0,   5,  66,   0, \n     16,   0,  20,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  41,   0,   0,   7, \n     18,   0,  16,   0,  22,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  22,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,   1,   0, \n      0,   7,  66,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  20,   0, \n      0,   0,  40,   0,   0,   5, \n    242,   0,  16,   0,  22,   0, \n      0,   0,  70,  14,  16,   0, \n     23,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n     22,   0,   0,   0, 166,  10, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  22,   0, \n      0,   0,  70,  14,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     20,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   6,  18,   0,  16,   0, \n     23,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   6,  34,   0,  16,   0, \n     23,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  54,   0, \n      0,   6,  66,   0,  16,   0, \n     23,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     23,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9,  18,   0,  16,   0, \n     23,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  23,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  10,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     23,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9,  34,   0,  16,   0, \n     23,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     26,   0,  16,   0,  23,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  26,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     23,   0,   0,   0,  10,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9,  66,   0,  16,   0, \n     23,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     42,   0,  16,   0,  23,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6,  18,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n     23,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n     23,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      7,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      7,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6, 130,   0,  16,   0, \n      7,   0,   0,   0,  26,  48, \n     32,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  54,   0, \n      0,   6,  34,  48,  32,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  40,   0, \n      0,   5,  18,   0,  16,   0, \n     24,   0,   0,   0,  58,   0, \n     16,   0,  20,   0,   0,   0, \n     40,   0,   0,   5, 226,   0, \n     16,   0,  24,   0,   0,   0, \n      6,   9,  16,   0,  23,   0, \n      0,   0,  33,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n     43,   0,   0,   5, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,  13,   0, \n      0,   0,  55,   0,   0,  15, \n    114,   0,  16,   0,  23,   0, \n      0,   0, 246,  15,  16,   0, \n     19,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n    128,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,  64,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,  40,   0,   0,   5, \n     18,   0,  16,   0,  25,   0, \n      0,   0,  58,   0,  16,   0, \n     15,   0,   0,   0,  40,   0, \n      0,   5,  34,   0,  16,   0, \n     25,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     40,   0,   0,   5, 194,   0, \n     16,   0,  25,   0,   0,   0, \n      6,   4,  16,   0,  20,   0, \n      0,   0,  33,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     43,   0,   0,   5, 130,   0, \n     16,   0,  14,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,  15,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     19,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  15,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  85,   0,   0,   8, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  10, 144, 144,   0, \n     58,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     15,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  32,   0,   0,   7, \n    130,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,  19,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  15,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  20,   0,   0,   0, \n     70,  14,  16,   0,  24,   0, \n      0,   0,  70,  14,  16,   0, \n     20,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     50,   0,  16,   0,  20,   0, \n      0,   0,  70,   0,  16,   0, \n     20,   0,   0,   0,  70,   0, \n     16,   0,  22,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,  19,   0,   0,   0, \n     26,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     19,   0,   0,   0,  42,   0, \n     16,   0,  22,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  22,   0,   0,   0, \n     58,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  33,   0, \n      0,   7,  18,   0,  16,   0, \n     20,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,  60,   0,   0,   7, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     34,   0,   0,   7,  34,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     13,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  19,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,  19,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  19,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  28,   0,   0,   5, \n    130,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  19,   0,   0,   0, \n     26,   0,  16,   0,  23,   0, \n      0,   0,  55,   0,   0,  10, \n    130,   0,  16,   0,  19,   0, \n      0,   0,  26,   0,  16,   0, \n     20,   0,   0,   0,  58, 144, \n    144,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  42,   0, \n     16,   0,  23,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,  19,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  19,   0,   0,   0, \n     18,   0,   0,   1, 167,   0, \n      0,   9, 242,   0,  16,   0, \n     20,   0,   0,   0,  58,   0, \n     16,   0,  15,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  25,   0,   0,   0, \n     70,  14,  16,   0,  20,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  50,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   0,  16,   0,  20,   0, \n      0,   0,  70,   0,  16,   0, \n     21,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n     20,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  35,   0,   0,   9, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  42,   0,  16,   0, \n     21,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  35,   0,   0,   9, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  58,   0,  16,   0, \n     21,   0,   0,   0,  58,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  33,   0,   0,   7, \n     34,   0,  16,   0,  20,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     60,   0,   0,   7,  34,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n     20,   0,   0,   0,  34,   0, \n      0,   7,  66,   0,  16,   0, \n     20,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  43,   0,   0,   5, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  56,   0, \n      0,   7,  18,   0,  16,   0, \n     20,   0,   0,   0,  10,   0, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  14,   0,   0,   7, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n     28,   0,   0,   5,  18,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  30,   0,   0,   7, \n     18,   0,  16,   0,  20,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  26,   0, \n     16,   0,  23,   0,   0,   0, \n     55,   0,   0,  10,  18,   0, \n     16,   0,  20,   0,   0,   0, \n     42,   0,  16,   0,  20,   0, \n      0,   0,  58, 144, 144,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  42,   0,  16,   0, \n     23,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n     19,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  21,   0, \n      0,   1,  30,   0,   0,   7, \n    130,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  10,   0, \n     16,   0,  23,   0,   0,   0, \n     30,   0,   0,  10,  18,   0, \n     16,   0,  20,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  10, 144, 208, 128, \n     65,   0,   0,   0,  64,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  41,   0, \n      0,   7, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  54,   0,   0,   7, \n     18,   0,  16,   0,  26,   0, \n      0,   0,  10,  48,  32,   4, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     54,   0,   0,   8,  34,   0, \n     16,   0,  26,   0,   0,   0, \n     10,  48,  32,   6,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   8, \n     66,   0,  16,   0,  26,   0, \n      0,   0,  10,  48,  32,   6, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  54,   0, \n      0,   8, 130,   0,  16,   0, \n     26,   0,   0,   0,  10,  48, \n     32,   6,   0,   0,   0,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     54,   0,   0,   7,  18,   0, \n     16,   0,  27,   0,   0,   0, \n     26,  48,  32,   4,   0,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  54,   0, \n      0,   8,  34,   0,  16,   0, \n     27,   0,   0,   0,  26,  48, \n     32,   6,   0,   0,   0,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     54,   0,   0,   8,  66,   0, \n     16,   0,  27,   0,   0,   0, \n     26,  48,  32,   6,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   8, \n    130,   0,  16,   0,  27,   0, \n      0,   0,  26,  48,  32,   6, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  38,   0, \n      0,  10,   0, 208,   0,   0, \n    242,   0,  16,   0,  27,   0, \n      0,   0,  70,  14,  16,   0, \n     27,   0,   0,   0,   6, 144, \n    208,   0,  64,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,  35,   0,   0,   9, \n    242,   0,  16,   0,  20,   0, \n      0,   0,   6,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  26,   0,   0,   0, \n     70,  14,  16,   0,  27,   0, \n      0,   0,  30,   0,   0,  10, \n    242,   0,  16,   0,  20,   0, \n      0,   0,  70,  14,  16,   0, \n     20,   0,   0,   0,   2,  64, \n      0,   0,  32,   0,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,  32,   0,   0,   0, \n     85,   0,   0,   7, 242,   0, \n     16,   0,  20,   0,   0,   0, \n    134,  13,  16,   0,  20,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  55,   0, \n      0,   9, 130,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0, 255,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n     26,   0,   0,   0,  58,   0, \n     16,   0,  15,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7, 114,   0,  16,   0, \n     27,   0,   0,   0, 134,   1, \n     16,   0,  20,   0,   0,   0, \n     70,   2,  16,   0,  26,   0, \n      0,   0,  54,   0,   0,   5, \n     82,   0,  16,   0,  28,   0, \n      0,   0,   6,   1,  16,   0, \n     26,   0,   0,   0,  54,   0, \n      0,   5, 162,   0,  16,   0, \n     28,   0,   0,   0,   6,   8, \n     16,   0,  20,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,  28,   0,   0,   0, \n      6,   5,  16,   0,  27,   0, \n      0,   0,  70,  14,  16,   0, \n     28,   0,   0,   0,  22,  11, \n     16,   0,  28,   0,   0,   0, \n     54,   0,   0,   5,  82,   0, \n     16,   0,  20,   0,   0,   0, \n    166,  11,  16,   0,  26,   0, \n      0,   0,  55,   0,   0,   9, \n     50,   0,  16,   0,  20,   0, \n      0,   0, 166,  10,  16,   0, \n     27,   0,   0,   0,  70,   0, \n     16,   0,  20,   0,   0,   0, \n     22,   5,  16,   0,  20,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     20,   0,   0,   0,  58,   0, \n     16,   0,  26,   0,   0,   0, \n     55,   0,   0,   9, 146,   0, \n     16,   0,  26,   0,   0,   0, \n    246,  15,  16,   0,  18,   0, \n      0,   0, 246,  11,  16,   0, \n     20,   0,   0,   0, 166,  14, \n     16,   0,  20,   0,   0,   0, \n     40,   0,   0,   5,  50,   0, \n     16,   0,  27,   0,   0,   0, \n    214,   5,  16,   0,  28,   0, \n      0,   0,  40,   0,   0,   5, \n     66,   0,  16,   0,  27,   0, \n      0,   0,  26,   0,  16,   0, \n     20,   0,   0,   0,  40,   0, \n      0,   5, 130,   0,  16,   0, \n     27,   0,   0,   0,  10,   0, \n     16,   0,  26,   0,   0,   0, \n     54,   0,   0,   5,  50,   0, \n     16,   0,  26,   0,   0,   0, \n    134,   0,  16,   0,  28,   0, \n      0,   0,  54,   0,   0,   5, \n     66,   0,  16,   0,  26,   0, \n      0,   0,  10,   0,  16,   0, \n     20,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     20,   0,   0,   0,  70,  14, \n     16,   0,  27,   0,   0,   0, \n     70,  14,  16,   0,  26,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  50,   0, \n     16,   0,  20,   0,   0,   0, \n     70,   0,  16,   0,  20,   0, \n      0,   0,  70,   0,  16,   0, \n     20,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n     18,   0,   0,   0,  26,   0, \n     16,   0,  20,   0,   0,   0, \n     10,   0,  16,   0,  20,   0, \n      0,   0,  35,   0,   0,   9, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  42,   0,  16,   0, \n     20,   0,   0,   0,  42,   0, \n     16,   0,  20,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  86,   0,   0,   5, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  86,   0, \n      0,   5, 130,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  20,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,  19,   0,   0,   0, \n     58,   0,  16,   0,  19,   0, \n      0,   0,  58,   0,  16,   0, \n     19,   0,   0,   0,  50,   0, \n      0,  10, 130,   0,  16,   0, \n     18,   0,   0,   0,  58,   0, \n     16,   0,  19,   0,   0,   0, \n     42, 128,  32,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     58,   0,  16,   0,  18,   0, \n      0,   0,  28,   0,   0,   5, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     18,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n     19,   0,   0,   0,  58,   0, \n     16,   0,  18,   0,   0,   0, \n     26,   0,  16,   0,  19,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n     22,   0,   0,   1,  79,   0, \n      0,   7, 130,   0,  16,   0, \n      6,   0,   0,   0,  26,   0, \n     16,   0,  19,   0,   0,   0, \n     26,   0,  16,   0,  18,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  55,   0, \n      0,   9,  50,   0,  16,   0, \n     18,   0,   0,   0, 246,  15, \n     16,   0,   6,   0,   0,   0, \n     70,   0,  16,   0,  19,   0, \n      0,   0,  70,   0,  16,   0, \n     18,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n     19,   0,   0,   0,  10,   0, \n     16,   0,  19,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n     18,   0,   0,   0,  22,   0, \n      0,   1,  54,   0,   0,   6, \n     18,   0,  16,   0,  18,   0, \n      0,   0,  58, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  54,   0,   0,   4, \n     66,   0,  16,   0,  18,   0, \n      0,   0,  10,  64,   2,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     22,   6,  16,   0,  18,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0, 190,  24, \n      0,   1,  31,   0,   4,   3, \n     26,   0,  16,   0,   1,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,  18,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  10,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   3,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   8,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   4,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      3,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   3,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      4,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     79,   0,   0,   9,  98,   0, \n     16,   0,   0,   0,   0,   0, \n      6,  64,   2,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  58,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1,  21,   0,   0,   1, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   8,  18,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    226,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n      6, 249,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  32,   0,   0,   0, \n      6, 240,  17,   0,   0,   0, \n      0,   0,  79,   0,   0,   7, \n     66,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     31,   0,   4,   3,  42,   0, \n     16,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  18,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n    168,   0,   0,   8, 114, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n    134,   3,  16,   0,   2,   0, \n      0,   0, 168,   0,   0,   8, \n     18, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  21,   0, \n      0,   1, 167,   0,   0,   9, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n      6, 112,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   8, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0,  79,   0, \n      0,   7,  34,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  31,   0,   4,   3, \n     26,   0,  16,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    114,   0,  16,   0,   1,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70, 242,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 130,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     32,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     18,   0,   0,   1, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      1,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70, 126,  16,   0, \n      1,   0,   0,   0,  21,   0, \n      0,   1, 168,   0,   0,   9, \n    242, 224,  17,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     62,   0,   0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/Shaders/Compiled/BC7Encode_TryMode456CS.inc",
    "content": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n///\n// Input signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Input\n//\n// Output signature:\n//\n// Name                 Index   Mask Register SysValue  Format   Used\n// -------------------- ----- ------ -------- -------- ------- ------\n// no Output\ncs_4_0\ndcl_globalFlags refactoringAllowed\ndcl_immediateConstantBuffer { { 0, 0, 0, 0},\n                              { 0, 4, 0, 0},\n                              { 0, 9, 0, 0},\n                              { 1, 13, 0, 0},\n                              { 1, 17, 0, 0},\n                              { 1, 21, 0, 0},\n                              { 1, 26, 0, 0},\n                              { 2, 30, 0, 0},\n                              { 2, 34, 0, 0},\n                              { 2, 38, 0, 0},\n                              { 2, 43, 0, 0},\n                              { 2, 47, 0, 0},\n                              { 3, 51, 0, 0},\n                              { 3, 55, 0, 0},\n                              { 3, 60, 0, 0},\n                              { 3, 64, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 9, 0, 0},\n                              { 4, 18, 0, 0},\n                              { 4, 27, 0, 0},\n                              { 5, 37, 0, 0},\n                              { 5, 46, 0, 0},\n                              { 5, 55, 0, 0},\n                              { 5, 64, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 8, 21, 0, 0},\n                              { 8, 43, 0, 0},\n                              { 8, 64, 0, 0},\n                              { 8, 0, 0, 0},\n                              { 9, 0, 0, 0},\n                              { 9, 0, 0, 0},\n                              { 9, 0, 0, 0},\n                              { 9, 0, 0, 0},\n                              { 10, 0, 0, 0},\n                              { 10, 0, 0, 0},\n                              { 10, 0, 0, 0},\n                              { 10, 0, 0, 0},\n                              { 10, 0, 0, 0},\n                              { 11, 0, 0, 0},\n                              { 11, 0, 0, 0},\n                              { 11, 0, 0, 0},\n                              { 11, 0, 0, 0},\n                              { 12, 0, 0, 0},\n                              { 12, 0, 0, 0},\n                              { 12, 0, 0, 0},\n                              { 12, 0, 0, 0},\n                              { 13, 0, 0, 0},\n                              { 13, 0, 0, 0},\n                              { 13, 0, 0, 0},\n                              { 13, 0, 0, 0},\n                              { 14, 0, 0, 0},\n                              { 14, 0, 0, 0},\n                              { 14, 0, 0, 0},\n                              { 14, 0, 0, 0},\n                              { 15, 0, 0, 0},\n                              { 15, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 4, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 5, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 6, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 7, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 0, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 1, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 2, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0},\n                              { 3, 0, 0, 0} }\ndcl_constantbuffer cb0[2], immediateIndexed\ndcl_resource_texture2d (float,float,float,float) t0\ndcl_uav_structured u0, 16\ndcl_input vThreadIDInGroupFlattened\ndcl_input vThreadGroupID.x\ndcl_temps 19\ndcl_tgsm_structured g0, 100, 64\ndcl_thread_group 64, 1, 1\nushr r0.x, vThreadIDInGroupFlattened.x, l(4)\nishl r0.y, vThreadGroupID.x, l(2)\niadd r0.y, r0.y, cb0[1].x\niadd r0.x, r0.x, r0.y\nuge r0.y, r0.x, cb0[1].y\nif_nz r0.y\n  ret \nendif \nand r0.y, vThreadIDInGroupFlattened.x, l(48)\niadd r0.z, -r0.y, vThreadIDInGroupFlattened.x\nult r1.xyzw, r0.zzzz, l(16, 8, 4, 2)\nif_nz r1.x\n  udiv r0.w, null, r0.x, cb0[0].y\n  imad r2.x, -r0.w, cb0[0].y, r0.x\n  ishl r2.x, r2.x, l(2)\n  ishl r0.w, r0.w, l(2)\n  and r2.y, r0.z, l(3)\n  iadd r2.x, r2.y, r2.x\n  ushr r3.x, r0.z, l(2)\n  iadd r2.y, r0.w, r3.x\n  mov r2.zw, l(0,0,0,0)\n  ld r2.xyzw, r2.xyzw, t0.xyzw\n  mul r2.xyzw, r2.xyzw, l(255.000000, 255.000000, 255.000000, 255.000000)\n  ftou r2.xyzw, r2.xyzw\n  umin r2.xyzw, r2.xyzw, l(255, 255, 255, 255)\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(0), r2.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r2.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r2.xyzw\nendif \nif_nz r1.y\n  ld_structured r2.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r4.xyzw, r0.w, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.w, l(52), g0.xyzw\n  umin r2.xyzw, r2.xyzw, r4.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r2.xyzw\n  umax r2.xyzw, r3.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r2.xyzw\nendif \nif_nz r1.z\n  ld_structured r2.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r4.xyzw, r0.w, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.w, l(52), g0.xyzw\n  umin r2.xyzw, r2.xyzw, r4.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r2.xyzw\n  umax r2.xyzw, r3.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r2.xyzw\nendif \nif_nz r1.w\n  ld_structured r2.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r4.xyzw, r0.w, l(36), g0.xyzw\n  ld_structured r5.xyzw, r0.w, l(52), g0.xyzw\n  umin r2.xyzw, r2.xyzw, r4.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r2.xyzw\n  umax r2.xyzw, r3.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r2.xyzw\nendif \nult r2.xy, r0.zzzz, l(1, 12, 0, 0)\nif_nz r2.x\n  ld_structured r3.xyzw, vThreadIDInGroupFlattened.x, l(36), g0.xyzw\n  ld_structured r4.xyzw, vThreadIDInGroupFlattened.x, l(52), g0.xyzw\n  iadd r0.w, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r5.xyzw, r0.w, l(36), g0.xyzw\n  ld_structured r6.xyzw, r0.w, l(52), g0.xyzw\n  umin r3.xyzw, r3.xyzw, r5.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(36), r3.xyzw\n  umax r3.xyzw, r4.xyzw, r6.xyzw\n  store_structured g0.xyzw, vThreadIDInGroupFlattened.x, l(52), r3.xyzw\nendif \nld_structured r3.xyzw, r0.y, l(0), g0.xyzw\nld_structured r4.xyzw, r0.y, l(36), g0.xyzw\nld_structured r5.xyzw, r0.y, l(52), g0.xyzw\nand r0.w, r0.z, l(1)\nmovc r6.xyz, r0.wwww, l(1,1,2,0), l(0,2,1,0)\nmovc r6.xyz, r1.yyyy, r6.xyzx, l(0,2,2,0)\nif_nz r2.y\n  ieq r7.xyzw, r0.zzzz, l(8, 9, 10, 11)\n  ult r0.w, r0.z, l(6)\n  or r0.w, r7.z, r0.w\n  or r2.yzw, r1.wwzy, r7.xxyw\n  mov r7.y, r4.z\n  mov r7.w, r5.z\n  mov r7.x, l(3)\n  mov r8.x, r4.w\n  mov r8.y, r5.w\n  mov r8.z, l(0)\n  movc r9.xyz, r2.wwww, r7.ywxy, r8.xyzx\n  movc r10.yw, r2.wwww, r8.xxxy, r7.yyyw\n  mov r11.x, r4.y\n  mov r11.y, r5.y\n  mov r11.z, l(2)\n  movc r9.xyz, r0.wwww, r11.xyzx, r9.xyzx\n  mov r7.xz, r8.xxyx\n  mov r10.xz, r11.xxyx\n  movc r7.xyzw, r0.wwww, r7.xzwy, r10.xzwy\n  mov r10.x, r4.x\n  mov r10.yz, r7.xxwx\n  movc r11.xyz, r2.zzzz, r4.wyzw, r10.xyzx\n  mov r10.y, r5.x\n  mov r10.z, l(1)\n  movc r9.xyz, r2.zzzz, r10.xyzx, r9.xyzx\n  mov r7.x, r10.y\n  movc r7.xyz, r2.zzzz, r5.wyzw, r7.xyzx\n  movc r10.xyz, r2.yyyy, r4.xyzx, r11.xyzx\n  movc r7.xyz, r2.yyyy, r5.xyzx, r7.xyzx\n  movc r2.yzw, r2.yyyy, r8.xxyz, r9.xxyz\n  if_nz r1.y\n    iadd r8.xyz, r10.xyzx, l(4, 4, 4, 0)\n    umin r8.xyz, r8.xyzx, l(255, 255, 255, 0)\n    iadd r9.xy, r2.yzyy, l(2, 2, 0, 0)\n    umin r9.xy, r9.xyxx, l(255, 255, 0, 0)\n    and r11.xyz, r8.xyzx, l(248, 248, 248, 0)\n    ushr r8.xyz, r8.xyzx, l(5)\n    iadd r8.xyz, r8.xyzx, r11.xyzx\n    and r9.zw, r9.xxxy, l(0, 0, 252, 252)\n    ushr r9.xy, r9.xyxx, l(6)\n    iadd r11.xyz, r7.xyzx, l(4, 4, 4, 0)\n    umin r11.xyz, r11.xyzx, l(255, 255, 255, 0)\n    and r12.xyz, r11.xyzx, l(248, 248, 248, 0)\n    ushr r11.xyz, r11.xyzx, l(5)\n    iadd r11.xyz, r11.xyzx, r12.xyzx\n    iadd r9.xy, r9.xyxx, r9.zwzz\n    mov r11.w, r9.y\n    mov r12.y, l(4)\n  else \n    iadd r10.xyz, r10.xyzx, l(1, 1, 1, 0)\n    umin r10.xyz, r10.xyzx, l(255, 255, 255, 0)\n    and r13.xyz, r10.xyzx, l(254, 254, 254, 0)\n    ushr r10.xyz, r10.xyzx, l(7)\n    iadd r8.xyz, r10.xyzx, r13.xyzx\n    iadd r7.xyz, r7.xyzx, l(1, 1, 1, 0)\n    umin r7.xyz, r7.xyzx, l(255, 255, 255, 0)\n    and r10.xyz, r7.xyzx, l(254, 254, 254, 0)\n    ushr r7.xyz, r7.xyzx, l(7)\n    iadd r11.xyz, r7.xyzx, r10.xyzx\n    mov r9.x, r2.y\n    mov r11.w, r2.z\n    mov r12.y, l(5)\n  endif \n  ieq r7.xyz, r2.wwww, l(1, 2, 3, 0)\n  movc r10.zw, r7.zzzz, r3.wwwz, r3.zzzw\n  mov r10.xy, r3.xyxx\n  movc r10.yzw, r7.yyyy, r3.wwzy, r10.yyzw\n  movc r10.xyzw, r7.xxxx, r3.wyzx, r10.xyzw\n  ineg r13.xyz, r8.xyzx\n  ineg r13.w, r9.x\n  iadd r14.xyzw, r11.xyzw, r13.xyzw\n  imul null, r15.xyz, r14.xywx, r14.xywx\n  iadd r0.w, r15.y, r15.x\n  imad r0.w, r14.z, r14.z, r0.w\n  iadd r13.xyzw, r10.xyzw, r13.xyzw\n  imul null, r13.xyw, r13.xyxw, r13.xyxw\n  iadd r2.y, r13.y, r13.x\n  imad r2.y, r13.z, r13.z, r2.y\n  iadd r10.xyzw, -r11.xyzw, r10.xyzw\n  imul null, r10.xyw, r10.xyxw, r10.xyxw\n  iadd r2.z, r10.y, r10.x\n  imad r2.z, r10.z, r10.z, r2.z\n  ilt r2.y, r2.z, r2.y\n  ineg r16.xyzw, r14.xyzw\n  movc r10.xyz, r2.yyyy, r11.xyzx, r8.xyzx\n  movc r8.xyz, r2.yyyy, r8.xyzx, r11.xyzx\n  movc r11.xyz, r2.yyyy, r16.xyzx, r14.xyzx\n  ilt r2.y, r10.w, r13.w\n  mov r9.y, r11.w\n  mov r9.z, r16.w\n  mov r9.w, r14.w\n  movc r9.xyz, r2.yyyy, r9.yxzy, r9.xywx\n  ige r2.y, l(0), r0.w\n  itof r2.z, r0.w\n  ishl r12.zw, r6.yyyz, l(6)\n  ishl r6.yz, r6.yyzy, l(4)\n  iadd r13.xy, r12.zwzz, l(11, 11, 0, 0)\n  ige r7.w, l(0), r15.z\n  itof r8.w, r15.z\n  udiv null, r13.xy, r13.xyxx, l(68, 68, 0, 0)\n  mov r13.zw, l(0,0,0,0)\n  loop \n    uge r9.w, r13.w, l(16)\n    breakc_nz r9.w\n    iadd r9.w, r0.y, r13.w\n    ld_structured r14.xyzw, r9.w, l(0), g0.xyzw\n    movc r16.zw, r7.zzzz, r14.wwwz, r14.zzzw\n    mov r16.xy, r14.xyxx\n    movc r16.yzw, r7.yyyy, r14.wwzy, r16.yyzw\n    movc r14.xyzw, r7.xxxx, r14.wyzx, r16.xyzw\n    iadd r15.xyw, -r10.xyxz, r14.xyxz\n    imul null, r15.xy, r11.xyxx, r15.xyxx\n    iadd r9.w, r15.y, r15.x\n    imad r9.w, r11.z, r15.w, r9.w\n    ige r10.w, l(0), r9.w\n    or r10.w, r2.y, r10.w\n    ilt r11.w, r9.w, r0.w\n    itof r9.w, r9.w\n    mul r9.w, r9.w, l(63.499989)\n    div r9.w, r9.w, r2.z\n    ftou r9.w, r9.w\n    iadd r9.w, r9.w, r12.z\n    movc r9.w, r11.w, icb[r9.w + 0].x, r13.x\n    movc r9.w, r10.w, l(0), r9.w\n    iadd r10.w, -r9.x, r14.w\n    imul null, r10.w, r9.z, r10.w\n    ige r11.w, l(0), r10.w\n    or r11.w, r7.w, r11.w\n    ilt r15.x, r10.w, r15.z\n    itof r10.w, r10.w\n    mul r10.w, r10.w, l(63.499989)\n    div r10.w, r10.w, r8.w\n    ftou r10.w, r10.w\n    iadd r10.w, r10.w, r12.w\n    movc r10.w, r15.x, icb[r10.w + 0].x, r13.y\n    movc r10.w, r11.w, l(0), r10.w\n    iadd r9.w, r6.y, r9.w\n    iadd r11.w, l(64), -icb[r9.w + 0].y\n    imul null, r15.xyw, r8.xyxz, icb[r9.w + 0].yyyy\n    imad r15.xyw, r11.wwww, r10.xyxz, r15.xyxw\n    iadd r15.xyw, r15.xyxw, l(32, 32, 0, 32)\n    ushr r16.xyw, r15.xyxw, l(6)\n    iadd r9.w, r6.z, r10.w\n    iadd r10.w, l(64), -icb[r9.w + 0].y\n    imul null, r9.w, r9.y, icb[r9.w + 0].y\n    imad r9.w, r10.w, r9.x, r9.w\n    iadd r9.w, r9.w, l(32)\n    ushr r15.y, r9.w, l(6)\n    ult r17.xyz, r16.xywx, r14.xyzx\n    mov r16.z, r14.x\n    movc r17.xw, r17.xxxx, r16.zzzx, r16.xxxz\n    mov r16.xz, r14.yyzy\n    movc r16.xyzw, r17.yyzz, r16.xyzw, r16.yxwz\n    ult r9.w, r15.y, r14.w\n    mov r15.x, r14.w\n    movc r14.xy, r9.wwww, r15.xyxx, r15.yxyy\n    ineg r18.w, r17.w\n    ineg r18.yz, r16.yywy\n    ineg r18.x, r14.y\n    mov r14.w, r17.x\n    mov r14.yz, r16.xxzx\n    iadd r14.xyzw, r18.xyzw, r14.xyzw\n    movc r16.zw, r7.zzzz, r14.xxxz, r14.zzzx\n    mov r16.xy, r14.wyww\n    movc r16.yzw, r7.yyyy, r14.xxzy, r16.yyzw\n    movc r14.xyzw, r7.xxxx, r14.xyzw, r16.xyzw\n    imul null, r14.xy, r14.xyxx, r14.xyxx\n    iadd r9.w, r14.y, r14.x\n    imad r9.w, r14.z, r14.z, r9.w\n    utof r9.w, r9.w\n    utof r10.w, r14.w\n    mul r10.w, r10.w, r10.w\n    mad r9.w, r10.w, cb0[1].z, r9.w\n    ftou r9.w, r9.w\n    iadd r13.z, r9.w, r13.z\n    iadd r13.w, r13.w, l(1)\n  endloop \n  mov r12.x, r13.z\n  mov r6.w, r2.w\nelse \n  if_nz r1.x\n    iadd r7.x, r0.z, l(-12)\n    ushr r7.y, r7.x, l(1)\n    and r0.zw, r7.xxxy, l(0, 0, 1, 1)\n    and r4.xyzw, r4.xyzw, l(-2, -2, -2, -2)\n    iadd r4.xyzw, r0.zzzz, r4.xyzw\n    and r5.xyzw, r5.xyzw, l(-2, -2, -2, -2)\n    iadd r5.xyzw, r0.wwww, r5.xyzw\n    iadd r8.xyzw, -r4.xyzw, r5.xyzw\n    imul null, r0.zw, r8.xxxy, r8.xxxy\n    iadd r0.z, r0.w, r0.z\n    imad r0.z, r8.z, r8.z, r0.z\n    imad r0.z, r8.w, r8.w, r0.z\n    iadd r3.xyzw, r3.xyzw, -r4.xyzw\n    imul null, r2.yz, r3.xxyx, r8.xxyx\n    iadd r0.w, r2.z, r2.y\n    imad r0.w, r8.z, r3.z, r0.w\n    imad r0.w, r8.w, r3.w, r0.w\n    ilt r1.x, l(0), r0.z\n    ige r2.y, r0.w, l(0)\n    and r1.x, r1.x, r2.y\n    itof r0.w, r0.w\n    mul r0.w, r0.w, l(63.499989)\n    ftou r0.w, r0.w\n    ishl r2.y, r0.z, l(5)\n    ult r0.w, r2.y, r0.w\n    and r0.w, r0.w, r1.x\n    ineg r3.xyzw, r8.xyzw\n    movc r9.xyzw, r0.wwww, r5.xyzw, r4.xyzw\n    movc r4.xyzw, r0.wwww, r4.xyzw, r5.xyzw\n    movc r3.xyzw, r0.wwww, r3.xyzw, r8.xyzw\n    ige r0.w, l(0), r0.z\n    itof r1.x, r0.z\n    mov r12.xy, l(0,0,0,0)\n    loop \n      uge r2.y, r12.y, l(16)\n      breakc_nz r2.y\n      iadd r2.y, r0.y, r12.y\n      ld_structured r5.xyzw, r2.y, l(0), g0.xyzw\n      iadd r8.xyzw, -r9.xyzw, r5.xyzw\n      imul null, r2.yz, r3.xxyx, r8.xxyx\n      iadd r2.y, r2.z, r2.y\n      imad r2.y, r3.z, r8.z, r2.y\n      imad r2.y, r3.w, r8.w, r2.y\n      ige r2.z, l(0), r2.y\n      or r2.z, r0.w, r2.z\n      ilt r2.w, r2.y, r0.z\n      itof r2.y, r2.y\n      mul r2.y, r2.y, l(63.499989)\n      div r2.y, r2.y, r1.x\n      ftou r2.y, r2.y\n      movc r2.y, r2.w, icb[r2.y + 0].x, l(15)\n      movc r2.y, r2.z, l(0), r2.y\n      iadd r2.z, l(64), -icb[r2.y + 0].y\n      imul null, r8.xyzw, r4.xyzw, icb[r2.y + 0].yyyy\n      imad r8.xyzw, r2.zzzz, r9.xyzw, r8.xyzw\n      iadd r8.xyzw, r8.xyzw, l(32, 32, 32, 32)\n      ushr r8.xyzw, r8.xzyw, l(6)\n      ult r10.xyzw, r8.xzyw, r5.xyzw\n      mov r11.xz, r5.xxyx\n      mov r11.yw, r8.xxxz\n      movc r11.xyzw, r10.xxyy, r11.xyzw, r11.yxwz\n      mov r8.xz, r5.zzwz\n      movc r5.xyzw, r10.zwzw, r8.ywxz, r8.xzyw\n      ineg r8.xy, r11.ywyy\n      ineg r8.zw, r5.xxxy\n      mov r5.xy, r11.xzxx\n      iadd r5.xyzw, r8.xyzw, r5.xyzw\n      imul null, r2.yz, r5.xxyx, r5.xxyx\n      iadd r2.y, r2.z, r2.y\n      imad r2.y, r5.z, r5.z, r2.y\n      utof r2.y, r2.y\n      utof r2.z, r5.w\n      mul r2.z, r2.z, r2.z\n      mad r2.y, r2.z, cb0[1].z, r2.y\n      ftou r2.y, r2.y\n      iadd r12.x, r2.y, r12.x\n      iadd r12.y, r12.y, l(1)\n    endloop \n    mov r12.y, l(6)\n    mov r6.w, r7.x\n  else \n    mov r12.xy, l(-1,0,0,0)\n    mov r6.w, l(0)\n  endif \nendif \nstore_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r12.xyxx\nstore_structured g0.xy, vThreadIDInGroupFlattened.x, l(28), r6.xwxx\nif_nz r1.y\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(8)\n  ld_structured r3.yz, r0.y, l(16), g0.xxyx\n  ld_structured r4.xy, r0.y, l(28), g0.xyxx\n  ult r0.z, r3.y, r12.x\n  if_nz r0.z\n    ld_structured r3.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r3.xzxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(28), r4.xyxx\n  endif \nendif \nif_nz r1.z\n  ld_structured r3.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(4)\n  ld_structured r4.yz, r0.y, l(16), g0.xxyx\n  ld_structured r5.xy, r0.y, l(28), g0.xyxx\n  ult r0.z, r4.y, r3.x\n  if_nz r0.z\n    ld_structured r4.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r4.xzxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(28), r5.xyxx\n  endif \nendif \nif_nz r1.w\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(2)\n  ld_structured r3.yz, r0.y, l(16), g0.xxyx\n  ld_structured r4.xy, r0.y, l(28), g0.xyxx\n  ult r0.z, r3.y, r1.x\n  if_nz r0.z\n    ld_structured r3.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r3.xzxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(28), r4.xyxx\n  endif \nendif \nif_nz r2.x\n  ld_structured r1.x, vThreadIDInGroupFlattened.x, l(16), g0.xxxx\n  iadd r0.y, vThreadIDInGroupFlattened.x, l(1)\n  ld_structured r2.yz, r0.y, l(16), g0.xxyx\n  ld_structured r3.xy, r0.y, l(28), g0.xyxx\n  ult r0.z, r2.y, r1.x\n  if_nz r0.z\n    ld_structured r2.x, r0.y, l(16), g0.xxxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(16), r2.xzxx\n    store_structured g0.xy, vThreadIDInGroupFlattened.x, l(28), r3.xyxx\n  endif \n  ld_structured r1.xw, vThreadIDInGroupFlattened.x, l(28), g0.xxxy\n  ishl r0.y, r1.x, l(31)\n  ld_structured r1.xy, vThreadIDInGroupFlattened.x, l(16), g0.xyxx\n  or r1.y, r0.y, r1.y\n  mov r1.z, l(0)\n  store_structured u0.xyzw, r0.x, l(0), r1.xyzw\nendif \nret \n// Approximately 0 instruction slots used\n#endif\n\nconst BYTE BC7Encode_TryMode456CS[] =\n{\n     68,  88,  66,  67, 193,  29, \n     43, 212, 231, 175, 144,  60, \n    211,  12, 231,  93, 197, 161, \n     15, 183,   1,   0,   0,   0, \n     56,  56,   0,   0,   3,   0, \n      0,   0,  44,   0,   0,   0, \n     60,   0,   0,   0,  76,   0, \n      0,   0,  73,  83,  71,  78, \n      8,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     79,  83,  71,  78,   8,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  83,  72, \n     69,  88, 228,  55,   0,   0, \n     64,   0,   5,   0, 249,  13, \n      0,   0, 106,   8,   0,   1, \n     53,  24,   0,   0,   2,   3, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  17,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  21,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n     26,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  30,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  34,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     38,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,  43,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,  47,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     51,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,  55,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,  60,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n     64,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n     18,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,  27,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  37,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n     46,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n     21,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      8,   0,   0,   0,  43,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   8,   0, \n      0,   0,  64,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   8,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   9,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   9,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      9,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     10,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  10,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  11,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  11,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     11,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  12,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     12,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     13,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  13,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  13,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  14,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  14,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     14,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  15,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  15,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   4,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   4,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      5,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   5,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   5,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      6,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   6,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   6,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   7,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   7,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      7,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   3,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      3,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  89,   0,   0,   4, \n     70, 142,  32,   0,   0,   0, \n      0,   0,   2,   0,   0,   0, \n     88,  24,   0,   4,   0, 112, \n     16,   0,   0,   0,   0,   0, \n     85,  85,   0,   0, 158,   0, \n      0,   4,   0, 224,  17,   0, \n      0,   0,   0,   0,  16,   0, \n      0,   0,  95,   0,   0,   2, \n      0,  64,   2,   0,  95,   0, \n      0,   2,  18,  16,   2,   0, \n    104,   0,   0,   2,  19,   0, \n      0,   0, 160,   0,   0,   5, \n      0, 240,  17,   0,   0,   0, \n      0,   0, 100,   0,   0,   0, \n     64,   0,   0,   0, 155,   0, \n      0,   4,  64,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,  85,   0,   0,   6, \n     18,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  41,   0,   0,   6, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,  16,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  30,   0,   0,   8, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  10, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      0,   0,   0,   0,  10,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,  80,   0,   0,   8, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  26, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      0,   0,   0,   0,  62,   0, \n      0,   1,  21,   0,   0,   1, \n      1,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  48,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16, 128,  65,   0, \n      0,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,  79,   0, \n      0,  10, 242,   0,  16,   0, \n      1,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,  16,   0, \n      0,   0,   8,   0,   0,   0, \n      4,   0,   0,   0,   2,   0, \n      0,   0,  31,   0,   4,   3, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  78,   0,   0,   9, \n    130,   0,  16,   0,   0,   0, \n      0,   0,   0, 208,   0,   0, \n     10,   0,  16,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  35,   0,   0,  11, \n     18,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16, 128, \n     65,   0,   0,   0,   0,   0, \n      0,   0,  26, 128,  32,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,  41,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  41,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n      1,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      3,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     10,   0,  16,   0,   2,   0, \n      0,   0,  85,   0,   0,   7, \n     18,   0,  16,   0,   3,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  54,   0, \n      0,   8, 194,   0,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     45,   0,   0,   7, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  70, 126,  16,   0, \n      0,   0,   0,   0,  56,   0, \n      0,  10, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0,   0,   0, \n    127,  67,   0,   0, 127,  67, \n      0,   0, 127,  67,   0,   0, \n    127,  67,  28,   0,   0,   5, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  84,   0, \n      0,  10, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   6, 130,   0,  16,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n      8,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      4,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9, 242,   0,  16,   0, \n      5,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0,  84,   0, \n      0,   7, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  83,   0, \n      0,   7, 242,   0,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0, 168,   0,   0,   8, \n    242, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  52,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  21,   0, \n      0,   1,  31,   0,   4,   3, \n     42,   0,  16,   0,   1,   0, \n      0,   0, 167,   0,   0,   8, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  36,   0, \n      0,   0,  70, 254,  17,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     84,   0,   0,   7, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     83,   0,   0,   7, 242,   0, \n     16,   0,   2,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0, 168,   0, \n      0,   8, 242, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70,  14, \n     16,   0,   2,   0,   0,   0, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      2,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   4,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   7, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      2,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   2,   0, \n      0,   0,  21,   0,   0,   1, \n     79,   0,   0,  10,  50,   0, \n     16,   0,   2,   0,   0,   0, \n    166,  10,  16,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,  12,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8, 242,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   8, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  30,   0,   0,   6, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   5,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0, 167,   0,   0,   9, \n    242,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70, 254,  17,   0,   0,   0, \n      0,   0,  84,   0,   0,   7, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  36,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  83,   0,   0,   7, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,  70,  14, \n     16,   0,   6,   0,   0,   0, \n    168,   0,   0,   8, 242, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  52,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     36,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     52,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n      1,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  55,   0, \n      0,  15, 114,   0,  16,   0, \n      6,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   0,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  55,   0, \n      0,  12, 114,   0,  16,   0, \n      6,   0,   0,   0,  86,   5, \n     16,   0,   1,   0,   0,   0, \n     70,   2,  16,   0,   6,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   2,   0, \n      0,   0,   2,   0,   0,   0, \n      0,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      2,   0,   0,   0,  32,   0, \n      0,  10, 242,   0,  16,   0, \n      7,   0,   0,   0, 166,  10, \n     16,   0,   0,   0,   0,   0, \n      2,  64,   0,   0,   8,   0, \n      0,   0,   9,   0,   0,   0, \n     10,   0,   0,   0,  11,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     60,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   7,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  60,   0, \n      0,   7, 226,   0,  16,   0, \n      2,   0,   0,   0, 246,   6, \n     16,   0,   1,   0,   0,   0, \n      6,  13,  16,   0,   7,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  42,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,   7,   0,   0,   0, \n      1,  64,   0,   0,   3,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n      8,   0,   0,   0,  58,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0, 214,   4, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  55,   0,   0,   9, \n    162,   0,  16,   0,  10,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n     86,  13,  16,   0,   7,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,  11,   0, \n      0,   0,  26,   0,  16,   0, \n      4,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     11,   0,   0,   0,  26,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,   2,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0, 246,  15,  16,   0, \n      0,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  54,   0,   0,   5, \n     82,   0,  16,   0,   7,   0, \n      0,   0,   6,   1,  16,   0, \n      8,   0,   0,   0,  54,   0, \n      0,   5,  82,   0,  16,   0, \n     10,   0,   0,   0,   6,   1, \n     16,   0,  11,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   7,   0,   0,   0, \n    246,  15,  16,   0,   0,   0, \n      0,   0, 134,   7,  16,   0, \n      7,   0,   0,   0, 134,   7, \n     16,   0,  10,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   4,   0, \n      0,   0,  54,   0,   0,   5, \n     98,   0,  16,   0,  10,   0, \n      0,   0,   6,   3,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0, 166,  10, \n     16,   0,   2,   0,   0,   0, \n    118,  14,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  54,   0, \n      0,   5,  34,   0,  16,   0, \n     10,   0,   0,   0,  10,   0, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,  10,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0, 166,  10,  16,   0, \n      2,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,   9,   0, \n      0,   0,  54,   0,   0,   5, \n     18,   0,  16,   0,   7,   0, \n      0,   0,  26,   0,  16,   0, \n     10,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0, 166,  10, \n     16,   0,   2,   0,   0,   0, \n    118,  14,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   4,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      7,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   5,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,  55,   0, \n      0,   9, 226,   0,  16,   0, \n      2,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n      6,   9,  16,   0,   8,   0, \n      0,   0,   6,   9,  16,   0, \n      9,   0,   0,   0,  31,   0, \n      4,   3,  26,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n     30,   0,   0,  10,  50,   0, \n     16,   0,   9,   0,   0,   0, \n    150,   5,  16,   0,   2,   0, \n      0,   0,   2,  64,   0,   0, \n      2,   0,   0,   0,   2,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10,  50,   0,  16,   0, \n      9,   0,   0,   0,  70,   0, \n     16,   0,   9,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,   2,  64, \n      0,   0, 248,   0,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,   8,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   1,   0,   0,  10, \n    194,   0,  16,   0,   9,   0, \n      0,   0,   6,   4,  16,   0, \n      9,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0, 252,   0, \n      0,   0, 252,   0,   0,   0, \n     85,   0,   0,   7,  50,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      6,   0,   0,   0,  30,   0, \n      0,  10, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0,   4,   0, \n      0,   0,   4,   0,   0,   0, \n      4,   0,   0,   0,   0,   0, \n      0,   0,  84,   0,   0,  10, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,   2,  64, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0,   0,   0,   0,   0, \n      1,   0,   0,  10, 114,   0, \n     16,   0,  12,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,   2,  64,   0,   0, \n    248,   0,   0,   0, 248,   0, \n      0,   0, 248,   0,   0,   0, \n      0,   0,   0,   0,  85,   0, \n      0,   7, 114,   0,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  11,   0,   0,   0, \n      1,  64,   0,   0,   5,   0, \n      0,   0,  30,   0,   0,   7, \n    114,   0,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  70,   2, \n     16,   0,  12,   0,   0,   0, \n     30,   0,   0,   7,  50,   0, \n     16,   0,   9,   0,   0,   0, \n     70,   0,  16,   0,   9,   0, \n      0,   0, 230,  10,  16,   0, \n      9,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n     11,   0,   0,   0,  26,   0, \n     16,   0,   9,   0,   0,   0, \n     54,   0,   0,   5,  34,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   4,   0, \n      0,   0,  18,   0,   0,   1, \n     30,   0,   0,  10, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   2,  64,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   1,   0,   0,   0, \n      0,   0,   0,   0,  84,   0, \n      0,  10, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n      2,  64,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n    255,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,  10, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,   2,  64, \n      0,   0, 254,   0,   0,   0, \n    254,   0,   0,   0, 254,   0, \n      0,   0,   0,   0,   0,   0, \n     85,   0,   0,   7, 114,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      7,   0,   0,   0,  30,   0, \n      0,   7, 114,   0,  16,   0, \n      8,   0,   0,   0,  70,   2, \n     16,   0,  10,   0,   0,   0, \n     70,   2,  16,   0,  13,   0, \n      0,   0,  30,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,   0,   0,   0,   0,   0, \n     84,   0,   0,  10, 114,   0, \n     16,   0,   7,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n    255,   0,   0,   0, 255,   0, \n      0,   0, 255,   0,   0,   0, \n      0,   0,   0,   0,   1,   0, \n      0,  10, 114,   0,  16,   0, \n     10,   0,   0,   0,  70,   2, \n     16,   0,   7,   0,   0,   0, \n      2,  64,   0,   0, 254,   0, \n      0,   0, 254,   0,   0,   0, \n    254,   0,   0,   0,   0,   0, \n      0,   0,  85,   0,   0,   7, \n    114,   0,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   7,   0,   0,   0, \n     30,   0,   0,   7, 114,   0, \n     16,   0,  11,   0,   0,   0, \n     70,   2,  16,   0,   7,   0, \n      0,   0,  70,   2,  16,   0, \n     10,   0,   0,   0,  54,   0, \n      0,   5,  18,   0,  16,   0, \n      9,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,  11,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,  12,   0, \n      0,   0,   1,  64,   0,   0, \n      5,   0,   0,   0,  21,   0, \n      0,   1,  32,   0,   0,  10, \n    114,   0,  16,   0,   7,   0, \n      0,   0, 246,  15,  16,   0, \n      2,   0,   0,   0,   2,  64, \n      0,   0,   1,   0,   0,   0, \n      2,   0,   0,   0,   3,   0, \n      0,   0,   0,   0,   0,   0, \n     55,   0,   0,   9, 194,   0, \n     16,   0,  10,   0,   0,   0, \n    166,  10,  16,   0,   7,   0, \n      0,   0, 246,  11,  16,   0, \n      3,   0,   0,   0, 166,  14, \n     16,   0,   3,   0,   0,   0, \n     54,   0,   0,   5,  50,   0, \n     16,   0,  10,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,  10,   0, \n      0,   0,  86,   5,  16,   0, \n      7,   0,   0,   0, 246,   6, \n     16,   0,   3,   0,   0,   0, \n     86,  14,  16,   0,  10,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,  10,   0, \n      0,   0,   6,   0,  16,   0, \n      7,   0,   0,   0, 118,   2, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16,   0,  10,   0, \n      0,   0,  40,   0,   0,   5, \n    114,   0,  16,   0,  13,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  40,   0, \n      0,   5, 130,   0,  16,   0, \n     13,   0,   0,   0,  10,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  14,   0,   0,   0, \n     70,  14,  16,   0,  11,   0, \n      0,   0,  70,  14,  16,   0, \n     13,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    114,   0,  16,   0,  15,   0, \n      0,   0,  70,   3,  16,   0, \n     14,   0,   0,   0,  70,   3, \n     16,   0,  14,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,  15,   0, \n      0,   0,  10,   0,  16,   0, \n     15,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  14,   0,   0,   0, \n     42,   0,  16,   0,  14,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   7, 242,   0,  16,   0, \n     13,   0,   0,   0,  70,  14, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  13,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0, 178,   0, \n     16,   0,  13,   0,   0,   0, \n     70,  12,  16,   0,  13,   0, \n      0,   0,  70,  12,  16,   0, \n     13,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,  13,   0,   0,   0, \n     10,   0,  16,   0,  13,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n     13,   0,   0,   0,  42,   0, \n     16,   0,  13,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   8, \n    242,   0,  16,   0,  10,   0, \n      0,   0,  70,  14,  16, 128, \n     65,   0,   0,   0,  11,   0, \n      0,   0,  70,  14,  16,   0, \n     10,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    178,   0,  16,   0,  10,   0, \n      0,   0,  70,  12,  16,   0, \n     10,   0,   0,   0,  70,  12, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n     10,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  34,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  40,   0,   0,   5, \n    242,   0,  16,   0,  16,   0, \n      0,   0,  70,  14,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     10,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,  11,   0, \n      0,   0,  70,   2,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n      8,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,   8,   0, \n      0,   0,  70,   2,  16,   0, \n     11,   0,   0,   0,  55,   0, \n      0,   9, 114,   0,  16,   0, \n     11,   0,   0,   0,  86,   5, \n     16,   0,   2,   0,   0,   0, \n     70,   2,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  34,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  13,   0, \n      0,   0,  54,   0,   0,   5, \n     34,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n     11,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,  16,   0,   0,   0, \n     54,   0,   0,   5, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  55,   0,   0,   9, \n    114,   0,  16,   0,   9,   0, \n      0,   0,  86,   5,  16,   0, \n      2,   0,   0,   0,  22,   6, \n     16,   0,   9,   0,   0,   0, \n     70,   3,  16,   0,   9,   0, \n      0,   0,  33,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     43,   0,   0,   5,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n    194,   0,  16,   0,  12,   0, \n      0,   0,  86,   9,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     41,   0,   0,   7,  98,   0, \n     16,   0,   6,   0,   0,   0, \n     86,   6,  16,   0,   6,   0, \n      0,   0,   1,  64,   0,   0, \n      4,   0,   0,   0,  30,   0, \n      0,  10,  50,   0,  16,   0, \n     13,   0,   0,   0, 230,  10, \n     16,   0,  12,   0,   0,   0, \n      2,  64,   0,   0,  11,   0, \n      0,   0,  11,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,  33,   0,   0,   7, \n    130,   0,  16,   0,   7,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,  15,   0,   0,   0, \n     43,   0,   0,   5, 130,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,  15,   0, \n      0,   0,  78,   0,   0,  11, \n      0, 208,   0,   0,  50,   0, \n     16,   0,  13,   0,   0,   0, \n     70,   0,  16,   0,  13,   0, \n      0,   0,   2,  64,   0,   0, \n     68,   0,   0,   0,  68,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   8, 194,   0,  16,   0, \n     13,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  13,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,  14,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     55,   0,   0,   9, 194,   0, \n     16,   0,  16,   0,   0,   0, \n    166,  10,  16,   0,   7,   0, \n      0,   0, 246,  11,  16,   0, \n     14,   0,   0,   0, 166,  14, \n     16,   0,  14,   0,   0,   0, \n     54,   0,   0,   5,  50,   0, \n     16,   0,  16,   0,   0,   0, \n     70,   0,  16,   0,  14,   0, \n      0,   0,  55,   0,   0,   9, \n    226,   0,  16,   0,  16,   0, \n      0,   0,  86,   5,  16,   0, \n      7,   0,   0,   0, 246,   6, \n     16,   0,  14,   0,   0,   0, \n     86,  14,  16,   0,  16,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,  14,   0, \n      0,   0,   6,   0,  16,   0, \n      7,   0,   0,   0, 118,   2, \n     16,   0,  14,   0,   0,   0, \n     70,  14,  16,   0,  16,   0, \n      0,   0,  30,   0,   0,   8, \n    178,   0,  16,   0,  15,   0, \n      0,   0,  70,   8,  16, 128, \n     65,   0,   0,   0,  10,   0, \n      0,   0,  70,   8,  16,   0, \n     14,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     50,   0,  16,   0,  15,   0, \n      0,   0,  70,   0,  16,   0, \n     11,   0,   0,   0,  70,   0, \n     16,   0,  15,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,  15,   0, \n      0,   0,  10,   0,  16,   0, \n     15,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,  11,   0,   0,   0, \n     58,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  33,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     34,   0,   0,   7, 130,   0, \n     16,   0,  11,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  28,   0,   0,   5, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,  12,   0, \n      0,   0,  55,   0,   0,  10, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n     11,   0,   0,   0,  10, 144, \n    144,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  10,   0, \n     16,   0,  13,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     30,   0,   0,   8, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     10,   0,  16, 128,  65,   0, \n      0,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     42,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  33,   0, \n      0,   7, 130,   0,  16,   0, \n     11,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  60,   0,   0,   7, \n    130,   0,  16,   0,  11,   0, \n      0,   0,  58,   0,  16,   0, \n      7,   0,   0,   0,  58,   0, \n     16,   0,  11,   0,   0,   0, \n     34,   0,   0,   7,  18,   0, \n     16,   0,  15,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  42,   0,  16,   0, \n     15,   0,   0,   0,  43,   0, \n      0,   5, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     56,   0,   0,   7, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,   1,  64,   0,   0, \n    253, 255, 125,  66,  14,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  28,   0,   0,   5, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  12,   0, \n      0,   0,  55,   0,   0,  10, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  10,   0,  16,   0, \n     15,   0,   0,   0,  10, 144, \n    144,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  26,   0, \n     16,   0,  13,   0,   0,   0, \n     55,   0,   0,   9, 130,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  11,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     26,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   9, 130,   0,  16,   0, \n     11,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     26, 144, 144, 128,  65,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  38,   0, \n      0,   9,   0, 208,   0,   0, \n    178,   0,  16,   0,  15,   0, \n      0,   0,  70,   8,  16,   0, \n      8,   0,   0,   0,  86, 149, \n    144,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  35,   0, \n      0,   9, 178,   0,  16,   0, \n     15,   0,   0,   0, 246,  15, \n     16,   0,  11,   0,   0,   0, \n     70,   8,  16,   0,  10,   0, \n      0,   0,  70,  12,  16,   0, \n     15,   0,   0,   0,  30,   0, \n      0,  10, 178,   0,  16,   0, \n     15,   0,   0,   0,  70,  12, \n     16,   0,  15,   0,   0,   0, \n      2,  64,   0,   0,  32,   0, \n      0,   0,  32,   0,   0,   0, \n      0,   0,   0,   0,  32,   0, \n      0,   0,  85,   0,   0,   7, \n    178,   0,  16,   0,  16,   0, \n      0,   0,  70,  12,  16,   0, \n     15,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,   6,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  30,   0, \n      0,   9, 130,   0,  16,   0, \n     10,   0,   0,   0,   1,  64, \n      0,   0,  64,   0,   0,   0, \n     26, 144, 144, 128,  65,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  38,   0, \n      0,   9,   0, 208,   0,   0, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n      9,   0,   0,   0,  26, 144, \n    144,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  35,   0, \n      0,   9, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     10,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  30,   0, \n      0,   7, 130,   0,  16,   0, \n      9,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n      1,  64,   0,   0,  32,   0, \n      0,   0,  85,   0,   0,   7, \n     34,   0,  16,   0,  15,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,   1,  64, \n      0,   0,   6,   0,   0,   0, \n     79,   0,   0,   7, 114,   0, \n     16,   0,  17,   0,   0,   0, \n     70,   3,  16,   0,  16,   0, \n      0,   0,  70,   2,  16,   0, \n     14,   0,   0,   0,  54,   0, \n      0,   5,  66,   0,  16,   0, \n     16,   0,   0,   0,  10,   0, \n     16,   0,  14,   0,   0,   0, \n     55,   0,   0,   9, 146,   0, \n     16,   0,  17,   0,   0,   0, \n      6,   0,  16,   0,  17,   0, \n      0,   0, 166,   2,  16,   0, \n     16,   0,   0,   0,   6,   8, \n     16,   0,  16,   0,   0,   0, \n     54,   0,   0,   5,  82,   0, \n     16,   0,  16,   0,   0,   0, \n     86,   6,  16,   0,  14,   0, \n      0,   0,  55,   0,   0,   9, \n    242,   0,  16,   0,  16,   0, \n      0,   0,  86,  10,  16,   0, \n     17,   0,   0,   0,  70,  14, \n     16,   0,  16,   0,   0,   0, \n     22,  11,  16,   0,  16,   0, \n      0,   0,  79,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n     15,   0,   0,   0,  58,   0, \n     16,   0,  14,   0,   0,   0, \n     54,   0,   0,   5,  18,   0, \n     16,   0,  15,   0,   0,   0, \n     58,   0,  16,   0,  14,   0, \n      0,   0,  55,   0,   0,   9, \n     50,   0,  16,   0,  14,   0, \n      0,   0, 246,  15,  16,   0, \n      9,   0,   0,   0,  70,   0, \n     16,   0,  15,   0,   0,   0, \n     22,   5,  16,   0,  15,   0, \n      0,   0,  40,   0,   0,   5, \n    130,   0,  16,   0,  18,   0, \n      0,   0,  58,   0,  16,   0, \n     17,   0,   0,   0,  40,   0, \n      0,   5,  98,   0,  16,   0, \n     18,   0,   0,   0,  86,   7, \n     16,   0,  16,   0,   0,   0, \n     40,   0,   0,   5,  18,   0, \n     16,   0,  18,   0,   0,   0, \n     26,   0,  16,   0,  14,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,  14,   0, \n      0,   0,  10,   0,  16,   0, \n     17,   0,   0,   0,  54,   0, \n      0,   5,  98,   0,  16,   0, \n     14,   0,   0,   0,   6,   2, \n     16,   0,  16,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,  14,   0,   0,   0, \n     70,  14,  16,   0,  18,   0, \n      0,   0,  70,  14,  16,   0, \n     14,   0,   0,   0,  55,   0, \n      0,   9, 194,   0,  16,   0, \n     16,   0,   0,   0, 166,  10, \n     16,   0,   7,   0,   0,   0, \n      6,   8,  16,   0,  14,   0, \n      0,   0, 166,   2,  16,   0, \n     14,   0,   0,   0,  54,   0, \n      0,   5,  50,   0,  16,   0, \n     16,   0,   0,   0, 118,  15, \n     16,   0,  14,   0,   0,   0, \n     55,   0,   0,   9, 226,   0, \n     16,   0,  16,   0,   0,   0, \n     86,   5,  16,   0,   7,   0, \n      0,   0,   6,   6,  16,   0, \n     14,   0,   0,   0,  86,  14, \n     16,   0,  16,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,  14,   0,   0,   0, \n      6,   0,  16,   0,   7,   0, \n      0,   0,  70,  14,  16,   0, \n     14,   0,   0,   0,  70,  14, \n     16,   0,  16,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  50,   0,  16,   0, \n     14,   0,   0,   0,  70,   0, \n     16,   0,  14,   0,   0,   0, \n     70,   0,  16,   0,  14,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  26,   0,  16,   0, \n     14,   0,   0,   0,  10,   0, \n     16,   0,  14,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     42,   0,  16,   0,  14,   0, \n      0,   0,  42,   0,  16,   0, \n     14,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     86,   0,   0,   5, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  86,   0,   0,   5, \n    130,   0,  16,   0,  10,   0, \n      0,   0,  58,   0,  16,   0, \n     14,   0,   0,   0,  56,   0, \n      0,   7, 130,   0,  16,   0, \n     10,   0,   0,   0,  58,   0, \n     16,   0,  10,   0,   0,   0, \n     58,   0,  16,   0,  10,   0, \n      0,   0,  50,   0,   0,  10, \n    130,   0,  16,   0,   9,   0, \n      0,   0,  58,   0,  16,   0, \n     10,   0,   0,   0,  42, 128, \n     32,   0,   0,   0,   0,   0, \n      1,   0,   0,   0,  58,   0, \n     16,   0,   9,   0,   0,   0, \n     28,   0,   0,   5, 130,   0, \n     16,   0,   9,   0,   0,   0, \n     58,   0,  16,   0,   9,   0, \n      0,   0,  30,   0,   0,   7, \n     66,   0,  16,   0,  13,   0, \n      0,   0,  58,   0,  16,   0, \n      9,   0,   0,   0,  42,   0, \n     16,   0,  13,   0,   0,   0, \n     30,   0,   0,   7, 130,   0, \n     16,   0,  13,   0,   0,   0, \n     58,   0,  16,   0,  13,   0, \n      0,   0,   1,  64,   0,   0, \n      1,   0,   0,   0,  22,   0, \n      0,   1,  54,   0,   0,   5, \n     18,   0,  16,   0,  12,   0, \n      0,   0,  42,   0,  16,   0, \n     13,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      6,   0,   0,   0,  58,   0, \n     16,   0,   2,   0,   0,   0, \n     18,   0,   0,   1,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      1,   0,   0,   0,  30,   0, \n      0,   7,  18,   0,  16,   0, \n      7,   0,   0,   0,  42,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0, 244, 255, \n    255, 255,  85,   0,   0,   7, \n     34,   0,  16,   0,   7,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,  10, 194,   0, \n     16,   0,   0,   0,   0,   0, \n      6,   4,  16,   0,   7,   0, \n      0,   0,   2,  64,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   0, \n      1,   0,   0,   0,   1,   0, \n      0,  10, 242,   0,  16,   0, \n      4,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n      2,  64,   0,   0, 254, 255, \n    255, 255, 254, 255, 255, 255, \n    254, 255, 255, 255, 254, 255, \n    255, 255,  30,   0,   0,   7, \n    242,   0,  16,   0,   4,   0, \n      0,   0, 166,  10,  16,   0, \n      0,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n      1,   0,   0,  10, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,   2,  64,   0,   0, \n    254, 255, 255, 255, 254, 255, \n    255, 255, 254, 255, 255, 255, \n    254, 255, 255, 255,  30,   0, \n      0,   7, 242,   0,  16,   0, \n      5,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,  30,   0,   0,   8, \n    242,   0,  16,   0,   8,   0, \n      0,   0,  70,  14,  16, 128, \n     65,   0,   0,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n    194,   0,  16,   0,   0,   0, \n      0,   0,   6,   4,  16,   0, \n      8,   0,   0,   0,   6,   4, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  35,   0, \n      0,   9,  66,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  30,   0, \n      0,   8, 242,   0,  16,   0, \n      3,   0,   0,   0,  70,  14, \n     16,   0,   3,   0,   0,   0, \n     70,  14,  16, 128,  65,   0, \n      0,   0,   4,   0,   0,   0, \n     38,   0,   0,   8,   0, 208, \n      0,   0,  98,   0,  16,   0, \n      2,   0,   0,   0,   6,   1, \n     16,   0,   3,   0,   0,   0, \n      6,   1,  16,   0,   8,   0, \n      0,   0,  30,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   8,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     35,   0,   0,   9, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   8,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     34,   0,   0,   7,  18,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  33,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0,   1,   0,   0,   7, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     43,   0,   0,   5, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  56,   0,   0,   7, \n    130,   0,  16,   0,   0,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0, 253, 255, 125,  66, \n     28,   0,   0,   5, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   5,   0,   0,   0, \n     79,   0,   0,   7, 130,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,  58,   0, \n     16,   0,   0,   0,   0,   0, \n     10,   0,  16,   0,   1,   0, \n      0,   0,  40,   0,   0,   5, \n    242,   0,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      9,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,  70,  14,  16,   0, \n      4,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      4,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   4,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n      3,   0,   0,   0, 246,  15, \n     16,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   3,   0, \n      0,   0,  70,  14,  16,   0, \n      8,   0,   0,   0,  33,   0, \n      0,   7, 130,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  43,   0,   0,   5, \n     18,   0,  16,   0,   1,   0, \n      0,   0,  42,   0,  16,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   8,  50,   0,  16,   0, \n     12,   0,   0,   0,   2,  64, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,   0,   0, \n     48,   0,   0,   1,  80,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   3,   0,   4,   3, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  30,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,  12,   0,   0,   0, \n    167,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  70, 254, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   8, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16, 128,  65,   0, \n      0,   0,   9,   0,   0,   0, \n     70,  14,  16,   0,   5,   0, \n      0,   0,  38,   0,   0,   8, \n      0, 208,   0,   0,  98,   0, \n     16,   0,   2,   0,   0,   0, \n      6,   1,  16,   0,   3,   0, \n      0,   0,   6,   1,  16,   0, \n      8,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      3,   0,   0,   0,  42,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  35,   0,   0,   9, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      3,   0,   0,   0,  58,   0, \n     16,   0,   8,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  33,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     60,   0,   0,   7,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   0,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  34,   0, \n      0,   7, 130,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   0,   0, \n      0,   0,  43,   0,   0,   5, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  56,   0, \n      0,   7,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0, 253, 255, \n    125,  66,  14,   0,   0,   7, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  10,   0, \n     16,   0,   1,   0,   0,   0, \n     28,   0,   0,   5,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  55,   0,   0,  10, \n     34,   0,  16,   0,   2,   0, \n      0,   0,  58,   0,  16,   0, \n      2,   0,   0,   0,  10, 144, \n    144,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,   1,  64, \n      0,   0,  15,   0,   0,   0, \n     55,   0,   0,   9,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,   1,  64,   0,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   9,  66,   0, \n     16,   0,   2,   0,   0,   0, \n      1,  64,   0,   0,  64,   0, \n      0,   0,  26, 144, 144, 128, \n     65,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     38,   0,   0,   9,   0, 208, \n      0,   0, 242,   0,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   4,   0,   0,   0, \n     86, 149, 144,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     35,   0,   0,   9, 242,   0, \n     16,   0,   8,   0,   0,   0, \n    166,  10,  16,   0,   2,   0, \n      0,   0,  70,  14,  16,   0, \n      9,   0,   0,   0,  70,  14, \n     16,   0,   8,   0,   0,   0, \n     30,   0,   0,  10, 242,   0, \n     16,   0,   8,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,   2,  64,   0,   0, \n     32,   0,   0,   0,  32,   0, \n      0,   0,  32,   0,   0,   0, \n     32,   0,   0,   0,  85,   0, \n      0,   7, 242,   0,  16,   0, \n      8,   0,   0,   0, 134,  13, \n     16,   0,   8,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  79,   0,   0,   7, \n    242,   0,  16,   0,  10,   0, \n      0,   0, 134,  13,  16,   0, \n      8,   0,   0,   0,  70,  14, \n     16,   0,   5,   0,   0,   0, \n     54,   0,   0,   5,  82,   0, \n     16,   0,  11,   0,   0,   0, \n      6,   1,  16,   0,   5,   0, \n      0,   0,  54,   0,   0,   5, \n    162,   0,  16,   0,  11,   0, \n      0,   0,   6,   8,  16,   0, \n      8,   0,   0,   0,  55,   0, \n      0,   9, 242,   0,  16,   0, \n     11,   0,   0,   0,   6,   5, \n     16,   0,  10,   0,   0,   0, \n     70,  14,  16,   0,  11,   0, \n      0,   0,  22,  11,  16,   0, \n     11,   0,   0,   0,  54,   0, \n      0,   5,  82,   0,  16,   0, \n      8,   0,   0,   0, 166,  11, \n     16,   0,   5,   0,   0,   0, \n     55,   0,   0,   9, 242,   0, \n     16,   0,   5,   0,   0,   0, \n    230,  14,  16,   0,  10,   0, \n      0,   0, 214,   8,  16,   0, \n      8,   0,   0,   0, 134,  13, \n     16,   0,   8,   0,   0,   0, \n     40,   0,   0,   5,  50,   0, \n     16,   0,   8,   0,   0,   0, \n    214,   5,  16,   0,  11,   0, \n      0,   0,  40,   0,   0,   5, \n    194,   0,  16,   0,   8,   0, \n      0,   0,   6,   4,  16,   0, \n      5,   0,   0,   0,  54,   0, \n      0,   5,  50,   0,  16,   0, \n      5,   0,   0,   0, 134,   0, \n     16,   0,  11,   0,   0,   0, \n     30,   0,   0,   7, 242,   0, \n     16,   0,   5,   0,   0,   0, \n     70,  14,  16,   0,   8,   0, \n      0,   0,  70,  14,  16,   0, \n      5,   0,   0,   0,  38,   0, \n      0,   8,   0, 208,   0,   0, \n     98,   0,  16,   0,   2,   0, \n      0,   0,   6,   1,  16,   0, \n      5,   0,   0,   0,   6,   1, \n     16,   0,   5,   0,   0,   0, \n     30,   0,   0,   7,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  35,   0, \n      0,   9,  34,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   5,   0,   0,   0, \n     42,   0,  16,   0,   5,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  86,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     86,   0,   0,   5,  66,   0, \n     16,   0,   2,   0,   0,   0, \n     58,   0,  16,   0,   5,   0, \n      0,   0,  56,   0,   0,   7, \n     66,   0,  16,   0,   2,   0, \n      0,   0,  42,   0,  16,   0, \n      2,   0,   0,   0,  42,   0, \n     16,   0,   2,   0,   0,   0, \n     50,   0,   0,  10,  34,   0, \n     16,   0,   2,   0,   0,   0, \n     42,   0,  16,   0,   2,   0, \n      0,   0,  42, 128,  32,   0, \n      0,   0,   0,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      2,   0,   0,   0,  28,   0, \n      0,   5,  34,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   2,   0,   0,   0, \n     30,   0,   0,   7,  18,   0, \n     16,   0,  12,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n     12,   0,   0,   0,  30,   0, \n      0,   7,  34,   0,  16,   0, \n     12,   0,   0,   0,  26,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   1,   0, \n      0,   0,  22,   0,   0,   1, \n     54,   0,   0,   5,  34,   0, \n     16,   0,  12,   0,   0,   0, \n      1,  64,   0,   0,   6,   0, \n      0,   0,  54,   0,   0,   5, \n    130,   0,  16,   0,   6,   0, \n      0,   0,  10,   0,  16,   0, \n      7,   0,   0,   0,  18,   0, \n      0,   1,  54,   0,   0,   8, \n     50,   0,  16,   0,  12,   0, \n      0,   0,   2,  64,   0,   0, \n    255, 255, 255, 255,   0,   0, \n      0,   0,   0,   0,   0,   0, \n      0,   0,   0,   0,  54,   0, \n      0,   5, 130,   0,  16,   0, \n      6,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     21,   0,   0,   1,  21,   0, \n      0,   1, 168,   0,   0,   8, \n     50, 240,  17,   0,   0,   0, \n      0,   0,  10,  64,   2,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,  70,   0,  16,   0, \n     12,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     28,   0,   0,   0, 198,   0, \n     16,   0,   6,   0,   0,   0, \n     31,   0,   4,   3,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   8,   0,   0,   0, \n    167,   0,   0,   9,  98,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 241, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n     12,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0, 134,   0, \n     16,   0,   3,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      3,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   4,   0,   0,   0, \n    167,   0,   0,   9,  98,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 241, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   5,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   4,   0, \n      0,   0,  10,   0,  16,   0, \n      3,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      4,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0, 134,   0, \n     16,   0,   4,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     70,   0,  16,   0,   5,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  58,   0,  16,   0, \n      1,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   2,   0,   0,   0, \n    167,   0,   0,   9,  98,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 241, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   4,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   3,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      3,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0, 134,   0, \n     16,   0,   3,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     70,   0,  16,   0,   4,   0, \n      0,   0,  21,   0,   0,   1, \n     21,   0,   0,   1,  31,   0, \n      4,   3,  10,   0,  16,   0, \n      2,   0,   0,   0, 167,   0, \n      0,   8,  18,   0,  16,   0, \n      1,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 240, \n     17,   0,   0,   0,   0,   0, \n     30,   0,   0,   6,  34,   0, \n     16,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,   1,   0,   0,   0, \n    167,   0,   0,   9,  98,   0, \n     16,   0,   2,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     16,   0,   0,   0,   6, 241, \n     17,   0,   0,   0,   0,   0, \n    167,   0,   0,   9,  50,   0, \n     16,   0,   3,   0,   0,   0, \n     26,   0,  16,   0,   0,   0, \n      0,   0,   1,  64,   0,   0, \n     28,   0,   0,   0,  70, 240, \n     17,   0,   0,   0,   0,   0, \n     79,   0,   0,   7,  66,   0, \n     16,   0,   0,   0,   0,   0, \n     26,   0,  16,   0,   2,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,  31,   0, \n      4,   3,  42,   0,  16,   0, \n      0,   0,   0,   0, 167,   0, \n      0,   9,  18,   0,  16,   0, \n      2,   0,   0,   0,  26,   0, \n     16,   0,   0,   0,   0,   0, \n      1,  64,   0,   0,  16,   0, \n      0,   0,   6, 240,  17,   0, \n      0,   0,   0,   0, 168,   0, \n      0,   8,  50, 240,  17,   0, \n      0,   0,   0,   0,  10,  64, \n      2,   0,   1,  64,   0,   0, \n     16,   0,   0,   0, 134,   0, \n     16,   0,   2,   0,   0,   0, \n    168,   0,   0,   8,  50, 240, \n     17,   0,   0,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n     70,   0,  16,   0,   3,   0, \n      0,   0,  21,   0,   0,   1, \n    167,   0,   0,   8, 146,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  28,   0,   0,   0, \n      6, 244,  17,   0,   0,   0, \n      0,   0,  41,   0,   0,   7, \n     34,   0,  16,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      1,   0,   0,   0,   1,  64, \n      0,   0,  31,   0,   0,   0, \n    167,   0,   0,   8,  50,   0, \n     16,   0,   1,   0,   0,   0, \n     10,  64,   2,   0,   1,  64, \n      0,   0,  16,   0,   0,   0, \n     70, 240,  17,   0,   0,   0, \n      0,   0,  60,   0,   0,   7, \n     34,   0,  16,   0,   1,   0, \n      0,   0,  26,   0,  16,   0, \n      0,   0,   0,   0,  26,   0, \n     16,   0,   1,   0,   0,   0, \n     54,   0,   0,   5,  66,   0, \n     16,   0,   1,   0,   0,   0, \n      1,  64,   0,   0,   0,   0, \n      0,   0, 168,   0,   0,   9, \n    242, 224,  17,   0,   0,   0, \n      0,   0,  10,   0,  16,   0, \n      0,   0,   0,   0,   1,  64, \n      0,   0,   0,   0,   0,   0, \n     70,  14,  16,   0,   1,   0, \n      0,   0,  21,   0,   0,   1, \n     62,   0,   0,   1\n};\n"
  },
  {
    "path": "3rdParty/DirectXTex/DirectXTex/scoped.h",
    "content": "//-------------------------------------------------------------------------------------\n// scoped.h\n//  \n// Utility header with helper classes for exception-safe handling of resources\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//-------------------------------------------------------------------------------------\n\n#pragma once\n\n#include <assert.h>\n#include <memory>\n#include <malloc.h>\n\n//---------------------------------------------------------------------------------\nstruct aligned_deleter { void operator()(void* p) { _aligned_free(p); } };\n\ntypedef std::unique_ptr<float[], aligned_deleter> ScopedAlignedArrayFloat;\n\ntypedef std::unique_ptr<DirectX::XMVECTOR[], aligned_deleter> ScopedAlignedArrayXMVECTOR;\n\n//---------------------------------------------------------------------------------\nstruct handle_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) CloseHandle(h); } };\n\ntypedef public std::unique_ptr<void, handle_closer> ScopedHandle;\n\ninline HANDLE safe_handle( HANDLE h ) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }\n"
  },
  {
    "path": "3rdParty/DirectXTex/MIT.txt",
    "content": "                               The MIT License (MIT)\n\nCopyright (c) 2015 Microsoft Corp\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this \nsoftware and associated documentation files (the \"Software\"), to deal in the Software \nwithout restriction, including without limitation the rights to use, copy, modify, \nmerge, publish, distribute, sublicense, and/or sell copies of the Software, and to \npermit persons to whom the Software is furnished to do so, subject to the following \nconditions: \n\nThe above copyright notice and this permission notice shall be included in all copies \nor substantial portions of the Software.  \n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, \nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A \nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT \nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF \nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE \nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/ReadMe.txt",
    "content": "DIRECTX TEXTURE LIBRARY (DirectXTex)\n------------------------------------\n\nCopyright (c) Microsoft Corporation. All rights reserved.\n\nJuly 29, 2015\n\nThis package contains DirectXTex, a shared source library for reading and writing DDS\nfiles, and performing various texture content processing operations including\nresizing, format conversion, mip-map generation, block compression for Direct3D runtime\ntexture resources, and height-map to normal-map conversion. This library makes\nuse of the Windows Image Component (WIC) APIs. It also includes a simple .TGA reader and\nwriter since this image file format is commonly used for texture content processing pipelines,\nbut is not currently supported by a built-in WIC codec.\n\nThe source is written for Visual Studio 2012, 2013, or 2015. It is recommended that\nyou make use of the Windows 8.1 SDK and Windows 7 Service Pack 1 or later.\n\nNOTE: DirectXTex is not supported on Windows phone 8.0 because WIC is not available on\nthat platform. It is available on Windows phone starting in version 8.1.\n\nDDSTextureLoader\\\n    This contains a streamlined version of the DirectX SDK sample DDSWithoutD3DX11 texture\n    loading code for a simple light-weight runtime DDS loader. This version only supports\n    Direct3D 11 and performs no runtime pixel data conversions (i.e. 24bpp legacy DDS files\n    always fail). This is ideal for runtime usage, and supports the full complement of\n    Direct3D 11 texture resources (1D, 2D, volume maps, cubemaps, mipmap levels,\n    texture arrays, BC formats, etc.).\n\nWICTextureLoader\\\n    This contains a Direct3D 11 2D texture loader that uses WIC to load a bitmap\n    (BMP, JPEG, PNG, HD Photo, or other WIC supported file container), resize if needed\n    based on the current feature level (or by explicit parameter), format convert to a\n    DXGI_FORMAT if required, and then create a 2D texture. Furthermore, if a Direct3D 11\n    device context is provided and the current device supports it for the given pixel format,\n    it will auto-generate mipmaps. Note this does not support 1D textures, volume textures,\n    cubemaps, or texture arrays. DDSTextureLoader is recommended for fully \"precooked\" textures\n    for maximum performance and image quality, but this loader can be useful for creating\n    simple 2D texture from standard image files at runtime.\n\n    Note: This function is not thread-safe if given a non-NULL device context for the auto-gen\n    mip-map support.\n\nDirectXTex\\\n    This contains the DirectXTex library. This includes a full-featured DDS reader and writer\n    including legacy format conversions, a TGA reader and writer, a WIC-based bitmap reader and\n    writer (BMP, JPEG, PNG, TIFF, and HD Photo), and various texture processing functions. This\n    is intended primarily for tool usage.\n\n    Note that the majority of the header files here are intended for internal implementation\n    of the library only (BC.h, DDS.h, DirectXTexP.h, and scoped.h). Only DirectXTex.h is\n    meant as a 'public' header for the library.\n\nTexconv\\\n    This DirectXTex sample is an implementation of the \"texconv\" command-line texture utility\n    from the DirectX SDK utilizing DirectXTex rather than D3DX.\n\n    It supports the same arguments as the Texture Conversion Tool Extended (texconvex.exe) DirectX\n    SDK utility. See <http://msdn.microsoft.com/en-us/library/ee422506.aspx>. The primary differences\n    are the -10 and -11 arguments are not applicable; the filter names (POINT, LINEAR, CUBIC,\n    FANT or BOX, TRIANGLE, *_DITHER, *_DITHER_DIFFUSION); and support for the .TGA file format.\n    This also includes support for JPEG XR/HD Photo bitmap formats (see\n    <http://blogs.msdn.com/b/chuckw/archive/2011/01/19/known-issue-texconvex.aspx>)\n\nTexassemble\\\n    This DirectXTex sample is a command-line utility for creating cubemaps, volume maps, or\n    texture arrays from a set of individual input image files.\n    \nDDSView\\\n    This DirectXTex sample is a simple Direct3D 11-based viewer for DDS files. For array textures\n    or volume maps, the \"<\" and \">\" keyboard keys will show different images contained in the DDS.\n    The \"1\" through \"0\" keys can also be used to jump to a specific image index.\n\nAll content and source code for this package are subject to the terms of the MIT License.\n<http://opensource.org/licenses/MIT>.\n\nDocumentation is available at <https://github.com/Microsoft/DirectXTex/wiki>.\n\nFor the latest version of DirectXTex, bug reports, etc. please visit the project site.\n\nhttp://go.microsoft.com/fwlink/?LinkId=248926\n\n\n------------------------------------\nRELEASE NOTES\n\n* The alpha mode specification for DDS files was updated between the March 2013 and April 2013 releases. Any\n  DDS files created using the DDS_FLAGS_FORCE_DX10_EXT_MISC2 flag or the texconv -dx10 switch using the\n  March 2013 release should be refreshed.\n\n* Due to the underlying Windows BMP WIC codec, alpha channels are not supported for 16bpp or 32bpp BMP pixel format files. The Windows 8.x\n  version of the Windows BMP WIC codec does support 32bpp pixel formats with alpha when using the BITMAPV5HEADER file header. Note the updated\n  WIC is available on Windows 7 SP1 with KB 2670838 installed.\n\n* While DXGI 1.0 and DXGI 1.1 include 5:6:5 (DXGI_FORMAT_B5G6R5_UNORM) and 5:5:5:1 (DXGI_FORMAT_B5G5R5A1_UNORM)\n  pixel format enumerations, the DirectX 10.x and 11.0 Runtimes do not support these formats for use with Direct3D. The DirectX 11.1 runtime,\n  DXGI 1.2, and the WDDM 1.2 driver model fully support 16bpp formats (5:6:5, 5:5:5:1, and 4:4:4:4).\n\n* WICTextureLoader cannot load .TGA files unless the system has a 3rd party WIC codec installed. You must use the DirectXTex\n  library for TGA file format support without relying on an add-on WIC codec.\n\n* Loading of 96bpp floating-point TIFF files results in a corrupted image prior to Windows 8. This fix is available on Windows 7 SP1 with\n  KB 2670838 installed.\n\n\n------------------------------------\nRELEASE HISTORY\n\nJuly 29, 2015\n    Fixed rounding problem with 32-bit RGBA/BGRA format conversions\n    texconv: use CPU parallel compression for BC1-BC5 (-singleproc disables)\n    Updated for VS 2015 and Windows 10 SDK RTM\n    Retired VS 2010 and Windows 8.0 Store projects\n\nJune 18, 2015\n    New BC_FLAGS_USE_3SUBSETS option for BC7 compressors; now defaults to skipping 3 subset blocks\n    Fixed bug with MakeTypeless and A8_UNORM\n    Fixed file length validation problem in LoadDDSFromFile\n\nMarch 27, 2015\n    Added projects for Windows apps Technical Preview\n    Fixed bug with WIC-based mipmap generation for non-WIC supported formats\n    Fixed bug with WIC multiframe loader when resizing required\n    texconv: Added -nmap/-nmapamp for generating normal maps from height maps\n    texconv/texassemble: Updated to load multiframe WIC files (tiff, gif)\n    Minor code cleanup\n\nNovember 24, 2014\n    Updates for Visual Studio 2015 Technical Preview\n    Minor code cleanup\n\nSeptember 22, 2014\n    Format conversion improvements and bug fixes (depth/stencil, alpha-only, float16, RGB -> 1 channel)\n    Fixed issue when BC decompressing non-standard compressed rowPitch images\n    Explicit calling-convention annotation for all 'public' functions\n    Code cleanup\n    Xbox One platform updates\n\nJuly 15, 2014\n    texconv command-line tool fixes\n    Fixed problem with 'wide' images with CPU Compress\n    Updates to Xbox One platform support\n\nApril 3, 2014\n    Windows phone 8.1 platform support\n\nFebruary 24, 2014\n    Direct3D 11 video and Xbox One extended format support\n    New APIs: IsPlanar, IsPalettized, IsDepthStencil, ConvertToSinglePlane\n    Added 'alphaWeight' parameter to GPU Compress [breaking change]\n    texconv '-aw' switch to control the alpha weighting for the BC7 GPU compressor\n    Fixed bug with ordered dithering in non-WIC conversion codepaths\n    Fixed SaveToDDS* functions when using arbitrary row pitch values\n\nJanuary 24, 2014\n    Added sRGB flags for Compress (TEX_COMPRESS_SRGB*)\n    Added 'compress' flag parameter to GPU versions of Compress [breaking change]\n    Minor fix for potential rounding problem in GPU Compress\n    Code cleanup (removed DXGI_1_2_FORMATS control define; ScopedObject typedef removed)\n    Dropped VS 2010 support without the Windows 8.1 SDK (removed USE_XNAMATH control define)\n\nDecember 24, 2013\n    texconv updated with -fl and -pow2 command-line switches\n    Fixed bug in Resize when doing custom filtering which occurred when exactly doubling the image size\n    Added move operators to ScratchImage and Blob classes\n    Xbox One platform support\n\nOctober 21, 2013\n    Updated for Visual Studio 2013 and Windows 8.1 SDK RTM\n    PremultiplyAlpha updated with new 'flags' parameter and to use sRGB correct blending\n    Fixed colorspace conversion issue with DirectCompute compressor when compressing for BC7 SRGB\n\nAugust 13, 2013\n    DirectCompute 4.0 BC6H/BC7 compressor integration\n    texconv utility uses DirectCompute compression by default for BC6H/BC7, -nogpu disables use of DirectCompute\n\nAugust 1, 2013\n    Support for BC compression/decompression of non-power-of-2 mipmapped textures\n    Fixes for BC6H / BC7 codecs to better match published standard\n    Fix for BC4 / BC5 codecs when compressing RGB images\n    Minor fix for the BC1-3 codec\n    New optional flags for ComputeMSE to compare UNORM vs. SNORM images\n    New WIC loading flag added to control use of WIC metadata to return sRGB vs. non-sRGB formats\n    Code cleanup and /analyze fixes\n    Project file cleanup\n    Texconv utility uses parallel BC compression by default for BC6H/BC7, -singleproc disables multithreaded behavior\n\nJuly 1, 2013\n    VS 2013 Preview projects added\n    SaveToWIC functions updated with new optional setCustomProps parameter\n\nJune 15, 2013\n    Custom filtering implementation for Resize & GenerateMipMaps(3D) - Point, Box, Linear, Cubic, and Triangle\n        TEX_FILTER_TRIANGLE finite low-pass triangle filter\n        TEX_FILTER_WRAP, TEX_FILTER_MIRROR texture semantics for custom filtering\n        TEX_FILTER_BOX alias for TEX_FILTER_FANT WIC\n    Ordered and error diffusion dithering for non-WIC conversion\n    sRGB gamma correct custom filtering and conversion\n    DDS_FLAGS_EXPAND_LUMINANCE - Reader conversion option for L8, L16, and A8L8 legacy DDS files\n    Added use of WIC metadata for sRGB pixel formats\n    Added BitsPerColor utility function\n    Fixed Convert threshold parameter usage\n    Non-power-of-2 volume map support, fixed bug with non-square volume maps\n    Texconv utility update with -xlum, -wrap, and -mirror options; reworked -if options for improved dithering\n    Texassemble utility for creating cubemaps, volume maps, and texture arrays\n    DDSTextureLoader and WICTextureLoader sync'd with DirectXTK versions\n\nApril 16, 2013\n    Updated alpha-mode metadata details in .DDS files\n    Added new control flags for Convert\n    Added new optional flags for ComputeMSE\n    Fixed conversion handling for sRGB formats\n    Fixed internal routines for handling R10G10B10_XR_BIAS_A2_UNORM, R9G9B9E5_SHAREDEXP, and FORMAT_R1_UNORM\n    Fixed WIC I/O for GUID_WICPixelFormat32bppRGBE pixel format files (HD Photo)\n    Fixed non-square image handling in GenerateMipMaps3D\n    Fixed some error handling in the DDS load code\n\nMarch 22, 2013\n    Supports reading and writing alpha-mode (straight, premultiplied, etc.) metadata in .DDS files\n    Added build option to use WICCreateImagingFactory_Proxy instead of CoCreateInstance to obtain WIC factory\n\nJanuary 29, 2013\n    Added PremultiplyAlpha to DirectXTex; -pmalpha switch for texconv command-line tool\n    Fixed problem with forceSRGB implementation for Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader\n \nDecember 11, 2012 \n    Ex versions of CreateTexture, CreateShaderResourceView, DDSTextureLoader and WICTextureLoader\n    Fixed BC2 and BC3 decompression issue for unusual color encoding case\n    Converted annotation to SAL2 for improved VS 2012 /analyze experience\n    Updated DirectXTex, DDSView, and Texconv with VS 2010 + Windows 8.0 SDK project using official 'property sheets'\n\nNovember 15, 2012\n    Added support for WIC2 when available on Windows 8 and Windows 7 with KB 2670838\n    Added optional targetGUID parameter to SaveWIC* APIs to influence final container pixel format choice\n    Fixed bug in SaveDDS* which was generating invalid DDS files for 1D dimension textures\n    Improved robustness of CaptureTexture when resolving MSAA source textures\n    Sync'd DDSTextureLoader, ScreenGrab, and WICTextureLoader standalone versions with latest DirectXTK release\n\nSeptember 28, 2012\n    Added ScreenGrab module for creating runtime screenshots\n    Renamed project files for better naming consistency\n    New Typeless utilities for DirectXTex\n    Some minor code cleanup for DirectXTex's WIC writer function\n    Bug fixes and new -tu/-tf options for texconv\n\nJune 22, 2012\n    Moved to using XNA Math 2.05 instead of XNA Math 2.04 for USE_XNAMATH builds\n    Fixed BGR vs. RGB color channel swizzle problem with 24bpp legacy .DDS files in DirectXTex\n    Update to DirectXTex WIC and WICTextureLoader for additional 96bpp float format handling on Windows 8\n\nMay 31, 2012\n    Minor fix for DDSTextureLoader's retry fallback that can happen with 10level9 feature levels\n    Switched to use \"_DEBUG\" instead of \"DEBUG\" and cleaned up debug warnings\n    added Metro style application project files for DirectXTex\n\nApril 20, 2012\n    DirectTex's WIC-based writer opts-in for the Windows 8 BMP encoder option for writing 32 bpp RGBA files with the BITMAPV5HEADER\n\nMarch 30, 2012\n    WICTextureLoader updated with Windows 8 WIC pixel formats\n    DirectXTex updated with limited non-power-of-2 texture support and TEX_FILTER_SEPARATE_ALPHA option\n    Texconv updated with '-sepalpha' command-line option\n    Added USE_XNAMATH control define to build DirectXTex using either XNAMath or DirectXMath\n    Added VS 2012 project files (which use DirectXMath instead of XNAMath and define DXGI_1_2_FORMATS)\n\nMarch 15, 2012\n    Fix for resource leak in CreateShaderResourceView() Direct3D 11 helper function in DirectXTex\n\nMarch 5, 2012\n    Fix for too much temp memory allocated by WICTextureLoader; cleaned up legacy 'min/max' macro usage in DirectXTex\n\nFebruary 21, 2012\n    WICTextureLoader updated to handle systems and device drivers without BGRA or 16bpp format support\n\nFebruary 20, 2012\n    Some code cleanup for DirectXTex and DDSTextureLoader\n    Fixed bug in 10:10:10:2 format fixup in the LoadDDSFromMemory function\n    Fixed bugs in \"non-zero alpha\" special-case handling in LoadTGAFromFile\n    Fixed bug in _SwizzleScanline when copying alpha channel for BGRA<->RGBA swizzling\n\nFebruary 11, 2012\n    Update of DDSTextureLoader to also build in Metro style apps; added WICTextureLoader\n    Added CMYK WIC pixel formats to the DirectXTex conversion table\n\nJanuary 30, 2012\n    Minor code-cleanup for DirectXTex to enable use of PCH through 'directxtexp.h' header\n\nJanuary 24, 2011\n    Some code-cleanup for DirectXTex\n    Added DXGI 1.2 implementation for DDSTextureLoader and DirectXTex guarded with DXGI_1_2_FORMATS compiliation define \n\nDecember 16, 2011\n    Fixed x64 compilation warnings in DDSTextureLoader\n\nNovember 30, 2011\n    Fixed some of the constants used in IsSupportedTexture(),\n    added ability to strip off top levels of mips in DDSTextureLoader,\n    changed DirectXTex to use CoCreateInstance rather than LoadLibrary to obtain the WIC factory,\n    a few minor /analyze related annotations for DirectXTex\n\nOctober 27, 2011\n    Original release"
  },
  {
    "path": "3rdParty/DirectXTex/ScreenGrab/ScreenGrab.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: ScreenGrab.cpp\n//\n// Function for capturing a 2D texture and saving it to a file (aka a 'screenshot'\n// when used on a Direct3D 11 Render Target).\n//\n// Note these functions are useful as a light-weight runtime screen grabber. For\n// full-featured texture capture, DDS writer, and texture processing pipeline,\n// see the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n// Does not capture 1D textures or 3D textures (volume maps)\n\n// Does not capture mipmap chains, only the top-most texture level is saved\n\n// For 2D array textures and cubemaps, it captures only the first image in the array\n\n#include <dxgiformat.h>\n#include <assert.h>\n\n#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8)\n\n// VS 2010's stdint.h conflicts with intsafe.h\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <wincodec.h>\n#include <intsafe.h>\n#pragma warning(pop)\n#endif\n\n#include <wrl\\client.h>\n\n#include <memory>\n\n#include \"ScreenGrab.h\"\n\nusing Microsoft::WRL::ComPtr;\n\n//--------------------------------------------------------------------------------------\n// Macros\n//--------------------------------------------------------------------------------------\n#ifndef MAKEFOURCC\n    #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \\\n                ((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) |       \\\n                ((uint32_t)(uint8_t)(ch2) << 16) | ((uint32_t)(uint8_t)(ch3) << 24 ))\n#endif /* defined(MAKEFOURCC) */\n\n//--------------------------------------------------------------------------------------\n// DDS file structure definitions\n//\n// See DDS.h in the 'Texconv' sample and the 'DirectXTex' library\n//--------------------------------------------------------------------------------------\n#pragma pack(push,1)\n\n#define DDS_MAGIC 0x20534444 // \"DDS \"\n\nstruct DDS_PIXELFORMAT\n{\n    uint32_t    size;\n    uint32_t    flags;\n    uint32_t    fourCC;\n    uint32_t    RGBBitCount;\n    uint32_t    RBitMask;\n    uint32_t    GBitMask;\n    uint32_t    BBitMask;\n    uint32_t    ABitMask;\n};\n\n#define DDS_FOURCC      0x00000004  // DDPF_FOURCC\n#define DDS_RGB         0x00000040  // DDPF_RGB\n#define DDS_RGBA        0x00000041  // DDPF_RGB | DDPF_ALPHAPIXELS\n#define DDS_LUMINANCE   0x00020000  // DDPF_LUMINANCE\n#define DDS_LUMINANCEA  0x00020001  // DDPF_LUMINANCE | DDPF_ALPHAPIXELS\n#define DDS_ALPHA       0x00000002  // DDPF_ALPHA\n\n#define DDS_HEADER_FLAGS_TEXTURE        0x00001007  // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT \n#define DDS_HEADER_FLAGS_MIPMAP         0x00020000  // DDSD_MIPMAPCOUNT\n#define DDS_HEADER_FLAGS_PITCH          0x00000008  // DDSD_PITCH\n#define DDS_HEADER_FLAGS_LINEARSIZE     0x00080000  // DDSD_LINEARSIZE\n\n#define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT\n#define DDS_WIDTH  0x00000004 // DDSD_WIDTH\n\n#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE\n\ntypedef struct\n{\n    uint32_t        size;\n    uint32_t        flags;\n    uint32_t        height;\n    uint32_t        width;\n    uint32_t        pitchOrLinearSize;\n    uint32_t        depth; // only if DDS_HEADER_FLAGS_VOLUME is set in flags\n    uint32_t        mipMapCount;\n    uint32_t        reserved1[11];\n    DDS_PIXELFORMAT ddspf;\n    uint32_t        caps;\n    uint32_t        caps2;\n    uint32_t        caps3;\n    uint32_t        caps4;\n    uint32_t        reserved2;\n} DDS_HEADER;\n\ntypedef struct\n{\n    DXGI_FORMAT     dxgiFormat;\n    uint32_t        resourceDimension;\n    uint32_t        miscFlag; // see D3D11_RESOURCE_MISC_FLAG\n    uint32_t        arraySize;\n    uint32_t        reserved;\n} DDS_HEADER_DXT10;\n\n#pragma pack(pop)\n\nstatic const DDS_PIXELFORMAT DDSPF_DXT1 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_DXT3 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','3'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_DXT5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','T','5'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_BC4_UNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','4','U'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_BC4_SNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','4','S'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_BC5_UNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','5','U'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_BC5_SNORM =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B','C','5','S'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_R8G8_B8G8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R','G','B','G'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_G8R8_G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G','R','G','B'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_YUY2 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('Y','U','Y','2'), 0, 0, 0, 0, 0 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A8R8G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_X8R8G8B8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB,  0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A8B8G8R8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_G16R16 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB,  0, 32, 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_R5G6B5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 16, 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A1R5G5B5 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 16, 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A4R4G4B4 =\n    { sizeof(DDS_PIXELFORMAT), DDS_RGBA, 0, 16, 0x00000f00, 0x000000f0, 0x0000000f, 0x0000f000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_L8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCE, 0,  8, 0xff, 0x00, 0x00, 0x00 };\n\nstatic const DDS_PIXELFORMAT DDSPF_L16 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCE, 0, 16, 0xffff, 0x0000, 0x0000, 0x0000 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A8L8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_LUMINANCEA, 0, 16, 0x00ff, 0x0000, 0x0000, 0xff00 };\n\nstatic const DDS_PIXELFORMAT DDSPF_A8 =\n    { sizeof(DDS_PIXELFORMAT), DDS_ALPHA, 0, 8, 0x00, 0x00, 0x00, 0xff };\n\n// DXGI_FORMAT_R10G10B10A2_UNORM should be written using DX10 extension to avoid D3DX 10:10:10:2 reversal issue\n\n// This indicates the DDS_HEADER_DXT10 extension is present (the format is in dxgiFormat)\nstatic const DDS_PIXELFORMAT DDSPF_DX10 =\n    { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D','X','1','0'), 0, 0, 0, 0, 0 };\n\n//---------------------------------------------------------------------------------\nstruct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };\n\ntypedef public std::unique_ptr<void, handle_closer> ScopedHandle;\n\ninline HANDLE safe_handle( HANDLE h ) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }\n\n\n//--------------------------------------------------------------------------------------\n// Return the BPP for a particular format\n//--------------------------------------------------------------------------------------\nstatic size_t BitsPerPixel( _In_ DXGI_FORMAT fmt )\n{\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:\n    case DXGI_FORMAT_R32G32B32A32_UINT:\n    case DXGI_FORMAT_R32G32B32A32_SINT:\n        return 128;\n\n    case DXGI_FORMAT_R32G32B32_TYPELESS:\n    case DXGI_FORMAT_R32G32B32_FLOAT:\n    case DXGI_FORMAT_R32G32B32_UINT:\n    case DXGI_FORMAT_R32G32B32_SINT:\n        return 96;\n\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS:\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:\n    case DXGI_FORMAT_R16G16B16A16_UNORM:\n    case DXGI_FORMAT_R16G16B16A16_UINT:\n    case DXGI_FORMAT_R16G16B16A16_SNORM:\n    case DXGI_FORMAT_R16G16B16A16_SINT:\n    case DXGI_FORMAT_R32G32_TYPELESS:\n    case DXGI_FORMAT_R32G32_FLOAT:\n    case DXGI_FORMAT_R32G32_UINT:\n    case DXGI_FORMAT_R32G32_SINT:\n    case DXGI_FORMAT_R32G8X24_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:\n    case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:\n    case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:\n    case DXGI_FORMAT_Y416:\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n        return 64;\n\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:\n    case DXGI_FORMAT_R10G10B10A2_UNORM:\n    case DXGI_FORMAT_R10G10B10A2_UINT:\n    case DXGI_FORMAT_R11G11B10_FLOAT:\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n    case DXGI_FORMAT_R8G8B8A8_UINT:\n    case DXGI_FORMAT_R8G8B8A8_SNORM:\n    case DXGI_FORMAT_R8G8B8A8_SINT:\n    case DXGI_FORMAT_R16G16_TYPELESS:\n    case DXGI_FORMAT_R16G16_FLOAT:\n    case DXGI_FORMAT_R16G16_UNORM:\n    case DXGI_FORMAT_R16G16_UINT:\n    case DXGI_FORMAT_R16G16_SNORM:\n    case DXGI_FORMAT_R16G16_SINT:\n    case DXGI_FORMAT_R32_TYPELESS:\n    case DXGI_FORMAT_D32_FLOAT:\n    case DXGI_FORMAT_R32_FLOAT:\n    case DXGI_FORMAT_R32_UINT:\n    case DXGI_FORMAT_R32_SINT:\n    case DXGI_FORMAT_R24G8_TYPELESS:\n    case DXGI_FORMAT_D24_UNORM_S8_UINT:\n    case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:\n    case DXGI_FORMAT_X24_TYPELESS_G8_UINT:\n    case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:\n    case DXGI_FORMAT_AYUV:\n    case DXGI_FORMAT_Y410:\n    case DXGI_FORMAT_YUY2:\n        return 32;\n\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n        return 24;\n\n    case DXGI_FORMAT_R8G8_TYPELESS:\n    case DXGI_FORMAT_R8G8_UNORM:\n    case DXGI_FORMAT_R8G8_UINT:\n    case DXGI_FORMAT_R8G8_SNORM:\n    case DXGI_FORMAT_R8G8_SINT:\n    case DXGI_FORMAT_R16_TYPELESS:\n    case DXGI_FORMAT_R16_FLOAT:\n    case DXGI_FORMAT_D16_UNORM:\n    case DXGI_FORMAT_R16_UNORM:\n    case DXGI_FORMAT_R16_UINT:\n    case DXGI_FORMAT_R16_SNORM:\n    case DXGI_FORMAT_R16_SINT:\n    case DXGI_FORMAT_B5G6R5_UNORM:\n    case DXGI_FORMAT_B5G5R5A1_UNORM:\n    case DXGI_FORMAT_A8P8:\n    case DXGI_FORMAT_B4G4R4A4_UNORM:\n        return 16;\n\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n    case DXGI_FORMAT_NV11:\n        return 12;\n\n    case DXGI_FORMAT_R8_TYPELESS:\n    case DXGI_FORMAT_R8_UNORM:\n    case DXGI_FORMAT_R8_UINT:\n    case DXGI_FORMAT_R8_SNORM:\n    case DXGI_FORMAT_R8_SINT:\n    case DXGI_FORMAT_A8_UNORM:\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n        return 8;\n\n    case DXGI_FORMAT_R1_UNORM:\n        return 1;\n\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        return 4;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return 8;\n\n    default:\n        return 0;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\n// Determines if the format is block compressed\n//--------------------------------------------------------------------------------------\nstatic bool IsCompressed( _In_ DXGI_FORMAT fmt )\n{\n    switch ( fmt )\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        return true;\n\n    default:\n        return false;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\n// Get surface information for a particular format\n//--------------------------------------------------------------------------------------\nstatic void GetSurfaceInfo( _In_ size_t width,\n                            _In_ size_t height,\n                            _In_ DXGI_FORMAT fmt,\n                            _Out_opt_ size_t* outNumBytes,\n                            _Out_opt_ size_t* outRowBytes,\n                            _Out_opt_ size_t* outNumRows )\n{\n    size_t numBytes = 0;\n    size_t rowBytes = 0;\n    size_t numRows = 0;\n\n    bool bc = false;\n    bool packed = false;\n    bool planar = false;\n    size_t bpe = 0;\n    switch (fmt)\n    {\n    case DXGI_FORMAT_BC1_TYPELESS:\n    case DXGI_FORMAT_BC1_UNORM:\n    case DXGI_FORMAT_BC1_UNORM_SRGB:\n    case DXGI_FORMAT_BC4_TYPELESS:\n    case DXGI_FORMAT_BC4_UNORM:\n    case DXGI_FORMAT_BC4_SNORM:\n        bc=true;\n        bpe = 8;\n        break;\n\n    case DXGI_FORMAT_BC2_TYPELESS:\n    case DXGI_FORMAT_BC2_UNORM:\n    case DXGI_FORMAT_BC2_UNORM_SRGB:\n    case DXGI_FORMAT_BC3_TYPELESS:\n    case DXGI_FORMAT_BC3_UNORM:\n    case DXGI_FORMAT_BC3_UNORM_SRGB:\n    case DXGI_FORMAT_BC5_TYPELESS:\n    case DXGI_FORMAT_BC5_UNORM:\n    case DXGI_FORMAT_BC5_SNORM:\n    case DXGI_FORMAT_BC6H_TYPELESS:\n    case DXGI_FORMAT_BC6H_UF16:\n    case DXGI_FORMAT_BC6H_SF16:\n    case DXGI_FORMAT_BC7_TYPELESS:\n    case DXGI_FORMAT_BC7_UNORM:\n    case DXGI_FORMAT_BC7_UNORM_SRGB:\n        bc = true;\n        bpe = 16;\n        break;\n\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:\n    case DXGI_FORMAT_YUY2:\n        packed = true;\n        bpe = 4;\n        break;\n\n    case DXGI_FORMAT_Y210:\n    case DXGI_FORMAT_Y216:\n        packed = true;\n        bpe = 8;\n        break;\n\n    case DXGI_FORMAT_NV12:\n    case DXGI_FORMAT_420_OPAQUE:\n        planar = true;\n        bpe = 2;\n        break;\n\n    case DXGI_FORMAT_P010:\n    case DXGI_FORMAT_P016:\n        planar = true;\n        bpe = 4;\n        break;\n    }\n\n    if (bc)\n    {\n        size_t numBlocksWide = 0;\n        if (width > 0)\n        {\n            numBlocksWide = std::max<size_t>( 1, (width + 3) / 4 );\n        }\n        size_t numBlocksHigh = 0;\n        if (height > 0)\n        {\n            numBlocksHigh = std::max<size_t>( 1, (height + 3) / 4 );\n        }\n        rowBytes = numBlocksWide * bpe;\n        numRows = numBlocksHigh;\n        numBytes = rowBytes * numBlocksHigh;\n    }\n    else if (packed)\n    {\n        rowBytes = ( ( width + 1 ) >> 1 ) * bpe;\n        numRows = height;\n        numBytes = rowBytes * height;\n    }\n    else if ( fmt == DXGI_FORMAT_NV11 )\n    {\n        rowBytes = ( ( width + 3 ) >> 2 ) * 4;\n        numRows = height * 2; // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data\n        numBytes = rowBytes * numRows;\n    }\n    else if (planar)\n    {\n        rowBytes = ( ( width + 1 ) >> 1 ) * bpe;\n        numBytes = ( rowBytes * height ) + ( ( rowBytes * height + 1 ) >> 1 );\n        numRows = height + ( ( height + 1 ) >> 1 );\n    }\n    else\n    {\n        size_t bpp = BitsPerPixel( fmt );\n        rowBytes = ( width * bpp + 7 ) / 8; // round up to nearest byte\n        numRows = height;\n        numBytes = rowBytes * height;\n    }\n\n    if (outNumBytes)\n    {\n        *outNumBytes = numBytes;\n    }\n    if (outRowBytes)\n    {\n        *outRowBytes = rowBytes;\n    }\n    if (outNumRows)\n    {\n        *outNumRows = numRows;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic DXGI_FORMAT EnsureNotTypeless( DXGI_FORMAT fmt )\n{\n    // Assumes UNORM or FLOAT; doesn't use UINT or SINT\n    switch( fmt )\n    {\n    case DXGI_FORMAT_R32G32B32A32_TYPELESS: return DXGI_FORMAT_R32G32B32A32_FLOAT;\n    case DXGI_FORMAT_R32G32B32_TYPELESS:    return DXGI_FORMAT_R32G32B32_FLOAT;\n    case DXGI_FORMAT_R16G16B16A16_TYPELESS: return DXGI_FORMAT_R16G16B16A16_UNORM;\n    case DXGI_FORMAT_R32G32_TYPELESS:       return DXGI_FORMAT_R32G32_FLOAT;\n    case DXGI_FORMAT_R10G10B10A2_TYPELESS:  return DXGI_FORMAT_R10G10B10A2_UNORM;\n    case DXGI_FORMAT_R8G8B8A8_TYPELESS:     return DXGI_FORMAT_R8G8B8A8_UNORM;\n    case DXGI_FORMAT_R16G16_TYPELESS:       return DXGI_FORMAT_R16G16_UNORM;\n    case DXGI_FORMAT_R32_TYPELESS:          return DXGI_FORMAT_R32_FLOAT;\n    case DXGI_FORMAT_R8G8_TYPELESS:         return DXGI_FORMAT_R8G8_UNORM;\n    case DXGI_FORMAT_R16_TYPELESS:          return DXGI_FORMAT_R16_UNORM;\n    case DXGI_FORMAT_R8_TYPELESS:           return DXGI_FORMAT_R8_UNORM;\n    case DXGI_FORMAT_BC1_TYPELESS:          return DXGI_FORMAT_BC1_UNORM;\n    case DXGI_FORMAT_BC2_TYPELESS:          return DXGI_FORMAT_BC2_UNORM;\n    case DXGI_FORMAT_BC3_TYPELESS:          return DXGI_FORMAT_BC3_UNORM;\n    case DXGI_FORMAT_BC4_TYPELESS:          return DXGI_FORMAT_BC4_UNORM;\n    case DXGI_FORMAT_BC5_TYPELESS:          return DXGI_FORMAT_BC5_UNORM;\n    case DXGI_FORMAT_B8G8R8A8_TYPELESS:     return DXGI_FORMAT_B8G8R8A8_UNORM;\n    case DXGI_FORMAT_B8G8R8X8_TYPELESS:     return DXGI_FORMAT_B8G8R8X8_UNORM;\n    case DXGI_FORMAT_BC7_TYPELESS:          return DXGI_FORMAT_BC7_UNORM;\n    default:                                return fmt;\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic HRESULT CaptureTexture( _In_ ID3D11DeviceContext* pContext,\n                               _In_ ID3D11Resource* pSource,\n                               _Inout_ D3D11_TEXTURE2D_DESC& desc,\n                               _Inout_ ComPtr<ID3D11Texture2D>& pStaging )\n{\n    if ( !pContext || !pSource )\n        return E_INVALIDARG;\n\n    D3D11_RESOURCE_DIMENSION resType = D3D11_RESOURCE_DIMENSION_UNKNOWN;\n    pSource->GetType( &resType );\n\n    if ( resType != D3D11_RESOURCE_DIMENSION_TEXTURE2D )\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    ComPtr<ID3D11Texture2D> pTexture;\n    HRESULT hr = pSource->QueryInterface( __uuidof(ID3D11Texture2D), reinterpret_cast<void**>( pTexture.GetAddressOf() ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    assert( pTexture );\n\n    pTexture->GetDesc( &desc );\n\n    ComPtr<ID3D11Device> d3dDevice;\n    pContext->GetDevice( d3dDevice.GetAddressOf() );\n\n    if ( desc.SampleDesc.Count > 1 )\n    {\n        // MSAA content must be resolved before being copied to a staging texture\n        desc.SampleDesc.Count = 1;\n        desc.SampleDesc.Quality = 0;\n\n        ComPtr<ID3D11Texture2D> pTemp;\n        hr = d3dDevice->CreateTexture2D( &desc, 0, pTemp.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        assert( pTemp );\n\n        DXGI_FORMAT fmt = EnsureNotTypeless( desc.Format );\n\n        UINT support = 0;\n        hr = d3dDevice->CheckFormatSupport( fmt, &support );\n        if ( FAILED(hr) )\n            return hr;\n\n        if ( !(support & D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE) )\n            return E_FAIL;\n\n        for( UINT item = 0; item < desc.ArraySize; ++item )\n        {\n            for( UINT level = 0; level < desc.MipLevels; ++level )\n            {\n                UINT index = D3D11CalcSubresource( level, item, desc.MipLevels );\n                pContext->ResolveSubresource( pTemp.Get(), index, pSource, index, fmt );\n            }\n        }\n\n        desc.BindFlags = 0;\n        desc.MiscFlags &= D3D11_RESOURCE_MISC_TEXTURECUBE;\n        desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n        desc.Usage = D3D11_USAGE_STAGING;\n\n        hr = d3dDevice->CreateTexture2D( &desc, 0, pStaging.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        assert( pStaging );\n\n        pContext->CopyResource( pStaging.Get(), pTemp.Get() );\n    }\n    else if ( (desc.Usage == D3D11_USAGE_STAGING) && (desc.CPUAccessFlags & D3D11_CPU_ACCESS_READ) )\n    {\n        // Handle case where the source is already a staging texture we can use directly\n        pStaging = pTexture;\n    }\n    else\n    {\n        // Otherwise, create a staging texture from the non-MSAA source\n        desc.BindFlags = 0;\n        desc.MiscFlags &= D3D11_RESOURCE_MISC_TEXTURECUBE;\n        desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;\n        desc.Usage = D3D11_USAGE_STAGING;\n\n        hr = d3dDevice->CreateTexture2D( &desc, 0, pStaging.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        assert( pStaging );\n\n        pContext->CopyResource( pStaging.Get(), pSource );\n    }\n\n    return S_OK;\n}\n\n\n//--------------------------------------------------------------------------------------\n#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8)\n\nstatic bool g_WIC2 = false;\n\nstatic IWICImagingFactory* _GetWIC()\n{\n    static IWICImagingFactory* s_Factory = nullptr;\n\n    if ( s_Factory )\n        return s_Factory;\n\n#if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory2,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory2),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( SUCCEEDED(hr) )\n    {\n        // WIC2 is available on Windows 8 and Windows 7 SP1 with KB 2670838 installed\n        g_WIC2 = true;\n    }\n    else\n    {\n        hr = CoCreateInstance(\n            CLSID_WICImagingFactory1,\n            nullptr,\n            CLSCTX_INPROC_SERVER,\n            __uuidof(IWICImagingFactory),\n            (LPVOID*)&s_Factory\n            );\n\n        if ( FAILED(hr) )\n        {\n            s_Factory = nullptr;\n            return nullptr;\n        }\n    }\n#else\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( FAILED(hr) )\n    {\n        s_Factory = nullptr;\n        return nullptr;\n    }\n#endif\n\n    return s_Factory;\n}\n#endif\n\n\n//--------------------------------------------------------------------------------------\nHRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,\n                                       _In_ ID3D11Resource* pSource,\n                                       _In_z_ LPCWSTR fileName )\n{\n    if ( !fileName )\n        return E_INVALIDARG;\n\n    D3D11_TEXTURE2D_DESC desc = { 0 };\n    ComPtr<ID3D11Texture2D> pStaging;\n    HRESULT hr = CaptureTexture( pContext, pSource, desc, pStaging );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Create file\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)\n    ScopedHandle hFile( safe_handle( CreateFile2( fileName, GENERIC_WRITE, 0, CREATE_ALWAYS, 0 ) ) );\n#else\n    ScopedHandle hFile( safe_handle( CreateFileW( fileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0 ) ) );\n#endif\n    if ( !hFile )\n        return HRESULT_FROM_WIN32( GetLastError() );\n\n    // Setup header\n    const size_t MAX_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10);\n    uint8_t fileHeader[ MAX_HEADER_SIZE ];\n\n    *reinterpret_cast<uint32_t*>(&fileHeader[0]) = DDS_MAGIC;\n\n    auto header = reinterpret_cast<DDS_HEADER*>( &fileHeader[0] + sizeof(uint32_t) );\n    size_t headerSize = sizeof(uint32_t) + sizeof(DDS_HEADER);\n    memset( header, 0, sizeof(DDS_HEADER) );\n    header->size = sizeof( DDS_HEADER );\n    header->flags = DDS_HEADER_FLAGS_TEXTURE | DDS_HEADER_FLAGS_MIPMAP;\n    header->height = desc.Height;\n    header->width = desc.Width;\n    header->mipMapCount = 1;\n    header->caps = DDS_SURFACE_FLAGS_TEXTURE;\n\n    // Try to use a legacy .DDS pixel format for better tools support, otherwise fallback to 'DX10' header extension\n    DDS_HEADER_DXT10* extHeader = nullptr;\n    switch( desc.Format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A8B8G8R8, sizeof(DDS_PIXELFORMAT) );    break;\n    case DXGI_FORMAT_R16G16_UNORM:          memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_G16R16, sizeof(DDS_PIXELFORMAT) );      break;\n    case DXGI_FORMAT_R8G8_UNORM:            memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A8L8, sizeof(DDS_PIXELFORMAT) );        break;\n    case DXGI_FORMAT_R16_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_L16, sizeof(DDS_PIXELFORMAT) );         break;\n    case DXGI_FORMAT_R8_UNORM:              memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_L8, sizeof(DDS_PIXELFORMAT) );          break;\n    case DXGI_FORMAT_A8_UNORM:              memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A8, sizeof(DDS_PIXELFORMAT) );          break;\n    case DXGI_FORMAT_R8G8_B8G8_UNORM:       memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_R8G8_B8G8, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_G8R8_G8B8_UNORM:       memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_G8R8_G8B8, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_BC1_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_DXT1, sizeof(DDS_PIXELFORMAT) );        break;\n    case DXGI_FORMAT_BC2_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_DXT3, sizeof(DDS_PIXELFORMAT) );        break;\n    case DXGI_FORMAT_BC3_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_DXT5, sizeof(DDS_PIXELFORMAT) );        break;\n    case DXGI_FORMAT_BC4_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_BC4_UNORM, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_BC4_SNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_BC4_SNORM, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_BC5_UNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_BC5_UNORM, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_BC5_SNORM:             memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_BC5_SNORM, sizeof(DDS_PIXELFORMAT) );   break;\n    case DXGI_FORMAT_B5G6R5_UNORM:          memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_R5G6B5, sizeof(DDS_PIXELFORMAT) );      break;\n    case DXGI_FORMAT_B5G5R5A1_UNORM:        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A1R5G5B5, sizeof(DDS_PIXELFORMAT) );    break;\n    case DXGI_FORMAT_B8G8R8A8_UNORM:        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A8R8G8B8, sizeof(DDS_PIXELFORMAT) );    break; // DXGI 1.1\n    case DXGI_FORMAT_B8G8R8X8_UNORM:        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_X8R8G8B8, sizeof(DDS_PIXELFORMAT) );    break; // DXGI 1.1\n    case DXGI_FORMAT_YUY2:                  memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_YUY2, sizeof(DDS_PIXELFORMAT) );        break; // DXGI 1.2\n    case DXGI_FORMAT_B4G4R4A4_UNORM:        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_A4R4G4B4, sizeof(DDS_PIXELFORMAT) );    break; // DXGI 1.2\n\n    // Legacy D3DX formats using D3DFMT enum value as FourCC\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:    header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 116; break; // D3DFMT_A32B32G32R32F\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:    header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 113; break; // D3DFMT_A16B16G16R16F\n    case DXGI_FORMAT_R16G16B16A16_UNORM:    header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 36;  break; // D3DFMT_A16B16G16R16\n    case DXGI_FORMAT_R16G16B16A16_SNORM:    header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 110; break; // D3DFMT_Q16W16V16U16\n    case DXGI_FORMAT_R32G32_FLOAT:          header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 115; break; // D3DFMT_G32R32F\n    case DXGI_FORMAT_R16G16_FLOAT:          header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 112; break; // D3DFMT_G16R16F\n    case DXGI_FORMAT_R32_FLOAT:             header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 114; break; // D3DFMT_R32F\n    case DXGI_FORMAT_R16_FLOAT:             header->ddspf.size = sizeof(DDS_PIXELFORMAT); header->ddspf.flags = DDS_FOURCC; header->ddspf.fourCC = 111; break; // D3DFMT_R16F\n\n    case DXGI_FORMAT_AI44:\n    case DXGI_FORMAT_IA44:\n    case DXGI_FORMAT_P8:\n    case DXGI_FORMAT_A8P8:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n\n    default:\n        memcpy_s( &header->ddspf, sizeof(header->ddspf), &DDSPF_DX10, sizeof(DDS_PIXELFORMAT) );\n\n        headerSize += sizeof(DDS_HEADER_DXT10);\n        extHeader = reinterpret_cast<DDS_HEADER_DXT10*>( reinterpret_cast<uint8_t*>(&fileHeader[0]) + sizeof(uint32_t) + sizeof(DDS_HEADER) );\n        memset( extHeader, 0, sizeof(DDS_HEADER_DXT10) );\n        extHeader->dxgiFormat = desc.Format;\n        extHeader->resourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D;\n        extHeader->arraySize = 1;\n        break;\n    }\n\n    size_t rowPitch, slicePitch, rowCount;\n    GetSurfaceInfo( desc.Width, desc.Height, desc.Format, &slicePitch, &rowPitch, &rowCount );\n\n    if ( IsCompressed( desc.Format ) )\n    {\n        header->flags |= DDS_HEADER_FLAGS_LINEARSIZE;\n        header->pitchOrLinearSize = static_cast<uint32_t>( slicePitch );\n    }\n    else\n    {\n        header->flags |= DDS_HEADER_FLAGS_PITCH;\n        header->pitchOrLinearSize = static_cast<uint32_t>( rowPitch );\n    }\n\n    // Setup pixels\n    std::unique_ptr<uint8_t[]> pixels( new (std::nothrow) uint8_t[ slicePitch ] );\n    if (!pixels)\n        return E_OUTOFMEMORY;\n\n    D3D11_MAPPED_SUBRESOURCE mapped;\n    hr = pContext->Map( pStaging.Get(), 0, D3D11_MAP_READ, 0, &mapped );\n    if ( FAILED(hr) )\n        return hr;\n\n    auto sptr = reinterpret_cast<const uint8_t*>( mapped.pData );\n    if ( !sptr )\n    {\n        pContext->Unmap( pStaging.Get(), 0 );\n        return E_POINTER;\n    }\n\n    uint8_t* dptr = pixels.get();\n\n    size_t msize = std::min<size_t>( rowPitch, mapped.RowPitch );\n    for( size_t h = 0; h < rowCount; ++h )\n    {\n        memcpy_s( dptr, rowPitch, sptr, msize );\n        sptr += mapped.RowPitch;\n        dptr += rowPitch;\n    }\n\n    pContext->Unmap( pStaging.Get(), 0 );\n\n    // Write header & pixels\n    DWORD bytesWritten;\n    if ( !WriteFile( hFile.get(), fileHeader, static_cast<DWORD>( headerSize ), &bytesWritten, 0 ) )\n        return HRESULT_FROM_WIN32( GetLastError() );\n\n    if ( bytesWritten != headerSize )\n        return E_FAIL;\n\n    if ( !WriteFile( hFile.get(), pixels.get(), static_cast<DWORD>( slicePitch ), &bytesWritten, 0 ) )\n        return HRESULT_FROM_WIN32( GetLastError() );\n\n    if ( bytesWritten != slicePitch )\n        return E_FAIL;\n\n    return S_OK;\n}\n\n//--------------------------------------------------------------------------------------\n#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8)\n\nHRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,\n                                       _In_ ID3D11Resource* pSource,\n                                       _In_ REFGUID guidContainerFormat, \n                                       _In_z_ LPCWSTR fileName,\n                                       _In_opt_ const GUID* targetFormat,\n                                       _In_opt_ std::function<void(IPropertyBag2*)> setCustomProps )\n{\n    if ( !fileName )\n        return E_INVALIDARG;\n\n    D3D11_TEXTURE2D_DESC desc = { 0 };\n    ComPtr<ID3D11Texture2D> pStaging;\n    HRESULT hr = CaptureTexture( pContext, pSource, desc, pStaging );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Determine source format's WIC equivalent\n    WICPixelFormatGUID pfGuid;\n    bool sRGB = false;\n    switch ( desc.Format )\n    {\n    case DXGI_FORMAT_R32G32B32A32_FLOAT:            pfGuid = GUID_WICPixelFormat128bppRGBAFloat; break;\n    case DXGI_FORMAT_R16G16B16A16_FLOAT:            pfGuid = GUID_WICPixelFormat64bppRGBAHalf; break;\n    case DXGI_FORMAT_R16G16B16A16_UNORM:            pfGuid = GUID_WICPixelFormat64bppRGBA; break;\n    case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:    pfGuid = GUID_WICPixelFormat32bppRGBA1010102XR; break; // DXGI 1.1\n    case DXGI_FORMAT_R10G10B10A2_UNORM:             pfGuid = GUID_WICPixelFormat32bppRGBA1010102; break;\n    case DXGI_FORMAT_B5G5R5A1_UNORM:                pfGuid = GUID_WICPixelFormat16bppBGRA5551; break;\n    case DXGI_FORMAT_B5G6R5_UNORM:                  pfGuid = GUID_WICPixelFormat16bppBGR565; break;\n    case DXGI_FORMAT_R32_FLOAT:                     pfGuid = GUID_WICPixelFormat32bppGrayFloat; break;\n    case DXGI_FORMAT_R16_FLOAT:                     pfGuid = GUID_WICPixelFormat16bppGrayHalf; break;\n    case DXGI_FORMAT_R16_UNORM:                     pfGuid = GUID_WICPixelFormat16bppGray; break;\n    case DXGI_FORMAT_R8_UNORM:                      pfGuid = GUID_WICPixelFormat8bppGray; break;\n    case DXGI_FORMAT_A8_UNORM:                      pfGuid = GUID_WICPixelFormat8bppAlpha; break;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        pfGuid = GUID_WICPixelFormat32bppRGBA;\n        break;\n\n    case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\n        pfGuid = GUID_WICPixelFormat32bppRGBA;\n        sRGB = true;\n        break;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM: // DXGI 1.1\n        pfGuid = GUID_WICPixelFormat32bppBGRA;\n        break;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: // DXGI 1.1\n        pfGuid = GUID_WICPixelFormat32bppBGRA;\n        sRGB = true;\n        break;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM: // DXGI 1.1\n        pfGuid = GUID_WICPixelFormat32bppBGR;\n        break; \n\n    case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: // DXGI 1.1\n        pfGuid = GUID_WICPixelFormat32bppBGR;\n        sRGB = true;\n        break; \n\n    default:\n        return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    ComPtr<IWICStream> stream;\n    hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromFilename( fileName, GENERIC_WRITE );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapEncoder> encoder;\n    hr = pWIC->CreateEncoder( guidContainerFormat, 0, encoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = encoder->Initialize( stream.Get(), WICBitmapEncoderNoCache );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameEncode> frame;\n    ComPtr<IPropertyBag2> props;\n    hr = encoder->CreateNewFrame( frame.GetAddressOf(), props.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( targetFormat && memcmp( &guidContainerFormat, &GUID_ContainerFormatBmp, sizeof(WICPixelFormatGUID) ) == 0 && g_WIC2 )\n    {\n        // Opt-in to the WIC2 support for writing 32-bit Windows BMP files with an alpha channel\n        PROPBAG2 option = { 0 };\n        option.pstrName = L\"EnableV5Header32bppBGRA\";\n\n        VARIANT varValue;    \n        varValue.vt = VT_BOOL;\n        varValue.boolVal = VARIANT_TRUE;      \n        (void)props->Write( 1, &option, &varValue ); \n    }\n\n    if ( setCustomProps )\n    {\n        setCustomProps( props.Get() );\n    }\n\n    hr = frame->Initialize( props.Get() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = frame->SetSize( desc.Width , desc.Height );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = frame->SetResolution( 72, 72 );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Pick a target format\n    WICPixelFormatGUID targetGuid;\n    if ( targetFormat )\n    {\n        targetGuid = *targetFormat;\n    }\n    else\n    {\n        // Screenshots dont typically include the alpha channel of the render target\n        switch ( desc.Format )\n        {\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n        case DXGI_FORMAT_R32G32B32A32_FLOAT:            \n        case DXGI_FORMAT_R16G16B16A16_FLOAT:\n            if ( g_WIC2 )\n            {\n                targetGuid = GUID_WICPixelFormat96bppRGBFloat;\n            }\n            else\n            {\n                targetGuid = GUID_WICPixelFormat24bppBGR;\n            }\n            break;\n#endif\n\n        case DXGI_FORMAT_R16G16B16A16_UNORM: targetGuid = GUID_WICPixelFormat48bppBGR; break;\n        case DXGI_FORMAT_B5G5R5A1_UNORM:     targetGuid = GUID_WICPixelFormat16bppBGR555; break;\n        case DXGI_FORMAT_B5G6R5_UNORM:       targetGuid = GUID_WICPixelFormat16bppBGR565; break;\n\n        case DXGI_FORMAT_R32_FLOAT:\n        case DXGI_FORMAT_R16_FLOAT:\n        case DXGI_FORMAT_R16_UNORM:\n        case DXGI_FORMAT_R8_UNORM:\n        case DXGI_FORMAT_A8_UNORM:\n            targetGuid = GUID_WICPixelFormat8bppGray;\n            break;\n\n        default:\n            targetGuid = GUID_WICPixelFormat24bppBGR;\n            break;\n        }\n    }\n\n    hr = frame->SetPixelFormat( &targetGuid );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( targetFormat && memcmp( targetFormat, &targetGuid, sizeof(WICPixelFormatGUID) ) != 0 )\n    {\n        // Requested output pixel format is not supported by the WIC codec\n        return E_FAIL;\n    }\n\n    // Encode WIC metadata\n    ComPtr<IWICMetadataQueryWriter> metawriter;\n    if ( SUCCEEDED( frame->GetMetadataQueryWriter( metawriter.GetAddressOf() ) ) )\n    {\n        PROPVARIANT value;\n        PropVariantInit( &value );\n\n        value.vt = VT_LPSTR;\n        value.pszVal = \"DirectXTK\";\n\n        if ( memcmp( &guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID) ) == 0 )\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"/tEXt/{str=Software}\", &value );\n\n            // Set sRGB chunk\n            if ( sRGB )\n            {\n                value.vt = VT_UI1;\n                value.bVal = 0;\n                (void)metawriter->SetMetadataByName( L\"/sRGB/RenderingIntent\", &value );\n            }\n        }\n        else\n        {\n            // Set Software name\n            (void)metawriter->SetMetadataByName( L\"System.ApplicationName\", &value );\n\n            if ( sRGB )\n            {\n                // Set JPEG EXIF Colorspace of sRGB\n                value.vt = VT_UI2;\n                value.uiVal = 1;\n                (void)metawriter->SetMetadataByName( L\"System.Image.ColorSpace\", &value );\n            }\n        }\n    }\n\n    D3D11_MAPPED_SUBRESOURCE mapped;\n    hr = pContext->Map( pStaging.Get(), 0, D3D11_MAP_READ, 0, &mapped );\n    if ( FAILED(hr) )\n        return hr;\n\n    if ( memcmp( &targetGuid, &pfGuid, sizeof(WICPixelFormatGUID) ) != 0 )\n    {\n        // Conversion required to write\n        ComPtr<IWICBitmap> source;\n        hr = pWIC->CreateBitmapFromMemory( desc.Width, desc.Height, pfGuid,\n                                           mapped.RowPitch, mapped.RowPitch * desc.Height,\n                                           reinterpret_cast<BYTE*>( mapped.pData ), source.GetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            pContext->Unmap( pStaging.Get(), 0 );\n            return hr;\n        }\n\n        ComPtr<IWICFormatConverter> FC;\n        hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n        if ( FAILED(hr) )\n        {\n            pContext->Unmap( pStaging.Get(), 0 );\n            return hr;\n        }\n\n        BOOL canConvert = FALSE;\n        hr = FC->CanConvert( pfGuid, targetGuid, &canConvert );\n        if ( FAILED(hr) || !canConvert )\n        {\n            return E_UNEXPECTED;\n        }\n\n        hr = FC->Initialize( source.Get(), targetGuid, WICBitmapDitherTypeNone, 0, 0, WICBitmapPaletteTypeCustom );\n        if ( FAILED(hr) )\n        {\n            pContext->Unmap( pStaging.Get(), 0 );\n            return hr;\n        }\n\n        WICRect rect = { 0, 0, static_cast<INT>( desc.Width ), static_cast<INT>( desc.Height ) };\n        hr = frame->WriteSource( FC.Get(), &rect );\n        if ( FAILED(hr) )\n        {\n            pContext->Unmap( pStaging.Get(), 0 );\n            return hr;\n        }\n    }\n    else\n    {\n        // No conversion required\n        hr = frame->WritePixels( desc.Height, mapped.RowPitch, mapped.RowPitch * desc.Height, reinterpret_cast<BYTE*>( mapped.pData ) );\n        if ( FAILED(hr) )\n            return hr;\n    }\n\n    pContext->Unmap( pStaging.Get(), 0 );\n\n    hr = frame->Commit();\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = encoder->Commit();\n    if ( FAILED(hr) )\n        return hr;\n\n    return S_OK;\n}\n\n#endif // !WINAPI_FAMILY || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8)\n"
  },
  {
    "path": "3rdParty/DirectXTex/ScreenGrab/ScreenGrab.h",
    "content": "//--------------------------------------------------------------------------------------\n// File: ScreenGrab.h\n//\n// Function for capturing a 2D texture and saving it to a file (aka a 'screenshot'\n// when used on a Direct3D 11 Render Target).\n//\n// Note these functions are useful as a light-weight runtime screen grabber. For\n// full-featured texture capture, DDS writer, and texture processing pipeline,\n// see the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n#ifdef _MSC_VER\n#pragma once\n#endif\n\n#include <d3d11_1.h>\n\n#include <ocidl.h>\n\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <stdint.h>\n#pragma warning(pop)\n\n#include <functional>\n\nnamespace DirectX\n{\n    HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,\n                                  _In_ ID3D11Resource* pSource,\n                                  _In_z_ LPCWSTR fileName );\n\n#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8)\n\n    HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,\n                                  _In_ ID3D11Resource* pSource,\n                                  _In_ REFGUID guidContainerFormat, \n                                  _In_z_ LPCWSTR fileName,\n                                  _In_opt_ const GUID* targetFormat = nullptr,\n                                  _In_opt_ std::function<void(IPropertyBag2*)> setCustomProps = nullptr );\n\n#endif\n}"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2012.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texassemble\", \"Texassemble_Desktop_2012.vcxproj\", \"{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.Build.0 = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.Build.0 = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.Build.0 = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.ActiveCfg = Release|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2012.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texassemble</ProjectName>\n    <ProjectGuid>{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}</ProjectGuid>\n    <RootNamespace>texassemble</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2012.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2013.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texassemble\", \"Texassemble_Desktop_2013.vcxproj\", \"{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.Build.0 = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.Build.0 = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.Build.0 = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.ActiveCfg = Release|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2013.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texassemble</ProjectName>\n    <ProjectGuid>{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}</ProjectGuid>\n    <RootNamespace>texassemble</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2013.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2015.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2015\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texassemble\", \"Texassemble_Desktop_2015.vcxproj\", \"{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.Build.0 = Debug|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.Build.0 = Profile|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|Win32.Build.0 = Release|Win32\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.ActiveCfg = Release|x64\n\t\t{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2015.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texassemble</ProjectName>\n    <ProjectGuid>{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}</ProjectGuid>\n    <RootNamespace>texassemble</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>false</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/Texassemble_Desktop_2015.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"texassemble.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"texassemble.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/texassemble.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: Texassemble.cpp\n//\n// DirectX 11 Texture assembler for cube maps, volume maps, and arrays\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <assert.h>\n\n#include <memory>\n#include <list>\n#include <vector>\n\n#include <dxgiformat.h>\n\n#include \"directxtex.h\"\n\nusing namespace DirectX;\n\nenum OPTIONS    // Note: dwOptions below assumes 32 or less options.\n{\n    OPT_CUBE = 1,\n    OPT_VOLUME,\n    OPT_ARRAY,\n    OPT_CUBEARRAY,\n    OPT_WIDTH,\n    OPT_HEIGHT,\n    OPT_FORMAT,\n    OPT_FILTER,\n    OPT_OUTPUTFILE,\n    OPT_USE_DX10,\n    OPT_NOLOGO,\n    OPT_SEPALPHA,\n    OPT_MAX\n};\n\nstatic_assert( OPT_MAX <= 32, \"dwOptions is a DWORD bitfield\" );\n\nstruct SConversion\n{\n    WCHAR szSrc [MAX_PATH];\n};\n\nstruct SValue\n{\n    LPCWSTR pName;\n    DWORD dwValue;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n\nSValue g_pOptions[] = \n{\n    { L\"cube\",          OPT_CUBE      },\n    { L\"volume\",        OPT_VOLUME    },\n    { L\"array\",         OPT_ARRAY     },\n    { L\"cubearray\",     OPT_CUBEARRAY },\n    { L\"w\",             OPT_WIDTH     },\n    { L\"h\",             OPT_HEIGHT    },\n    { L\"f\",             OPT_FORMAT    },\n    { L\"if\",            OPT_FILTER    },\n    { L\"o\",             OPT_OUTPUTFILE },\n    { L\"dx10\",          OPT_USE_DX10  },\n    { L\"nologo\",        OPT_NOLOGO    },\n    { L\"sepalpha\",      OPT_SEPALPHA  },\n    { nullptr,          0             }\n};\n\n#define DEFFMT(fmt) { L#fmt, DXGI_FORMAT_ ## fmt }\n\nSValue g_pFormats[] = \n{\n    // List does not include _TYPELESS or depth/stencil formats\n    DEFFMT(R32G32B32A32_FLOAT), \n    DEFFMT(R32G32B32A32_UINT), \n    DEFFMT(R32G32B32A32_SINT), \n    DEFFMT(R32G32B32_FLOAT), \n    DEFFMT(R32G32B32_UINT), \n    DEFFMT(R32G32B32_SINT), \n    DEFFMT(R16G16B16A16_FLOAT), \n    DEFFMT(R16G16B16A16_UNORM), \n    DEFFMT(R16G16B16A16_UINT), \n    DEFFMT(R16G16B16A16_SNORM), \n    DEFFMT(R16G16B16A16_SINT), \n    DEFFMT(R32G32_FLOAT), \n    DEFFMT(R32G32_UINT), \n    DEFFMT(R32G32_SINT), \n    DEFFMT(R10G10B10A2_UNORM), \n    DEFFMT(R10G10B10A2_UINT), \n    DEFFMT(R11G11B10_FLOAT), \n    DEFFMT(R8G8B8A8_UNORM), \n    DEFFMT(R8G8B8A8_UNORM_SRGB), \n    DEFFMT(R8G8B8A8_UINT), \n    DEFFMT(R8G8B8A8_SNORM), \n    DEFFMT(R8G8B8A8_SINT), \n    DEFFMT(R16G16_FLOAT), \n    DEFFMT(R16G16_UNORM), \n    DEFFMT(R16G16_UINT), \n    DEFFMT(R16G16_SNORM), \n    DEFFMT(R16G16_SINT), \n    DEFFMT(R32_FLOAT), \n    DEFFMT(R32_UINT), \n    DEFFMT(R32_SINT), \n    DEFFMT(R8G8_UNORM), \n    DEFFMT(R8G8_UINT), \n    DEFFMT(R8G8_SNORM), \n    DEFFMT(R8G8_SINT), \n    DEFFMT(R16_FLOAT), \n    DEFFMT(R16_UNORM), \n    DEFFMT(R16_UINT), \n    DEFFMT(R16_SNORM), \n    DEFFMT(R16_SINT), \n    DEFFMT(R8_UNORM), \n    DEFFMT(R8_UINT), \n    DEFFMT(R8_SNORM), \n    DEFFMT(R8_SINT), \n    DEFFMT(A8_UNORM), \n    //DEFFMT(R1_UNORM)\n    DEFFMT(R9G9B9E5_SHAREDEXP), \n    DEFFMT(R8G8_B8G8_UNORM), \n    DEFFMT(G8R8_G8B8_UNORM), \n    DEFFMT(B5G6R5_UNORM),\n    DEFFMT(B5G5R5A1_UNORM),\n\n    // DXGI 1.1 formats\n    DEFFMT(B8G8R8A8_UNORM),\n    DEFFMT(B8G8R8X8_UNORM),\n    DEFFMT(R10G10B10_XR_BIAS_A2_UNORM),\n    DEFFMT(B8G8R8A8_UNORM_SRGB),\n    DEFFMT(B8G8R8X8_UNORM_SRGB),\n\n    // DXGI 1.2 formats\n    DEFFMT(B4G4R4A4_UNORM),\n\n    { nullptr, DXGI_FORMAT_UNKNOWN }\n};\n\nSValue g_pFilters[] = \n{\n    { L\"POINT\",                     TEX_FILTER_POINT },\n    { L\"LINEAR\",                    TEX_FILTER_LINEAR },\n    { L\"CUBIC\",                     TEX_FILTER_CUBIC },\n    { L\"FANT\",                      TEX_FILTER_FANT },\n    { L\"BOX\",                       TEX_FILTER_BOX },\n    { L\"TRIANGLE\",                  TEX_FILTER_TRIANGLE },\n    { L\"POINT_DITHER\",              TEX_FILTER_POINT  | TEX_FILTER_DITHER },\n    { L\"LINEAR_DITHER\",             TEX_FILTER_LINEAR | TEX_FILTER_DITHER },\n    { L\"CUBIC_DITHER\",              TEX_FILTER_CUBIC  | TEX_FILTER_DITHER },\n    { L\"FANT_DITHER\",               TEX_FILTER_FANT   | TEX_FILTER_DITHER },\n    { L\"BOX_DITHER\",                TEX_FILTER_BOX    | TEX_FILTER_DITHER },\n    { L\"TRIANGLE_DITHER\",           TEX_FILTER_TRIANGLE | TEX_FILTER_DITHER },\n    { L\"POINT_DITHER_DIFFUSION\",    TEX_FILTER_POINT  | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"LINEAR_DITHER_DIFFUSION\",   TEX_FILTER_LINEAR | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"CUBIC_DITHER_DIFFUSION\",    TEX_FILTER_CUBIC  | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"FANT_DITHER_DIFFUSION\",     TEX_FILTER_FANT   | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"BOX_DITHER_DIFFUSION\",      TEX_FILTER_BOX    | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"TRIANGLE_DITHER_DIFFUSION\", TEX_FILTER_TRIANGLE | TEX_FILTER_DITHER_DIFFUSION },\n    { nullptr,                      TEX_FILTER_DEFAULT                              }\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n\n#pragma prefast(disable : 26018, \"Only used with static internal arrays\")\n\nDWORD LookupByName(const WCHAR *pName, const SValue *pArray)\n{\n    while(pArray->pName)\n    {\n        if(!_wcsicmp(pName, pArray->pName))\n            return pArray->dwValue;\n\n        pArray++;\n    }\n\n    return 0;\n}\n\nconst WCHAR* LookupByValue(DWORD pValue, const SValue *pArray)\n{\n    while(pArray->pName)\n    {\n        if(pValue == pArray->dwValue)\n            return pArray->pName;\n\n        pArray++;\n    }\n\n    return L\"\";\n}\n\nvoid PrintFormat(DXGI_FORMAT Format)\n{\n    for(SValue *pFormat = g_pFormats; pFormat->pName; pFormat++)\n    {\n        if((DXGI_FORMAT) pFormat->dwValue == Format)\n        {\n            wprintf( pFormat->pName );\n            break;\n        }\n    }\n}\n\nvoid PrintInfo( const TexMetadata& info )\n{\n    wprintf( L\" (%Iux%Iu\", info.width, info.height);\n\n    if ( TEX_DIMENSION_TEXTURE3D == info.dimension )\n        wprintf( L\"x%Iu\", info.depth);\n\n    if ( info.mipLevels > 1 )\n        wprintf( L\",%Iu\", info.mipLevels);\n\n    if ( info.arraySize > 1 )\n        wprintf( L\",%Iu\", info.arraySize);\n\n    wprintf( L\" \");\n    PrintFormat( info.format );\n\n    switch ( info.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        wprintf( (info.arraySize > 1) ? L\" 1DArray\" : L\" 1D\" );\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( info.IsCubemap() )\n        {\n            wprintf( (info.arraySize > 6) ? L\" CubeArray\" : L\" Cube\" );\n        }\n        else\n        {\n            wprintf( (info.arraySize > 1) ? L\" 2DArray\" : L\" 2D\" );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        wprintf( L\" 3D\");\n        break;\n    }\n\n    wprintf( L\")\");\n}\n\n\nvoid PrintList(size_t cch, SValue *pValue)\n{\n    while(pValue->pName)\n    {\n        size_t cchName = wcslen(pValue->pName);\n        \n        if(cch + cchName + 2>= 80)\n        {\n            wprintf( L\"\\n      \");\n            cch = 6;\n        }\n\n        wprintf( L\"%ls \", pValue->pName );\n        cch += cchName + 2;\n        pValue++;\n    }\n\n    wprintf( L\"\\n\");\n}\n\n\nvoid PrintLogo()\n{\n    wprintf( L\"Microsoft (R) DirectX 11 Texture Assembler (DirectXTex version)\\n\");\n    wprintf( L\"Copyright (C) Microsoft Corp. All rights reserved.\\n\");\n    wprintf( L\"\\n\");\n}\n\n\nvoid PrintUsage()\n{\n    PrintLogo();\n\n    wprintf( L\"Usage: texassemble [-cube | - volume | -array | -cubearray] <options> <files>\\n\");\n    wprintf( L\"\\n\");\n    wprintf( L\"   -cube               create cubemap\\n\");\n    wprintf( L\"   -volume             create volume map\\n\");\n    wprintf( L\"   -array              create texture array\\n\");\n    wprintf( L\"   -cubearray          create cubemap array\\n\");\n    wprintf( L\"   -w <n>              width\\n\");\n    wprintf( L\"   -h <n>              height\\n\");\n    wprintf( L\"   -f <format>         format\\n\");\n    wprintf( L\"   -if <filter>        image filtering\\n\");\n    wprintf( L\"   -o <filename>       output filename\\n\");\n    wprintf( L\"   -sepalpha           resize alpha channel separately from color channels\\n\");\n    wprintf( L\"   -dx10               Force use of 'DX10' extended header\\n\");\n    wprintf( L\"   -nologo             suppress copyright message\\n\");\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <format>: \");\n    PrintList(13, g_pFormats);\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <filter>: \");\n    PrintList(13, g_pFilters);\n}\n\n\n//--------------------------------------------------------------------------------------\n// Entry-point\n//--------------------------------------------------------------------------------------\n#pragma prefast(disable : 28198, \"Command-line tool, frees all memory on exit\")\n\nint __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])\n{\n    // Parameters and defaults\n    size_t width = 0;\n    size_t height = 0; \n\n    DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN;\n    DWORD dwFilter = TEX_FILTER_DEFAULT;\n    DWORD dwFilterOpts = 0;\n\n    WCHAR szOutputFile[MAX_PATH] = { 0 };\n\n    // Initialize COM (needed for WIC)\n    HRESULT hr = hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);\n    if( FAILED(hr) )\n    {\n        wprintf( L\"Failed to initialize COM (%08X)\\n\", hr);\n        return 1;\n    }\n\n    // Process command line\n    DWORD dwOptions = 0;\n    std::list<SConversion> conversion;\n\n    for(int iArg = 1; iArg < argc; iArg++)\n    {\n        PWSTR pArg = argv[iArg];\n\n        if(('-' == pArg[0]) || ('/' == pArg[0]))\n        {\n            pArg++;\n            PWSTR pValue;\n\n            for(pValue = pArg; *pValue && (':' != *pValue); pValue++);\n\n            if(*pValue)\n                *pValue++ = 0;\n\n            DWORD dwOption = LookupByName(pArg, g_pOptions);\n\n            if(!dwOption || (dwOptions & (1 << dwOption)))\n            {\n                PrintUsage();\n                return 1;\n            }\n\n            dwOptions |= 1 << dwOption;\n\n            if( (OPT_NOLOGO != dwOption) && (OPT_SEPALPHA != dwOption) && (OPT_USE_DX10 != dwOption)\n                && (OPT_CUBE != dwOption) && (OPT_VOLUME != dwOption) && (OPT_ARRAY != dwOption) && (OPT_CUBEARRAY != dwOption) )\n            {\n                if(!*pValue)\n                {\n                    if((iArg + 1 >= argc))\n                    {\n                        PrintUsage();\n                        return 1;\n                    }\n\n                    iArg++;\n                    pValue = argv[iArg];\n                }\n            }\n\n            switch(dwOption)\n            {\n            case OPT_WIDTH:\n                if (swscanf_s(pValue, L\"%Iu\", &width) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -w (%ls)\\n\", pValue);\n                    return 1;\n                }\n                break;\n\n            case OPT_HEIGHT:\n                if (swscanf_s(pValue, L\"%Iu\", &height) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -h (%ls)\\n\", pValue);\n                    return 1;\n                }\n                break;\n\n            case OPT_FORMAT:\n                format = (DXGI_FORMAT) LookupByName(pValue, g_pFormats);\n                if ( !format )\n                {\n                    wprintf( L\"Invalid value specified with -f (%ls)\\n\", pValue);\n                    return 1;\n                }\n                break;\n\n            case OPT_FILTER:\n                dwFilter = LookupByName(pValue, g_pFilters);\n                if ( !dwFilter )\n                {\n                    wprintf( L\"Invalid value specified with -if (%ls)\\n\", pValue);\n                    return 1;\n                }\n                break;\n\n            case OPT_SEPALPHA:\n                dwFilterOpts |= TEX_FILTER_SEPARATE_ALPHA;\n                break;\n\n            case OPT_OUTPUTFILE:\n                wcscpy_s(szOutputFile, MAX_PATH, pValue);\n                break;\n            }\n        }\n        else\n        {         \n            SConversion conv;\n            wcscpy_s(conv.szSrc, MAX_PATH, pArg);\n\n            conversion.push_back(conv);\n        }\n    }\n\n    if(conversion.empty())\n    {\n        PrintUsage();\n        return 0;\n    }\n\n    switch( dwOptions & ( (1 << OPT_CUBE) | (1 << OPT_VOLUME) | (1 << OPT_ARRAY) | (1 << OPT_CUBEARRAY) ) )\n    {\n    case (1 << OPT_VOLUME):\n    case (1 << OPT_ARRAY):\n    case (1 << OPT_CUBE):\n    case (1 << OPT_CUBEARRAY):\n        break;\n\n    default:\n        wprintf( L\"Must use one of: -cube, -volume, -array, or -cubearray\\n\\n\" );\n        return 1;\n    }\n\n    if(~dwOptions & (1 << OPT_NOLOGO))\n        PrintLogo();\n\n    // Convert images\n    size_t images = 0;\n\n    std::vector<std::unique_ptr<ScratchImage>> loadedImages; \n\n    for( auto pConv = conversion.begin(); pConv != conversion.end(); ++pConv )\n    {\n        WCHAR ext[_MAX_EXT];\n        WCHAR fname[_MAX_FNAME];\n        _wsplitpath_s( pConv->szSrc, nullptr, 0, nullptr, 0, fname, _MAX_FNAME, ext, _MAX_EXT );\n\n        // Load source image\n        if( pConv != conversion.begin() )\n            wprintf( L\"\\n\");\n        else if ( !*szOutputFile )\n        {\n            if ( _wcsicmp( ext, L\".dds\" ) == 0 )\n            {\n                wprintf( L\"ERROR: Need to specify output file via -o\\n\");\n                return 1;\n            }\n\n            _wmakepath_s( szOutputFile, nullptr, nullptr, fname, L\".dds\" );\n        }\n\n        wprintf( L\"reading %ls\", pConv->szSrc );\n        fflush(stdout);\n\n        TexMetadata info;\n        std::unique_ptr<ScratchImage> image( new (std::nothrow) ScratchImage );\n        if ( !image )\n        {\n            wprintf( L\" ERROR: Memory allocation failed\\n\" );\n            return 1;\n        }\n\n        if ( _wcsicmp( ext, L\".dds\" ) == 0 )\n        {\n            hr = LoadFromDDSFile( pConv->szSrc, DDS_FLAGS_NONE, &info, *image.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                return 1;\n            }\n\n            if ( info.depth > 1\n                 || info.mipLevels > 1\n                 || info.IsCubemap() )\n            {\n                wprintf( L\" ERROR: Can't assemble complex surfaces\\n\" );\n                return 1;\n            }\n        }\n        else if ( _wcsicmp( ext, L\".tga\" ) == 0 )\n        {\n            hr = LoadFromTGAFile( pConv->szSrc, &info, *image.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                return 1;\n            }\n        }\n        else\n        {\n            // WIC shares the same filter values for mode and dither\n            static_assert( WIC_FLAGS_DITHER == TEX_FILTER_DITHER, \"WIC_FLAGS_* & TEX_FILTER_* should match\" );\n            static_assert( WIC_FLAGS_DITHER_DIFFUSION == TEX_FILTER_DITHER_DIFFUSION, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_POINT == TEX_FILTER_POINT, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_LINEAR == TEX_FILTER_LINEAR, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_CUBIC == TEX_FILTER_CUBIC, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_FANT == TEX_FILTER_FANT, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n\n            hr = LoadFromWICFile( pConv->szSrc, dwFilter | WIC_FLAGS_ALL_FRAMES, &info, *image.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                return 1;\n            }\n        }\n\n        PrintInfo( info );\n\n        // Convert texture\n        fflush(stdout);\n\n        // --- Decompress --------------------------------------------------------------\n        if ( IsCompressed( info.format ) )\n        {\n            const Image* img = image->GetImage(0,0,0);\n            assert( img );\n            size_t nimg = image->GetImageCount();\n\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Decompress( img, nimg, info, DXGI_FORMAT_UNKNOWN /* picks good default */, *timage.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [decompress] (%x)\\n\", hr);\n                continue;\n            }\n\n            const TexMetadata& tinfo = timage->GetMetadata();\n\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n        }\n\n        // --- Resize ------------------------------------------------------------------\n        if ( !width )\n        {\n            width = info.width;\n        }\n        if ( !height )\n        {\n            height = info.height;\n        }\n        if ( info.width != width || info.height != height )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Resize( image->GetImages(), image->GetImageCount(), image->GetMetadata(), width, height, dwFilter | dwFilterOpts, *timage.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [resize] (%x)\\n\", hr);\n                return 1;\n            }\n\n            const TexMetadata& tinfo = timage->GetMetadata();\n\n            assert( tinfo.width == width && tinfo.height == height && tinfo.mipLevels == 1 );\n            info.width = tinfo.width;\n            info.height = tinfo.height;\n            info.mipLevels = 1;\n\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.format == tinfo.format );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n        }\n\n        // --- Convert -----------------------------------------------------------------\n        if ( format == DXGI_FORMAT_UNKNOWN )\n        {\n            format = info.format;\n        }\n        else if ( info.format != format && !IsCompressed( format ) )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Convert( image->GetImages(), image->GetImageCount(), image->GetMetadata(), format, dwFilter | dwFilterOpts, 0.5f, *timage.get() );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [convert] (%x)\\n\", hr);\n                return 1;\n            }\n\n            const TexMetadata& tinfo = timage->GetMetadata();\n\n            assert( tinfo.format == format );\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n        }\n\n        images += info.arraySize;\n        loadedImages.push_back( std::move( image ) );\n    }\n\n    if( images < 2 )\n    {\n        wprintf( L\" ERROR: Need at least 2 images to assemble\\n\\n\");\n        return 1;\n    }\n\n    switch( dwOptions & ( (1 << OPT_CUBE) | (1 << OPT_VOLUME) | (1 << OPT_ARRAY) | (1 << OPT_CUBEARRAY) ) )\n    {\n    case (1 << OPT_CUBE):\n        if ( images != 6 )\n        {\n            wprintf( L\" ERROR: -cube requires six images to form the faces of the cubemap\\n\");\n            return 1;\n        }\n        break;\n\n    case (1 << OPT_CUBEARRAY):\n        if ( ( images < 6) || ( images % 6 ) != 0 )\n        {\n            wprintf( L\"-cubearray requires a multiple of 6 images to form the faces of the cubemaps\\n\");\n            return 1;\n        }\n        break;\n    }\n\n    // --- Create result ---------------------------------------------------------------\n    {\n        std::vector<Image> imageArray;\n        imageArray.reserve( images );\n\n        for( auto it = loadedImages.cbegin(); it != loadedImages.cend(); ++it )\n        {\n            const ScratchImage* simage = it->get();\n            assert( simage != 0 );\n            for( size_t j = 0; j < simage->GetMetadata().arraySize; ++j )\n            {\n                const Image* img = simage->GetImage(0,j,0);\n                assert( img != 0 );\n                imageArray.push_back( *img );\n            }\n        }\n\n        ScratchImage result;\n        switch( dwOptions & ( (1 << OPT_CUBE) | (1 << OPT_VOLUME) | (1 << OPT_ARRAY) | (1 << OPT_CUBEARRAY) ) )\n        {\n        case (1 << OPT_VOLUME):\n            hr = result.Initialize3DFromImages( &imageArray[0], imageArray.size() );\n            break;\n\n        case (1 << OPT_ARRAY):\n            hr = result.InitializeArrayFromImages( &imageArray[0], imageArray.size(), (dwOptions & (1 << OPT_USE_DX10)) != 0 );\n            break;\n\n        case (1 << OPT_CUBE):\n        case (1 << OPT_CUBEARRAY):\n            hr = result.InitializeCubeFromImages( &imageArray[0], imageArray.size() );\n            break;\n        }\n\n        if ( FAILED(hr ) )\n        {\n            wprintf( L\"FAILED building result image (%x)\\n\", hr);\n            return 1;\n        }\n\n        // Write texture\n        wprintf( L\"\\nWriting %ls \", szOutputFile);\n        PrintInfo( result.GetMetadata() );\n        wprintf( L\"\\n\" );\n        fflush(stdout);\n\n        hr = SaveToDDSFile( result.GetImages(), result.GetImageCount(), result.GetMetadata(),\n                            (dwOptions & (1 << OPT_USE_DX10) ) ? (DDS_FLAGS_FORCE_DX10_EXT|DDS_FLAGS_FORCE_DX10_EXT_MISC2) : DDS_FLAGS_NONE, \n                            szOutputFile );\n        if(FAILED(hr))\n        {\n            wprintf( L\"\\nFAILED (%x)\\n\", hr);\n            return 1;\n        }\n        wprintf( L\"\\n\");\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texassemble/texassemble.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define IDC_STATIC -1\n#include <WinResRc.h>\n\n\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_MAIN_ICON           ICON                    \"directx.ico\"\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define IDC_STATIC -1\\r\\n\"\n    \"#include <winresrc.h>\\r\\n\"\n    \"\\r\\n\"\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define IDC_STATIC -1\n#include <WinResRc.h>\n\n\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (U.S.) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\n#ifdef _WIN32\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n#endif //_WIN32\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_MAIN_ICON           ICON                    \"directx.ico\"\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define IDC_STATIC -1\\r\\n\"\n    \"#include <winresrc.h>\\r\\n\"\n    \"\\r\\n\"\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n#endif    // English (U.S.) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2012.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texconv\", \"Texconv_Desktop_2012.vcxproj\", \"{C3A65381-8FD3-4F69-B29E-654B4B0ED136}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.Build.0 = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.Build.0 = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.Build.0 = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.ActiveCfg = Release|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2012.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texconv</ProjectName>\n    <ProjectGuid>{C3A65381-8FD3-4F69-B29E-654B4B0ED136}</ProjectGuid>\n    <RootNamespace>texconv</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v110</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2012.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2013.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texconv\", \"Texconv_Desktop_2013.vcxproj\", \"{C3A65381-8FD3-4F69-B29E-654B4B0ED136}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.Build.0 = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.Build.0 = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.Build.0 = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.ActiveCfg = Release|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2013.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texconv</ProjectName>\n    <ProjectGuid>{C3A65381-8FD3-4F69-B29E-654B4B0ED136}</ProjectGuid>\n    <RootNamespace>texconv</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n    <VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v120</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2013.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2013.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2015.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2015\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"texconv\", \"Texconv_Desktop_2015.vcxproj\", \"{C3A65381-8FD3-4F69-B29E-654B4B0ED136}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.Build.0 = Debug|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.Build.0 = Profile|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|Win32.Build.0 = Release|Win32\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.ActiveCfg = Release|x64\n\t\t{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.Build.0 = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2015.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|Win32\">\n      <Configuration>Profile</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Profile|x64\">\n      <Configuration>Profile</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectName>texconv</ProjectName>\n    <ProjectGuid>{C3A65381-8FD3-4F69-B29E-654B4B0ED136}</ProjectGuid>\n    <RootNamespace>texconv</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>Unicode</CharacterSet>\n    <PlatformToolset>v140</PlatformToolset>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\" />\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <LinkIncremental>true</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <LinkIncremental>false</LinkIncremental>\n    <GenerateManifest>true</GenerateManifest>\n    <ExecutablePath>$(ExecutablePath)</ExecutablePath>\n    <IncludePath>$(IncludePath)</IncludePath>\n    <LibraryPath>$(LibraryPath)</LibraryPath>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>Disabled</Optimization>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SubSystem>Console</SubSystem>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|Win32'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Profile|X64'\">\n    <ClCompile>\n      <WarningLevel>Level4</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <OpenMPSupport>true</OpenMPSupport>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <FloatingPointModel>Fast</FloatingPointModel>\n      <ExceptionHandling>Sync</ExceptionHandling>\n      <AdditionalIncludeDirectories>..\\DirectXTex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_CONSOLE;D3DXFX_LARGEADDRESS_HANDLE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ClCompile>\n    <Link>\n      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>\n      <AdditionalDependencies>ole32.lib;windowscodecs.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Console</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <LargeAddressAware>true</LargeAddressAware>\n      <RandomizedBaseAddress>true</RandomizedBaseAddress>\n      <DataExecutionPrevention>true</DataExecutionPrevention>\n      <TargetMachine>MachineX64</TargetMachine>\n      <UACExecutionLevel>AsInvoker</UACExecutionLevel>\n      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>\n    </Link>\n    <Manifest>\n      <EnableDPIAwareness>false</EnableDPIAwareness>\n    </Manifest>\n    <PreBuildEvent>\n      <Command>\n      </Command>\n    </PreBuildEvent>\n    <PostBuildEvent>\n      <Command>\n      </Command>\n    </PostBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\DirectXTex\\DirectXTex_Desktop_2015.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\" />\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/Texconv_Desktop_2015.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns:atg=\"http://atg.xbox.com\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{8e114980-c1a3-4ada-ad7c-83caadf5daeb}</UniqueIdentifier>\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"Texconv.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"Texconv.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "3rdParty/DirectXTex/Texconv/texconv.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: TexConv.cpp\n//\n// DirectX 11 Texture Converter\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <assert.h>\n\n#include <memory>\n#include <list>\n\n#include <wrl\\client.h>\n\n#include <dxgiformat.h>\n\n#include \"directxtex.h\"\n\nusing namespace DirectX;\nusing Microsoft::WRL::ComPtr;\n\nenum OPTIONS    // Note: dwOptions below assumes 64 or less options.\n{\n    OPT_WIDTH = 1,\n    OPT_HEIGHT,\n    OPT_MIPLEVELS,\n    OPT_FORMAT,\n    OPT_FILTER,\n    OPT_SRGBI,\n    OPT_SRGBO,\n    OPT_SRGB,\n    OPT_PREFIX,\n    OPT_SUFFIX,\n    OPT_OUTPUTDIR,\n    OPT_FILETYPE,\n    OPT_HFLIP,\n    OPT_VFLIP,\n    OPT_DDS_DWORD_ALIGN,\n    OPT_USE_DX10,\n    OPT_NOLOGO,\n    OPT_TIMING,\n    OPT_SEPALPHA,\n    OPT_TYPELESS_UNORM,\n    OPT_TYPELESS_FLOAT,\n    OPT_PREMUL_ALPHA,\n    OPT_EXPAND_LUMINANCE,\n    OPT_TA_WRAP,\n    OPT_TA_MIRROR,\n    OPT_FORCE_SINGLEPROC,\n    OPT_NOGPU,\n    OPT_FEATURE_LEVEL,\n    OPT_FIT_POWEROF2,\n    OPT_ALPHA_WEIGHT,\n    OPT_NORMAL_MAP,\n    OPT_NORMAL_MAP_AMPLITUDE,\n    OPT_COMPRESS_UNIFORM,\n    OPT_COMPRESS_MAX,\n    OPT_COMPRESS_DITHER,\n    OPT_MAX\n};\n\nstatic_assert( OPT_MAX <= 64, \"dwOptions is a DWORD64 bitfield\" );\n\nstruct SConversion\n{\n    WCHAR szSrc [MAX_PATH];\n    WCHAR szDest[MAX_PATH];\n};\n\nstruct SValue\n{\n    LPCWSTR pName;\n    DWORD dwValue;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n\nSValue g_pOptions[] = \n{\n    { L\"w\",             OPT_WIDTH     },\n    { L\"h\",             OPT_HEIGHT    },\n    { L\"m\",             OPT_MIPLEVELS },\n    { L\"f\",             OPT_FORMAT    },\n    { L\"if\",            OPT_FILTER    },\n    { L\"srgbi\",         OPT_SRGBI     },\n    { L\"srgbo\",         OPT_SRGBO     },\n    { L\"srgb\",          OPT_SRGB      },\n    { L\"px\",            OPT_PREFIX    },\n    { L\"sx\",            OPT_SUFFIX    },\n    { L\"o\",             OPT_OUTPUTDIR },\n    { L\"ft\",            OPT_FILETYPE  },\n    { L\"hflip\",         OPT_HFLIP     },\n    { L\"vflip\",         OPT_VFLIP     },\n    { L\"dword\",         OPT_DDS_DWORD_ALIGN },\n    { L\"dx10\",          OPT_USE_DX10  },\n    { L\"nologo\",        OPT_NOLOGO    },\n    { L\"timing\",        OPT_TIMING    },\n    { L\"sepalpha\",      OPT_SEPALPHA  },\n    { L\"tu\",            OPT_TYPELESS_UNORM },\n    { L\"tf\",            OPT_TYPELESS_FLOAT },\n    { L\"pmalpha\",       OPT_PREMUL_ALPHA },\n    { L\"xlum\",          OPT_EXPAND_LUMINANCE },\n    { L\"wrap\",          OPT_TA_WRAP },\n    { L\"mirror\",        OPT_TA_MIRROR },\n    { L\"singleproc\",    OPT_FORCE_SINGLEPROC },\n    { L\"nogpu\",         OPT_NOGPU     },\n    { L\"fl\",            OPT_FEATURE_LEVEL },\n    { L\"pow2\",          OPT_FIT_POWEROF2 },\n    { L\"aw\",            OPT_ALPHA_WEIGHT },\n    { L\"nmap\",          OPT_NORMAL_MAP },\n    { L\"nmapamp\",       OPT_NORMAL_MAP_AMPLITUDE },\n    { L\"bcuniform\",     OPT_COMPRESS_UNIFORM },\n    { L\"bcmax\",         OPT_COMPRESS_MAX },\n    { L\"bcdither\",      OPT_COMPRESS_DITHER },\n    { nullptr,          0             }\n};\n\n#define DEFFMT(fmt) { L#fmt, DXGI_FORMAT_ ## fmt }\n\nSValue g_pFormats[] = \n{\n    // List does not include _TYPELESS or depth/stencil formats\n    DEFFMT(R32G32B32A32_FLOAT), \n    DEFFMT(R32G32B32A32_UINT), \n    DEFFMT(R32G32B32A32_SINT), \n    DEFFMT(R32G32B32_FLOAT), \n    DEFFMT(R32G32B32_UINT), \n    DEFFMT(R32G32B32_SINT), \n    DEFFMT(R16G16B16A16_FLOAT), \n    DEFFMT(R16G16B16A16_UNORM), \n    DEFFMT(R16G16B16A16_UINT), \n    DEFFMT(R16G16B16A16_SNORM), \n    DEFFMT(R16G16B16A16_SINT), \n    DEFFMT(R32G32_FLOAT), \n    DEFFMT(R32G32_UINT), \n    DEFFMT(R32G32_SINT), \n    DEFFMT(R10G10B10A2_UNORM), \n    DEFFMT(R10G10B10A2_UINT), \n    DEFFMT(R11G11B10_FLOAT), \n    DEFFMT(R8G8B8A8_UNORM), \n    DEFFMT(R8G8B8A8_UNORM_SRGB), \n    DEFFMT(R8G8B8A8_UINT), \n    DEFFMT(R8G8B8A8_SNORM), \n    DEFFMT(R8G8B8A8_SINT), \n    DEFFMT(R16G16_FLOAT), \n    DEFFMT(R16G16_UNORM), \n    DEFFMT(R16G16_UINT), \n    DEFFMT(R16G16_SNORM), \n    DEFFMT(R16G16_SINT), \n    DEFFMT(R32_FLOAT), \n    DEFFMT(R32_UINT), \n    DEFFMT(R32_SINT), \n    DEFFMT(R8G8_UNORM), \n    DEFFMT(R8G8_UINT), \n    DEFFMT(R8G8_SNORM), \n    DEFFMT(R8G8_SINT), \n    DEFFMT(R16_FLOAT), \n    DEFFMT(R16_UNORM), \n    DEFFMT(R16_UINT), \n    DEFFMT(R16_SNORM), \n    DEFFMT(R16_SINT), \n    DEFFMT(R8_UNORM), \n    DEFFMT(R8_UINT), \n    DEFFMT(R8_SNORM), \n    DEFFMT(R8_SINT), \n    DEFFMT(A8_UNORM), \n    DEFFMT(R9G9B9E5_SHAREDEXP), \n    DEFFMT(R8G8_B8G8_UNORM), \n    DEFFMT(G8R8_G8B8_UNORM), \n    DEFFMT(BC1_UNORM), \n    DEFFMT(BC1_UNORM_SRGB), \n    DEFFMT(BC2_UNORM), \n    DEFFMT(BC2_UNORM_SRGB), \n    DEFFMT(BC3_UNORM), \n    DEFFMT(BC3_UNORM_SRGB), \n    DEFFMT(BC4_UNORM), \n    DEFFMT(BC4_SNORM), \n    DEFFMT(BC5_UNORM), \n    DEFFMT(BC5_SNORM),\n    DEFFMT(B5G6R5_UNORM),\n    DEFFMT(B5G5R5A1_UNORM),\n\n    // DXGI 1.1 formats\n    DEFFMT(B8G8R8A8_UNORM),\n    DEFFMT(B8G8R8X8_UNORM),\n    DEFFMT(R10G10B10_XR_BIAS_A2_UNORM),\n    DEFFMT(B8G8R8A8_UNORM_SRGB),\n    DEFFMT(B8G8R8X8_UNORM_SRGB),\n    DEFFMT(BC6H_UF16),\n    DEFFMT(BC6H_SF16),\n    DEFFMT(BC7_UNORM),\n    DEFFMT(BC7_UNORM_SRGB),\n\n    // DXGI 1.2 formats\n    DEFFMT(AYUV),\n    DEFFMT(Y410),\n    DEFFMT(Y416),\n    DEFFMT(YUY2),\n    DEFFMT(Y210),\n    DEFFMT(Y216),\n    // No support for legacy paletted video formats (AI44, IA44, P8, A8P8)\n    DEFFMT(B4G4R4A4_UNORM),\n\n    { nullptr, DXGI_FORMAT_UNKNOWN }\n};\n\nSValue g_pReadOnlyFormats[] = \n{\n    DEFFMT(R32G32B32A32_TYPELESS), \n    DEFFMT(R32G32B32_TYPELESS),\n    DEFFMT(R16G16B16A16_TYPELESS),\n    DEFFMT(R32G32_TYPELESS),\n    DEFFMT(R32G8X24_TYPELESS),\n    DEFFMT(D32_FLOAT_S8X24_UINT),\n    DEFFMT(R32_FLOAT_X8X24_TYPELESS),\n    DEFFMT(X32_TYPELESS_G8X24_UINT),\n    DEFFMT(R10G10B10A2_TYPELESS),\n    DEFFMT(R8G8B8A8_TYPELESS),\n    DEFFMT(R16G16_TYPELESS),\n    DEFFMT(R32_TYPELESS),\n    DEFFMT(D32_FLOAT),\n    DEFFMT(R24G8_TYPELESS),\n    DEFFMT(D24_UNORM_S8_UINT),\n    DEFFMT(R24_UNORM_X8_TYPELESS),\n    DEFFMT(X24_TYPELESS_G8_UINT),\n    DEFFMT(R8G8_TYPELESS),\n    DEFFMT(R16_TYPELESS),\n    DEFFMT(R8_TYPELESS),\n    DEFFMT(BC1_TYPELESS),\n    DEFFMT(BC2_TYPELESS),\n    DEFFMT(BC3_TYPELESS),\n    DEFFMT(BC4_TYPELESS),\n    DEFFMT(BC5_TYPELESS),\n\n    // DXGI 1.1 formats\n    DEFFMT(B8G8R8A8_TYPELESS),\n    DEFFMT(B8G8R8X8_TYPELESS),\n    DEFFMT(BC6H_TYPELESS),\n    DEFFMT(BC7_TYPELESS),\n\n    // DXGI 1.2 formats\n    DEFFMT(NV12),\n    DEFFMT(P010),\n    DEFFMT(P016),\n    DEFFMT(420_OPAQUE),\n    DEFFMT(NV11),\n\n    { nullptr, DXGI_FORMAT_UNKNOWN }\n};\n\nSValue g_pFilters[] = \n{\n    { L\"POINT\",                     TEX_FILTER_POINT },\n    { L\"LINEAR\",                    TEX_FILTER_LINEAR },\n    { L\"CUBIC\",                     TEX_FILTER_CUBIC },\n    { L\"FANT\",                      TEX_FILTER_FANT },\n    { L\"BOX\",                       TEX_FILTER_BOX },\n    { L\"TRIANGLE\",                  TEX_FILTER_TRIANGLE },\n    { L\"POINT_DITHER\",              TEX_FILTER_POINT  | TEX_FILTER_DITHER },\n    { L\"LINEAR_DITHER\",             TEX_FILTER_LINEAR | TEX_FILTER_DITHER },\n    { L\"CUBIC_DITHER\",              TEX_FILTER_CUBIC  | TEX_FILTER_DITHER },\n    { L\"FANT_DITHER\",               TEX_FILTER_FANT   | TEX_FILTER_DITHER },\n    { L\"BOX_DITHER\",                TEX_FILTER_BOX    | TEX_FILTER_DITHER },\n    { L\"TRIANGLE_DITHER\",           TEX_FILTER_TRIANGLE | TEX_FILTER_DITHER },\n    { L\"POINT_DITHER_DIFFUSION\",    TEX_FILTER_POINT  | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"LINEAR_DITHER_DIFFUSION\",   TEX_FILTER_LINEAR | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"CUBIC_DITHER_DIFFUSION\",    TEX_FILTER_CUBIC  | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"FANT_DITHER_DIFFUSION\",     TEX_FILTER_FANT   | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"BOX_DITHER_DIFFUSION\",      TEX_FILTER_BOX    | TEX_FILTER_DITHER_DIFFUSION },\n    { L\"TRIANGLE_DITHER_DIFFUSION\", TEX_FILTER_TRIANGLE | TEX_FILTER_DITHER_DIFFUSION },\n    { nullptr,                      TEX_FILTER_DEFAULT                              }\n};\n\n#define CODEC_DDS 0xFFFF0001 \n#define CODEC_TGA 0xFFFF0002\n\nSValue g_pSaveFileTypes[] =     // valid formats to write to\n{\n    { L\"BMP\",           WIC_CODEC_BMP  },\n    { L\"JPG\",           WIC_CODEC_JPEG },\n    { L\"JPEG\",          WIC_CODEC_JPEG },\n    { L\"PNG\",           WIC_CODEC_PNG  },\n    { L\"DDS\",           CODEC_DDS      },\n    { L\"TGA\",           CODEC_TGA      },\n    { L\"TIF\",           WIC_CODEC_TIFF },\n    { L\"TIFF\",          WIC_CODEC_TIFF },\n    { L\"WDP\",           WIC_CODEC_WMP  },\n    { L\"HDP\",           WIC_CODEC_WMP  },\n    { nullptr,          CODEC_DDS      }\n};\n\nSValue g_pFeatureLevels[] =     // valid feature levels for -fl for maximimum size\n{\n    { L\"9.1\",           2048 },\n    { L\"9.2\",           2048 },\n    { L\"9.3\",           4096 },\n    { L\"10.0\",          8192 },\n    { L\"10.1\",          8192 },\n    { L\"11.0\",          16384 },\n    { L\"11.1\",          16384 },\n    { nullptr,          0 },\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n\n#pragma warning( disable : 4616 6211 )\n\ninline static bool ispow2(size_t x)\n{\n    return ((x != 0) && !(x & (x - 1)));\n}\n\n#pragma prefast(disable : 26018, \"Only used with static internal arrays\")\n\nDWORD LookupByName(const WCHAR *pName, const SValue *pArray)\n{\n    while(pArray->pName)\n    {\n        if(!_wcsicmp(pName, pArray->pName))\n            return pArray->dwValue;\n\n        pArray++;\n    }\n\n    return 0;\n}\n\nconst WCHAR* LookupByValue(DWORD pValue, const SValue *pArray)\n{\n    while(pArray->pName)\n    {\n        if(pValue == pArray->dwValue)\n            return pArray->pName;\n\n        pArray++;\n    }\n\n    return L\"\";\n}\n\nvoid PrintFormat(DXGI_FORMAT Format)\n{\n    for(SValue *pFormat = g_pFormats; pFormat->pName; pFormat++)\n    {\n        if((DXGI_FORMAT) pFormat->dwValue == Format)\n        {\n            wprintf( pFormat->pName );\n            return;\n        }\n    }\n\n    for(SValue *pFormat = g_pReadOnlyFormats; pFormat->pName; pFormat++)\n    {\n        if((DXGI_FORMAT) pFormat->dwValue == Format)\n        {\n            wprintf( pFormat->pName );\n            return;\n        }\n    }\n\n    wprintf( L\"*UNKNOWN*\" );\n}\n\nvoid PrintInfo( const TexMetadata& info )\n{\n    wprintf( L\" (%Iux%Iu\", info.width, info.height);\n\n    if ( TEX_DIMENSION_TEXTURE3D == info.dimension )\n        wprintf( L\"x%Iu\", info.depth);\n\n    if ( info.mipLevels > 1 )\n        wprintf( L\",%Iu\", info.mipLevels);\n\n    if ( info.arraySize > 1 )\n        wprintf( L\",%Iu\", info.arraySize);\n\n    wprintf( L\" \");\n    PrintFormat( info.format );\n\n    switch ( info.dimension )\n    {\n    case TEX_DIMENSION_TEXTURE1D:\n        wprintf( (info.arraySize > 1) ? L\" 1DArray\" : L\" 1D\" );\n        break;\n\n    case TEX_DIMENSION_TEXTURE2D:\n        if ( info.IsCubemap() )\n        {\n            wprintf( (info.arraySize > 6) ? L\" CubeArray\" : L\" Cube\" );\n        }\n        else\n        {\n            wprintf( (info.arraySize > 1) ? L\" 2DArray\" : L\" 2D\" );\n        }\n        break;\n\n    case TEX_DIMENSION_TEXTURE3D:\n        wprintf( L\" 3D\");\n        break;\n    }\n\n    wprintf( L\")\");\n}\n\n\nvoid PrintList(size_t cch, SValue *pValue)\n{\n    while(pValue->pName)\n    {\n        size_t cchName = wcslen(pValue->pName);\n        \n        if(cch + cchName + 2>= 80)\n        {\n            wprintf( L\"\\n      \");\n            cch = 6;\n        }\n\n        wprintf( L\"%ls \", pValue->pName );\n        cch += cchName + 2;\n        pValue++;\n    }\n\n    wprintf( L\"\\n\");\n}\n\n\nvoid PrintLogo()\n{\n    wprintf( L\"Microsoft (R) DirectX 11 Texture Converter (DirectXTex version)\\n\");\n    wprintf( L\"Copyright (C) Microsoft Corp. All rights reserved.\\n\");\n#ifdef _DEBUG\n    wprintf( L\"*** Debug build ***\\n\");\n#endif\n    wprintf( L\"\\n\");\n}\n\n\nvoid PrintUsage()\n{\n    PrintLogo();\n\n    wprintf( L\"Usage: texconv <options> <files>\\n\");\n    wprintf( L\"\\n\");\n    wprintf( L\"   -w <n>              width\\n\");\n    wprintf( L\"   -h <n>              height\\n\");\n    wprintf( L\"   -m <n>              miplevels\\n\");\n    wprintf( L\"   -f <format>         format\\n\");\n    wprintf( L\"   -if <filter>        image filtering\\n\");\n    wprintf( L\"   -srgb{i|o}          sRGB {input, output}\\n\");\n    wprintf( L\"   -px <string>        name prefix\\n\");\n    wprintf( L\"   -sx <string>        name suffix\\n\");\n    wprintf( L\"   -o <directory>      output directory\\n\");\n    wprintf( L\"   -ft <filetype>      output file type\\n\");\n    wprintf( L\"   -hflip              horizonal flip of source image\\n\");\n    wprintf( L\"   -vflip              vertical flip of source image\\n\");\n    wprintf( L\"   -sepalpha           resize/generate mips alpha channel separately\\n\");\n    wprintf( L\"                       from color channels\\n\");\n    wprintf( L\"   -wrap, -mirror      texture addressing mode (wrap, mirror, or clamp)\\n\");\n    wprintf( L\"   -pmalpha            convert final texture to use premultiplied alpha\\n\");\n    wprintf( L\"   -pow2               resize to fit a power-of-2, respecting aspect ratio\\n\" );\n    wprintf (L\"   -nmap <options>     converts height-map to normal-map\\n\"\n             L\"                       options must be one or more of\\n\"\n             L\"                          r, g, b, a, l, m, u, v, i, o\\n\" );\n    wprintf (L\"   -nmapamp <weight>   normal map amplitude (defaults to 1.0)\\n\" );\n    wprintf( L\"   -fl <feature-level> Set maximum feature level target (defaults to 11.0)\\n\");\n    wprintf( L\"\\n                       (DDS input only)\\n\");\n    wprintf( L\"   -t{u|f}             TYPELESS format is treated as UNORM or FLOAT\\n\");\n    wprintf( L\"   -dword              Use DWORD instead of BYTE alignment\\n\");\n    wprintf( L\"   -xlum               expand legacy L8, L16, and A8P8 formats\\n\");\n    wprintf( L\"\\n                       (DDS output only)\\n\");\n    wprintf( L\"   -dx10               Force use of 'DX10' extended header\\n\");\n    wprintf( L\"\\n   -nologo             suppress copyright message\\n\");\n    wprintf( L\"   -timing             Display elapsed processing time\\n\\n\");\n#ifdef _OPENMP\n    wprintf( L\"   -singleproc         Do not use multi-threaded compression\\n\");\n#endif\n    wprintf( L\"   -nogpu              Do not use DirectCompute-based codecs\\n\");\n    wprintf( L\"   -bcuniform          Use uniform rather than perceptual weighting for BC1-3\\n\");\n    wprintf( L\"   -bcdither           Use dithering for BC1-3\\n\");\n    wprintf( L\"   -bcmax              Use exchaustive compression (BC7 only)\\n\");\n    wprintf( L\"   -aw <weight>        BC7 GPU compressor weighting for alpha error metric\\n\"\n             L\"                       (defaults to 1.0)\\n\" );\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <format>: \");\n    PrintList(13, g_pFormats);\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <filter>: \");\n    PrintList(13, g_pFilters);\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <filetype>: \");\n    PrintList(15, g_pSaveFileTypes);\n\n    wprintf( L\"\\n\");\n    wprintf( L\"   <feature-level>: \");\n    PrintList(13, g_pFeatureLevels);\n\n}\n\n_Success_(return != false)\nbool CreateDevice( _Outptr_ ID3D11Device** pDevice )\n{\n    if ( !pDevice )\n        return false;\n\n    *pDevice  = nullptr;\n\n    static PFN_D3D11_CREATE_DEVICE s_DynamicD3D11CreateDevice = nullptr;\n   \n    if ( !s_DynamicD3D11CreateDevice )\n    {            \n        HMODULE hModD3D11 = LoadLibrary( L\"d3d11.dll\" );\n        if ( !hModD3D11 )\n            return false;\n\n        s_DynamicD3D11CreateDevice = reinterpret_cast<PFN_D3D11_CREATE_DEVICE>( reinterpret_cast<void*>( GetProcAddress( hModD3D11, \"D3D11CreateDevice\" ) ) ); \n        if ( !s_DynamicD3D11CreateDevice )\n            return false;\n    }\n\n    D3D_FEATURE_LEVEL featureLevels[] =\n    {\n        D3D_FEATURE_LEVEL_11_0,\n        D3D_FEATURE_LEVEL_10_1,\n        D3D_FEATURE_LEVEL_10_0,\n    };\n\n    UINT createDeviceFlags = 0;\n#ifdef _DEBUG\n    createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;\n#endif\n\n    D3D_FEATURE_LEVEL fl;\n    HRESULT hr = s_DynamicD3D11CreateDevice( nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevels, _countof(featureLevels), \n                                             D3D11_SDK_VERSION, pDevice, &fl, nullptr );\n    if ( SUCCEEDED(hr) )\n    {\n        if ( fl < D3D_FEATURE_LEVEL_11_0 )\n        {\n            D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts;\n            hr = (*pDevice)->CheckFeatureSupport( D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) );\n            if ( FAILED(hr) )\n                memset( &hwopts, 0, sizeof(hwopts) );\n\n            if ( !hwopts.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x )\n            {\n                if ( *pDevice )\n                {\n                    (*pDevice)->Release();\n                    *pDevice = nullptr;\n                }\n                hr = HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n            }\n        }\n    }\n\n    if ( SUCCEEDED(hr) )\n    {\n        ComPtr<IDXGIDevice> dxgiDevice;\n        hr = (*pDevice)->QueryInterface( __uuidof( IDXGIDevice ), reinterpret_cast< void** >( dxgiDevice.GetAddressOf() ) );\n        if ( SUCCEEDED(hr) )\n        {\n            ComPtr<IDXGIAdapter> pAdapter;\n            hr = dxgiDevice->GetAdapter( pAdapter.GetAddressOf() );\n            if ( SUCCEEDED(hr) )\n            {\n                DXGI_ADAPTER_DESC desc;\n                hr = pAdapter->GetDesc( &desc );\n                if ( SUCCEEDED(hr) )\n                {\n                    wprintf( L\"\\n[Using DirectCompute on \\\"%ls\\\"]\\n\", desc.Description );\n                }\n            }\n        }\n\n        return true;\n    }\n    else\n        return false;\n}\n\nvoid FitPowerOf2( size_t origx, size_t origy, size_t& targetx, size_t& targety, size_t maxsize )\n{\n    float origAR = float(origx) / float(origy);\n\n    if ( origx > origy )\n    {\n        size_t x;\n        for( x = maxsize; x > 1; x >>= 1 ) { if ( x <= targetx ) break; };\n        targetx = x;\n\n        float bestScore = FLT_MAX;\n        for( size_t y = maxsize; y > 0; y >>= 1 )\n        {\n            float score = fabs( (float(x) / float(y)) - origAR );\n            if ( score < bestScore )\n            {\n                bestScore = score;\n                targety = y;\n            }\n        }\n    }\n    else\n    {\n        size_t y;\n        for( y = maxsize; y > 1; y >>= 1 ) { if ( y <= targety ) break; };\n        targety = y;\n\n        float bestScore = FLT_MAX;\n        for( size_t x = maxsize; x > 0; x >>= 1 )\n        {\n            float score = fabs( (float(x) / float(y)) - origAR );\n            if ( score < bestScore )\n            {\n                bestScore = score;\n                targetx = x;\n            }\n        }\n    }\n}\n\n\n//--------------------------------------------------------------------------------------\n// Entry-point\n//--------------------------------------------------------------------------------------\n#pragma prefast(disable : 28198, \"Command-line tool, frees all memory on exit\")\n\nint __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])\n{\n    // Parameters and defaults\n    size_t width = 0;\n    size_t height = 0; \n    size_t mipLevels = 0;\n    DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN;\n    DWORD dwFilter = TEX_FILTER_DEFAULT;\n    DWORD dwSRGB = 0;\n    DWORD dwCompress = TEX_COMPRESS_DEFAULT;\n    DWORD dwFilterOpts = 0;\n    DWORD FileType = CODEC_DDS;\n    DWORD maxSize = 16384;\n    float alphaWeight = 1.f;\n    DWORD dwNormalMap = 0;\n    float nmapAmplitude = 1.f;\n\n    WCHAR szPrefix   [MAX_PATH];\n    WCHAR szSuffix   [MAX_PATH];\n    WCHAR szOutputDir[MAX_PATH];\n\n    szPrefix[0]    = 0;\n    szSuffix[0]    = 0;\n    szOutputDir[0] = 0;\n\n    // Initialize COM (needed for WIC)\n    HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);\n    if( FAILED(hr) )\n    {\n        wprintf( L\"Failed to initialize COM (%08X)\\n\", hr);\n        return 1;\n    }\n\n    // Process command line\n    DWORD64 dwOptions = 0;\n    std::list<SConversion> conversion;\n\n    for(int iArg = 1; iArg < argc; iArg++)\n    {\n        PWSTR pArg = argv[iArg];\n\n        if(('-' == pArg[0]) || ('/' == pArg[0]))\n        {\n            pArg++;\n            PWSTR pValue;\n\n            for(pValue = pArg; *pValue && (':' != *pValue); pValue++);\n\n            if(*pValue)\n                *pValue++ = 0;\n\n            DWORD dwOption = LookupByName(pArg, g_pOptions);\n\n            if(!dwOption || (dwOptions & (DWORD64(1) << dwOption)))\n            {\n                PrintUsage();\n                return 1;\n            }\n\n            dwOptions |= (DWORD64(1) << dwOption);\n\n            if( (OPT_NOLOGO != dwOption) && (OPT_TIMING != dwOption) && (OPT_TYPELESS_UNORM != dwOption) && (OPT_TYPELESS_FLOAT != dwOption)\n                && (OPT_SEPALPHA != dwOption) && (OPT_PREMUL_ALPHA != dwOption) && (OPT_EXPAND_LUMINANCE != dwOption)\n                && (OPT_TA_WRAP != dwOption) && (OPT_TA_MIRROR != dwOption)\n                && (OPT_FORCE_SINGLEPROC != dwOption) && (OPT_NOGPU != dwOption) && (OPT_FIT_POWEROF2 != dwOption)\n                && (OPT_SRGB != dwOption) && (OPT_SRGBI != dwOption) && (OPT_SRGBO != dwOption)\n                && (OPT_HFLIP != dwOption) && (OPT_VFLIP != dwOption)\n                && (OPT_COMPRESS_UNIFORM != dwOption) && (OPT_COMPRESS_MAX != dwOption) && (OPT_COMPRESS_DITHER != dwOption)\n                && (OPT_DDS_DWORD_ALIGN != dwOption) && (OPT_USE_DX10 != dwOption) )\n            {\n                if(!*pValue)\n                {\n                    if((iArg + 1 >= argc))\n                    {\n                        PrintUsage();\n                        return 1;\n                    }\n\n                    iArg++;\n                    pValue = argv[iArg];\n                }\n            }\n\n            switch(dwOption)\n            {\n            case OPT_WIDTH:\n                if (swscanf_s(pValue, L\"%Iu\", &width) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -w (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_HEIGHT:\n                if (swscanf_s(pValue, L\"%Iu\", &height) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -h (%ls)\\n\", pValue);\n                    printf(\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_MIPLEVELS:\n                if (swscanf_s(pValue, L\"%Iu\", &mipLevels) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -m (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_FORMAT:\n                format = (DXGI_FORMAT) LookupByName(pValue, g_pFormats);\n                if ( !format )\n                {\n                    wprintf( L\"Invalid value specified with -f (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_FILTER:\n                dwFilter = LookupByName(pValue, g_pFilters);\n                if ( !dwFilter )\n                {\n                    wprintf( L\"Invalid value specified with -if (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_SRGBI:\n                dwSRGB |= TEX_FILTER_SRGB_IN;\n                break;\n\n            case OPT_SRGBO:\n                dwSRGB |= TEX_FILTER_SRGB_OUT;\n                break;\n\n            case OPT_SRGB:\n                dwSRGB |= TEX_FILTER_SRGB;\n                break;\n\n            case OPT_SEPALPHA:\n                dwFilterOpts |= TEX_FILTER_SEPARATE_ALPHA;\n                break;\n\n            case OPT_PREFIX:\n                wcscpy_s(szPrefix, MAX_PATH, pValue);\n                break;\n\n            case OPT_SUFFIX:\n                wcscpy_s(szSuffix, MAX_PATH, pValue);\n                break;\n\n            case OPT_OUTPUTDIR:\n                wcscpy_s(szOutputDir, MAX_PATH, pValue);\n                break;\n\n            case OPT_FILETYPE:\n                FileType = LookupByName(pValue, g_pSaveFileTypes);\n                if ( !FileType )\n                {\n                    wprintf( L\"Invalid value specified with -ft (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_TA_WRAP:\n                if ( dwFilterOpts & TEX_FILTER_MIRROR )\n                {\n                    wprintf( L\"Can't use -wrap and -mirror at same time\\n\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                dwFilterOpts |= TEX_FILTER_WRAP;\n                break;\n\n            case OPT_TA_MIRROR:\n                if ( dwFilterOpts & TEX_FILTER_WRAP )\n                {\n                    wprintf( L\"Can't use -wrap and -mirror at same time\\n\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                dwFilterOpts |= TEX_FILTER_MIRROR;\n                break;\n\n            case OPT_NORMAL_MAP:\n                {\n                    dwNormalMap = 0;\n\n                    if ( wcschr( pValue, L'l' ) )\n                    {\n                        dwNormalMap |= CNMAP_CHANNEL_LUMINANCE;\n                    }\n                    else if ( wcschr( pValue, L'r' ) )\n                    {\n                        dwNormalMap |= CNMAP_CHANNEL_RED;\n                    }\n                    else if ( wcschr( pValue, L'g' ) )\n                    {\n                        dwNormalMap |= CNMAP_CHANNEL_GREEN;\n                    }\n                    else if ( wcschr( pValue, L'b' ) )\n                    {\n                        dwNormalMap |= CNMAP_CHANNEL_BLUE;\n                    }\n                    else if ( wcschr( pValue, L'a' ) )\n                    {\n                        dwNormalMap |= CNMAP_CHANNEL_ALPHA;\n                    }\n                    else\n                    {\n                        wprintf( L\"Invalid value specified for -nmap (%ls), missing l, r, g, b, or a\\n\\n\", pValue );\n                        PrintUsage();\n                        return 1;                        \n                    }\n\n                    if ( wcschr( pValue, L'm' ) )\n                    {\n                        dwNormalMap |= CNMAP_MIRROR;\n                    }\n                    else\n                    {\n                        if ( wcschr( pValue, L'u' ) )\n                        {\n                            dwNormalMap |= CNMAP_MIRROR_U;\n                        }\n                        if ( wcschr( pValue, L'v' ) )\n                        {\n                            dwNormalMap |= CNMAP_MIRROR_V;\n                        }\n                    }\n\n                    if ( wcschr( pValue, L'i' ) )\n                    {\n                        dwNormalMap |= CNMAP_INVERT_SIGN;\n                    }\n\n                    if ( wcschr( pValue, L'o' ) )\n                    {\n                        dwNormalMap |= CNMAP_COMPUTE_OCCLUSION;\n                    }   \n                }\n                break;\n\n            case OPT_NORMAL_MAP_AMPLITUDE:\n                if ( !dwNormalMap )\n                {\n                    wprintf( L\"-nmapamp requires -nmap\\n\\n\" );\n                    PrintUsage();\n                    return 1;\n                }\n                else if (swscanf_s(pValue, L\"%f\", &nmapAmplitude) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -nmapamp (%ls)\\n\\n\", pValue);\n                    PrintUsage();\n                    return 1;\n                }\n                else if ( nmapAmplitude < 0.f )\n                {\n                    wprintf( L\"Normal map amplitude must be positive (%ls)\\n\\n\", pValue);\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_FEATURE_LEVEL:\n                maxSize = LookupByName( pValue, g_pFeatureLevels );\n                if ( !maxSize )\n                {\n                    wprintf( L\"Invalid value specified with -fl (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                break;\n\n            case OPT_ALPHA_WEIGHT:\n                if (swscanf_s(pValue, L\"%f\", &alphaWeight) != 1)\n                {\n                    wprintf( L\"Invalid value specified with -aw (%ls)\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    PrintUsage();\n                    return 1;\n                }\n                else if ( alphaWeight < 0.f )\n                {\n                    wprintf( L\"-aw (%ls) parameter must be positive\\n\", pValue);\n                    wprintf( L\"\\n\");\n                    return 1;\n                }\n                break;\n\n            case OPT_COMPRESS_UNIFORM:\n                dwCompress |= TEX_COMPRESS_UNIFORM;\n                break;\n\n            case OPT_COMPRESS_MAX:\n                dwCompress |= TEX_COMPRESS_BC7_USE_3SUBSETS;\n                break;\n\n            case OPT_COMPRESS_DITHER:\n                dwCompress |= TEX_COMPRESS_DITHER;\n                break;\n            }\n        }\n        else\n        {\n            SConversion conv;\n            wcscpy_s(conv.szSrc, MAX_PATH, pArg);\n\n            conv.szDest[0] = 0;\n\n            conversion.push_back(conv);\n        }\n    }\n\n    if(conversion.empty())\n    {\n        PrintUsage();\n        return 0;\n    }\n\n    if(~dwOptions & (DWORD64(1) << OPT_NOLOGO))\n        PrintLogo();\n\n    // Work out out filename prefix and suffix\n    if(szOutputDir[0] && (L'\\\\' != szOutputDir[wcslen(szOutputDir) - 1]))\n        wcscat_s( szOutputDir, MAX_PATH, L\"\\\\\" );\n\n    if(szPrefix[0])\n        wcscat_s(szOutputDir, MAX_PATH, szPrefix);\n\n    wcscpy_s(szPrefix, MAX_PATH, szOutputDir);\n\n    const WCHAR* fileTypeName = LookupByValue(FileType, g_pSaveFileTypes);\n\n    if (fileTypeName)\n    {\n        wcscat_s(szSuffix, MAX_PATH, L\".\");\n        wcscat_s(szSuffix, MAX_PATH, fileTypeName);\n    }\n    else\n    {\n        wcscat_s(szSuffix, MAX_PATH, L\".unknown\");\n    }\n\n    if (FileType != CODEC_DDS)\n    {\n        mipLevels = 1;\n    }\n\n    LARGE_INTEGER qpcFreq;\n    if ( !QueryPerformanceFrequency( &qpcFreq ) )\n    {\n        qpcFreq.QuadPart = 0;\n    }\n\n\n    LARGE_INTEGER qpcStart;\n    if ( !QueryPerformanceCounter( &qpcStart ) )\n    {\n        qpcStart.QuadPart = 0;\n    }\n\n    // Convert images\n    bool nonpow2warn = false;\n    bool non4bc = false;\n    ComPtr<ID3D11Device> pDevice;\n\n    for( auto pConv = conversion.begin(); pConv != conversion.end(); ++pConv )\n    {\n        if ( pConv != conversion.begin() )\n            wprintf( L\"\\n\");\n\n        // Load source image\n        wprintf( L\"reading %ls\", pConv->szSrc );\n        fflush(stdout);\n\n        WCHAR ext[_MAX_EXT];\n        WCHAR fname[_MAX_FNAME];\n        _wsplitpath_s( pConv->szSrc, nullptr, 0, nullptr, 0, fname, _MAX_FNAME, ext, _MAX_EXT );\n\n        TexMetadata info;\n        std::unique_ptr<ScratchImage> image( new (std::nothrow) ScratchImage );\n\n        if ( !image )\n        {\n            wprintf( L\" ERROR: Memory allocation failed\\n\" );\n            return 1;\n        }\n\n        if ( _wcsicmp( ext, L\".dds\" ) == 0 )\n        {\n            DWORD ddsFlags = DDS_FLAGS_NONE;\n            if ( dwOptions & (DWORD64(1) << OPT_DDS_DWORD_ALIGN) )\n                ddsFlags |= DDS_FLAGS_LEGACY_DWORD;\n            if ( dwOptions & (DWORD64(1) << OPT_EXPAND_LUMINANCE) )\n                ddsFlags |= DDS_FLAGS_EXPAND_LUMINANCE;\n\n            hr = LoadFromDDSFile( pConv->szSrc, ddsFlags, &info, *image );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                continue;\n            }\n\n            if ( IsTypeless( info.format ) )\n            {\n                if ( dwOptions & (DWORD64(1) << OPT_TYPELESS_UNORM) )\n                {\n                    info.format = MakeTypelessUNORM( info.format );\n                }\n                else if ( dwOptions & (DWORD64(1) << OPT_TYPELESS_FLOAT) )\n                {\n                    info.format = MakeTypelessFLOAT( info.format );\n                }\n\n                if ( IsTypeless( info.format ) )\n                {\n                    wprintf( L\" FAILED due to Typeless format %d\\n\", info.format );\n                    continue;\n                }\n\n                image->OverrideFormat( info.format );\n            }\n        }\n        else if ( _wcsicmp( ext, L\".tga\" ) == 0 )\n        {\n            hr = LoadFromTGAFile( pConv->szSrc, &info, *image );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                continue;\n            }\n        }\n        else\n        {\n            // WIC shares the same filter values for mode and dither\n            static_assert( WIC_FLAGS_DITHER == TEX_FILTER_DITHER, \"WIC_FLAGS_* & TEX_FILTER_* should match\" );\n            static_assert( WIC_FLAGS_DITHER_DIFFUSION == TEX_FILTER_DITHER_DIFFUSION, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_POINT == TEX_FILTER_POINT, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_LINEAR == TEX_FILTER_LINEAR, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_CUBIC == TEX_FILTER_CUBIC, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n            static_assert( WIC_FLAGS_FILTER_FANT == TEX_FILTER_FANT, \"WIC_FLAGS_* & TEX_FILTER_* should match\"  );\n\n            DWORD wicFlags = dwFilter;\n            if (FileType == CODEC_DDS)\n                wicFlags |= WIC_FLAGS_ALL_FRAMES;\n\n            hr = LoadFromWICFile( pConv->szSrc, wicFlags, &info, *image );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                continue;\n            }\n        }\n\n        PrintInfo( info );\n\n        size_t tMips = ( !mipLevels && info.mipLevels > 1 ) ? info.mipLevels : mipLevels;\n\n        bool sizewarn = false;\n\n        size_t twidth = ( !width ) ? info.width : width;\n        if ( twidth > maxSize )\n        {\n            if ( !width )\n                twidth = maxSize;\n            else\n                sizewarn = true;\n        }\n\n        size_t theight = ( !height ) ? info.height : height;\n        if ( theight > maxSize )\n        {\n            if ( !height )\n                theight = maxSize;\n            else\n                sizewarn = true;\n        }\n\n        if ( sizewarn )\n        {\n            wprintf( L\"\\nWARNING: Target size exceeds maximum size for feature level (%u)\\n\", maxSize );\n        }\n\n        if (dwOptions & (DWORD64(1) << OPT_FIT_POWEROF2))\n        {\n            FitPowerOf2( info.width, info.height, twidth, theight, maxSize );\n        }\n\n        // Convert texture\n        wprintf( L\" as\");\n        fflush(stdout);\n\n        // --- Planar ------------------------------------------------------------------\n        if ( IsPlanar( info.format ) )\n        {\n            auto img = image->GetImage(0,0,0);\n            assert( img );\n            size_t nimg = image->GetImageCount();\n\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = ConvertToSinglePlane( img, nimg, info, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [converttosingeplane] (%x)\\n\", hr);\n                continue;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n        }\n\n        DXGI_FORMAT tformat = ( format == DXGI_FORMAT_UNKNOWN ) ? info.format : format;\n\n        // --- Decompress --------------------------------------------------------------\n        std::unique_ptr<ScratchImage> cimage;\n        if ( IsCompressed( info.format ) )\n        {\n            auto img = image->GetImage(0,0,0);\n            assert( img );\n            size_t nimg = image->GetImageCount();\n\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Decompress( img, nimg, info, DXGI_FORMAT_UNKNOWN /* picks good default */, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [decompress] (%x)\\n\", hr);\n                continue;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            if ( FileType == CODEC_DDS )\n            {\n                // Keep the original compressed image in case we can reuse it\n                cimage.reset( image.release() );\n                image.reset( timage.release() );\n            }\n            else\n            {\n                image.swap( timage );\n            }\n        }\n\n        // --- Flip/Rotate -------------------------------------------------------------\n        if ( dwOptions & ( (DWORD64(1) << OPT_HFLIP) | (DWORD64(1) << OPT_VFLIP) ) )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            DWORD dwFlags = 0;\n\n            if ( dwOptions & (DWORD64(1) << OPT_HFLIP) )\n                dwFlags |= TEX_FR_FLIP_HORIZONTAL;\n\n            if ( dwOptions & (DWORD64(1) << OPT_VFLIP) )\n                dwFlags |= TEX_FR_FLIP_VERTICAL;\n\n            assert( dwFlags != 0 );\n\n            hr = FlipRotate( image->GetImages(), image->GetImageCount(), image->GetMetadata(), dwFlags, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [fliprotate] (%x)\\n\", hr);\n                return 1;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n\n            assert( tinfo.width == twidth && tinfo.height == theight );\n\n            info.width = tinfo.width;\n            info.height = tinfo.height;\n\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.format == tinfo.format );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n            cimage.reset();\n        }\n\n        // --- Resize ------------------------------------------------------------------\n        if ( info.width != twidth || info.height != theight )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Resize( image->GetImages(), image->GetImageCount(), image->GetMetadata(), twidth, theight, dwFilter | dwFilterOpts, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [resize] (%x)\\n\", hr);\n                return 1;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n\n            assert( tinfo.width == twidth && tinfo.height == theight && tinfo.mipLevels == 1 );\n            info.width = tinfo.width;\n            info.height = tinfo.height;\n            info.mipLevels = 1;\n\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.format == tinfo.format );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n            cimage.reset();\n        }\n\n        // --- Convert -----------------------------------------------------------------\n        if ( dwOptions & (DWORD64(1) << OPT_NORMAL_MAP) )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            DXGI_FORMAT nmfmt = tformat;\n            if ( IsCompressed( tformat ) )\n            {\n                nmfmt = (dwNormalMap & CNMAP_COMPUTE_OCCLUSION) ? DXGI_FORMAT_R32G32B32A32_FLOAT : DXGI_FORMAT_R32G32B32_FLOAT;\n            }\n\n            hr = ComputeNormalMap( image->GetImages(), image->GetImageCount(), image->GetMetadata(), dwNormalMap, nmapAmplitude, nmfmt, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [normalmap] (%x)\\n\", hr);\n                return 1;\n            }            \n\n            auto& tinfo = timage->GetMetadata();\n\n            assert( tinfo.format == nmfmt );\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n            cimage.reset();\n        }\n        else if ( info.format != tformat && !IsCompressed( tformat ) )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            hr = Convert( image->GetImages(), image->GetImageCount(), image->GetMetadata(), tformat, dwFilter | dwFilterOpts | dwSRGB, 0.5f, *timage );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [convert] (%x)\\n\", hr);\n                return 1;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n\n            assert( tinfo.format == tformat );\n            info.format = tinfo.format;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n            cimage.reset();\n        }\n\n        // --- Generate mips -----------------------------------------------------------\n        if ( !ispow2(info.width) || !ispow2(info.height) || !ispow2(info.depth) )\n        {\n            if ( info.dimension == TEX_DIMENSION_TEXTURE3D )\n            {\n                if ( !tMips )\n                {\n                    tMips = 1;\n                }\n                else\n                {\n                    wprintf( L\" ERROR: Cannot generate mips for non-power-of-2 volume textures\\n\" );\n                    return 1;\n                }\n            }\n            else if ( !tMips || info.mipLevels != 1 )\n            {\n                nonpow2warn = true;\n            }\n        }\n\n        if ( (!tMips || info.mipLevels != tMips) && ( info.mipLevels != 1 ) )\n        {\n            // Mips generation only works on a single base image, so strip off existing mip levels\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            TexMetadata mdata = info;\n            mdata.mipLevels = 1;\n            hr = timage->Initialize( mdata );\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [copy to single level] (%x)\\n\", hr);\n                return 1;\n            }\n\n            if ( info.dimension == TEX_DIMENSION_TEXTURE3D )\n            {\n                for( size_t d = 0; d < info.depth; ++d )\n                {\n                    hr = CopyRectangle( *image->GetImage( 0, 0, d ), Rect( 0, 0, info.width, info.height ),\n                                        *timage->GetImage( 0, 0, d ), TEX_FILTER_DEFAULT, 0, 0 );\n                    if ( FAILED(hr) )\n                    {\n                        wprintf( L\" FAILED [copy to single level] (%x)\\n\", hr);\n                        return 1;\n                    }\n                }\n            }\n            else\n            {\n                for( size_t i = 0; i < info.arraySize; ++i )\n                {\n                    hr = CopyRectangle( *image->GetImage( 0, i, 0 ), Rect( 0, 0, info.width, info.height ),\n                                        *timage->GetImage( 0, i, 0 ), TEX_FILTER_DEFAULT, 0, 0 );\n                    if ( FAILED(hr) )\n                    {\n                        wprintf( L\" FAILED [copy to single level] (%x)\\n\", hr);\n                        return 1;\n                    }\n                }\n            }\n\n            image.swap( timage );\n            info.mipLevels = image->GetMetadata().mipLevels;\n\n            if ( cimage && ( tMips == 1 ) )\n            {\n                // Special case for trimming mips off compressed images and keeping the original compressed highest level mip\n                mdata = cimage->GetMetadata();\n                mdata.mipLevels = 1;\n                hr = timage->Initialize( mdata );\n                if ( FAILED(hr) )\n                {\n                    wprintf( L\" FAILED [copy compressed to single level] (%x)\\n\", hr);\n                    return 1;\n                }\n\n                if ( mdata.dimension == TEX_DIMENSION_TEXTURE3D )\n                {\n                    for( size_t d = 0; d < mdata.depth; ++d )\n                    {\n                        auto simg = cimage->GetImage( 0, 0, d );\n                        auto dimg = timage->GetImage( 0, 0, d );\n\n                        memcpy_s( dimg->pixels, dimg->slicePitch, simg->pixels, simg->slicePitch );\n                    }\n                }\n                else\n                {\n                    for( size_t i = 0; i < mdata.arraySize; ++i )\n                    {\n                        auto simg = cimage->GetImage( 0, i, 0 );\n                        auto dimg = timage->GetImage( 0, i, 0 );\n\n                        memcpy_s( dimg->pixels, dimg->slicePitch, simg->pixels, simg->slicePitch );\n                    }\n                }\n\n                cimage.swap( timage );\n            }\n            else\n            {\n                cimage.reset();\n            }\n        }\n\n        if ( ( !tMips || info.mipLevels != tMips ) && ( info.width > 1 || info.height > 1 || info.depth > 1 ) )\n        {\n            std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n            if ( !timage )\n            {\n                wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                return 1;\n            }\n\n            if ( info.dimension == TEX_DIMENSION_TEXTURE3D )\n            {\n                hr = GenerateMipMaps3D( image->GetImages(), image->GetImageCount(), image->GetMetadata(), dwFilter | dwFilterOpts, tMips, *timage );\n            }\n            else\n            {\n                hr = GenerateMipMaps( image->GetImages(), image->GetImageCount(), image->GetMetadata(), dwFilter | dwFilterOpts, tMips, *timage );\n            }\n            if ( FAILED(hr) )\n            {\n                wprintf( L\" FAILED [mipmaps] (%x)\\n\", hr);\n                return 1;\n            }\n\n            auto& tinfo = timage->GetMetadata();\n            info.mipLevels = tinfo.mipLevels;\n\n            assert( info.width == tinfo.width );\n            assert( info.height == tinfo.height );\n            assert( info.depth == tinfo.depth );\n            assert( info.arraySize == tinfo.arraySize );\n            assert( info.mipLevels == tinfo.mipLevels );\n            assert( info.miscFlags == tinfo.miscFlags );\n            assert( info.miscFlags2 == tinfo.miscFlags2 );\n            assert( info.dimension == tinfo.dimension );\n\n            image.swap( timage );\n            cimage.reset();\n        }\n\n        // --- Premultiplied alpha (if requested) --------------------------------------\n        if ( ( dwOptions & (DWORD64(1) << OPT_PREMUL_ALPHA) )\n             && HasAlpha( info.format )\n             && info.format != DXGI_FORMAT_A8_UNORM )\n        {\n            if ( info.IsPMAlpha() )\n            {\n                printf(\"WARNING: Image is already using premultiplied alpha\\n\");\n            }\n            else\n            {\n                auto img = image->GetImage(0,0,0);\n                assert( img );\n                size_t nimg = image->GetImageCount();\n\n                std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n                if ( !timage )\n                {\n                    wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                    return 1;\n                }\n\n                hr = PremultiplyAlpha( img, nimg, info, dwSRGB, *timage );\n                if ( FAILED(hr) )\n                {\n                    wprintf( L\" FAILED [premultiply alpha] (%x)\\n\", hr);\n                    continue;\n                }\n\n                auto& tinfo = timage->GetMetadata();\n                info.miscFlags2 = tinfo.miscFlags2;\n \n                assert( info.width == tinfo.width );\n                assert( info.height == tinfo.height );\n                assert( info.depth == tinfo.depth );\n                assert( info.arraySize == tinfo.arraySize );\n                assert( info.mipLevels == tinfo.mipLevels );\n                assert( info.miscFlags == tinfo.miscFlags );\n                assert( info.miscFlags2 == tinfo.miscFlags2 );\n                assert( info.dimension == tinfo.dimension );\n\n                image.swap( timage );\n                cimage.reset();\n            }\n        }\n\n        // --- Compress ----------------------------------------------------------------\n        if ( IsCompressed( tformat ) && (FileType == CODEC_DDS) )\n        {\n            if ( cimage && ( cimage->GetMetadata().format == tformat ) )\n            {\n                // We never changed the image and it was already compressed in our desired format, use original data\n                image.reset( cimage.release() );\n\n                auto& tinfo = image->GetMetadata();\n\n                if ( (tinfo.width % 4) != 0 || (tinfo.height % 4) != 0 )\n                { \n                    non4bc = true;\n                }\n\n                info.format = tinfo.format;\n                assert( info.width == tinfo.width );\n                assert( info.height == tinfo.height );\n                assert( info.depth == tinfo.depth );\n                assert( info.arraySize == tinfo.arraySize );\n                assert( info.mipLevels == tinfo.mipLevels );\n                assert( info.miscFlags == tinfo.miscFlags );\n                assert( info.miscFlags2 == tinfo.miscFlags2 );\n                assert( info.dimension == tinfo.dimension );\n            }\n            else\n            {\n                cimage.reset();\n\n                auto img = image->GetImage(0,0,0);\n                assert( img );\n                size_t nimg = image->GetImageCount();\n\n                std::unique_ptr<ScratchImage> timage( new (std::nothrow) ScratchImage );\n                if ( !timage )\n                {\n                    wprintf( L\" ERROR: Memory allocation failed\\n\" );\n                    return 1;\n                }\n\n                bool bc6hbc7=false;\n                switch( tformat )\n                {\n                case DXGI_FORMAT_BC6H_TYPELESS:\n                case DXGI_FORMAT_BC6H_UF16:\n                case DXGI_FORMAT_BC6H_SF16:\n                case DXGI_FORMAT_BC7_TYPELESS:\n                case DXGI_FORMAT_BC7_UNORM:\n                case DXGI_FORMAT_BC7_UNORM_SRGB:\n                    bc6hbc7=true;\n\n                    {\n                        static bool s_tryonce = false;\n\n                        if ( !s_tryonce )\n                        {\n                            s_tryonce = true;\n\n                            if ( !(dwOptions & (DWORD64(1) << OPT_NOGPU) ) )\n                            {\n                                if ( !CreateDevice( pDevice.GetAddressOf() ) )\n                                    wprintf( L\"\\nWARNING: DirectCompute is not available, using BC6H / BC7 CPU codec\\n\" );\n                            }\n                            else\n                            {\n                                wprintf( L\"\\nWARNING: using BC6H / BC7 CPU codec\\n\" );\n                            }\n                        }\n                    }\n                    break;\n                }\n\n                DWORD cflags = dwCompress;\n#ifdef _OPENMP\n                if ( !(dwOptions & (DWORD64(1) << OPT_FORCE_SINGLEPROC) ) )\n                {\n                    cflags |= TEX_COMPRESS_PARALLEL;\n                }\n#endif\n\n                if ( (img->width % 4) != 0 || (img->height % 4) != 0 )\n                { \n                    non4bc = true;\n                }\n\n                if ( bc6hbc7 && pDevice )\n                {\n                    hr = Compress( pDevice.Get(), img, nimg, info, tformat, dwCompress | dwSRGB, alphaWeight, *timage );\n                }\n                else\n                {\n                    hr = Compress( img, nimg, info, tformat, cflags | dwSRGB, 0.5f, *timage );\n                }\n                if ( FAILED(hr) )\n                {\n                    wprintf( L\" FAILED [compress] (%x)\\n\", hr);\n                    continue;\n                }\n\n                auto& tinfo = timage->GetMetadata();\n\n                info.format = tinfo.format;\n                assert( info.width == tinfo.width );\n                assert( info.height == tinfo.height );\n                assert( info.depth == tinfo.depth );\n                assert( info.arraySize == tinfo.arraySize );\n                assert( info.mipLevels == tinfo.mipLevels );\n                assert( info.miscFlags == tinfo.miscFlags );\n                assert( info.miscFlags2 == tinfo.miscFlags2 );\n                assert( info.dimension == tinfo.dimension );\n\n                image.swap( timage );\n            }\n        }\n        else\n        {\n            cimage.reset();\n        }\n\n        // --- Set alpha mode ----------------------------------------------------------\n        if ( HasAlpha( info.format )\n             && info.format != DXGI_FORMAT_A8_UNORM )\n        {\n            if ( image->IsAlphaAllOpaque() )\n            {\n                info.SetAlphaMode(TEX_ALPHA_MODE_OPAQUE);\n            }\n            else if ( info.IsPMAlpha() )\n            {\n                // Aleady set TEX_ALPHA_MODE_PREMULTIPLIED\n            }\n            else if ( dwOptions & (DWORD64(1) << OPT_SEPALPHA) )\n            {\n                info.SetAlphaMode(TEX_ALPHA_MODE_CUSTOM);\n            }\n            else\n            {\n                info.SetAlphaMode(TEX_ALPHA_MODE_STRAIGHT);\n            }\n        }\n        else\n        {\n            info.miscFlags2 &= ~TEX_MISC2_ALPHA_MODE_MASK;\n        }\n\n        // --- Save result -------------------------------------------------------------\n        {\n            auto img = image->GetImage(0,0,0);\n            assert( img );\n            size_t nimg = image->GetImageCount();\n\n            PrintInfo( info );\n            wprintf( L\"\\n\");\n\n            // Figure out dest filename\n            WCHAR *pchSlash, *pchDot;\n\n            wcscpy_s(pConv->szDest, MAX_PATH, szPrefix);\n\n            pchSlash = wcsrchr(pConv->szSrc, L'\\\\');\n            if(pchSlash != 0)\n                wcscat_s(pConv->szDest, MAX_PATH, pchSlash + 1);\n            else\n                wcscat_s(pConv->szDest, MAX_PATH, pConv->szSrc);\n\n            pchSlash = wcsrchr(pConv->szDest, '\\\\');\n            pchDot = wcsrchr(pConv->szDest, '.');\n\n            if(pchDot > pchSlash)\n                *pchDot = 0;\n\n            wcscat_s(pConv->szDest, MAX_PATH, szSuffix);\n\n            // Write texture\n            wprintf( L\"writing %ls\", pConv->szDest);\n            fflush(stdout);\n\n            switch( FileType )\n            {\n            case CODEC_DDS:\n                hr = SaveToDDSFile( img, nimg, info,\n                                    (dwOptions & (DWORD64(1) << OPT_USE_DX10) ) ? (DDS_FLAGS_FORCE_DX10_EXT|DDS_FLAGS_FORCE_DX10_EXT_MISC2) : DDS_FLAGS_NONE, \n                                    pConv->szDest );\n                break;\n\n            case CODEC_TGA:\n                hr = SaveToTGAFile( img[0], pConv->szDest );\n                break;\n\n            default:\n                hr = SaveToWICFile( img, nimg, WIC_FLAGS_ALL_FRAMES, GetWICCodec( static_cast<WICCodecs>(FileType) ), pConv->szDest );\n                break;\n            }\n\n            if(FAILED(hr))\n            {\n                wprintf( L\" FAILED (%x)\\n\", hr);\n                continue;\n            }\n            wprintf( L\"\\n\");\n        }\n    }\n\n    if ( nonpow2warn )\n        wprintf( L\"\\n WARNING: Not all feature levels support non-power-of-2 textures with mipmaps\\n\" );\n\n    if ( non4bc )\n        wprintf( L\"\\n WARNING: Direct3D requires BC image to be multiple of 4 in width & height\\n\" );\n\n    if(dwOptions & (DWORD64(1) << OPT_TIMING))\n    {\n        LARGE_INTEGER qpcEnd;\n        if ( QueryPerformanceCounter( &qpcEnd ) )\n        {\n            LONGLONG delta = qpcEnd.QuadPart - qpcStart.QuadPart;\n            wprintf( L\"\\n Processing time: %f seconds\\n\", double(delta) / double(qpcFreq.QuadPart) );\n        }\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/WICTextureLoader/WICTextureLoader.cpp",
    "content": "//--------------------------------------------------------------------------------------\n// File: WICTextureLoader.cpp\n//\n// Function for loading a WIC image and creating a Direct3D 11 runtime texture for it\n// (auto-generating mipmaps if possible)\n//\n// Note: Assumes application has already called CoInitializeEx\n//\n// Warning: CreateWICTexture* functions are not thread-safe if given a d3dContext instance for\n//          auto-gen mipmap support.\n//\n// Note these functions are useful for images created as simple 2D textures. For\n// more complex resources, DDSTextureLoader is an excellent light-weight runtime loader.\n// For a full-featured DDS file reader, writer, and texture processing pipeline see\n// the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n// We could load multi-frame images (TIFF/GIF) into a texture array.\n// For now, we just load the first frame (note: DirectXTex supports multi-frame images)\n\n#include <dxgiformat.h>\n#include <assert.h>\n\n// VS 2010's stdint.h conflicts with intsafe.h\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <wincodec.h>\n#include <intsafe.h>\n#pragma warning(pop)\n\n#include <wrl\\client.h>\n\n#include <memory>\n\n#include \"WICTextureLoader.h\"\n\n#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )\n#pragma comment(lib,\"dxguid.lib\")\n#endif\n\nusing Microsoft::WRL::ComPtr;\n\n//--------------------------------------------------------------------------------------\n\ntemplate<UINT TNameLength>\ninline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char (&name)[TNameLength])\n{\n#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )\n    resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);\n#else\n    UNREFERENCED_PARAMETER(resource);\n    UNREFERENCED_PARAMETER(name);\n#endif\n}\n\n//-------------------------------------------------------------------------------------\n// WIC Pixel Format Translation Data\n//-------------------------------------------------------------------------------------\nstruct WICTranslate\n{\n    GUID                wic;\n    DXGI_FORMAT         format;\n};\n\nstatic WICTranslate g_WICFormats[] = \n{\n    { GUID_WICPixelFormat128bppRGBAFloat,       DXGI_FORMAT_R32G32B32A32_FLOAT },\n\n    { GUID_WICPixelFormat64bppRGBAHalf,         DXGI_FORMAT_R16G16B16A16_FLOAT },\n    { GUID_WICPixelFormat64bppRGBA,             DXGI_FORMAT_R16G16B16A16_UNORM },\n\n    { GUID_WICPixelFormat32bppRGBA,             DXGI_FORMAT_R8G8B8A8_UNORM },\n    { GUID_WICPixelFormat32bppBGRA,             DXGI_FORMAT_B8G8R8A8_UNORM }, // DXGI 1.1\n    { GUID_WICPixelFormat32bppBGR,              DXGI_FORMAT_B8G8R8X8_UNORM }, // DXGI 1.1\n\n    { GUID_WICPixelFormat32bppRGBA1010102XR,    DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM }, // DXGI 1.1\n    { GUID_WICPixelFormat32bppRGBA1010102,      DXGI_FORMAT_R10G10B10A2_UNORM },\n\n    { GUID_WICPixelFormat16bppBGRA5551,         DXGI_FORMAT_B5G5R5A1_UNORM },\n    { GUID_WICPixelFormat16bppBGR565,           DXGI_FORMAT_B5G6R5_UNORM },\n\n    { GUID_WICPixelFormat32bppGrayFloat,        DXGI_FORMAT_R32_FLOAT },\n    { GUID_WICPixelFormat16bppGrayHalf,         DXGI_FORMAT_R16_FLOAT },\n    { GUID_WICPixelFormat16bppGray,             DXGI_FORMAT_R16_UNORM },\n    { GUID_WICPixelFormat8bppGray,              DXGI_FORMAT_R8_UNORM },\n\n    { GUID_WICPixelFormat8bppAlpha,             DXGI_FORMAT_A8_UNORM },\n};\n\n//-------------------------------------------------------------------------------------\n// WIC Pixel Format nearest conversion table\n//-------------------------------------------------------------------------------------\n\nstruct WICConvert\n{\n    GUID        source;\n    GUID        target;\n};\n\nstatic WICConvert g_WICConvert[] = \n{\n    // Note target GUID in this conversion table must be one of those directly supported formats (above).\n\n    { GUID_WICPixelFormatBlackWhite,            GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM\n\n    { GUID_WICPixelFormat1bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat2bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat4bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat8bppIndexed,           GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n\n    { GUID_WICPixelFormat2bppGray,              GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM \n    { GUID_WICPixelFormat4bppGray,              GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM \n\n    { GUID_WICPixelFormat16bppGrayFixedPoint,   GUID_WICPixelFormat16bppGrayHalf }, // DXGI_FORMAT_R16_FLOAT \n    { GUID_WICPixelFormat32bppGrayFixedPoint,   GUID_WICPixelFormat32bppGrayFloat }, // DXGI_FORMAT_R32_FLOAT \n\n    { GUID_WICPixelFormat16bppBGR555,           GUID_WICPixelFormat16bppBGRA5551 }, // DXGI_FORMAT_B5G5R5A1_UNORM\n\n    { GUID_WICPixelFormat32bppBGR101010,        GUID_WICPixelFormat32bppRGBA1010102 }, // DXGI_FORMAT_R10G10B10A2_UNORM\n\n    { GUID_WICPixelFormat24bppBGR,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat24bppRGB,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat32bppPBGRA,            GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat32bppPRGBA,            GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n\n    { GUID_WICPixelFormat48bppRGB,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat48bppBGR,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppBGRA,             GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPRGBA,            GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPBGRA,            GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n\n    { GUID_WICPixelFormat48bppRGBFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat48bppBGRFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBAFixedPoint,   GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppBGRAFixedPoint,   GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBFixedPoint,    GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat64bppRGBHalf,          GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n    { GUID_WICPixelFormat48bppRGBHalf,          GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n\n    { GUID_WICPixelFormat128bppPRGBAFloat,      GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBFloat,        GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBAFixedPoint,  GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat128bppRGBFixedPoint,   GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n    { GUID_WICPixelFormat32bppRGBE,             GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT \n\n    { GUID_WICPixelFormat32bppCMYK,             GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM \n    { GUID_WICPixelFormat64bppCMYK,             GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat40bppCMYKAlpha,        GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat80bppCMYKAlpha,        GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    { GUID_WICPixelFormat32bppRGB,              GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM\n    { GUID_WICPixelFormat64bppRGB,              GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM\n    { GUID_WICPixelFormat64bppPRGBAHalf,        GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT \n#endif\n\n    // We don't support n-channel formats\n};\n\nstatic bool g_WIC2 = false;\n\n//--------------------------------------------------------------------------------------\nstatic IWICImagingFactory* _GetWIC()\n{\n    static IWICImagingFactory* s_Factory = nullptr;\n\n    if ( s_Factory )\n        return s_Factory;\n\n#if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory2,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory2),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( SUCCEEDED(hr) )\n    {\n        // WIC2 is available on Windows 8 and Windows 7 SP1 with KB 2670838 installed\n        g_WIC2 = true;\n    }\n    else\n    {\n        hr = CoCreateInstance(\n            CLSID_WICImagingFactory1,\n            nullptr,\n            CLSCTX_INPROC_SERVER,\n            __uuidof(IWICImagingFactory),\n            (LPVOID*)&s_Factory\n            );\n\n        if ( FAILED(hr) )\n        {\n            s_Factory = nullptr;\n            return nullptr;\n        }\n    }\n#else\n    HRESULT hr = CoCreateInstance(\n        CLSID_WICImagingFactory,\n        nullptr,\n        CLSCTX_INPROC_SERVER,\n        __uuidof(IWICImagingFactory),\n        (LPVOID*)&s_Factory\n        );\n\n    if ( FAILED(hr) )\n    {\n        s_Factory = nullptr;\n        return nullptr;\n    }\n#endif\n\n    return s_Factory;\n}\n\n//---------------------------------------------------------------------------------\nstatic DXGI_FORMAT _WICToDXGI( const GUID& guid )\n{\n    for( size_t i=0; i < _countof(g_WICFormats); ++i )\n    {\n        if ( memcmp( &g_WICFormats[i].wic, &guid, sizeof(GUID) ) == 0 )\n            return g_WICFormats[i].format;\n    }\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    if ( g_WIC2 )\n    {\n        if ( memcmp( &GUID_WICPixelFormat96bppRGBFloat, &guid, sizeof(GUID) ) == 0 )\n            return DXGI_FORMAT_R32G32B32_FLOAT;\n    }\n#endif\n\n    return DXGI_FORMAT_UNKNOWN;\n}\n\n//---------------------------------------------------------------------------------\nstatic size_t _WICBitsPerPixel( REFGUID targetGuid )\n{\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return 0;\n \n    ComPtr<IWICComponentInfo> cinfo;\n    if ( FAILED( pWIC->CreateComponentInfo( targetGuid, cinfo.GetAddressOf() ) ) )\n        return 0;\n\n    WICComponentType type;\n    if ( FAILED( cinfo->GetComponentType( &type ) ) )\n        return 0;\n\n    if ( type != WICPixelFormat )\n        return 0;\n\n    ComPtr<IWICPixelFormatInfo> pfinfo;\n    if ( FAILED( cinfo.As( &pfinfo ) ) )\n        return 0;\n\n    UINT bpp;\n    if ( FAILED( pfinfo->GetBitsPerPixel( &bpp ) ) )\n        return 0;\n\n    return bpp;\n}\n\n\n//--------------------------------------------------------------------------------------\nstatic DXGI_FORMAT MakeSRGB( _In_ DXGI_FORMAT format )\n{\n    switch( format )\n    {\n    case DXGI_FORMAT_R8G8B8A8_UNORM:\n        return DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC1_UNORM:\n        return DXGI_FORMAT_BC1_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC2_UNORM:\n        return DXGI_FORMAT_BC2_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC3_UNORM:\n        return DXGI_FORMAT_BC3_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8A8_UNORM:\n        return DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;\n\n    case DXGI_FORMAT_B8G8R8X8_UNORM:\n        return DXGI_FORMAT_B8G8R8X8_UNORM_SRGB;\n\n    case DXGI_FORMAT_BC7_UNORM:\n        return DXGI_FORMAT_BC7_UNORM_SRGB;\n\n    default:\n        return format;\n    }\n}\n\n\n//---------------------------------------------------------------------------------\nstatic HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice,\n                                     _In_opt_ ID3D11DeviceContext* d3dContext,\n                                     _In_ IWICBitmapFrameDecode *frame,\n                                     _In_ size_t maxsize,\n                                     _In_ D3D11_USAGE usage,\n                                     _In_ unsigned int bindFlags,\n                                     _In_ unsigned int cpuAccessFlags,\n                                     _In_ unsigned int miscFlags,\n                                     _In_ bool forceSRGB,\n                                     _Out_opt_ ID3D11Resource** texture,\n                                     _Out_opt_ ID3D11ShaderResourceView** textureView )\n{\n    UINT width, height;\n    HRESULT hr = frame->GetSize( &width, &height );\n    if ( FAILED(hr) )\n        return hr;\n\n    assert( width > 0 && height > 0 );\n\n    if ( !maxsize )\n    {\n        // This is a bit conservative because the hardware could support larger textures than\n        // the Feature Level defined minimums, but doing it this way is much easier and more\n        // performant for WIC than the 'fail and retry' model used by DDSTextureLoader\n\n        switch( d3dDevice->GetFeatureLevel() )\n        {\n            case D3D_FEATURE_LEVEL_9_1:\n            case D3D_FEATURE_LEVEL_9_2:\n                maxsize = 2048 /*D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                break;\n\n            case D3D_FEATURE_LEVEL_9_3:\n                maxsize = 4096 /*D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                break;\n\n            case D3D_FEATURE_LEVEL_10_0:\n            case D3D_FEATURE_LEVEL_10_1:\n                maxsize = 8192 /*D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION*/;\n                break;\n\n            default:\n                maxsize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;\n                break;\n        }\n    }\n\n    assert( maxsize > 0 );\n\n    UINT twidth, theight;\n    if ( width > maxsize || height > maxsize )\n    {\n        float ar = static_cast<float>(height) / static_cast<float>(width);\n        if ( width > height )\n        {\n            twidth = static_cast<UINT>( maxsize );\n            theight = static_cast<UINT>( static_cast<float>(maxsize) * ar );\n        }\n        else\n        {\n            theight = static_cast<UINT>( maxsize );\n            twidth = static_cast<UINT>( static_cast<float>(maxsize) / ar );\n        }\n        assert( twidth <= maxsize && theight <= maxsize );\n    }\n    else\n    {\n        twidth = width;\n        theight = height;\n    }\n\n    // Determine format\n    WICPixelFormatGUID pixelFormat;\n    hr = frame->GetPixelFormat( &pixelFormat );\n    if ( FAILED(hr) )\n        return hr;\n\n    WICPixelFormatGUID convertGUID;\n    memcpy( &convertGUID, &pixelFormat, sizeof(WICPixelFormatGUID) );\n\n    size_t bpp = 0;\n\n    DXGI_FORMAT format = _WICToDXGI( pixelFormat );\n    if ( format == DXGI_FORMAT_UNKNOWN )\n    {\n        if ( memcmp( &GUID_WICPixelFormat96bppRGBFixedPoint, &pixelFormat, sizeof(WICPixelFormatGUID) ) == 0 )\n        {\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n            if ( g_WIC2 )\n            {\n                memcpy( &convertGUID, &GUID_WICPixelFormat96bppRGBFloat, sizeof(WICPixelFormatGUID) );\n                format = DXGI_FORMAT_R32G32B32_FLOAT;\n            }\n            else\n#endif\n            {\n                memcpy( &convertGUID, &GUID_WICPixelFormat128bppRGBAFloat, sizeof(WICPixelFormatGUID) );\n                format = DXGI_FORMAT_R32G32B32A32_FLOAT;\n            }\n        }\n        else\n        {\n            for( size_t i=0; i < _countof(g_WICConvert); ++i )\n            {\n                if ( memcmp( &g_WICConvert[i].source, &pixelFormat, sizeof(WICPixelFormatGUID) ) == 0 )\n                {\n                    memcpy( &convertGUID, &g_WICConvert[i].target, sizeof(WICPixelFormatGUID) );\n\n                    format = _WICToDXGI( g_WICConvert[i].target );\n                    assert( format != DXGI_FORMAT_UNKNOWN );\n                    bpp = _WICBitsPerPixel( convertGUID );\n                    break;\n                }\n            }\n        }\n\n        if ( format == DXGI_FORMAT_UNKNOWN )\n            return HRESULT_FROM_WIN32( ERROR_NOT_SUPPORTED );\n    }\n    else\n    {\n        bpp = _WICBitsPerPixel( pixelFormat );\n    }\n\n#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)\n    if ( (format == DXGI_FORMAT_R32G32B32_FLOAT) && d3dContext != 0 && textureView != 0 )\n    {\n        // Special case test for optional device support for autogen mipchains for R32G32B32_FLOAT \n        UINT fmtSupport = 0;\n        hr = d3dDevice->CheckFormatSupport( DXGI_FORMAT_R32G32B32_FLOAT, &fmtSupport );\n        if ( FAILED(hr) || !( fmtSupport & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN ) )\n        {\n            // Use R32G32B32A32_FLOAT instead which is required for Feature Level 10.0 and up\n            memcpy( &convertGUID, &GUID_WICPixelFormat128bppRGBAFloat, sizeof(WICPixelFormatGUID) );\n            format = DXGI_FORMAT_R32G32B32A32_FLOAT;\n            bpp = 128;\n        }\n    }\n#endif\n\n    if ( !bpp )\n        return E_FAIL;\n\n    // Handle sRGB formats\n    if ( forceSRGB )\n    {\n        format = MakeSRGB( format );\n    }\n    else\n    {\n        ComPtr<IWICMetadataQueryReader> metareader;\n        if ( SUCCEEDED( frame->GetMetadataQueryReader( metareader.GetAddressOf() ) ) )\n        {\n            GUID containerFormat;\n            if ( SUCCEEDED( metareader->GetContainerFormat( &containerFormat ) ) )\n            {\n                // Check for sRGB colorspace metadata\n                bool sRGB = false;\n\n                PROPVARIANT value;\n                PropVariantInit( &value );\n\n                if ( memcmp( &containerFormat, &GUID_ContainerFormatPng, sizeof(GUID) ) == 0 )\n                {\n                    // Check for sRGB chunk\n                    if ( SUCCEEDED( metareader->GetMetadataByName( L\"/sRGB/RenderingIntent\", &value ) ) && value.vt == VT_UI1 )\n                    {\n                        sRGB = true;\n                    }\n                }\n                else if ( SUCCEEDED( metareader->GetMetadataByName( L\"System.Image.ColorSpace\", &value ) ) && value.vt == VT_UI2 && value.uiVal == 1 )\n                {\n                    sRGB = true;\n                }\n\n                PropVariantClear( &value );\n\n                if ( sRGB )\n                    format = MakeSRGB( format );\n            }\n        }\n    }\n\n    // Verify our target format is supported by the current device\n    // (handles WDDM 1.0 or WDDM 1.1 device driver cases as well as DirectX 11.0 Runtime without 16bpp format support)\n    UINT support = 0;\n    hr = d3dDevice->CheckFormatSupport( format, &support );\n    if ( FAILED(hr) || !(support & D3D11_FORMAT_SUPPORT_TEXTURE2D) )\n    {\n        // Fallback to RGBA 32-bit format which is supported by all devices\n        memcpy( &convertGUID, &GUID_WICPixelFormat32bppRGBA, sizeof(WICPixelFormatGUID) );\n        format = DXGI_FORMAT_R8G8B8A8_UNORM;\n        bpp = 32;\n    }\n\n    // Allocate temporary memory for image\n    size_t rowPitch = ( twidth * bpp + 7 ) / 8;\n    size_t imageSize = rowPitch * theight;\n\n    std::unique_ptr<uint8_t[]> temp( new (std::nothrow) uint8_t[ imageSize ] );\n    if (!temp)\n        return E_OUTOFMEMORY;\n\n    // Load image data\n    if ( memcmp( &convertGUID, &pixelFormat, sizeof(GUID) ) == 0\n         && twidth == width\n         && theight == height )\n    {\n        // No format conversion or resize needed\n        hr = frame->CopyPixels( 0, static_cast<UINT>( rowPitch ), static_cast<UINT>( imageSize ), temp.get() );  \n        if ( FAILED(hr) )\n            return hr;\n    }\n    else if ( twidth != width || theight != height )\n    {\n        // Resize\n        IWICImagingFactory* pWIC = _GetWIC();\n        if ( !pWIC )\n            return E_NOINTERFACE;\n\n        ComPtr<IWICBitmapScaler> scaler;\n        hr = pWIC->CreateBitmapScaler( scaler.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = scaler->Initialize( frame, twidth, theight, WICBitmapInterpolationModeFant );\n        if ( FAILED(hr) )\n            return hr;\n\n        WICPixelFormatGUID pfScaler;\n        hr = scaler->GetPixelFormat( &pfScaler );\n        if ( FAILED(hr) )\n            return hr;\n\n        if ( memcmp( &convertGUID, &pfScaler, sizeof(GUID) ) == 0 )\n        {\n            // No format conversion needed\n            hr = scaler->CopyPixels( 0, static_cast<UINT>( rowPitch ), static_cast<UINT>( imageSize ), temp.get() );  \n            if ( FAILED(hr) )\n                return hr;\n        }\n        else\n        {\n            ComPtr<IWICFormatConverter> FC;\n            hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n            if ( FAILED(hr) )\n                return hr;\n\n            BOOL canConvert = FALSE;\n            hr = FC->CanConvert( pfScaler, convertGUID, &canConvert );\n            if ( FAILED(hr) || !canConvert )\n            {\n                return E_UNEXPECTED;\n            }\n\n            hr = FC->Initialize( scaler.Get(), convertGUID, WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom );\n            if ( FAILED(hr) )\n                return hr;\n\n            hr = FC->CopyPixels( 0, static_cast<UINT>( rowPitch ), static_cast<UINT>( imageSize ), temp.get() );  \n            if ( FAILED(hr) )\n                return hr;\n        }\n    }\n    else\n    {\n        // Format conversion but no resize\n        IWICImagingFactory* pWIC = _GetWIC();\n        if ( !pWIC )\n            return E_NOINTERFACE;\n\n        ComPtr<IWICFormatConverter> FC;\n        hr = pWIC->CreateFormatConverter( FC.GetAddressOf() );\n        if ( FAILED(hr) )\n            return hr;\n\n        BOOL canConvert = FALSE;\n        hr = FC->CanConvert( pixelFormat, convertGUID, &canConvert );\n        if ( FAILED(hr) || !canConvert )\n        {\n            return E_UNEXPECTED;\n        }\n\n        hr = FC->Initialize( frame, convertGUID, WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom );\n        if ( FAILED(hr) )\n            return hr;\n\n        hr = FC->CopyPixels( 0, static_cast<UINT>( rowPitch ), static_cast<UINT>( imageSize ), temp.get() );  \n        if ( FAILED(hr) )\n            return hr;\n    }\n\n    // See if format is supported for auto-gen mipmaps (varies by feature level)\n    bool autogen = false;\n    if ( d3dContext != 0 && textureView != 0 ) // Must have context and shader-view to auto generate mipmaps\n    {\n        UINT fmtSupport = 0;\n        hr = d3dDevice->CheckFormatSupport( format, &fmtSupport );\n        if ( SUCCEEDED(hr) && ( fmtSupport & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN ) )\n        {\n            autogen = true;\n        }\n    }\n\n    // Create texture\n    D3D11_TEXTURE2D_DESC desc;\n    desc.Width = twidth;\n    desc.Height = theight;\n    desc.MipLevels = (autogen) ? 0 : 1;\n    desc.ArraySize = 1;\n    desc.Format = format;\n    desc.SampleDesc.Count = 1;\n    desc.SampleDesc.Quality = 0;\n    desc.Usage = usage;\n    desc.CPUAccessFlags = cpuAccessFlags;\n\n    if ( autogen )\n    {\n        desc.BindFlags = bindFlags | D3D11_BIND_RENDER_TARGET;\n        desc.MiscFlags = miscFlags | D3D11_RESOURCE_MISC_GENERATE_MIPS;\n    }\n    else\n    {\n        desc.BindFlags = bindFlags;\n        desc.MiscFlags = miscFlags;\n    }\n\n    D3D11_SUBRESOURCE_DATA initData;\n    initData.pSysMem = temp.get();\n    initData.SysMemPitch = static_cast<UINT>( rowPitch );\n    initData.SysMemSlicePitch = static_cast<UINT>( imageSize );\n\n    ID3D11Texture2D* tex = nullptr;\n    hr = d3dDevice->CreateTexture2D( &desc, (autogen) ? nullptr : &initData, &tex );\n    if ( SUCCEEDED(hr) && tex != 0 )\n    {\n        if (textureView != 0)\n        {\n            D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;\n            memset( &SRVDesc, 0, sizeof( SRVDesc ) );\n            SRVDesc.Format = desc.Format;\n\n            SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;\n            SRVDesc.Texture2D.MipLevels = (autogen) ? -1 : 1;\n\n            hr = d3dDevice->CreateShaderResourceView( tex, &SRVDesc, textureView );\n            if ( FAILED(hr) )\n            {\n                tex->Release();\n                return hr;\n            }\n\n            if ( autogen )\n            {\n                assert( d3dContext != 0 );\n                d3dContext->UpdateSubresource( tex, 0, nullptr, temp.get(), static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize) );\n                d3dContext->GenerateMips( *textureView );\n            }\n        }\n\n        if (texture != 0)\n        {\n            *texture = tex;\n        }\n        else\n        {\n            SetDebugObjectName(tex, \"WICTextureLoader\");\n            tex->Release();\n        }\n    }\n\n    return hr;\n}\n\n//--------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromMemory( ID3D11Device* d3dDevice,\n                                             const uint8_t* wicData,\n                                             size_t wicDataSize,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             size_t maxsize )\n{\n    return CreateWICTextureFromMemoryEx( d3dDevice, nullptr, wicData, wicDataSize, maxsize,\n                                         D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                         texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromMemory( ID3D11Device* d3dDevice,\n                                             ID3D11DeviceContext* d3dContext,\n                                             const uint8_t* wicData,\n                                             size_t wicDataSize,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView,\n                                             size_t maxsize )\n{\n    return CreateWICTextureFromMemoryEx( d3dDevice, d3dContext, wicData, wicDataSize, maxsize,\n                                         D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                         texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromMemoryEx( ID3D11Device* d3dDevice,\n                                               const uint8_t* wicData,\n                                               size_t wicDataSize,\n                                               size_t maxsize,\n                                               D3D11_USAGE usage,\n                                               unsigned int bindFlags,\n                                               unsigned int cpuAccessFlags,\n                                               unsigned int miscFlags,\n                                               bool forceSRGB,\n                                               ID3D11Resource** texture,\n                                               ID3D11ShaderResourceView** textureView )\n{\n    return CreateWICTextureFromMemoryEx( d3dDevice, nullptr, wicData, wicDataSize, maxsize,\n                                         usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                         texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromMemoryEx( ID3D11Device* d3dDevice,\n                                               ID3D11DeviceContext* d3dContext,\n                                               const uint8_t* wicData,\n                                               size_t wicDataSize,\n                                               size_t maxsize,\n                                               D3D11_USAGE usage,\n                                               unsigned int bindFlags,\n                                               unsigned int cpuAccessFlags,\n                                               unsigned int miscFlags,\n                                               bool forceSRGB,\n                                               ID3D11Resource** texture,\n                                               ID3D11ShaderResourceView** textureView )\n{\n    if ( texture )\n    {\n        *texture = nullptr;\n    }\n    if ( textureView )\n    {\n        *textureView = nullptr;\n    }\n\n    if (!d3dDevice || !wicData || (!texture && !textureView))\n        return E_INVALIDARG;\n\n    if ( !wicDataSize )\n        return E_FAIL;\n\n#ifdef _M_AMD64\n    if ( wicDataSize > 0xFFFFFFFF )\n        return HRESULT_FROM_WIN32( ERROR_FILE_TOO_LARGE );\n#endif\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    // Create input stream for memory\n    ComPtr<IWICStream> stream;\n    HRESULT hr = pWIC->CreateStream( stream.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = stream->InitializeFromMemory( const_cast<uint8_t*>( wicData ), static_cast<DWORD>( wicDataSize ) );\n    if ( FAILED(hr) )\n        return hr;\n\n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    hr = pWIC->CreateDecoderFromStream( stream.Get(), 0, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = CreateTextureFromWIC( d3dDevice, d3dContext, frame.Get(), maxsize,\n                               usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                               texture, textureView );\n    if ( FAILED(hr)) \n        return hr;\n\n    if (texture != 0 && *texture != 0)\n    {\n        SetDebugObjectName(*texture, \"WICTextureLoader\");\n    }\n\n    if (textureView != 0 && *textureView != 0)\n    {\n        SetDebugObjectName(*textureView, \"WICTextureLoader\");\n    }\n\n    return hr;\n}\n\n//--------------------------------------------------------------------------------------\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromFile( ID3D11Device* d3dDevice,\n                                           const wchar_t* fileName,\n                                           ID3D11Resource** texture,\n                                           ID3D11ShaderResourceView** textureView,\n                                           size_t maxsize )\n{\n    return CreateWICTextureFromFileEx( d3dDevice, nullptr, fileName, maxsize,\n                                       D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                       texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromFile( ID3D11Device* d3dDevice,\n                                           ID3D11DeviceContext* d3dContext,\n                                           const wchar_t* fileName,\n                                           ID3D11Resource** texture,\n                                           ID3D11ShaderResourceView** textureView,\n                                           size_t maxsize )\n{\n    return CreateWICTextureFromFileEx( d3dDevice, d3dContext, fileName, maxsize,\n                                       D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE, 0, 0, false,\n                                       texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromFileEx( ID3D11Device* d3dDevice,\n                                             const wchar_t* fileName,\n                                             size_t maxsize,\n                                             D3D11_USAGE usage,\n                                             unsigned int bindFlags,\n                                             unsigned int cpuAccessFlags,\n                                             unsigned int miscFlags,\n                                             bool forceSRGB,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView )\n{\n    return CreateWICTextureFromFileEx( d3dDevice, nullptr, fileName, maxsize,\n                                       usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                                       texture, textureView );\n}\n\n_Use_decl_annotations_\nHRESULT DirectX::CreateWICTextureFromFileEx( ID3D11Device* d3dDevice,\n                                             ID3D11DeviceContext* d3dContext,\n                                             const wchar_t* fileName,\n                                             size_t maxsize,\n                                             D3D11_USAGE usage,\n                                             unsigned int bindFlags,\n                                             unsigned int cpuAccessFlags,\n                                             unsigned int miscFlags,\n                                             bool forceSRGB,\n                                             ID3D11Resource** texture,\n                                             ID3D11ShaderResourceView** textureView )\n{\n    if ( texture )\n    {\n        *texture = nullptr;\n    }\n    if ( textureView )\n    {\n        *textureView = nullptr;\n    }\n\n    if (!d3dDevice || !fileName || (!texture && !textureView))\n        return E_INVALIDARG;\n\n    IWICImagingFactory* pWIC = _GetWIC();\n    if ( !pWIC )\n        return E_NOINTERFACE;\n\n    // Initialize WIC\n    ComPtr<IWICBitmapDecoder> decoder;\n    HRESULT hr = pWIC->CreateDecoderFromFilename( fileName, 0, GENERIC_READ, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    ComPtr<IWICBitmapFrameDecode> frame;\n    hr = decoder->GetFrame( 0, frame.GetAddressOf() );\n    if ( FAILED(hr) )\n        return hr;\n\n    hr = CreateTextureFromWIC( d3dDevice, d3dContext, frame.Get(), maxsize,\n                               usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,\n                               texture, textureView );\n\n#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )\n    if ( SUCCEEDED(hr) )\n    {\n        if (texture != 0 || textureView != 0)\n        {\n            CHAR strFileA[MAX_PATH];\n            int result = WideCharToMultiByte( CP_ACP,\n                                              WC_NO_BEST_FIT_CHARS,\n                                              fileName,\n                                              -1,\n                                              strFileA,\n                                              MAX_PATH,\n                                              nullptr,\n                                              FALSE\n                               );\n            if ( result > 0 )\n            {\n                const CHAR* pstrName = strrchr( strFileA, '\\\\' );\n                if (!pstrName)\n                {\n                    pstrName = strFileA;\n                }\n                else\n                {\n                    pstrName++;\n                }\n\n                if (texture != 0 && *texture != 0)\n                {\n                    (*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,\n                                                static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),\n                                                pstrName\n                                              );\n                }\n\n                if (textureView != 0 && *textureView != 0 )\n                {\n                    (*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,\n                                                    static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),\n                                                    pstrName\n                                                  );\n                }\n            }\n        }\n    }\n#endif\n\n    return hr;\n}\n"
  },
  {
    "path": "3rdParty/DirectXTex/WICTextureLoader/WICTextureLoader.h",
    "content": "//--------------------------------------------------------------------------------------\n// File: WICTextureLoader.h\n//\n// Function for loading a WIC image and creating a Direct3D 11 runtime texture for it\n// (auto-generating mipmaps if possible)\n//\n// Note: Assumes application has already called CoInitializeEx\n//\n// Warning: CreateWICTexture* functions are not thread-safe if given a d3dContext instance for\n//          auto-gen mipmap support.\n//\n// Note these functions are useful for images created as simple 2D textures. For\n// more complex resources, DDSTextureLoader is an excellent light-weight runtime loader.\n// For a full-featured DDS file reader, writer, and texture processing pipeline see\n// the 'Texconv' sample and the 'DirectXTex' library.\n//\n// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF\n// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A\n// PARTICULAR PURPOSE.\n//\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//\n// http://go.microsoft.com/fwlink/?LinkId=248926\n// http://go.microsoft.com/fwlink/?LinkId=248929\n//--------------------------------------------------------------------------------------\n\n#ifdef _MSC_VER\n#pragma once\n#endif\n\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) && (_WIN32_WINNT <= _WIN32_WINNT_WIN8)\n#error WIC is not supported on Windows Phone 8.0\n#endif\n\n#include <d3d11_1.h>\n\n#pragma warning(push)\n#pragma warning(disable : 4005)\n#include <stdint.h>\n#pragma warning(pop)\n\n#if defined(_MSC_VER) && (_MSC_VER<1610) && !defined(_In_reads_)\n#define _In_reads_(exp)\n#define _Out_writes_(exp)\n#define _In_reads_bytes_(exp)\n#endif\n\n#ifndef _Use_decl_annotations_\n#define _Use_decl_annotations_\n#endif\n\nnamespace DirectX\n{\n    // Standard version\n    HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,\n                                        _In_reads_bytes_(wicDataSize) const uint8_t* wicData,\n                                        _In_ size_t wicDataSize,\n                                        _Out_opt_ ID3D11Resource** texture,\n                                        _Out_opt_ ID3D11ShaderResourceView** textureView,\n                                        _In_ size_t maxsize = 0\n                                      );\n\n    HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,\n                                      _In_z_ const wchar_t* szFileName,\n                                      _Out_opt_ ID3D11Resource** texture,\n                                      _Out_opt_ ID3D11ShaderResourceView** textureView,\n                                      _In_ size_t maxsize = 0\n                                    );\n\n    // Standard version with optional auto-gen mipmap support\n    HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,\n                                        _In_opt_ ID3D11DeviceContext* d3dContext,\n                                        _In_reads_bytes_(wicDataSize) const uint8_t* wicData,\n                                        _In_ size_t wicDataSize,\n                                        _Out_opt_ ID3D11Resource** texture,\n                                        _Out_opt_ ID3D11ShaderResourceView** textureView,\n                                        _In_ size_t maxsize = 0\n                                      );\n\n    HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,\n                                      _In_opt_ ID3D11DeviceContext* d3dContext,\n                                      _In_z_ const wchar_t* szFileName,\n                                      _Out_opt_ ID3D11Resource** texture,\n                                      _Out_opt_ ID3D11ShaderResourceView** textureView,\n                                      _In_ size_t maxsize = 0\n                                    );\n\n    // Extended version\n    HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,\n                                          _In_reads_bytes_(wicDataSize) const uint8_t* wicData,\n                                          _In_ size_t wicDataSize,\n                                          _In_ size_t maxsize,\n                                          _In_ D3D11_USAGE usage,\n                                          _In_ unsigned int bindFlags,\n                                          _In_ unsigned int cpuAccessFlags,\n                                          _In_ unsigned int miscFlags,\n                                          _In_ bool forceSRGB,\n                                          _Out_opt_ ID3D11Resource** texture,\n                                          _Out_opt_ ID3D11ShaderResourceView** textureView\n                                      );\n\n    HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,\n                                        _In_z_ const wchar_t* szFileName,\n                                        _In_ size_t maxsize,\n                                        _In_ D3D11_USAGE usage,\n                                        _In_ unsigned int bindFlags,\n                                        _In_ unsigned int cpuAccessFlags,\n                                        _In_ unsigned int miscFlags,\n                                        _In_ bool forceSRGB,\n                                        _Out_opt_ ID3D11Resource** texture,\n                                        _Out_opt_ ID3D11ShaderResourceView** textureView\n                                    );\n\n    // Extended version with optional auto-gen mipmap support\n    HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,\n                                          _In_opt_ ID3D11DeviceContext* d3dContext,\n                                          _In_reads_bytes_(wicDataSize) const uint8_t* wicData,\n                                          _In_ size_t wicDataSize,\n                                          _In_ size_t maxsize,\n                                          _In_ D3D11_USAGE usage,\n                                          _In_ unsigned int bindFlags,\n                                          _In_ unsigned int cpuAccessFlags,\n                                          _In_ unsigned int miscFlags,\n                                          _In_ bool forceSRGB,\n                                          _Out_opt_ ID3D11Resource** texture,\n                                          _Out_opt_ ID3D11ShaderResourceView** textureView\n                                      );\n\n    HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,\n                                        _In_opt_ ID3D11DeviceContext* d3dContext,\n                                        _In_z_ const wchar_t* szFileName,\n                                        _In_ size_t maxsize,\n                                        _In_ D3D11_USAGE usage,\n                                        _In_ unsigned int bindFlags,\n                                        _In_ unsigned int cpuAccessFlags,\n                                        _In_ unsigned int miscFlags,\n                                        _In_ bool forceSRGB,\n                                        _Out_opt_ ID3D11Resource** texture,\n                                        _Out_opt_ ID3D11ShaderResourceView** textureView\n                                    );\n}"
  },
  {
    "path": "3rdParty/Intel/Source/StopWatch.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#include \"StopWatch.h\"\n#include <cassert>\n\n// Initialize member variables.\nStopWatch::StopWatch() :\n\tfrequency(0),\n\tstart(0),\n\tstop(0),\n\taffinityMask(0)\n{\n\t// Initialize the performance counter frequency.\n\tLARGE_INTEGER perfQuery;\n\tBOOL supported = QueryPerformanceFrequency(&perfQuery);\n\tassert(supported == TRUE);\n\tthis->frequency = perfQuery.QuadPart;\n}\n\n// Start the stopwatch.\nvoid StopWatch::Start()\n{\n\t// MSDN recommends setting the thread affinity to avoid bugs in the BIOS and HAL.\n\t// Create an affinity mask for the current processor.\n\taffinityMask = (DWORD_PTR)1 << GetCurrentProcessorNumber();\n\tHANDLE currThread = GetCurrentThread();\n\tDWORD_PTR prevAffinityMask = SetThreadAffinityMask(currThread, affinityMask);\n\tassert(prevAffinityMask != 0);\n\n\t// Query the performance counter.\n\tLARGE_INTEGER perfQuery;\n\tBOOL result = QueryPerformanceCounter(&perfQuery);\n    assert(result);\n    start = perfQuery.QuadPart;\n\n\t// Restore the thread's affinity mask.\n\tprevAffinityMask = SetThreadAffinityMask(currThread, prevAffinityMask);\n\tassert(prevAffinityMask != 0);\n}\n\n// Stop the stopwatch.\nvoid StopWatch::Stop()\n{\n\t// MSDN recommends setting the thread affinity to avoid bugs in the BIOS and HAL.\n\t// Use the affinity mask that was created in the Start function.\n\tHANDLE currThread = GetCurrentThread();\n\tDWORD_PTR prevAffinityMask = SetThreadAffinityMask(currThread, affinityMask);\n\tassert(prevAffinityMask != 0);\n\n\t// Query the performance counter.\n\tLARGE_INTEGER perfQuery;\n\tBOOL result = QueryPerformanceCounter(&perfQuery);\n    assert(result);\n    stop = perfQuery.QuadPart;\n\n\t// Restore the thread's affinity mask.\n\tprevAffinityMask = SetThreadAffinityMask(currThread, prevAffinityMask);\n\tassert(prevAffinityMask != 0);\n}\n\n// Reset the stopwatch.\nvoid StopWatch::Reset()\n{\n\tstart = 0;\n\tstop = 0;\n\taffinityMask = 0;\n}\n\n// Get the elapsed time in seconds.\ndouble StopWatch::TimeInSeconds() const\n{\n\t// Return the elapsed time in seconds.\n\tassert((stop - start) > 0);\n\treturn double(stop - start) / double(frequency);\n}\n\n// Get the elapsed time in milliseconds.\ndouble StopWatch::TimeInMilliseconds() const\n{\n\t// Return the elapsed time in milliseconds.\n\tassert((stop - start) > 0);\n\treturn double(stop - start) / double(frequency) * 1000.0;\n}\n\n// Get the elapsed time in microseconds.\ndouble StopWatch::TimeInMicroseconds() const\n{\n\t// Return the elapsed time in microseconds.\n\tassert((stop - start) > 0);\n\treturn double(stop - start) / double(frequency) * 1000000.0;\n}\n"
  },
  {
    "path": "3rdParty/Intel/Source/StopWatch.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#pragma once\n\n#include \"Windows.h\"\n\n// A simple stopwatch class using Windows' high-resolution performance counters.\nclass StopWatch\n{\npublic:\n\tStopWatch();\n\n\tvoid Start();\n\tvoid Stop();\n\tvoid Reset();\n\n\tdouble TimeInSeconds() const;\n\tdouble TimeInMilliseconds() const;\n\tdouble TimeInMicroseconds() const;\n\nprivate:\n\tLONGLONG frequency;\n\tLONGLONG start;\n\tLONGLONG stop;\n\tDWORD_PTR affinityMask;\n};\n"
  },
  {
    "path": "3rdParty/Intel/Source/ispc_texcomp.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#include \"ispc_texcomp.h\"\n#include \"kernel_ispc.h\"\n\nvoid GetProfile_ultrafast(bc7_enc_settings* settings)\n{\n    settings->channels = 3;\n\n\t// mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode13\n\tsettings->mode_selection[1] = false;\n\tsettings->fastSkipTreshold_mode1 = 3;\n\tsettings->fastSkipTreshold_mode3 = 1;\n    settings->fastSkipTreshold_mode7 = 0;\n\n\tsettings->refineIterations[1] = 2;\n\tsettings->refineIterations[3] = 1;\n\n\t// mode45\n\tsettings->mode_selection[2] = false;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 0;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 1;\n}\n\nvoid GetProfile_veryfast(bc7_enc_settings* settings)\n{\n    settings->channels = 3;\n\n\t// mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode13\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 3;\n\tsettings->fastSkipTreshold_mode3 = 1;\n    settings->fastSkipTreshold_mode7 = 0;\n\n\tsettings->refineIterations[1] = 2;\n\tsettings->refineIterations[3] = 1;\n\n\t// mode45\n\tsettings->mode_selection[2] = false;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 0;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 1;\n}\n\nvoid GetProfile_fast(bc7_enc_settings* settings)\n{\t\n    settings->channels = 3;\n\n\t// mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode13\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 12;\n\tsettings->fastSkipTreshold_mode3 = 4;\n    settings->fastSkipTreshold_mode7 = 0;\n\n\tsettings->refineIterations[1] = 2;\n\tsettings->refineIterations[3] = 1;\n\n\t// mode45\n\tsettings->mode_selection[2] = false;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 0;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_basic(bc7_enc_settings* settings)\n{\t\n    settings->channels = 3;\n\n\t// mode02\n\tsettings->mode_selection[0] = true;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode13\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 8+4;\n\tsettings->fastSkipTreshold_mode3 = 8;\n    settings->fastSkipTreshold_mode7 = 0;\n\n\tsettings->refineIterations[1] = 2;\n\tsettings->refineIterations[3] = 2;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 2;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_slow(bc7_enc_settings* settings)\n{\t\n    settings->channels = 3;\n\n\tint moreRefine = 2;\n\t// mode02\n\tsettings->mode_selection[0] = true;\n\tsettings->skip_mode2 = false;\n\n\tsettings->refineIterations[0] = 2+moreRefine;\n\tsettings->refineIterations[2] = 2+moreRefine;\n\n\t// mode13\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 64;\n\tsettings->fastSkipTreshold_mode3 = 64;\n\tsettings->fastSkipTreshold_mode7 = 0;\n\n\tsettings->refineIterations[1] = 2+moreRefine;\n\tsettings->refineIterations[3] = 2+moreRefine;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 2+moreRefine;\n\tsettings->refineIterations[4] = 2+moreRefine;\n\tsettings->refineIterations[5] = 2+moreRefine;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2+moreRefine;\n}\n\nvoid GetProfile_alpha_ultrafast(bc7_enc_settings* settings)\n{\t\n    settings->channels = 4;\n\n    // mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode137\n\tsettings->mode_selection[1] = false;\n\tsettings->fastSkipTreshold_mode1 = 0;\n\tsettings->fastSkipTreshold_mode3 = 0;\n    settings->fastSkipTreshold_mode7 = 4;\n\n\tsettings->refineIterations[1] = 1;\n\tsettings->refineIterations[3] = 1;\n    settings->refineIterations[7] = 2;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n    \n    settings->mode45_channel0 = 3;\n    settings->refineIterations_channel = 1;\n\tsettings->refineIterations[4] = 1;\n\tsettings->refineIterations[5] = 1;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_alpha_veryfast(bc7_enc_settings* settings)\n{\t\n    settings->channels = 4;\n\n    // mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode137\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 0;\n\tsettings->fastSkipTreshold_mode3 = 0;\n    settings->fastSkipTreshold_mode7 = 4;\n\n\tsettings->refineIterations[1] = 1;\n\tsettings->refineIterations[3] = 1;\n    settings->refineIterations[7] = 2;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n    \n    settings->mode45_channel0 = 3;\n    settings->refineIterations_channel = 2;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_alpha_fast(bc7_enc_settings* settings)\n{\t\n    settings->channels = 4;\n\n    // mode02\n\tsettings->mode_selection[0] = false;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode137\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 4;\n\tsettings->fastSkipTreshold_mode3 = 4;\n    settings->fastSkipTreshold_mode7 = 8;\n\n\tsettings->refineIterations[1] = 1;\n\tsettings->refineIterations[3] = 1;\n    settings->refineIterations[7] = 2;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n    \n    settings->mode45_channel0 = 3;\n    settings->refineIterations_channel = 2;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_alpha_basic(bc7_enc_settings* settings)\n{\t\n    settings->channels = 4;\n\n    // mode02\n\tsettings->mode_selection[0] = true;\n\tsettings->skip_mode2 = true;\n\n\tsettings->refineIterations[0] = 2;\n\tsettings->refineIterations[2] = 2;\n\n\t// mode137\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 8+4;\n\tsettings->fastSkipTreshold_mode3 = 8;\n    settings->fastSkipTreshold_mode7 = 8;\n\n\tsettings->refineIterations[1] = 2;\n\tsettings->refineIterations[3] = 2;\n    settings->refineIterations[7] = 2;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n    \n    settings->mode45_channel0 = 0;\n    settings->refineIterations_channel = 2;\n\tsettings->refineIterations[4] = 2;\n\tsettings->refineIterations[5] = 2;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2;\n}\n\nvoid GetProfile_alpha_slow(bc7_enc_settings* settings)\n{\t\n    settings->channels = 4;\n\n\tint moreRefine = 2;\n\t// mode02\n\tsettings->mode_selection[0] = true;\n\tsettings->skip_mode2 = false;\n\n\tsettings->refineIterations[0] = 2+moreRefine;\n\tsettings->refineIterations[2] = 2+moreRefine;\n\n\t// mode137\n\tsettings->mode_selection[1] = true;\n\tsettings->fastSkipTreshold_mode1 = 64;\n\tsettings->fastSkipTreshold_mode3 = 64;\n    settings->fastSkipTreshold_mode7 = 64;\n\n\tsettings->refineIterations[1] = 2+moreRefine;\n\tsettings->refineIterations[3] = 2+moreRefine;\n\tsettings->refineIterations[7] = 2+moreRefine;\n\n\t// mode45\n\tsettings->mode_selection[2] = true;\n\n    settings->mode45_channel0 = 0;\n\tsettings->refineIterations_channel = 2+moreRefine;\n\tsettings->refineIterations[4] = 2+moreRefine;\n\tsettings->refineIterations[5] = 2+moreRefine;\n\n\t// mode6\n\tsettings->mode_selection[3] = true;\n\n\tsettings->refineIterations[6] = 2+moreRefine;\n}\n\nvoid GetProfile_bc6h_veryfast(bc6h_enc_settings* settings)\n{\n    settings->slow_mode = false;\n    settings->fast_mode = true;\n    settings->fastSkipTreshold = 0;\n    settings->refineIterations_1p = 0;\n    settings->refineIterations_2p = 0;\n}\n\nvoid GetProfile_bc6h_fast(bc6h_enc_settings* settings)\n{\n    settings->slow_mode = false;\n    settings->fast_mode = true;\n    settings->fastSkipTreshold = 2;\n    settings->refineIterations_1p = 0;\n    settings->refineIterations_2p = 1;\n}\n\nvoid GetProfile_bc6h_basic(bc6h_enc_settings* settings)\n{\n    settings->slow_mode = false;\n    settings->fast_mode = false;\n    settings->fastSkipTreshold = 4;\n    settings->refineIterations_1p = 2;\n    settings->refineIterations_2p = 2;\n}\n\nvoid GetProfile_bc6h_slow(bc6h_enc_settings* settings)\n{\n    settings->slow_mode = true;\n    settings->fast_mode = false;\n    settings->fastSkipTreshold = 10;\n    settings->refineIterations_1p = 2;\n    settings->refineIterations_2p = 2;\n}\n\nvoid GetProfile_bc6h_veryslow(bc6h_enc_settings* settings)\n{\n    settings->slow_mode = true;\n    settings->fast_mode = false;\n    settings->fastSkipTreshold = 32;\n    settings->refineIterations_1p = 2;\n    settings->refineIterations_2p = 2;\n}\n\nvoid GetProfile_etc_slow(etc_enc_settings* settings)\n{\n    settings->fastSkipTreshold = 6;\n}\n\nvoid CompressBlocksBC1(const rgba_surface* src, uint8_t* dst)\n{\n\tispc::CompressBlocksBC1_ispc((ispc::rgba_surface*)src, dst);\n}\n\nvoid CompressBlocksBC3(const rgba_surface* src, uint8_t* dst)\n{\n\tispc::CompressBlocksBC3_ispc((ispc::rgba_surface*)src, dst);\n}\n\nvoid CompressBlocksBC7(const rgba_surface* src, uint8_t* dst, bc7_enc_settings* settings)\n{\n\tispc::CompressBlocksBC7_ispc((ispc::rgba_surface*)src, dst, (ispc::bc7_enc_settings*)settings);\n}\n\nvoid CompressBlocksBC6H(const rgba_surface* src, uint8_t* dst, bc6h_enc_settings* settings)\n{\n    ispc::CompressBlocksBC6H_ispc((ispc::rgba_surface*)src, dst, (ispc::bc6h_enc_settings*)settings);\n}\n\nvoid CompressBlocksETC1(const rgba_surface* src, uint8_t* dst, etc_enc_settings* settings)\n{\n    ispc::CompressBlocksETC1_ispc((ispc::rgba_surface*)src, dst, (ispc::etc_enc_settings*)settings);\n}\n"
  },
  {
    "path": "3rdParty/Intel/Source/ispc_texcomp.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#include <cstdint>\n\nstruct rgba_surface \n{\n    uint8_t* ptr;\n    int32_t width;\n    int32_t height;\n    int32_t stride;\n};\n\nstruct bc7_enc_settings\n{\n    bool mode_selection[4];\n    int refineIterations[8];\n\n    bool skip_mode2;\n    int fastSkipTreshold_mode1;\n    int fastSkipTreshold_mode3;\n    int fastSkipTreshold_mode7;\n\n    int mode45_channel0;\n    int refineIterations_channel;\n\n    int channels;\n};\n\nstruct bc6h_enc_settings\n{\n    bool slow_mode;\n    bool fast_mode;\n    int refineIterations_1p;\n    int refineIterations_2p;\n    int fastSkipTreshold;\n};\n\nstruct etc_enc_settings\n{\n    int fastSkipTreshold;\n};\n\nstruct astc_enc_settings\n{\n    int block_width;\n    int block_height;\n\n    int fastSkipTreshold;\n    int refineIterations;\n};\n\n// profiles for RGB data (alpha channel will be ignored)\nextern \"C\" void GetProfile_ultrafast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_veryfast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_fast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_basic(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_slow(bc7_enc_settings* settings);\n\n// profiles for RGBA inputs\nextern \"C\" void GetProfile_alpha_ultrafast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_alpha_veryfast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_alpha_fast(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_alpha_basic(bc7_enc_settings* settings);\nextern \"C\" void GetProfile_alpha_slow(bc7_enc_settings* settings);\n\n// profiles for BC6H (RGB HDR)\nextern \"C\" void GetProfile_bc6h_veryfast(bc6h_enc_settings* settings);\nextern \"C\" void GetProfile_bc6h_fast(bc6h_enc_settings* settings);\nextern \"C\" void GetProfile_bc6h_basic(bc6h_enc_settings* settings);\nextern \"C\" void GetProfile_bc6h_slow(bc6h_enc_settings* settings);\nextern \"C\" void GetProfile_bc6h_veryslow(bc6h_enc_settings* settings);\n\n// profiles for ETC\nextern \"C\" void GetProfile_etc_slow(etc_enc_settings* settings);\n\n// profiles for ASTC\nextern \"C\" void GetProfile_astc_fast(astc_enc_settings* settings, int block_width, int block_height);\n\n/*\n\tNotes:\n\t  - input width and height need to be a multiple of block size\n      - LDR input is 32 bit/pixel (sRGB), HDR is 64 bit/pixel (half float)\n\t  - dst buffer must be allocated with enough space for the compressed texture:\n\t\t4 bytes/block for BC1/ETC1, 8 bytes/block for BC3/BC6H/BC7/ASTC\n\t\tthe blocks are stored in raster scan order (natural CPU texture layout)\n\t  - you can use GetProfile_* functions to select various speed/quality tradeoffs.\n\t  - the RGB profiles are slightly faster as they ignore the alpha channel\n*/\n\nextern \"C\" void CompressBlocksBC1(const rgba_surface* src, uint8_t* dst);\nextern \"C\" void CompressBlocksBC3(const rgba_surface* src, uint8_t* dst);\nextern \"C\" void CompressBlocksBC6H(const rgba_surface* src, uint8_t* dst, bc6h_enc_settings* settings);\nextern \"C\" void CompressBlocksBC7(const rgba_surface* src, uint8_t* dst, bc7_enc_settings* settings);\nextern \"C\" void CompressBlocksETC1(const rgba_surface* src, uint8_t* dst, etc_enc_settings* settings);\nextern \"C\" void CompressBlocksASTC(const rgba_surface* src, uint8_t* dst, astc_enc_settings* settings);\n"
  },
  {
    "path": "3rdParty/Intel/Source/win32Threads.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#include <tchar.h>\n#include <string>\n#include <assert.h>     /* assert */\n#include \"win32Threads.h\"\n#include <strsafe.h>\n\n\n// Win32 thread API\nconst int kMaxWinThreads = 64;\n\nWinThreadData gWinThreadData[kMaxWinThreads];\n\nHANDLE gWinThreadWorkEvent[kMaxWinThreads];\nHANDLE gWinThreadStartEvent = NULL;\nHANDLE gWinThreadDoneEvent = NULL;\nint gNumWinThreads = 0;\n\nDWORD dwThreadIdArray[kMaxWinThreads];\nHANDLE hThreadArray[kMaxWinThreads];\n\n#define CHECK_WIN_THREAD_FUNC(x) \\\n\tdo { \\\n\t\tif(NULL == (x)) { \\\n\t\t\twchar_t wstr[256]; \\\n\t\t\tswprintf_s(wstr, L\"Error detected from call %s at line %d of main.cpp\", _T(#x), __LINE__); \\\n\t\t\tReportWinThreadError(wstr); \\\n\t\t} \\\n\t} \\\n\twhile(0)\n\nDWORD WINAPI CompressImageMT_Thread( LPVOID lpParam );\n\nvoid ReportWinThreadError(const wchar_t *str) {\n\n\t// Retrieve the system error message for the last-error code.\n\tLPVOID lpMsgBuf;\n\tLPVOID lpDisplayBuf;\n\tDWORD dw = GetLastError(); \n\n\tFormatMessage(\n\t\tFORMAT_MESSAGE_ALLOCATE_BUFFER | \n\t\tFORMAT_MESSAGE_FROM_SYSTEM |\n\t\tFORMAT_MESSAGE_IGNORE_INSERTS,\n\t\tNULL,\n\t\tdw,\n\t\tMAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n\t\t(LPTSTR) &lpMsgBuf,\n\t\t0, NULL );\n\n\t// Display the error message.\n\n\tlpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, \n\t\t(lstrlen((LPCTSTR) lpMsgBuf) + lstrlen((LPCTSTR)str) + 40) * sizeof(TCHAR)); \n\tStringCchPrintf((LPTSTR)lpDisplayBuf, \n\t\tLocalSize(lpDisplayBuf) / sizeof(TCHAR),\n\t\tTEXT(\"%s failed with error %d: %s\"), \n\t\tstr, dw, lpMsgBuf); \n\tMessageBox(NULL, (LPCTSTR) lpDisplayBuf, TEXT(\"Error\"), MB_OK); \n\n\t// Free error-handling buffer allocations.\n\n\tLocalFree(lpMsgBuf);\n\tLocalFree(lpDisplayBuf);\n}\n\n\t// Figure out how many cores there are on this machine\nint GetProcessorCount()\n{\n\tstatic int sProcessorCount;\n\tif (sProcessorCount == 0)\n\t{\n\t\tSYSTEM_INFO sysinfo = {};\n\t\tGetSystemInfo(&sysinfo);\n\t\tsProcessorCount = sysinfo.dwNumberOfProcessors;\n\t\tif (sProcessorCount < 1)\n\t\t\tsProcessorCount = 1;\n\t}\n\n\treturn sProcessorCount;\n}\n\nvoid InitWin32Threads() {\n\n\n\t// Already initialized?\n\tif(gNumWinThreads > 0) {\n\t\treturn;\n\t}\n\t\n\tSetLastError(0);\n\n\tgNumWinThreads = GetProcessorCount();\n\n\tif(gNumWinThreads >= MAXIMUM_WAIT_OBJECTS)\n\t\tgNumWinThreads = MAXIMUM_WAIT_OBJECTS;\n\n\tassert(gNumWinThreads <= kMaxWinThreads);\n\n\t// Create the synchronization events.\n\tfor(int i = 0; i < gNumWinThreads; i++) {\n\t\tCHECK_WIN_THREAD_FUNC(gWinThreadWorkEvent[i] = CreateEvent(NULL, FALSE, FALSE, NULL));\n\t}\n\n\tCHECK_WIN_THREAD_FUNC(gWinThreadStartEvent = CreateEvent(NULL, TRUE, FALSE, NULL));\n\tCHECK_WIN_THREAD_FUNC(gWinThreadDoneEvent = CreateEvent(NULL, TRUE, FALSE, NULL));\n\n\t// Create threads\n\tfor(int threadIdx = 0; threadIdx < gNumWinThreads; threadIdx++) {\n\t\tgWinThreadData[threadIdx].state = eThreadState_WaitForData;\n\t\tCHECK_WIN_THREAD_FUNC(hThreadArray[threadIdx] = CreateThread(NULL, 0, CompressImageMT_Thread, &gWinThreadData[threadIdx], 0, &dwThreadIdArray[threadIdx]));\n\t}\n}\n\nvoid DestroyThreads()\n{\n\t//if(gMultithreaded) \n\t//{\n\t\t// Release all windows threads that may be active...\n\t\tfor(int i=0; i < gNumWinThreads; i++) {\n\t\t\tgWinThreadData[i].state = eThreadState_Done;\n\t\t}\n\n\t\t// Send the event for the threads to start.\n\t\tCHECK_WIN_THREAD_FUNC(ResetEvent(gWinThreadDoneEvent));\n\t\tCHECK_WIN_THREAD_FUNC(SetEvent(gWinThreadStartEvent));\n\n\t\t// Wait for all the threads to finish....\n\t\tDWORD dwWaitRet = WaitForMultipleObjects(gNumWinThreads, hThreadArray, TRUE, INFINITE);\n\t\tif(WAIT_FAILED == dwWaitRet)\n\t\t\tReportWinThreadError(L\"DestroyThreads() -- WaitForMultipleObjects\");\n\n\t\t// !HACK! This doesn't actually do anything. There is either a bug in the \n\t\t// Intel compiler or the windows run-time that causes the threads to not\n\t\t// be cleaned up properly if the following two lines of code are not present.\n\t\t// Since we're passing INFINITE to WaitForMultipleObjects, that function will\n\t\t// never time out and per-microsoft spec, should never give this return value...\n\t\t// Even with these lines, the bug does not consistently disappear unless you\n\t\t// clean and rebuild. Heigenbug?\n\t\t//\n\t\t// If we compile with MSVC, then the following two lines are not necessary.\n\t\telse if(WAIT_TIMEOUT == dwWaitRet)\n\t\t\tOutputDebugString(\"DestroyThreads() -- WaitForMultipleObjects -- TIMEOUT\");\n\n\t\t// Reset the start event\n\t\tCHECK_WIN_THREAD_FUNC(ResetEvent(gWinThreadStartEvent));\n\t\tCHECK_WIN_THREAD_FUNC(SetEvent(gWinThreadDoneEvent));\n\n\t\t// Close all thread handles.\n\t\tfor(int i=0; i < gNumWinThreads; i++) {\n\t\t\tCHECK_WIN_THREAD_FUNC(CloseHandle(hThreadArray[i]));\n\t\t}\n\n\t\tfor(int i =0; i < kMaxWinThreads; i++ ){\n\t\t\thThreadArray[i] = NULL;\n\t\t}\n\n\t\t// Close all event handles...\n\t\tCHECK_WIN_THREAD_FUNC(CloseHandle(gWinThreadDoneEvent)); \n\t\tgWinThreadDoneEvent = NULL;\n\t\t\t\n\t\tCHECK_WIN_THREAD_FUNC(CloseHandle(gWinThreadStartEvent)); \n\t\tgWinThreadStartEvent = NULL;\n\n\t\tfor(int i = 0; i < gNumWinThreads; i++) {\n\t\t\tCHECK_WIN_THREAD_FUNC(CloseHandle(gWinThreadWorkEvent[i]));\n\t\t}\n\n\t\tfor(int i = 0; i < kMaxWinThreads; i++) {\n\t\t\tgWinThreadWorkEvent[i] = NULL;\n\t\t}\n\n\t\tgNumWinThreads = 0;\n\t//}\n}\n\nint GetBytesPerBlock(DXGI_FORMAT format)\n{\n\tswitch(format) \n\t{\n\t\tdefault:\n\t\tcase DXGI_FORMAT_BC1_UNORM_SRGB:\n\t\tcase DXGI_FORMAT_BC1_UNORM:\n\t\t\treturn 8;\n\t\t\t\t\n\t\tcase DXGI_FORMAT_BC3_UNORM_SRGB:\n\t\tcase DXGI_FORMAT_BC3_UNORM:\n\t\tcase DXGI_FORMAT_BC7_UNORM_SRGB:\n\t\tcase DXGI_FORMAT_BC7_UNORM:\n        case DXGI_FORMAT_BC6H_UF16:\n        case DXGI_FORMAT_BC6H_SF16:\n\t\t\treturn 16;\n\t}\n}\n\nbool CompressImageMT(const rgba_surface* input, BYTE* output, CompressionFunc* cmpFunc, DXGI_FORMAT compformat) \n{\n\tconst int numThreads = gNumWinThreads;\n\tconst int bytesPerBlock = GetBytesPerBlock(compformat);\n\n\t// We want to split the data evenly among all threads.\n\tconst int linesPerThread = (input->height + numThreads - 1) / numThreads;\n\n\t// Load the threads.\n\tfor(int threadIdx = 0; threadIdx < numThreads; threadIdx++) \n\t{\n\t\tint y_start = (linesPerThread*threadIdx)/4*4;\n\t\tint y_end = (linesPerThread*(threadIdx+1))/4*4;\n\t\tif (y_end > input->height) y_end = input->height;\n\t\t\n\t\tWinThreadData *data = &gWinThreadData[threadIdx];\n\t\tdata->input = *input;\n\t\tdata->input.ptr = input->ptr + y_start * input->stride;\n\t\tdata->input.height = y_end-y_start;\n\t\tdata->output = output + (y_start/4) * (input->width/4) * bytesPerBlock;\n\t\tdata->state = eThreadState_DataLoaded;\n\t\tdata->threadIdx = threadIdx;\n\t\tdata->cmpFunc = cmpFunc;\n\t}\n\n\t// Send the event for the threads to start.\n\tCHECK_WIN_THREAD_FUNC(ResetEvent(gWinThreadDoneEvent));\n\tCHECK_WIN_THREAD_FUNC(SetEvent(gWinThreadStartEvent));\n\n\t// Wait for all the threads to finish\n\tif(WAIT_FAILED == WaitForMultipleObjects(numThreads, gWinThreadWorkEvent, TRUE, INFINITE))\n\t\t\tReportWinThreadError(L\"CompressImageDXTWIN -- WaitForMultipleObjects\");\n\n\t// Reset the start event\n\tCHECK_WIN_THREAD_FUNC(ResetEvent(gWinThreadStartEvent));\n\tCHECK_WIN_THREAD_FUNC(SetEvent(gWinThreadDoneEvent));\n\n\treturn true;\n}\n\nDWORD WINAPI CompressImageMT_Thread( LPVOID lpParam ) \n{\n\tWinThreadData *data = reinterpret_cast<WinThreadData *>(lpParam);\n\n\twhile(data->state != eThreadState_Done) {\n\n\t\tif(WAIT_FAILED == WaitForSingleObject(gWinThreadStartEvent, INFINITE))\n\t\t\tReportWinThreadError(L\"CompressImageDXTWinThread -- WaitForSingleObject\");\n\n\t\tif(data->state == eThreadState_Done)\n\t\t\tbreak;\n\n\t\tdata->state = eThreadState_Running;\n\t\t(*(data->cmpFunc))(&data->input, data->output);\n\n\t\tdata->state = eThreadState_WaitForData;\n\n\t\tHANDLE workEvent = gWinThreadWorkEvent[data->threadIdx];\n\t\tif(WAIT_FAILED == SignalObjectAndWait(workEvent, gWinThreadDoneEvent, INFINITE, FALSE))\n\t\t\tReportWinThreadError(L\"CompressImageDXTWinThread -- SignalObjectAndWait\");\n\t}\n\n\treturn 0;\n}\n\n\nbool CompressImageST(const rgba_surface* input, uint8_t* output, CompressionFunc* cmpFunc, DXGI_FORMAT compformat)\n{\n\t(*cmpFunc)(input, output);\n\n\treturn true;\n}\n\n\n/////////////////////////////////////////////////////////////////////////////////////////////////////\n/////////////////////////////////////////////////////////////////////////////////////////////////////\n/////////////////////////////////////////////////////////////////////////////////////////////////////\n//CALL IN TO ISPC CODE\nvoid CompressImageBC1(const rgba_surface* input, BYTE* output)\n{\n\tCompressBlocksBC1(input, output);\n}\n\nvoid CompressImageBC3(const rgba_surface* input, BYTE* output)\n{\n\tCompressBlocksBC3(input, output);\n}\n\n#define DECLARE_CompressImageBC7_profile(profile)\t\t\t\t\t\t\t\t\\\nvoid CompressImageBC7_ ## profile(const rgba_surface* input, BYTE* output)\t\t\\\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tbc7_enc_settings settings;\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tGetProfile_ ## profile(&settings);\t\t\t\t\t\t\t\t\t\t\t\\\n\tCompressBlocksBC7(input, output, &settings);\t\t\t\t\t\t\t\t\\\n}\n\n#define DECLARE_CompressImageBC6H_profile(profile)\t\t\t\t\t\t\t\t\\\nvoid CompressImageBC6H_ ## profile(const rgba_surface* input, BYTE* output)\t\t\\\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tbc6h_enc_settings settings;\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tGetProfile_bc6h_ ## profile(&settings);\t\t\t\t\t\t\t\t\t\t\\\n\tCompressBlocksBC6H(input, output, &settings);\t\t\t\t\t\t\t\t\\\n}\n\nDECLARE_CompressImageBC6H_profile(veryfast);\nDECLARE_CompressImageBC6H_profile(fast);\nDECLARE_CompressImageBC6H_profile(basic);\nDECLARE_CompressImageBC6H_profile(slow);\nDECLARE_CompressImageBC6H_profile(veryslow);\n\nDECLARE_CompressImageBC7_profile(ultrafast);\nDECLARE_CompressImageBC7_profile(veryfast);\nDECLARE_CompressImageBC7_profile(fast);\nDECLARE_CompressImageBC7_profile(basic);\nDECLARE_CompressImageBC7_profile(slow);\nDECLARE_CompressImageBC7_profile(alpha_ultrafast);\nDECLARE_CompressImageBC7_profile(alpha_veryfast);\nDECLARE_CompressImageBC7_profile(alpha_fast);\nDECLARE_CompressImageBC7_profile(alpha_basic);\nDECLARE_CompressImageBC7_profile(alpha_slow);"
  },
  {
    "path": "3rdParty/Intel/Source/win32Threads.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\n#pragma once\n\n#include <windows.h>\n#include <dxgiformat.h>\n#include \"ispc_texcomp.h\"\n\n\ntypedef void (CompressionFunc)(const rgba_surface* input, BYTE* output);\n\nenum EThreadState {\n\teThreadState_WaitForData,\n\teThreadState_DataLoaded,\n\teThreadState_Running,\n\teThreadState_Done\n};\n\nstruct WinThreadData {\n\tEThreadState state;\n\tint threadIdx;\n\tCompressionFunc* cmpFunc;\n\trgba_surface input;\n\tBYTE *output;\n\n\t// Defaults..\n\tWinThreadData() :\n\t\tstate(eThreadState_Done),\n\t\tthreadIdx(-1),\n\t\tinput(),\n\t\toutput(NULL),\n\t\tcmpFunc(NULL)\n\t{ }\n\n};\n\n// Win32 thread API\nint GetProcessorCount();\t// 1 or more\n\nvoid DestroyThreads();\nvoid InitWin32Threads();\n\nbool CompressImageMT(const rgba_surface* input, BYTE* output, CompressionFunc* cmpFunc, DXGI_FORMAT compformat);\nbool CompressImageST(const rgba_surface* input, uint8_t* output, CompressionFunc* cmpFunc, DXGI_FORMAT compformat);\n\n\n\n/////////////////////////////////////////////////////////////////////////////////////////////////////\n//CALL IN TO ISPC CODE\nvoid CompressImageBC1(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC3(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_ultrafast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_veryfast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_fast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_basic(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_slow(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_alpha_ultrafast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_alpha_veryfast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_alpha_fast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_alpha_basic(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC7_alpha_slow(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC6H_veryfast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC6H_fast(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC6H_basic(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC6H_slow(const rgba_surface* input, BYTE* output);\nvoid CompressImageBC6H_veryslow(const rgba_surface* input, BYTE* output);\n\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelPlugin.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n#include \"IntelPlugin.h\"\r\n#include \"IntelPluginUIWin.h\"\r\n#include \"SaveOptionsDialog.h\"\r\n\r\nusing namespace DirectX;\r\n\r\n\t// this global pointer is necessary to use code from PIUSuites.cpp\r\nSPBasicSuite * sSPBasic = NULL;\r\n\r\n\r\nIntelPlugin& IntelPlugin::GetInstance()\r\n{\r\n\tstatic IntelPlugin singleton;\r\n\treturn singleton;\r\n}\r\n\r\nIntelPlugin::IntelPlugin(void)\r\n{\r\n\tmemset(&ps, 0, sizeof(ps));\r\n}\r\n\r\n\r\nIntelPlugin::~IntelPlugin(void)\r\n{\r\n}\r\n\r\n\r\n// ===========================================================================\r\nbool IntelPlugin::IsCombinationValid(TextureTypeEnum textype, CompressionTypeEnum comptype)\r\n{\r\n\tif (textype < TextureTypeEnum::TEXTURE_TYPE_COUNT && comptype < CompressionTypeEnum::COMPRESSION_TYPE_COUNT)\r\n\t{\r\n\t\t// ---------------------------------------------------------------------------\r\n\t\t//Matrix of which compression options make sense depending on the selected texture type\r\n\t\t//Rows are the TextureTypeEnum, and Columns the Compression types\r\n\t\tbool CompressionVsTextureTypeMatrix[][CompressionTypeEnum::COMPRESSION_TYPE_COUNT] =\r\n\t\t{ \r\n\t\t//   BC1,    BC1_SRGB,   BC3,    BC3_SRGB,   BC6H_FAST    BC6H_FINE   BC7_FAST   BC7_FINE   BC7_SRGB_FAST   BC7_SRGB_FINE   BC4     BC5     NONE\r\n\t\t\t{true,   true,       false,  false,      true,        true,       true,      true,      true,           true,           true,   false,  true}, //COLOR\r\n\t\t\t{false,  false,      true,   true,       false,       false,      true,      true,      true,           true,           false,  false,  true}, //COLOR+A\r\n\t\t\t{true,   true,       true,   true,       true,        true,       true,      true,      true,           true,           false,  false,  true}, //CUBEMAP+LAYER\r\n\t\t\t{true,   true,       true,   true,       true,        true,       true,      true,      true,           true,           false,  false,  true}, //CUBEMAP+CROSS\r\n\t\t\t{false,   false,     false,  false,      false,       false,      false,     false,     false,          false,          false,  true,   true}, //NORMAL MAP\r\n\t\t};\r\n\r\n\t\treturn CompressionVsTextureTypeMatrix[textype][comptype];\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Cursor WAIT->ARROW convenince functions\r\nvoid IntelPlugin::showLoadingCursor()\r\n{\r\n\t::SetCursor( LoadCursor( 0, IDC_WAIT ) );\r\n}\r\n\r\nvoid IntelPlugin::showNormalCursor()\r\n{\r\n\t//Forces a WM_SETCURSOR message.\r\n    POINT pt; // Screen coordinates!\r\n    ::GetCursorPos(&pt);\r\n    ::SetCursorPos( pt.x, pt.y );\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Copy data from photoshop buffer into scrUncompressedImageScratch_\r\nbool IntelPlugin::CopyDataForEncoding(ScratchImage *scrUncompressedImageScratch_, bool hasAlpha_, bool DoMipMaps_, bool gammaCorrect)\r\n{\r\n\t//Do advanceState to get image data, fill the ps.formatRecord->data buffer\r\n\tFetchImageData();\r\n\r\n\tint planesToGet_ = ps.formatRecord->hiPlane - ps.formatRecord->loPlane + 1;\r\n\r\n\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t{\r\n\t\t//Allocate space for one rgba 16bit float image \r\n\t\tscrUncompressedImageScratch_->Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v, 1, 1, DDS_FLAGS_NONE);\r\n\r\n\t\t//Get pointer to first (and only) image, cast to 16bit for BC6\r\n\t\tunsigned16 *rowBigDataPtr = reinterpret_cast<unsigned16 *>(scrUncompressedImageScratch_->GetImages()->pixels);\r\n\r\n\t\t//Copy data from photoshop buffer into scrUncompressedImageScratch\r\n\t\t//Convert pixels to 16Bit for BC6 encoding\r\n\t\tif (ps.formatRecord->depth == 8)\r\n\t\t{\r\n\t\t\tConvertToBC6From8Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t{\r\n\t\t\tConvertToBC6From16Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t{\r\n\t\t\tConvertToBC6From32Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse if (ps.data->encoding_g == DXGI_FORMAT_BC4_UNORM || ps.data->encoding_g == DXGI_FORMAT_BC5_UNORM)\r\n\t{\r\n\t\t//Allocate space for one rgba 8bit image \r\n\t\tscrUncompressedImageScratch_->Initialize2D(DXGI_FORMAT_R8G8B8A8_UNORM, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v, 1, 1, DDS_FLAGS_NONE);\r\n\t\t\r\n\t\t//Get pointer to first (and only) image\r\n\t\tunsigned8 *rowBigDataPtr = scrUncompressedImageScratch_->GetImages()->pixels;\r\n\r\n\t\t//Copy data from photoshop buffer into scrUncompressedImageScratch\r\n\t\t//Convert pixels to 8bit for BC4/5 encoding\r\n\t\tif (ps.formatRecord->depth == 8)\r\n\t\t{\r\n\t\t\tConvertToBC4or5From8Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t{\r\n\t\t\tConvertToBC4or5From16Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t{\r\n\t\t\tConvertToBC4or5From32Bit(rowBigDataPtr, planesToGet_, hasAlpha_, gammaCorrect);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse //BC1,3,7 or uncompressed\r\n\t{\r\n\t\t//Allocate space for one rgba 8bit image \r\n\t\tscrUncompressedImageScratch_->Initialize2D(DXGI_FORMAT_R8G8B8A8_UNORM, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v, 1, 1, DDS_FLAGS_NONE);\r\n\r\n\t\t//If SRGB encoding, force Scratch image to SRGB format. So that the MipMap generation is done correctly for RGB images\r\n\t\tif (IsSRGB(ps.data->encoding_g) && DoMipMaps_)\r\n\t\t    scrUncompressedImageScratch_->OverrideFormat(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB);\r\n\r\n\t\t//Get pointer to first (and only) image\r\n\t\tunsigned8 *rowBigDataPtr = scrUncompressedImageScratch_->GetImages()->pixels;\r\n\t\t\r\n\t\t//Copy data from photoshop buffer into scrUncompressedImageScratch\r\n\t\t//Convert pixels to 8bit for BC encoding\r\n\t\tif (ps.formatRecord->depth == 8)\r\n\t\t{\r\n\t\t\tConvertToBCFrom8Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t{\r\n\t\t\tConvertToBCFrom16Bit(rowBigDataPtr, planesToGet_, hasAlpha_);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t{\r\n\t\t\tConvertToBCFrom32Bit(rowBigDataPtr, planesToGet_, hasAlpha_, gammaCorrect);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn true;\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Take an Uncompressed ScratchImage scrUncompressedImageScratch_ and Compresses it into scrImageScratch_\r\nbool IntelPlugin::CompressToScratchImage(ScratchImage **scrImageScratch_, ScratchImage **scrUncompressedImageScratch_, bool hasAlpha_)\r\n{\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//Compress image, section\r\n\t//ISPC is used for BC1,3,6,7. BC4,5 is done using DirectXTex Lib in one of the previous sections\r\n\tif (ps.data->encoding_g != DXGI_FORMAT_BC4_UNORM && ps.data->encoding_g != DXGI_FORMAT_BC5_UNORM && ps.data->encoding_g !=DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t{\r\n\t\t//How many mip levels are generated? If no mip map override this is 1 so that only one image is encoded\r\n\t\tsize_t mipLevels = (*scrUncompressedImageScratch_)->GetMetadata().mipLevels;\r\n\t\r\n\t\t//Allocate space for Image + mip chain, according to what the uncompressed image size/miplevel\r\n\t\t//Check if cubemap or not (a cubemap has an arraysize of six)\r\n\t\tif ((*scrUncompressedImageScratch_)->GetMetadata().arraySize == 6)\r\n\t\t{\r\n\t\t\t//Image is a CubeMap\r\n\t\t\t(*scrImageScratch_)->InitializeCube(ps.data->encoding_g, (*scrUncompressedImageScratch_)->GetMetadata().width, \r\n\t\t\t\t\t\t\t\t\t\t\t   (*scrUncompressedImageScratch_)->GetMetadata().height, 1, mipLevels);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//Image is a 2D texture\r\n\t\t\t(*scrImageScratch_)->Initialize2D(ps.data->encoding_g, (*scrUncompressedImageScratch_)->GetMetadata().width, \r\n\t\t\t\t\t\t\t\t\t\t\t (*scrUncompressedImageScratch_)->GetMetadata().height, 1, mipLevels, DDS_FLAGS_NONE);\r\n\t\t}\r\n\t\r\n\t\t//Get pointer to image chains for compressed and uncompressed scratchImage\r\n\t\tconst Image* imgCompressed = (*scrImageScratch_)->GetImages();\r\n\t\tconst Image* imgUnCompressedMipMap = (*scrUncompressedImageScratch_)->GetImages();\r\n\t\r\n\t\t//Number of total images (Image1+MipChain), (Image2+MipChain), ..... (Multiple Images image array only in case of Cube Maps)\r\n\t\tsize_t nimgCompressed = (*scrImageScratch_)->GetImageCount();\r\n\t\tif (nimgCompressed == 0)\r\n\t\t{\r\n\t\t\tUserError(\"Can not allocate compressed image\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//StopWatch stopWatch;\r\n\t\t//stopWatch.Reset();\r\n\t\t//stopWatch.Start();\r\n\t\t//ISPC is used on for BC1,3,6,7.\r\n\t\t//Iterate over the whole image chain (Image+MipChain) \r\n\t\tfor (size_t allImagesIndex = 0; allImagesIndex < nimgCompressed; allImagesIndex++)\r\n\t\t{\r\n\t\t\t//Fill in the struct needed by Intel ispc code with the uncompressed  image\r\n\t\t\trgba_surface input;\r\n\t\t\t \r\n\t\t\t//Get pointer to this image in the chain\r\n\t\t\tconst Image* rgbaimg = &imgUnCompressedMipMap[allImagesIndex];\r\n\t\t\t\r\n\t\t\tinput.height = int32_t(rgbaimg->height);\r\n\t\t\tinput.width = int32_t(rgbaimg->width);\r\n\t\t\tinput.ptr =  rgbaimg->pixels; //buffer in unsigned8* format\r\n\t\t\tinput.stride = int32_t(rgbaimg->rowPitch); //number of bytes of a row\r\n\r\n\t\t\t//Determine if the image size is not multiples of 4.\r\n\t\t\t//In that case it needs padding when encoding\r\n\t\t\tbool DoPadding = ((input.height | input.width) & 0x3) != 0;\r\n\r\n\t\t\t//If it needs padding, process it\r\n\t\t\tif (DoPadding)\r\n\t\t\t\tinput = DoPaddingToMultiplesOf4(input);\r\n\r\n\t\t\t//Call in ISPC compression functions, output compressed image into imgCompressed[allImagesIndex]\r\n\t\t\tISPC_compression(input, imgCompressed[allImagesIndex], hasAlpha_);\r\n\r\n\t\t\t//If padding free buffer that got allocated\r\n\t\t\tif (DoPadding)\r\n\t\t\t\tdelete [] input.ptr;\r\n\t\t}\r\n\t\t//stopWatch.Stop();\r\n\t\t//std::stringstream ss;\r\n\t\t//ss << stopWatch.TimeInMilliseconds();\r\n\t\t//errorMessage(ss.str(),\"Time\"); \r\n\t}\r\n\telse if (ps.data->encoding_g == DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t{\r\n\t\t//Uncompressed do nothing, just swap pointers and free space\r\n\t\tdelete *scrImageScratch_;\r\n\t\t*scrImageScratch_ = *scrUncompressedImageScratch_;\r\n\t    *scrUncompressedImageScratch_ = NULL;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Compress into srcImageScratch using the DirectXTex BC4,5 routines\r\n\t\tHRESULT hr = Compress((*scrUncompressedImageScratch_)->GetImages(), (*scrUncompressedImageScratch_)->GetImageCount(), (*scrUncompressedImageScratch_)->GetMetadata(), \r\n\t\t\t                  ps.data->encoding_g, TEX_COMPRESS_DEFAULT, 0.5f, **scrImageScratch_);\r\n\t    if (hr != S_OK)\r\n\t    {\r\n\t\t\tif (ps.data->encoding_g == DXGI_FORMAT_BC4_UNORM)\r\n\t\t\t    UserError(\"Could not compress to BC4\");\r\n\t\t\telse\r\n\t\t\t\tUserError(\"Could not compress to BC5\");\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t    }\r\n\t}\r\n\t\t\r\n\treturn true;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Conversion functions from Photoshop buffer to 8bit/16bit ready encoding buffer\r\nbool IntelPlugin::ConvertToBC6From8Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 8)\r\n\t\treturn false;\r\n\r\n\t//Get image pointer\r\n\tunsigned8 *rowData = static_cast<unsigned8 *>(ps.formatRecord->data);\r\n\t\r\n\t//Copy image into RGBA buffer, alpha is not copied for now\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;\r\n\r\n\t\t//We assign black to other channels if photoshop does not provide enough channels, as the compressed image must be RGBA\r\n\t    tgtDataPtr[0] = ConvertTo16Bit(rowData[index]);\r\n\t    tgtDataPtr[1] = (planesToGet > 1)? ConvertTo16Bit(rowData[index+1]) : 0;\r\n\t    tgtDataPtr[2] = (planesToGet > 2)? ConvertTo16Bit(rowData[index+2]) : 0;\r\n\t\t//BC6 does not have alpha, but we copy it for preview. It will get discarded on compression\r\n\t    tgtDataPtr[3] = hasAlphaChannel? ConvertTo16Bit(rowData[index+3]) : F32toF16(1.f);  \r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBC6From16Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 16)\r\n\t\treturn false;\r\n\t\r\n\tunsigned16 *rowData16bit = static_cast<unsigned16 *>(ps.formatRecord->data);\r\n\t\r\n\t//Copy image into RGBA buffer, alpha is not copied for now\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;\r\n\t\t\r\n\t\t//We assign black to other channels if photoshop does not provide enough channels, as the compressed text must be RGBA\r\n\t\ttgtDataPtr[0] = ConvertTo16Bit(rowData16bit[index]);\r\n\t    tgtDataPtr[1] = (planesToGet > 1)? ConvertTo16Bit(rowData16bit[index+1]) : 0;\r\n\t\ttgtDataPtr[2] = (planesToGet > 2)? ConvertTo16Bit(rowData16bit[index+2]) : 0;\r\n\t\t//BC6 does not have alpha, but we copy it for preview. It will get discarded on compression\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo16Bit(rowData16bit[index+3]) : F32toF16(1.f);  \r\n\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBC6From32Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\t\r\n\tif (ps.formatRecord->depth != 32)\r\n\t\treturn false;\r\n\r\n\tfloat *rowData32bit = static_cast<float *>(ps.formatRecord->data);\r\n\t\r\n\t//Copy image into RGBA buffer, alpha is not copied for now\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;\r\n\t\t\r\n\t\t//We assign black to other channels if photoshop does not provide enough channels, as the compressed text must be RGBA\r\n\t\ttgtDataPtr[0] = ConvertTo16Bit(rowData32bit[index]);\r\n\t\ttgtDataPtr[1] = (planesToGet > 1)? ConvertTo16Bit(rowData32bit[index+1]) : 0;\r\n\t\ttgtDataPtr[2] = (planesToGet > 2)? ConvertTo16Bit(rowData32bit[index+2]) : 0;\r\n\t\t//BC6 does not have alpha, but we copy it for preview. It will get discarded on compression\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo16Bit(rowData32bit[index+2]) : F32toF16(1.f); \r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBC4or5From32Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel, bool gammaCorrect)\r\n{\t\r\n\tif (ps.formatRecord->depth != 32)\r\n\t\treturn false;\r\n\r\n\tfloat *rowData32bit = static_cast<float *>(ps.formatRecord->data);\r\n\t\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;//height*ps.formatRecord->imageSize.h*ps.formatRecord->planes + width*ps.formatRecord->planes;\r\n\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData32bit[index], gammaCorrect);\r\n\t\ttgtDataPtr[1] = (planesToGet>1)? ConvertTo8Bit(rowData32bit[index+1], gammaCorrect) : tgtDataPtr[0]; //if BC4 all channels get the R plane, if BC5 we take the RG planes\r\n\t\ttgtDataPtr[2] = (planesToGet>2)? ConvertTo8Bit(rowData32bit[index+2], gammaCorrect) : tgtDataPtr[0]; //Copy the B channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData32bit[index+3], gammaCorrect) : 255; //Copy the A channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBC4or5From16Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 16)\r\n\t\treturn false;\r\n\t\r\n\tunsigned16 *rowData16bit = static_cast<unsigned16 *>(ps.formatRecord->data);\r\n\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;//height*ps.formatRecord->imageSize.h*ps.formatRecord->planes + width*ps.formatRecord->planes;\r\n\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData16bit[index]);\r\n\t\ttgtDataPtr[1] = (planesToGet>1)? ConvertTo8Bit(rowData16bit[index+1]) : tgtDataPtr[0]; //if BC4 all channels get the R plane, if BC5 we take the RG planes\r\n\t\ttgtDataPtr[2] = (planesToGet>2)? ConvertTo8Bit(rowData16bit[index+2]) : tgtDataPtr[0]; //Copy the B channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData16bit[index+3]) : 255; //Copy the A channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBC4or5From8Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 8)\r\n\t\treturn false;\r\n\r\n\t//Get image pointer\r\n\tunsigned8 *rowData = static_cast<unsigned8 *>(ps.formatRecord->data);\r\n\t\r\n\t//Copy image into RGBA buffer, alpha is not copied \r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData[index]);\r\n\t\ttgtDataPtr[1] = (planesToGet>1)? ConvertTo8Bit(rowData[index+1]) : tgtDataPtr[0]; //if BC4 all channels get the R plane, if BC5 we take the RG planes\r\n\t\ttgtDataPtr[2] = (planesToGet>2)? ConvertTo8Bit(rowData[index+2]) : tgtDataPtr[0]; //Copy the B channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData[index+3]) : 255; //Copy the A channel for preview, it will get discarded on compression\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nPOINT IntelPlugin::GetPreviewDimensions()\r\n{\r\n\tPOINT ret = {ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v};\r\n\tif (ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\tret.x *= 4;\r\n\t\tret.y *= 3;\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nint IntelPlugin::GetCompressedByteSize()\r\n{\r\n\treturn preview.compressedSize;\r\n}\r\n\r\nint IntelPlugin::GetOriginalBitsPerPixel()\r\n{\r\n\tint planes = ps.formatRecord->planes;\r\n\tif (planes > 3 && ps.data->TextureTypeIndex!=TextureTypeEnum::COLOR_ALPHA)\t// we have enough planes for alpha but are not exporting it right now\r\n\t\tplanes--;\r\n\r\n\treturn ps.formatRecord->depth * planes;\r\n}\r\n\r\nint IntelPlugin::GetOriginalByteSize()\r\n{\r\n\tint byteSize =  ps.formatRecord->imageSize.h * ps.formatRecord->imageSize.v * ((GetOriginalBitsPerPixel() + 7) >> 3);\r\n\r\n\tswitch (ps.data->TextureTypeIndex)\r\n\t{\r\n\tcase TextureTypeEnum::CUBEMAP_LAYERS:\r\n\t\tbyteSize *= 6;\r\n\t\tbreak;\r\n\tcase TextureTypeEnum::CUBEMAP_CROSSED:\t// a cross view only uses half the image resolution\r\n\t\tbyteSize = byteSize >> 1;\t\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn byteSize;\r\n}\r\n\r\nint IntelPlugin::GetLayerCount()\r\n{\r\n\tint layerCount = 0;\r\n\tfor (auto layer = ps.formatRecord->documentInfo->layersDescriptor; layer; layer = layer->next)\r\n\t\tlayerCount++;\r\n\r\n\treturn layerCount;\r\n}\r\n\r\n// get RGB buffer\r\nvoid IntelPlugin::FetchPreviewRGB(unsigned8 *dst, int width, int height, int xo, int yo, double zoom, int previewOptions, int matteColor)\r\n{\r\n\tFetchImageData();\r\n\r\n\tif (!(previewOptions & PREVIEW_CHANNEL_MASK))\r\n\t\tpreviewOptions |= PREVIEW_CHANNEL_RGB;\r\n\r\n\t// default use original source\r\n\tint planes = ps.formatRecord->hiPlane - ps.formatRecord->loPlane + 1;\r\n\tint srcWidth = ps.formatRecord->theRect.right - ps.formatRecord->theRect.left;\r\n\tint srcHeight = ps.formatRecord->theRect.bottom - ps.formatRecord->theRect.top;\r\n\tint depthOrFormat = ps.formatRecord->depth;\r\n\tint rowPitch = ps.formatRecord->rowBytes; \r\n\tconst uint8 * pixelData = static_cast<const uint8 *>(ps.formatRecord->data);\r\n\tauto exposure = ps.data->exposure;\r\n\r\n\tint mipLevel = (ps.data->SetMipLevel ? ps.data->MipLevel : 0);\r\n\tzoom = zoom / (1 << mipLevel);\r\n\r\n\t//Note\r\n\t//The Get(Un)CompressedImageForPreview() functions and the preview scratchimage are only used if the image to be fetched is compressed\r\n\t//or its a cube map or has mip layers. Otherwise the above pixelData is used as is.\r\n\r\n\t// flush invalid previews based on parameter changes...\r\n\tif (preview.textureType != ps.data->TextureTypeIndex || preview.mipMap != ps.data->MipMapTypeIndex || preview.mipLevel != mipLevel || \r\n\t\tpreview.flipRChannel != ps.data->FlipX || preview.flipGChannel != ps.data->FlipY)\r\n\t{\r\n\t\tif (preview.uncompressedImage)\r\n\t\t{\r\n\t\t\tdelete preview.uncompressedImage;\r\n\t\t\tpreview.uncompressedImage = NULL;\r\n\t\t}\r\n\r\n\t\tif (preview.compressedImage)\r\n\t\t{\r\n\t\t\tdelete preview.compressedImage;\r\n\t\t\tpreview.compressedImage = NULL;\r\n\t\t\tpreview.compressedSize = 0;\r\n\t\t}\r\n\r\n\t\tpreview.textureType = ps.data->TextureTypeIndex;\r\n\t\tpreview.mipMap = ps.data->MipMapTypeIndex;\r\n\t\tpreview.mipLevel = mipLevel;\r\n\t\tpreview.flipRChannel = ps.data->FlipX;\r\n\t\tpreview.flipGChannel = ps.data->FlipY;\r\n\t}\r\n\r\n\tif (preview.encoding != ps.data->encoding_g || preview.fastBc67 != ps.data->fast_bc67)\r\n\t{\r\n\t\tif (preview.compressedImage)\r\n\t\t{\r\n\t\t\tdelete preview.compressedImage;\r\n\t\t\tpreview.compressedImage = NULL;\r\n\t\t}\r\n\r\n\t\tpreview.encoding = ps.data->encoding_g;\r\n\t\tpreview.fastBc67 = ps.data->fast_bc67;\r\n\t}\r\n\r\n\tif ((previewOptions & PREVIEW_SOURCE_MASK) == PREVIEW_SOURCE_COMPRESSED)\r\n\t{\r\n\t\tif (!preview.compressedImage)\r\n\t\t\tpreview.compressedImage = GetCompressedImageForPreview(planes, preview.compressedSize);\r\n\r\n\t\tif (!preview.compressedImage)\t// Compressed can return NULL, ie no compression, so set it to uncompressed version\r\n\t\t\tpreview.compressedImage = GetUncompressedImageForPreview(planes); \r\n\r\n\t\tif (preview.compressedImage)\t// shouldn't be null\r\n\t\t{\r\n\t\t\tauto image = preview.compressedImage->GetImages();\r\n\t\t\tplanes = 4;\r\n\t\t\tsrcWidth = int(image->width);\r\n\t\t\tsrcHeight = int(image->height);\r\n\t\t\tdepthOrFormat = image->format;\r\n\t\t\trowPitch = int(image->rowPitch);\r\n\t\t\tpixelData = image->pixels;\r\n\t\t}\r\n\t}\r\n\telse if (ps.data->MipMapTypeIndex == MipmapEnum::FROM_LAYERS || ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_CROSSED || ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\tif (!preview.uncompressedImage)\r\n\t\t\tpreview.uncompressedImage = GetUncompressedImageForPreview(planes);\r\n\r\n\t\tif (preview.uncompressedImage)\t// shouldn't be null\r\n\t\t{\r\n\t\t\tauto image = preview.uncompressedImage->GetImages();\r\n\t\t\tplanes = 4;\r\n\t\t\tsrcWidth = int(image->width);\r\n\t\t\tsrcHeight = int(image->height);\r\n\t\t\tdepthOrFormat = image->format;\r\n\t\t\trowPitch = int(image->rowPitch);\r\n\t\t\tpixelData = image->pixels;\r\n\t\t}\r\n\t}\r\n\r\n\tpreview.width = srcWidth;\r\n\tpreview.height = srcHeight;\r\n\r\n\tint channelIndex[4] = {-1,-1,-1,-1};\r\n\r\n\tswitch (previewOptions & PREVIEW_CHANNEL_MASK)\r\n\t{\r\n\t\t\t// pure channels will return as grayscale\r\n\t\tcase PREVIEW_CHANNEL_RED:\r\n\t\t\tchannelIndex[0] = channelIndex[1] = channelIndex[2] = 0;\r\n\t\t\tbreak;\r\n\t\tcase PREVIEW_CHANNEL_GREEN:\r\n\t\t\tchannelIndex[0] = channelIndex[1] = channelIndex[2] = planes > 1 ? 1 : -1;\r\n\t\t\tbreak;\r\n\t\tcase PREVIEW_CHANNEL_BLUE:\r\n\t\t\tchannelIndex[0] = channelIndex[1] = channelIndex[2] = planes > 2 ? 2 : -1;\r\n\t\t\tbreak;\r\n\t\tcase PREVIEW_CHANNEL_ALPHA:\r\n\t\t\tchannelIndex[0] = channelIndex[1] = channelIndex[2] = planes > 3 ? 3 : -1;\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\t// a mixture of channels\r\n\t\t\tif ((previewOptions & PREVIEW_CHANNEL_RED) && planes > 0)\r\n\t\t\t\tchannelIndex[0] = 0;\r\n\t\t\tif ((previewOptions & PREVIEW_CHANNEL_GREEN) && planes > 1)\r\n\t\t\t\tchannelIndex[1] = 1;\r\n\t\t\tif ((previewOptions & PREVIEW_CHANNEL_BLUE) && planes > 2)\r\n\t\t\t\tchannelIndex[2] = 2;\r\n\t\t\tif ((previewOptions & PREVIEW_CHANNEL_ALPHA) && planes > 3)\r\n\t\t\t\tchannelIndex[2] = 3;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif ((previewOptions & PREVIEW_CHANNEL_ALPHA) && planes > 3)\r\n\t{\r\n\t\tif ((previewOptions & PREVIEW_CHANNEL_MASK) == PREVIEW_CHANNEL_ALPHA)\t// only alpha?\r\n\t\t{\r\n\t\t\tchannelIndex[0] = channelIndex[1] = channelIndex[2] = 3;\r\n\t\t\texposure = 1;\r\n\t\t}\r\n\t\telse\r\n\t\t\tchannelIndex[3] = 3;\r\n\t}\r\n\r\n\tswitch (depthOrFormat)\r\n\t{\r\n\tcase DXGI_FORMAT_R32G32B32A32_FLOAT:\r\n\tcase 32:\r\n\t\tfor (int yt=0; yt < height; yt++)\r\n\t\t{\r\n\t\t\tint y = int((yt + yo) * zoom);\r\n\r\n\t\t\tfor (int xt=0; xt< width; xt++)\r\n\t\t\t{\r\n\t\t\t\tauto pixelDst = dst + (width * yt + xt) * 3;\r\n\r\n\t\t\t\tint x = int((xt + xo) * zoom);\r\n\t\t\t\tif (y < 0 || y >= srcHeight || x < 0 || x >= srcWidth)\t// out of bounds?\r\n\t\t\t\t{\r\n\t\t\t\t\tpixelDst[0] = matteColor & 0xFF;\r\n\t\t\t\t\tpixelDst[1] = (matteColor >> 8) & 0xFF;\r\n\t\t\t\t\tpixelDst[2] = (matteColor >> 16) & 0xFF;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tauto pixelSrc = reinterpret_cast<const float *>(pixelData + rowPitch * y) + x * planes;\r\n\r\n\t\t\t\t\tpixelDst[0] = channelIndex[0] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[0]] * exposure, false) : 0;\r\n\t\t\t\t\tpixelDst[1] = channelIndex[1] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[1]] * exposure, false) : 0;\r\n\t\t\t\t\tpixelDst[2] = channelIndex[2] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[2]] * exposure, false) : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} break;\r\n\r\n\tcase DXGI_FORMAT_R16G16B16A16_FLOAT:\t// DX 16 bit is a float type\r\n\t\tfor (int yt=0; yt < height; yt++)\r\n\t\t{\r\n\t\t\tint y = int((yt + yo) * zoom);\r\n\r\n\t\t\tfor (int xt=0; xt< width; xt++)\r\n\t\t\t{\r\n\t\t\t\tauto pixelDst = dst + (width * yt + xt) * 3;\r\n\r\n\t\t\t\tint x = int((xt + xo) * zoom);\r\n\t\t\t\tif (y < 0 || y >= srcHeight || x < 0 || x >= srcWidth)\t// out of bounds?\r\n\t\t\t\t{\r\n\t\t\t\t\tpixelDst[0] = matteColor & 0xFF;\r\n\t\t\t\t\tpixelDst[1] = (matteColor >> 8) & 0xFF;\r\n\t\t\t\t\tpixelDst[2] = (matteColor >> 16) & 0xFF;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tauto pixelSrc = reinterpret_cast<const short *>(pixelData + rowPitch * y) + x * planes;\r\n\r\n\t\t\t\t\tpixelDst[0] = channelIndex[0] >= 0 ? FloatToByte(F16toF32(pixelSrc[channelIndex[0]]) * exposure) : 0;\r\n\t\t\t\t\tpixelDst[1] = channelIndex[1] >= 0 ? FloatToByte(F16toF32(pixelSrc[channelIndex[1]]) * exposure) : 0;\r\n\t\t\t\t\tpixelDst[2] = channelIndex[2] >= 0 ? FloatToByte(F16toF32(pixelSrc[channelIndex[2]]) * exposure) : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} break;\r\n\r\n\tcase 16:\t// photoshop 16 bit is integer type\r\n\t\tfor (int yt=0; yt < height; yt++)\r\n\t\t{\r\n\t\t\tint y = int((yt + yo) * zoom);\r\n\r\n\t\t\tfor (int xt=0; xt< width; xt++)\r\n\t\t\t{\r\n\t\t\t\tauto pixelDst = dst + (width * yt + xt) * 3;\r\n\r\n\t\t\t\tint x = int((xt + xo) * zoom);\r\n\t\t\t\tif (y < 0 || y >= srcHeight || x < 0 || x >= srcWidth)\t// out of bounds?\r\n\t\t\t\t{\r\n\t\t\t\t\tpixelDst[0] = matteColor & 0xFF;\r\n\t\t\t\t\tpixelDst[1] = (matteColor >> 8) & 0xFF;\r\n\t\t\t\t\tpixelDst[2] = (matteColor >> 16) & 0xFF;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tauto pixelSrc = reinterpret_cast<const uint16 *>(pixelData + rowPitch * y) + x * planes;\r\n\r\n\t\t\t\t\tpixelDst[0] = channelIndex[0] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[0]]) : 0;\r\n\t\t\t\t\tpixelDst[1] = channelIndex[1] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[1]]) : 0;\r\n\t\t\t\t\tpixelDst[2] = channelIndex[2] >= 0 ? ConvertTo8Bit(pixelSrc[channelIndex[2]]) : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} break;\r\n\r\n\r\n\tcase DXGI_FORMAT_R8G8B8A8_UNORM:\r\n\tcase 8:\r\n\t\tfor (int yt=0; yt < height; yt++)\r\n\t\t{\r\n\t\t\tint y = int((yt + yo) * zoom);\r\n\r\n\t\t\tfor (int xt=0; xt< width; xt++)\r\n\t\t\t{\r\n\t\t\t\tauto pixelDst = dst + (width * yt + xt) * 3;\r\n\r\n\t\t\t\tint x = int((xt + xo) * zoom);\r\n\t\t\t\tif (y < 0 || y >= srcHeight || x < 0 || x >= srcWidth)\t// out of bounds?\r\n\t\t\t\t{\r\n\t\t\t\t\tpixelDst[0] = matteColor & 0xFF;\r\n\t\t\t\t\tpixelDst[1] = (matteColor >> 8) & 0xFF;\r\n\t\t\t\t\tpixelDst[2] = (matteColor >> 16) & 0xFF;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tauto pixelSrc = reinterpret_cast<const uint8 *>(pixelData + rowPitch * y) + x * planes;\r\n\r\n\t\t\t\t\tpixelDst[0] = channelIndex[0] >= 0 ? pixelSrc[channelIndex[0]] : 0;\r\n\t\t\t\t\tpixelDst[1] = channelIndex[1] >= 0 ? pixelSrc[channelIndex[1]] : 0;\r\n\t\t\t\t\tpixelDst[2] = channelIndex[2] >= 0 ? pixelSrc[channelIndex[2]] : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} break;\r\n\t}\r\n}\r\n\r\nbool IntelPlugin::ConvertToBCFrom32Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel, bool gammaCorrect)\r\n{\t\r\n\tif (ps.formatRecord->depth != 32)\r\n\t\treturn false;\r\n\r\n\tfloat *rowData32bit = static_cast<float *>(ps.formatRecord->data);\r\n\t\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;//height*ps.formatRecord->imageSize.h*ps.formatRecord->planes + width*ps.formatRecord->planes;\r\n\t\t\r\n\t\t//We assign black to other channels if photoshop does not provide enough channels as the compressed text must be RGBA\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData32bit[index], gammaCorrect);\r\n\t\ttgtDataPtr[1] = (planesToGet > 1)? ConvertTo8Bit(rowData32bit[index+1], gammaCorrect) : 0;\r\n\t\ttgtDataPtr[2] = (planesToGet > 2)? ConvertTo8Bit(rowData32bit[index+2], gammaCorrect) : 0;\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData32bit[index+3], gammaCorrect) : 255;\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBCFrom16Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 16)\r\n\t\treturn false;\r\n\t\r\n\tunsigned16 *rowData16bit = static_cast<unsigned16 *>(ps.formatRecord->data);\r\n\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;//height*ps.formatRecord->imageSize.h*ps.formatRecord->planes + width*ps.formatRecord->planes;\r\n\t\t\r\n\t\t//We assign black to other channels if photoshop does not provide enough channels as the compressed text must be RGBA\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData16bit[index]);\r\n\t\ttgtDataPtr[1] = (planesToGet > 1)? ConvertTo8Bit(rowData16bit[index+1]) : 0;\r\n\t\ttgtDataPtr[2] = (planesToGet > 2)? ConvertTo8Bit(rowData16bit[index+2]) : 0;\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData16bit[index+3]) : 255;\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool IntelPlugin::ConvertToBCFrom8Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel)\r\n{\r\n\tif (ps.formatRecord->depth != 8)\r\n\t\treturn false;\r\n\r\n\t//Get image pointer\r\n\tunsigned8 *rowData = static_cast<unsigned8 *>(ps.formatRecord->data);\r\n\t\r\n\t//Copy data from photoshop buffer into local buffer\r\n\tfor (int height=0; height< ps.formatRecord->imageSize.v; height++)\r\n\tfor (int width=0; width< ps.formatRecord->imageSize.h; width++)\r\n\t{\r\n\t\tint index = height*ps.formatRecord->imageSize.h*planesToGet + width*planesToGet;//height*ps.formatRecord->imageSize.h*ps.formatRecord->planes + width*ps.formatRecord->planes;\r\n\r\n\t\t//We assign black to other channels is photoshop does not provide enought channels as the compressed text must be RGBA\r\n\t\ttgtDataPtr[0] = ConvertTo8Bit(rowData[index]);\r\n\t\ttgtDataPtr[1] = (planesToGet > 1)? ConvertTo8Bit(rowData[index+1]) : 0;\r\n\t\ttgtDataPtr[2] = (planesToGet > 2)? ConvertTo8Bit(rowData[index+2]) : 0;\r\n\t\ttgtDataPtr[3] = hasAlphaChannel? ConvertTo8Bit(rowData[index+3]) : 255;\r\n\t\ttgtDataPtr +=4;\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Compress rgba_surface into tgtPixels, uisng Intel ISPC encoders\r\nbool IntelPlugin::ISPC_compression(rgba_surface &source, const Image& target, bool hasAlpha_rgba)  \r\n{\r\n\tCompressionFunc* cmpFunc = NULL;\r\n\r\n\tswitch (ps.data->encoding_g) \r\n\t{\r\n\t\tcase DXGI_FORMAT_BC1_UNORM_SRGB:\r\n\t\tcase DXGI_FORMAT_BC1_UNORM:\r\n\t\t\tcmpFunc = CompressImageBC1;\r\n\t\t\tbreak;\r\n\t\t\t\t\r\n\t\tcase DXGI_FORMAT_BC3_UNORM_SRGB:\r\n\t\tcase DXGI_FORMAT_BC3_UNORM:\r\n\t\t\tcmpFunc = CompressImageBC3;\r\n\t\t\tbreak;\r\n\r\n\t\tcase DXGI_FORMAT_BC7_UNORM_SRGB:\r\n\t\tcase DXGI_FORMAT_BC7_UNORM:\r\n\t\t\tif (hasAlpha_rgba)\r\n\t    \t\tcmpFunc = ps.data->fast_bc67 ? CompressImageBC7_alpha_veryfast : CompressImageBC7_alpha_basic;\r\n\t\t\telse\r\n\t    \t\tcmpFunc = ps.data->fast_bc67 ? CompressImageBC7_veryfast : CompressImageBC7_basic;\r\n\t\t\tbreak;\r\n\r\n\t    case DXGI_FORMAT_BC6H_UF16:\r\n\t\tcase DXGI_FORMAT_BC6H_SF16:\r\n\t\t\tcmpFunc = ps.data->fast_bc67 ? CompressImageBC6H_fast : CompressImageBC6H_slow;\r\n\t\t\tbreak;\t\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif (cmpFunc)\r\n\t{\r\n\t\tint slices = (source.width * source.height) / 0x40000;\t// 256K pixels per chunk\r\n\t\tif (slices < 1)\r\n\t\t\tslices = 1;\r\n\r\n\t\tfor (int i = 0; i < slices; i++)\r\n\t\t{\r\n\t\t\tif (i > 0 && !SetProgress(i, slices))\t// allow an early out\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tint ylo = (i * source.height / slices) & ~0x3;\t// 4 pixels per block row\r\n\t\t\tint yhi = ((i+1) * source.height / slices) & ~0x3;\t// 4 pixels per block row\r\n\r\n\t\t\tif (yhi > source.height)\r\n\t\t\t\tyhi = source.height;\r\n\r\n\t\t\tif (yhi > ylo)\r\n\t\t\t{\r\n\t\t\t\tauto input = source;\r\n\t\t\t\tinput.ptr += input.stride * ylo; \r\n\t\t\t\tinput.height = yhi - ylo;\r\n\r\n\t\t\t\tauto dst = target.pixels + target.rowPitch * (ylo >> 2);\t// rowPitch is actually blockRowPitch here\r\n\r\n\t\t\t\tif (ps.data->gMultithreaded) \r\n\t\t\t\t\tCompressImageMT(&input, dst, cmpFunc, ps.data->encoding_g);\r\n\t\t\t\telse\r\n\t\t\t\t\tCompressImageST(&input, dst, cmpFunc, ps.data->encoding_g);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Pad the surface size to boundaries of 4\r\n//Calculates new width,height,stride and new buffer\r\n//It does not deallocate the old buffer\r\n//It does return the new surface \r\n//It is the responsibility of the user to deallocate the new/old buffer when not needed anymore\r\nrgba_surface IntelPlugin::DoPaddingToMultiplesOf4(const rgba_surface &input)\r\n{\r\n\trgba_surface out;\r\n\r\n\t// now we're going to copy to a new buffer to do padding to boundaries of 4\r\n\t// boundaries of 4 are needed for the compression algorithms to work\r\n\t// since they rely on 4x4 blocks\r\n\tint pixelSize = 4 * (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16 ? 2 : 1);\r\n\tout.width = (input.width+3) & ~3;       //pad witdh to boundaries of 4\r\n\tout.height = (input.height+3) & ~3;     //pad height to boundaries of 4\r\n\tout.stride = out.width * pixelSize;                  //size of a row\r\n\tout.ptr = new uint8_t[out.height * out.stride];    //new buffer\r\n\t\t\t\r\n\t//Copy row by row into new buffer\r\n\tfor (int y = 0; y < input.height; y++)\r\n\t{\r\n\t\tauto rowSrc = input.ptr + y * input.stride;\r\n\t\tauto rowDst = out.ptr + y * out.stride;\r\n\r\n\t\t//Copy existing rows\r\n\t\tmemcpy(rowDst, rowSrc, input.width * pixelSize);\r\n\r\n\t\t//Pad to new width, copy the last pixel of the old row into the remaining pixels of new row\r\n\t\tfor (int x=input.width; x < out.width; x++)\t// trailing pixels\r\n\t\t\tmemcpy(rowDst + x * pixelSize, rowSrc + (input.width-1) * pixelSize, pixelSize);\r\n\t}\r\n\r\n\t//Pad to new height, copy last row multiple times to fill new rows \r\n\tfor (int y = input.height; y < out.height; y++)\t// extra rows\r\n\t{\r\n\t\tauto rowDst = out.ptr + y * out.stride;\r\n\t\tmemcpy(rowDst, rowDst - out.stride, out.stride);\r\n\t}\r\n\r\n\treturn out;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//AdvanceState () has to be called before entering this function so that the ps.formatRecord->data buffer is full;\r\nScratchImage* IntelPlugin::GetCompressedImageForPreview(int planesToGet_, int &compressedSize)\r\n{  \r\n\t//Returns null if image to preview is uncompressed\r\n\tif (ps.data->encoding_g == DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t{\r\n\t\t//just compute size, the preview will use the uncompressed iamge for both views\r\n\t\tcompressedSize = ps.formatRecord->imageSize.h*ps.formatRecord->imageSize.v*4;\r\n\t\treturn NULL;\r\n\t}\r\n\t\r\n\t//Show loading cursor\r\n\tshowLoadingCursor();\r\n\r\n\tbool hasAlpha_ = false;\r\n\r\n\t//Open a empty compressed scratch image\r\n\tScratchImage *scrImageScratch = new ScratchImage(); \r\n\t//Open a empty uncompressed scratch image\r\n\tScratchImage *scrUncompressedImageScratch = new ScratchImage();\r\n\r\n\t//Flag if there is alpha channel and corresponding texture type Color+Alpha specified\r\n\tif (planesToGet_ > 3)\r\n\t\thasAlpha_ = true;\r\n\t\r\n\tif (!CopyDataForEncoding(scrUncompressedImageScratch, hasAlpha_, false, true))\r\n\t{\r\n\t\terrorMessage(\"Unsupported bit depth\", \"Preview Error\");\r\n\t\treturn NULL;\r\n\t}\r\n\t\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//Special preview operation, create a horiz. crossed 2D image out of the cube map\r\n\tif (ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_CROSSED && IsCubeMapWithSetMipLevelOverride())\r\n\t{\r\n\t\t//If a SetMipLevel was specified you have to turn even Crossed image into proper CubeMap Scratchimages to the the mipmap\r\n\t\t//If this is a cube map, change scrUncompressedImageScratch into a CubeMap type image, section\r\n\t\tConvertToCubeMapFromCross(&scrUncompressedImageScratch);\r\n\r\n\t\t//create a horiz. crossed 2D image out of the cube map\r\n\t    ConvertToHorizontalCrossFromCubeMap(&scrUncompressedImageScratch);\r\n\t}\r\n\telse if (ps.data->TextureTypeIndex == TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\t//If this is a cube map, change scrUncompressedImageScratch into a CubeMap type image, section\r\n\t\tConvertToCubeMapFromLayers(&scrUncompressedImageScratch, hasAlpha_);\r\n\t\t\r\n\t\t//create a horiz. crossed 2D image out of the cube map\r\n\t    ConvertToHorizontalCrossFromCubeMap(&scrUncompressedImageScratch);\r\n\t}\r\n\t\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//MipMap from Layers\r\n\t//Overwrite only the initial image MipLevel 0 from Layer 0, in order to generate automatic MipMaps\r\n\tif (IsMipMapsDefinedByLayer())\r\n\t{\r\n\t\t//We use this to avoid having to disable the visibility of all layers when creating mip level 0. \r\n\t\t//By default all images are composited onto mip level 0\r\n\t\tCopyLayersIntoMipMaps(scrUncompressedImageScratch, hasAlpha_, 0, 1);\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If FlipX/Y true, invert R/G channels scrUncompressedImageScratch only if Normal Map, section\r\n\tif ((ps.data->FlipX || ps.data->FlipY) && (ps.data->TextureTypeIndex==TextureTypeEnum::NORMALMAP))\r\n\t{\r\n\t\tFlipXYChannelNormalMap(scrUncompressedImageScratch);\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If Normalization Postprocess option has been specified and this is a Normal Type texture type\r\n\t//Normalize all mip chain\r\n\tif (ps.data->Normalize && ps.data->TextureTypeIndex == TextureTypeEnum::NORMALMAP)\r\n\t{\r\n\t\tNormalizeNormalMapChain(scrUncompressedImageScratch);\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//Compress scrUncompressedImageScratch into scrImageScratch, section\r\n\tps.data->previewing = true;\r\n\tif (!CompressToScratchImage(&scrImageScratch, &scrUncompressedImageScratch, hasAlpha_))\r\n\t{\r\n\t\treturn NULL;\r\n\t}\r\n\r\n\t//Get compressed size of first image\r\n\tcompressedSize = int(scrImageScratch->GetImages()->slicePitch);\r\n\t\r\n\t//This is not needed when saving out the image, its just needed for SRGB or 32 bit formats\r\n\t//to compensate for monitor gamma and have it look ok in preview.\r\n\tif (ps.formatRecord->depth == 32)\r\n\t{\r\n\t\t//Force SRGB if 32bit, to diplay ok. Otherwise it previews to bright\r\n\t\tscrImageScratch->OverrideFormat(MakeSRGB(scrImageScratch->GetMetadata().format));\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//If SRGB remove SRGB flag to display OK.\r\n\t\tDXGI_FORMAT fmt = scrImageScratch->GetMetadata().format;\r\n\t\tswitch ( fmt )\r\n\t\t{\r\n\t\t\tcase DXGI_FORMAT_BC1_UNORM_SRGB:\r\n\t\t\t\tscrImageScratch->OverrideFormat(DXGI_FORMAT_BC1_UNORM);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DXGI_FORMAT_BC3_UNORM_SRGB:\r\n\t\t\t\tscrImageScratch->OverrideFormat(DXGI_FORMAT_BC3_UNORM);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DXGI_FORMAT_BC7_UNORM_SRGB:\r\n\t\t\t\tscrImageScratch->OverrideFormat(DXGI_FORMAT_BC7_UNORM);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n    \r\n\t//Decompress scrImageScratch image into and uncpressed one\r\n\tScratchImage *destImage = new ScratchImage();\r\n\tHRESULT hr;\r\n\r\n\tauto targetFormat = DXGI_FORMAT_R8G8B8A8_UNORM;\r\n\tif (ps.formatRecord->depth == 32 && (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16 || ps.data->encoding_g == DXGI_FORMAT_BC6H_SF16))\r\n\t\ttargetFormat = DXGI_FORMAT_R32G32B32A32_FLOAT;\r\n\t\r\n\thr = Decompress( scrImageScratch->GetImages(), scrImageScratch->GetImageCount(), scrImageScratch->GetMetadata(), targetFormat, *destImage );\r\n    \r\n\tif ( FAILED(hr) )\r\n\t{\r\n\t\terrorMessage(\"Can not decompress image\", \"Preview Error\");\r\n\t\tdelete destImage;\r\n\t\tdestImage = NULL;\r\n\t}\r\n\t\r\n\t//Cleanup, section\r\n\t//Dispose compressed image\r\n\tif (scrUncompressedImageScratch != NULL)\r\n\t    delete scrUncompressedImageScratch;\r\n\r\n\tif (scrImageScratch != NULL)\r\n\t    delete scrImageScratch;\r\n\r\n\t//Go back to normal cursor\r\n\tshowNormalCursor();\r\n\r\n\treturn destImage;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//AdvanceState () has to be called before entering this function so that the ps.formatRecord->data buffer is full;\r\nScratchImage* IntelPlugin::GetUncompressedImageForPreview(int planesToGet_)\r\n{  \r\n\tbool hasAlpha_ = false;\r\n\r\n\t//Open a empty uncompressed scratch image\r\n\tScratchImage *scrUncompressedImageScratch = new ScratchImage();\r\n\r\n\t//Flag if there is alpha channel and corresponding texture type Color+Alpha specified\r\n\tif (planesToGet_ > 3)\r\n\t\thasAlpha_ = true;\r\n\t\r\n\tif (!CopyDataForEncoding(scrUncompressedImageScratch, hasAlpha_, false, false))\r\n\t{\r\n\t\terrorMessage(\"Unsupported bit depth\", \"Preview Error\");\r\n\t\treturn NULL;\r\n\t}\r\n\t\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//Special preview operation, create a horiz. crossed 2D image out of the cube map\r\n\tif (ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_CROSSED && IsCubeMapWithSetMipLevelOverride())\r\n\t{\r\n\t\t//If a SetMipLevel was specified you have to turn even Crossed image into proper CubeMap Scratchimages to the the mipmap\r\n\t\t//If this is a cube map, change scrUncompressedImageScratch into a CubeMap type image, section\r\n\t\tConvertToCubeMapFromCross(&scrUncompressedImageScratch);\r\n\r\n\t\t//create a horiz. crossed 2D image out of the cube map\r\n\t    ConvertToHorizontalCrossFromCubeMap(&scrUncompressedImageScratch);\r\n\t}\r\n\telse if (ps.data->TextureTypeIndex == TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\t//If this is a cube map, change scrUncompressedImageScratch into a CubeMap type image, section\r\n\t\tConvertToCubeMapFromLayers(&scrUncompressedImageScratch, hasAlpha_);\r\n\t\t\r\n\t\t//create a horiz. crossed 2D image out of the cube map\r\n\t    ConvertToHorizontalCrossFromCubeMap(&scrUncompressedImageScratch);\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//MipMap from Layers\r\n\t//Overwrite only the initial image MipLevel 0 from Layer 0, in order to generate automatic MipMaps\r\n\tif (IsMipMapsDefinedByLayer())\r\n\t{\r\n\t\t//We use this to avoid having to disable the visibility of all layers when creating mip level 0. \r\n\t\t//By default all images are composited onto mip level 0\r\n\t\tCopyLayersIntoMipMaps(scrUncompressedImageScratch, hasAlpha_, 0, 1);\r\n\t}\r\n\t\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If FlipX/Y true, invert R/G channels scrUncompressedImageScratch only if Normal Map, section\r\n\tif ((ps.data->FlipX || ps.data->FlipY) && (ps.data->TextureTypeIndex==TextureTypeEnum::NORMALMAP))\r\n\t{\r\n\t\tFlipXYChannelNormalMap(scrUncompressedImageScratch);\r\n\t}\r\n\r\n\t//If 16 bit convert to 8 bit\r\n\tif (scrUncompressedImageScratch->GetMetadata().format == DXGI_FORMAT_R16G16B16A16_FLOAT)\r\n\t{\r\n\t\t//Decompress scrImageScratch image into and uncpressed one\r\n\t\tScratchImage *destImage = new ScratchImage();\r\n\t\tHRESULT hr;\r\n\t\r\n\t\thr = Convert( scrUncompressedImageScratch->GetImages(), scrUncompressedImageScratch->GetImageCount(), scrUncompressedImageScratch->GetMetadata(), DXGI_FORMAT_R8G8B8A8_UNORM, TEX_FILTER_DEFAULT, 0.5f, *destImage );\r\n    \r\n\t\tif ( FAILED(hr) )\r\n\t\t{\r\n\t\t\terrorMessage(\"Can not convert image\", \"Preview Error\");\r\n\t\t\tdelete destImage;\r\n\t\t\tdestImage = NULL;\r\n\t\t}\r\n\t\r\n\t\t//Cleanup, section\r\n\t\t//Dispose compressed image\r\n\t\tif (scrUncompressedImageScratch != NULL)\r\n\t\t\tdelete scrUncompressedImageScratch;\r\n\r\n\t\treturn destImage;\r\n\t}\r\n\r\n\treturn scrUncompressedImageScratch;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Return true if texture type cube maps and the setMipLevel is checked\r\nbool IntelPlugin::IsCubeMapWithSetMipLevelOverride()\r\n{\r\n\tif (ps.data->SetMipLevel &&\r\n\t   (ps.data->TextureTypeIndex == TextureTypeEnum::CUBEMAP_CROSSED || ps.data->TextureTypeIndex == TextureTypeEnum::CUBEMAP_LAYERS))\r\n\t   return true;\r\n\r\n\treturn false;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Returns true if mip maps are defined by layers\r\n//Mip map form layers is not applicable to cube maps.\r\nbool IntelPlugin::IsMipMapsDefinedByLayer()\r\n{\r\n\tif (ps.data->MipMapTypeIndex == MipmapEnum::FROM_LAYERS &&\r\n\t\tps.data->TextureTypeIndex != TextureTypeEnum::CUBEMAP_CROSSED &&\r\n\t    ps.data->TextureTypeIndex != TextureTypeEnum::CUBEMAP_LAYERS &&\r\n\t\tps.formatRecord->documentInfo->layerCount > 1)\r\n\t\treturn true;\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Convert scrUncompressedImageScratch_ from a  crossed layout image to a cube map ScratchImage\r\nvoid IntelPlugin::ConvertToCubeMapFromCross(ScratchImage **scrUncompressedImageScratch_)\r\n{\r\n\t\t//Open a empty uncompressed scratch image\r\n\t    ScratchImage *cubemapUncompressedImageScratch = new ScratchImage();\r\n\r\n\t\t//Hold the rectangles which define the siz cube face in the large image\r\n\t\tDirectX::Rect coords[6];\r\n\r\n\t\t//These coords are for the following cubemap order +X,-X,+Y,-Y,+Z,-Z . This is the order CubemapGen likes\r\n\t\t//They define a absolute width/height multiplactor into the image to get the coords for horizontal.vertical crossed layout cubemap . \r\n\t\t//CubeMaps have all their 6 faces equal.\r\n\t\tint crossedCoords[6][2] =  {{2,1}, {0,1}, {1,0}, {1,2}, {1,1}, {3,1}}; \r\n\r\n\t\t//Setup width/height with Horziontal(4x3) cross layout as default\r\n\t\tint width = ps.formatRecord->imageSize.h/4;\r\n\t\tint height = ps.formatRecord->imageSize.v/3;\r\n\r\n\t\t//Determine if Vertical(3x4) cubemap layout\r\n\t\tif (ps.formatRecord->imageSize.h < ps.formatRecord->imageSize.v)\r\n\t\t{\r\n\t\t\t//Vertical Cross layout\r\n\t\t\twidth = ps.formatRecord->imageSize.h/3;\r\n\t\t\theight = ps.formatRecord->imageSize.v/4;\r\n\r\n\t\t\t//flip the last coords if in vertical layout\r\n\t\t\tcrossedCoords[5][0] = 1;\r\n\t\t\tcrossedCoords[5][1] = 3;\r\n\t\t}\r\n\r\n\t\t//Compute final coordinates\r\n\t\tfor (int i=0; i<6; i++)\r\n\t\t{\r\n\t\t\tcoords[i] = DirectX::Rect(crossedCoords[i][0]*width, crossedCoords[i][1]*height, width, height);\r\n\t\t}\t\t\r\n\r\n\r\n\t\t//Allocate a cubemap scratchImage\r\n\t\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t\t{\r\n\t\t\t//Allocate space for one cube map rgba 16bit float image \r\n\t\t\tcubemapUncompressedImageScratch->InitializeCube(DXGI_FORMAT_R16G16B16A16_FLOAT, width, height, 1, 1);\r\n\t\t}\r\n\t\telse //BC1,3,7 or uncompressed\r\n\t\t{\r\n\t\t\t//Allocate space for one cube map rgba 8bit float image \r\n\t\t\tcubemapUncompressedImageScratch->InitializeCube(DXGI_FORMAT_R8G8B8A8_UNORM, width, height, 1, 1);\r\n\t\t}\r\n\r\n\r\n\t\t//Copy from crossed cubemap from big scrUncompressedImageScratch_ to images in cubemapUncompressedImageScratch\r\n\t\tconst Image *crossedImage = (*scrUncompressedImageScratch_)->GetImages();\r\n\t\tconst Image *cubeImage = cubemapUncompressedImageScratch->GetImages();\r\n\r\n\t\tfor (int i=0; i<6; i++)\r\n\t\t{\r\n\t\t\tDirectX::CopyRectangle(*crossedImage, coords[i], cubeImage[i], TEX_FILTER_DEFAULT, 0, 0);\r\n\t\t}\r\n\r\n\r\n\t\t//Free previous space\r\n\t\tdelete *scrUncompressedImageScratch_;\r\n\r\n\t\t//Copy over pointer from ScratchImage which has CubeMap, \r\n\t\t//now scrUncompressedImageScratch holds the crossed cubemap disected\r\n\t\t*scrUncompressedImageScratch_ = cubemapUncompressedImageScratch;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Convert scrUncompressedImageScratch_ from document layers to a cube map DirectX::ScratchImage\r\nbool IntelPlugin::ConvertToCubeMapFromLayers(ScratchImage **scrUncompressedImageScratch_, bool hasAlpha_)\r\n{\r\n\tReadChannelDesc *pChannel;\r\n\tReadLayerDesc *layerDesc;\r\n\tchar *pLayerData;\r\n\t\r\n\tif (ps.formatRecord->documentInfo->layerCount < 6)\r\n\t{\r\n\t    return false;\r\n\t}\r\n\r\n\t// Get a buffer to hold each channel as we process, formatRecord->planeBytes are computed the first time fetchImage() is called\r\n\tpLayerData = sPSBuffer->New(NULL, ps.formatRecord->imageSize.h * ps.formatRecord->imageSize.v * ps.formatRecord->planeBytes);\r\n\r\n\tif (pLayerData == NULL)\r\n\t{\r\n\t\tSetResult(memFullErr);\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//Open a empty uncompressed scratch image\r\n    ScratchImage *cubemapUncompressedImageScratch = new ScratchImage();\r\n\r\n\t//All layers must have these names and feature the correspanding image +X,-X,+Y,-Y,+Z,-Z.\r\n\t//Any layers with different names will be ignored.\r\n\t//There must be at least 6 layers present including the background layer, otherwise some cube faces will be blank.\r\n\t//The final Cubemap dds will have the images in this order, +X,-X,+Y,-Y,+Z,-Z. This is the order CubemapGen likes and sort of a standard.\r\n\r\n\t//Which face goes into what index inside the cubemap \r\n\tstd::map<std::string, int> facesmap;\r\n\tfacesmap[\"+X\"]=0; \r\n\tfacesmap[\"-X\"]=1; \r\n\tfacesmap[\"+Y\"]=2;\r\n\tfacesmap[\"-Y\"]=3;\r\n\tfacesmap[\"+Z\"]=4;\r\n\tfacesmap[\"-Z\"]=5;\r\n\r\n\t//Setup width/height\r\n\tint width =  static_cast<int>((*scrUncompressedImageScratch_)->GetMetadata().width);\r\n\tint height = static_cast<int>((*scrUncompressedImageScratch_)->GetMetadata().height);\r\n\r\n\t//Allocate a cubemap scratchImage\r\n\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t{\r\n\t\t//Allocate space for one cube map rgba 16bit float image \r\n\t\tcubemapUncompressedImageScratch->InitializeCube(DXGI_FORMAT_R16G16B16A16_FLOAT, width, height, 1, 1);\r\n\t}\r\n\telse //BC1,3,7 or uncompressed\r\n\t{\r\n\t\t//Allocate space for one cube map rgba 8bit float image \r\n\t\tcubemapUncompressedImageScratch->InitializeCube(DXGI_FORMAT_R8G8B8A8_UNORM, width, height, 1, 1);\r\n\t}\r\n\r\n\t//*****************************************************\r\n\t//Copy from Layers into cubemapUncompressedImageScratch\r\n\tconst Image *cubeImage = cubemapUncompressedImageScratch->GetImages();\r\n\r\n\t\r\n\t//Get the first layer in this layer list\r\n\tlayerDesc = ps.formatRecord->documentInfo->layersDescriptor;\r\n\t\r\n\t//Cycle through remaining layers, Assign each layer to a different mip map in ScratchImage\r\n\twhile (layerDesc != NULL)\r\n\t{\t\r\n\t\tstd::map<std::string,int>::iterator it;\r\n\r\n\t\t//Check layername for validity only these are supported \"+X\",\"-X\",\"+Y\",\"-Y\",\"+Z\",\"-Z\"\r\n\t\tit = facesmap.find(layerDesc->name);\r\n\t\tif ( it != facesmap.end())\r\n\t\t{\r\n\t\t\t//Get index into SratchImage array for this face name\r\n\t\t\tint i = it->second;\r\n\r\n\t\t\t//Get the first channel in this channel list \r\n\t\t\tpChannel = layerDesc->compositeChannelsList;\r\n\t\t\tint planeNumber = 0;\r\n\r\n\t\t\t//Get the RGB channels\r\n\t\t\twhile (pChannel != NULL)\r\n\t\t\t{\r\n\t\t\t\t//Get pixel data from channel\r\n\t\t\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\r\n\t\t\t\tfor (size_t y = 0; y < cubeImage[i].height; y++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (size_t x = 0; x < cubeImage[i].width; x++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint indexToImage = int(cubeImage[i].width*y*4 + x*4);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\t\t\tint indexToLayerChannel = int(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\r\n\t\t\t\t\t\tCopyFromLayerChannelIntoImage(pLayerData, &cubeImage[i], indexToImage+planeNumber, indexToLayerChannel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpChannel = pChannel->next;\r\n\t\t\t\tplaneNumber++;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//Get first layermask and set as alpha\r\n\t\t\t//If no layermask then use transparency channel \r\n\t\t\tif (!(pChannel = layerDesc->layerMask))\r\n\t\t\t{\r\n\t\t\t\t//Get first Transparency channel and set as alpha\r\n\t\t\t\tpChannel = layerDesc->transparency;\r\n\t\t\t}\r\n\r\n\t\t\t//Get alpha\r\n\t\t\tif (hasAlpha_ && (pChannel != NULL))\r\n\t\t\t{\r\n\t\t\t\t//Get pixel data from channel\r\n\t\t\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tFillLayerDataToWhite(pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\t\t\t}\r\n\r\n\t\t\tfor (size_t y = 0; y < cubeImage[i].height; y++)\r\n\t\t\t{\r\n\t\t\t\tfor (size_t x = 0; x < cubeImage[i].width; x++)\r\n\t\t\t\t{\r\n\t\t\t\t\tint indexToImage = int(cubeImage[i].width*y*4 + x*4);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\t\tint indexToLayerChannel = int(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\r\n\t\t\t\t\t//Here the plane number is 3 for alpha\r\n\t\t\t\t\tCopyFromLayerChannelIntoImage(pLayerData, &cubeImage[i], indexToImage+3, indexToLayerChannel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tlayerDesc = layerDesc->next; //Get next layer\r\n\t}\r\n\t\t\t\r\n\tsPSBuffer->Dispose(static_cast<char**>(&pLayerData));\r\n\r\n\r\n\t//Free previous space\r\n\tdelete *scrUncompressedImageScratch_;\r\n\r\n\t//Copy over pointer from ScratchImage which has CubeMap, \r\n\t//now scrUncompressedImageScratch holds the crossed cubemap disected\r\n\t*scrUncompressedImageScratch_ = cubemapUncompressedImageScratch;\r\n\r\n\treturn true;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Convert scrUncompressedImageScratch_ from a cube map to a horizontal crossed layout image \r\nvoid IntelPlugin::ConvertToHorizontalCrossFromCubeMap(ScratchImage **scrUncompressedImageScratch_)\r\n{\r\n\t\t//Open a empty uncompressed scratch image\r\n\t    ScratchImage *crossedUncompressedImageScratch = new ScratchImage();\r\n\r\n\t\t//Hold the rectangles which define the siz cube face in the large image\r\n\t\tDirectX::Rect coord;\r\n\r\n\t\t//Which mipLevel to get for crossed image cubemap preview. Normaly 0 but can change when setMipLevels is specified\r\n\t\tint mipLevel = 0;\r\n\r\n\t\t//These coords are for the following cubemap order +X,-X,+Y,-Y,+Z,-Z . This is the order CubemapGen likes\r\n\t\t//They define a absolute width/height multiplactor into the image to get the coords for horizontal.vertical crossed layout cubemap . \r\n\t\t//CubeMaps have all their 6 faces equal.\r\n\t\tint crossedCoords[6][2] =  {{2,1}, {0,1}, {1,0}, {1,2}, {1,1}, {3,1}}; \r\n\t\r\n\t\t//Setup width/height with Horziontal(4x3) cross layout as default\r\n\t\tint width = static_cast<int>((*scrUncompressedImageScratch_)->GetMetadata().width);\r\n\t\tint height = static_cast<int>((*scrUncompressedImageScratch_)->GetMetadata().height);\r\n\r\n\t\t//============================================================================================\r\n\t    //============================================================================================\r\n\t    //Force mipmaps if setMipLevels on cube maps are specified\r\n    \tif (IsCubeMapWithSetMipLevelOverride())\r\n\t\t{\r\n\t\t\t//Open temporary imageScratch to save mipmaps\r\n\t\t\tScratchImage *scrImageMipMapScratch = new ScratchImage(); \r\n\t\t\r\n\t\t\t//Generate MipMaps from scrUncompressedImageScratch and save to scrImageMipMapScratch\r\n\t\t\tHRESULT hr = GenerateMipMaps((*scrUncompressedImageScratch_)->GetImages(), (*scrUncompressedImageScratch_)->GetImageCount(), \r\n\t\t\t\t\t\t\t\t\t\t (*scrUncompressedImageScratch_)->GetMetadata(), TEX_FILTER_DEFAULT|TEX_FILTER_SEPARATE_ALPHA, 0, *scrImageMipMapScratch );\r\n\t\t\tif( hr != S_OK )\r\n\t\t\t{\r\n\t\t\t\tUserError(\"Could not create MipMaps\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t    //Override with mip level size\r\n\t\t    width = int(scrImageMipMapScratch->GetImage(ps.data->MipLevel, 0, 0)->width);\r\n\t\t    height = int(scrImageMipMapScratch->GetImage(ps.data->MipLevel, 0, 0)->height);\r\n\r\n\t\t\t//Set which mip level to geto for creating crossed image\r\n\t\t\tmipLevel = ps.data->MipLevel;\r\n\r\n\t\t\t//free previous space\r\n\t\t\tdelete *scrUncompressedImageScratch_;\r\n\t\t\r\n\t\t\t//Copy over pointer from ScratchImage which has MipMap, now scrUncompressedImageScratch holds the initial image + mip chain\r\n\t\t\t(*scrUncompressedImageScratch_) = scrImageMipMapScratch;\r\n\t\t}\r\n\t\t\r\n\t\tcoord = DirectX::Rect(0, 0, width, height);\r\n\t\t\r\n\t\t//Allocate a scratchImage\r\n\t\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t\t{\r\n\t\t\t//Allocate space for one cube map rgba 16bit float image \r\n\t\t\tcrossedUncompressedImageScratch->Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT, width*4, height*3, 1, 1);\r\n\t\t}\r\n\t\telse //BC1,3,7 or uncompressed\r\n\t\t{\r\n\t\t\t//Allocate space for one cube map rgba 8bit float image \r\n\t\t\tcrossedUncompressedImageScratch->Initialize2D(DXGI_FORMAT_R8G8B8A8_UNORM, width*4, height*3, 1, 1);\r\n\t\t}\r\n\r\n\t\t//Copy from cubemap scrUncompressedImageScratch_ to crossed horizontal layout in crossedUncompressedImageScratch\r\n\t\tconst Image *crossedImage = crossedUncompressedImageScratch->GetImages();\r\n\r\n\t\tfor (int i=0; i<6; i++)\r\n\t\t{\r\n\t\t    const Image *cubeImage = (*scrUncompressedImageScratch_)->GetImage(mipLevel, i, 0);\r\n\t\t\tDirectX::CopyRectangle(*cubeImage, coord, *crossedImage, TEX_FILTER_DEFAULT, crossedCoords[i][0]*width, crossedCoords[i][1]*height);\r\n\t\t}\r\n\r\n\t\t//Free previous space\r\n\t\tdelete *scrUncompressedImageScratch_;\r\n\r\n\t\t//Copy over pointer from ScratchImage which has CubeMap, \r\n\t\t//now scrUncompressedImageScratch holds the crossed cubemap disected\r\n\t\t*scrUncompressedImageScratch_ = crossedUncompressedImageScratch;\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Flip the X(Red) channel and or the Y(Green) channel of the normal map\r\nvoid IntelPlugin::FlipXYChannelNormalMap(ScratchImage *scrUncompressedImageScratch_)\r\n{\r\n\t//Get first on only image\r\n\tconst Image *image = scrUncompressedImageScratch_->GetImages();\r\n\r\n\t//Traverse all pixels\r\n\tfor (size_t i = 0; i < image->height*image->width; i++)\r\n\t{\r\n\t\t//scrUncompressedImageScratch is by default RGBA data so we need a pitch of 4\r\n\t\tint index = (int)i*4;\r\n\t\t\t\r\n\t\tif (image->format == DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t\t{\r\n\t\t\t//Get pointer to first (and only) image\r\n\t\t\tunsigned8 *rowBigDataPtr = image->pixels;\r\n\r\n\t\t\t//Inverse values of R/G channels only\r\n\t\t\tif (ps.data->FlipX)\r\n\t\t\t\trowBigDataPtr[index] = 255 - rowBigDataPtr[index];\r\n\r\n\t\t\tif (ps.data->FlipY)\r\n\t\t\t\trowBigDataPtr[index + 1] = 255 - rowBigDataPtr[index + 1];\r\n\t\t}\r\n\t\telse if (image->format == DXGI_FORMAT_R16G16B16A16_FLOAT)\r\n\t\t{\r\n\t\t\t//Get pointer to first (and only) image, cast to 16bit for BC6\r\n\t\t    unsigned16 *rowBigDataPtr = reinterpret_cast<unsigned16 *>(image->pixels);\r\n\t\t\t\t\r\n\t\t\t//Inverse values of R/G channels only\r\n\t\t\tfloat r = F16toF32(rowBigDataPtr[index]);\r\n\t\t\tfloat g = F16toF32(rowBigDataPtr[index+1]);\r\n\r\n\t\t\tif (ps.data->FlipX)\r\n\t\t\t\trowBigDataPtr[index] = F32toF16(1.f - r);\r\n\r\n\t\t\tif (ps.data->FlipY)\r\n\t\t\t\trowBigDataPtr[index+1] = F32toF16(1.f - g);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Normalize all values of this Nomral map in main image and all mip maps\r\nvoid IntelPlugin::NormalizeNormalMapChain(ScratchImage *scrUncompressedImageScratch_)\r\n{\r\n\t//Open temporary imageScratch to save mipmaps\r\n\tfor (size_t i = 0; i < scrUncompressedImageScratch_->GetImageCount(); i++)\r\n\t{\r\n\t\tif (auto image = scrUncompressedImageScratch_->GetImages() + i)\r\n\t\t{\r\n\t\t\tfor (size_t y = 0; y < image->height; y++)\r\n\t\t\t{\r\n\t\t\t\tauto ptr = image->pixels + image->rowPitch * y;\t\t\t\t\t\r\n\t\t\t\tif (image->format == DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (size_t x = 0; x < image->width; x++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tauto p = ptr + x * 4;\r\n\t\t\t\t\t\tfloat r = static_cast<float>(p[0] - 128);\r\n\t\t\t\t\t\tfloat g = static_cast<float>(p[1] - 128);\r\n\t\t\t\t\t\tfloat b = static_cast<float>(p[2] - 128);\r\n\t\t\t\t\t\tfloat m = sqrt(r*r + g*g + b*b);\r\n\t\t\t\t\t\tif (m > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm = 127/m;\r\n\t\t\t\t\t\t\tp[0] = static_cast<uint8_t>(r*m + 128);\r\n\t\t\t\t\t\t\tp[1] = static_cast<uint8_t>(g*m + 128);\r\n\t\t\t\t\t\t\tp[2] = static_cast<uint8_t>(b*m + 128);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//This is the default normal vector (0,0,1)\r\n\t\t\t\t\t\t\tp[0] = 128;\r\n\t\t\t\t\t\t\tp[1] = 128;\r\n\t\t\t\t\t\t\tp[2] = 255;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (image->format == DXGI_FORMAT_R16G16B16A16_FLOAT)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (size_t x = 0; x < image->width; x++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tauto p = reinterpret_cast<uint16_t*>(ptr) + x * 4;\r\n\t\t\t\t\t\tfloat r = F16toF32(p[0]);\r\n\t\t\t\t\t\tfloat g = F16toF32(p[1]);\r\n\t\t\t\t\t\tfloat b = F16toF32(p[2]);\r\n\t\t\t\t\t\tfloat m = sqrt(r*r + g*g + b*b);\r\n\t\t\t\t\t\tif (m > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm = 1.0f/m;\r\n\t\t\t\t\t\t\tp[0] = F32toF16(r * m);\r\n\t\t\t\t\t\t\tp[1] = F32toF16(g * m);\r\n\t\t\t\t\t\t\tp[2] = F32toF16(b * m);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//This is the default normal vector (0,0,1)\r\n\t\t\t\t\t\t\tp[0] = F32toF16(0);\r\n\t\t\t\t\t\t\tp[1] = F32toF16(0);\r\n\t\t\t\t\t\t\tp[2] = F32toF16(1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n/* Read in the channel data from the original document. */\r\nvoid IntelPlugin::ReadLayerData(ReadChannelDesc *pChannel, char *pLayerData, int width, int height)\r\n{\r\n\t// Make sure there is something for me to read from\r\n\tif (pChannel == NULL || pChannel->port == NULL || pLayerData == NULL)\r\n\t\treturn;\r\n\r\n\tBoolean canRead;\r\n\tif (sPSChannelProcs->CanRead(pChannel->port, &canRead))\r\n\t{\r\n\t\t// this function should not error, tell the host accordingly\r\n\t\tSetResult(errPlugInHostInsufficient);\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (!canRead)\r\n\t\treturn;\r\n\r\n\t// some local variables to play with\r\n\tVRect read_rect;\r\n\tPixelMemoryDesc destination;\r\n\t\t\t\r\n\t// What area of the document do we want to read from\r\n\tread_rect.top = 0;\r\n\tread_rect.left = 0;\r\n\tread_rect.bottom = height;\r\n\tread_rect.right = width;\r\n\r\n\t// set up the PixelMemoryDesc\r\n\tdestination.data = pLayerData;\r\n\tdestination.depth = pChannel->depth;\r\n\tdestination.rowBits = width*pChannel->depth;\r\n\tdestination.colBits = pChannel->depth;\r\n\tdestination.bitOffset = 0;\r\n\r\n\t// Read this data into our buffer, you could check the read_rect to see if you got everything you desired\r\n\tif (sPSChannelProcs->ReadPixelsFromLevel(\t\r\n\t\tpChannel->port,\r\n\t\t0,\r\n\t\t&read_rect,\r\n\t\t&destination))\r\n\t{\r\n\t\tSetResult(errPlugInHostInsufficient);\r\n\t\treturn;\r\n\t}\r\n}\r\n\r\nvoid IntelPlugin::FillLayerDataToWhite(char *pLayerData, int width, int height)\r\n{\r\n\tfor (int x=0; x<width; x++)\r\n\t{\r\n\t\tfor (int y=0; y<height; y++)\r\n\t\t{\r\n\t\t\tint indexToLayerChannel = y*width + x;\r\n\r\n\t\t\tif (ps.formatRecord->depth == 8)\r\n\t\t\t{\r\n\t\t\t\tunsigned8 *rowData = reinterpret_cast<unsigned8 *>(pLayerData);\r\n\t\t\t\trowData[indexToLayerChannel] = 255;\r\n\t\t\t}\r\n\t\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t\t{\r\n\t\t\t\tunsigned16 *rowData16bit = reinterpret_cast<unsigned16 *>(pLayerData);\r\n\t\t\t\trowData16bit[indexToLayerChannel] = ConvertTo16Bit(static_cast<unsigned8>(255));\r\n\t\t\t}\r\n\t\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t\t{\r\n\t\t\t\tfloat *rowData32bit = reinterpret_cast<float *>(pLayerData);\r\n\t\t\t\trowData32bit[indexToLayerChannel] = 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n// Copy one component from layer channel to Image \r\nvoid IntelPlugin::CopyFromLayerChannelIntoImage(char *pLayerData, const Image *image, int indexToImage, int indexToLayerChannel)\r\n{\r\n\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t{\r\n\t\t//Get pointer to first (and only) image, cast to 16bit for BC6\r\n\t\tunsigned16 *rowBigDataPtr = reinterpret_cast<unsigned16 *>(image->pixels);\r\n\r\n\t\t//Copy data from photoshop buffer into scrUncompressedImageScratch\r\n\t\t//Convert pixels to 16Bit for BC6 encoding\r\n\t\tif (ps.formatRecord->depth == 8)\r\n\t\t{\r\n\t\t\tunsigned8 *rowData = reinterpret_cast<unsigned8 *>(pLayerData);\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo16Bit(rowData[indexToLayerChannel]);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t{\r\n\t\t\tunsigned16 *rowData16bit = reinterpret_cast<unsigned16 *>(pLayerData);\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo16Bit(rowData16bit[indexToLayerChannel]);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t{\r\n\t\t\tfloat *rowData32bit = reinterpret_cast<float *>(pLayerData);\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo16Bit(rowData32bit[indexToLayerChannel]);\r\n\t\t}\r\n\t}\r\n\telse //BC1,3,7,4,5 or uncompressed (same treatment since we process by existing channel and they are all 8 bit)\r\n\t{\r\n\t\t//Get pointer to first (and only) image\r\n\t\tunsigned8 *rowBigDataPtr = image->pixels;\r\n\t\t\r\n\t\t//Convert pixels to 8bit for BC encoding\r\n\t\tif (ps.formatRecord->depth == 8)\r\n\t\t{\r\n\t\t\tunsigned8 *rowData = reinterpret_cast<unsigned8 *>(pLayerData); //Get image pointer\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo8Bit(rowData[indexToLayerChannel]);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t{\r\n\t\t\tunsigned16 *rowData16bit = reinterpret_cast<unsigned16 *>(pLayerData); //Get image pointer\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo8Bit(rowData16bit[indexToLayerChannel]);\r\n\t\t}\r\n\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t{\r\n\t\t\tfloat *rowData32bit = reinterpret_cast<float *>(pLayerData); //Get image pointer\r\n\t\t\trowBigDataPtr[indexToImage] = ConvertTo8Bit(rowData32bit[indexToLayerChannel]);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Copy document Layers into mipmap Images of ScratchImage\r\n//startMipIndex: specify from which layer to start copy. \r\n//endMipIndex: until which layer to copy. You can leave this blank in which case it will copy al remaining layers.\r\n//Each layer copies into the corresponding mip map level accorsing to its order from the base layer.\r\nvoid IntelPlugin::CopyLayersIntoMipMaps(ScratchImage *scrUncompressedImageScratch_, bool hasAlpha_, int startMipIndex, int endMipIndex)\r\n{\r\n\tint mipMapIndex = startMipIndex;  // mip level=0 is original image\r\n\tReadChannelDesc *pChannel;\r\n\tReadLayerDesc *layerDesc;\r\n\tchar *pLayerData;\r\n\r\n\t// Get a buffer to hold each channel as we process, formatRecord->planeBytes are computed the first time fetchImage() is called\r\n\tpLayerData = sPSBuffer->New(NULL, ps.formatRecord->imageSize.h * ps.formatRecord->imageSize.v * ps.formatRecord->planeBytes);\r\n\r\n\tif (pLayerData == NULL)\r\n\t{\r\n\t\tSetResult(memFullErr);\r\n\t\treturn;\r\n\t}\r\n\r\n\t//Get the first layer (usually Backround) in this layer list\r\n\tlayerDesc = ps.formatRecord->documentInfo->layersDescriptor;\r\n\r\n\t//Skip initial layers to startLayerIndex\r\n\tint startLayerIndex = startMipIndex;\r\n\twhile (startLayerIndex != 0)\r\n\t{\r\n\t\tlayerDesc = layerDesc->next; \r\n\t\tstartLayerIndex--;\r\n\t}\r\n\t\t\t\r\n\t//Cycle through remaining layers, Assign each layer to a different mip map in ScratchImage\r\n\twhile ((layerDesc != NULL) && (mipMapIndex <= endMipIndex))\r\n\t{\t\r\n\t\t//There are not enough mip maps in this Image, there are too much layers\r\n\t\tif (int(scrUncompressedImageScratch_->GetImageCount()) <= mipMapIndex)\r\n\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t//Get mip map image\r\n\t\tconst Image *image = scrUncompressedImageScratch_->GetImages() + mipMapIndex;\r\n\t\tif (!image)\r\n\t\t\tbreak;\r\n\r\n\t\t//Get the first channel in this channel list \r\n\t\tpChannel = layerDesc->compositeChannelsList;\r\n\t\tint planeNumber = 0;\r\n\r\n\t\t//Get the RGB channels\r\n\t\twhile (pChannel != NULL)\r\n\t\t{\r\n\t\t\t//Get pixel data from channel\r\n\t\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\r\n\t\t\tfor (size_t y = 0; y < image->height; y++)\r\n\t\t\t{\r\n\t\t\t\tfor (size_t x = 0; x < image->width; x++)\r\n\t\t\t\t{\r\n\t\t\t\t\tint indexToImage = int(image->width*y*4 + x*4);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\t\tint indexToLayerChannel = int(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\r\n\t\t\t\t\tCopyFromLayerChannelIntoImage(pLayerData, image, indexToImage+planeNumber, indexToLayerChannel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpChannel = pChannel->next;\r\n\t\t\tplaneNumber++;\r\n\t\t}\r\n\r\n\r\n\t\t//Get first layermask and set as alpha\r\n\t\t//If no layermask then use transparency channel \r\n\t\tif (!(pChannel = layerDesc->layerMask))\r\n\t\t{\r\n\t\t\t//Get first Transparency channel and set as alpha\r\n\t\t\tpChannel = layerDesc->transparency;\r\n\t\t}\r\n\r\n\t\t//Get alpha\r\n\t\tif (hasAlpha_ && (pChannel != NULL))\r\n\t\t{\r\n\t\t\t//Get pixel data from channel\r\n\t\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tFillLayerDataToWhite(pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\t\t}\r\n\r\n\t\tfor (size_t y = 0; y < image->height; y++)\r\n\t\t{\r\n\t\t\tfor (size_t x = 0; x < image->width; x++)\r\n\t\t\t{\r\n\t\t\t\tint indexToImage = int(image->width*y*4 + x*4);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\tint indexToLayerChannel = int(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\r\n\t\t\t\t//Here the planeumber is 3 for alpha\r\n\t\t\t\tCopyFromLayerChannelIntoImage(pLayerData, image, indexToImage+3, indexToLayerChannel);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\tlayerDesc = layerDesc->next; //Get next layer\r\n\t\tmipMapIndex++; //Next mip map\r\n\t}\r\n\t\t\t\r\n\tsPSBuffer->Dispose(static_cast<char**>(&(pLayerData)));\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Saves a special mip version of acube map out as a normal cube map. Special function to save out low res cubemaps\r\nHRESULT IntelPlugin::SaveCubeMipLevelToDDSFile(ScratchImage *scrImageScratch_, Blob& blob)\r\n{\r\n\t\t//Open a empty uncompressed scratch image\r\n\t    ScratchImage customMipLevelScratch;\r\n\t\tImage customMipLevel[6];\r\n\r\n\t\t//Get specific mip images\r\n\t\tfor (int i=0; i<6; i++)\r\n\t\t\tcustomMipLevel[i] = *scrImageScratch_->GetImage(ps.data->MipLevel, i, 0);\r\n\r\n\t\t//Init new cube map from these images\r\n\t\tcustomMipLevelScratch.InitializeCubeFromImages(customMipLevel, 6);\r\n\t\t\r\n\t\t//Save to file\r\n\t\treturn SaveToDDSMemory(customMipLevelScratch.GetImages(), customMipLevelScratch.GetImageCount(), customMipLevelScratch.GetMetadata(), DDS_FLAGS_NONE, blob);\r\n}\r\n\r\nvoid IntelPlugin::InitData()\r\n{\r\n\tmemset(ps.data, 0, sizeof(*ps.data));\r\n\r\n\tps.data->gMultithreaded = GetProcessorCount() > 1;\r\n\tps.data->encoding_g     = DXGI_FORMAT_BC3_UNORM;\r\n\tps.data->queryForParameters = true;\r\n\r\n\tps.data->TextureTypeIndex = TextureTypeEnum::COLOR;   //Col,Col+alpha,CubeFromLayer,CubefromCross,NM\r\n\tps.data->MipMapTypeIndex = MipmapEnum::NONE;      //None,Autogen,FromLayers\r\n\tps.data->MipLevel=0;\t\t\t                   // only valid if SetMipLevel == true\r\n\tps.data->SetMipLevel   = false;\r\n\tps.data->Normalize     = false;\r\n\tps.data->FlipX         = false;\r\n\tps.data->FlipY         = false;\r\n\tps.data->fast_bc67     = false;\r\n\tps.data->exposure\t   = 1;\r\n\tps.data->mipmapBatchAllowed = false;\r\n\tps.data->alphaBatchSeperate = false;\r\n} \r\n\r\nvoid IntelPlugin::DoWritePrepare()\r\n{\r\n\tps.formatRecord->maxData = 0;   //this signifies that we will provide our own buffer\r\n\tps.formatRecord->layerData = 0; //we dont want the layers handed in separately, we read them ourselfes\r\n}\r\n\r\nvoid IntelPlugin::DoWriteStart()\r\n{\r\n\tInitData();\r\n\t\r\n\t/* check with the scripting system whether to pop our dialog */\r\n\t\r\n\tps.data->queryForParameters = ReadScriptParamsForWrite();\r\n\t\r\n\t//If Multithreading init win32 threads and events\r\n\tif (ps.data->gMultithreaded)\r\n\t{\r\n\t\tInitWin32Threads();\r\n\t}\r\n\r\n\t//Show main dialog and get parameters\r\n\tif (OptionsDialog::DoModal(this) != IDOK) \r\n\t\tSetResult(userCanceledErr);\r\n\r\n\tif (GetResult() == noErr)\r\n\t{\r\n\t\tDoWriteDDS();\r\n\t}\r\n\r\n\tDisposeImageData();\r\n\r\n\tDestroyThreads();\r\n}\r\n\r\nvoid IntelPlugin::DoWriteContinue()\r\n{\r\n\t// should not be called as data has already been disposed\r\n}\r\n\r\nvoid IntelPlugin::DoWriteFinish()\r\n{\r\n\t// only called if not cancelled\r\n\tWriteScriptParamsForWrite(); // should be different for read/write\r\n}\r\n\r\n\r\n//Report error to Photoshop, plugin aborts by itself depicting this error message automatically\r\nvoid IntelPlugin::UserError(const char *usrerror)\r\n{\r\n\tunsigned char *pErrorString = reinterpret_cast<unsigned char*>(ps.formatRecord->errorString);\r\n\t\r\n\tif (pErrorString != NULL && (strlen(usrerror) < 256))\r\n\t{\r\n\t\t*ps.resultPtr = errReportString;\r\n\r\n\t\t*pErrorString = unsigned char(strlen(usrerror));\r\n\r\n\t\tmemcpy(pErrorString+1, usrerror, unsigned char(*pErrorString));\r\n\t}\r\n}\r\n\r\nvoid IntelPlugin::FetchImageData()\r\n{\r\n\tif (!ps.formatRecord->data)\r\n\t{\r\n\t\tint planesToGet = ps.formatRecord->planes;\r\n\t\tif (planesToGet > 4)\r\n\t\t\tplanesToGet = 4;\r\n\r\n\t\tps.formatRecord->theRect.left = 0;\r\n\t\tps.formatRecord->theRect.right = ps.formatRecord->imageSize.h;\r\n\t\tps.formatRecord->theRect.top = 0;\r\n\t\tps.formatRecord->theRect.bottom = ps.formatRecord->imageSize.v;\r\n\t\tps.formatRecord->loPlane = 0;\r\n\t\tps.formatRecord->hiPlane = planesToGet - 1;\r\n\t\t//The offset in bytes between planes of data in the buffers, for 8 bit interleved data this is 1. Doing this operation computes correctly for depth 16,32 etc \r\n\t\tps.formatRecord->planeBytes = (ps.formatRecord->depth + 7) >> 3; \r\n\t\t//The offset in bytes between columns of data in the buffer. usually 1 for non-interleaved data, or hiPlane-loPlane+1 for interleaved data. \r\n\t\tps.formatRecord->colBytes = (ps.formatRecord->hiPlane - ps.formatRecord->loPlane + 1) * ps.formatRecord->planeBytes;\r\n\t\t//The offset in bytes between rows of data in the buffer.\r\n\t\tps.formatRecord->rowBytes = ps.formatRecord->colBytes * (ps.formatRecord->theRect.right - ps.formatRecord->theRect.left);\r\n\r\n\t    // seems we have to allocate for ourselves here because we set maxData to 0\r\n\t\tuint32 bufferSize = \r\n\t\t\t(ps.formatRecord->theRect.bottom - ps.formatRecord->theRect.top) * \r\n\t\t\tps.formatRecord->rowBytes;\r\n\r\n\t\tif (ps.formatRecord->data = sPSBuffer->New( &bufferSize, bufferSize))\r\n\t\t{\r\n\t\t\tif (ps.formatRecord->documentInfo->layerCount > 1)\r\n\t\t\t{\r\n\t\t\t\t//Because Layermode is enabled for dds mip loading we can not just use the alpha as ususal when there are layers.\r\n\t\t        //RGBA should come from the merged layer data, all this is done in FillFromCompositedLayers().\r\n\t\t        FillFromCompositedLayers();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t    SetResult(ps.formatRecord->advanceState());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tSetResult(memFullErr);\r\n\r\n\t}\r\n}\r\n\r\nvoid IntelPlugin::DisposeImageData()\r\n{\r\n\tif (ps.formatRecord->data)\r\n\t{\r\n\t\tsPSBuffer->Dispose(reinterpret_cast<char**>(&ps.formatRecord->data));\r\n\t\tps.formatRecord->data = NULL;\r\n\t}\r\n\r\n\tif (preview.compressedImage)\r\n\t{\r\n\t\tdelete preview.compressedImage;\r\n\t\tpreview.compressedImage = NULL;\r\n\t}\r\n\tif (preview.uncompressedImage)\r\n\t{\r\n\t\tdelete preview.uncompressedImage;\r\n\t\tpreview.uncompressedImage = NULL;\r\n\t}\r\n}\r\n\r\n\r\n\r\nbool IntelPlugin::SetProgress(int part, int total)\r\n{\r\n\tif (ps.formatRecord)\r\n\t{\r\n\t\tif (ps.data->previewing)\t// don't do progress if we have UI! Allow cancel though\r\n\t\t{\r\n\t\t\treturn !ps.formatRecord->abortProc();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (ps.formatRecord->progressProc)\r\n\t\t\t\tps.formatRecord->progressProc(part, total);\r\n\t\t\tif (ps.formatRecord->abortProc)\r\n\t\t\t{\r\n\t\t\t\tif (ps.formatRecord->abortProc())\t// TRUE if user aborted\r\n\t\t\t\t{\r\n\t\t\t\t\tSetResult(userCanceledErr);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\t// continue!\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n//Main compression function which calls all other functions and saves dds\r\nvoid IntelPlugin::DoWriteDDS()\r\n{ \r\n\tif (GetResult() != noErr)\r\n\t\treturn;\r\n\r\n\tbool DoMipMaps = ps.data->MipMapTypeIndex == MipmapEnum::AUTOGEN || ps.data->MipMapTypeIndex == MipmapEnum::FROM_LAYERS;\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//Setup Photoshop callback structs and what data to get, section\r\n\r\n\tbool hasAlpha = HasAlpha();\r\n\r\n\tScratchImage* scrUncompressedImageScratch = new ScratchImage();\r\n\r\n\tif (!CopyDataForEncoding(scrUncompressedImageScratch, hasAlpha, DoMipMaps, true))\r\n\t{\r\n\t\tUserError(\"Unsupported bit depth\");\r\n\t\treturn;\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If this is a cube map, change scrUncompressedImageScratch into a CubeMap type image, section\r\n\tif (ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_CROSSED)\r\n\t{\r\n\t\tConvertToCubeMapFromCross(&scrUncompressedImageScratch);\r\n\t}\r\n\telse if (ps.data->TextureTypeIndex==TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\tif (!ConvertToCubeMapFromLayers(&scrUncompressedImageScratch, hasAlpha))\r\n\t\t{\r\n    \t\tUserError(\"Cubemap has not enough layers available. Consult the documentation (question mark next to the TextureType drop down) on how to create cubemaps\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//MipMap from Layers\r\n\t//Here we overwrite only the initial image MipLevel 0 from Layer 0, in order to generate automatic MipMaps\r\n\t//the second step of MipMap from layers is furter down\r\n\tif (IsMipMapsDefinedByLayer())\r\n\t{\r\n\t\t//We use this to avoid having to disable the visibility of all layers when creating mip level 0. \r\n\t\t//By default all images are composited onto mip level 0\r\n\t\tCopyLayersIntoMipMaps(scrUncompressedImageScratch, hasAlpha, 0, 1);\r\n\t}\r\n\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If FlipX/Y true, invert R/G channels scrUncompressedImageScratch only if Normal Map, section\r\n\tif ((ps.data->FlipX || ps.data->FlipY) && (ps.data->TextureTypeIndex==TextureTypeEnum::NORMALMAP))\r\n\t{\r\n\t\tFlipXYChannelNormalMap(scrUncompressedImageScratch);\r\n\t}\r\n\t\r\n\t//============================================================================================\r\n\t//============================================================================================\r\n\t//If MipMaps generate using DirectXTexLib, section\r\n\t//Also force mipmaps if setMipLevels on cube maps are specified\r\n\tif (DoMipMaps || IsCubeMapWithSetMipLevelOverride())\r\n\t{\r\n\t\t//Open temporary imageScratch to save mipmaps\r\n\t\tScratchImage *scrImageMipMapScratch = new ScratchImage(); \r\n\t\t\r\n\t\tDWORD mimapFilter = TEX_FILTER_DEFAULT|TEX_FILTER_SEPARATE_ALPHA; \r\n\r\n\t\t//Use the non Windows Imaging Components path if BC6 due to problems in mipmapping\r\n\t\tif (ps.data->encoding_g == DXGI_FORMAT_BC6H_UF16)\r\n\t\t\tmimapFilter |= TEX_FILTER_FORCE_NON_WIC;\r\n\r\n\t\t//Generate MipMaps from scrUncompressedImageScratch and save to scrImageMipMapScratch\r\n\t\tHRESULT hr = GenerateMipMaps(scrUncompressedImageScratch->GetImages(), scrUncompressedImageScratch->GetImageCount(), \r\n\t\t\t\t                     scrUncompressedImageScratch->GetMetadata(), mimapFilter, 0, *scrImageMipMapScratch );\r\n\t\tif( hr != S_OK )\r\n\t\t{\r\n\t\t\tUserError(\"Could not create MipMaps\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//free previous space\r\n\t\tdelete scrUncompressedImageScratch;\r\n\t\t\r\n\t\t//Copy over pointer from ScratchImage which has MipMap, now scrUncompressedImageScratch holds the initial image + mip chain\r\n\t\tscrUncompressedImageScratch = scrImageMipMapScratch;\r\n\r\n\t\t\r\n\t\t//MipMap from Layers\r\n\t\t//If we should get the mip maps from layers then override the existing mip maps with the layer images\r\n\t\tif (IsMipMapsDefinedByLayer())\r\n\t\t{\r\n\t\t\t//Copy all Layers starting 1. We omit 0 becasue we already copied it above.\r\n\t\t\tCopyLayersIntoMipMaps(scrUncompressedImageScratch, hasAlpha, 1);\r\n\t\t}\t\r\n\t}\r\n\r\n\r\n\t// If Normalization Postprocess option has been specified and this is a Normal Type texture type\r\n\t// Normalize all mip chain\r\n\tif (ps.data->Normalize && ps.data->TextureTypeIndex == TextureTypeEnum::NORMALMAP)\r\n\t\tNormalizeNormalMapChain(scrUncompressedImageScratch);\r\n\r\n\r\n\t// Compress scrUncompressedImageScratch into scrImageScratch, section\r\n\tScratchImage* scrImageScratch = new ScratchImage();\r\n\r\n\tps.data->previewing = false;\r\n\tif (!CompressToScratchImage(&scrImageScratch, &scrUncompressedImageScratch, hasAlpha))\r\n\t\treturn;\r\n\r\n\t// Save compressed DirectXTex image structure to file, section\r\n\tBlob blob;\r\n\tHRESULT hr;\r\n\r\n\t// Save compressed image\r\n\r\n\tif (IsCubeMapWithSetMipLevelOverride()) \t//If setMipLevel on cubemap specified\r\n\t\thr = SaveCubeMipLevelToDDSFile(scrImageScratch, blob);\r\n\telse\r\n\t\thr = SaveToDDSMemory(scrImageScratch->GetImages(), scrImageScratch->GetImageCount(), scrImageScratch->GetMetadata(), DDS_FLAGS_NONE, blob);\r\n\r\n\tif (hr == S_OK)\r\n\t{\r\n\t\tif (int size = int(blob.GetBufferSize()))\r\n\t\t{\r\n\t\t\tif (!WriteFile(reinterpret_cast<HANDLE>(ps.formatRecord->dataFork), blob.GetBufferPointer(), size, reinterpret_cast<LPDWORD>(&size), NULL)) \r\n\t\t\t\tSetResult(writErr);\r\n\t\t\telse if (size < int(blob.GetBufferSize()))\r\n\t\t\t\tSetResult(dskFulErr);\r\n\t\t}\r\n\t}\r\n\telse\r\n\t\tUserError(\"Failed to save\");\r\n\r\n\r\n\t// Cleanup\r\n\r\n\tif (scrImageScratch != NULL)\r\n\t    delete scrImageScratch;\r\n\t\r\n\tif (scrUncompressedImageScratch != NULL)\r\n\t    delete scrUncompressedImageScratch;\r\n}\r\n\r\nbool IntelPlugin::ReadScriptParamsForWrite()\r\n{\r\n\t// Populate this array if we're expecting any keys,\r\n\t// must be NULLID terminated:\r\n\tDescriptorKeyIDArray array = { NULLID };\r\n\t\r\n\t\r\n\t// Assume we want to pop our dialog unless explicitly told not to:\r\n\tBoolean\t\t\t\treturnValue = true;\r\n\t\r\n\tauto descParams = ps.formatRecord->descriptorParameters;\r\n\r\n\tif (HostDescriptorAvailable(descParams, NULL))\r\n\t{ // descriptor suite is available, go ahead and open descriptor:\r\n\t\r\n\t\tauto reader = descParams->readDescriptorProcs;\r\n\r\n\t\t// PIUtilities routine to open descriptor handed to us by host:\r\n\t\tif (PIReadDescriptor token = reader->openReadDescriptorProc(descParams->descriptor, array))\r\n\t\t{ // token was valid, so read keys from it:\r\n\r\n\t\t\tDescriptorKeyID\t\tkey = NULLID;\t// the next key\r\n\t\t\tDescriptorTypeID\ttype = NULLID;\t// the type of the key we read\r\n\t\t\tint32\t\t\t\tflags = 0;\t\t// any flags for the key\r\n\t\t\twhile (reader->getKeyProc(token, &key, &type, &flags))\r\n\t\t\t{ // got a valid key.  Figure out where to put it:\r\n\t\t\t\r\n\t\t\t\tswitch (key)\r\n\t\t\t\t{ // match a key to its expected type:case keyAmount:\r\n\r\n\t\t\t\t\tcase keyPreset:\r\n\t\t\t\t\t\treader->getStringProc(token, &(ps.data->presetBatchName));\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t// ignore all other cases and classes\r\n\t\t\t\t\t// See PIActions.h and PIUtilities.h for\r\n\t\t\t\t\t// routines and macros for scripting functions.\r\n\t\t\t\t\r\n\t\t\t\t} // key\r\n\t\t\t\t\r\n\t\t\t} // PIGetKey\r\n\r\n\t\t\t// PIUtilities routine that automatically deallocates,\r\n\t\t\t// closes, and sets token to NULL:\r\n\t\t\t\t\r\n\t\t\tif (OSErr err = HostCloseReader(descParams, ps.formatRecord->handleProcs, &token))\r\n\t\t\t{ // an error did occur while we were reading keys:\r\n\t\t\t\r\n\t\t\t\tif (err == errMissingParameter) // missedParamErr == -1715\r\n\t\t\t\t{ // missing parameter somewhere.  Walk IDarray to find which one.\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{ // serious error.  Return it as a global result:\r\n\t\t\t\t\tSetResult(err);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t} // stickyError\r\n\t\t\t\t\t\t\r\n\t\t} // didn't have a valid token\r\n\t\t\r\n\t\t// Whether we had a valid token or not, we were given information\r\n\t\t// as to whether to pop our dialog or not.  PIUtilities has a routine\r\n\t\t// to check that and return TRUE if we should pop it, FALSE if not:\t\r\n\t\treturnValue = HostPlayDialog(descParams);\r\n\t\r\n\t} // descriptor suite unavailable\r\n\t\r\n\treturn !!returnValue;\r\n}\r\n\r\n\r\nOSErr IntelPlugin::WriteScriptParamsForWrite (void)\r\n{\r\n\tOSErr\t\t\t\t\t\tgotErr = writErr;\r\n\t\t\t\r\n\tif (auto descParams = ps.formatRecord->descriptorParameters)\r\n\t{\r\n\t\tif (auto writeProcs = descParams->writeDescriptorProcs)\r\n\t\t{\r\n\t\t\tif (auto token = writeProcs->openWriteDescriptorProc())\r\n\t\t\t{\r\n\t\t\t\t// now write our data\r\n\t\t\t\twriteProcs->putStringProc(token, keyPreset, ps.data->presetBatchName);\r\n\r\n\t\t\t\tsPSHandle->Dispose(descParams->descriptor);\r\n\t\t\t\tPIDescriptorHandle\th;\r\n\t\t\t\twriteProcs->closeWriteDescriptorProc(token, &h);\r\n\t\t\t\tdescParams->descriptor = h;\r\n\r\n\t\t\t\tgotErr = noErr;\t// we're ok!\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn gotErr;\r\n}\r\n\r\nbool IntelPlugin::ReadScriptParamsForRead()\r\n{\r\n\t// Populate this array if we're expecting any keys,\r\n\t// must be NULLID terminated:\r\n\tDescriptorKeyIDArray array = { NULLID };\r\n\t\r\n\t// Assume we want to pop our dialog unless explicitly told not to:\r\n\tBoolean\t\t\t\treturnValue = true;\r\n\t\r\n\tauto descParams = ps.formatRecord->descriptorParameters;\r\n\r\n\tif (HostDescriptorAvailable(descParams, NULL))\r\n\t{ // descriptor suite is available, go ahead and open descriptor:\r\n\t\r\n\t\tauto reader = descParams->readDescriptorProcs;\r\n\r\n\t\t// PIUtilities routine to open descriptor handed to us by host:\r\n\t\tif (PIReadDescriptor token = reader->openReadDescriptorProc(descParams->descriptor, array))\r\n\t\t{ // token was valid, so read keys from it:\r\n\r\n\t\t\tDescriptorKeyID\t\tkey = NULLID;\t// the next key\r\n\t\t\tDescriptorTypeID\ttype = NULLID;\t// the type of the key we read\r\n\t\t\tint32\t\t\t\tflags = 0;\t\t// any flags for the key\r\n\t\t\tBoolean             mipFlag = false;\r\n\t\t\tBoolean             alphaFlag = false;\r\n\t\t\twhile (reader->getKeyProc(token, &key, &type, &flags))\r\n\t\t\t{ // got a valid key.  Figure out where to put it:\r\n\t\t\t\r\n\t\t\t\tswitch (key)\r\n\t\t\t\t{ // match a key to its expected type:case keyAmount:\r\n\r\n\t\t\t\t\tcase keyMipMap:\r\n\t\t\t\t\t\treader->getBooleanProc(token, &mipFlag);\r\n\t\t\t\t\t\tps.data->mipmapBatchAllowed = !!mipFlag; //conve form Boolean to bool\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase keyAlphaS:\r\n\t\t\t\t\t\treader->getBooleanProc(token, &alphaFlag);\r\n\t\t\t\t\t\tps.data->alphaBatchSeperate = !!alphaFlag; //conve form Boolean to bool\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t// ignore all other cases and classes\r\n\t\t\t\t\t// See PIActions.h and PIUtilities.h for\r\n\t\t\t\t\t// routines and macros for scripting functions.\r\n\t\t\t\t\r\n\t\t\t\t} // key\r\n\t\t\t\t\r\n\t\t\t} // PIGetKey\r\n\r\n\t\t\t// PIUtilities routine that automatically deallocates,\r\n\t\t\t// closes, and sets token to NULL:\r\n\t\t\t\t\r\n\t\t\tif (OSErr err = HostCloseReader(descParams, ps.formatRecord->handleProcs, &token))\r\n\t\t\t{ // an error did occur while we were reading keys:\r\n\t\t\t\r\n\t\t\t\tif (err == errMissingParameter) // missedParamErr == -1715\r\n\t\t\t\t{ // missing parameter somewhere.  Walk IDarray to find which one.\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{ // serious error.  Return it as a global result:\r\n\t\t\t\t\tSetResult(err);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t} // stickyError\r\n\t\t\t\t\t\t\r\n\t\t} // didn't have a valid token\r\n\t\t\r\n\t\t// Whether we had a valid token or not, we were given information\r\n\t\t// as to whether to pop our dialog or not.  PIUtilities has a routine\r\n\t\t// to check that and return TRUE if we should pop it, FALSE if not:\t\r\n\t\treturnValue = HostPlayDialog(descParams);\r\n\t\r\n\t} // descriptor suite unavailable\r\n\t\r\n\treturn !!returnValue;\r\n\r\n\t//auto descParams = ps.formatRecord->descriptorParameters;\r\n\r\n\t//return descParams->playInfo == plugInDialogDisplay;\r\n}\r\n\r\nOSErr IntelPlugin::WriteScriptParamsForRead ()\r\n{\r\n\tOSErr\t\t\t\t\t\tgotErr = writErr;\r\n\t\t\t\r\n\tif (auto descParams = ps.formatRecord->descriptorParameters)\r\n\t{\r\n\t\tif (auto writeProcs = descParams->writeDescriptorProcs)\r\n\t\t{\r\n\t\t\tif (auto token = writeProcs->openWriteDescriptorProc())\r\n\t\t\t{\r\n\t\t\t\t// now write our data\r\n\t\t\t\tBoolean temp = ps.data->mipmapBatchAllowed;\r\n\t\t\t\twriteProcs->putBooleanProc(token, keyMipMap, temp);\r\n\t\t\t\ttemp = ps.data->alphaBatchSeperate;\r\n\t\t\t\twriteProcs->putBooleanProc(token, keyAlphaS, temp);\r\n\r\n\t\t\t\tsPSHandle->Dispose(descParams->descriptor);\r\n\t\t\t\tPIDescriptorHandle\th;\r\n\t\t\t\twriteProcs->closeWriteDescriptorProc(token, &h);\r\n\t\t\t\tdescParams->descriptor = h;\r\n\r\n\t\t\t\tgotErr = noErr;\t// we're ok!\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn gotErr;\r\n}\r\n\r\nvoid IntelPlugin::DoFilterFile (void)\r\n{\r\n\t// File can be tested for validity here\r\n\t//SetResult(formatCannotRead);\r\n\tSetResult(noErr);\r\n}\r\n\r\nvoid IntelPlugin::DoReadPrepare()\r\n{\r\n\tps.formatRecord->maxData = 0;\r\n\tloadInfo.isCubeMap = false;\r\n\tloadInfo.readImagePtr = NULL;\r\n\tloadInfo.loadMipMapIndex = 0;\r\n\tloadInfo.hasMips = false;\r\n\tloadInfo.hasAlpha = false;\r\n}\r\n\r\nvoid IntelPlugin::DoReadStart()\r\n{\r\n\tLARGE_INTEGER fileSize;\r\n\t\r\n\tshowLoadingCursor();\r\n\r\n\t//Read any descriptor values for scripting support and return if we are in batch mode.\r\n\tps.data->queryForParameters = ReadScriptParamsForRead();\r\n\r\n\t//Rewind to start of file\r\n\tOSErr err= PSSDKSetFPos (ps.formatRecord->dataFork, fsFromStart, 0);\r\n\tif (err != noErr) \r\n\t{\r\n\t\tSetResult(err);\r\n\t\tshowNormalCursor();\r\n\t\treturn;\r\n\t}\r\n\r\n\t//Get filesize\r\n\tGetFileSizeEx(reinterpret_cast<HANDLE>(ps.formatRecord->dataFork), &fileSize);\r\n\r\n\t//Allocate buffer equal filesize\r\n\tuint8 *wholeFileBuffer = new uint8[size_t(fileSize.QuadPart)];\r\n\tint32 readCount = int32(fileSize.QuadPart);\r\n\t\r\n\t//ReadIn whole file\r\n\terr = PSSDKRead (ps.formatRecord->dataFork, &readCount, wholeFileBuffer);\r\n\tif (err != noErr) \r\n\t{\r\n\t\tSetResult(err);\r\n\t\tshowNormalCursor();\r\n\t\treturn;\r\n\t}\r\n\r\n\t//If not enough bytes read, error\r\n\tif (err == noErr && readCount != fileSize.QuadPart)\r\n\t{\r\n\t\tSetResult(eofErr);\r\n\t\tshowNormalCursor();\r\n\t\treturn;\r\n\t}\r\n\r\n\t//Load DDS from memory\r\n\tScratchImage *ddsCompressedImage = new ScratchImage;\r\n\tTexMetadata  readImageInfo;\r\n\r\n\tHRESULT hr = LoadFromDDSMemory( wholeFileBuffer, readCount, DDS_FLAGS_NONE, &readImageInfo, *ddsCompressedImage);\r\n\r\n\t//Check if the image suports alpha. Note For DX, BC1 supports alpha for us not\r\n\tbool alphaIsWhite = ddsCompressedImage->IsAlphaAllOpaque();\r\n\tbool compressedImageHasAlpha = (DirectX::HasAlpha(readImageInfo.format) &&  !alphaIsWhite &&\r\n\t\t                            readImageInfo.format != DXGI_FORMAT_BC1_UNORM && \r\n\t\t                            readImageInfo.format != DXGI_FORMAT_BC1_UNORM_SRGB); \r\n\tloadInfo.hasAlpha = compressedImageHasAlpha;\r\n\t\r\n\t//Check if there are mip maps\r\n\tbool compressedImageHasMipMaps = (readImageInfo.mipLevels > 1) ? true : false;\r\n\r\n\tbool separateAlphaChannel =  ps.data->alphaBatchSeperate; //get predefined values for batching from descriptors in ReadScriptParamsForRead()\r\n\tbool loadDDSMipMaps       =  ps.data->mipmapBatchAllowed; //get predefined values for batching from descriptors in ReadScriptParamsForRead\r\n\tbool compressedImageIsCubemap = (readImageInfo.arraySize == 6) ? true : false;\r\n\r\n\t//For cube maps disable alpha and mip maps for now\r\n\tif (compressedImageIsCubemap)\r\n\t{\r\n\t\tcompressedImageHasAlpha = compressedImageHasMipMaps = false;\r\n\t\tseparateAlphaChannel = false;\r\n\t}\r\n\r\n\t//Show load dialog\r\n\t//Do we need the user to make a selection regarding alpha or mip maps?\r\n\tif (compressedImageHasAlpha || compressedImageHasMipMaps)\r\n\t{\r\n\t\t//ask user if he wants them, and not in batch\r\n\t\tif (ps.data->queryForParameters)\r\n\t\t{\r\n\t\t\tunsigned8 loadDialogResult = ShowLoadDialog (compressedImageHasAlpha, compressedImageHasMipMaps, GetActiveWindow());\r\n\t\t\t\r\n\t\t\t//decode result \r\n\t\t\tseparateAlphaChannel = (loadDialogResult & LoadInfoEnum::USE_SEPARATEALPHA) ? true : false;\r\n\t\t\tloadDDSMipMaps = (loadDialogResult & LoadInfoEnum::USE_MIPMAPS) ? true : false; \r\n\r\n\t\t\t//store descriptor values for scripting. Actual write happens in DoReadFinish()\r\n\t\t\tps.data->alphaBatchSeperate = separateAlphaChannel;\r\n\t\t\tps.data->mipmapBatchAllowed = loadDDSMipMaps;\r\n\t\t}\r\n\t}\r\n\r\n\t//init to no layers\r\n\tps.formatRecord->layerData = 0; \r\n\r\n\t//Do we have mip maps, is this a cube map, or a simple image\r\n\tif (compressedImageIsCubemap)\r\n\t{\r\n\t\t//Cube map\r\n\t\tloadInfo.isCubeMap = true;\r\n\t\tps.formatRecord->layerData = 6; //specify the creatoin of six layers\r\n\t}\r\n\telse if (compressedImageHasMipMaps)\r\n\t{\r\n\t\t//Image has mip maps\r\n\t\tif (loadDDSMipMaps)\r\n\t\t{\r\n\t\t\tloadInfo.hasMips = true;\r\n\t\t\tps.formatRecord->layerData = uint32(readImageInfo.mipLevels); //specify creation of layers\r\n\t\t}\r\n\t}\r\n\r\n\t//By default we use layer transparency when the image has alpha, but when the separatealpha flag \r\n\t//is set we use the background image with a dedicated alpha channel\r\n\tif (!separateAlphaChannel && compressedImageHasAlpha && ps.formatRecord->layerData == 0)\r\n\t{\r\n\t\tps.formatRecord->layerData = 1;\r\n\t}\r\n\r\n\t// pick a target format\r\n\tauto targetFormat = DXGI_FORMAT_R8G8B8A8_UNORM;\r\n\r\n\tif (readImageInfo.format == DXGI_FORMAT_BC6H_SF16 || readImageInfo.format == DXGI_FORMAT_BC6H_UF16)\t// 16 bit short floats\r\n\t\ttargetFormat = DXGI_FORMAT_R32G32B32A32_FLOAT;\r\n\telse if (BitsPerColor(readImageInfo.format) > 16)\r\n\t\ttargetFormat = DXGI_FORMAT_R32G32B32A32_FLOAT;\r\n\telse if (BitsPerColor(readImageInfo.format) > 8)\r\n\t\ttargetFormat = DXGI_FORMAT_R16G16B16A16_UNORM;\r\n\telse if (IsSRGB(readImageInfo.format))\r\n\t\ttargetFormat = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;\r\n\r\n\r\n\t// Is it already in the correct format?\r\n\tif (readImageInfo.format == targetFormat)\r\n\t{\r\n\t\t// No conversion required, just swap pointers\r\n\t\tloadInfo.readImagePtr = ddsCompressedImage;\r\n\t\tddsCompressedImage = NULL;\r\n\t}\r\n\telse \r\n\t{\r\n\t\tloadInfo.readImagePtr = new ScratchImage();\r\n\t\tif (IsCompressed(readImageInfo.format))\t// is it compressed?\r\n\t\t\thr = Decompress( ddsCompressedImage->GetImages(), ddsCompressedImage->GetImageCount(), ddsCompressedImage->GetMetadata(), targetFormat, *loadInfo.readImagePtr);\r\n\t\telse\r\n\t\t\thr = Convert( ddsCompressedImage->GetImages(), ddsCompressedImage->GetImageCount(), ddsCompressedImage->GetMetadata(), targetFormat, 0, 0, *loadInfo.readImagePtr);\r\n\t}\r\n\t\r\n\tif ( FAILED(hr) )\r\n\t{\r\n\t\tUserError(\"Can not load image.\");\r\n\t\tdelete loadInfo.readImagePtr;\r\n\t\tdelete ddsCompressedImage;\r\n\t\tdelete[] wholeFileBuffer;\r\n\t\tshowNormalCursor();\r\n\t\treturn;\r\n\t}\r\n\r\n\t// update the metadata\r\n\treadImageInfo = loadInfo.readImagePtr->GetMetadata();\r\n\r\n\t//Setup formatRecord for loading\r\n\tps.formatRecord->imageRsrcData = NULL;\r\n\tps.formatRecord->imageRsrcSize = 0;\r\n\tps.formatRecord->imageMode = plugInModeRGBColor;\r\n\tif (ps.formatRecord->HostSupports32BitCoordinates && \r\n\t\tps.formatRecord->PluginUsing32BitCoordinates)\r\n\t{\r\n\t\tps.formatRecord->imageSize32.v = static_cast<int16>(readImageInfo.height);\r\n\t    ps.formatRecord->imageSize32.h = static_cast<int16>(readImageInfo.width);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tps.formatRecord->imageSize.v = static_cast<int16>(readImageInfo.height);\r\n\t    ps.formatRecord->imageSize.h = static_cast<int16>(readImageInfo.width);\r\n\t}\r\n\tps.formatRecord->depth = int(BitsPerColor(targetFormat));\r\n\r\n\tif (separateAlphaChannel)\r\n\t{\r\n\t\tps.formatRecord->planes = compressedImageHasAlpha ? 4 : 3;\t// 4 channels for alpha\r\n\t\tps.formatRecord->transparencyPlane = 3;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tps.formatRecord->planes = (ps.formatRecord->layerData > 0) ? 4 : 3;\t// layers have alpha, background not so much\r\n\t\tps.formatRecord->transparencyPlane = 3;\r\n\t}\r\n\r\n\tps.formatRecord->transparencyMatting = 0;\r\n\r\n\t\r\n\t//Cleanup\r\n\tdelete[] wholeFileBuffer;\r\n\r\n\tif (ddsCompressedImage)\r\n\t\tdelete ddsCompressedImage;\r\n}\r\n\r\nvoid IntelPlugin::DoReadContinue()\r\n{\r\n\r\n\t//Prepare formatRecord to get whole image\r\n\tps.formatRecord->loPlane = 0;\r\n\tps.formatRecord->hiPlane = ps.formatRecord->planes - 1;\r\n\t\r\n\tps.formatRecord->theRect.left = 0;\r\n\tps.formatRecord->theRect.right = ps.formatRecord->imageSize.h;\r\n\tps.formatRecord->theRect.top = 0;\r\n\tps.formatRecord->theRect.bottom = ps.formatRecord->imageSize.v;\r\n\t\r\n\t//The offset in BYTES between planes of data in the buffers, for 8 bit interleved data this is 1. Doing this operation computes correctly for depth 16 bit, 32 bit etc \r\n\tps.formatRecord->planeBytes = (ps.formatRecord->depth + 7) >> 3;\r\n\t//The offset in bytes between columns of data in the buffer. usually 1 for non-interleaved data, or hiPlane-loPlane+1 for interleaved data. \r\n\tps.formatRecord->colBytes = (ps.formatRecord->hiPlane - ps.formatRecord->loPlane + 1) * ps.formatRecord->planeBytes;\r\n\t//The offset in bytes between rows of data in the buffer.\r\n\tps.formatRecord->rowBytes = ps.formatRecord->colBytes * (ps.formatRecord->theRect.right - ps.formatRecord->theRect.left);\r\n\t\r\n\r\n\t//Allocate buffer for ->data field\r\n\t//seems we have to allocate for ourselves here because we set maxData to 0\r\n\tuint32 bufferSize =\t(ps.formatRecord->theRect.bottom - ps.formatRecord->theRect.top) * ps.formatRecord->rowBytes;\r\n\tPtr pixelData = sPSBuffer->New( &bufferSize, bufferSize );\r\n\r\n\tif (pixelData == NULL)\r\n\t{\r\n\t\tSetResult(memFullErr);\r\n\t\treturn;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tmemset(pixelData, 0, bufferSize); //init buffer to 0\r\n\t\t//Assign buffer to photoshop buffer\r\n\t\tps.formatRecord->data = pixelData;\r\n\t}\r\n\t\r\n\r\n\t//Get pointer to  image\r\n\tconst Image *img; \r\n\r\n\t//Get the right image for this iteration (this function is called multiple times in case of mips or cube map)\r\n\tif (loadInfo.isCubeMap)\r\n\t{\r\n\t\t//Cube map load six images as layers\r\n\t\timg = loadInfo.readImagePtr->GetImage(0, loadInfo.loadMipMapIndex, 0);\r\n\t\tloadInfo.loadMipMapIndex++;\r\n\t}\r\n\telse if (loadInfo.hasMips)\r\n\t{\r\n\t\t//Load image maps as layers\r\n\t\timg = loadInfo.readImagePtr->GetImage(loadInfo.loadMipMapIndex, 0, 0);\r\n\t\tloadInfo.loadMipMapIndex++;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Normal single mip image\r\n\t\timg= loadInfo.readImagePtr->GetImages();\r\n\t}\r\n\t\r\n\r\n\t//Now copy image into photoshop buffer\r\n\tunsigned8 *rowSrcDataPtr = img->pixels;\r\n\tunsigned8 *rowTgtDataPtr = reinterpret_cast<unsigned8 *>(pixelData);\r\n\t\r\n\tfor (size_t y=0; y<img->height; y++)\r\n\t{\r\n\t\tfor (size_t x=0; x<img->width; x++)\r\n\t\t{\r\n\r\n\t\t\tswitch (img->format)\r\n\t\t\t{\r\n\t\t\tcase DXGI_FORMAT_R8G8B8A8_UNORM:\r\n\t\t\tcase DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:\r\n\t\t\t\t{\r\n\t\t\t\t\tunsigned8 *src = rowSrcDataPtr + y * img->rowPitch + x * 4; \r\n\t\t\t\t\tunsigned8 *dst = rowTgtDataPtr + y * ps.formatRecord->rowBytes + x * ps.formatRecord->colBytes;\r\n\t\t\t\t\tfor (int p=0; p<ps.formatRecord->planes; p++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdst[p] = src[p];\r\n\r\n\t\t\t\t\t\t//If we are loading a cube map face then force alpha to white\r\n\t\t\t\t\t\tif (loadInfo.isCubeMap && loadInfo.hasAlpha)\r\n\t\t\t\t\t\t\tdst[ps.formatRecord->planes-1] = 255;\r\n\t\t\t\t\t}\r\n\t\t\t\t} break;\r\n\r\n\t\t\tcase DXGI_FORMAT_R16G16B16A16_UNORM:\t\r\n\t\t\t\t{\r\n\t\t\t\t\tconst uint16 *src = reinterpret_cast<const uint16*>(rowSrcDataPtr + y * img->rowPitch + x * 8); \r\n\t\t\t\t\tuint16 *dst = reinterpret_cast<uint16*>(rowTgtDataPtr + y * ps.formatRecord->rowBytes + x * ps.formatRecord->colBytes);\r\n\t\t\t\t\tfor (int p=0; p<ps.formatRecord->planes; p++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdst[p] = src[p];\r\n\r\n\t\t\t\t\t\t//If we are loading a cube map face then force alpha to white\r\n\t\t\t\t\t\tif (loadInfo.isCubeMap && loadInfo.hasAlpha)\r\n\t\t\t\t\t\t\tdst[ps.formatRecord->planes-1] = ConvertTo16Bit(static_cast<unsigned8>(255));\r\n\t\t\t\t\t}\r\n\t\t\t\t} break;\r\n\r\n\t\t\tcase DXGI_FORMAT_R32G32B32A32_FLOAT:\t// any hdr should be decompressed to this format if possible\r\n\t\t\t\t{\r\n\t\t\t\t\tconst float *src = reinterpret_cast<const float*>(rowSrcDataPtr + y * img->rowPitch + x * 16); \r\n\t\t\t\t\tfloat *dst = reinterpret_cast<float*>(rowTgtDataPtr + y * ps.formatRecord->rowBytes + x * ps.formatRecord->colBytes);\r\n\t\t\t\t\tfor (int p=0; p<ps.formatRecord->planes; p++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdst[p] = src[p];\r\n\r\n\t\t\t\t\t\t//If we are loading a cube map face then force alpha to white\r\n\t\t\t\t\t\tif (loadInfo.isCubeMap && loadInfo.hasAlpha)\r\n\t\t\t\t\t\t\tdst[ps.formatRecord->planes-1] = 1.0f;\r\n\t\t\t\t\t}\r\n\t\t\t\t} break;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// not recognized\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tSetResult(ps.formatRecord->advanceState());\r\n\t\r\n\r\n\t//Cleanup\r\n\tps.formatRecord->data = NULL;\r\n\tsPSBuffer->Dispose(&pixelData);\r\n}\r\n\r\nvoid IntelPlugin::DoReadFinish()\r\n{\r\n\tdelete loadInfo.readImagePtr;\r\n\tloadInfo.readImagePtr = NULL;\r\n\tWriteScriptParamsForRead();\r\n\tshowNormalCursor();\r\n}\r\n\r\nvoid IntelPlugin::DoReadLayerStart()\r\n{\r\n\tstatic uint16  gLayerNameUtf16[10];\r\n\tchar           gLayerNameAscii[10];\r\n\tint i=0;\r\n\r\n\t//Assign layer names\r\n\tif (loadInfo.hasMips)\r\n\t{\r\n\t\t//Create mip layer name\r\n\t\tsprintf(gLayerNameAscii,\"Mip%d\", loadInfo.loadMipMapIndex);\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tgLayerNameUtf16[i] = gLayerNameAscii[i];\r\n\t\t\ti++;\r\n\t\t} while (gLayerNameAscii[i] != '\\0');\r\n\t\tgLayerNameUtf16[i] = '\\0';\r\n\t\t\t\t\t\t\t\r\n\t\tps.formatRecord->layerName = gLayerNameUtf16;\r\n\t}\r\n\telse if (loadInfo.isCubeMap)\r\n\t{\r\n\t\tchar* facesmap[] = {\"+X\",\"-X\",\"+Y\",\"-Y\",\"+Z\",\"-Z\"};\r\n\r\n\t\tsprintf(gLayerNameAscii,\"%s\", facesmap[loadInfo.loadMipMapIndex]);\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tgLayerNameUtf16[i] = gLayerNameAscii[i];\r\n\t\t\ti++;\r\n\t\t} while (gLayerNameAscii[i] != '\\0');\r\n\t\tgLayerNameUtf16[i] = '\\0';\r\n\t\t\t\t\t\t\t\r\n\t\tps.formatRecord->layerName = gLayerNameUtf16;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//ps.formatRecord->layerName = L\"Layer 0\";\r\n\t}\r\n}\r\n\r\n//-------------------------------------------------------------------------------\r\n//\r\n// CreateDataHandle\r\n//\r\n// Create a handle to our Data structure. Photoshop will take ownership of this\r\n// handle and delete it when necessary.\r\n//-------------------------------------------------------------------------------\r\nvoid IntelPlugin::CreateDataHandle(void)\r\n{\r\n\tHandle h = sPSHandle->New(sizeof(Globals));\r\n\tif (h != NULL)\r\n\t\t*ps.dataPtr = reinterpret_cast<intptr_t>(h);\r\n\telse\r\n\t\t*ps.resultPtr = memFullErr;\r\n}\r\n\r\n//-------------------------------------------------------------------------------\r\n//\r\n// LockHandles\r\n//\r\n// Lock the handles and get the pointers for data\r\n// Set the global error, *ps.resultPtr, if there is trouble\r\n//\r\n//-------------------------------------------------------------------------------\r\nvoid IntelPlugin::LockHandles(void)\r\n{\r\n\tif ( ! (*ps.dataPtr) )\r\n\t{\r\n\t\t*ps.resultPtr = formatBadParameters;\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tBoolean oldLock = FALSE;\r\n\tsPSHandle->SetLock(reinterpret_cast<Handle>(*ps.dataPtr), true, \r\n\t\t               reinterpret_cast<Ptr *>(&ps.data), &oldLock);\r\n\t\r\n\tif (ps.data == NULL)\r\n\t{\r\n\t\t*ps.resultPtr = memFullErr;\r\n\t\treturn;\r\n\t}\r\n}\r\n\r\n//-------------------------------------------------------------------------------\r\n//\r\n// UnlockHandles\r\n//\r\n// Unlock the handles used by the data and params pointers\r\n//\r\n//-------------------------------------------------------------------------------\r\nvoid IntelPlugin::UnlockHandles(void)\r\n{\r\n\tBoolean oldLock = FALSE;\r\n\tif (*ps.dataPtr)\r\n\t\tsPSHandle->SetLock(reinterpret_cast<Handle>(*ps.dataPtr), false, \r\n\t\t                   reinterpret_cast<Ptr *>(&ps.data), &oldLock);\r\n}\r\n\r\n\r\n\r\nvoid IntelPlugin::PluginMain(const int16 selector,\r\n\t\t\t\t\t\t             FormatRecordPtr formatRecord,\r\n\t\t\t\t\t\t             intptr_t * data,\r\n\t\t\t\t\t\t             int16 * result)\r\n{\r\n\t//---------------------------------------------------------------------------\r\n\t//\tStore persistent data\r\n\t//---------------------------------------------------------------------------\r\n\r\n\tps.formatRecord = formatRecord;\r\n\tps.pluginRef = reinterpret_cast<SPPluginRef>(formatRecord->plugInRef);\r\n\tps.resultPtr = result;\r\n\tps.dataPtr = data;\r\n\r\n\t//---------------------------------------------------------------------------\r\n\t//\t(2) Check for about box request.\r\n\t//\r\n\t// \tThe about box is a special request; the parameter block is not filled\r\n\t// \tout, none of the callbacks or standard data is available.  Instead,\r\n\t// \tthe parameter block points to an AboutRecord, which is used\r\n\t// \ton Windows.\r\n\t//---------------------------------------------------------------------------\r\n\tif (selector == formatSelectorAbout)\r\n\t{\r\n\t\tAboutRecordPtr aboutRecord = reinterpret_cast<AboutRecordPtr>(formatRecord);\r\n\t\tsSPBasic = aboutRecord->sSPBasic;\r\n\t\tShowAboutIntel(aboutRecord);\r\n\t}\r\n\telse\r\n\t{ // do the rest of the process as normal:\r\n\r\n\t\tsSPBasic = ps.formatRecord->sSPBasic;\r\n\r\n\t\tif (formatRecord->advanceState == NULL)\r\n\t\t{\r\n\t\t\t*ps.resultPtr = errPlugInHostInsufficient;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// new for Photoshop 8, big documents, rows and columns are now > 30000 pixels\r\n\t\t//if (formatRecord->HostSupports32BitCoordinates)\r\n\t\t//\tformatRecord->PluginUsing32BitCoordinates = true;\r\n\r\n\r\n\t\t//-----------------------------------------------------------------------\r\n\t\t//\t(3) Allocate and initalize ps.data.\r\n\t\t//\r\n\t\t//-----------------------------------------------------------------------\r\n\r\n \t\tif ( ! (*ps.dataPtr) )\r\n\t\t{\r\n\t\t\tCreateDataHandle();\r\n\t\t\tif (*ps.resultPtr != noErr) return;\r\n\t\t\tLockHandles();\r\n\t\t\tif (*ps.resultPtr != noErr) return;\r\n\t\t\tInitData();\r\n\t\t}\r\n\r\n\t\tif (*ps.resultPtr == noErr)\r\n\t\t{\r\n\t\t\tLockHandles();\r\n\t\t\tif (*ps.resultPtr != noErr) return;\r\n\t\t}\r\n\r\n\r\n\t\t//-----------------------------------------------------------------------\r\n\t\t//\t(4) Dispatch selector.\r\n\t\t//-----------------------------------------------------------------------\r\n\t\tswitch (selector)\r\n\t\t{\r\n\t\t\tcase formatSelectorReadPrepare:\r\n\t\t\t\tDoReadPrepare();\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorReadStart:\r\n\t\t\t\tDoReadStart();\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorReadContinue:\r\n\t\t\t\tDoReadContinue(); //This is run when no layers are set\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorReadFinish:\r\n\t\t\t\tDoReadFinish();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase formatSelectorOptionsPrepare:\r\n\t\t\t\tps.formatRecord->maxData = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorOptionsStart:\r\n\t\t\t\tps.formatRecord->data = NULL;\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorOptionsContinue:\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorOptionsFinish:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\t// estimations\r\n\t\t\tcase formatSelectorEstimatePrepare:\r\n\t\t\t\tps.formatRecord->maxData = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorEstimateStart:\r\n\t\t\t\t{\r\n\t\t\t\t\tint dataBytes = ps.formatRecord->imageSize32.h * ps.formatRecord->imageSize32.v;\r\n\t\t\t\t\tformatRecord->minDataBytes = dataBytes >> 1;\r\n\t\t\t\t\tformatRecord->maxDataBytes = dataBytes * 4;\r\n\t\t\t\t\tformatRecord->data = NULL;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorEstimateContinue:\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorEstimateFinish:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase formatSelectorWritePrepare:\r\n\t\t\t\tDoWritePrepare();\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorWriteStart:\r\n\t\t\t\tDoWriteStart();\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorWriteContinue:\r\n\t\t\t\tDoWriteContinue();\r\n\t\t\t\tbreak;\r\n\t\t\tcase formatSelectorWriteFinish:\r\n\t\t\t\tDoWriteFinish();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase formatSelectorFilterFile:\r\n\t\t\t\tDoFilterFile();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase formatSelectorReadLayerStart:\r\n\t\t\t\tDoReadLayerStart();\r\n\t\t\tbreak;\r\n\t\t\tcase formatSelectorReadLayerContinue:\r\n\t\t\t\tDoReadContinue(); //this is run when layers are set\r\n\t\t\tbreak;\r\n            case formatSelectorReadLayerFinish:\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase formatSelectorWriteLayerStart:\r\n\t\t\tbreak;\r\n            case formatSelectorWriteLayerContinue:\r\n\t\t\tbreak;\r\n            case formatSelectorWriteLayerFinish:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\t\r\n\t\t//-----------------------------------------------------------------------\r\n\t\t//\t(5) Unlock data, and exit resource.\r\n\t\t//\r\n\t\t//\tResult is automatically returned in *result, which is\r\n\t\t//\tpointed to by ps.resultPtr.\r\n\t\t//-----------------------------------------------------------------------\t\r\n\t\t\r\n\t\tUnlockHandles();\r\n\t\r\n\t} // about selector special\t\t\r\n\r\n\t// release any suites that we may have acquired\r\n\tif (selector == formatSelectorAbout ||\r\n\t\tselector == formatSelectorWriteFinish ||\r\n\t\tselector == formatSelectorReadFinish ||\r\n\t\tselector == formatSelectorOptionsFinish ||\r\n\t\tselector == formatSelectorEstimateFinish ||\r\n\t\tselector == formatSelectorFilterFile ||\r\n\t\t*ps.resultPtr != noErr)\r\n\t{\r\n\t\tPIUSuitesRelease();\r\n\t}\r\n\r\n}\r\n\r\n\r\nDLLExport MACPASCAL void PluginMain (const int16 selector,\r\n\t\t\t\t\t\t             FormatRecordPtr formatRecord,\r\n\t\t\t\t\t\t             intptr_t * data,\r\n\t\t\t\t\t\t             int16 * result)\r\n{\r\n\ttry \r\n\t{ \r\n\t\tIntelPlugin::GetInstance().PluginMain(selector, formatRecord, data, result);\r\n\t}\r\n\tcatch(...)\r\n\t{\r\n\t\tif (NULL != result)\r\n\t\t\t*result = -1;\r\n\t}\r\n\r\n} // end PluginMain\r\n\r\n\r\n//Fill ps.formatRecord->data with the mergedLayers.\r\nvoid IntelPlugin::FillFromCompositedLayers()\r\n{\r\n\tReadChannelDesc *pChannel;\r\n\tchar *pLayerData;\r\n\t\r\n\tint planesToGet_ = ps.formatRecord->hiPlane - ps.formatRecord->loPlane + 1;\r\n\r\n\t// Get a buffer to hold each channel as we process, formatRecord->planeBytes are computed the first time fetchImage() is called\r\n\tpLayerData = sPSBuffer->New(NULL, ps.formatRecord->imageSize.h * ps.formatRecord->imageSize.v * ps.formatRecord->planeBytes);\r\n\r\n\tif (pLayerData == NULL)\r\n\t{\r\n\t\tSetResult(memFullErr);\r\n\t\treturn;\r\n\t}\r\n\t\t\r\n\t//Get the composite channel in this channel list \r\n    pChannel = ps.formatRecord->documentInfo->mergedCompositeChannels;\r\n\r\n\tint planeNumber = 0;\r\n\r\n\t//Copy the RGB channels\r\n\twhile (pChannel != NULL)\r\n\t{\r\n\t\t//Get pixel data from channel\r\n\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\r\n\t\t///Copy int data rgb\r\n\t\tfor (size_t y = 0; y < ps.formatRecord->imageSize.v; y++)\r\n\t\t{\r\n\t\t\tfor (size_t x = 0; x < ps.formatRecord->imageSize.h; x++)\r\n\t\t\t{\r\n\t\t\t\tint indexToImage = static_cast<int>(ps.formatRecord->imageSize.h*y*planesToGet_ + x*planesToGet_);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\tint indexToLayerChannel = static_cast<int>(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\t\t\t\t\r\n\t\t\t\tif (ps.formatRecord->depth == 8)\r\n\t\t\t\t{\r\n\t\t\t\t\tunsigned8 *rowBigDataPtr = (unsigned8 *)ps.formatRecord->data;\r\n\t\t\t\t\tunsigned8 *rowData = reinterpret_cast<unsigned8 *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+planeNumber] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t\t\t{\r\n\t\t\t\t\tunsigned16 *rowBigDataPtr = (unsigned16 *)ps.formatRecord->data;\r\n\t\t\t\t\tunsigned16 *rowData = reinterpret_cast<unsigned16 *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+planeNumber] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tfloat *rowBigDataPtr = (float *)ps.formatRecord->data;\r\n\t\t\t\t\tfloat *rowData = reinterpret_cast<float *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+planeNumber] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpChannel = pChannel->next;\r\n\t\tplaneNumber++;\r\n\t}\r\n\r\n\t\r\n\t//Get first alpha channel and set as alpha, of not get transparency planes\r\n\tif (!(pChannel = ps.formatRecord->documentInfo->alphaChannels))\r\n\t{\r\n\t\tpChannel = ps.formatRecord->documentInfo->mergedTransparency;\r\n\t}\r\n\t\r\n\t//Copy alpha\r\n\tif ((ps.formatRecord->planes > 3) && (pChannel != NULL))\r\n\t{\r\n\t\t//Get pixel data from channel\r\n\t\tReadLayerData(pChannel, pLayerData, ps.formatRecord->imageSize.h, ps.formatRecord->imageSize.v);\r\n\r\n\t\t//Copy into data alpha\r\n\t\tfor (size_t y = 0; y < ps.formatRecord->imageSize.v; y++)\r\n\t\t{\r\n\t\t\tfor (size_t x = 0; x < ps.formatRecord->imageSize.h; x++)\r\n\t\t\t{\r\n\t\t\t\tint indexToImage = static_cast<int>(ps.formatRecord->imageSize.h*y*planesToGet_ + x*planesToGet_);  //the ScratchImage is always RGBA therefore pitch of 4\r\n\t\t\t\tint indexToLayerChannel = static_cast<int>(ps.formatRecord->imageSize.h*y + x);  //here the pitch is only 1\r\n\t\t\t\t\r\n\t\t\t\t//Here the planeumber is 3 for alpha\r\n\t\t\t\tif (ps.formatRecord->depth == 8)\r\n\t\t\t\t{\r\n\t\t\t\t\tunsigned8 *rowBigDataPtr = (unsigned8 *)ps.formatRecord->data;\r\n\t\t\t\t\tunsigned8 *rowData = reinterpret_cast<unsigned8 *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+3] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t\telse if (ps.formatRecord->depth == 16)\r\n\t\t\t\t{\r\n\t\t\t\t\tunsigned16 *rowBigDataPtr = (unsigned16 *)ps.formatRecord->data;\r\n\t\t\t\t\tunsigned16 *rowData = reinterpret_cast<unsigned16 *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+3] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t\telse if (ps.formatRecord->depth == 32)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tfloat *rowBigDataPtr = (float *)ps.formatRecord->data;\r\n\t\t\t\t\tfloat *rowData = reinterpret_cast<float *>(pLayerData); //Get image pointer\r\n\t\t\t\t\trowBigDataPtr[indexToImage+3] = rowData[indexToLayerChannel];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\t\r\n\t\t\t\r\n\tsPSBuffer->Dispose(static_cast<char**>(&pLayerData));\t\r\n}"
  },
  {
    "path": "IntelCompressionPlugin/IntelPlugin.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#pragma once\r\n\r\n#include \"IntelPluginName.h\"\r\n\r\n#include <PIExport.h>\t\t\t\t// Export Photoshop header file.\r\n#include <PIUtilities.h>\t\t\t// SDK Utility library.\r\n#include <PIColorSpaceSuite.h>\r\n#include <FileUtilities.h>\r\n\r\n#include <dxgiformat.h>\r\n#include <win32Threads.h>\r\n#include <directxtex.h>\r\n#include <DirectXPackedVector.h>\r\n\r\ninline float F16toF32(unsigned short f16)\r\n{\r\n\treturn DirectX::PackedVector::XMConvertHalfToFloat(f16);\r\n}\r\n\r\ninline unsigned short F32toF16(float val)\r\n{\r\n\treturn DirectX::PackedVector::XMConvertFloatToHalf(val);\r\n}\r\n\r\ninline unsigned char FloatToByte(double v)\r\n{\r\n\tif (v > 1)\t\r\n\t\treturn 255;\r\n\telse if (v < 0)\r\n\t\treturn 0;\r\n\treturn static_cast<unsigned char>(v * 255);\r\n}\r\n\r\ninline unsigned char F16toByte(unsigned short f16)\r\n{\r\n\treturn FloatToByte(F16toF32(f16));\r\n}\r\n\r\n//Three different convert to 8bit functions (8->8, 16->8, 32->8 all photoshop specific)\r\ninline unsigned8 ConvertTo8Bit(unsigned8 val)\r\n{\r\n\treturn val;\r\n}\r\ninline unsigned8 ConvertTo8Bit(unsigned16 val)\r\n{\r\n\t//Photoshop uses an internal representation of 16 bit data of 0 - 32768\r\n\tdouble max_16bitPhotoshop = 32768;\r\n\t\r\n\treturn FloatToByte(val/max_16bitPhotoshop);\r\n}\r\ninline unsigned8 ConvertTo8Bit(double val, bool gammaCorrect=true)\r\n{\r\n\t//Photoshop uses for 32 bit a gamma of 1.0. So do gamma adjustment for gamma 2.2\r\n\t//Avoid gamma corrrection for preview\r\n\tif (gammaCorrect)\r\n\t\tval = pow(val, 1/2.2);\r\n\treturn FloatToByte(val);\r\n}\r\n\r\n//Three different 16bit functions (8->16, 16->16, 32->16 all photoshop specific)\r\ninline unsigned16 ConvertTo16Bit(unsigned8 val)\r\n{\r\n\treturn F32toF16(val/255.f);\r\n}\r\ninline unsigned16 ConvertTo16Bit(unsigned16 val)\r\n{\r\n\t//Photoshop uses an internal representation of 16 bit data of 0 - 32768\r\n\tdouble max_16bitPhotoshop = 32768;\r\n\t\r\n\treturn F32toF16(static_cast<float>(val/max_16bitPhotoshop));\r\n}\r\ninline unsigned16 ConvertTo16Bit(float val)\r\n{\r\n\t//Photoshop uses for 32 bit a gamma of 1.0. So do gamma adjustment for gamma 2.2.\r\n\t//Avoid gamma corrrection for preview\r\n\t//if (gammaCorrect)\r\n\t//\t\tval = pow(val, 1/2.2);\r\n\r\n\treturn  F32toF16(val);\r\n}\r\n\r\nenum TextureTypeEnum\r\n{\r\n\tCOLOR, \r\n\tCOLOR_ALPHA, \r\n\tCUBEMAP_LAYERS, \r\n\tCUBEMAP_CROSSED, \r\n\tNORMALMAP, \r\n\tTEXTURE_TYPE_COUNT\r\n};\r\n\r\nenum MipmapEnum\r\n{\r\n\tNONE, \r\n\tAUTOGEN, \r\n\tFROM_LAYERS\r\n};\r\n\r\nenum LoadInfoEnum\r\n{\r\n    USE_NONE = 0x0,\r\n\tUSE_MIPMAPS = 0x1,\r\n\tUSE_SEPARATEALPHA = 0x2\r\n};\r\n\r\nenum CompressionTypeEnum\r\n{\r\n\tBC1, \r\n\tBC1_SRGB, \r\n\tBC3, \r\n\tBC3_SRGB, \r\n\tBC6H_FAST, \r\n\tBC6H_FINE, \r\n\tBC7_FAST, \r\n\tBC7_FINE, \r\n\tBC7_SRGB_FAST, \r\n\tBC7_SRGB_FINE, \r\n\tBC4, \r\n\tBC5, \r\n\tUNCOMPRESSED, \r\n\tCOMPRESSION_TYPE_COUNT\r\n};\r\n\r\nclass IntelPlugin\r\n{\r\npublic:\r\n\r\n\t// This is our structure that we use to pass globals between routines:\r\n\tstruct Globals\r\n\t{ \r\n\t\tBoolean\t\t\t\t\tqueryForParameters;\r\n\t\tBoolean\t\t\t\t\tsameNames;\r\n\r\n\t\tPSBufferSuite2\t\t\t*sPSBufferSuite64;\r\n\t\tPSColorSpaceSuite2      *sPSColorSpaceSuite64;\r\n\t\tbool                     gMultithreaded;\r\n\t\tDXGI_FORMAT              encoding_g;        //Which encoding to use\r\n\t\tbool                     fast_bc67;         //Use fast encoding, else use fine, only valid for BC6 and BC7\r\n\t\tTextureTypeEnum\t      \t TextureTypeIndex;  //Col,Col+alpha,CubeFrmLayera,CubefromCross,NM\r\n\t\tMipmapEnum               MipMapTypeIndex;   //None,Autogen,FromLayers\r\n\t\tuint32                   MipLevel;\t\t\t// only valid if SetMipLevel == true, specified the mip level to be exported when in cube map mode.\r\n\t\tbool                     SetMipLevel;       //Specify that a specific mip level has to be exported. Only valid for cube map mode.\r\n\r\n\t\tfloat\t\t\t\t\t exposure;\t// multiplier for HDR viewing (and downsampling)\r\n\r\n\t\t// normal map processing\r\n\t\tbool                     Normalize;         //Specify if normalization of values is needed. Only valid for Normal Maps\r\n\t\tbool                     FlipX;\r\n\t\tbool                     FlipY;\r\n\r\n\t\t//Name of used preset for Descriptor parameter and batching\r\n\t\tStr255                  presetBatchName;    \r\n\t\tbool                    mipmapBatchAllowed; \r\n\t\tbool                    alphaBatchSeperate;    \r\n\r\n\t\t// quick way to tell if we are currently showing preview UI\r\n\t\tbool\t\t\t\t\tpreviewing;\r\n\t};\r\n\r\n\r\nprivate:\r\n\tstruct\r\n\t{\r\n\t\tFormatRecordPtr formatRecord;\r\n\t\tSPPlugin* pluginRef;\r\n\t\tint16* resultPtr;\r\n\t\tintptr_t* dataPtr;\r\n\t\tGlobals* data;\r\n\t} ps;\r\n\r\n\t\r\n\tstruct\r\n\t{\r\n\t\t// state at which previews were generated\r\n\t\tTextureTypeEnum\t\t\ttextureType;\r\n\t\tMipmapEnum              mipMap;\r\n\r\n\t\tbool                    flipRChannel;\r\n\t\tbool                    flipGChannel;\r\n\r\n\t\tDXGI_FORMAT\t\t\t\tencoding;\r\n\t\tuint32                  mipLevel;\t\t\r\n\t\tbool                    fastBc67;\r\n\r\n\t\tDirectX::ScratchImage\t*compressedImage, *uncompressedImage;\r\n\t\tint\t\t\t\t\t\tcompressedSize;\r\n\t\tint\t\t\t\t\t\twidth, height;\r\n\t} preview;\r\n\r\n\r\n\tstruct \r\n\t{\r\n\t    DirectX::ScratchImage *readImagePtr;\r\n\t    int loadMipMapIndex;\r\n\t    bool isCubeMap;\r\n\t    bool hasMips;\r\n\t\tbool hasAlpha;\r\n\t} loadInfo;\r\n\r\npublic:\r\n\tFormatRecordPtr GetFormatRecord() const { return ps.formatRecord; }\r\n\tGlobals* GetData() const { return ps.data; }\r\n\tint16 GetResult() const { return ps.resultPtr ? *ps.resultPtr : 0; }\r\n\tvoid SetResult(int e) { if (ps.resultPtr) *ps.resultPtr = static_cast<int16>(e); }\r\n\r\n\t//Decide which combination are valid, based in the CompressionVsTextureTypeMatrix table\r\n\tstatic bool IsCombinationValid(TextureTypeEnum textype, CompressionTypeEnum comptype);\r\n\t\r\n\t//Preview functions. AdvanceState () has to be called before entering this function so that the globals->exportParamBlock->data buffer is full;\r\n\tDirectX::ScratchImage* GetCompressedImageForPreview(int planesToGet_, int &compressedSize);\r\n\tDirectX::ScratchImage* GetUncompressedImageForPreview(int planesToGet_);\r\n\t\r\n\t//Copy data from photoshop buffer into scrUncompressedImageScratch_\r\n\tbool CopyDataForEncoding(DirectX::ScratchImage *scrUncompressedImageScratch_, bool hasAlpha_, bool DoMipMaps_, bool gammaCorrect);\r\n\t\r\n\t//Take an Uncompressed DirectX::ScratchImage scrUncompressedImageScratch_ and Compresses it into scrImageScratch_\r\n\tbool CompressToScratchImage(DirectX::ScratchImage **scrImageScratch_, DirectX::ScratchImage **scrUncompressedImageScratch_, bool hasAlpha_);\r\n\r\n\t//Conversion functions from Photoshop buffer to 8bit/16bit ready encoding buffer\r\n\tbool ConvertToBC6From8Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\tbool ConvertToBC6From16Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\tbool ConvertToBC6From32Bit(unsigned16 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\r\n\tbool ConvertToBC4or5From32Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel, bool gammaCorrect);\r\n\tbool ConvertToBC4or5From16Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\tbool ConvertToBC4or5From8Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\r\n\tbool ConvertToBCFrom32Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel, bool gammaCorrect);\r\n\tbool ConvertToBCFrom16Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\tbool ConvertToBCFrom8Bit(unsigned8 *tgtDataPtr, int planesToGet, bool hasAlphaChannel);\r\n\r\n\tenum PREVIEW_OPTIONS\r\n\t{\r\n\t\tPREVIEW_SOURCE_ORIGINAL = 0x0,\r\n\t\tPREVIEW_SOURCE_COMPRESSED = 0x1,\r\n\t\tPREVIEW_SOURCE_MASK = 0x3,\r\n\r\n\t\tPREVIEW_CHANNEL_RED = 0x4,\r\n\t\tPREVIEW_CHANNEL_GREEN = 0x8,\r\n\t\tPREVIEW_CHANNEL_BLUE = 0x10,\r\n\t\tPREVIEW_CHANNEL_ALPHA = 0x20,\r\n\t\tPREVIEW_CHANNEL_RGB = PREVIEW_CHANNEL_RED | PREVIEW_CHANNEL_GREEN | PREVIEW_CHANNEL_BLUE,\r\n\t\tPREVIEW_CHANNEL_RGBA = PREVIEW_CHANNEL_RED | PREVIEW_CHANNEL_GREEN | PREVIEW_CHANNEL_BLUE | PREVIEW_CHANNEL_ALPHA,\r\n\t\tPREVIEW_CHANNEL_MASK = PREVIEW_CHANNEL_RGBA,\r\n\t};\r\n\r\n\t\t// returns byte size of entire image\r\n\tvoid FetchPreviewRGB(unsigned8* dst, int width, int height, int x, int y, double zoom, int previewOptions = PREVIEW_SOURCE_ORIGINAL | PREVIEW_CHANNEL_RGB, int matteColor = 0);\r\n\tPOINT GetPreviewDimensions();\r\n\tint\t GetCompressedByteSize();\r\n\r\n\tint  GetOriginalBitsPerPixel();\r\n\tint  GetOriginalByteSize();\r\n\tint GetLayerCount();\r\n\r\n\t//Copy from layer channel to Image\r\n\tvoid CopyFromLayerChannelIntoImage(char *pLayerData, const DirectX::Image *image, int indexToImage, int indexToLayerChannel);\r\n\t\r\n\t//Copy document Layers into mipmap Images of ScratchImage\r\n\tvoid CopyLayersIntoMipMaps(DirectX::ScratchImage *scrUncompressedImageScratch_, bool hasAlpha_, int startMipIndex, int endMipIndex=INT_MAX);\r\n\r\n\t//Compress rgba_surface into tgtPixels, uisng Intel ISPC encoders\r\n\tbool ISPC_compression(rgba_surface &input_rgba, const DirectX::Image& target, bool hasAlpha_rgba);\r\n\r\n\t//Pad the surface size to boundaries of 4\r\n\trgba_surface DoPaddingToMultiplesOf4(const rgba_surface &input);\r\n\r\n\t//Return true if texture type cube maps and the setMipLevel is checked\r\n\tbool IsCubeMapWithSetMipLevelOverride();\r\n\t\r\n\t//Returns true if mip maps are defined by layers\r\n\tbool IsMipMapsDefinedByLayer();\r\n\r\n\t//Convert scrUncompressedImageScratch_ from a  crossed layout image to a cube map DirectX::ScratchImage\r\n\tvoid ConvertToCubeMapFromCross(DirectX::ScratchImage **scrUncompressedImageScratch_);\r\n\r\n\t//Convert scrUncompressedImageScratch_ from document layers to a cube map DirectX::ScratchImage\r\n\tbool ConvertToCubeMapFromLayers(DirectX::ScratchImage **scrUncompressedImageScratch_, bool hasAlpha_);\r\n\r\n\t//Convert scrUncompressedImageScratch_ from a cube map to a horizontal crossed layout image \r\n\tvoid ConvertToHorizontalCrossFromCubeMap(DirectX::ScratchImage **scrUncompressedImageScratch_);\r\n\r\n\t//Flip the X(Red) channel and or the Y(Green) channel of thei normal map\r\n\tvoid FlipXYChannelNormalMap(DirectX::ScratchImage *scrUncompressedImageScratch_);\r\n\r\n\t//Normalize all values of this Nomral map in main image and all mip maps\r\n\tvoid NormalizeNormalMapChain(DirectX::ScratchImage *scrUncompressedImageScratch_);\r\n\r\n\t//Saves a special mip version of acube map out as a normal cube map. Special function to save out low res cubemaps\r\n\tHRESULT SaveCubeMipLevelToDDSFile(DirectX::ScratchImage* scrImageScratch_, DirectX::Blob& blob);\r\n\r\n\t//Copy from layer Channel into a buffer\r\n\tvoid ReadLayerData(ReadChannelDesc *pChannel, char *pLayerData, int width, int height);\r\n\tvoid FillLayerDataToWhite(char *pLayerData, int width, int height);\r\n\r\n\tvoid FillFromCompositedLayers();\r\n\r\n\t//Does the image loaded have alpha, ist it specified to have alpha\r\n\tbool HasAlpha() { return (ps.formatRecord->planes > 3) && (ps.data->TextureTypeIndex==TextureTypeEnum::COLOR_ALPHA);}\r\n\t\r\n\t//Show hide wait cursor\r\n\tvoid showLoadingCursor();\r\n    void showNormalCursor();\r\n\r\nprivate:\r\n\tvoid InitData();\r\n\tvoid DoWritePrepare();\r\n\tvoid DoWriteStart();\r\n\tvoid DoWriteDDS();\r\n\tvoid DoReadPrepare();\r\n\tvoid DoReadStart();\r\n\tvoid DoReadContinue();\r\n\tvoid DoReadFinish();\r\n\tvoid DoReadLayerStart();\r\n\r\n\t// scripting support\r\n\tbool ReadScriptParamsForWrite();\r\n\tOSErr WriteScriptParamsForWrite();\r\n\tbool ReadScriptParamsForRead();\r\n\tOSErr WriteScriptParamsForRead();\r\n\r\n\tvoid DoFilterFile();\r\n\r\n\tvoid CreateDataHandle();\r\n\tvoid LockHandles();\r\n\tvoid UnlockHandles();\r\n\r\n\tIntelPlugin(void);\r\n\t~IntelPlugin(void);\r\n\r\npublic:\r\n\r\n\tvoid DoWriteFinish();\r\n\tvoid DoWriteContinue();\r\n\tvoid PluginMain(const int16 selector, FormatRecordPtr formatParamBlock, intptr_t* data, int16* result);\r\n\tvoid UserError(const char* usrerror);\r\n\tvoid FetchImageData();\r\n\tvoid DisposeImageData();\r\n\r\n\tbool SetProgress(int part, int total);\t// true if can continue\r\n\r\n\tstatic IntelPlugin& GetInstance();\r\n};\r\n\r\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelPlugin.r",
    "content": "// ADOBE SYSTEMS INCORPORATED\n// Copyright  1993 - 2002 Adobe Systems Incorporated\n// All Rights Reserved\n//\n// NOTICE:  Adobe permits you to use, modify, and distribute this\n// file in accordance with the terms of the Adobe license agreement\n// accompanying it.  If you have received this file from a source\n// other than Adobe, then your use, modification, or distribution\n// of it requires the prior written permission of Adobe.\n//-------------------------------------------------------------------\n//-------------------------------------------------------------------------------\n//\n//\tFile:\n//\t\tOutbound.r\n//\n//\tCopyright 1990-1992, Thomas Knoll.\n//\tAll Rights Reserved.\n//\n//\tDescription:\n//\t\tThis file contains the resource information\n//\t\tfor the Export module Outbound, a module that\n//\t\tcreates a file and stores raw pixel data in it.\n//\n//\tUse:\n//\t\tThis module shows how to export raw data to a file.\n//\t\tIt uses a simple \"FileUtilities\" library that comes\n//\t\twith the SDK.  You use it via File>>Export>>Outbound.\n//\n//-------------------------------------------------------------------------------\n\n#include \"IntelPluginName.h\"\n\n//-------------------------------------------------------------------------------\n//\tDefinitions -- Required by include files.\n//-------------------------------------------------------------------------------\n\n// The About box and resources are created in PIUtilities.r.\n// You can easily override them, if you like.\n\n#define plugInName\t\t\tDDSExporterPluginName\n#define plugInCopyrightYear\t\"2015\"\n#define plugInDescription \\\n\t\"A DDS Export plug-in for Adobe Photoshop.\"\n\n//-------------------------------------------------------------------------------\n//\tDefinitions -- Required by other resources in this rez file.\n//-------------------------------------------------------------------------------\n\n// Dictionary (aete) resources:\n\n#define vendorName\t\t\t\tDDSExporterPluginName\n#define plugInAETEComment\t\t\"history export plug-in\"\n\n#define plugInSuiteID\t\t\t'sdK5'\n#define plugInClassID\t\t\t'ddsX'\n#define plugInEventID\t\t\ttypeNull // must be this\n\n//-------------------------------------------------------------------------------\n//\tSet up included files for Macintosh and Windows.\n//-------------------------------------------------------------------------------\n\n#include \"PIDefines.h\"\n\n#ifdef __PIMac__\n\t#include \"PIGeneral.r\"\n\t#include \"PIUtilities.r\"\n#elif defined(__PIWin__)\n\t#define Rez\n\t#include \"PIGeneral.h\"\n\t#include \"PIUtilities.r\"\n#endif\n\n#include \"PITerminology.h\"\n#include \"PIActions.h\"\n\t\n\n//-------------------------------------------------------------------------------\n//\tPiPL resource\n//-------------------------------------------------------------------------------\n\nresource 'PiPL' (ResourceID, plugInName \" PiPL\", purgeable)\n{\n    {\n\t\tKind { ImageFormat },\n\t\tName { plugInName },\n\t\tCategory { \"..\"vendorName },\n\t\tVersion { (latestFormatVersion << 16) | latestFormatSubVersion },\n\n\t\t#ifdef __PIMac__\n\t\t\t#if (defined(__x86_64__))\n\t\t\t\tCodeMacIntel64 { \"PluginMain\" },\n\t\t\t#endif\n\t\t\t#if (defined(__i386__))\n\t\t\t\tCodeMacIntel32 { \"PluginMain\" },\n\t\t\t#endif\n\t\t#else\n\t\t\t#if defined(_WIN64)\n\t\t\t\tCodeWin64X86 { \"PluginMain\" },\n\t\t\t#else\n\t\t\t\tCodeWin32X86 { \"PluginMain\" },\n\t\t\t#endif\n\t\t#endif\n\n\t\t// ClassID, eventID, aete ID, uniqueString:\n\t\tHasTerminology { plugInClassID, \n\t\t                 plugInEventID, \n\t\t\t\t\t\t ResourceID, \n\t\t\t\t\t\t vendorName \" \" plugInName },\n\t\t\n\t\tSupportedModes\n\t\t{\n\t\t\tnoBitmap, doesSupportGrayScale,\n\t\t\tnoIndexedColor, doesSupportRGBColor,\n\t\t\tnoCMYKColor, noHSLColor,\n\t\t\tnoHSBColor, doesSupportMultichannel,\n\t\t\tnoDuotone, noLABColor\n\t\t},\n\t\t\n\t\tEnableInfo\n\t\t{\n\t\t\t\"in (PSHOP_ImageMode, GrayScaleMode, RGBMode, MultichannelMode) || PSHOP_ImageDepth == 16 || PSHOP_ImageDepth == 32\"\n\t\t},\n\n\n\t\t// New for Photoshop 8, document sizes that are really big \n\t\t// 32 bit row and columns, 2,000,000 current limit but we can handle more\n\t\tPlugInMaxSize { 32767, 32767 },\n\n\t\t// For older Photoshops that only support 30000 pixel documents, \n\t\t// 16 bit row and columns\n\t\tFormatMaxSize { { 32767, 32767 } },\n\n\t\tFormatMaxChannels { {   1, 24, 24, 24, 24, 24, \n\t\t\t\t\t\t\t   24, 24, 24, 24, 24, 24 } },\n\t\n\t\tFmtFileType { 'DDS ', 'DDSX' },\n\t\t//ReadTypes { { 'DDSX', '    ' } },\n\t\tFilteredTypes { { 'DDSX', '    ' } },\n\t\tReadExtensions { { 'DDS ' } },\n\t\tWriteExtensions { { 'DDS ' } },\n\t\tFilteredExtensions { { 'DDS ' } },\n\t\tFormatFlags { fmtDoesNotSaveImageResources, \n\t\t              fmtCanRead, \n\t\t\t\t\t  fmtCanWrite, \n\t\t\t\t\t  fmtCanWriteIfRead, \n\t\t\t\t\t  fmtCanWriteTransparency, \n\t\t\t\t\t  fmtCanCreateThumbnail },\n\t\tFormatICCFlags { iccCannotEmbedGray,\n\t\t\t\t\t\t iccCannotEmbedIndexed,\n\t\t\t\t\t\t iccCannotEmbedRGB,\n\t\t\t\t\t\t iccCannotEmbedCMYK },\n\t\tFormatLayerSupport { doesSupportFormatLayers }\n\t\t}\n\t};\n\n\n//-------------------------------------------------------------------------------\n\n//-------------------------------------------------------------------------------\n//\tDictionary (scripting) resource\n//-------------------------------------------------------------------------------\n\nresource 'aete' (ResourceID, plugInName \" dictionary\", purgeable)\n{\n\t1, 0, english, roman,\t\t\t\t\t\t\t\t\t/* aete version and language specifiers */\n\t{\n\t\tvendorName,\t\t\t\t\t\t\t\t\t\t\t/* vendor suite name */\n\t\tDDSExporterPluginName,\t    \t  \t\t            /* optional description */\n\t\tplugInSuiteID,\t\t\t\t\t\t\t\t\t\t/* suite ID */\n\t\t1,\t\t\t\t\t\t\t\t\t\t\t\t\t/* suite code, must be 1 */\n\t\t1,\t\t\t\t\t\t\t\t\t\t\t\t\t/* suite level, must be 1 */\n\t\t{},\t\t\t\t\t\t\t\t\t\t\t\t\t/* structure for filters */\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t/* non-filter plug-in class here */\n\t\t\tvendorName \" \" plugInName,\t\t\t\t\t\t/* unique class name */\n\t\t\tplugInClassID,\t\t\t\t\t\t\t\t\t\t/* class ID, must be unique or Suite ID */\n\t\t\tplugInAETEComment,\t\t\t\t\t\t\t\t/* optional description */\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t/* define inheritance */\n\t\t\t\t\"<Inheritance>\",\t\t\t\t\t\t\t/* must be exactly this */\n\t\t\t\tkeyInherits,\t\t\t\t\t\t\t\t/* must be keyInherits */\n\t\t\t\tclassExport,\t\t\t\t\t\t\t\t/* parent: Format, Import, Export */\n\t\t\t\t\"parent class export\",\t\t\t\t\t\t/* optional description */\n\t\t\t\tflagsSingleProperty,\t\t\t\t\t\t/* if properties, list below */\n\t\t\t\t\n\t\t\t\t\"preset\",\t\t\t\t\t\t\t\t\t/* our path */\n\t\t\t\tkeyPreset,\t\t\t\t\t\t\t\t\t/* common key */\n\t\t\t\ttypeChar,\t\t\t\t\t\t            /* preset namecorrect path for platform */\n\t\t\t\t\"Preset name\",\t\t\t\t\t\t\t\t/* optional description */\n\t\t\t\tflagsSingleProperty,\n\n\t\t\t\t\"mipmap\",\t\t\t\t\t\t\t\t\t/* mipmaps on/off */\n\t\t\t\tkeyMipMap,\t\t\t\t\t\t\t\t\t/* common key */\n\t\t\t\ttypeBoolean,\t\t\t\t\t            /* basic value type */\n\t\t\t\t\"MipMaps enabled\",\t\t\t\t\t\t\t/* optional description */\n\t\t\t\tflagsSingleProperty,\n\n\t\t\t\t\"alphaseprate\",\t\t\t\t\t\t\t\t/* use dedicated alpha channel for transp */\n\t\t\t\tkeyAlphaS,\t\t\t\t\t\t\t\t\t/* common key */\n\t\t\t\ttypeBoolean,\t\t\t\t\t            /* basic value type */\n\t\t\t\t\"Alpha seperate\",\t\t\t\t\t\t\t/* optional description */\n\t\t\t\tflagsSingleProperty,\n\t\t\t\t\n\t\t\t\t/* no more properties */\n\t\t\t},\n\t\t\t{}, /* elements (not supported) */\n\t\t\t/* class descriptions */\n\t\t},\n\t\t{}, /* comparison ops (not supported) */\n\t\t{}\t/* any enumerations */\n\t}\n};\n\n//-------------------------------------------------------------------------------\n//\tResource text entries\n//\n//\tEntering these as separate resources because then they\n//\ttransfer directly over to windows via CNVTPIPL.\n//\n//\tIf I use a Macintosh 'STR#' resource, I could put all these\n//\tstrings into a single resource, but there is no\n//\tparallel on Windows.  'STR ' resources, which hold\n//\tone string per ID, exist on Windows and Macintosh.\n//-------------------------------------------------------------------------------\n\n// Prompt string:\nresource StringResource (kPrompt, plugInName \" Prompt\", purgeable)\n{\n\t\"DDS export to file:\"\n};\n\n// Creator and type:\nresource StringResource (kCreatorAndType, plugInName \" CreatorAndType\", purgeable)\n{\n\t\"Copyright  2015, Intel Corporation. All rights reserved.\"\t\t// creator\n\t\"????\"\t\t// type\n\n};\n\n//-------------------------------------------------------------------------------\n\n// end Outbound.r\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelPlugin.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#define APSTUDIO_HIDDEN_SYMBOLS\n#include \"windows.h\"\n#undef APSTUDIO_HIDDEN_SYMBOLS\n\n\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (United States) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n#pragma code_page(1252)\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Dialog\n//\n\nIDD_MAINDIALOG DIALOGEX 0, 0, 287, 263\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Intel Texture Works\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n    COMBOBOX        IDC_PRESET_COMBO,79,7,135,58,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\n    COMBOBOX        IDC_TEXTURETYPE_COMBO,79,49,199,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\n    COMBOBOX        IDC_COMPRESSION_COMBO,79,89,199,71,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\n    CONTROL         \"Export a specific mip level for Cube maps\",IDC_CUBEMIPLEVEL_CHECK,\n                    \"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,27,135,148,10\n    LTEXT           \"Mip Level:\",14,207,136,36,8\n    COMBOBOX        IDC_MIPLEVEL_COMBO,245,135,33,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\n    CONTROL         \"Normalize\",IDC_NORMALIZE_CHECK,\"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,27,175,46,10\n    CONTROL         \"Flip Red (X)\",IDC_FLIPX_CHECK,\"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,89,175,53,10\n    CONTROL         \"Flip Green (Y)\",IDC_FLIPY_CHECK,\"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,157,175,65,10\n    COMBOBOX        IDC_MIPMAP_COMBO,79,196,199,99,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\n    PUSHBUTTON      \"Preview\",IDC_PREVIEW_BUTTON,27,240,77,14\n    DEFPUSHBUTTON   \"&OK\",IDOK,174,240,50,14\n    PUSHBUTTON      \"&Cancel\",IDCANCEL,228,240,50,14\n    PUSHBUTTON      \"Save\",IDC_PRESETSAVE_BUTTON,219,7,29,14\n    PUSHBUTTON      \"Delete\",IDC_PRESETDELETE_BUTTON,251,7,29,14,BS_ICON\n    LTEXT           \"Presets\",26,27,9,42,8\n    LTEXT           \"Compression:\",5,25,92,47,8\n    LTEXT           \"Texture Type:\",9,27,51,52,8\n    LTEXT           \"Mip Maps:\",22,27,198,43,8\n    LTEXT           \"Pre-compress Normal Map Operations:\",17,27,159,191,8\n    PUSHBUTTON      \"?\",IDC_COMPRESSION_HELP,7,89,16,14\n    PUSHBUTTON      \"?\",IDC_TEXTURETYPE_HELP,7,49,16,14\n    PUSHBUTTON      \"?\",IDC_PRECOMPRESS_HELP,7,156,16,14\n    PUSHBUTTON      \"?\",IDC_MIPMAP_HELP,7,195,16,14\n    LTEXT           \"Context Info\",IDC_COMPRESSION_HINT,27,105,251,20\n    LTEXT           \"Context Info\",IDC_TEXTURETYPE_HINT,27,64,251,20\n    LTEXT           \"Context Info\",IDC_MIPMAPS_HINT,27,211,251,20\nEND\n\nIDD_ABOUT DIALOGEX 0, 0, 225, 63\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Intel Texture Works\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n    CTEXT           \"Copyright  2015, Intel Corporation.\\nAll rights reserved.\",26,10,10,205,18\n    DEFPUSHBUTTON   \"OK\",IDOK,86,37,52,16\nEND\n\nIDD_PREVIEW DIALOGEX 0, 0, 585, 329\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Preview\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n    DEFPUSHBUTTON   \"OK\",IDOK,528,308,50,14\n    CTEXT           \"\",IDC_PREVIEWPROXY_ORIGINAL,7,28,282,263,NOT WS_VISIBLE | WS_DISABLED | WS_BORDER\n    CTEXT           \"ORIGINAL\",IDC_PREVIEWPROXY_ORIGINALTEXT,7,11,282,8\n    CTEXT           \"\",IDC_PREVIEWPROXY_COMPRESSED,296,28,282,263,NOT WS_VISIBLE | WS_DISABLED | WS_BORDER\n    PUSHBUTTON      \"\",IDC_PREVIEWPROXY_ZOOMIN,307,309,13,13,BS_ICON\n    PUSHBUTTON      \"\",IDC_PREVIEWPROXY_ZOOMOUT,264,309,13,13,BS_ICON\n    LTEXT           \"100%\",IDC_PREVIEWPROXY_ZOOMTEXT,283,311,20,11\n    PUSHBUTTON      \"1x\",IDC_PREVIEWPROXY_ZOOM1X,478,309,13,13\n    PUSHBUTTON      \"2x\",IDC_PREVIEWPROXY_ZOOM2X,491,309,13,13\n    PUSHBUTTON      \"4x\",IDC_PREVIEWPROXY_ZOOM4X,504,309,13,13\n    PUSHBUTTON      \"Fit\",IDC_PREVIEWPROXY_ZOOMFIT,465,309,13,13\n    PUSHBUTTON      \"1/2x\",IDC_PREVIEWPROXY_ZOOMHALF,446,309,19,13\n    PUSHBUTTON      \"1/4x\",IDC_PREVIEWPROXY_ZOOMQUARTER,427,309,19,13\n    PUSHBUTTON      \"RGB\",IDC_PREVIEWPROXY_RGB,7,309,19,13\n    PUSHBUTTON      \"R\",IDC_PREVIEWPROXY_R,27,309,13,13\n    PUSHBUTTON      \"G\",IDC_PREVIEWPROXY_G,41,309,13,13\n    PUSHBUTTON      \"B\",IDC_PREVIEWPROXY_B,55,309,13,13\n    PUSHBUTTON      \"A\",IDC_PREVIEWPROXY_A,69,309,13,13\n    COMBOBOX        IDC_PREVIEWPROXY_COMBOBOX,410,8,168,30,CBS_DROPDOWNLIST | WS_TABSTOP\n    CTEXT           \"120 kB\",IDC_PREVIEWPROXY_TEXTSIZECOMPRESSED,296,295,282,8\n    CTEXT           \"120 kB\",IDC_PREVIEWPROXY_TEXTSIZEUNCOMPRESSED,7,295,282,8\n    CONTROL         \"\",IDC_EXPOSURE_SLIDER,\"msctls_trackbar32\",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,87,310,73,12\nEND\n\nIDD_GETNAME DIALOGEX 0, 0, 173, 26\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Enter Preset Name\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n    EDITTEXT        IDC_NAME_EDIT,7,7,159,12,ES_AUTOHSCROLL\nEND\n\nIDD_LOADDIALOG DIALOGEX 0, 0, 199, 95\nSTYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\nCAPTION \"Load Options\"\nFONT 8, \"MS Shell Dlg\", 400, 0, 0x1\nBEGIN\n    DEFPUSHBUTTON   \"OK\",IDOK,83,74,50,14\n    PUSHBUTTON      \"Cancel\",IDCANCEL,142,74,50,14\n    CONTROL         \" Load mip-maps into separate layers.\",IDC_LOADDIALOG_MIPMAPCHECK,\n                    \"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,27,51,137,10\n    GROUPBOX        \"This File contains mip-maps. \",IDC_LOADDIALOG_MIPMAPGROUP,7,40,185,26,BS_LEFT\n    GROUPBOX        \"This File contains Transparency\",IDC_LOADDIALOG_ALPHAGROUP,7,7,185,27,BS_LEFT\n    CONTROL         \" Load Transparency as Alpha channel\",IDC_LOADDIALOG_ALPHACHECK,\n                    \"Button\",BS_AUTOCHECKBOX | WS_TABSTOP,27,18,135,10\nEND\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION 15,0,0,0\n PRODUCTVERSION 15,0,0,0\n FILEFLAGSMASK 0x3fL\n#ifdef _DEBUG\n FILEFLAGS 0x1L\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS 0x40004L\n FILETYPE 0x2L\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904b0\"\n        BEGIN\n            VALUE \"CompanyName\", \"Intel\"\n            VALUE \"FileDescription\", \"Intel Texture Works\"\n            VALUE \"FileVersion\", \"1.0\"\n            VALUE \"InternalName\", \"Intel Texture Works\"\n            VALUE \"LegalCopyright\", \"Copyright Intel Corporation. All rights reserved 2015\"\n            VALUE \"OriginalFilename\", \"IntelCompressionPlugin\"\n            VALUE \"ProductName\", \"Intel Texture Works\"\n            VALUE \"ProductVersion\", \"1.0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1200\n    END\nEND\n\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE \nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE \nBEGIN\n    \"#define APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"#include \"\"windows.h\"\"\\r\\n\"\n    \"#undef APSTUDIO_HIDDEN_SYMBOLS\\r\\n\"\n    \"\\r\\n\"\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE \nBEGIN\n    \"#include \"\"IntelPlugin.pipl\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// DESIGNINFO\n//\n\n#ifdef APSTUDIO_INVOKED\nGUIDELINES DESIGNINFO\nBEGIN\n    IDD_MAINDIALOG, DIALOG\n    BEGIN\n        RIGHTMARGIN, 281\n        VERTGUIDE, 6\n        VERTGUIDE, 27\n        VERTGUIDE, 79\n        VERTGUIDE, 278\n        HORZGUIDE, 7\n    END\n\n    IDD_ABOUT, DIALOG\n    BEGIN\n    END\n\n    IDD_PREVIEW, DIALOG\n    BEGIN\n        LEFTMARGIN, 7\n        RIGHTMARGIN, 578\n        VERTGUIDE, 185\n        VERTGUIDE, 395\n        TOPMARGIN, 8\n        BOTTOMMARGIN, 322\n    END\n\n    IDD_GETNAME, DIALOG\n    BEGIN\n        LEFTMARGIN, 7\n        RIGHTMARGIN, 166\n        TOPMARGIN, 7\n        BOTTOMMARGIN, 19\n    END\n\n    IDD_LOADDIALOG, DIALOG\n    BEGIN\n        LEFTMARGIN, 7\n        RIGHTMARGIN, 192\n        VERTGUIDE, 27\n        TOPMARGIN, 7\n        BOTTOMMARGIN, 88\n    END\nEND\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nZOOMOUTICON             ICON                    \"zoomout.ico\"\nZOOMINICON              ICON                    \"zoomin.ico\"\n#endif    // English (United States) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n#include \"IntelPlugin.pipl\"\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelPluginName.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#pragma once\r\n\r\n//Change this define to rename the plugin\r\n//It changes the pipl photoshop resource and also the window UI on runtime.\r\n\r\n//Be sure also to change the TargetName for the DDSExporter Project in \"ConfigurationProperties->General->TargetName\" (left click on DDSExporter),\r\n//both for Win32 and x64 settigns.\r\n#define DDSExporterPluginName \"Intel Texture Works\"\r\n#define DDSExporterPluginVersion \" v1.0.4\"\r\n\r\n// Terminology specific to this plug-in.\r\n#define kPrompt\t\t\t\t16100\r\n#define kCreatorAndType\t\tkPrompt+1\r\n\r\n// scripting keys\r\n#define keyPreset 'pres'\r\n#define keyMipMap 'mipm'\r\n#define keyAlphaS 'alps'\r\n\r\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelPluginUIWin.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"IntelPlugin.h\"\r\n\r\n#include \"SaveOptionsDialog.h\"\r\n#include \"IntelPluginUIWin.h\"\r\n#include \"IntelPluginName.h\"\r\n#include \"resource.h\"\r\n\r\n\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Simple plugin About box\r\nINT_PTR WINAPI AboutDlgProcIntel(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM /*lParam*/)\r\n{\r\n\tswitch  (wMsg) \r\n\t{\r\n\t\tcase WM_INITDIALOG:\r\n\t\t\t{\r\n\t\t\t\t//Set window name\r\n\t\t\t\tstring windowTitle = DDSExporterPluginName;\r\n\t\t\t\twindowTitle += DDSExporterPluginVersion;\r\n\t\t\t\tSetWindowText(hDlg, windowTitle.c_str());\r\n                CenterDialog(hDlg);\t\r\n\t\t\t}\r\n            break;\r\n\r\n\t\tcase WM_CHAR:\r\n\t\t\t{\r\n\t\t\t\tTCHAR chCharCode = TCHAR(wParam);\r\n\t\t\t\tif (chCharCode == VK_ESCAPE || chCharCode == VK_RETURN)\r\n\t\t\t\t\tEndDialog(hDlg, 0);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n \r\n\t\tcase WM_LBUTTONDOWN:\r\n\t\t\t\tEndDialog(hDlg, 0);\r\n            break;\r\n\r\n\t\tcase WM_COMMAND:\r\n\t\t\tswitch  (COMMANDID(wParam)) \r\n\t\t\t{\r\n\t\t\t\tcase OK:\r\n\t\t\t\t\tEndDialog(hDlg, 0);\r\n                    break;\r\n\r\n\t\t\t\tcase CANCEL:\r\n\t\t\t\t\tEndDialog(hDlg, 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n                    return FALSE;\r\n            }\r\n            break;\r\n\r\n      default:\r\n\t\t  return  FALSE;\r\n\t\r\n\t} // switch (wMsg)\r\n\r\n    return  TRUE;\r\n}\r\n\r\nvoid ShowAboutIntel (AboutRecordPtr aboutPtr)\r\n{\r\n\tPlatformData * platform = static_cast<PlatformData *>(aboutPtr->platformData);\r\n\t\r\n\tHWND h = reinterpret_cast<HWND>(platform->hwnd);\r\n\r\n    DialogBoxParam(GetDLLInstance(), \r\n\t\t           MAKEINTRESOURCE( IDD_ABOUT ),\r\n\t               h, \r\n\t\t\t\t   AboutDlgProcIntel, \r\n\t\t\t\t   0);\r\n}\r\n\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Get name dialog\r\nINT_PTR WINAPI DlgGetNameProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam)\r\n{\r\n\tstatic string * str;\r\n\r\n\tswitch  (wMsg) \r\n\t{\r\n\t\tcase WM_INITDIALOG:\r\n\t\t\t{\r\n\t\t\t\tif (lParam)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr = reinterpret_cast<string*>(lParam);\r\n\t\t\t\t\tSetDlgItemTextA(hDlg, IDC_NAME_EDIT, str->c_str());\r\n\t\t\t\t}\r\n                CenterDialog(hDlg);\t\r\n\t\t\t}\r\n            break;\r\n\r\n\r\n\t\tcase WM_COMMAND:\r\n\t\t\tswitch  (COMMANDID(wParam)) \r\n\t\t\t{\r\n\t\t\t\tcase IDOK:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tchar buf[MAX_PATH+1] = {};\r\n\t\t\t\t\t\tGetDlgItemTextA(hDlg, IDC_NAME_EDIT, buf, MAX_PATH);\r\n\t\t\t\t\t\t*str = buf;\r\n\t\t\t\t\t\tstr = NULL;\r\n\t\t\t\t\t\tEndDialog(hDlg, IDOK);\r\n\t\t\t\t\t}\r\n                    break;\r\n\r\n\t\t\t\tcase IDCANCEL:\r\n\t\t\t\t\tstr = NULL;\r\n\t\t\t\t\tEndDialog(hDlg, IDCANCEL);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n                    return FALSE;\r\n            }\r\n            break;\r\n\r\n      default:\r\n\t\t  return  FALSE;\r\n\t\r\n\t} // switch (wMsg)\r\n\r\n    return  TRUE;\r\n}\r\n\r\nstring GetPresetName(string str, HWND parent)\r\n{\r\n    if (DialogBoxParam(GetDLLInstance(), \r\n\t\t           MAKEINTRESOURCE( IDD_GETNAME ),\r\n\t               parent, \r\n\t\t\t\t   DlgGetNameProc, \r\n\t\t\t\t   reinterpret_cast<LONG_PTR>(&str)) == IDOK)\r\n\t{\r\n\t\treturn str;\r\n\t}\r\n\r\n\treturn \"\";\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n//Load Dialog box\r\nINT_PTR WINAPI DlgLoadProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam)\r\n{\r\n\tstatic unsigned8* result;\r\n\r\n\tswitch  (wMsg) \r\n\t{\r\n\t\tcase WM_INITDIALOG:\r\n\t\t\t{\r\n\t\t\t\tif (lParam)\r\n\t\t\t\t{\r\n\t\t\t\t\tresult = reinterpret_cast<unsigned8*>(lParam);\r\n\r\n\t\t\t\t\t//If no mip maps hide controls\r\n\t\t\t\t\tif (!(*result & LoadInfoEnum::USE_MIPMAPS))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tShowWindow(GetDlgItem(hDlg, IDC_LOADDIALOG_MIPMAPGROUP), SW_HIDE);\r\n\t\t\t\t\t\tShowWindow(GetDlgItem(hDlg, IDC_LOADDIALOG_MIPMAPCHECK), SW_HIDE);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//If no alpha hide controls\r\n\t\t\t\t\tif (!(*result & LoadInfoEnum::USE_SEPARATEALPHA))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tShowWindow(GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHAGROUP), SW_HIDE);\r\n\t\t\t\t\t\tShowWindow(GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHACHECK), SW_HIDE);\r\n\r\n\t\t\t\t\t\t//move mipmap controls up\r\n\t\t\t\t\t\tRECT rcGroup = {};\r\n\t\t\t\t\t\tRECT rcCheckbox = {};\r\n\t\t\t\t\t\tHWND group = GetDlgItem(hDlg, IDC_LOADDIALOG_MIPMAPGROUP);\r\n\t\t\t\t\t\tHWND checkbox = GetDlgItem(hDlg, IDC_LOADDIALOG_MIPMAPCHECK);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Get alpha rectangles in client coordinates and set them to mip map controls\r\n                    \tGetWindowRect(GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHAGROUP), &rcGroup);\r\n\t\t\t\t\t\tMapWindowRect(NULL, hDlg, &rcGroup);\r\n\t\t\t\t\t\tMoveWindow(group, rcGroup.left, rcGroup.top, rcGroup.right - rcGroup.left, rcGroup.bottom - rcGroup.top, TRUE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tGetWindowRect(GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHACHECK), &rcCheckbox);\r\n\t\t\t\t\t\tMapWindowRect(NULL, hDlg, &rcCheckbox);\r\n\t\t\t\t\t\tMoveWindow(checkbox, rcCheckbox.left, rcCheckbox.top, rcCheckbox.right - rcCheckbox.left, rcCheckbox.bottom - rcCheckbox.top, TRUE);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//Reset result to pass back info\r\n\t\t\t\t\t*result = LoadInfoEnum::USE_NONE;\r\n\t\t\t\t}\r\n                CenterDialog(hDlg);\t\r\n\t\t\t}\r\n            break;\r\n\r\n\t\tcase WM_COMMAND:\r\n\t\t\tswitch  (COMMANDID(wParam)) \r\n\t\t\t{\r\n\t\t\t\tcase IDOK:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tEndDialog(hDlg, IDOK);\r\n\t\t\t\t\t}\r\n                    break;\r\n\r\n\t\t\t\tcase IDCANCEL:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t*result = LoadInfoEnum::USE_NONE;\r\n\t\t\t\t\t\tEndDialog(hDlg, IDCANCEL);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IDC_LOADDIALOG_MIPMAPCHECK:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tHWND alphachkbox = GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHACHECK);\r\n\t\t\t\t\t\tbool checked = (SendMessage(GetDlgItem(hDlg, IDC_LOADDIALOG_MIPMAPCHECK), BM_GETCHECK, 0, 0) == BST_CHECKED);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Set the flag depending on the checked state\r\n\t\t\t\t\t\tif (checked) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t    *result |= LoadInfoEnum::USE_MIPMAPS;\r\n\r\n\t\t\t\t\t\t\t//uncheck and disable separate alpha setting on mip maps;\r\n\t\t\t\t\t\t\tif (GetWindowLong(alphachkbox, GWL_STYLE) | WS_VISIBLE)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSendMessage(alphachkbox, BM_SETCHECK, 0, 0);\r\n\t\t\t\t\t\t\t\t::EnableWindow(alphachkbox, false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t    *result &= ~LoadInfoEnum::USE_MIPMAPS;\r\n\r\n\t\t\t\t\t\t\t//reenable alpha checkbox\r\n\t\t\t\t\t\t\tif (GetWindowLong(alphachkbox, GWL_STYLE) | WS_VISIBLE)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t::EnableWindow(alphachkbox, true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IDC_LOADDIALOG_ALPHACHECK:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbool checked = (SendMessage(GetDlgItem(hDlg, IDC_LOADDIALOG_ALPHACHECK), BM_GETCHECK, 0, 0) == BST_CHECKED);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set the flag depending on the checked state\r\n\t\t\t\t\t\tif (checked) \r\n\t\t\t\t\t\t    *result |= LoadInfoEnum::USE_SEPARATEALPHA;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t    *result &= ~LoadInfoEnum::USE_SEPARATEALPHA;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n                    return FALSE;\r\n            }\r\n            break;\r\n\r\n\t  case WM_CTLCOLORSTATIC: \r\n\t\t  { \r\n\t\t\t//set the background color of the chackbox controls\r\n\t\t\t static HBRUSH hBrushColor; \r\n\t\t     if (!hBrushColor) \r\n\t\t\t { \r\n\t\t\t\t hBrushColor = CreateSolidBrush(RGB(255, 255, 255)); \r\n\t\t\t\t SetBkColor((HDC)wParam, RGB(255, 255, 255)); \r\n\t\t\t } \r\n\t\t\t return (LRESULT)hBrushColor; \r\n\t\t  }\r\n\t\t  break;\r\n\r\n\t  case WM_PAINT:\r\n\t\t   {\r\n\t\t\t\tPAINTSTRUCT ps;\r\n\t\t\t\tHDC hDC;\r\n\t\t\t\thDC = BeginPaint(hDlg, &ps);\t\r\n\t\t\t\tRECT rcParent = {5, 5, 295, 115};\r\n\r\n\t\t\t\t//Paint the white rectabgle where the checkboxes are positioned\r\n\t\t\t\tFillRect(hDC, &rcParent, static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)));\r\n\t\t\t\tEndPaint(hDlg, &ps);\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t  break;\r\n\r\n      default:\r\n\t\t  return  FALSE;\r\n\t\r\n\t} // switch (wMsg)\r\n\r\n    return  TRUE;\r\n}\r\n\r\nunsigned8 ShowLoadDialog (bool showAlphaGroup, bool showMipMapGroup, HWND parent)\r\n{\r\n\t//encode flags into results\r\n\tunsigned8 result = LoadInfoEnum::USE_NONE;\r\n\tresult |=  showAlphaGroup ? LoadInfoEnum::USE_SEPARATEALPHA :  LoadInfoEnum::USE_NONE;\r\n\tresult |=  showMipMapGroup ? LoadInfoEnum::USE_MIPMAPS :  LoadInfoEnum::USE_NONE;\r\n\r\n\tif (DialogBoxParam(GetDLLInstance(), \r\n\t\t\t\t\tMAKEINTRESOURCE( IDD_LOADDIALOG ),\r\n\t\t\t\t\tparent, \r\n\t\t\t\t\tDlgLoadProc, \r\n\t\t\t\t\treinterpret_cast<LONG_PTR>(&result)) == IDOK)\r\n\t{\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\n\r\n//Show just a message box\r\nvoid errorMessage(std::string msg, std::string title)\r\n{\r\n\tMessageBox(GetActiveWindow(), msg.c_str(), title.c_str(), MB_OK);\r\n}\r\n\r\n// end OutboundUIWin.cpp"
  },
  {
    "path": "IntelCompressionPlugin/IntelPluginUIWin.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#pragma once\r\n\r\nvoid    ShowAboutIntel (AboutRecordPtr aboutPtr);        // Pop about box.\r\nstd::string GetPresetName(std::string str, HWND parent); //Get preset name dialog\r\nunsigned8 ShowLoadDialog (bool showAlphaGroup, bool showMipMapGroup, HWND parent); //Load dialog\r\nvoid        errorMessage(std::string msg, std::string title); //pops a message dialog\r\n\r\n"
  },
  {
    "path": "IntelCompressionPlugin/IntelTextureWorks.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{FAA37424-40A7-47F4-98CB-4B9464145B0D}</ProjectGuid>\n    <RootNamespace>IntelCompressionPlugin</RootNamespace>\n    <ProjectName>IntelTextureWorks</ProjectName>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <PlatformToolset>v110</PlatformToolset>\n    <CharacterSet>NotSet</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <PlatformToolset>v110</PlatformToolset>\n    <CharacterSet>NotSet</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <PlatformToolset>v110</PlatformToolset>\n    <CharacterSet>NotSet</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <UseOfMfc>false</UseOfMfc>\n    <PlatformToolset>v110</PlatformToolset>\n    <CharacterSet>NotSet</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup>\n    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">false</LinkIncremental>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">false</LinkIncremental>\n    <CodeAnalysisRuleSet Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">AllRules.ruleset</CodeAnalysisRuleSet>\n    <CodeAnalysisRuleSet Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">AllRules.ruleset</CodeAnalysisRuleSet>\n    <CodeAnalysisRules Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" />\n    <CodeAnalysisRules Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" />\n    <CodeAnalysisRuleAssemblies Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" />\n    <CodeAnalysisRuleAssemblies Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" />\n    <CodeAnalysisRuleSet Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">AllRules.ruleset</CodeAnalysisRuleSet>\n    <CodeAnalysisRuleSet Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">AllRules.ruleset</CodeAnalysisRuleSet>\n    <CodeAnalysisRules Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" />\n    <CodeAnalysisRules Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" />\n    <CodeAnalysisRuleAssemblies Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" />\n    <CodeAnalysisRuleAssemblies Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" />\n    <TargetExt Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">.8bi</TargetExt>\n    <TargetExt Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">.8bi</TargetExt>\n    <TargetExt Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">.8bi</TargetExt>\n    <TargetExt Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">.8bi</TargetExt>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <LinkIncremental>false</LinkIncremental>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" />\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <Midl>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>Win32</TargetEnvironment>\n      <TypeLibraryName>$(Intdir)Debug/Outbound.tlb</TypeLibraryName>\n      <HeaderFileName>\n      </HeaderFileName>\n    </Midl>\n    <ClCompile>\n      <AdditionalOptions>/MP /GS %(AdditionalOptions)</AdditionalOptions>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>.;..\\3rdParty\\Intel\\Source;..\\3rdParty\\DirectXTex\\DirectXTex;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_ALLOW_KEYWORD_MACROS=1;ISOLATION_AWARE_ENABLED=1;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;DEV_$(USERNAME);WIN32=1;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <BrowseInformation>true</BrowseInformation>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <CompileAs>Default</CompileAs>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>..\\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n    </ResourceCompile>\n    <Link>\n      <AdditionalDependencies>odbc32.lib;odbccp32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <DataExecutionPrevention>\n      </DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n    </Link>\n    <PostBuildEvent>\n      <Command>md \"$(SolutionDir)Plugins\\$(Platform)\"\ncopy \"$(TargetPath)\" \"$(SolutionDir)Plugins\\$(Platform)\\*\"</Command>\n    </PostBuildEvent>\n    <PreBuildEvent>\n      <Command>if not defined PHOTOSHOP_SDK_CS6 ( \necho PHOTOSHOP_SDK_CS6 must be defined. See ReadMe for setup information\nexit 1\n)</Command>\n    </PreBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <Midl>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>Win32</TargetEnvironment>\n      <TypeLibraryName>$(Intdir)Debug/Outbound.tlb</TypeLibraryName>\n      <HeaderFileName>\n      </HeaderFileName>\n    </Midl>\n    <ClCompile>\n      <AdditionalOptions>/MP /GS %(AdditionalOptions)</AdditionalOptions>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>.;..\\3rdParty\\Intel\\Source;..\\3rdParty\\DirectXTex\\DirectXTex;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_ALLOW_KEYWORD_MACROS=1;ISOLATION_AWARE_ENABLED=1;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;DEV_$(USERNAME);WIN32=1;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <BrowseInformation>true</BrowseInformation>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <CompileAs>Default</CompileAs>\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>..\\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n    </ResourceCompile>\n    <Link>\n      <AdditionalDependencies>odbc32.lib;odbccp32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <DataExecutionPrevention>\n      </DataExecutionPrevention>\n      <TargetMachine>MachineX86</TargetMachine>\n    </Link>\n    <PostBuildEvent>\n      <Command>md \"$(SolutionDir)Plugins\\$(Platform)\"\ncopy \"$(TargetPath)\" \"$(SolutionDir)Plugins\\$(Platform)\\*\"</Command>\n    </PostBuildEvent>\n    <PreBuildEvent>\n      <Command>if not defined PHOTOSHOP_SDK_CS6 ( \necho PHOTOSHOP_SDK_CS6 must be defined. See ReadMe for setup information\nexit 1\n)</Command>\n    </PreBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <Midl>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>X64</TargetEnvironment>\n      <TypeLibraryName>$(Intdir)Debug/Outbound.tlb</TypeLibraryName>\n      <HeaderFileName>\n      </HeaderFileName>\n    </Midl>\n    <ClCompile>\n      <AdditionalOptions>/MP /GS %(AdditionalOptions)</AdditionalOptions>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>.;..\\3rdParty\\Intel\\Source;..\\3rdParty\\DirectXTex\\DirectXTex;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_ALLOW_KEYWORD_MACROS=1;ISOLATION_AWARE_ENABLED=1;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;DEV_$(USERNAME);WIN32=1;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <ObjectFileName>$(IntDir)</ObjectFileName>\n      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>\n      <BrowseInformation>true</BrowseInformation>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n      <CompileAs>Default</CompileAs>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>..\\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n    </ResourceCompile>\n    <Link>\n      <AdditionalDependencies>odbc32.lib;odbccp32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>\n      <SubSystem>Windows</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <DataExecutionPrevention>\n      </DataExecutionPrevention>\n      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>\n      <TargetMachine>MachineX64</TargetMachine>\n    </Link>\n    <PostBuildEvent>\n      <Command>md \"$(SolutionDir)Plugins\\$(Platform)\"\ncopy \"$(TargetPath)\" \"$(SolutionDir)Plugins\\$(Platform)\\*\"</Command>\n    </PostBuildEvent>\n    <PreBuildEvent>\n      <Command>if not defined PHOTOSHOP_SDK_CS6 ( \necho PHOTOSHOP_SDK_CS6 must be defined. See ReadMe for setup information\nexit 1\n)</Command>\n    </PreBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <Midl>\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MkTypLibCompatible>true</MkTypLibCompatible>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <TargetEnvironment>X64</TargetEnvironment>\n      <TypeLibraryName>$(Intdir)Debug/Outbound.tlb</TypeLibraryName>\n      <HeaderFileName>\n      </HeaderFileName>\n    </Midl>\n    <ClCompile>\n      <AdditionalOptions>/MP /GS %(AdditionalOptions)</AdditionalOptions>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>.;..\\3rdParty\\Intel\\Source;..\\3rdParty\\DirectXTex\\DirectXTex;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP;$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>_ALLOW_KEYWORD_MACROS=1;ISOLATION_AWARE_ENABLED=1;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;DEV_$(USERNAME);WIN32=1;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\n      <ObjectFileName>$(IntDir)</ObjectFileName>\n      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>\n      <BrowseInformation>true</BrowseInformation>\n      <WarningLevel>Level3</WarningLevel>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n      <CompileAs>Default</CompileAs>\n    </ClCompile>\n    <ResourceCompile>\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <Culture>0x0409</Culture>\n      <AdditionalIncludeDirectories>..\\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n    </ResourceCompile>\n    <Link>\n      <AdditionalDependencies>odbc32.lib;odbccp32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>\n      <SuppressStartupBanner>true</SuppressStartupBanner>\n      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>\n      <SubSystem>Windows</SubSystem>\n      <RandomizedBaseAddress>false</RandomizedBaseAddress>\n      <DataExecutionPrevention>\n      </DataExecutionPrevention>\n      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>\n      <TargetMachine>MachineX64</TargetMachine>\n    </Link>\n    <PostBuildEvent>\n      <Command>md \"$(SolutionDir)Plugins\\$(Platform)\"\ncopy \"$(TargetPath)\" \"$(SolutionDir)Plugins\\$(Platform)\\*\"</Command>\n    </PostBuildEvent>\n    <PreBuildEvent>\n      <Command>if not defined PHOTOSHOP_SDK_CS6 ( \necho PHOTOSHOP_SDK_CS6 must be defined. See ReadMe for setup information\nexit 1\n)</Command>\n    </PreBuildEvent>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\DialogUtilitiesWin.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\FileUtilities.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\FileUtilitiesWin.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIDLLInstance.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUSuites.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUtilities.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUtilitiesWin.cpp\" />\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIWinUI.cpp\" />\n    <ClCompile Include=\"..\\3rdParty\\Intel\\Source\\ispc_texcomp.cpp\" />\n    <ClCompile Include=\"..\\3rdParty\\Intel\\Source\\win32Threads.cpp\" />\n    <ClCompile Include=\"SaveOptionsDialog.cpp\" />\n    <ClCompile Include=\"IntelPlugin.cpp\" />\n    <ClCompile Include=\"IntelPluginUIWin.cpp\">\n      <Optimization Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Disabled</Optimization>\n      <Optimization Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Disabled</Optimization>\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <BrowseInformation Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</BrowseInformation>\n      <BrowseInformation Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">true</BrowseInformation>\n      <Optimization Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Disabled</Optimization>\n      <Optimization Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Disabled</Optimization>\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <AdditionalIncludeDirectories Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n      <BrowseInformation Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</BrowseInformation>\n      <BrowseInformation Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">true</BrowseInformation>\n    </ClCompile>\n    <ClCompile Include=\"PreviewDialog.cpp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"IntelPluginName.h\" />\n    <ClInclude Include=\"..\\3rdParty\\Intel\\Source\\ispc_texcomp.h\" />\n    <ClInclude Include=\"SaveOptionsDialog.h\" />\n    <ClInclude Include=\"..\\3rdParty\\Intel\\Source\\win32Threads.h\" />\n    <ClInclude Include=\"IntelPlugin.h\" />\n    <ClInclude Include=\"IntelPluginUIWin.h\" />\n    <ClInclude Include=\"PreviewDialog.h\" />\n    <ClInclude Include=\"resource.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <CustomBuild Include=\"IntelPlugin.r\">\n      <Message Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">Compiling PiPL resource...</Message>\n      <Message Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">Compiling PiPL resource...</Message>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">cl /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop   /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Resources     /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Resources    /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Includes /EP /DMSWindows=1 /Tc\"%(FullPath)\" &gt;     \"$(IntDir)%(Filename).rr\"\n\n\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\resources\\Cnvtpipl.exe\" \"$(IntDir)%(Filename).rr\" \"%(Filename).pipl\"\n\ndel \"$(IntDir)%(Filename).rr\"</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">cl /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop   /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Resources     /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Resources    /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Includes /EP /DMSWindows=1 /Tc\"%(FullPath)\" &gt;     \"$(IntDir)%(Filename).rr\"\n\n\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\resources\\Cnvtpipl.exe\" \"$(IntDir)%(Filename).rr\" \"%(Filename).pipl\"\n\ndel \"$(IntDir)%(Filename).rr\"</Command>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">%(Filename).pipl;%(Outputs)</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">%(Filename).pipl;%(Outputs)</Outputs>\n      <Message Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">Compiling PiPL resource...</Message>\n      <Message Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">Compiling PiPL resource...</Message>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">cl /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop   /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Resources     /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Resources    /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Includes /EP /DMSWindows=1 /Tc\"%(FullPath)\" &gt;     \"$(IntDir)%(Filename).rr\"\n\n\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\resources\\Cnvtpipl.exe\" \"$(IntDir)%(Filename).rr\" \"%(Filename).pipl\"\n\ndel \"$(IntDir)%(Filename).rr\"</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">cl /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\PICA_SP /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Photoshop   /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\PhotoshopAPI\\Resources     /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Resources    /I$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\Includes /EP /DMSWindows=1 /Tc\"%(FullPath)\" &gt;     \"$(IntDir)%(Filename).rr\"\n\n\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\resources\\Cnvtpipl.exe\" \"$(IntDir)%(Filename).rr\" \"%(Filename).pipl\"\n\ndel \"$(IntDir)%(Filename).rr\"</Command>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">%(Filename).pipl;%(Outputs)</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">%(Filename).pipl;%(Outputs)</Outputs>\n    </CustomBuild>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"IntelPlugin.rc\">\n      <PreprocessorDefinitions Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PreprocessorDefinitions Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PreprocessorDefinitions Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <PreprocessorDefinitions Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">%(PreprocessorDefinitions)</PreprocessorDefinitions>\n    </ResourceCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <CustomBuild Include=\"kernel.ispc\">\n      <FileType>Document</FileType>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">..\\3rdParty\\Intel\\Tools\\ispc -O2 \"%(Filename).ispc\" -o \"$(IntDir)%(Filename).obj\" -h \"$(ProjectDir)%(Filename)_ispc.h\" --arch=x86-64 --target=sse2,sse4,avx,avx2 --opt=fast-math</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">..\\3rdParty\\Intel\\Tools\\ispc -O2 \"%(Filename).ispc\" -o \"$(IntDir)%(Filename).obj\" -h \"$(ProjectDir)%(Filename)_ispc.h\" --arch=x86-64 --target=sse2,sse4,avx,avx2 --opt=fast-math</Command>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">$(IntDir)%(Filename).obj;$(IntDir)%(Filename)_sse2.obj;$(IntDir)%(Filename)_sse4.obj;$(IntDir)%(Filename)_avx.obj;$(IntDir)%(Filename)_avx2.obj</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">$(IntDir)%(Filename).obj;$(IntDir)%(Filename)_sse2.obj;$(IntDir)%(Filename)_sse4.obj;$(IntDir)%(Filename)_avx.obj;$(IntDir)%(Filename)_avx2.obj</Outputs>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">..\\3rdParty\\Intel\\Tools\\ispc -O2 \"%(Filename).ispc\" -o \"$(IntDir)%(Filename).obj\" -h \"$(ProjectDir)%(Filename)_ispc.h\" --arch=x86 --target=sse2,sse4,avx,avx2 --opt=fast-math</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">..\\3rdParty\\Intel\\Tools\\ispc -O2 \"%(Filename).ispc\" -o \"$(IntDir)%(Filename).obj\" -h \"$(ProjectDir)%(Filename)_ispc.h\" --arch=x86 --target=sse2,sse4,avx,avx2 --opt=fast-math</Command>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(IntDir)%(Filename).obj;$(IntDir)%(Filename)_sse2.obj;$(IntDir)%(Filename)_sse4.obj;$(IntDir)%(Filename)_avx.obj;$(IntDir)%(Filename)_avx2.obj</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(IntDir)%(Filename).obj;$(IntDir)%(Filename)_sse2.obj;$(IntDir)%(Filename)_sse4.obj;$(IntDir)%(Filename)_avx.obj;$(IntDir)%(Filename)_avx2.obj</Outputs>\n    </CustomBuild>\n  </ItemGroup>\n  <ItemGroup>\n    <Image Include=\"zoomin.ico\" />\n    <Image Include=\"zoomout.ico\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\3rdParty\\DirectXTex\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\">\n      <Project>{371b9fa9-4c90-4ac6-a123-aced756d6c77}</Project>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "IntelCompressionPlugin/IntelTextureWorks.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Source Files\">\n      <UniqueIdentifier>{81d03a0f-9d1f-46dd-96e0-69897c8513aa}</UniqueIdentifier>\n      <Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>\n    </Filter>\n    <Filter Include=\"Header Files\">\n      <UniqueIdentifier>{975e039f-859d-47c7-ba81-3b597888543c}</UniqueIdentifier>\n      <Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>\n    </Filter>\n    <Filter Include=\"Resource Files\">\n      <UniqueIdentifier>{4b9a019f-f424-43e5-b946-e90e6484bc01}</UniqueIdentifier>\n      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>\n    </Filter>\n    <Filter Include=\"3rd Party\">\n      <UniqueIdentifier>{e52f075d-7c14-4f4e-a040-b491da9d7c79}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"3rd Party\\Photoshop SDK\">\n      <UniqueIdentifier>{9e5bf2b7-e988-41b3-b16f-de1570fba0fa}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"3rd Party\\Intel\">\n      <UniqueIdentifier>{4184a4d2-ab32-4c21-a69a-dac5104aeab0}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <ClCompile Include=\"IntelPlugin.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\DialogUtilitiesWin.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\FileUtilities.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\FileUtilitiesWin.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIDLLInstance.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUSuites.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUtilities.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIUtilitiesWin.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"$(PHOTOSHOP_SDK_CS6)\\pluginsdk\\samplecode\\common\\sources\\PIWinUI.cpp\">\n      <Filter>3rd Party\\Photoshop SDK</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\3rdParty\\Intel\\Source\\ispc_texcomp.cpp\">\n      <Filter>3rd Party\\Intel</Filter>\n    </ClCompile>\n    <ClCompile Include=\"..\\3rdParty\\Intel\\Source\\win32Threads.cpp\">\n      <Filter>3rd Party\\Intel</Filter>\n    </ClCompile>\n    <ClCompile Include=\"IntelPluginUIWin.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"SaveOptionsDialog.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n    <ClCompile Include=\"PreviewDialog.cpp\">\n      <Filter>Source Files</Filter>\n    </ClCompile>\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"resource.h\">\n      <Filter>Resource Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"IntelPlugin.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"IntelPluginName.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\3rdParty\\Intel\\Source\\win32Threads.h\">\n      <Filter>3rd Party\\Intel</Filter>\n    </ClInclude>\n    <ClInclude Include=\"..\\3rdParty\\Intel\\Source\\ispc_texcomp.h\">\n      <Filter>3rd Party\\Intel</Filter>\n    </ClInclude>\n    <ClInclude Include=\"SaveOptionsDialog.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"IntelPluginUIWin.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n    <ClInclude Include=\"PreviewDialog.h\">\n      <Filter>Header Files</Filter>\n    </ClInclude>\n  </ItemGroup>\n  <ItemGroup>\n    <CustomBuild Include=\"IntelPlugin.r\">\n      <Filter>Resource Files</Filter>\n    </CustomBuild>\n    <CustomBuild Include=\"kernel.ispc\">\n      <Filter>3rd Party\\Intel</Filter>\n    </CustomBuild>\n  </ItemGroup>\n  <ItemGroup>\n    <Image Include=\"zoomin.ico\">\n      <Filter>Resource Files</Filter>\n    </Image>\n    <Image Include=\"zoomout.ico\">\n      <Filter>Resource Files</Filter>\n    </Image>\n  </ItemGroup>\n  <ItemGroup>\n    <ResourceCompile Include=\"IntelPlugin.rc\">\n      <Filter>Resource Files</Filter>\n    </ResourceCompile>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "IntelCompressionPlugin/PreviewDialog.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"PreviewDialog.h\"\r\n#include \"IntelPluginUIWin.h\"\r\n#include \"resource.h\"\r\n\r\n#include <CommCtrl.h>\r\n#include <PIUI.h>\r\n#include <vector>\r\n#include <string>\r\n#include <sstream>\r\n\r\n\r\nusing namespace DirectX;\r\n\r\n//For mouse tracking, when panning zooming\r\nPOINT mouseDownPos, mouseOldpos;\r\nbool mouseTracking = false;\r\n\r\n//Offset of small preview area into larger 100% image buffer, used for panning\r\nint  previewOffsetXTrackingStart = 0;\r\nint  previewOffsetYTrackingStart = 0;\r\n\r\n/*****************************************************************************/\r\ntemplate <typename T>\r\nT clampGeneral(T x, T a, T b)\r\n{\r\n\treturn x < a ? a : (x > b ? b : x);\r\n}\r\n\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\n/*****************************************************************************/\r\nPreviewDialog::PreviewDialog(IntelPlugin* _plugin)\r\n{\r\n\thDlg = NULL;\r\n\tplugin = _plugin;\r\n\tglobalParams = plugin->GetData();\r\n\tformatRecord = plugin->GetFormatRecord();\r\n\r\n\tpreviewOffsetX=0;\r\n\tpreviewOffsetY=0;\r\n\tpreviewSpecificChannel = -1; //-1=RGB,0=R,1=G,2=B,3=A\r\n\tpreviewPlanes = 3; //Default is RGB\r\n\tpreviewZoom = 1.0f;\r\n\tpreviewBuffer = NULL;\r\n\tpreviewCompressedBuffer = NULL;\r\n\tpixelStep = mouseStep = 0;\r\n\tpreviewBufferWidth = 0;\r\n\tpreviewBufferHeight = 0;\r\n}\r\n\r\nPreviewDialog::~PreviewDialog() \r\n{\r\n\t//Exiting the dialog, free space\r\n\tif (previewBuffer != NULL)\r\n\t{\r\n\t\tdelete[] previewBuffer;\r\n\t\tpreviewBuffer = NULL;\r\n\t}\r\n\t\r\n\tif (previewCompressedBuffer != NULL)\r\n\t{\r\n\t\tdelete[] previewCompressedBuffer;\r\n\t\tpreviewCompressedBuffer = NULL;\r\n\t}\r\n\r\n}\r\n\r\nvoid PreviewDialog::CalculateOptimizationParameters(int width, int height)\r\n{\r\n\tint bigestValue = (width>height) ? width:height;\r\n\tfloat divVal = bigestValue/400.f; //400 found by trial and error, every 400 pixels we change opt step\r\n\tpixelStep = int(divVal) + 1; //how many pixels to skip when mouseTracking is on (panning)\r\n\tpixelStep = clampGeneral(pixelStep, 1, 4);\r\n\tmouseStep = int(pixelStep*bigestValue/100.f); //percentage of size threshold to update screen when mouse is moved\r\n\t\r\n}\r\n\r\n//Convert a channel value (R/G/B) from srcDataPtr to 8bit and copy into tgtDataPtr\r\n//the blitting routines only support 8bit images\r\nbool PreviewDialog::ConvertToUncompressedPreviewTo8Bit(unsigned8 *tgtDataPtr, ScratchImage *srcDataPtr, int index)\r\n{\t\r\n\tconst Image *image = srcDataPtr->GetImages();\r\n\r\n\tif (image->format == DXGI_FORMAT_R8G8B8A8_UNORM)\r\n\t{\r\n\t\t//Get pointer to first (and only) image\r\n\t\tunsigned8 *rowData8bit = image->pixels;\r\n\t\ttgtDataPtr[0] = rowData8bit[index];\r\n\t}\r\n\telse if (image->format == DXGI_FORMAT_R16G16B16A16_FLOAT)\r\n\t{\r\n\t\t//Get pointer to first (and only) image, cast to 16bit for BC6\r\n\t\tunsigned16 *rowData16bit = reinterpret_cast<unsigned16 *>(image->pixels);\r\n\t\t\t\t\r\n\t\t//Inverse values of R/G channels only\r\n\t\ttgtDataPtr[0] = FloatToByte(F16toF32(rowData16bit[index]));\t\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n//Return bytes in human readable format\r\nstd::string PreviewDialog::DisplayHumanReadable(int sizeInBytes)\r\n{\r\n\tchar buffer[MAX_PATH] = {};\r\n\r\n\tfloat MBinBytes = 1024.f*1024.f;\r\n\tfloat KBinBytes = 1024.f;\r\n\r\n\tif (sizeInBytes >= MBinBytes * 100)\r\n\t\tsprintf(buffer, \"%d MB\", sizeInBytes/(int)MBinBytes);\r\n\telse if (sizeInBytes >= MBinBytes)\r\n\t\tsprintf(buffer, \"%.1f MB\", sizeInBytes/MBinBytes);\r\n\telse if (sizeInBytes >= KBinBytes * 100)\r\n\t\tsprintf(buffer, \"%d KB\", sizeInBytes/(int)KBinBytes);\r\n\telse if (sizeInBytes >= KBinBytes)\r\n\t\tsprintf(buffer, \"%.1f KB\", sizeInBytes/KBinBytes);\r\n\telse\r\n\t\tsprintf(buffer, \"%d B\", sizeInBytes);\r\n\t\r\n    return buffer;\r\n}\r\n\r\n//Update text control \r\nvoid PreviewDialog::UpdateSizeText()\r\n{\r\n\tint byteSize = plugin->GetCompressedByteSize();\r\n\tif (globalParams->MipMapTypeIndex != MipmapEnum::NONE)\t// mip map size included\r\n\t\tbyteSize = byteSize * 4 / 3;\r\n\r\n\tstd::string text = DisplayHumanReadable(byteSize);\r\n\r\n\tSendMessage(GetDlgItem(hDlg, IDC_PREVIEWPROXY_TEXTSIZECOMPRESSED), WM_SETTEXT, 0, reinterpret_cast<LPARAM>(text.c_str()));\r\n\r\n\ttext = DisplayHumanReadable(plugin->GetOriginalByteSize());\r\n\tSendMessage(GetDlgItem(hDlg, IDC_PREVIEWPROXY_TEXTSIZEUNCOMPRESSED), WM_SETTEXT, 0, reinterpret_cast<LPARAM>(text.c_str()));\r\n}\r\n\r\n//Win32 Preview window \r\n//Update the text contol which diplays the zoom level\r\nvoid PreviewDialog::UpdateZoomText()\r\n{\r\n\tchar buf[10];\r\n\tsprintf(buf,\"%3d%%\", int(previewZoom*100.f));\r\n\tSendMessage(GetDlgItem(hDlg, IDC_PREVIEWPROXY_ZOOMTEXT), WM_SETTEXT, 0, reinterpret_cast<LPARAM>(buf));\r\n}\r\n\r\n//Issue a redraw on the client window in the previe areas.\r\n//the redraw parameter indicates if the backgound needs to be erased.\r\nvoid PreviewDialog::InvalidatePreviews(bool redraw)\r\n{\r\n\t//Issue a redraw for these areas\r\n\tInvalidateRect (hDlg, &previewProxyRect, redraw);\r\n\tInvalidateRect (hDlg, &previewProxyCompressedRect, redraw);\r\n}\r\n\r\n//Clip offsets to bounds\r\nvoid PreviewDialog::ClipOffsetsToBounds()\r\n{\r\n\tpreviewOffsetX = clampGeneral(previewOffsetX, 0, int(previewDimensions.x*previewZoom) - previewBufferWidth);\r\n\tpreviewOffsetY = clampGeneral(previewOffsetY, 0, int(previewDimensions.y*previewZoom) - previewBufferHeight);\r\n}\r\n\r\n//Called after zoom, to recalculate the correct previewOffset.\r\n//Parameter previosZoom is the previous zoom value. \r\n//Special handling required to have it zoom always towards the center of the image part visible\r\nvoid PreviewDialog::ClipPreviewOffset(float previousZoom)\r\n{\r\n\t//Half width of preview area in dialog\r\n\tfloat halfWidth = previewAreaDimensions.x*0.5f;\r\n\tfloat halfHeight = previewAreaDimensions.y*0.5f;\r\n\r\n\t//Calculate preview offset for CENTER for 100% zoom. We use the previous zoom value here.\r\n\t//Center is the image pixel(x,y) which is in the center of the currelty visible part\r\n\tfloat origX = (previewOffsetX+halfWidth)*(1.f/previousZoom);\r\n\tfloat origY = (previewOffsetY+halfHeight)*(1.f/previousZoom);\r\n\r\n\t//Get factor for this offset for unscaled image relative to image size\r\n\torigX = origX/previewDimensions.x;\r\n\torigY = origY/previewDimensions.y;\r\n\r\n\t//Calculate new offset now based on the new zoom factor\r\n\tpreviewOffsetX=static_cast<int>(previewDimensions.x*previewZoom*origX-halfWidth);\r\n\tpreviewOffsetY=static_cast<int>(previewDimensions.y*previewZoom*origY-halfHeight);\r\n\r\n\t//Clip offsets to bounds\r\n\tClipOffsetsToBounds();\r\n}\r\n\r\n//Compute the client areas of the preview rectangles and the image width that is visible.\r\n//Should be the size of the preview are unless the image is smaller.\r\n//Returns a flag indicating the need for background clear.\r\n//Is to be called after zoom or window resize\r\nbool PreviewDialog::CalculateBounds()\r\n{\r\n\tpreviewDimensions = plugin->GetPreviewDimensions();\r\n\r\n\tbool redraw = false;\r\n\r\n\t//Get window rectangles for bitmaps (for displayPixels) in client coordinates\r\n\t//Get in screen coordinates, for compressed texture\r\n\tGetWindowRect(GetDlgItem(hDlg, IDC_PREVIEWPROXY_COMPRESSED), &previewProxyCompressedRect);\t\r\n\t//Translate to client coords\r\n\tMapWindowRect(NULL, hDlg, &previewProxyCompressedRect);\r\n\t\r\n\t//Get in screen coordinates, for original texture\r\n\tGetWindowRect(GetDlgItem(hDlg, IDC_PREVIEWPROXY_ORIGINAL), &previewProxyRect);\t\r\n\t//Translate to client coords\r\n\tMapWindowRect(NULL, hDlg, &previewProxyRect);\r\n\t\t\t\r\n\t//Calculate width,height of preview area (calculated only once because both windows are the same)\r\n\tint width = previewProxyRect.right - previewProxyRect.left;\r\n\tint height = previewProxyRect.bottom - previewProxyRect.top;\r\n\t//Store locally in global\r\n\tpreviewAreaDimensions.x = width; \r\n\tpreviewAreaDimensions.y = height;\r\n\r\n\t//If previewarea bigger than real image (scaled using zoom factor) then clip size and \r\n\t//since the image displayed is smaller then the preview window flag a background clear\r\n\tif (width > previewDimensions.x*previewZoom)\r\n\t{\r\n\t\tredraw=true;\r\n\t\twidth = int(previewDimensions.x*previewZoom);\r\n\t}\r\n\tif (height > previewDimensions.y*previewZoom)\r\n\t{\r\n\t\tredraw=true;\r\n\t\theight = int(previewDimensions.y*previewZoom);\r\n\t}\r\n\r\n\t//Store width of visible image (is same as preview area width, except when image is smaller than preview area, or zoomlevel <1)\r\n\tpreviewBufferWidth = width;\r\n\tpreviewBufferHeight = height;\r\n\r\n\tCalculateOptimizationParameters(previewAreaDimensions.x, previewAreaDimensions.y);\r\n\r\n\t//Return flag indicating the need of a background redraw or not\r\n\treturn redraw;\r\n}\r\n\r\n//Copy into the previewBuffer/previewCompressedBuffer which gets displayed in PaintProxy the part of the image that is visible\r\n//The image that is visible is determined using the previewOffset (resulting from panning the image) and\r\n//the zoomLevel specified\r\nvoid PreviewDialog::updatePreviewBuffer()\r\n{\r\n\tstatic int colorMask[] = { \r\n\t\tIntelPlugin::PREVIEW_CHANNEL_RGB, \r\n\t\tIntelPlugin::PREVIEW_CHANNEL_RED, \r\n\t\tIntelPlugin::PREVIEW_CHANNEL_GREEN, \r\n\t\tIntelPlugin::PREVIEW_CHANNEL_BLUE, \r\n\t\tIntelPlugin::PREVIEW_CHANNEL_ALPHA \r\n\t};\r\n\r\n\tint mask = colorMask[previewSpecificChannel+1];\t// see definition, -1 is used for all channels\r\n\r\n\tplugin->FetchPreviewRGB(previewBuffer, previewAreaDimensions.x, previewAreaDimensions.y, previewOffsetX, previewOffsetY, 1.f/previewZoom, mask);\r\n\tplugin->FetchPreviewRGB(previewCompressedBuffer, previewAreaDimensions.x, previewAreaDimensions.y, previewOffsetX, previewOffsetY, 1.f/previewZoom, mask | IntelPlugin::PREVIEW_SOURCE_COMPRESSED);\r\n\tUpdateSizeText();\r\n}\r\n\r\n//Draw two image proxies\r\nvoid PreviewDialog::PaintProxy()\r\n{\r\n\tPSPixelMap pixels;\r\n\tPSPixelMap pixelsCompressed;\r\n\t//PSPixelMask mask;\r\n\tPAINTSTRUCT  ps;\r\n\t//POINT\tmapOrigin; \r\n\tHDC\t\thDC;\r\n\r\n\t//Src rect which will get rendered form inside previeBuffer\r\n\tVRect inRect = {0, 0, previewBufferHeight, previewBufferWidth};\r\n\t\r\n\t//If there is an error return\r\n\tif (plugin->GetResult() != noErr)\r\n\t\treturn;\r\n\r\n\t//Compute offset to centre the image if its smaller than the preview Area\r\n\tint centreXOffset = 0;\r\n\tint centreYOffset = 0;\r\n\tif (previewAreaDimensions.x > previewBufferWidth)\r\n\t\tcentreXOffset = static_cast<int>((previewAreaDimensions.x - previewBufferWidth)*0.5);\r\n\tif (previewAreaDimensions.y > previewBufferHeight)\r\n\t\tcentreYOffset = static_cast<int>((previewAreaDimensions.y - previewBufferHeight)*0.5);\r\n\t\r\n\thDC = BeginPaint(hDlg, &ps);\t\r\n\r\n\t//Paint the black frame with a one pixel space\r\n\t//between the image and the frame\r\n\tInflateRect(&previewProxyRect, 2, 2);\r\n\tFrameRect(hDC, &previewProxyRect, static_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));\t\r\n\tInflateRect(&previewProxyRect, -2, -2);\r\n\tInflateRect(&previewProxyCompressedRect, 2, 2);\r\n\tFrameRect(hDC, &previewProxyCompressedRect, static_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));\t\r\n\tInflateRect(&previewProxyCompressedRect, -2, -2);\r\n\t\r\n\t//Init the PSPixel map\r\n\tpixels.version = 1;\r\n\tpixels.bounds.top = 0;\r\n\tpixels.bounds.left = 0;\r\n\tpixels.bounds.bottom = inRect.bottom;\r\n\tpixels.bounds.right = inRect.right;\r\n\tpixels.imageMode = plugInModeRGBColor;\r\n\tpixels.rowBytes = previewAreaDimensions.x*3;\r\n\tpixels.colBytes = 3;\r\n\tpixels.planeBytes = 1;\r\n\tpixels.baseAddr = previewBuffer;\r\n\r\n\tpixels.mat = NULL;\r\n\tpixels.masks = NULL;\r\n\tpixels.maskPhaseRow = 0;\r\n\tpixels.maskPhaseCol = 0;\r\n\r\n\tpixelsCompressed = pixels;\r\n\tpixelsCompressed.baseAddr = previewCompressedBuffer;\r\n\r\n\t(plugin->GetFormatRecord()->displayPixels)(&pixels, \r\n\t\t                           &inRect,//&pixels.bounds, \r\n\t\t\t\t\t\t\t\t   previewProxyRect.top + centreYOffset, \r\n\t\t\t\t\t\t\t\t   previewProxyRect.left + centreXOffset, \r\n\t\t\t\t\t\t\t\t   hDC);\r\n\r\n\t(plugin->GetFormatRecord()->displayPixels)(&pixelsCompressed, \r\n\t\t                           &inRect,//&pixels.bounds, \r\n\t\t\t\t\t\t\t\t   previewProxyCompressedRect.top + centreYOffset, \r\n\t\t\t\t\t\t\t\t   previewProxyCompressedRect.left + centreXOffset, \r\n\t\t\t\t\t\t\t\t   hDC);\r\n\r\n\tEndPaint(hDlg, &ps);\r\n}\r\n\r\n//Zoom proxy preview\r\n//Calculates new bounds (width/height of viewable area), new offsets, \r\n//updates the buffer, text controls, and issues a win32 redraw\r\nvoid PreviewDialog::zoomImage(float previousZoom, float currentZoom)\r\n{\r\n\tpreviewZoom = currentZoom;\r\n\r\n\t//Calculate preview area sizes because of new zoom\r\n\tbool redraw = CalculateBounds();\r\n\r\n\t//Calculate new offset because zoom changed\r\n\tClipPreviewOffset(previousZoom);\r\n\r\n\t//Update the pixel buffer with this zoomLevel\r\n\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t\r\n\t//Update ui which shows the zoom level\r\n\tUpdateZoomText();\r\n\t\t\t\t\t\t\r\n\t//Issue a redraw for these areas\r\n\tInvalidatePreviews(redraw);\r\n}\r\n\r\n//Fill the preview compression table with valid entries for the texture type defined in gGlobalParams->TextureTypeIndex\r\nvoid PreviewDialog::FillCompressionCombo()\r\n{\r\n\tcompressionModesTable_.clear();\r\n\r\n\t//BC1, BC1_SRGB, BC3, BC3_SRGB, BC6H_FAST, BC6H_FINE, BC7_FAST, BC7_FINE, BC7_SRGB_FAST, BC7_SRGB_FINE, BC4, BC5, NONE\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC1))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC1_UNORM, \"BC1   4bpp  (Linear)\", false));\r\n\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC1_SRGB))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC1_UNORM_SRGB, \"BC1   4bpp  (sRGB, DX10+)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC3))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC3_UNORM, \"BC3   8bpp  (Linear)\", false));\r\n\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC3_SRGB))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC3_UNORM_SRGB, \"BC3   8bpp  (sRGB, DX10+)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC6H_FAST))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC6H_UF16, \"BC6H  8bpp  Fast (Linear, DX11+)\", true));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC6H_FINE))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC6H_UF16, \"BC6H  8bpp  Fine (Linear, DX11+)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC7_FAST))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC7_UNORM, \"BC7   8bpp  Fast (Linear, DX11+)\", true));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC7_FINE))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC7_UNORM, \"BC7   8bpp  Fine (Linear, DX11+)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC7_SRGB_FAST))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC7_UNORM_SRGB, \"BC7   8bpp  Fast (sRGB, DX11+)\", true));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC7_SRGB_FINE))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC7_UNORM_SRGB, \"BC7   8bpp  Fine (sRGB, DX11+)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC4))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC4_UNORM, \"BC4   4bpp  (Linear, Grayscale)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::BC5))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_BC5_UNORM, \"BC5   8bpp  (Linear, 2 Channel tangent map)\", false));\r\n\t\r\n\tif (plugin->IsCombinationValid(globalParams->TextureTypeIndex,CompressionTypeEnum::UNCOMPRESSED))\r\n\t\tcompressionModesTable_.push_back(CompressModesStruct(DXGI_FORMAT_R8G8B8A8_UNORM, \"none  32bpp\", false));\r\n}\r\n\r\n//Fill Preview combo with all current compression settings and select the current one\r\n//The current settings are taken from the global plugin struct\r\nvoid PreviewDialog::InitPreviewComboBox()\r\n{\r\n\t//Init Combo Box Instead of the static text \r\n\tHWND combo = GetDlgItem(hDlg, IDC_PREVIEWPROXY_COMBOBOX);\r\n\t\t\t\t\r\n\t//Clear combo\r\n\tSendMessage(combo, CB_RESETCONTENT, 0, 0);\r\n\t\t\t\t\r\n\t//Fill compressionModesTable\r\n\tFillCompressionCombo();\r\n\r\n\t//Fill Combo with predefined compressionModesTable entries\r\n\tfor (int i=0;i<compressionModesTable_.size();i++)\r\n\t{\r\n\t\tSendMessage(combo, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(compressionModesTable_[i].formatName.c_str()));\r\n\r\n\t\t//Set selected index, if this is the matching index.\r\n\t\tif (globalParams->encoding_g == compressionModesTable_[i].format && globalParams->fast_bc67 == compressionModesTable_[i].fast)\r\n\t\t\tSendMessage(combo, CB_SETCURSEL, WPARAM(i), 0);\r\n\t}\r\n\r\n\t//Define Font\r\n\tLOGFONT lf = {}; // to define the font\r\n\tlf.lfHeight = 14;\r\n\t//lf.lfWidth = ;\r\n\tlf.lfWeight = FW_NORMAL;\r\n\tlf.lfCharSet = ANSI_CHARSET;\r\n\tlf.lfOutPrecision = OUT_DEFAULT_PRECIS;\r\n\tlf.lfClipPrecision = CLIP_DEFAULT_PRECIS;\r\n\tlf.lfQuality = PROOF_QUALITY;\r\n\tlf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;\r\n\tstrcpy(lf.lfFaceName,\"Consolas\");\r\n\r\n\tif (auto hFont  = ::CreateFontIndirect(&lf))\r\n\t{\r\n\t\tSendMessage(combo, WM_SETFONT, reinterpret_cast<WPARAM>(hFont), LPARAM(TRUE));\r\n\t}\r\n}\r\n\r\n//Calculate zoom value so that image is shown in its entirety\r\nvoid PreviewDialog::zoomToFit()\r\n{\r\n\tif (previewDimensions.x > previewDimensions.y)\r\n\t{\r\n\t\t//Image is wider than tall\r\n\t\tpreviewZoom = clampGeneral (float(previewAreaDimensions.x) / previewDimensions.x, 0.01f, 1.f);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Image is taller than wide\r\n\t\tpreviewZoom = clampGeneral (float(previewAreaDimensions.y) / previewDimensions.y, 0.01f, 1.f);\r\n\t}\r\n}\r\n\r\n//Allocate preview buffer for this proxy area, proxyBuffer can only be RGB. Therefore 3\r\nvoid PreviewDialog::allocateBuffers()\r\n{\r\n\tif (previewBuffer != NULL)\r\n\t\tdelete[] previewBuffer;\r\n\r\n\tif (previewCompressedBuffer != NULL)\r\n\t\tdelete[] previewCompressedBuffer;\r\n\r\n\r\n\tpreviewBuffer = new unsigned8[previewAreaDimensions.x*previewAreaDimensions.y*3];\r\n\tpreviewCompressedBuffer = new unsigned8[previewAreaDimensions.x*previewAreaDimensions.y*3];\r\n}\r\n\r\n\r\n//Init planes and fill photoshop buffer with image\r\nvoid PreviewDialog::Init()\r\n{\r\n\t//Store number of available planes\r\n\tpreviewPlanes = plugin->GetFormatRecord()->planes;\r\n\tpreviewPlanes = clampGeneral(previewPlanes, 1, 4);\r\n}\r\n\r\n//Test if global state different then the one selected in combo box\r\nbool PreviewDialog::IsSelectedEncodingDifferent(int index)\r\n{\r\n\tif (index < compressionModesTable_.size())\r\n\t{\r\n\t\treturn (!(globalParams->encoding_g == compressionModesTable_[index].format &&\r\n\t\t\t\t\tglobalParams->fast_bc67  == compressionModesTable_[index].fast));\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n//Set global state encoding from table. The index into the table is taken form the combo box\r\nvoid PreviewDialog::SetGlobalEncoding(int index)\r\n{\t\r\n\tif (index < compressionModesTable_.size())\r\n\t{\r\n\t\tglobalParams->encoding_g = compressionModesTable_[index].format;\r\n\t\tglobalParams->fast_bc67  = compressionModesTable_[index].fast;\r\n\t}\r\n}\r\n\r\n//\tmaxDimension is a percentage of parent size (null = desktop)\r\n//  eg passing max dim 0.3 means the window must fit within a rectangle that is\r\n//  0.3 times the size of the parent.\r\n//  minWidth sets a lower limit to stop dialogs collapsing too much\r\nvoid PreviewDialog::RelativeScale(HWND hwnd, HWND parent_hwnd, float maxDimension, int minWidth)\r\n{\r\n\tif (parent_hwnd == NULL)\r\n\t\tparent_hwnd = GetDesktopWindow();\r\n\r\n    RECT rcSelf = {};\r\n    RECT rcParent = {};\r\n\r\n\tGetWindowRect(hwnd, &rcSelf);\r\n\tGetWindowRect(parent_hwnd, &rcParent);\r\n\r\n\t// pick a size relative to desktop/parent size\r\n\tfloat scale = (rcParent.right - rcParent.left) * maxDimension / (rcSelf.right - rcSelf.left);\r\n\tfloat scaleY = (rcParent.bottom - rcParent.top) * maxDimension / (rcSelf.bottom - rcSelf.top);\r\n\r\n\tif (scaleY < scale)\r\n\t\tscale = scaleY;\r\n\r\n\t\t// make sure we don't make it too small\r\n\tfloat scaleMin = float(minWidth) / (rcSelf.right - rcSelf.left);\r\n\tif (scale < scaleMin)\r\n\t\tscale = scaleMin;\r\n\r\n\trcSelf.right = int((rcSelf.right - rcSelf.left) * scale + rcSelf.left);\r\n\trcSelf.bottom = int((rcSelf.bottom - rcSelf.top) * scale + rcSelf.top);\r\n\r\n\t// our coordinates are screen based, convert to client here\r\n\tMapWindowRect(NULL, parent_hwnd, &rcSelf);\r\n\tMoveWindow(hwnd, rcSelf.left, rcSelf.top, rcSelf.right - rcSelf.left, rcSelf.bottom - rcSelf.top, FALSE);\r\n}\r\n\r\nBOOL CALLBACK PreviewDialog::WndEnumProc(HWND hwnd, LPARAM self_lparam)\r\n{\r\n\tPreviewDialog* self = reinterpret_cast<PreviewDialog*>(self_lparam);\r\n\r\n\tRECT rcParent;\r\n\tRECT rc;\r\n\r\n\tGetClientRect(self->hDlg, &rcParent);\r\n\tGetWindowRect(hwnd, &rc);\r\n\tMapWindowRect(NULL, self->hDlg, &rc);\r\n\r\n\tself->scaledPositions.push_back(std::make_pair(hwnd, ScalableRect(rcParent, rc)));\r\n\treturn TRUE;\r\n}\r\n \r\n\t// message handler\r\nBOOL PreviewDialog::WindowProc(UINT wMsg, WPARAM wParam, LPARAM lParam)   // Win32 Change\r\n{\r\n    switch  (wMsg)\r\n\t{\r\n\t\tcase WM_INITDIALOG:\r\n\t\t\t{\r\n\t\t\t\t//Save as static for cross functiona call use\r\n\t\t\t\t// Initialize compression name text control, or combo box with names\r\n\t\t\t\tInitPreviewComboBox();\r\n\t\t\t\t\r\n\t\t\t\tEnumChildWindows(hDlg, WndEnumProc, reinterpret_cast<LPARAM>(this));\r\n\r\n\t\t\t\t\t// pick a reasonable default for current view\r\n\t\t\t\tRelativeScale(hDlg, NULL, 0.4f, 600);\r\n\r\n\t\t\t\t//Center dialog and update zoom level ui indication\r\n\t\t\t\tCenterDialog(hDlg);\r\n\r\n\t\t\t\tInit();\r\n\t\t\t\t\r\n\t\t\t\t//Calculate initial bounds with zoom of 1 preview area sizes\r\n\t            CalculateBounds();\r\n\r\n\t\t\t\t//Calculate zoom so that image is shown in its entirety\r\n\t\t\t\tzoomToFit();\r\n\t\t\t\t\t\r\n\t\t\t\t//Calculate new bounds because zoom changed\r\n\t            CalculateBounds();\r\n\r\n\t\t\t\t//Calculate new offset because zoom changed\r\n\t\t\t\tClipPreviewOffset(1.f);\r\n\t\t\t\t\r\n\t\t\t\t//Update zoom level ui text\r\n\t\t\t\tUpdateZoomText();\r\n\r\n\t\t\t\t//Allocate preview buffer for this proxy area, proxyBuffer can only be RGB. \r\n\t\t\t\tallocateBuffers();\r\n\r\n\t\t\t\t//Fill preview buffer\r\n\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\r\n\t\t\t\t//Load zoom icons into the buttons\r\n\t\t\t\tHANDLE hMyIcon = LoadImage(GetDLLInstance(), \"ZOOMINICON\",IMAGE_ICON,13,13,NULL);\r\n\t\t\t\tHANDLE hMyIcon2 = LoadImage(GetDLLInstance(), \"ZOOMOUTICON\",IMAGE_ICON,13,13,NULL);\r\n\t\t\t\tif (hMyIcon != NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\tSendDlgItemMessage(hDlg, IDC_PREVIEWPROXY_ZOOMIN, BM_SETIMAGE, IMAGE_ICON, reinterpret_cast<LPARAM>(hMyIcon));\r\n\t\t\t\t}\r\n\t\t\t\tif (hMyIcon2 != NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\tSendDlgItemMessage(hDlg, IDC_PREVIEWPROXY_ZOOMOUT, BM_SETIMAGE, IMAGE_ICON, reinterpret_cast<LPARAM>(hMyIcon2));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (auto slider = GetDlgItem(hDlg, IDC_EXPOSURE_SLIDER))\r\n\t\t\t\t{\r\n\t\t\t\t\tif (plugin->GetFormatRecord()->depth > 16)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tShowWindow(slider, SW_SHOW);\r\n\t\t\t\t\t\tSendMessage(slider, TBM_SETRANGEMIN, FALSE, -1000);\r\n\t\t\t\t\t\tSendMessage(slider, TBM_SETRANGEMAX, TRUE, 1000);\r\n\t\t\t\t\t\tSendMessage(slider, TBM_SETPOS, TRUE, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tShowWindow(slider, SW_HIDE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn  TRUE;\r\n\t\t\t}\r\n\t\tcase WM_PAINT:\r\n\t\t\tPaintProxy();\r\n\t\t\treturn FALSE;\r\n\r\n\t\tcase WM_SIZE:\r\n\t\t\t{\r\n\t\t\t\t//new width, height of window\r\n\t\t\t\tint width=LOWORD (lParam); \r\n\t\t\t\tint height=HIWORD (lParam); \r\n\r\n\t\t\t\tif (true)\r\n\t\t\t\t{\r\n\t\t\t\t\tRECT rect = {};\r\n\t\t\t\t\trect.right = width;\r\n\t\t\t\t\trect.bottom = height;\r\n\t\t\t\t\tfor (auto it = scaledPositions.begin(); it != scaledPositions.end(); ++it)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tauto hwnd = it->first;\r\n\t\t\t\t\t\tauto scalableRect = it->second;\r\n\t\t\t\t\t\tif (IsWindow(hwnd))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tRECT rc = scalableRect.Get(rect);\r\n\t\t\t\t\t\t\tMoveWindow(hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom-rc.top,FALSE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCalculateBounds();\r\n\t\t\t\t\tallocateBuffers();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Update view\r\n\t\t\t\tfloat prevZoom = getCurrentZoom();\r\n\t\t\t\tzoomImage(prevZoom, prevZoom);\r\n\t\t\t\tInvalidateRect(hDlg, NULL, true);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase WM_COMMAND:\r\n\t\t\t{\r\n\t\t\t\tfloat prevZoom = 0;\r\n\t\t\t\tfloat newZoom = 1;\r\n\t\t\t\tint idd = COMMANDID (wParam);              // WIN32 Change\r\n\r\n\t\t\t\tswitch  (idd)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase OK:\r\n\t\t\t\t\tcase CANCEL:\r\n\t\t\t\t\t\tEndDialog(hDlg, idd);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOMIN:\r\n\t\t\t\t\t\t//Zoom in button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tnewZoom = prevZoom + 0.1f;\r\n\t\t\t\t\t\tnewZoom =clampGeneral(newZoom, 0.05f, 4.f);\r\n\t\t\t\t\t\tzoomImage(prevZoom, newZoom);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOMOUT:\r\n\t\t\t\t\t\t//Zoom in button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tnewZoom = prevZoom - 0.1f;\r\n\t\t\t\t\t\tnewZoom =clampGeneral(newZoom, 0.05f, 4.f);\r\n\t\t\t\t\t\tzoomImage(prevZoom, newZoom);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOM1X:\r\n\t\t\t\t\t\t//Zoom 1x button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomImage(prevZoom, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOM2X:\r\n\t\t\t\t\t\t//Zoom 2x button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomImage(prevZoom, 2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOM4X:\r\n\t\t\t\t\t\t//Zoom 4x button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomImage(prevZoom, 4);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOMHALF:\r\n\t\t\t\t\t\t//Zoom 1/2x button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomImage(prevZoom, 0.5f);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOMQUARTER:\r\n\t\t\t\t\t\t//Zoom 1/2x button was pressed\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomImage(prevZoom, 0.25f);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_ZOOMFIT:\r\n\t\t\t\t\t\t//Calculate zoom so that image is shown in its entirety\r\n\t\t\t\t\t\t//Compute new zoom level\r\n\t\t\t\t\t\tprevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tzoomToFit();\r\n\t\t\t\t\t\tzoomImage(prevZoom, getCurrentZoom());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_RGB:\r\n\t\t\t\t\t\tsetPreviewSpecificChannel(-1); //RGB\r\n\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_R:\r\n\t\t\t\t\t\tsetPreviewSpecificChannel(0); //R\r\n\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_G:\r\n\t\t\t\t\t\tsetPreviewSpecificChannel(1); //G\r\n\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_B:\r\n\t\t\t\t\t\tsetPreviewSpecificChannel(2); //B\r\n\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_A:\r\n\t\t\t\t\t\tsetPreviewSpecificChannel(3); //A\r\n\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase IDC_PREVIEWPROXY_COMBOBOX:\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//Did the combo box change\r\n\t\t\t\t\t\t\tif ( HIWORD(wParam) == CBN_SELCHANGE) \r\n\t\t\t\t\t\t\t{   \r\n\t\t\t\t\t\t\t\t//Get its current index\r\n\t\t\t\t                HWND combo = GetDlgItem(hDlg, IDC_PREVIEWPROXY_COMBOBOX);\r\n\t\t\t\t\t\t\t\tint index = int(SendMessage(combo, CB_GETCURSEL, 0, 0));\r\n\t\t\t\t\t        \t\r\n\t\t\t\t\t\t\t\t//If encoding different\r\n\t\t\t\t\t\t\t\tif (IsSelectedEncodingDifferent(index))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t//Store settigns selected in combo box\r\n\t\t\t\t\t\t\t\t\tSetGlobalEncoding(index);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Update the pixel buffer with this channel info\r\n\t\t\t\t\t\t\t\tupdatePreviewBuffer();\r\n\r\n\t\t\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase WM_DESTROY:\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\tcase WM_LBUTTONDOWN:\r\n\t\t\t        //Set focus to window, since the combo will have the focus by default\r\n\t\t\t        SetFocus(GetActiveWindow());\r\n\t\t\t        \r\n\t\t\t\t\t//Start mouse tracking\r\n\t\t\t\t\tGetCursorPos(&mouseDownPos); //Get mouse pos in screen coords\r\n\t\t\t\t\tmouseOldpos = mouseDownPos;  //Store old mouse position for update every 5 pixels\r\n\r\n\t\t\t\t\t//Store offset value\r\n\t\t\t\t\tgetPreviewOffset(previewOffsetXTrackingStart, previewOffsetYTrackingStart);\r\n\t\t\t\t\tSetCapture(hDlg);\r\n                    break; \r\n\r\n\t\tcase WM_MOUSEMOVE:\r\n\t\t\t        if (GetCapture() == hDlg)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//Do we track the mouse for panning\r\n\t\t\t\t\t\tPOINT newpos;\r\n\t\t\t\t\t\tGetCursorPos(&newpos); //Get mouse pos in screen coords\r\n\r\n\t\t\t\t\t\t//Calculate new offset values\r\n\t\t\t\t\t\tsetPreviewOffset(previewOffsetXTrackingStart - (newpos.x - mouseDownPos.x),\r\n\t\t\t\t\t\t\t                            previewOffsetYTrackingStart - (newpos.y - mouseDownPos.y));\r\n\t\r\n\t\t\t\t\t\t//Clip offsets to bounds\r\n\t\t\t\t\t\tClipOffsetsToBounds();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Update only if mouse moved 5 pixels (otherwise lock gaps)\r\n\t\t\t\t\t\tif ((abs(mouseOldpos.x - newpos.x) > getMouseStep()) || (abs(mouseOldpos.y - newpos.y) > getMouseStep()))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmouseOldpos = newpos;\r\n\t\t\t\t\t\t    updatePreviewBuffer();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\tcase WM_LBUTTONUP:\r\n\t\t\t\t\t//Stop mouse tracking\r\n\t\t\t\t\tif (GetCapture() == hDlg)\r\n\t\t\t\t\t\tReleaseCapture();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\tcase WM_CAPTURECHANGED:\r\n\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t//Issue a redraw for these areas\r\n\t\t\t\t\tInvalidatePreviews(false);\r\n                    break; \r\n\r\n\t\tcase WM_MOUSEWHEEL:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//Zoom in/out using mouse wheel, update value and text\r\n\t\t\t\t        float prevZoom = getCurrentZoom();\r\n\t\t\t\t\t\tfloat zDelta = GET_WHEEL_DELTA_WPARAM(wParam);\r\n\t\t\t\t\t\tfloat newZoom = float(prevZoom * pow(1.05, zDelta / WHEEL_DELTA));\r\n\t\t\t\t\t\tnewZoom =clampGeneral(newZoom, 0.05f, 4.f);\r\n\t\t\t\t\t\tzoomImage(prevZoom, newZoom);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\tcase WM_HSCROLL:\r\n\t\tcase WM_VSCROLL:\r\n\t\t\tswitch(LOWORD(wParam))\r\n\t\t\t{\r\n\t\t\tcase SB_ENDSCROLL:\r\n\t\t\tcase SB_THUMBPOSITION:\r\n\t\t\tcase SB_THUMBTRACK:\r\n\t\t\t\tif (auto slider = GetDlgItem(hDlg, IDC_EXPOSURE_SLIDER))\r\n\t\t\t\t{\r\n\t\t\t\t\tauto pos = SendMessage(slider, TBM_GETPOS, 0, 0);\r\n\t\t\t\t\tfloat v = float(pow(2, pos * 0.01));\r\n\t\t\t\t\tif (globalParams->exposure != v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tglobalParams->exposure = v;\r\n\t\t\t\t\t\tupdatePreviewBuffer();\r\n\t\t\t\t\t\tInvalidatePreviews(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n \t\tdefault:\r\n\t\t\treturn  FALSE;\r\n\t}\r\n\r\n    return  TRUE;\r\n}\r\n\r\n// static callback for DialogBoxParam\r\nINT_PTR WINAPI PreviewDialog::PreviewProc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam)   // Win32 Change\r\n{\r\n\tPreviewDialog *previewDialog = NULL; \r\n\tif (wMsg == WM_INITDIALOG)\r\n\t{\r\n\t\tpreviewDialog = reinterpret_cast<PreviewDialog *>(lParam);\r\n\t\tpreviewDialog->hDlg = hwnd;\r\n\t\tSetWindowLongPtr(hwnd, DWLP_USER, reinterpret_cast<LONG_PTR>(previewDialog));\r\n\t}\r\n\telse if (hwnd)\r\n\t{\r\n\t\tpreviewDialog = reinterpret_cast<PreviewDialog *>(GetWindowLongPtr(hwnd, DWLP_USER));\r\n\t}\r\n\r\n\tif (previewDialog)\r\n\t\treturn previewDialog->WindowProc(wMsg, wParam, lParam);\r\n\r\n\treturn 0;\r\n}\r\n\r\n//Show the UI dialog\r\nvoid PreviewDialog::Modal()\r\n{\r\n\t//If not enought layers for cubemaps preview exit\r\n\tif ((globalParams->TextureTypeIndex == TextureTypeEnum::CUBEMAP_LAYERS) && plugin->GetLayerCount() < 6)\r\n\t{\r\n\t\terrorMessage(\"Cubemap has not enough layers available. Consult the documentation (question mark next to the TextureType drop down) on how to create cubemaps\", \"Preview Error\");\r\n\t\treturn;\r\n\t}\r\n\t\t\r\n\tDialogBoxParam(GetDLLInstance(),\r\n\t\t           MAKEINTRESOURCE( IDD_PREVIEW ),\r\n\t\t\t\t\tGetActiveWindow(),\r\n\t\t\t\t\tPreviewProc,\r\n\t\t\t\t\treinterpret_cast<LPARAM>(this));\r\n}\r\n"
  },
  {
    "path": "IntelCompressionPlugin/PreviewDialog.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#pragma once\r\n\r\n#include \"IntelPlugin.h\"\r\n\r\n#include <vector>\r\n#include <list>\r\n\r\nclass ScalableOrdinate\r\n{\r\n\tdouble anchor;\t// 0 = left/top, 1 =  right/bottom\r\n\tdouble offset;\t// simple offset to add\r\n\r\npublic:\r\n\tScalableOrdinate() { anchor = offset = 0; }\r\n\r\n\tdouble Get(double lo, double hi) const\r\n\t{\r\n\t\treturn lo * (1-anchor) + hi * anchor + offset;\r\n\t}\r\n\r\n\tvoid Set(double _anchor, double _offset)\r\n\t{\r\n\t\tanchor = _anchor;\r\n\t\toffset = _offset;\r\n\t}\r\n\r\n\tvoid Set(double lo, double hi, double v)\r\n\t{\r\n\t\tanchor = (v - lo) / (hi - lo);\r\n\t\toffset = 0;\r\n\r\n\t\t\t// auto select segment to pin to here\r\n\t\tif (anchor > 0.6666)\r\n\t\t\tanchor = 1;\r\n\t\telse if (anchor > 0.33333)\r\n\t\t\tanchor = 0.5;\r\n\t\telse\r\n\t\t\tanchor = 0;\r\n\r\n\t\tSet(lo, hi, anchor, v);\r\n\t}\r\n\r\n\tvoid Set(double lo, double hi, double _anchor, double v)\r\n\t{\r\n\t\tanchor = _anchor;\r\n\t\toffset = v - (lo * (1-anchor) + hi * anchor);\r\n\t}\r\n};\r\n\r\nclass ScalableRect\r\n{\r\n\tScalableOrdinate left, top, right, bottom;\r\npublic:\r\n\tvoid Set(const RECT& parent, const RECT& rc)\r\n\t{\r\n\t\tleft.Set(parent.left, parent.right, rc.left);\r\n\t\tright.Set(parent.left, parent.right, rc.right);\r\n\t\ttop.Set(parent.bottom, parent.top, rc.top);\r\n\t\tbottom.Set(parent.bottom, parent.top, rc.bottom);\r\n\t}\r\n\tScalableRect(const RECT& parent, const RECT& rc)\t// construct\r\n\t{\r\n\t\tSet(parent, rc);\r\n\t}\r\n\r\n\tRECT Get(const RECT& parent) const\r\n\t{\r\n\t\tRECT rc;\r\n\t\trc.left = int(left.Get(parent.left, parent.right));\r\n\t\trc.right = int(right.Get(parent.left, parent.right));\r\n\t\trc.top = int(top.Get(parent.bottom, parent.top));\r\n\t\trc.bottom = int(bottom.Get(parent.bottom, parent.top));\r\n\t\treturn rc;\r\n\t}\r\n};\r\n\r\n\r\nclass PreviewDialog \r\n{\r\nprivate:\r\n\tHWND hDlg;\r\n\tstd::list<std::pair<HWND, ScalableRect>> scaledPositions;\r\n\r\n\t//Structure for representing Compression pairs for the Preview Combo box\r\n\tstruct CompressModesStruct\r\n\t{\r\n\t\tDXGI_FORMAT format;\r\n\t\tstd::string formatName;\r\n\t\tbool fast;\r\n\t\r\n\t\tCompressModesStruct(DXGI_FORMAT format_, std::string formatname_, bool fast_) : format(format_), formatName(formatname_), fast(fast_) { }\r\n\t};\r\n\r\n\t//All available preview compression options for the texture type defined in gGlobalParams->TextureTypeIndex\r\n\tstd::vector<CompressModesStruct>  compressionModesTable_;\r\n\r\n\t//Pointer to photoshop API\r\n\r\n\tIntelPlugin* plugin;\r\n    IntelPlugin::Globals* globalParams;              \r\n\tconst FormatRecord* formatRecord;\t// data about the source image from photoshop (caution!)\r\n\r\n\t//Areas in client space where the image proxies are located\r\n\tRECT     previewProxyRect;\r\n\tRECT     previewProxyCompressedRect;\r\n\r\n\t//Size of image displayed in preview buffer. \r\n\t//Normaly the preview are, except when the image (or the zoomed image) is smaller than the preview area. \r\n\tint      previewBufferWidth;\r\n\tint      previewBufferHeight;\r\n\r\n\t//Preview buffer, just the size of the preview area\r\n\tuint8_t  *previewBuffer;\r\n\tuint8_t  *previewCompressedBuffer;\r\n\r\n\t//Stores width,height of preview area, convenience variable\r\n\tPOINT previewAreaDimensions;\r\n\tPOINT previewDimensions;\r\n\r\n\t//Zoom scale of original image. 100%=1\r\n\tfloat previewZoom;\r\n\r\n\t//Offset of small preview area into larger 100% image buffer, used for panning\r\n\tint  previewOffsetX;\r\n\tint  previewOffsetY;\r\n\t\r\n\tint  previewSpecificChannel; //-1=RGB,0=R,1=G,2=B,3=A\r\n\tint  previewPlanes;          //Default is RGB=3\r\n\r\n\tstatic void RelativeScale(HWND hwnd, HWND parent_hwnd, float maxDimension,int minWidth);\r\n\tstatic BOOL CALLBACK WndEnumProc(HWND, LPARAM);\r\n\tstatic INT_PTR WINAPI PreviewProc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam);\r\n\tBOOL WindowProc(UINT wMsg, WPARAM wParam, LPARAM lParam);\r\n\r\n\t//Preview Optimization parameters\r\n\tint pixelStep;\r\n\tint mouseStep;\r\n\r\n\r\npublic:\r\n\r\n\t//Getter/Setters\r\n\tvoid setPreviewSpecificChannel(int channel) { previewSpecificChannel=channel;}\r\n\tvoid getPreviewOffset(int &X, int &Y)       { X = previewOffsetX; Y=previewOffsetY;}\r\n\tvoid setPreviewOffset(int X, int Y)         { previewOffsetX = X; previewOffsetY = Y;}\r\n    float getCurrentZoom()                      { return previewZoom; }\r\n\tint   getMouseStep()                        { return mouseStep;}\r\n\tbool IsSelectedEncodingDifferent(int index);\r\n\tvoid SetGlobalEncoding(int index);\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t//Allocate preview buffer for this proxy area\r\n\tvoid allocateBuffers();\r\n\t\r\n\t//Show main UI\r\n\tvoid Modal();\r\n\r\n\t//First function to call\r\n\tvoid Init();\r\n\t\r\n\tbool ConvertToUncompressedPreviewTo8Bit(unsigned8 *tgtDataPtr, DirectX::ScratchImage *srcDataPtr, int index);\r\n\tvoid UpdateZoomText();\r\n\tvoid InvalidatePreviews(bool redraw);\r\n\tvoid ClipOffsetsToBounds();\r\n\tvoid ClipPreviewOffset(float previousZoom);\r\n\tbool CalculateBounds();\r\n\tvoid updatePreviewBuffer();\r\n\tvoid PaintProxy();\r\n\tvoid zoomImage(float previousZoom, float currentZoom);\r\n\tvoid FillCompressionCombo();\r\n\tvoid InitPreviewComboBox();\r\n\tvoid zoomToFit();\r\n\tvoid UpdateSizeText();\r\n\tstd::string DisplayHumanReadable(int sizeInBytes);\r\n\tvoid CalculateOptimizationParameters(int width, int height);\r\n\r\n\r\n\texplicit  PreviewDialog(IntelPlugin* plugin);\r\n\t~PreviewDialog();\r\n};"
  },
  {
    "path": "IntelCompressionPlugin/SaveOptionsDialog.cpp",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <vector>\r\n#include <list>\r\n#include <sstream>\r\n#include <fstream>\r\n#include \"PIUFile.h\"\r\n#include \"SaveOptionsDialog.h\"\r\n#include \"IntelPluginName.h\"\r\n#include \"IntelPlugin.h\"\r\n#include \"IntelPluginUIWin.h\"\r\n#include \"resource.h\"\r\n#include \"PreviewDialog.h\"\r\n\r\ntypedef vector<string>(*VStringFunc)(void);\r\n\r\n// Container for the data to associate a help button WinForm ID with the corresponding function to display the help text.\r\ntypedef struct {\r\n\tconst int itemNum;\t\t// WinForm ID of the help button\r\n\tVStringFunc func;\t\t// Function to call to get the help text to display\r\n} HelpButtonAndTextFunc;\r\n\r\n// Struct to associate the Dropdown list WinForm ID with the Context Text WinForm ID\r\n//  so we know where to display the context info when the user picks a different dropdown list item.\r\ntypedef struct {\r\n\tconst int itemNum;\t\t\t// DropDown list WinForm ID\r\n\tconst int contextItemNum;\t// Context Text WinForm ID.\r\n} ComboAndContextStringID;\r\n\r\nvector<string> GetCompressionHelpText(void);\t// Helper functions to specify the text for the help button (?) next to various UI elements\r\nvector<string> GetTextureTypeHelpText(void);\r\nvector<string> GetPreCompressOpsHelpText(void);\r\nvector<string> GetMipMapsHelpText(void);\r\n\r\n\r\nHelpButtonAndTextFunc const helpButtonTextItem[] = {\r\n\t{ IDC_COMPRESSION_HELP, GetCompressionHelpText },\r\n\t{ IDC_TEXTURETYPE_HELP, GetTextureTypeHelpText },\r\n\t{ IDC_PRECOMPRESS_HELP, GetPreCompressOpsHelpText },\r\n\t{ IDC_MIPMAP_HELP, GetMipMapsHelpText }\r\n};\r\n\r\n// The list of associations.\r\nComboAndContextStringID const gComboContextItems[] = {\r\n\t{ IDC_COMPRESSION_COMBO, IDC_COMPRESSION_HINT },\r\n\t{ IDC_TEXTURETYPE_COMBO, IDC_TEXTURETYPE_HINT },\r\n\t{ IDC_MIPMAP_COMBO, IDC_MIPMAPS_HINT }\r\n};\r\n\r\n#if !__LP64__\r\n\r\n\r\nOptionsDialog::OptionsDialog(IntelPlugin* plugin_) : PIDialog()  \r\n{ \r\n\tplugin = plugin_;\r\n\tglobalParams = plugin->GetData();\r\n\tmPathToPresetDirectory.clear();\r\n\tMaxMipLevel =static_cast<int>(1 + floor(Log2(max((plugin->GetFormatRecord()->imageSize.h),(plugin->GetFormatRecord()->imageSize.v))))); \r\n\r\n\t/*Get path to Local per user configuration files, %USERPROFILE%\\\\AppData\\Local\\\\Intel\\\\PhotoshopDDSPlugin\\\\ */ \r\n\twchar_t* localAppData = 0;\r\n    HRESULT hr = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &localAppData);\r\n\r\n\t//Path exists\r\n\tif (SUCCEEDED(hr))\r\n\t{\r\n\t\t//Convert wide char to char, append name of directory\r\n  \t\tchar str[MAX_PATH+1] = {};\r\n\t\twcstombs(str, localAppData, MAX_PATH);\r\n\t\tCoTaskMemFree(static_cast<void*>(localAppData));\r\n\r\n\t\tmPathToPresetDirectory = str;\r\n\t\t\t\r\n\t\t//Free mem\r\n\r\n\t\t//Create directory if does not exist\r\n\t\tmPathToPresetDirectory.append(\"\\\\Intel\");\r\n\t\tif (CreateDirectory(mPathToPresetDirectory.c_str(), NULL) ||  ERROR_ALREADY_EXISTS == GetLastError())\r\n\t\t{\r\n\t\t\tmPathToPresetDirectory.append(\"\\\\PhotoshopDDSPlugin\\\\\");\r\n\t\t\tif (!(CreateDirectory(mPathToPresetDirectory.c_str(), NULL) ||  ERROR_ALREADY_EXISTS == GetLastError()))\r\n\t\t\t{\r\n\t\t\t\t\t// Failed to create directory.\r\n\t\t\t\t\tplugin->UserError(\"Failed to Create Presets Directory\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t\t// Failed to create directory.\r\n\t\t\t\tplugin->UserError(\"Failed to Create Presets Directory\");\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\t// Failed to create directory.\r\n\t\tplugin->UserError(\"Failed to get path to %USERPROFILE%\\\\AppData\\\\Local\");\r\n\t}\r\n}\r\n\r\n// Calculates log2 of number.  \r\ndouble OptionsDialog::Log2( double n )  \r\n{  \r\n    // log(n)/log(2) is log2.  \r\n    return log( n ) / log( 2. );  \r\n}\r\n\r\n// ===========================================================================\r\nbool OptionsDialog::LoadPresetNonUIMode(string nameOfPreset)\r\n{\r\n\t//If not presets directory return with error\r\n\tif (mPathToPresetDirectory.empty())\r\n\t\treturn false;\r\n\t\r\n\t//Initialize with defaults\r\n\tInitDataNoPreset(mDialogData);\r\n\r\n\t//This loads all the settings and the last-used setting\r\n\tLoadPresets();\r\n\t\r\n\tInitDataFromPreset(nameOfPreset);\r\n\r\n\tInitComboItems();\r\n\r\n\treturn true;\r\n}\r\n\r\n// ===========================================================================\r\n//Fill global plugin struct with UI data\r\nvoid OptionsDialog::FillGlobalStruct()\r\n{\r\n\t//Get the compressionType from the CompressionTypeComboBox, the combo box always has the list of the valid types\r\n\t//The itemUserData has the actual compression enumeration defined in IntelPlugin.h for a given combo box entry\r\n\tint copressionTypeID =  gComboItems[COMPRESSION_COMBO].itemAndContextStrings[mDialogData.CompressionTypeIndex].itemUserData;\r\n\r\n\tswitch (copressionTypeID)\r\n\t\t{\r\n\t\t\tcase CompressionTypeEnum::BC1:globalParams->encoding_g = DXGI_FORMAT_BC1_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC1_SRGB:globalParams->encoding_g = DXGI_FORMAT_BC1_UNORM_SRGB;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC3:globalParams->encoding_g = DXGI_FORMAT_BC3_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC3_SRGB:globalParams->encoding_g = DXGI_FORMAT_BC3_UNORM_SRGB;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC6H_FAST:globalParams->encoding_g = DXGI_FORMAT_BC6H_UF16; \r\n\t\t\t\tglobalParams->fast_bc67 = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC6H_FINE:globalParams->encoding_g = DXGI_FORMAT_BC6H_UF16;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC7_FAST:globalParams->encoding_g = DXGI_FORMAT_BC7_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC7_FINE:globalParams->encoding_g = DXGI_FORMAT_BC7_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC7_SRGB_FAST:globalParams->encoding_g = DXGI_FORMAT_BC7_UNORM_SRGB;\r\n\t\t\t\tglobalParams->fast_bc67 = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC7_SRGB_FINE:globalParams->encoding_g = DXGI_FORMAT_BC7_UNORM_SRGB;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC4:globalParams->encoding_g = DXGI_FORMAT_BC4_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::BC5:globalParams->encoding_g = DXGI_FORMAT_BC5_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CompressionTypeEnum::UNCOMPRESSED:globalParams->encoding_g = DXGI_FORMAT_R8G8B8A8_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: globalParams->encoding_g = DXGI_FORMAT_BC1_UNORM;\r\n\t\t\t\tglobalParams->fast_bc67 = false;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tglobalParams->TextureTypeIndex = mDialogData.TextureTypeIndex; //Col,Col+alpha,CubeFrmLayera,CubefromCross,NM\r\n\t\tglobalParams->MipMapTypeIndex  = mDialogData.MipMapTypeIndex;  //None,Autogen,FromLayers\r\n\t\tglobalParams->MipLevel      = mDialogData.MipLevel;\t\t\t   // only valid if SetMipLevel == true\r\n\t\tglobalParams->SetMipLevel   = mDialogData.SetMipLevel;\r\n\t\tglobalParams->Normalize     = mDialogData.Normalize;\r\n\t\tglobalParams->FlipX         = mDialogData.FlipX;\r\n\t\tglobalParams->FlipY         = mDialogData.FlipY;\r\n\r\n\t\t//presetBatchName is a PString (first byte is the size), convert C to PString\r\n\t\tCToPStr(mDialogData.PresetName.c_str(), reinterpret_cast<char *>(globalParams->presetBatchName));\r\n}\r\n\r\n//Fill UI data struct with global plugin struct\r\nvoid OptionsDialog::GetGlobalStruct()\r\n{\r\n\tint CompressionTypeIndex=0;\r\n\tCompressionTypeEnum compressionID;\r\n\t\r\n\t//Find compression ID.\r\n\tswitch (globalParams->encoding_g)\r\n\t{\r\n\t\tcase DXGI_FORMAT_BC1_UNORM:\r\n\t\t\tcompressionID = CompressionTypeEnum::BC1;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC1_UNORM_SRGB: \r\n\t\t\tcompressionID = CompressionTypeEnum::BC1_SRGB;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC3_UNORM:      \r\n\t\t\tcompressionID = CompressionTypeEnum::BC3;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC3_UNORM_SRGB: \r\n\t\t\tcompressionID = CompressionTypeEnum::BC3_SRGB;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC6H_UF16:\r\n\t\t\tif (globalParams->fast_bc67)\r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC6H_FAST;\r\n\t\t\telse \r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC6H_FINE;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC7_UNORM:\r\n\t\t\tif (globalParams->fast_bc67)\r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC7_FAST;\r\n\t\t\telse\r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC7_FINE;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC7_UNORM_SRGB:\r\n\t\t\tif (globalParams->fast_bc67)\r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC7_SRGB_FAST;\r\n\t\t\telse\r\n\t\t\t\tcompressionID = CompressionTypeEnum::BC7_SRGB_FINE;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC4_UNORM:\r\n\t\t\tcompressionID = CompressionTypeEnum::BC4;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_BC5_UNORM:\r\n\t\t\tcompressionID = CompressionTypeEnum::BC5;\r\n\t\t\tbreak;\r\n\t\tcase DXGI_FORMAT_R8G8B8A8_UNORM:\r\n\t\t\tcompressionID = CompressionTypeEnum::UNCOMPRESSED;\r\n\t\t\tbreak;\r\n\t\tdefault: compressionID = CompressionTypeEnum::BC1;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\t//Iteration over all available compression for this texture type and find the compression combobox index.\r\n\t//Compression types which are not available are not show in the combo box, therefore the index is not incremented if matrix is false\r\n\tfor (int i=0; i<CompressionTypeEnum::COMPRESSION_TYPE_COUNT; i++)\r\n\t{\r\n\t\t//If this compression mode is available for this texture type\r\n\t\tif (IntelPlugin::IsCombinationValid(globalParams->TextureTypeIndex, static_cast<CompressionTypeEnum>(i)))\r\n\t\t{\r\n\t\t\t//If its the selected encoding and this encoding is available then break out\r\n\t\t\tif (i == compressionID )\r\n\t\t\t\tbreak;\r\n\t\t\r\n\t\t\tCompressionTypeIndex++;\r\n\t\t}\r\n\t}\r\n\r\n\tmDialogData.CompressionTypeIndex = CompressionTypeIndex;\r\n\tmDialogData.TextureTypeIndex = globalParams->TextureTypeIndex;  //Col,Col+alpha,CubeFrmLayera,CubefromCross,NM\r\n\tmDialogData.MipMapTypeIndex  = globalParams->MipMapTypeIndex;   //None,Autogen,FromLayers\r\n\tmDialogData.MipLevel         = globalParams->MipLevel;\t\t\t// only valid if SetMipLevel == true\r\n\tmDialogData.SetMipLevel   = globalParams->SetMipLevel;\r\n\tmDialogData.Normalize     = globalParams->Normalize;\r\n\tmDialogData.FlipX         = globalParams->FlipX;\r\n\tmDialogData.FlipY         = globalParams->FlipY;\r\n}\r\n\r\n// ===========================================================================\r\n\r\n//Fills in Combo items structures for Presets, Compression, Textype, and MipMap generation\r\n//fills control id, startindex and strings\r\nvoid OptionsDialog::InitComboItems()\r\n{\r\n\tgComboItems.reserve(NUMBEROF_COMBOS);\r\n\r\n\tgComboItems.push_back(ComboData(IDC_PRESET_COMBO));\r\n\tGetPresetNames(gComboItems[PRESETS_COMBO]);\r\n\r\n\tgComboItems.push_back(ComboData(IDC_COMPRESSION_COMBO));\r\n\tGetCompressionNames(gComboItems[COMPRESSION_COMBO]);\r\n\r\n\tgComboItems.push_back(ComboData(IDC_TEXTURETYPE_COMBO));\r\n\tGetTextureTypeNames(gComboItems[TEXTURETYPE_COMBO]);\r\n\r\n\tgComboItems.push_back(ComboData(IDC_MIPMAP_COMBO));\r\n\tGetMipMapNames(gComboItems[MIPMAP_COMBO]);\r\n}\r\n\r\n// ===========================================================================\r\n\r\n// Scan the %USERPROFILE%\\\\AppData\\Local\\\\Intel\\\\PhotoshopDDSPlugin\\\\ folder to find .preset files and reads them in as preset data to populate the Presets dialog.\r\nvoid OptionsDialog::LoadPresets(void)\r\n{\r\n\tmPresets.clear();\r\n\t\r\n\t//List all prest files \r\n\tstring fullPath = mPathToPresetDirectory+\"*.preset\";\r\n\r\n\t// Find the first file in the directory.\r\n\tWIN32_FIND_DATA ffd;\r\n\tHANDLE hFind = FindFirstFile(fullPath.c_str(), &ffd);\r\n\r\n\tif (INVALID_HANDLE_VALUE == hFind)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Walk the list of files in the dir that match our pattern and add the names to our list, skipping  the 'none' preset file (handled separately).\r\n\tlist<string> fileNames;\r\n\r\n\tdo\r\n\t{\r\n\t\tif (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))\r\n\t\t{\r\n\t\t\tstring fname(ffd.cFileName);\r\n\t\t\tfileNames.push_back(fname);\r\n\t\t}\r\n\r\n\t} while (FindNextFile(hFind, &ffd) != 0);\r\n\r\n\r\n\tDWORD dwError = GetLastError();\r\n\tif (dwError != ERROR_NO_MORE_FILES)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\tFindClose(hFind);\r\n\r\n\t// Now, read the rest of the files and load up the presets menu with them.\r\n\tfor (auto it = fileNames.begin(); it != fileNames.end(); ++it)\r\n\t{\r\n\t\tstring presetPath = mPathToPresetDirectory + *it;\r\n\t\tReadPreset(presetPath);\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n\r\n//Fills in the DialogData structs which are stored in the mPresets array\r\nvoid OptionsDialog::ReadPreset(string fname)\r\n{\r\n\tifstream fileIn;\r\n\tfileIn.open(fname);\r\n\r\n\tif (fileIn.is_open())\r\n\t{\r\n\t\tstring line;\r\n\t\tuint32 lineNum = 0;\r\n\r\n\t\tDialogData dd;\r\n\r\n\t\tsize_t foundBSlash = fname.rfind(\"\\\\\");\r\n\t\tstring justName = fname;\r\n\r\n\t\tif (foundBSlash != string::npos)\r\n\t\t{\r\n\t\t\tjustName = fname.substr(foundBSlash+1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsize_t foundFSlash = fname.rfind(\"/\");\t// handle those other OSes.\r\n\t\t\tif (foundFSlash != string::npos)\r\n\t\t\t{\r\n\t\t\t\tjustName = fname.substr(foundFSlash+1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsize_t foundDot = justName.rfind(\".\");\r\n\r\n\t\tif (foundDot != string::npos)\r\n\t\t{\r\n\t\t\tdd.PresetName = justName.substr(0, foundDot);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdd.PresetName = justName;\r\n\t\t}\r\n\r\n\t\ttry \r\n\t\t{\r\n\t\t\twhile (getline(fileIn, line))\r\n\t\t\t{\r\n\t\t\t\tbool done = false;\r\n\t\t\t\tswitch (lineNum-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase -1: if (atoi(line.c_str()) != PRESET_FILE_VERSION)\t\t// version check\r\n\t\t\t\t\t\t\t throw std::exception();\r\n\r\n\t\t\t\t\tcase 0: dd.CompressionTypeIndex = atoi(line.c_str());    break;\r\n\t\t\t\t\tcase 1: dd.TextureTypeIndex = static_cast<TextureTypeEnum>(atoi(line.c_str()));        break;\r\n\t\t\t\t\tcase 2: dd.MipMapTypeIndex =  static_cast<MipmapEnum>(atoi(line.c_str()));         break;\r\n\t\t\t\t\tcase 3: dd.MipLevel = atoi(line.c_str());                break;\r\n\t\t\t\t\tcase 4: dd.SetMipLevel = atoi(line.c_str()) == 1;        break;\r\n\t\t\t\t\tcase 5: dd.Normalize = atoi(line.c_str()) == 1;          break;\r\n\t\t\t\t\tcase 6: dd.FlipX = atoi(line.c_str()) == 1;              break;\r\n\r\n\t\t\t\t\tcase 7: dd.FlipY = atoi(line.c_str()) == 1;\r\n\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t++lineNum;\r\n\r\n\t\t\t\tif (done)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (dd.PresetName.compare(LAST_SETTINGS_PRESET_NAME) == 0)\r\n\t\t\t{\r\n\t\t\t\tmDialogData = dd;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmPresets[dd.PresetName] = dd;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (std::exception &)\r\n\t\t{\r\n\t\t\t// bad settings read\r\n\t\t}\r\n\r\n\t\tfileIn.close();\r\n\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n// Writes the passed-in settings out to the specified file, so they'll be available as a preset next time the plugin loads.\r\n// Also updates the presets dropdown list.\r\nvoid OptionsDialog::SaveNewPreset(string presetName, DialogData dd)\r\n{\r\n\tbool fileWriteSucceeded = true;\r\n\tdd.PresetName = presetName;\r\n\r\n\t//path to new preset file\r\n\tstring fullPath = mPathToPresetDirectory + presetName + \".preset\";\r\n\r\n\tofstream fileOut;\r\n\tfileOut.open(fullPath);\r\n\t\r\n\tif (fileOut.is_open())\r\n\t{\r\n\t\tfileOut << PRESET_FILE_VERSION << \"\\n\";\r\n\t\tfileOut << dd.CompressionTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.TextureTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.MipMapTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.MipLevel << \"\\n\";\r\n\t\tfileOut << (dd.SetMipLevel ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.Normalize ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.FlipX ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.FlipY ? \"1\" : \"0\") << \"\\n\";\r\n\r\n\t\tfileOut.close();\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfileWriteSucceeded = false;\r\n\t\terrorMessage(\"Can not save \"+fullPath, \"Preset save erorr\");\r\n\t}\r\n\r\n\r\n\tif (fileWriteSucceeded)\r\n\t{\r\n\t\tif ((presetName.compare(LAST_SETTINGS_PRESET_NAME) == 0) && (!mPresets.empty()))\r\n\t\t{\r\n\t\t\t// TODO\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmPresets[presetName] = dd;\r\n\t\t}\r\n\r\n\t\t// Update the main working data\r\n\t\tInitDataFromPreset(presetName);\r\n\r\n\t\tmDialogData.PresetName = presetName;\r\n\r\n\t\t// rebuild combo items data list for presets\r\n\t\tComboData & cd = gComboItems[PRESETS_COMBO];\t\t\r\n\t\tcd.itemAndContextStrings.clear();\r\n\t\tGetPresetNames(cd);\r\n\r\n\t\t// rebuild combobox for presets -- making sure it has the right selected item (newly created preset)\r\n\t\tInitComboFromItems(PRESETS_COMBO);\t\t\t\t\t\t\t\r\n\r\n\t\t// Update UI to reflect new Preset.\r\n\t\tSetUIFromData();\r\n\t}\r\n}\r\n\r\nvoid OptionsDialog::UpdatePreset(string presetName, DialogData dd)\r\n{\r\n\tdd.PresetName = presetName;\r\n\t\r\n\t//path to existing preset file\r\n\tstring fullPath = mPathToPresetDirectory + presetName + \".preset\";\r\n\r\n\tofstream fileOut;\r\n\tfileOut.open(fullPath);\r\n\t\r\n\t//Save change into preset file\r\n\tif (fileOut.is_open())\r\n\t{\r\n\t\tfileOut << PRESET_FILE_VERSION << \"\\n\";\r\n\t\tfileOut << dd.CompressionTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.TextureTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.MipMapTypeIndex << \"\\n\";\r\n\t\tfileOut << dd.MipLevel << \"\\n\";\r\n\t\tfileOut << (dd.SetMipLevel ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.Normalize ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.FlipX ? \"1\" : \"0\") << \"\\n\";\r\n\t\tfileOut << (dd.FlipY ? \"1\" : \"0\") << \"\\n\";\r\n\r\n\t\tfileOut.close();\r\n\t}\r\n\telse\r\n\t{\r\n\t\terrorMessage(\"Can not save \"+fullPath, \"Preset save erorr\");\r\n\t}\r\n\r\n\t//Save change also into mPresets array\r\n\tmPresets[presetName] = dd;\r\n}\r\n\r\n// ===========================================================================\r\n// Remove a preset from the list and delete the .preset file for it.\r\nvoid OptionsDialog::DeletePreset(string presetName)\r\n{\r\n\tif (mPresets.erase(presetName))\r\n\t{\r\n\t\t// rebuild combo items data list for presets\r\n\t\tComboData & cd = gComboItems[PRESETS_COMBO];\r\n\t\tcd.itemAndContextStrings.clear();\r\n\t\tGetPresetNames(cd);\r\n\r\n\t\t// rebuild combobox for presets -- making sure it has the right selected item (newly created preset)\r\n\t\tInitComboFromItems(PRESETS_COMBO);\r\n\r\n\t\t// Update UI to reflect new Preset.\r\n\t\tSetUIFromData();\r\n\r\n\t\t//path to presets file\r\n\t\tstring fullPath = mPathToPresetDirectory + presetName + \".preset\";\r\n\r\n\t\tBOOL fileDeleted = DeleteFile(fullPath.c_str());\r\n\r\n\t\tif (!fileDeleted)\r\n\t\t{\r\n\t\t\terrorMessage(\"Can not delete \"+fullPath, \"Preset delete erorr\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n// Initialize a DialogData structure (dd) with default settings\r\nvoid OptionsDialog::InitDataNoPreset(DialogData & dd)\r\n{\r\n\tdd.PresetName = LAST_SETTINGS_PRESET_NAME;\r\n\tdd.CompressionTypeIndex = 0;\r\n\tdd.TextureTypeIndex = TextureTypeEnum::COLOR;\r\n\tdd.MipMapTypeIndex = MipmapEnum::NONE;\r\n\r\n\tdd.SetMipLevel = false;\r\n\r\n\tdd.MipLevel = 0;\r\n\r\n\tdd.Normalize = false;\r\n\tdd.FlipX = false;\r\n\tdd.FlipY = false;\r\n}\r\n\r\n// ===========================================================================\r\n// Populate the mDialogData with the UI settings from the specified Preset in mPresets.\r\nvoid OptionsDialog::InitDataFromPreset(string presetName)\r\n{\r\n\tauto item = mPresets.find(presetName);\r\n\tif (item != mPresets.end())\r\n\t\tmDialogData = item->second;\r\n}\r\n\r\n// ===========================================================================\r\n\r\n//Fill now the combo controls with the strings stored in the ComboData structs\r\nvoid OptionsDialog::InitComboFromItems(int32 comboItemsIndex)\r\n{\r\n\tComboData & cd = gComboItems[comboItemsIndex];\r\n\r\n\tPIComboBox combo = GetItem(cd.itemNum);\r\n\tcombo.Clear();\r\n\r\n\tif (!cd.itemAndContextStrings.empty())\r\n\t{\r\n\t\t//Add the description strings to the Combo box \r\n\t\tfor (size_t i = 0; i < cd.itemAndContextStrings.size(); ++i)\r\n\t\t{\r\n\t\t\tcombo.AppendItem(cd.itemAndContextStrings[i].itemText.c_str());\r\n\t\t}\r\n\r\n\t\t//Set the selected item\r\n\t\tuint32 selectedIndex = cd.startIndex;\r\n\t\tcombo.SetCurrentSelection(selectedIndex);\r\n\r\n\t\t//Iterate over only the 3 combo boxes and set the text of the according Context Control\r\n\t\t//Compression, Textype, and MipMap\r\n\t\tfor (uint32 j = 0; j < sizeof(gComboContextItems) / sizeof(ComboAndContextStringID); ++j)\r\n\t\t{\r\n\t\t\tif (cd.itemNum == gComboContextItems[j].itemNum)\r\n\t\t\t{\r\n\t\t\t\tPIText sText = GetItem(gComboContextItems[j].contextItemNum);\r\n\t\t\t\tsText.SetText(cd.itemAndContextStrings[selectedIndex].itemContextInfo);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n// Override the combo box font so as to get alignment right\r\nvoid OptionsDialog::SetFontCompressionCombo()\r\n{\r\n\tPIComboBox comboCompression = GetItem(IDC_COMPRESSION_COMBO);\r\n\tPIComboBox comboTexType = GetItem(IDC_TEXTURETYPE_COMBO);\r\n\tPIComboBox comboMipMap = GetItem(IDC_MIPMAP_COMBO);\r\n\t\r\n\tLOGFONT lf = {}; // to define the font\r\n\tlf.lfHeight = 14;\r\n\t//lf.lfWidth = ;\r\n\tlf.lfWeight = FW_NORMAL;\r\n\tlf.lfCharSet = ANSI_CHARSET;\r\n\tlf.lfOutPrecision = OUT_DEFAULT_PRECIS;\r\n\tlf.lfClipPrecision = CLIP_DEFAULT_PRECIS;\r\n\tlf.lfQuality = PROOF_QUALITY;\r\n\tlf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;\r\n\tstrcpy(lf.lfFaceName,\"Consolas\");\r\n\r\n\tif (auto hFont  = ::CreateFontIndirect(&lf))\r\n\t{\r\n\t\tSendMessage(comboCompression.GetItem(), WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);\r\n\t\tSendMessage(comboTexType.GetItem(), WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);\r\n\t\tSendMessage(comboMipMap.GetItem(), WM_SETFONT, reinterpret_cast<WPARAM>(hFont), TRUE);\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n// Main initialization of the UI - Load the preset files, build out the programmatically populated UI items, and set the initial UI state.\r\nvoid OptionsDialog::Init(void)\r\n{\r\n\t//Set window name\r\n\tstring windowTitle = DDSExporterPluginName;\r\n\twindowTitle += DDSExporterPluginVersion;\r\n\tSetWindowText(GetDialog(), windowTitle.c_str());\r\n\r\n\t//If not presets directory return with error\r\n\tif (mPathToPresetDirectory.empty())\r\n\t\treturn;\r\n\t\r\n\tInitDataNoPreset(mDialogData);\t// sets defaults, may be overridden in next call\r\n\r\n\tLoadPresets();\r\n\r\n\t\r\n\t//Fills in gComboItems array for Presets, Compression, Textype, and MipMap generation\r\n\tInitComboItems();\r\n\r\n\t//Now fill in Combo boxes  with text and the correxponding context controls with text\r\n\tfor (int32 i = 0; i < gComboItems.size(); ++i)\r\n\t{\r\n\t\tInitComboFromItems(i);\r\n\t}\r\n\r\n\t// Override the combo box font so as to get alignment right\r\n\tSetFontCompressionCombo();\r\n\r\n\tPICheckBox setMipLevel = GetItem(IDC_CUBEMIPLEVEL_CHECK);\r\n\tsetMipLevel.SetChecked(mDialogData.SetMipLevel);\r\n\r\n\t//Fill in the miplevel selector for cube maps\r\n\tif (mDialogData.SetMipLevel)\r\n\t{\r\n\t\tPopulateMipLevelsCombo();\r\n\t}\r\n\telse\r\n\t{\r\n\t\tPIComboBox mipLevelCombo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\t\tmipLevelCombo.Clear();\r\n\t}\r\n\t\r\n\tPICheckBox normalizeCheck = GetItem(IDC_NORMALIZE_CHECK);\r\n\tnormalizeCheck.SetChecked(mDialogData.Normalize);\r\n\r\n\tPICheckBox flipXCheck = GetItem(IDC_FLIPX_CHECK);\r\n\tflipXCheck.SetChecked(mDialogData.FlipX);\r\n\r\n\tPICheckBox flipYCheck = GetItem(IDC_FLIPY_CHECK);\r\n\tflipYCheck.SetChecked(mDialogData.FlipY);\r\n\r\n\t//Disable any controls they do not apply based on the choosen texture type\r\n\tDisableUnavailableControls();\r\n}\r\n\r\n// ===========================================================================\r\n// Update the UI state based on the current state of the current mDialogData struct.\r\nvoid OptionsDialog::SetUIFromData()\r\n{\r\n\t//Change entries in compression/mipmap combo based on texture type\r\n    UpdateCompressionCombo();\r\n\tUpdateMipMapCombo();\r\n\r\n\t//Initialize compression combo from mDialogData.CompressionTypeIndex\r\n\tPIComboBox CompressionCombo = GetItem(IDC_COMPRESSION_COMBO);\r\n\tCompressionCombo.SetCurrentSelection(mDialogData.CompressionTypeIndex);\r\n\t//Update context string based on selected entry\r\n\tSetContextString(IDC_COMPRESSION_HINT, IDC_COMPRESSION_COMBO);\r\n\r\n\t//Initialize texture type combo from mDialogData.TextureTypeIndex\r\n\tPIComboBox TextureTypeCombo = GetItem(IDC_TEXTURETYPE_COMBO);\r\n\tTextureTypeCombo.SetCurrentSelection(mDialogData.TextureTypeIndex);\r\n\t//Update context string based on selected entry\r\n\tSetContextString(IDC_TEXTURETYPE_HINT, IDC_TEXTURETYPE_COMBO);\r\n\r\n\t//Initialize mip map creation combo from mDialogData.MipMapTypeIndex\r\n\tPIComboBox MipMapCombo = GetItem(IDC_MIPMAP_COMBO);\r\n\tMipMapCombo.SetCurrentSelection(mDialogData.MipMapTypeIndex);\r\n\t//Update context string based on selected entry\r\n\tSetContextString(IDC_MIPMAPS_HINT, IDC_MIPMAP_COMBO);\r\n\r\n\r\n\tPICheckBox mipLevelCheck = GetItem(IDC_CUBEMIPLEVEL_CHECK);\r\n\tbool wasMipLevelChecked = mipLevelCheck.GetChecked();\r\n\tmipLevelCheck.SetChecked(mDialogData.SetMipLevel);\r\n\r\n\tif (wasMipLevelChecked && !mDialogData.SetMipLevel)\r\n\t{\r\n\t\tPIComboBox MipMapLevelCombo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\t\tMipMapLevelCombo.Clear();\r\n\t}\r\n\telse if (!wasMipLevelChecked && mDialogData.SetMipLevel)\r\n\t{\r\n\t\tPopulateMipLevelsCombo();\r\n\t}\r\n\telse if (wasMipLevelChecked && mDialogData.SetMipLevel)\r\n\t{\r\n\t\tPIComboBox MipMapLevelCombo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\t\tMipMapLevelCombo.SetCurrentSelection(mDialogData.MipLevel);\r\n\t}\r\n\r\n\tPICheckBox NormalizeCheckBox = GetItem(IDC_NORMALIZE_CHECK);\r\n\tNormalizeCheckBox.SetChecked(mDialogData.Normalize);\r\n\r\n\tPICheckBox FlipXCheckBox = GetItem(IDC_FLIPX_CHECK);\r\n\tFlipXCheckBox.SetChecked(mDialogData.FlipX);\r\n\r\n\tPICheckBox FlipYCheckBox = GetItem(IDC_FLIPY_CHECK);\r\n\tFlipYCheckBox.SetChecked(mDialogData.FlipY);\r\n\r\n\r\n\t//Disable any controls they do not apply based on the choosen texture type\r\n\tDisableUnavailableControls();\r\n}\r\n\r\n// ===========================================================================\r\n\r\n// Called whenever user interacts with the UI - clicks a button or ticks a check box, selects a dropdown, etc.\r\n//parameters index: has the resource index of the control acted upon.\r\nvoid OptionsDialog::Notify(int index)\r\n{\r\n\t//Shows MessageBox for help [?] buttons. Index into array and get function which return strings to display\r\n\tfor (uint32 i = 0; i < sizeof(helpButtonTextItem) / sizeof(HelpButtonAndTextFunc); ++i)\r\n\t{\r\n\t\tif (index == helpButtonTextItem[i].itemNum)\r\n\t\t{\r\n\t\t\tvector<string> captionAndText = helpButtonTextItem[i].func();\r\n\r\n\t\t\tMessageBox(GetActiveWindow(), captionAndText[0].c_str(), captionAndText[1].c_str(), 0);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t//One of the Combo boxes was changed, update context string\r\n\tfor (uint32 i = 0; i < sizeof(gComboContextItems) / sizeof(ComboAndContextStringID); ++i)\r\n\t{\r\n\t\tif (index == gComboContextItems[i].itemNum)\r\n\t\t{\r\n\t        //Update context string based on selected entry\r\n\t\t\tSetContextString(gComboContextItems[i].contextItemNum, index);\r\n\t\t\tbreak;\t\t// no return - want this to fall through to the end block that backs up the change.\r\n\t\t}\r\n\t}\r\n\r\n\tif (index == IDC_CUBEMIPLEVEL_CHECK)\r\n\t{\r\n\t\tPICheckBox mipLevelCheck = GetItem(IDC_CUBEMIPLEVEL_CHECK);\r\n\r\n\t\tif (mipLevelCheck.GetChecked())\r\n\t\t{\r\n\t\t\tPopulateMipLevelsCombo();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tPIComboBox mipLevelCombo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\t\t\tmipLevelCombo.Clear();\r\n\t\t}\r\n\t\t// no return - want this to fall through to the end block that backs up the change.\r\n\t}\r\n\t\r\n\t//Change preset, preset combo whas changed\r\n\tif (index == IDC_PRESET_COMBO)\r\n\t{\r\n\t\tPIComboBox presetCombo = GetItem(IDC_PRESET_COMBO);\r\n\t\tstring selectedItem;\r\n\r\n\t\t//if (command == CBN_SELCHANGE)\r\n\t\t{\r\n\t\t\t//Get the string entry of the selected item in the combo box\r\n\t\t\tpresetCombo.GetCurrentSelection(selectedItem);\r\n\r\n\t\t\t//Did we select a different preset\r\n\t\t\tif (selectedItem.compare(mDialogData.PresetName) != 0)\r\n\t\t\t{\r\n\t\t\t\t//Store changes in current preset before swapping\r\n\t\t\t\t\r\n#ifdef AUTO_SAVE_PRESETS\r\n\t\t\t\tUpdatePreset(mDialogData.PresetName, mDialogData);\r\n#endif\r\n\r\n\t\t\t\t//Load new data in struct\r\n\t\t\t\tInitDataFromPreset(selectedItem);\r\n\r\n\t\t\t\t//Update UI from struct\r\n\t\t\t\tSetUIFromData();\r\n\t\t\t\r\n\t\t\t\t// If we want a callback or notify that a preset has changed, here is where to place that call.\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (index == IDC_PRESETDELETE_BUTTON)\r\n\t{\r\n\t\tPIComboBox presetCombo = GetItem(IDC_PRESET_COMBO);\r\n\t\tstring selectedPreset;\r\n\t\tpresetCombo.GetCurrentSelection(selectedPreset);\r\n\r\n\t\tif (selectedPreset.compare(LAST_SETTINGS_PRESET_NAME) == 0)\r\n\t\t{\r\n\t\t\tMessageBox(GetActiveWindow(), \"You must select a preset from the dropdown to be deleted\", \"Delete Preset\", MB_OK);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tstringstream ss;\r\n\t\t// TODO -- localization?\r\n\t\tss << \"Are you sure you want to delete the preset: \" << selectedPreset << \"?\";\r\n\r\n\t\tint delResult = MessageBox(GetActiveWindow(), ss.str().c_str(), \"Delete Preset\", MB_OKCANCEL);\r\n\t\t\r\n\t\tif (delResult == IDOK)\r\n\t\t{\r\n\t\t\tDeletePreset(selectedPreset);\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n\tif (index == IDC_PRESETSAVE_BUTTON)\r\n\t{\r\n\t\tPIComboBox presetCombo = GetItem(IDC_PRESET_COMBO);\r\n\t\tstring newPresetName;\r\n\t\tpresetCombo.GetCurrentSelection(newPresetName);\r\n\r\n\t\tnewPresetName = GetPresetName(newPresetName, GetActiveWindow());\r\n\r\n\t\tif (!newPresetName.empty())\r\n\t\t{\r\n\t\t\tbool doSave = mPresets.find(newPresetName) == mPresets.end();\r\n\t\t\tif (!doSave)\t// already exists?\r\n\t\t\t{\r\n\t\t\t\tdoSave = IDOK == MessageBox(GetActiveWindow(), \"That Preset name exists - save over it?\", \"Confirm Save\", MB_OKCANCEL);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif (doSave)\r\n\t\t\t{\r\n\t\t\t\tDialogData dd;\r\n\t\t\t\tExtractDataFromUI(dd);\r\n\r\n\t\t\t\tSaveNewPreset(newPresetName, dd);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tif (index == IDC_PREVIEW_BUTTON)\r\n\t{\r\n\t\t//Copy over UI to global struct for preview routined\r\n\t\tFillGlobalStruct();\r\n\r\n\t\t//Show previewUI (modal does not return until OK is pressed)\r\n\t\tPreviewDialog dlg(plugin);\r\n\t\tdlg.Modal();\r\n\t\t\r\n\t\t//Copy any changes back into UI struct (preview can change compression)\r\n\t\tGetGlobalStruct();\r\n\r\n\t\t//Update UI from struct\r\n\t\tSetUIFromData();\r\n\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (index == IDOK)\t// OK button pressed.\r\n\t{\r\n\t\tPIComboBox presetCombo = GetItem(IDC_PRESET_COMBO);\r\n\t\tpresetCombo.GetCurrentSelection(mDialogData.PresetName);\r\n\r\n\t\tExtractDataFromUI(mDialogData);\r\n\r\n\t\t//We have the none preset set so save only to the none preset so that it remember the next time it loads\r\n\t\tif (mDialogData.PresetName.compare(LAST_SETTINGS_PRESET_NAME) == 0)\r\n\t\t{\r\n\t\t\tUpdatePreset(LAST_SETTINGS_PRESET_NAME, mDialogData);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//Update currently set preset and none preset so that it remember the next time it loads\r\n\r\n#ifdef AUTO_SAVE_PRESETS\r\n\t\t\t\tUpdatePreset(mDialogData.PresetName, mDialogData);\r\n#endif\r\n\r\n\t\t\tUpdatePreset(LAST_SETTINGS_PRESET_NAME, mDialogData);\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}\r\n\r\n\tauto old = mDialogData;\r\n\r\n\t//Some other changes happened to the UI which did not have custom actions just update the struct\r\n\tExtractDataFromUI(mDialogData);\r\n\r\n\t//Rebuild CompressionTypes Combo box and disable not applicable controls \r\n\t//If Texture or MipMap type changed (apply last to have mDialog updated)\r\n\tif (old.TextureTypeIndex != mDialogData.TextureTypeIndex || old.MipMapTypeIndex != mDialogData.MipMapTypeIndex)\r\n\t{\r\n\t\t//Update compression/mipmap combo box\r\n\t\tUpdateCompressionCombo();\r\n\t\tUpdateMipMapCombo();\r\n\r\n\t\t//Disable any controls they do not apply based on the choosen texture type\r\n\t\tDisableUnavailableControls();\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n// Interrogate the state of the UI elements to find their current selections and copy that into the specified DialogData struct (dd)\r\nvoid OptionsDialog::ExtractDataFromUI(DialogData & dd)\r\n{\r\n\tdd.CompressionTypeIndex = GetSelectedItem(IDC_COMPRESSION_COMBO);\r\n\tdd.TextureTypeIndex = static_cast<TextureTypeEnum>(GetSelectedItem(IDC_TEXTURETYPE_COMBO));\r\n\tdd.MipMapTypeIndex = static_cast<MipmapEnum>(GetSelectedItem(IDC_MIPMAP_COMBO));\r\n\r\n\tPICheckBox MipLevelCheck = GetItem(IDC_CUBEMIPLEVEL_CHECK);\r\n\tdd.SetMipLevel = MipLevelCheck.GetChecked();\r\n\r\n\tif (dd.SetMipLevel)\r\n\t{\r\n\t\tuint32 MipLevelIndex = GetSelectedMipLevelIndex();\r\n\t\tdd.MipLevel = MipLevelIndex;\r\n\t}\r\n\r\n\tPICheckBox NormalizeCheck = GetItem(IDC_NORMALIZE_CHECK);\r\n\tdd.Normalize = NormalizeCheck.GetChecked();\r\n\r\n\tPICheckBox FlipXCheck = GetItem(IDC_FLIPX_CHECK);\r\n\tdd.FlipX = FlipXCheck.GetChecked();\r\n\r\n\tPICheckBox FlipYCheck = GetItem(IDC_FLIPY_CHECK);\r\n\tdd.FlipY = FlipYCheck.GetChecked();\r\n}\r\n\r\n//Enables or disables caontrols depending on the texture type\r\nvoid OptionsDialog::DisableUnavailableControls()\r\n{\r\n\tPICheckBox NormalizeCheck = GetItem(IDC_NORMALIZE_CHECK);\r\n\tPICheckBox FlipXCheck = GetItem(IDC_FLIPX_CHECK);\r\n\tPICheckBox FlipYCheck = GetItem(IDC_FLIPY_CHECK);\r\n\tPICheckBox MipLevelCheck = GetItem(IDC_CUBEMIPLEVEL_CHECK);\r\n\tPIComboBox combo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\r\n\t//if texture type normal map then enable/disable relevant checkboxes\r\n\tif (mDialogData.TextureTypeIndex != TextureTypeEnum::NORMALMAP)\r\n\t{\r\n\t\t//disable and clear normalize checkbox\r\n\t\t::EnableWindow(NormalizeCheck.GetItem(), false);\r\n\t\tNormalizeCheck.SetChecked(false);\r\n\t\t//disable and clear flipx checkbox\r\n\t\t::EnableWindow(FlipXCheck.GetItem(), false);\r\n\t\tFlipXCheck.SetChecked(false);\r\n\t\t//disable and clear flipy checkbox\r\n\t\t::EnableWindow(FlipYCheck.GetItem(), false);\r\n\t\tFlipYCheck.SetChecked(false);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//enable normalize, flipx,y checkboxes\r\n\t\t::EnableWindow(NormalizeCheck.GetItem(), true);\r\n\t\t::EnableWindow(FlipXCheck.GetItem(), true);\r\n\t\t::EnableWindow(FlipYCheck.GetItem(), true);\r\n\t}\r\n\r\n\t//if texture type is/isnot cubemap then enable/disable combo+checkbox\r\n\tif (mDialogData.TextureTypeIndex != TextureTypeEnum::CUBEMAP_CROSSED && \r\n\t\tmDialogData.TextureTypeIndex != TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t{\r\n\t\t//disable miplevel checkbox and combo\r\n\t\t::EnableWindow(MipLevelCheck.GetItem(), false);\r\n\t\t::EnableWindow(combo.GetItem(), false);\r\n\t\t//uncheck and clear\r\n\t\tMipLevelCheck.SetChecked(false);\r\n\t\tcombo.Clear();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//enable miplevel checkbox and combo\r\n\t\t::EnableWindow(MipLevelCheck.GetItem(), true);\r\n\t\t::EnableWindow(combo.GetItem(), true);\r\n\t}\r\n\t\r\n}\r\n\r\n//Update compression combo box based on textyreType. Convenience funtion\r\nvoid OptionsDialog::UpdateCompressionCombo()\r\n{\r\n\t//Fill new entries into struct\r\n\tGetCompressionNames(gComboItems[COMPRESSION_COMBO]);\r\n\t\r\n\t//Clear and fill combo box from struct\r\n\tInitComboFromItems(COMPRESSION_COMBO);\r\n}\r\n\r\n//Update mipmap combo box based on textyreType. Convenience funtion\r\nvoid OptionsDialog::UpdateMipMapCombo()\r\n{\r\n\t//Fill new entries into struct\r\n\tGetMipMapNames(gComboItems[MIPMAP_COMBO]);\r\n\t\r\n\t//Clear and fill combo box from struct\r\n\tInitComboFromItems(MIPMAP_COMBO);\r\n}\r\n\r\n// ===========================================================================\r\n// Populate the data struct for the Presets dropdown list - uses the mPresets filled in from LoadPresets().\r\nvoid OptionsDialog::GetPresetNames(ComboData & comboItem)\r\n{\r\n\tcomboItem.startIndex = -1;\r\n\tcomboItem.itemAndContextStrings.clear();\r\n\r\n\t//push info for stored presets\r\n\r\n\tfor (auto it = mPresets.begin(); it != mPresets.end(); ++it)\r\n\t{\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(it->first, \"\"));\r\n\t\tif (it->first.compare(mDialogData.PresetName) == 0)\r\n\t\t{\r\n\t\t\tcomboItem.startIndex = static_cast<uint32>(comboItem.itemAndContextStrings.size()-1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvoid OptionsDialog::GetCompressionNames(ComboData & comboItem)\r\n{\r\n\tcomboItem.itemAndContextStrings.clear();\r\n\r\n\t//BC1, BC1_SRGB, BC3, BC3_SRGB, BC6H_FAST, BC6H_FINE, BC7_FAST, BC7_FINE, BC7_SRGB_FAST, BC7_SRGB_FINE, BC4, BC5, NONE\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC1))\r\n\t    comboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC1   4bpp  (Linear)\", \"Also DXT1. Maximum compatibility. No Alpha Channel\", CompressionTypeEnum::BC1));\r\n\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC1_SRGB))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC1   4bpp  (sRGB, DX10+)\", \"No Alpha Channel. Use SRGB gamma.\", CompressionTypeEnum::BC1_SRGB));\r\n\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC3))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC3   8bpp  (Linear)\", \"Also DXT5. Maximum compatibility. Supports Alpha.\", CompressionTypeEnum::BC3));\r\n\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC3_SRGB))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC3   8bpp  (sRGB, DX10+)\", \"Supports Alpha. Use sRGB gamma.\", CompressionTypeEnum::BC3_SRGB));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC6H_FAST))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC6H  8bpp  Fast (Linear, DX11+)\", \"16 bit HDR images. No alpha. Only DX11+ level H/W. Fast Intel compression settings.\", CompressionTypeEnum::BC6H_FAST));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC6H_FINE))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC6H  8bpp  Fine (Linear, DX11+)\", \"16 bit HDR images. No alpha. Only DX11+ level H/W. Fine Intel compression settings.\", CompressionTypeEnum::BC6H_FINE));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC7_FAST))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC7   8bpp  Fast (Linear, DX11+)\", \"Best quality. Supports Alpha. Only DX11+ level H/W. Fast Intel compression settings.\", CompressionTypeEnum::BC7_FAST));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC7_FINE))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC7   8bpp  Fine (Linear, DX11+)\", \"Best quality. Supports Alpha. Only DX11+ level H/W. Fine Intel compression settings.\", CompressionTypeEnum::BC7_FINE));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC7_SRGB_FAST))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC7   8bpp  Fast (sRGB, DX11+)\", \"Best quality. Supports Alpha. Only DX11+ level H/W. Fast Intel compression settings. Use sRGB gamma.\", CompressionTypeEnum::BC7_SRGB_FAST));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC7_SRGB_FINE))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC7   8bpp  Fine (sRGB, DX11+)\", \"Best quality. Supports Alpha. Only DX11+ level H/W. Fine Intel compression settings. Use sRGB gamma.\", CompressionTypeEnum::BC7_SRGB_FINE));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC4))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC4   4bpp  (Linear, Grayscale)\", \"For Grayscale images, smallest size. Only the first image channel is used.\", CompressionTypeEnum::BC4));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::BC5))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"BC5   8bpp  (Linear, 2 Channel tangent map)\", \"Use for Normalmap encoding. Best quality. Only the first two image channels are used.\", CompressionTypeEnum::BC5));\r\n\t\r\n\tif (IntelPlugin::IsCombinationValid(mDialogData.TextureTypeIndex,CompressionTypeEnum::UNCOMPRESSED))\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"none  32bpp\", \"Lossless, no compression applied.\", CompressionTypeEnum::UNCOMPRESSED));\r\n\t\r\n\tif (mDialogData.CompressionTypeIndex < comboItem.itemAndContextStrings.size())\r\n\t{\r\n\t\tcomboItem.startIndex = mDialogData.CompressionTypeIndex;\r\n\t}\r\n\telse\t// Somehow have an index off the end of the list?  Reset to 0... best to be safe.\r\n\t{\r\n\t\tcomboItem.startIndex = 0;\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvoid OptionsDialog::GetTextureTypeNames(ComboData & comboItem)\r\n{\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Color\", \"Export only the RGB channels.\"));\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Color + Alpha\", \"Export RGB and alpha channel.\"));\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Cube Map from Layers\", \"Export a cube map using layers for faces (6 layers required).\"));\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Cube Map from crossed image\", \"Export a cube map from faces arranged in a horizontal or vertical crossed format.\"));\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Normal Map\", \"Export as a normal map.\"));\r\n\r\n\tif (mDialogData.TextureTypeIndex < comboItem.itemAndContextStrings.size())\r\n\t{\r\n\t\tcomboItem.startIndex = mDialogData.TextureTypeIndex;\r\n\t}\r\n\telse\t// Somehow have an index off the end of the list?  Reset to 0... best to be safe.\r\n\t{\r\n\t\tcomboItem.startIndex = 0;\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvoid OptionsDialog::GetMipMapNames(ComboData & comboItem)\r\n{\r\n\tcomboItem.itemAndContextStrings.clear();\r\n\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"None\", \"No Mip Maps.\"));\r\n\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"Auto Generate\", \"Autogenerate Mip Maps.\"));\r\n\r\n\t//If cube maps user can not specify its own mip levels\r\n\tif (mDialogData.TextureTypeIndex != TextureTypeEnum::CUBEMAP_CROSSED && mDialogData.TextureTypeIndex != TextureTypeEnum::CUBEMAP_LAYERS)\r\n\t\tcomboItem.itemAndContextStrings.push_back(ComboItemAndContext(\"From Layers\", \"Mip Maps are specified by the user, stored in layers.\"));\r\n\r\n\tif (mDialogData.MipMapTypeIndex < comboItem.itemAndContextStrings.size())\r\n\t{\r\n\t\tcomboItem.startIndex = mDialogData.MipMapTypeIndex;\r\n\t}\r\n\telse\t// Somehow have an index off the end of the list?  Reset to 0... best to be safe.\r\n\t{\r\n\t\tcomboItem.startIndex = 0;\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\n\r\n//Fills the combo which allows to slect a mip level for cube map export\r\nvoid OptionsDialog::PopulateMipLevelsCombo()\r\n{\r\n\tPIComboBox mipLevelCombo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\tmipLevelCombo.Clear();\r\n\r\n\tfor (uint32 i = 0; i <= MaxMipLevel; ++i)\r\n\t{\r\n\t\tstringstream s;\r\n\t\ts << i;\r\n\t\tmipLevelCombo.AppendItem(s.str().c_str());\r\n\t}\r\n\t\r\n\tuint32 selectedIndex = mDialogData.MipLevel;\t// Convert level to index\r\n\tmipLevelCombo.SetCurrentSelection(selectedIndex);\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvector<string> GetCompressionHelpText(void)\r\n{\r\n\tvector<string> vs;\r\n\r\n\t// Help Text\r\n\tvs.push_back(\"Specify the compression settings for the dds texture.\\n\\n\\\r\nBC1:  Also known as DXT1.  Uses 4 bits per pixel and contains RGB types of data.  Useful for color maps or normal maps if memory is tight.\\n\\n\\\r\nBC3:  Also known as DXT5.  Uses 8 bits per pixel and contains RGBA types of data.  Useful for color maps with full alpha, packing color and mono maps together\\n\\n\\\r\nBC4:  Uses 4 bits per pixel and contains grey-scale types of data.  Useful for height maps, gloss maps, font atlases or any other grey-scale image.\\n\\n\\\r\nBC5:  Uses 8 bits per pixel and contains 2 x grey-scale types of data.  Useful for tangent space normal maps.\\n\\n\\\r\nBC6:  Uses 8 bits per pixel and contains RGB floating point types of data. Useful for HDR 16 images but works only on DX11+ level hardware.\\n\\n\\\r\nBC7:  Uses 8 bits per pixel and contains RGBA types of data.  Useful for high quality color maps, color maps with full alpha.  It provides the best quality compression ratio but needs DX11+ level hardware.\");\t\t\r\n\r\n\tvs.push_back(\"Compression Options\");\t\t// Window Caption\r\n\r\n\treturn vs;\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvector<string> GetTextureTypeHelpText(void)\r\n{\r\n\tvector<string> vs;\r\n\r\n\t// Help Text\r\n\tvs.push_back(\"Specify in what way the data in your texture should be exported.\\n\\n\\\r\nColor:  Export only the RGB part of the image. Use for Images without alpha or when alpha is not wanted.  Can also be combined with BC4 to get the R channel as a grey-scale image, or BC5 to get the RG channels as a tangent space normal map.\\n\\n\\\r\nColor+Alpha:  Same as Color, but also save the alpha channel.\\n\\n\\\r\nCubeMap from Layers:  Export as a cube map consisting of six separate images specified in Layers. The layer names designate the face that each layer corresponds to. \\n\\\r\n\\\"-X\\\" is Left, \\\"+Z\\\" is Front, \\\"+X\\\" is Right, \\\"-Z\\\" is Back, \\\"+Y\\\" is Top, \\\"-Y\\\" is Bottom.\\n\\n\\\r\nCubeMap Crossed:  Export as a cube map.  The image has all the cube map faces unwrapped needs to be in horizontal or vertical cross layout with aspect ratio 4x3 or 3x4.\\n\\n\\\r\nFor cube maps, a specific mip level can be selected for exporting a low resolution cube map which is useful for low end platforms or when a blurred cube map is needed.\\n\\n\\\r\nNormal Map:  Export as Normal Map.  The Normalization option is available as a post process step which normalizes the values.  The Flip Red(X) and Flip Green (Y) \\\r\noption is also available as a post-process which inverts the X, Y component of the Normal Map.\\n\\n\\\r\nDepending on the texture type chosen, the compression formats that are not compatible are removed and cannot be selected.  The special \\\r\npost-process operations that do not apply are disabled.\");\r\n\r\n\tvs.push_back(\"Texture Type Options\");\t\t// Window Caption\r\n\r\n\treturn vs;\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvector<string> GetPreCompressOpsHelpText(void)\r\n{\r\n\tvector<string> vs;\r\n\r\n\tvs.push_back(\"These are convenience functions that are applied before a Normal map export.\\n\\n\\\r\nNormalization:  This operation normalizes the Normal Map vector values for the image and all its mip maps.\\n\\n\\\r\nFlip Red (X):  This operation inverts the Red channel of the Normal Map.\\n\\n\\\r\nFlip Green (Y):  This operation inverts the Green channel of the Normal Map so that bumps become indents and indents become bumps.\\n\\\r\nNote that in order to flip normal maps correctly both the Red and Green channel have to be inverted.\");\t\t// Help Text\r\n\r\n\tvs.push_back(\"Pre Compression Normal Map Operations\");\t\t// Window Caption\r\n\r\n\treturn vs;\r\n}\r\n\r\n// ===========================================================================\r\n\r\nvector<string> GetMipMapsHelpText(void)\r\n{\r\n\tvector<string> vs;\r\n\r\n\tvs.push_back(\"Specify if the image will have mip maps pre-calculated in the dds file.\\n\\n\\\r\nNone:  No Mip Maps will be generated for this image.\\n\\n\\\r\nAuto Generate:  The Mip Maps will be generated automatically by resizing the original image using a box filter.  The whole Mip Map range will be created \\\r\nstarting from the original size until a 1x1 texture is reached.\\n\\n\\\r\nFrom Layers:  The Mip Maps will be created from the Layers within the image.  It is the responsibility of the creator to specify the correct size and the correct amount. \\\r\nThe base layer will hold the first mip level (i.e. mip level 0, or the original image) and each layer after that specifies the next mip map in the chain.\\n\\n\\\r\nIts not needed to specify all the mip maps, the user can  choose to create a small consecutive range. The rest will be autogenerated.\\n\\n\\\r\nPlease remember that each mip level is half the size in dimension of its previous level image and the smallest size is 1x1.\");\t\t// Help Text\r\n\tvs.push_back(\"MipMap Generation Options\");\t\t// Window Caption\r\n\r\n\treturn vs;\r\n}\r\n\r\n// ===========================================================================\r\n\r\n//Changes the context Text field of the combo box\r\n//parameters contextStringID: id of context text control, index: ID of combo box control\r\nvoid OptionsDialog::SetContextString(uint32 contextStringID, uint32 index)\r\n{\r\n\t//Get controls\r\n\tPIText sText = GetItem(contextStringID);\r\n\tPIComboBox combo = GetItem(index);\r\n\r\n\t//Get the index straight from control\r\n\tint combo_index = int(SendMessage(combo.GetItem(), CB_GETCURSEL, 0, 0));\r\n\t\r\n\t// find the struct with the combo box data for the selected combo box\r\n\t// search the array where cobo items are stored\r\n\tfor (uint32 j = 0; j < gComboItems.size(); ++j)\r\n\t{\r\n\t\t//Correct combo box\r\n\t\tif (gComboItems[j].itemNum == index)\r\n\t\t{\r\n\t\t\tsText.SetText(gComboItems[j].itemAndContextStrings[combo_index].itemContextInfo);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// ===========================================================================\r\nuint32 OptionsDialog::GetSelectedItem(uint32 comboBoxID)\r\n{\r\n\tPIComboBox combo = GetItem(comboBoxID);\r\n\r\n\t//Get the index straight from control\r\n\tint index = int(SendMessage(combo.GetItem(), CB_GETCURSEL, 0, 0));\r\n\r\n\treturn index;\r\n}\r\n\r\n// ===========================================================================\r\nuint32 OptionsDialog::GetSelectedMipLevelIndex()\r\n{\r\n\tPIComboBox combo = GetItem(IDC_MIPLEVEL_COMBO);\r\n\r\n\tstring selectedText;\r\n\tcombo.GetCurrentSelection(selectedText);\r\n\r\n\t// Could replace atoi() call with a struct to track the values pushed into the dropdown, or a GetSelectedIndex() function on the PIComboBox itself.\r\n\tint mipLevelValue = atoi(selectedText.c_str());\r\n\t\r\n\treturn mipLevelValue;\r\n}\r\n\r\nint32 OptionsDialog::DoModal(IntelPlugin* plugin)\r\n{\r\n\tOptionsDialog dialog(plugin);\r\n\tint32 id = IDOK;\r\n\t\r\n\tif (plugin->GetData()->queryForParameters)\r\n\t{\r\n\t\t//Interactive mode, show UI\r\n\t\tid = dialog.Modal(NULL, NULL, IDD_MAINDIALOG);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//presetBatchName is a PString (first byte is the size)\r\n\t\tstring presetStringname = reinterpret_cast<char *>(plugin->GetData()->presetBatchName)+1;\r\n\r\n\t\t//Load preset without UI\r\n\t\tid = dialog.LoadPresetNonUIMode(presetStringname)?1:2;\r\n\t}\r\n\r\n\tif (id == IDOK)\t\t\r\n\t{\r\n\t\t//Fill gloabl struct with UI info\r\n\t\tdialog.FillGlobalStruct();\r\n\t}\r\n\r\n\treturn id;\r\n}\r\n\r\n\r\n#endif // #if !__LP64__\r\n\r\n\r\n\r\n// end PropetizerUI.cpp\r\n"
  },
  {
    "path": "IntelCompressionPlugin/SaveOptionsDialog.h",
    "content": "////////////////////////////////////////////////////////////////////////////////\r\n// Copyright 2017 Intel Corporation\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n// use this file except in compliance with the License.  You may obtain a copy\r\n// of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\r\n// License for the specific language governing permissions and limitations\r\n// under the License.\r\n////////////////////////////////////////////////////////////////////////////////\r\n\r\n#pragma once\r\n\r\n#include \"PIUI.h\"\r\n#include \"IntelPlugin.h\"\r\n\r\n#undef true\r\n#undef false\r\n\r\n#include <vector>\r\n#include <map>\r\n\r\n\r\n//This struct hold the UI data, all info do produced a compressed image is located here. used also to store/load into presets.\r\nstruct DialogData\r\n{\r\n\t// NOTE - assumed to be POD.  \r\n\tstd::string PresetName;           //The name of this preset\r\n\tuint32 CompressionTypeIndex;      //The current selection index of the combo box holding the compression. Translate into encoding with matrix CompressionVsTextureTypeMatrix in IntelPlugin.cpp\r\n\tTextureTypeEnum TextureTypeIndex;    //Holds the texture type of the image\r\n\tMipmapEnum  MipMapTypeIndex;     //Holds the mip map generation method\r\n\r\n\tuint32 MipLevel;\t\t\t      // only valid if SetMipLevel == true, specified the mip level to be exported when in cube map mode.\r\n\r\n\tbool SetMipLevel;                 //Specify that a specific mip level has to be exported. Only valid for cube map mode.\r\n\tbool Normalize;                   //Specify if normalization of values is needed. Only valid for Normal Maps \r\n\tbool FlipX;\r\n\tbool FlipY;\r\n};\r\n\r\n// Our main class - handles creation of and all input to the Export dialog UI.\r\nclass OptionsDialog : public PIDialog \r\n{\r\nprivate:\r\n\t// Struct to hold a dropdown list item and the corresponding context info for it. \r\n\t// The userData field can hold specific IDs depending on the dropdown. For example in the compression drop box it holds the CompressionTypeEnum ID. \r\n\t// Assembled for each such dropdown in functions below.\r\n\tstruct ComboItemAndContext\r\n\t{\r\n\t\tstring itemText;\r\n\t\tstring itemContextInfo;\r\n\t\tint    itemUserData;\r\n\r\n\t\tComboItemAndContext(string text, string contextInfo, int userData=0) : itemText(text), itemContextInfo(contextInfo), itemUserData(userData) { }\r\n\t};\r\n\r\n\r\n\t// Data to init the dropdown lists (Windows calls them ComboBoxes)\r\n\tstruct ComboData\r\n\t{\r\n\t\tconst uint32 itemNum;\t\t\t\t\t\t\t\t// WinForm ID of the dropdown list for this particular dropdown\r\n\t\tuint32 startIndex;\t\t\t\t\t\t\t\t\t// Which item in the dropdown to select when creating the list - 0 unless a preset is being loaded.\r\n\t\tvector<ComboItemAndContext> itemAndContextStrings;\t// list of strings and any corresponding context info for the dropdown list (context could be blank)\r\n\r\n\t\texplicit  ComboData(int num) : itemNum(num)  { }\r\n\t};\r\n\t\r\n\tenum {PRESETS_COMBO, COMPRESSION_COMBO, TEXTURETYPE_COMBO, MIPMAP_COMBO, NUMBEROF_COMBOS};\r\n\r\n    IntelPlugin* plugin;              //Pointer to photoshop API\r\n    IntelPlugin::Globals* globalParams;              //Pointer to photoshop API\r\n\tDialogData mDialogData;\t\t\t// Current working data set - updated based on user interaction with UI\r\n\tmap<string, DialogData> mPresets;\r\n\r\n\tvector<ComboData> gComboItems;\t\t\t\t\t// The master list of dropdown init data.\r\n\r\n\tstring mPathToPresetDirectory;\r\n\tuint32 MaxMipLevel;\t\t\t// based on image properties\r\n\r\n\tvoid LoadPresets(void);\r\n\tvoid ReadPreset(string fname);\r\n\r\n\tvoid SaveNewPreset(string presetName, DialogData dd);\r\n\tvoid UpdatePreset(string presetName, DialogData dd);\r\n\tvoid DeletePreset(string presetName);\r\n\r\n\tvoid InitDataNoPreset(DialogData & dd);\r\n\tvoid InitDataFromPreset(string presetName);\r\n\r\n\tvoid SetUIFromData();\r\n\r\n\tvoid ExtractDataFromUI(DialogData & dd);\r\n\t\r\n\tvoid GetPresetNames(ComboData & comboItem);\r\n\tvoid GetCompressionNames(ComboData & comboItem);\r\n\tvoid GetTextureTypeNames(ComboData & comboItem);\r\n\tvoid GetMipMapNames(ComboData & comboItem);\r\n\r\n\tvoid PopulateMipLevelsCombo();\r\n\tvoid DisableUnavailableControls();\r\n\tvoid UpdateCompressionCombo();\r\n\tvoid UpdateMipMapCombo();\r\n\r\n\tvoid SetFontCompressionCombo();\r\n\tvoid InitComboItems();\r\n\r\n\tvoid InitComboFromItems(int32 comboItemsIndex);\r\n\r\n\tuint32 GetSelectedItem(uint32 comboBoxID);\r\n\tuint32 GetSelectedMipLevelIndex();\r\n\tvoid SetContextString(uint32 contextStringID, uint32 index);\r\n\r\n\t// overrides\r\n\r\n\tvirtual void Init(void) override;\r\n\tvirtual void Notify(int32 item) override;\r\n\r\n\tdouble Log2( double n );\r\n\t\t\r\npublic:\r\n\texplicit  OptionsDialog(IntelPlugin* globals);\r\n\t~OptionsDialog() {}\r\n\t\r\n\tbool LoadPresetNonUIMode(string name);\r\n\tvoid FillGlobalStruct();\r\n\tvoid GetGlobalStruct();\r\n\tconst DialogData & GetData() const { return mDialogData; }\r\n\r\n\tstatic int32 DoModal(IntelPlugin* plugin);\r\n};\r\n\r\n\r\n#define PRESET_FILE_VERSION (int)100\r\n#define LAST_SETTINGS_PRESET_NAME \"-last-used-\"\r\n\r\n// #define AUTO_SAVE_PRESETS // sets presets to autosave\r\n\r\n"
  },
  {
    "path": "IntelCompressionPlugin/kernel.ispc",
    "content": "////////////////////////////////////////////////////////////////////////////////\n// Copyright 2017 Intel Corporation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License.  You may obtain a copy\n// of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n// License for the specific language governing permissions and limitations\n// under the License.\n////////////////////////////////////////////////////////////////////////////////\n\ntypedef unsigned int8 uint8;\ntypedef unsigned int32 uint32;\ntypedef unsigned int64 uint64;\n\n///////////////////////////\n//   generic helpers\n\ninline void swap_ints(int u[], int v[], uniform int n)\n{\n    for (uniform int i=0; i<n; i++)\n\t{\n\t\tint t = u[i];\n\t\tu[i] = v[i];\n\t\tv[i] = t;\n\t}\n}\n\ninline void swap_uints(uint32 u[], uint32 v[], uniform int n)\n{\n    for (uniform int i=0; i<n; i++)\n\t{\n\t\tuint32 t = u[i];\n\t\tu[i] = v[i];\n\t\tv[i] = t;\n\t}\n}\n\ninline float sq(float v)\n{\n\treturn v*v;\n}\n\ninline int pow2(int x) \n{\n\treturn 1<<x; \n}\n\ninline float clamp(float v, int a, int b)\n{\n    return clamp(v, (float)a, (float)b);\n}\n\n// the following helpers isolate performance warnings\n\ninline unsigned int32 gather_uint(const uniform unsigned int32* const uniform ptr, int idx)\n{\n\treturn ptr[idx]; // (perf warning expected)\n}\n\ninline unsigned int32 gather_uint(const varying unsigned int32* const uniform ptr, int idx)\n{\n\treturn ptr[idx]; // (perf warning expected)\n}\n\ninline int32 gather_int(const uniform int32* const uniform ptr, int idx)\n{\n\treturn ptr[idx]; // (perf warning expected)\n}\n\ninline float gather_float(varying float* uniform ptr, int idx)\n{\n\treturn ptr[idx]; // (perf warning expected)\n}\n\ninline void scatter_uint(uniform unsigned int32* ptr, int idx, uint32 value)\n{\n\tptr[idx] = value; // (perf warning expected)\n}\n\ninline void scatter_int(varying int32* uniform ptr, int idx, uint32 value)\n{\n\tptr[idx] = value; // (perf warning expected)\n}\n\ninline uint32 shift_right(uint32 v, const uniform int bits)\n{\n\treturn v>>bits; // (perf warning expected)\n}\n\n///////////////////////////////////////////////////////////\n//\t\t\t\t    BC1/BC7 shared\n\nstruct rgba_surface\n{\n\tuint8* ptr;\n\tint width, height, stride;\n};\n\ninline void load_block_interleaved(float block[48], uniform rgba_surface* uniform src, int xx, uniform int yy)\n{\n    for (uniform int y = 0; y<4; y++)\n    for (uniform int x = 0; x<4; x++)\n    {\n        uniform unsigned int32* uniform src_ptr = (unsigned int32*)&src->ptr[(yy * 4 + y)*src->stride];\n        unsigned int32 rgba = gather_uint(src_ptr, xx * 4 + x);\n\n        block[16 * 0 + y * 4 + x] = (int)((rgba >> 0) & 255);\n        block[16 * 1 + y * 4 + x] = (int)((rgba >> 8) & 255);\n        block[16 * 2 + y * 4 + x] = (int)((rgba >> 16) & 255);\n    }\n}\n\ninline void load_block_interleaved_rgba(float block[64], uniform rgba_surface* uniform src, int xx, uniform int yy)\n{\n\tfor (uniform int y=0; y<4; y++)\n\tfor (uniform int x=0; x<4; x++)\n\t{\n\t\tuniform unsigned int32* uniform src_ptr = (unsigned int32*)&src->ptr[(yy*4+y)*src->stride];\n\t\tunsigned int32 rgba = gather_uint(src_ptr, xx*4+x);\n\n\t\tblock[16*0+y*4+x] = (int)((rgba>> 0)&255);\n\t\tblock[16*1+y*4+x] = (int)((rgba>> 8)&255);\n\t\tblock[16*2+y*4+x] = (int)((rgba>>16)&255);\n\t\tblock[16*3+y*4+x] = (int)((rgba>>24)&255);\n\t}\n}\n\ninline void load_block_interleaved_16bit(float block[48], uniform rgba_surface* uniform src, int xx, uniform int yy)\n{\n    for (uniform int y = 0; y<4; y++)\n    for (uniform int x = 0; x<4; x++)\n    {\n        uniform unsigned int32* uniform src_ptr_r = (unsigned int32*)&src->ptr[(yy * 4 + y)*src->stride + 0];\n        uniform unsigned int32* uniform src_ptr_g = (unsigned int32*)&src->ptr[(yy * 4 + y)*src->stride + 2];\n        uniform unsigned int32* uniform src_ptr_b = (unsigned int32*)&src->ptr[(yy * 4 + y)*src->stride + 4];\n        unsigned int32 xr = gather_uint(src_ptr_r, (xx * 4 + x) * 2);\n        unsigned int32 xg = gather_uint(src_ptr_g, (xx * 4 + x) * 2);\n        unsigned int32 xb = gather_uint(src_ptr_b, (xx * 4 + x) * 2);\n\n        block[16 * 0 + y * 4 + x] = (int)(xr & 0xFFFF);\n        block[16 * 1 + y * 4 + x] = (int)(xg & 0xFFFF);\n        block[16 * 2 + y * 4 + x] = (int)(xb & 0xFFFF);\n        block[16 * 3 + y * 4 + x] = 0;\n    }\n}\n\ninline void store_data(uniform uint8 dst[], int width, int xx, uniform int yy, uint32 data[], int data_size)\n{\n\tfor (uniform int k=0; k<data_size; k++)\n\t{\n\t\tuniform uint32* dst_ptr = (uint32*)&dst[(yy)*width*data_size];\n\t\tscatter_uint(dst_ptr, xx*data_size+k, data[k]);\n\t}\n}\n\ninline void ssymm(float a[3], float covar[6], float b[3])\n{\n\ta[0] = covar[0]*b[0]+covar[1]*b[1]+covar[2]*b[2];\n\ta[1] = covar[1]*b[0]+covar[3]*b[1]+covar[4]*b[2];\n\ta[2] = covar[2]*b[0]+covar[4]*b[1]+covar[5]*b[2];\n}\n\ninline void ssymm3(float a[4], float covar[10], float b[4])\n{\n\ta[0] = covar[0]*b[0]+covar[1]*b[1]+covar[2]*b[2];\n\ta[1] = covar[1]*b[0]+covar[4]*b[1]+covar[5]*b[2];\n\ta[2] = covar[2]*b[0]+covar[5]*b[1]+covar[7]*b[2];\n}\n\ninline void ssymm4(float a[4], float covar[10], float b[4])\n{\n\ta[0] = covar[0]*b[0]+covar[1]*b[1]+covar[2]*b[2]+covar[3]*b[3];\n\ta[1] = covar[1]*b[0]+covar[4]*b[1]+covar[5]*b[2]+covar[6]*b[3];\n\ta[2] = covar[2]*b[0]+covar[5]*b[1]+covar[7]*b[2]+covar[8]*b[3];\n\ta[3] = covar[3]*b[0]+covar[6]*b[1]+covar[8]*b[2]+covar[9]*b[3];\n}\n\ninline void compute_axis3(float axis[3], float covar[6], uniform const int powerIterations)\n{\n\tfloat vec[3] = {1,1,1};\n\n    for (uniform int i=0; i<powerIterations; i++)\n\t{\n\t\tssymm(axis, covar, vec);\n\t\tfor (uniform int p=0; p<3; p++) vec[p] = axis[p];\n\n\t\tif (i%2==1) // renormalize every other iteration\n\t\t{\n\t\t\tfloat norm_sq = 0;\n\t\t\tfor (uniform int p=0; p<3; p++)\n\t\t\t\tnorm_sq += axis[p]*axis[p];\n\n\t\t\tfloat rnorm = rsqrt(norm_sq);\n\t\t\tfor (uniform int p=0; p<3; p++) vec[p] *= rnorm;\n\t\t}\t\t\n\t}\n\n\tfor (uniform int p=0; p<3; p++) axis[p] = vec[p];\n}\n\ninline void compute_axis(float axis[4], float covar[10], uniform const int powerIterations, uniform int channels)\n{\n\tfloat vec[4] = {1,1,1,1};\n\n    for (uniform int i=0; i<powerIterations; i++)\n\t{\n\t\tif (channels == 3) ssymm3(axis, covar, vec);\n        if (channels == 4) ssymm4(axis, covar, vec);\n\t\tfor (uniform int p=0; p<channels; p++) vec[p] = axis[p];\n\n\t\tif (i%2==1) // renormalize every other iteration\n\t\t{\n\t\t\tfloat norm_sq = 0;\n\t\t\tfor (uniform int p=0; p<channels; p++)\n\t\t\t\tnorm_sq += axis[p]*axis[p];\n\n\t\t\tfloat rnorm = rsqrt(norm_sq);\n\t\t\tfor (uniform int p=0; p<channels; p++) vec[p] *= rnorm;\n\t\t}\t\t\n\t}\n\n\tfor (uniform int p=0; p<channels; p++) axis[p] = vec[p];\n}\n\n///////////////////////////////////////////////////////////\n//\t\t\t\t\t BC1/BC3 encoding\n\ninline int stb__Mul8Bit(int a, int b)\n{\n  int t = a*b + 128;\n  return (t + (t >> 8)) >> 8;\n}\n\ninline unsigned int16 stb__As16Bit(int r, int g, int b)\n{\n   return (stb__Mul8Bit(r,31) << 11) + (stb__Mul8Bit(g,63) << 5) + stb__Mul8Bit(b,31);\n}\n\ninline unsigned int16 enc_rgb565(float c[3])\n{\n\treturn stb__As16Bit((int)c[0], (int)c[1], (int)c[2]);\n}\n\ninline void dec_rgb565(float c[3], int p)\n{\n\tint c2 = (p>>0)&31;\n\tint c1 = (p>>5)&63;\n\tint c0 = (p>>11)&31;\n\n\tc[0] = (c0<<3)+(c0>>2);\n\tc[1] = (c1<<2)+(c1>>4);\n\tc[2] = (c2<<3)+(c2>>2);\n}\n\ninline void pick_endpoints_dc(int c0[3], int c1[3], int block[48], int iaxis[3])\n{\n\tfor (uniform int p=0; p<3; p++)\n\tfor (uniform int y=0; y<4; y++)\n\tfor (uniform int x=0; x<4; x++)\n\t{\n\t\tc0[p] += block[p*16+y*4+x];\n\t}\n\n\tfor (uniform int p=0; p<3; p++)\n\t\tc0[p] >>= 4;\n}\n\ninline void pick_endpoints(float c0[3], float c1[3], float block[48], float axis[3], float dc[3])\n{\n\tfloat min_dot = 256*256;\n\tfloat max_dot = 0;\n\n\tfor (uniform int y=0; y<4; y++)\n\tfor (uniform int x=0; x<4; x++)\n\t{\n\t\tfloat dot = 0;\n\t\tfor (uniform int p=0; p<3; p++)\n\t\t\tdot += (block[p*16+y*4+x]-dc[p])*axis[p];\n\t\n\t\tmin_dot = min(min_dot, dot);\n\t\tmax_dot = max(max_dot, dot);\n\t}\n\n\tif (max_dot-min_dot < 1f)\n\t{\n\t\tmin_dot -= 0.5f;\n\t\tmax_dot += 0.5f;\n\t}\n\n\tfloat norm_sq = 0;\n\tfor (uniform int p=0; p<3; p++)\n\t\tnorm_sq += axis[p]*axis[p];\n\n\tfloat rnorm_sq = rcp(norm_sq);\n\tfor (uniform int p=0; p<3; p++)\n\t{\n\t\tc0[p] = clamp(dc[p]+min_dot*rnorm_sq*axis[p], 0, 255);\n\t\tc1[p] = clamp(dc[p]+max_dot*rnorm_sq*axis[p], 0, 255);\n\t}\n}\n\ninline uint32 fast_quant(float block[48], int p0, int p1)\n{\n\tfloat c0[3];\n\tfloat c1[3];\n\tdec_rgb565(c0, p0);\n\tdec_rgb565(c1, p1);\n\n\tfloat dir[3];\n    for (uniform int p=0; p<3; p++) dir[p] = c1[p]-c0[p];\n    \n\tfloat sq_norm = 0;\n\tfor (uniform int p=0; p<3; p++) sq_norm += sq(dir[p]);\n\n\tfloat rsq_norm = rcp(sq_norm);\n\n\tfor (uniform int p=0; p<3; p++) dir[p] *= rsq_norm*3;\n\n\tfloat bias = 0.5;\n\tfor (uniform int p=0; p<3; p++) bias -= c0[p]*dir[p];\n\n    uint32 bits = 0;    \n\tuint32 scaler = 1;\n    for (uniform int k=0; k<16; k++)\n    {\n\t\tfloat dot = 0;\n        for (uniform int p=0; p<3; p++)\n\t\t\tdot += block[k+p*16]*dir[p];\n\n\t\tint q = clamp((int)(dot+bias), 0, 3);\n\n\t\t//bits += q<<(k*2);\n\t\tbits += q*scaler;\n\t\tscaler *= 4;\n    }\n\t\n    return bits;\n}\n\ninline void compute_covar_dc(float covar[6], float dc[3], float block[48])\n{\n\tfor (uniform int i=0; i<6; i++) covar[i] = 0;\n\tfor (uniform int p=0; p<3; p++) dc[p] = 0;\n\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tfor (uniform int p=0; p<3; p++)\n\t\t\tdc[p] += block[k+p*16];\n\t}\n\n\tfor (uniform int p=0; p<3; p++) dc[p] /= 16;\n\t\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tfloat rgb[3];\n\t\tfor (uniform int p=0; p<3; p++)\n\t\t\trgb[p] = block[k+p*16]-dc[p];\n\t\t\n\t\tcovar[0] += rgb[0]*rgb[0];\n\t\tcovar[1] += rgb[0]*rgb[1];\n\t\tcovar[2] += rgb[0]*rgb[2];\n\t\t\n\t\tcovar[3] += rgb[1]*rgb[1];\n\t\tcovar[4] += rgb[1]*rgb[2];\n\n\t\tcovar[5] += rgb[2]*rgb[2];\n\t}\n}\n\n// ugly, but makes BC1 compression 20% faster overall\ninline void compute_covar_dc_ugly(float covar[6], float dc[3], float block[48])\n{\n\tfor (uniform int p=0; p<3; p++)\n\t{\n\t\tfloat acc = 0;\n\t\tfor (uniform int k=0; k<16; k++)\n\t\t\tacc += block[k+p*16];\n\t\tdc[p] = acc/16;\n\t}\n\t\n\tfloat covar0 = 0f;\n\tfloat covar1 = 0f;\n\tfloat covar2 = 0f;\n\tfloat covar3 = 0f;\n\tfloat covar4 = 0f;\n\tfloat covar5 = 0f;\n\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tfloat rgb0, rgb1, rgb2;\n\t\trgb0 = block[k+0*16]-dc[0];\n\t\trgb1 = block[k+1*16]-dc[1];\n\t\trgb2 = block[k+2*16]-dc[2];\n\t\t\n\t\tcovar0 += rgb0*rgb0;\n\t\tcovar1 += rgb0*rgb1;\n\t\tcovar2 += rgb0*rgb2;\n\t\t\n\t\tcovar3 += rgb1*rgb1;\n\t\tcovar4 += rgb1*rgb2;\n\n\t\tcovar5 += rgb2*rgb2;\n\t}\n\n\tcovar[0] = covar0;\n\tcovar[1] = covar1;\n\tcovar[2] = covar2;\n\tcovar[3] = covar3;\n\tcovar[4] = covar4;\n\tcovar[5] = covar5;\n}\n\ninline void bc1_refine(int pe[2], float block[48], unsigned int32 bits, float dc[3])\n{\n\tfloat c0[3];\n\tfloat c1[3];\n\n\tif ((bits ^ (bits*4)) < 4)\n    {\n        // single color\n        for (uniform int p=0; p<3; p++)\n        {\n            c0[p] = dc[p];\n            c1[p] = dc[p];\n        }\n    }\n    else\n\t{\n\t\tfloat Atb1[3] = {0,0,0};\n\t\tfloat sum_q = 0;\n\t\tfloat sum_qq = 0;\n\t\tunsigned int32 shifted_bits = bits;\n               \n        for (uniform int k=0; k<16; k++)\n        {\n            float q = (int)(shifted_bits&3);\n\t\t\tshifted_bits >>= 2;\n\n            float x = 3-q;\n            float y = q;\n            \n\t\t\tsum_q += q;\n\t\t\tsum_qq += q*q;\n\n            for (uniform int p=0; p<3; p++) Atb1[p] += x*block[k+p*16];\n        }\n        \n\t\tfloat sum[3];\n\t\tfloat Atb2[3];\n\n\t\tfor (uniform int p=0; p<3; p++) \n\t\t{\n\t\t\tsum[p] = dc[p]*16;\n\t\t    Atb2[p] = 3*sum[p]-Atb1[p];\n\t\t}\n        \n\t    float Cxx = 16*sq(3)-2*3*sum_q+sum_qq;\n\t    float Cyy = sum_qq;\n\t\tfloat Cxy = 3*sum_q-sum_qq;\n\t\tfloat scale = 3f * rcp(Cxx*Cyy - Cxy*Cxy);\n\n        for (uniform int p=0; p<3; p++)\n        {\n            c0[p] = (Atb1[p]*Cyy - Atb2[p]*Cxy)*scale;\n            c1[p] = (Atb2[p]*Cxx - Atb1[p]*Cxy)*scale;\n\t\t\t\n\t\t\tc0[p] = clamp(c0[p], 0, 255);\n\t\t\tc1[p] = clamp(c1[p], 0, 255);\n        }\n    }\n\n\tpe[0] = enc_rgb565(c0);\n    pe[1] = enc_rgb565(c1);\n}\n\ninline uint32 fix_qbits(uint32 qbits)\n{\n\tuniform const uint32 mask_01b = 0x55555555;\n\tuniform const uint32 mask_10b = 0xAAAAAAAA;\n\n\tuint32 qbits0 = qbits&mask_01b;\n\tuint32 qbits1 = qbits&mask_10b;\n\tqbits = (qbits1>>1) + (qbits1 ^ (qbits0<<1));\n\n\treturn qbits;\n}\n\ninline void CompressBlockBC1_core(float block[48], uint32 data[2])\n{\n\tuniform const int powerIterations = 4;\n    uniform const int refineIterations = 1;\n    \n\tfloat covar[6];\n\tfloat dc[3];\n\tcompute_covar_dc_ugly(covar, dc, block);\n\t\n\tfloat eps = 0.001;\n\tcovar[0] += eps;\n\tcovar[3] += eps;\n\tcovar[5] += eps;\n\t\n\tfloat axis[3];\n\tcompute_axis3(axis, covar, powerIterations);\n\t\t\n    float c0[3];\n    float c1[3];\n    pick_endpoints(c0, c1, block, axis, dc);\n\t\n\tint p[2];\n    p[0] = enc_rgb565(c0);\n    p[1] = enc_rgb565(c1);\n\tif (p[0]<p[1]) swap_ints(&p[0], &p[1], 1);\n\t\n\tdata[0] = (1<<16)*p[1]+p[0];\n\tdata[1] = fast_quant(block, p[0], p[1]);\n    \t\n    // refine\n    for (uniform int i=0; i<refineIterations; i++)\n    {\n        bc1_refine(p, block, data[1], dc);\n\t\tif (p[0]<p[1]) swap_ints(&p[0], &p[1], 1);\n        data[0] = (1<<16)*p[1]+p[0];\n\t\tdata[1] = fast_quant(block, p[0], p[1]);\n    }\n\t\n\tdata[1] = fix_qbits(data[1]);\n}\n\ninline void CompressBlockBC3_alpha(float block[16], uint32 data[2])\n{\n    float ep[2] = { 255, 0 };\n\t\n    for (uniform int k=0; k<16; k++)\n\t{\n\t\tep[0] = min(ep[0], block[k]);\n\t\tep[1] = max(ep[1], block[k]);\n\t}\n    \n    if (ep[0] == ep[1]) ep[1] = ep[0]+0.1f;\n\t    \n    uint32 qblock[2] = { 0, 0 };\n    float scale = 7f/(ep[1]-ep[0]);\n\n    for (uniform int k=0; k<16; k++)\n    {\n        float v = block[k];\n        float proj = (v-ep[0])*scale+0.5f;\n\n        int q = clamp((int)proj, 0, 7);\n\n\t\tq = 7-q;\n\n        if (q > 0) q++;\n        if (q==8) q = 1;\n\n        qblock[k/8] |= q << ((k%8)*3);\n    }\n\n\t// (could be improved by refinement)\n    \n    data[0] = clamp((int)ep[0], 0, 255)*256+clamp((int)ep[1], 0, 255);\n    data[0] |= qblock[0]<<16;\n    data[1] = qblock[0]>>16;\n    data[1] |= qblock[1]<<8;\n}\n\ninline void CompressBlockBC1(uniform rgba_surface src[], int xx, uniform int yy, uniform uint8 dst[])\n{\n\tfloat block[48];\n    uint32 data[2];\n\n\tload_block_interleaved(block, src, xx, yy);\n\t\n    CompressBlockBC1_core(block, data);\n\n\tstore_data(dst, src->width, xx, yy, data, 2);\n}\n\ninline void CompressBlockBC3(uniform rgba_surface src[], int xx, uniform int yy, uniform uint8 dst[])\n{\n\tfloat block[64];\n    uint32 data[4];\n\n\tload_block_interleaved_rgba(block, src, xx, yy);\n\t\n    CompressBlockBC3_alpha(&block[48], &data[0]);\n    CompressBlockBC1_core(block, &data[2]);\n\n\tstore_data(dst, src->width, xx, yy, data, 4);\n}\n\nexport void CompressBlocksBC1_ispc(uniform rgba_surface src[], uniform uint8 dst[])\n{\t\n\tfor (uniform int yy = 0; yy<src->height/4; yy++)\n\tforeach (xx = 0 ... src->width/4)\n\t{\n\t\tCompressBlockBC1(src, xx, yy, dst);\n\t}\n}\n\nexport void CompressBlocksBC3_ispc(uniform rgba_surface src[], uniform uint8 dst[])\n{\t\n\tfor (uniform int yy = 0; yy<src->height/4; yy++)\n\tforeach (xx = 0 ... src->width/4)\n\t{\n\t\tCompressBlockBC3(src, xx, yy, dst);\n\t}\n}\n\n///////////////////////////////////////////////////////////\n//\t\t\t\t\t BC7 encoding\n\nstruct bc7_enc_settings\n{\n\tbool mode_selection[4];\n\tint refineIterations[8];\n\n    bool skip_mode2;\n\tint fastSkipTreshold_mode1;\n\tint fastSkipTreshold_mode3;\n\tint fastSkipTreshold_mode7;\n\n    int mode45_channel0;\n\tint refineIterations_channel;\n\n    int channels;\n};\n\nstruct bc7_enc_state\n{\n\tfloat block[64];\n\n    float opaque_err;       // error for coding alpha=255\n\tfloat best_err;\n\tuint32 best_data[5];\t// 4, +1 margin for skips\n\n\t// settings\n\tuniform bool mode_selection[4];\n\tuniform int refineIterations[8];\n\n    uniform bool skip_mode2;\n\tuniform int fastSkipTreshold_mode1;\n\tuniform int fastSkipTreshold_mode3;\n\tuniform int fastSkipTreshold_mode7;\n\n    uniform int mode45_channel0;\n\tuniform int refineIterations_channel;\n\n    uniform int channels;\n};\n\nstruct mode45_parameters\n{\n\tint qep[8];\n\tuint32 qblock[2];\n\tint aqep[2];\n\tuint32 aqblock[2];\n\tint rotation;\n\tint swap;\n};\n\nvoid bc7_code_mode01237(uint32 data[5], int qep[6], uint32 qblock[2], int part_id, uniform int mode);\nvoid bc7_code_mode45(uint32 data[5], mode45_parameters params[], uniform int mode);\nvoid bc7_code_mode6(uint32 data[5], int qep[8], uint32 qblock[2]);\n\n///////////////////////////\n//   BC7 format data\n\ninline uniform const int* uniform get_unquant_table(uniform int bits)\n{\n    assert(bits>=2 && bits<=4); // invalid bit size\n\n    static uniform const int unquant_table_2bits[] = { 0, 21, 43, 64 };\n    static uniform const int unquant_table_3bits[] = { 0, 9, 18, 27, 37, 46, 55, 64 };\n    static uniform const int unquant_table_4bits[] = { 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64 };\n    \n\tuniform const int* uniform unquant_tables[] = {unquant_table_2bits, unquant_table_3bits, unquant_table_4bits};\n\n    return unquant_tables[bits-2];\n}\n\ninline uint32 get_pattern(int part_id)\n{\n\tstatic uniform const uint32 pattern_table[] = {\n        0x50505050u, 0x40404040u, 0x54545454u, 0x54505040u, 0x50404000u, 0x55545450u, 0x55545040u, 0x54504000u,\n\t\t0x50400000u, 0x55555450u, 0x55544000u, 0x54400000u, 0x55555440u, 0x55550000u, 0x55555500u, 0x55000000u,\n\t\t0x55150100u, 0x00004054u, 0x15010000u, 0x00405054u, 0x00004050u, 0x15050100u, 0x05010000u, 0x40505054u,\n\t\t0x00404050u, 0x05010100u, 0x14141414u, 0x05141450u, 0x01155440u, 0x00555500u, 0x15014054u, 0x05414150u,\n\t\t0x44444444u, 0x55005500u, 0x11441144u, 0x05055050u, 0x05500550u, 0x11114444u, 0x41144114u, 0x44111144u,\n\t\t0x15055054u, 0x01055040u, 0x05041050u, 0x05455150u, 0x14414114u, 0x50050550u, 0x41411414u, 0x00141400u,\n\t\t0x00041504u, 0x00105410u, 0x10541000u, 0x04150400u, 0x50410514u, 0x41051450u, 0x05415014u, 0x14054150u,\n\t\t0x41050514u, 0x41505014u, 0x40011554u, 0x54150140u, 0x50505500u, 0x00555050u, 0x15151010u, 0x54540404u,\n\t\t0xAA685050u, 0x6A5A5040u, 0x5A5A4200u, 0x5450A0A8u, 0xA5A50000u, 0xA0A05050u, 0x5555A0A0u, 0x5A5A5050u,\n\t\t0xAA550000u, 0xAA555500u, 0xAAAA5500u, 0x90909090u, 0x94949494u, 0xA4A4A4A4u, 0xA9A59450u, 0x2A0A4250u,\n\t\t0xA5945040u, 0x0A425054u, 0xA5A5A500u, 0x55A0A0A0u, 0xA8A85454u, 0x6A6A4040u, 0xA4A45000u, 0x1A1A0500u,\n\t\t0x0050A4A4u, 0xAAA59090u, 0x14696914u, 0x69691400u, 0xA08585A0u, 0xAA821414u, 0x50A4A450u, 0x6A5A0200u,\n\t\t0xA9A58000u, 0x5090A0A8u, 0xA8A09050u, 0x24242424u, 0x00AA5500u, 0x24924924u, 0x24499224u, 0x50A50A50u,\n\t\t0x500AA550u, 0xAAAA4444u, 0x66660000u, 0xA5A0A5A0u, 0x50A050A0u, 0x69286928u, 0x44AAAA44u, 0x66666600u,\n\t\t0xAA444444u, 0x54A854A8u, 0x95809580u, 0x96969600u, 0xA85454A8u, 0x80959580u, 0xAA141414u, 0x96960000u,\n\t\t0xAAAA1414u, 0xA05050A0u, 0xA0A5A5A0u, 0x96000000u, 0x40804080u, 0xA9A8A9A8u, 0xAAAAAA44u, 0x2A4A5254u\n\t};\n\n\treturn gather_uint(pattern_table, part_id);\n}\n\ninline int get_pattern_mask(int part_id, int j)\n{\n    static uniform const uint32 pattern_mask_table[] = {\n\t\t0xCCCC3333u, 0x88887777u, 0xEEEE1111u, 0xECC81337u, 0xC880377Fu, 0xFEEC0113u, 0xFEC80137u, 0xEC80137Fu,\n\t\t0xC80037FFu, 0xFFEC0013u, 0xFE80017Fu, 0xE80017FFu, 0xFFE80017u, 0xFF0000FFu, 0xFFF0000Fu, 0xF0000FFFu,\n\t\t0xF71008EFu, 0x008EFF71u, 0x71008EFFu, 0x08CEF731u, 0x008CFF73u, 0x73108CEFu, 0x3100CEFFu, 0x8CCE7331u,\n\t\t0x088CF773u, 0x3110CEEFu, 0x66669999u, 0x366CC993u, 0x17E8E817u, 0x0FF0F00Fu, 0x718E8E71u, 0x399CC663u,\n\t\t0xAAAA5555u, 0xF0F00F0Fu, 0x5A5AA5A5u, 0x33CCCC33u, 0x3C3CC3C3u, 0x55AAAA55u, 0x96966969u, 0xA55A5AA5u,\n\t\t0x73CE8C31u, 0x13C8EC37u, 0x324CCDB3u, 0x3BDCC423u, 0x69969669u, 0xC33C3CC3u, 0x99666699u, 0x0660F99Fu,\n\t\t0x0272FD8Du, 0x04E4FB1Bu, 0x4E40B1BFu, 0x2720D8DFu, 0xC93636C9u, 0x936C6C93u, 0x39C6C639u, 0x639C9C63u,\n\t\t0x93366CC9u, 0x9CC66339u, 0x817E7E81u, 0xE71818E7u, 0xCCF0330Fu, 0x0FCCF033u, 0x774488BBu, 0xEE2211DDu,\n\t\t0x08CC0133u, 0x8CC80037u, 0xCC80006Fu, 0xEC001331u, 0x330000FFu, 0x00CC3333u, 0xFF000033u, 0xCCCC0033u,\n\t\t0x0F0000FFu, 0x0FF0000Fu, 0x00F0000Fu, 0x44443333u, 0x66661111u, 0x22221111u, 0x136C0013u, 0x008C8C63u,\n\t\t0x36C80137u, 0x08CEC631u, 0x3330000Fu, 0xF0000333u, 0x00EE1111u, 0x88880077u, 0x22C0113Fu, 0x443088CFu,\n\t\t0x0C22F311u, 0x03440033u, 0x69969009u, 0x9960009Fu, 0x03303443u, 0x00660699u, 0xC22C3113u, 0x8C0000EFu,\n\t\t0x1300007Fu, 0xC4003331u, 0x004C1333u, 0x22229999u, 0x00F0F00Fu, 0x24929249u, 0x29429429u, 0xC30C30C3u,\n\t\t0xC03C3C03u, 0x00AA0055u, 0xAA0000FFu, 0x30300303u, 0xC0C03333u, 0x90900909u, 0xA00A5005u, 0xAAA0000Fu,\n\t\t0x0AAA0555u, 0xE0E01111u, 0x70700707u, 0x6660000Fu, 0x0EE01111u, 0x07707007u, 0x06660999u, 0x660000FFu,\n\t\t0x00660099u, 0x0CC03333u, 0x03303003u, 0x60000FFFu, 0x80807777u, 0x10100101u, 0x000A0005u, 0x08CE8421u\n\t};\n\n\tuint32 mask_packed = gather_uint(pattern_mask_table, part_id);\n\tint mask0 = mask_packed&0xFFFF;\n\tint mask1 = mask_packed>>16;\n\n\tint mask = (j==2) ? (~mask0)&(~mask1) : ( (j==0) ? mask0 : mask1 );\n\treturn mask;\n}\n\ninline void get_skips(int skips[3], int part_id)\n{\n\tstatic uniform const int skip_table[] = {\n        0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, \n        0xf0u, 0x20u, 0x80u, 0x20u, 0x20u, 0x80u, 0x80u, 0xf0u, 0x20u, 0x80u, 0x20u, 0x20u, 0x80u, 0x80u, 0x20u, 0x20u,\n        0xf0u, 0xf0u, 0x60u, 0x80u, 0x20u, 0x80u, 0xf0u, 0xf0u, 0x20u, 0x80u, 0x20u, 0x20u, 0x20u, 0xf0u, 0xf0u, 0x60u, \n        0x60u, 0x20u, 0x60u, 0x80u, 0xf0u, 0xf0u, 0x20u, 0x20u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0xf0u, 0x20u, 0x20u, 0xf0u,\n        0x3fu, 0x38u, 0xf8u, 0xf3u, 0x8fu, 0x3fu, 0xf3u, 0xf8u, 0x8fu, 0x8fu, 0x6fu, 0x6fu, 0x6fu, 0x5fu, 0x3fu, 0x38u, \n        0x3fu, 0x38u, 0x8fu, 0xf3u, 0x3fu, 0x38u, 0x6fu, 0xa8u, 0x53u, 0x8fu, 0x86u, 0x6au, 0x8fu, 0x5fu, 0xfau, 0xf8u,\n\t\t0x8fu, 0xf3u, 0x3fu, 0x5au, 0x6au, 0xa8u, 0x89u, 0xfau, 0xf6u, 0x3fu, 0xf8u, 0x5fu, 0xf3u, 0xf6u, 0xf6u, 0xf8u, \n        0x3fu, 0xf3u, 0x5fu, 0x5fu, 0x5fu, 0x8fu, 0x5fu, 0xafu, 0x5fu, 0xafu, 0x8fu, 0xdfu, 0xf3u, 0xcfu, 0x3fu, 0x38u\n\t};\n\n\tint skip_packed = gather_int(skip_table, part_id);\n\tskips[0] = 0;\n\tskips[1] = skip_packed>>4;\n\tskips[2] = skip_packed&15;\n}\n\n///////////////////////////\n//      PCA helpers\n\ninline void compute_stats_masked(float stats[15], float block[64], int mask, uniform int channels)\n{\n\tfor (uniform int i=0; i<15; i++) stats[i] = 0;\n\n\tint mask_shifted = mask<<1;\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tmask_shifted >>= 1;\n\t\t//if ((mask_shifted&1) == 0) continue;\n\t\tint flag = (mask_shifted&1);\n\n\t\tfloat rgba[4];\n\t\tfor (uniform int p=0; p<channels; p++) rgba[p] = block[k+p*16];\n\t\t\n\t\tfor (uniform int p=0; p<channels; p++) rgba[p] *= flag;\n\t\tstats[14] += flag;\n\n\t\tstats[10] += rgba[0];\n\t\tstats[11] += rgba[1];\n\t\tstats[12] += rgba[2];\n\n\t\tstats[0] += rgba[0]*rgba[0];\n\t\tstats[1] += rgba[0]*rgba[1];\n\t\tstats[2] += rgba[0]*rgba[2];\n\n\t\tstats[4] += rgba[1]*rgba[1];\n\t\tstats[5] += rgba[1]*rgba[2];\n\n\t\tstats[7] += rgba[2]*rgba[2];\n\n        if (channels==4)\n        {\n\t\t    stats[13] += rgba[3];\n\n    \t\tstats[3] += rgba[0]*rgba[3];\n\t    \tstats[6] += rgba[1]*rgba[3];\n\t\t    stats[8] += rgba[2]*rgba[3];\n\t\t    stats[9] += rgba[3]*rgba[3];\n        }\n\t}\n}\n\ninline void covar_from_stats(float covar[10], float stats[15], uniform int channels)\n{\n\tcovar[0] = stats[0] - stats[10+0]*stats[10+0]/stats[14];\n\tcovar[1] = stats[1] - stats[10+0]*stats[10+1]/stats[14];\n\tcovar[2] = stats[2] - stats[10+0]*stats[10+2]/stats[14];\n\n\tcovar[4] = stats[4] - stats[10+1]*stats[10+1]/stats[14];\n\tcovar[5] = stats[5] - stats[10+1]*stats[10+2]/stats[14];\n\n\tcovar[7] = stats[7] - stats[10+2]*stats[10+2]/stats[14];\n\n    if (channels == 4)\n    {\n        covar[3] = stats[3] - stats[10+0]*stats[10+3]/stats[14];\n\t    covar[6] = stats[6] - stats[10+1]*stats[10+3]/stats[14];\n\t    covar[8] = stats[8] - stats[10+2]*stats[10+3]/stats[14];\n\t    covar[9] = stats[9] - stats[10+3]*stats[10+3]/stats[14];\n    }\n}\n\ninline void compute_covar_dc_masked(float covar[6], float dc[3], float block[64], int mask, uniform int channels)\n{\n\tfloat stats[15];\n\tcompute_stats_masked(stats, block, mask, channels);\n\n\tcovar_from_stats(covar, stats, channels);\n\tfor (uniform int p=0; p<channels; p++) dc[p] = stats[10+p]/stats[14];\n}\n\nvoid block_pca_axis(float axis[4], float dc[4], float block[64], int mask, uniform int channels)\n{\n\tuniform const int powerIterations = 8; // 4 not enough for HQ\n\n    float covar[10];\n\tcompute_covar_dc_masked(covar, dc, block, mask, channels);\n\n    //float var = covar[0] + covar[4] + covar[7] + covar[9] + 256;\n    float inv_var = 1.0 / (256 * 256);\n    for (uniform int k = 0; k < 10; k++)\n    {\n        covar[k] *= inv_var;\n    }\n\n    float eps = sq(0.001);\n    covar[0] += eps;\n\tcovar[4] += eps;\n\tcovar[7] += eps;\n\tcovar[9] += eps;\n\n\tcompute_axis(axis, covar, powerIterations, channels);\n}\n\nvoid block_segment_core(float ep[], float block[64], int mask, uniform int channels)\n{\n\tfloat axis[4];\n\tfloat dc[4];\n\tblock_pca_axis(axis, dc, block, mask, channels);\n\t\n\tfloat ext[2];\n\text[0] = +1e99;\n\text[1] = -1e99;\n\n\t// find min/max\n\tint mask_shifted = mask<<1;\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tmask_shifted >>= 1;\n\t\tif ((mask_shifted&1) == 0) continue;\n\n\t\tfloat dot = 0;\n\t\tfor (uniform int p=0; p<channels; p++)\n\t\t\tdot += axis[p]*(block[16*p+k]-dc[p]);\n\n\t\text[0] = min(ext[0], dot);\n        ext[1] = max(ext[1], dot);\n\t}\n\n\t// create some distance if the endpoints collapse\n\tif (ext[1]-ext[0] < 1f)\n\t{\n\t\text[0] -= 0.5f;\n\t\text[1] += 0.5f;\n\t}\n\n    for (uniform int i=0; i<2; i++)\n\tfor (uniform int p=0; p<channels; p++)\n\t{\n        ep[4*i+p] = ext[i]*axis[p]+dc[p];\n    }\n}\n\nvoid block_segment(float ep[], float block[64], int mask, uniform int channels)\n{\n    block_segment_core(ep, block, mask, channels);\n\n\tfor (uniform int i=0; i<2; i++)\n\tfor (uniform int p=0; p<channels; p++)\n\t{\n\t\tep[4*i+p] = clamp(ep[4*i+p], 0, 255);\n\t}\n}\n\nfloat get_pca_bound(float covar[10], uniform int channels)\n{\n    uniform const int powerIterations = 4; // quite approximative, but enough for bounding\n\n    float inv_var = 1.0 / (256 * 256);\n    for (uniform int k = 0; k < 10; k++)\n    {\n        covar[k] *= inv_var;\n    }\n\n\tfloat eps = sq(0.001);\n\tcovar[0] += eps;\n\tcovar[4] += eps;\n\tcovar[7] += eps;\n\n\tfloat axis[4];\n\tcompute_axis(axis, covar, powerIterations, channels);\n\n\tfloat vec[4];\n    if (channels == 3) ssymm3(vec, covar, axis);\n    if (channels == 4) ssymm4(vec, covar, axis);\n\n\tfloat sq_sum = 0f;\n\tfor (uniform int p=0; p<channels; p++) sq_sum += sq(vec[p]);\n\tfloat lambda = sqrt(sq_sum);\n\n\tfloat bound = covar[0]+covar[4]+covar[7];\n    if (channels == 4) bound += covar[9];\n\tbound -= lambda;\n\tbound = max(bound, 0.0);\n\n\treturn bound;\n}\n\nfloat block_pca_bound(float block[64], int mask, uniform int channels)\n{\n\tfloat stats[15];\n\tcompute_stats_masked(stats, block, mask, channels);\n\n\tfloat covar[10];\n\tcovar_from_stats(covar, stats, channels);\n\n\treturn get_pca_bound(covar, channels);\n}\n\nfloat block_pca_bound_split(float block[64], int mask, float full_stats[15], uniform int channels)\n{\n    float stats[15];\n\tcompute_stats_masked(stats, block, mask, channels);\n    \n\tfloat covar1[10];\n\tcovar_from_stats(covar1, stats, channels);\n\t\n\tfor (uniform int i=0; i<15; i++)\n\t\tstats[i] = full_stats[i] - stats[i];\n\n\tfloat covar2[10];\n\tcovar_from_stats(covar2, stats, channels);\n\n\tfloat bound = 0f;\n\tbound += get_pca_bound(covar1, channels);\n\tbound += get_pca_bound(covar2, channels);\n\n\treturn sqrt(bound)*256;\n}\n\n///////////////////////////\n// endpoint quantization\n\ninline int unpack_to_byte(int v, uniform const int bits)\n{\n\tassert(bits >= 4);\n\tint vv = v<<(8-bits);\n\treturn vv + shift_right(vv, bits);\n}\n\nvoid ep_quant0367(int qep[], float ep[], uniform int mode, uniform int channels)\n{\n\tuniform int bits = 7;\n    if (mode == 0) bits = 4;\n    if (mode == 7) bits = 5;\n\n\tuniform int levels = 1 << bits;\n\tuniform int levels2 = levels*2-1;\n        \n    for (uniform int i=0; i<2; i++)\n\t{\n\t    int qep_b[8];\n    \n\t\tfor (uniform int b=0; b<2; b++)\n\t\tfor (uniform int p=0; p<4; p++)\n\t\t{\n\t\t\tint v = (int)((ep[i*4+p]/255f*levels2-b)/2+0.5)*2+b;\n\t\t\tqep_b[b*4+p] = clamp(v, b, levels2-1+b);\n\t\t}\n\n\t\tfloat ep_b[8];\n\t\tfor (uniform int j=0; j<8; j++)\n\t\t\tep_b[j] = qep_b[j];\n\n\t\tif (mode==0)\n\t\tfor (uniform int j=0; j<8; j++)\n\t\t\tep_b[j] = unpack_to_byte(qep_b[j], 5);\n    \n        float err0 = 0f;\n        float err1 = 0f;\n        for (uniform int p=0; p<channels; p++)\n        {\n            err0 += sq(ep[i*4+p]-ep_b[0+p]);\n            err1 += sq(ep[i*4+p]-ep_b[4+p]);\n        }\n\n\t\tfor (uniform int p=0; p<4; p++)\n\t\t\tqep[i*4+p] = (err0<err1) ? qep_b[0+p] : qep_b[4+p];\n    }\n}\n\nvoid ep_quant1(int qep[], float ep[], uniform int mode)\n{\n\tint qep_b[16];\n        \n    for (uniform int b=0; b<2; b++)\n\tfor (uniform int i=0; i<8; i++)\n    {\n        int v = ((int)((ep[i]/255f*127f-b)/2+0.5))*2+b;\n\t\tqep_b[b*8+i] = clamp(v, b, 126+b);\n    }\n    \n\t// dequant\n\tfloat ep_b[16];\n\tfor (uniform int k=0; k<16; k++)\n        ep_b[k] = unpack_to_byte(qep_b[k], 7);\n\n\tfloat err0 = 0f;\n    float err1 = 0f;\n    for (uniform int j = 0; j < 2; j++)\n    for (uniform int p = 0; p < 3; p++)\n    {\n        err0 += sq(ep[j * 4 + p] - ep_b[0 + j * 4 + p]);\n        err1 += sq(ep[j * 4 + p] - ep_b[8 + j * 4 + p]);\n    }\n\n\tfor (uniform int i=0; i<8; i++)\n\t\tqep[i] = (err0<err1) ? qep_b[0+i] : qep_b[8+i];\n\n}\n\nvoid ep_quant245(int qep[], float ep[], uniform int mode)\n{\n\tuniform int bits = 5;\n    if (mode == 5) bits = 7;\n    uniform int levels = 1 << bits;\n        \n\tfor (uniform int i=0; i<8; i++)\n\t{\n\t\tint v = ((int)(ep[i]/255f*(levels-1)+0.5));\n\t\tqep[i] = clamp(v, 0, levels-1);\n\t}\n}\n\nvoid ep_quant(int qep[], float ep[], uniform int mode, uniform int channels)\n{\n\tassert(mode <= 7);\n\tstatic uniform const int pairs_table[] = {3,2,3,2,1,1,1,2};\n\tuniform const int pairs = pairs_table[mode];\n\n\tif (mode == 0 || mode == 3 || mode == 6 || mode == 7)\n\t{\n\t\tfor (uniform int i=0; i<pairs; i++)\n\t\t\tep_quant0367(&qep[i*8], &ep[i*8], mode, channels);\n\t}\n\telse if (mode == 1)\n\t{\n\t\tfor (uniform int i=0; i<pairs; i++)\n\t\t\tep_quant1(&qep[i*8], &ep[i*8], mode);\n\t}\n\telse if (mode == 2 || mode == 4 || mode == 5)\n\t{\n\t\tfor (uniform int i=0; i<pairs; i++)\n\t\t\tep_quant245(&qep[i*8], &ep[i*8], mode);\n\t}\n\telse \n\t\tassert(false);\n\n}\n\nvoid ep_dequant(float ep[], int qep[], uniform int mode)\n{\n    assert(mode <= 7);\n\tstatic uniform const int pairs_table[] = {3,2,3,2,1,1,1,2};\n\tuniform const int pairs = pairs_table[mode];\n    \n\t// mode 3, 6 are 8-bit\n\tif (mode == 3 || mode == 6)\n    {\n\t    for (uniform int i=0; i<8*pairs; i++)\n\t\t    ep[i] = qep[i];\n    }\n    else if (mode == 1 || mode == 5)\n    {\n\t    for (uniform int i=0; i<8*pairs; i++)\n            ep[i] = unpack_to_byte(qep[i], 7);\n    }\n    else if (mode == 0 || mode == 2 || mode == 4)\n    {\n\t    for (uniform int i=0; i<8*pairs; i++)\n            ep[i] = unpack_to_byte(qep[i], 5);\n    }\n    else if (mode == 7)\n\t{\n        for (uniform int i=0; i<8*pairs; i++)\n            ep[i] = unpack_to_byte(qep[i], 6);\n    }\n    else \n\t\tassert(false);\n}\n\nvoid ep_quant_dequant(int qep[], float ep[], uniform int mode, uniform int channels)\n{\n\tep_quant(qep, ep, mode, channels);\n\tep_dequant(ep, qep, mode);\n}\n\n///////////////////////////\n//   pixel quantization\n\nfloat block_quant(uint32 qblock[2], float block[64], uniform int bits, float ep[], uint32 pattern, uniform int channels)\n{\n\tfloat total_err = 0;\n\tuniform const int* uniform unquant_table = get_unquant_table(bits);\n    int levels = 1 << bits;\n\n\t// 64-bit qblock: 5% overhead in this function\n\tfor (uniform int k=0; k<2; k++) qblock[k] = 0;\n\n\tint pattern_shifted = pattern;\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tint j = pattern_shifted&3;\n\t\tpattern_shifted >>= 2;\n\n\t\tfloat proj = 0;\n\t\tfloat div = 0;\n\t\tfor (uniform int p=0; p<channels; p++)\n        {\n\t\t\tfloat ep_a = gather_float(ep, 8*j+0+p);\n\t\t\tfloat ep_b = gather_float(ep, 8*j+4+p);\n            proj += (block[k+p*16]-ep_a)*(ep_b-ep_a);\n            div += sq(ep_b-ep_a);\n        }\n        \n        proj /= div;\n        \t\t\n\t\tint q1 = (int)(proj*levels+0.5);\n\t\tq1 = clamp(q1, 1, levels-1);\n\t\t\n\t\tfloat err0 = 0;\n\t\tfloat err1 = 0;\n\t\tint w0 = gather_int(unquant_table, q1-1);\n\t\tint w1 = gather_int(unquant_table, q1);\n\n\t\tfor (uniform int p=0; p<channels; p++)\n\t\t{\n\t\t\tfloat ep_a = gather_float(ep, 8*j+0+p);\n\t\t\tfloat ep_b = gather_float(ep, 8*j+4+p);\n\t\t\tfloat dec_v0 = (int)(((64-w0)*ep_a + w0*ep_b + 32)/64);\n\t\t\tfloat dec_v1 = (int)(((64-w1)*ep_a + w1*ep_b + 32)/64);\n\t\t\terr0 += sq(dec_v0 - block[k+p*16]);\n\t\t\terr1 += sq(dec_v1 - block[k+p*16]);\n\t\t}\n\t\t\n\t\tint best_err = err1;\n\t\tint best_q = q1;\n\t\tif (err0<err1)\n\t\t{\n\t\t\tbest_err = err0;\n\t\t\tbest_q = q1-1;\n\t\t}\n\n\t\tassert(best_q>=0 && best_q<=levels-1);\n\n\t\tqblock[k/8] += ((uint32)best_q) << 4*(k%8);\n\t\ttotal_err += best_err;\n    }\n\n\treturn total_err;\n}\n\n///////////////////////////\n// LS endpoint refinement\n\nvoid opt_endpoints(float ep[], float block[64], uniform int bits, uint32 qblock[2], int mask, uniform int channels)\n{\n\tuniform int levels = 1 << bits;\n    \n\tfloat Atb1[4] = {0,0,0,0};\n\tfloat sum_q = 0;\n\tfloat sum_qq = 0;\n\tfloat sum[5] = {0,0,0,0,0};\n                \n\tint mask_shifted = mask<<1;\n\tfor (uniform int k1=0; k1<2; k1++)\n\t{\n\t\tuint32 qbits_shifted = qblock[k1];\n\t\tfor (uniform int k2=0; k2<8; k2++)\n\t\t{\n\t\t\tuniform int k = k1*8+k2;\n\t\t\tfloat q = (int)(qbits_shifted&15);\n\t\t\tqbits_shifted >>= 4;\n\n\t\t\tmask_shifted >>= 1;\n\t\t\tif ((mask_shifted&1) == 0) continue;\n\t\t\n\t\t\tint x = (levels-1)-q;\n\t\t\tint y = q;\n            \n\t\t\tsum_q += q;\n\t\t\tsum_qq += q*q;\n\n\t\t\tsum[4] += 1;\n\t\t\tfor (uniform int p=0; p<channels; p++) sum[p] += block[k+p*16];\n\t\t\tfor (uniform int p=0; p<channels; p++) Atb1[p] += x*block[k+p*16];\n\t\t}\n\t}\n        \n\tfloat Atb2[4];\n\tfor (uniform int p=0; p<channels; p++) \n\t{\n\t\t//sum[p] = dc[p]*16;\n\t\tAtb2[p] = (levels-1)*sum[p]-Atb1[p];\n\t}\n        \n\tfloat Cxx = sum[4]*sq(levels-1)-2*(levels-1)*sum_q+sum_qq;\n\tfloat Cyy = sum_qq;\n\tfloat Cxy = (levels-1)*sum_q-sum_qq;\n\tfloat scale = (levels-1) / (Cxx*Cyy - Cxy*Cxy);\n\n    for (uniform int p=0; p<channels; p++)\n    {\n        ep[0+p] = (Atb1[p]*Cyy - Atb2[p]*Cxy)*scale;\n        ep[4+p] = (Atb2[p]*Cxx - Atb1[p]*Cxy)*scale;\n\t\t\t\n\t\t//ep[0+p] = clamp(ep[0+p], 0, 255);\n\t\t//ep[4+p] = clamp(ep[4+p], 0, 255);\n    }\n\n\tif (abs(Cxx*Cyy - Cxy*Cxy) < 0.001)\n\t{\n\t\t// flatten\n\t\tfor (uniform int p=0; p<channels; p++)\n\t\t{\n\t\t\tep[0+p] = sum[p]/sum[4];\n\t\t\tep[4+p] = ep[0+p];\n\t\t}\n\t}\n}\n\n//////////////////////////\n// parameter estimation\n\nfloat compute_opaque_err(float block[64], uniform int channels)\n{\n    if (channels == 3) return 0;\n    float err = 0f;\n    for (uniform int k=0; k<16; k++)\n    {\n        err += sq(block[48+k]-255);\n    }\n\n    return err;\n}\n\nfloat bc7_enc_mode01237_part_fast(int qep[24], uint32 qblock[2], float block[64], int part_id, uniform int mode)\n{\n\tuint32 pattern = get_pattern(part_id);\n\tuniform int bits = 2;  if (mode == 0 || mode == 1) bits = 3;\n    uniform int pairs = 2; if (mode == 0 || mode == 2) pairs = 3;\n    uniform int channels = 3; if (mode == 7) channels = 4;\n\n\tfloat ep[24];\n\tfor (uniform int j=0; j<pairs; j++)\n\t{\n\t\tint mask = get_pattern_mask(part_id, j);\n\t\tblock_segment(&ep[j*8], block, mask, channels);\n\t}\n\n\tep_quant_dequant(qep, ep, mode, channels);\n\n\tfloat total_err = block_quant(qblock, block, bits, ep, pattern, channels);\n\treturn total_err;\n}\n\nvoid bc7_enc_mode01237(bc7_enc_state state[], uniform int mode, int part_list[], uniform int part_count)\n{\n\tif (part_count == 0) return;\n\tuniform int bits = 2;  if (mode == 0 || mode == 1) bits = 3;\n    uniform int pairs = 2; if (mode == 0 || mode == 2) pairs = 3;\n    uniform int channels = 3; if (mode == 7) channels = 4;\n\n\tint best_qep[24];\n\tuint32 best_qblock[2];\n\tint best_part_id = -1;\n\tfloat best_err = 1e99;\n\n\tfor (uniform int part=0; part<part_count; part++)\n\t{\n\t\tint part_id = part_list[part]&63;\n        if (pairs == 3) part_id += 64;\n\n\t\tint qep[24];\n\t\tuint32 qblock[2];\n\t\tfloat err = bc7_enc_mode01237_part_fast(qep, qblock, state->block, part_id, mode);\n        \n\t\tif (err<best_err)\n\t\t{\n\t\t\tfor (uniform int i=0; i<8*pairs; i++) best_qep[i] = qep[i];\n\t\t\tfor (uniform int k=0; k<2; k++) best_qblock[k] = qblock[k];\n\t\t\tbest_part_id = part_id;\n\t\t\tbest_err = err;\n\t\t}\n\t}\n    \n\t// refine\n    uniform int refineIterations = state->refineIterations[mode];\n\tfor (uniform int _=0; _<refineIterations; _++)\n\t{\n\t\tfloat ep[24];\n\t\tfor (uniform int j=0; j<pairs; j++)\n\t\t{\n\t\t\tint mask = get_pattern_mask(best_part_id, j);\n\t\t\topt_endpoints(&ep[j*8], state->block, bits, best_qblock, mask, channels);\n\t\t}\n\n\t\tint qep[24];\n\t\tuint32 qblock[2];\n\n\t\tep_quant_dequant(qep, ep, mode, state->channels);\n\t\t\n\t\tuint32 pattern = get_pattern(best_part_id);\n\t\tfloat err = block_quant(qblock, state->block, bits, ep, pattern, channels);\n\n\t\tif (err<best_err)\n\t\t{\n\t\t\tfor (uniform int i=0; i<8*pairs; i++) best_qep[i] = qep[i];\n\t\t\tfor (uniform int k=0; k<2; k++) best_qblock[k] = qblock[k];\n\t\t\tbest_err = err;\n\t\t}\n\t}\n    \n\tif (mode != 7) best_err += state->opaque_err; // take into account alpha channel\n\n\tif (best_err<state->best_err)\n    {\n        state->best_err = best_err;\n        bc7_code_mode01237(state->best_data, best_qep, best_qblock, best_part_id, mode);\n    }\n}\n\nvoid partial_sort_list(int list[], uniform int length, uniform int partial_count)\n{\n\tfor (uniform int k=0; k<partial_count; k++)\n\t{\n\t\tint best_idx = k;\n\t\tint best_value = list[k];\n\t\tfor (uniform int i=k+1; i<length; i++)\n\t\t{\n\t\t\tif (best_value > list[i])\n\t\t\t{\n\t\t\t\tbest_value = list[i];\n\t\t\t\tbest_idx = i;\n\t\t\t}\n\t\t}\n\n\t\t// swap\n\t\tscatter_int(list, best_idx, list[k]);\n\t\tlist[k] = best_value;\n\t}\n}\n\nvoid bc7_enc_mode02(bc7_enc_state state[])\n{\n\tint part_list[64];\n\tfor (uniform int part=0; part<64; part++)\n\t\tpart_list[part] = part;\n\n\tbc7_enc_mode01237(state, 0, part_list, 16); \n\tif (!state->skip_mode2) bc7_enc_mode01237(state, 2, part_list, 64); // usually not worth the time\n}\n\nvoid bc7_enc_mode13(bc7_enc_state state[])\n{\n\tif (state->fastSkipTreshold_mode1 == 0 && state->fastSkipTreshold_mode3 == 0) return;\n\n\tfloat full_stats[15];\n\tcompute_stats_masked(full_stats, state->block, -1, 3);\n\n\tint part_list[64];\n\tfor (uniform int part=0; part<64; part++)\n\t{\n\t\tint mask = get_pattern_mask(part+0, 0);\n\t\tfloat bound12 = block_pca_bound_split(state->block, mask, full_stats, 3);\n\t\tint bound = (int)(bound12);\n\t\tpart_list[part] = part+bound*64;\n\t}\n\n\tpartial_sort_list(part_list, 64, max(state->fastSkipTreshold_mode1, state->fastSkipTreshold_mode3));\n\tbc7_enc_mode01237(state, 1, part_list, state->fastSkipTreshold_mode1);\n\tbc7_enc_mode01237(state, 3, part_list, state->fastSkipTreshold_mode3);\n}\n\nvoid bc7_enc_mode7(bc7_enc_state state[])\n{\n    if (state->fastSkipTreshold_mode7 == 0) return;\n\n\tfloat full_stats[15];\n\tcompute_stats_masked(full_stats, state->block, -1, state->channels);\n\n\tint part_list[64];\n\tfor (uniform int part=0; part<64; part++)\n\t{\n\t\tint mask = get_pattern_mask(part+0, 0);\n\t\tfloat bound12 = block_pca_bound_split(state->block, mask, full_stats, state->channels);\n\t\tint bound = (int)(bound12);\n\t\tpart_list[part] = part+bound*64;\n\t}\n\n\tpartial_sort_list(part_list, 64, state->fastSkipTreshold_mode7);\n\tbc7_enc_mode01237(state, 7, part_list, state->fastSkipTreshold_mode7);\n}\n\nvoid channel_quant_dequant(int qep[2], float ep[2], uniform int epbits)\n{\n\tint elevels = (1<<epbits);\n\n\tfor (uniform int i=0; i<2; i++)\n\t{\n\t\tint v = ((int)(ep[i]/255f*(elevels-1)+0.5));\n\t\tqep[i] = clamp(v, 0, elevels-1);\n\t\tep[i] = unpack_to_byte(qep[i], epbits);\n\t}\n}\n\nvoid channel_opt_endpoints(float ep[2], float block[16], uniform int bits, uint32 qblock[2])\n{\n\tuniform int levels = 1 << bits;\n\n\tfloat Atb1 = 0;\n\tfloat sum_q = 0;\n\tfloat sum_qq = 0;\n\tfloat sum = 0;\n                \n\tfor (uniform int k1=0; k1<2; k1++)\n\t{\n\t\tuint32 qbits_shifted = qblock[k1];\n\t\tfor (uniform int k2=0; k2<8; k2++)\n\t\t{\n\t\t\tuniform int k = k1*8+k2;\n\t\t\tfloat q = (int)(qbits_shifted&15);\n\t\t\tqbits_shifted >>= 4;\n\n\t\t\tint x = (levels-1)-q;\n\t\t\tint y = q;\n            \n\t\t\tsum_q += q;\n\t\t\tsum_qq += q*q;\n\n\t\t\tsum += block[k];\n\t\t\tAtb1 += x*block[k];\n\t\t}\n\t}\n        \n\tfloat Atb2 = (levels-1)*sum-Atb1;\n        \n\tfloat Cxx = 16*sq(levels-1)-2*(levels-1)*sum_q+sum_qq;\n\tfloat Cyy = sum_qq;\n\tfloat Cxy = (levels-1)*sum_q-sum_qq;\n\tfloat scale = (levels-1) / (Cxx*Cyy - Cxy*Cxy);\n\n    ep[0] = (Atb1*Cyy - Atb2*Cxy)*scale;\n    ep[1] = (Atb2*Cxx - Atb1*Cxy)*scale;\n\t\t\t\n\tep[0] = clamp(ep[0], 0, 255);\n\tep[1] = clamp(ep[1], 0, 255);\n\n\tif (abs(Cxx*Cyy - Cxy*Cxy) < 0.001)\n\t{\n\t\tep[0] = sum/16;\n\t\tep[1] = ep[0];\n\t}\n}\n\nfloat channel_opt_quant(uint32 qblock[2], float block[16], uniform int bits, float ep[])\n{\n\tuniform const int* uniform unquant_table = get_unquant_table(bits);\n\tint levels = (1<<bits);\n\n\tqblock[0] = 0;\n\tqblock[1] = 0;\n\n\tfloat total_err = 0;\n\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tfloat proj = (block[k]-ep[0])/(ep[1]-ep[0]+0.001f);\n\n\t\tint q1 = (int)(proj*levels+0.5);\n\t\tq1 = clamp(q1, 1, levels-1);\n\n\t\tfloat err0 = 0;\n\t\tfloat err1 = 0;\n\t\tint w0 = gather_int(unquant_table, q1-1);\n\t\tint w1 = gather_int(unquant_table, q1);\n\t\t\n\t\tfloat dec_v0 = (int)(((64-w0)*ep[0] + w0*ep[1] + 32)/64);\n\t\tfloat dec_v1 = (int)(((64-w1)*ep[0] + w1*ep[1] + 32)/64);\n\t\terr0 += sq(dec_v0 - block[k]);\n\t\terr1 += sq(dec_v1 - block[k]);\n\n\t\tint best_err = err1;\n\t\tint best_q = q1;\n\t\tif (err0<err1)\n\t\t{\n\t\t\tbest_err = err0;\n\t\t\tbest_q = q1-1;\n\t\t}\n\n\t\tqblock[k/8] += ((uint32)best_q) << 4*(k%8);\n\t\ttotal_err += best_err;\n\t}\n\n\treturn total_err;\n}\n\nfloat opt_channel(bc7_enc_state state[], uint32 qblock[2], int qep[2], float block[16], uniform int bits, uniform int epbits)\n{\n\tfloat ep[2] = {255,0};\n\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tep[0] = min(ep[0], block[k]);\n\t\tep[1] = max(ep[1], block[k]);\n\t}\n\n\tchannel_quant_dequant(qep, ep, epbits);\n\tfloat err = channel_opt_quant(qblock, block, bits, ep);\n\t\t\n\t// refine\n\tuniform const int refineIterations = state->refineIterations_channel;\n    for (uniform int i=0; i<refineIterations; i++)\n\t{\n\t\tchannel_opt_endpoints(ep, block, bits, qblock);\n\t\tchannel_quant_dequant(qep, ep, epbits);\n\t\terr = channel_opt_quant(qblock, block, bits, ep);\n\t}\n\n\treturn err;\n}\n\nvoid bc7_enc_mode45_candidate(bc7_enc_state state[], mode45_parameters best_candidate[], \n\tfloat best_err[], uniform int mode, uniform int rotation, uniform int swap)\n{\n\tuniform int bits = 2; \n    uniform int abits = 2;   if (mode==4) abits = 3;\n\tuniform int aepbits = 8; if (mode==4) aepbits = 6;\n\tif (swap==1) { bits = 3; abits = 2; } // (mode 4)\n\n\tfloat block[48];\n\tfor (uniform int k=0; k<16; k++)\n\t{\n\t\tfor (uniform int p=0; p<3; p++)\n\t\t\tblock[k+p*16] = state->block[k+p*16];\n\n\t\tif (rotation < 3)\n\t\t{\n\t\t\t// apply channel rotation\n\t\t\tif (state->channels == 4) block[k+rotation*16] = state->block[k+3*16];\n\t\t\tif (state->channels == 3) block[k+rotation*16] = 255;\n\t\t}\n\t}\n\t\n\tfloat ep[8];\n\tblock_segment(ep, block, -1, 3);\n\n\tint qep[8];\n\tep_quant_dequant(qep, ep, mode, 3);\n\n\tuint32 qblock[2];\n\tfloat err = block_quant(qblock, block, bits, ep, 0, 3);\n\t\n\t// refine\n    uniform int refineIterations = state->refineIterations[mode];\n\tfor (uniform int i=0; i<refineIterations; i++)\n    {\n        opt_endpoints(ep, block, bits, qblock, -1, 3);\n        ep_quant_dequant(qep, ep, mode, 3);\n\t\terr = block_quant(qblock, block, bits, ep, 0, 3);\n    }\n\n\t// encoding selected channel \n\tint aqep[2];\n\tuint32 aqblock[2];\n\terr += opt_channel(state, aqblock, aqep, &state->block[rotation*16], abits, aepbits);\n\n\tif (err<*best_err)\n\t{\n\t\t\n\t\tswap_ints(best_candidate->qep, qep, 8);\n\t\tswap_uints(best_candidate->qblock, qblock, 2);\n\t\tswap_ints(best_candidate->aqep, aqep, 2);\n\t\tswap_uints(best_candidate->aqblock, aqblock, 2);\n\t\tbest_candidate->rotation = rotation;\n\t\tbest_candidate->swap = swap;\n\t\t*best_err = err;\n\t}\t\n}\n\nvoid bc7_enc_mode45(bc7_enc_state state[])\n{\n\tmode45_parameters best_candidate;\n\tfloat best_err = state->best_err;\n\n\tmemset(&best_candidate, 0, sizeof(mode45_parameters));\n\n    uniform int channel0 = state->mode45_channel0;\n\tfor (uniform int p=channel0; p<state->channels; p++)\n\t{\n    \tbc7_enc_mode45_candidate(state, &best_candidate, &best_err, 4, p, 0);\n\t\tbc7_enc_mode45_candidate(state, &best_candidate, &best_err, 4, p, 1);\n\t}\n\n\t// mode 4\n\tif (best_err<state->best_err)\n    {\n        state->best_err = best_err;\n        bc7_code_mode45(state->best_data, &best_candidate, 4);\n    }\n    \n    for (uniform int p=channel0; p<state->channels; p++)\n\t{\n\t\tbc7_enc_mode45_candidate(state, &best_candidate, &best_err, 5, p, 0);\n\t}\n\n\t// mode 5\n\tif (best_err<state->best_err)\n    {\n        state->best_err = best_err;\n        bc7_code_mode45(state->best_data, &best_candidate, 5);\n    }\n}\n\nvoid bc7_enc_mode6(bc7_enc_state state[])\n{\n\tuniform int mode = 6;\n\tuniform int bits = 4;\n\tfloat ep[8];\n    block_segment(ep, state->block, -1, state->channels);\n    \n\tif (state->channels == 3)\n\t{\n\t\tep[3] = ep[7] = 255;\n\t}\n\n\tint qep[8];\n\tep_quant_dequant(qep, ep, mode, state->channels);\n\n\tuint32 qblock[2];\n\tfloat err = block_quant(qblock, state->block, bits, ep, 0, state->channels);\n\n\t// refine\n\tuniform int refineIterations = state->refineIterations[mode];\n    for (uniform int i=0; i<refineIterations; i++)\n    {\n        opt_endpoints(ep, state->block, bits, qblock, -1, state->channels);\n        ep_quant_dequant(qep, ep, mode, state->channels);\n\t\terr = block_quant(qblock, state->block, bits, ep, 0, state->channels);\n    }\n        \n    if (err<state->best_err)\n    {\n        state->best_err = err;\n        bc7_code_mode6(state->best_data, qep, qblock);\n    }\n}\n\n//////////////////////////\n// BC7 bitstream coding\n\nvoid bc7_code_apply_swap_mode456(int qep[], uniform int channels, uint32 qblock[2], uniform int bits)\n{\n\tuniform int levels = 1 << bits;\n\tif ((qblock[0]&15)>=levels/2)\n    {\n\t\tswap_ints(&qep[0], &qep[channels], channels);\n            \n\t\tfor (uniform int k=0; k<2; k++)\n\t\t\tqblock[k] = (uint32)(0x11111111*(levels-1)) - qblock[k];\n    }\n\n\tassert((qblock[0]&15) < levels/2);\n}\n\nint bc7_code_apply_swap_mode01237(int qep[], uint32 qblock[2], uniform int mode, int part_id)\n{\n\tuniform int bits = 2;  if (mode == 0 || mode == 1) bits = 3;\n    uniform int pairs = 2; if (mode == 0 || mode == 2) pairs = 3;\n\n\tint flips = 0;\n\tuniform int levels = 1 << bits;\n\tint skips[3];\n\tget_skips(skips, part_id);\n\n\tfor (uniform int j=0; j<pairs; j++)\n\t{\n\t\tint k0 = skips[j];\n\t\t//int q = (qblock[k0/8]>>((k0%8)*4))&15;\n\t\tint q = ((gather_uint(qblock, k0>>3)<<(28-(k0&7)*4))>>28);\n\t\t\n\t\tif (q>=levels/2)\n\t\t{\n\t\t\tswap_ints(&qep[8*j], &qep[8*j+4], 4);\n\t\t\tuint32 pmask = get_pattern_mask(part_id, j);\n\t\t\tflips |= pmask;\n\t\t}\n    }\n\n\treturn flips;\n}\n\nvoid put_bits(uint32 data[5], uniform int* uniform pos, uniform int bits, int v)\n{\n\tassert(v<pow2(bits));\n\tdata[*pos/32] |= ((uint32)v) << (*pos%32);\n\tif (*pos%32+bits>32)\n\t{\n\t\tdata[*pos/32+1] |= shift_right(v, 32-*pos%32);\n\t}\n\t*pos += bits;\n}\n\ninline void data_shl_1bit_from(uint32 data[5], int from)\n{\n\tif (from < 96)\n\t{\n\t\tassert(from > 64+10);\n\n\t\tuint32 shifted = (data[2]>>1) | (data[3]<<31); \n\t\tuint32 mask = (pow2(from-64)-1)>>1;\n\t\tdata[2] = (mask&data[2]) | (~mask&shifted);\n\t\tdata[3] = (data[3]>>1) | (data[4]<<31);\n\t\tdata[4] = data[4]>>1;\n\t}\n\telse if (from < 128)\n\t{\n\t\tuint32 shifted = (data[3]>>1) | (data[4]<<31); \n\t\tuint32 mask = (pow2(from-96)-1)>>1;\n\t\tdata[3] = (mask&data[3]) | (~mask&shifted);\n\t\tdata[4] = data[4]>>1;\n\t}\n}\n\nvoid bc7_code_qblock(uint32 data[5], uniform int* uniform pPos, uint32 qblock[2], uniform int bits, int flips)\n{\n\tuniform int levels = 1 << bits;\n\tint flips_shifted = flips;\n\tfor (uniform int k1=0; k1<2; k1++)\n\t{\n\t\tuint32 qbits_shifted = qblock[k1];\n\t\tfor (uniform int k2=0; k2<8; k2++)\n\t\t{\n\t\t\tint q = qbits_shifted&15;\n\t\t\tif ((flips_shifted&1)>0) q = (levels-1)-q;\n\n\t\t\tif (k1==0 && k2==0)\tput_bits(data, pPos, bits-1, q);\n\t\t\telse\t\t\t\tput_bits(data, pPos, bits  , q);\n\t\t\tqbits_shifted >>= 4;\n\t\t\tflips_shifted >>= 1;\n\t\t}\n\t}\n}\n\nvoid bc7_code_adjust_skip_mode01237(uint32 data[5], uniform int mode, int part_id)\n{\n\tuniform int bits = 2;  if (mode == 0 || mode == 1) bits = 3;\n    uniform int pairs = 2; if (mode == 0 || mode == 2) pairs = 3;\n\t\t\n\tint skips[3];\n\tget_skips(skips, part_id);\n\n\tif (pairs>2 && skips[1] < skips[2])\n\t{\n\t\tint t = skips[1]; skips[1] = skips[2]; skips[2] = t;\n\t}\n\n\tfor (uniform int j=1; j<pairs; j++)\n\t{\n\t\tint k = skips[j];\n\t\tdata_shl_1bit_from(data, 128+(pairs-1)-(15-k)*bits);\n\t}\n}\n\nvoid bc7_code_mode01237(uint32 data[5], int qep[], uint32 qblock[2], int part_id, uniform int mode)\n{\n\tuniform int bits = 2;  if (mode == 0 || mode == 1) bits = 3;\n    uniform int pairs = 2; if (mode == 0 || mode == 2) pairs = 3;\n    uniform int channels = 3; if (mode == 7) channels = 4;\n\n    int flips = bc7_code_apply_swap_mode01237(qep, qblock, mode, part_id);\n\n\tfor (uniform int k=0; k<5; k++) data[k] = 0;\n    uniform int pos = 0;\n\n    // mode 0-3, 7\n    put_bits(data, &pos, mode+1, 1<<mode);\n    \n    // partition\n    if (mode==0)\n    {\n        put_bits(data, &pos, 4, part_id&15);\n    }\n    else\n    {\n        put_bits(data, &pos, 6, part_id&63);\n    }\n    \n    // endpoints\n    for (uniform int p=0; p<channels; p++)\n\tfor (uniform int j=0; j<pairs*2; j++)\n    {\n        if (mode == 0)\n        {\n            put_bits(data, &pos, 4, qep[j*4+0+p]>>1);\n        }\n        else if (mode == 1)\n        {\n            put_bits(data, &pos, 6, qep[j*4+0+p]>>1);\n        }\n        else if (mode == 2)\n        {\n            put_bits(data, &pos, 5, qep[j*4+0+p]);\n        }\n        else if (mode == 3)\n        {\n\t\t\tput_bits(data, &pos, 7, qep[j*4+0+p]>>1);\n        }\n        else if (mode == 7)\n        {\n            put_bits(data, &pos, 5, qep[j*4+0+p]>>1);\n        }\n        else\n        {\n            assert(false);\n        }\n    }\n    \n    // p bits\n    if (mode == 1)\n\tfor (uniform int j=0; j<2; j++)\n    {\n        put_bits(data, &pos, 1, qep[j*8]&1);\n    }\n    \n    if (mode == 0 || mode == 3 || mode == 7)\n    for (uniform int j=0; j<pairs*2; j++)\n    {\n        put_bits(data, &pos, 1, qep[j*4]&1);\n    }\n\t\n    // quantized values\n    bc7_code_qblock(data, &pos, qblock, bits, flips);\n\tbc7_code_adjust_skip_mode01237(data, mode, part_id);\n}\n\nvoid bc7_code_mode45(uint32 data[5], varying mode45_parameters* uniform params, uniform int mode)\n{\n\tint qep[8];\n\tuint32 qblock[2];\n\tint aqep[2];\n\tuint32 aqblock[2];\n\n\tswap_ints(params->qep, qep, 8);\n\tswap_uints(params->qblock, qblock, 2);\n\tswap_ints(params->aqep, aqep, 2);\n\tswap_uints(params->aqblock, aqblock, 2);\n\tint rotation = params->rotation;\n\tint swap = params->swap;\t\n\t\n\tuniform int bits = 2; \n    uniform int abits = 2;   if (mode==4) abits = 3;\n    uniform int epbits = 7;  if (mode==4) epbits = 5;\n    uniform int aepbits = 8; if (mode==4) aepbits = 6;\n\n\tif (!swap)\n\t{\n\t\tbc7_code_apply_swap_mode456(qep, 4, qblock, bits);\n\t\tbc7_code_apply_swap_mode456(aqep, 1, aqblock, abits);\n\t}\n\telse\n\t{\n\t\tswap_uints(qblock, aqblock, 2);\n\t\tbc7_code_apply_swap_mode456(aqep, 1, qblock, bits);\n\t\tbc7_code_apply_swap_mode456(qep, 4, aqblock, abits);\n\t}\n\n\tfor (uniform int k=0; k<5; k++) data[k] = 0;\n    uniform int pos = 0;\n\t\n    // mode 4-5\n\tput_bits(data, &pos, mode+1, 1<<mode);\n\t\n\t// rotation\n\t//put_bits(data, &pos, 2, (rotation+1)%4);\n\tput_bits(data, &pos, 2, (rotation+1)&3);\n    \n    if (mode==4)\n    {\n        put_bits(data, &pos, 1, swap);\n    }\n    \n    // endpoints\n    for (uniform int p=0; p<3; p++)\n    {\n        put_bits(data, &pos, epbits, qep[0+p]);\n        put_bits(data, &pos, epbits, qep[4+p]);\n    }\n    \n    // alpha endpoints\n    put_bits(data, &pos, aepbits, aqep[0]);\n    put_bits(data, &pos, aepbits, aqep[1]);\n        \n    // quantized values\n    bc7_code_qblock(data, &pos, qblock, bits, 0);\n    bc7_code_qblock(data, &pos, aqblock, abits, 0);\n}\n\nvoid bc7_code_mode6(uint32 data[5], int qep[8], uint32 qblock[2])\n{\n\tbc7_code_apply_swap_mode456(qep, 4, qblock, 4);\n\n    for (uniform int k=0; k<5; k++) data[k] = 0;\n    uniform int pos = 0;\n\n\t// mode 6\n    put_bits(data, &pos, 7, 64);\n    \n    // endpoints\n    for (uniform int p=0; p<4; p++)\n    {\n        put_bits(data, &pos, 7, qep[0+p]>>1);\n        put_bits(data, &pos, 7, qep[4+p]>>1);\n    }\n    \n    // p bits\n    put_bits(data, &pos, 1, qep[0]&1);\n    put_bits(data, &pos, 1, qep[4]&1);\n\t\n\t// quantized values\n    bc7_code_qblock(data, &pos, qblock, 4, 0);\n}\n\n\n//////////////////////////\n//       BC7 core\n\ninline void CompressBlockBC7_core(bc7_enc_state state[])\n{\n\tif (state->mode_selection[0]) bc7_enc_mode02(state);\n\tif (state->mode_selection[1]) bc7_enc_mode13(state);\n\tif (state->mode_selection[1]) bc7_enc_mode7(state);\n\tif (state->mode_selection[2]) bc7_enc_mode45(state);\n\tif (state->mode_selection[3]) bc7_enc_mode6(state);\n}\n\nvoid bc7_enc_copy_settings(bc7_enc_state state[], uniform bc7_enc_settings settings[])\n{\n\tstate->channels = settings->channels;\n\t\n\t// mode02\n\tstate->mode_selection[0] = settings->mode_selection[0];\n\tstate->skip_mode2 = settings->skip_mode2;\n\n\tstate->refineIterations[0] = settings->refineIterations[0];\n\tstate->refineIterations[2] = settings->refineIterations[2];\n\n\t// mode137\n\tstate->mode_selection[1] = settings->mode_selection[1];\n\tstate->fastSkipTreshold_mode1 = settings->fastSkipTreshold_mode1;\n\tstate->fastSkipTreshold_mode3 = settings->fastSkipTreshold_mode3;\n    state->fastSkipTreshold_mode7 = settings->fastSkipTreshold_mode7;\n\n\tstate->refineIterations[1] = settings->refineIterations[1];\n\tstate->refineIterations[3] = settings->refineIterations[3];\n    state->refineIterations[7] = settings->refineIterations[7];\n\n\t// mode45\n\tstate->mode_selection[2] = settings->mode_selection[2];\n    \n    state->mode45_channel0 = settings->mode45_channel0;\n\tstate->refineIterations_channel = settings->refineIterations_channel;\n    state->refineIterations[4] = settings->refineIterations[4];\n\tstate->refineIterations[5] = settings->refineIterations[5];\n\n\t// mode6\n\tstate->mode_selection[3] = settings->mode_selection[3];\n\n\tstate->refineIterations[6] = settings->refineIterations[6];\n}\n\ninline void CompressBlockBC7(uniform rgba_surface src[], int xx, uniform int yy, uniform uint8 dst[], \n\t\t\t\t\t\t\t uniform bc7_enc_settings settings[])\n{\n\tbc7_enc_state _state;\n\tvarying bc7_enc_state* uniform state = &_state;\n\n    bc7_enc_copy_settings(state, settings);\n\tload_block_interleaved_rgba(state->block, src, xx, yy);\n\tstate->best_err = 1e99;\n\tstate->opaque_err = compute_opaque_err(state->block, state->channels);\n\n\tCompressBlockBC7_core(state);\n\n\tstore_data(dst, src->width, xx, yy, state->best_data, 4);\n}\n\nexport void CompressBlocksBC7_ispc(uniform rgba_surface src[], uniform uint8 dst[], uniform bc7_enc_settings settings[])\n{\n\tfor (uniform int yy = 0; yy<src->height/4; yy++)\n\tforeach (xx = 0 ... src->width/4)\n\t{\n\t\tCompressBlockBC7(src, xx, yy, dst, settings);\n\t}\n}\n\n///////////////////////////////////////////////////////////\n//\t\t\t\t\t BC6H encoding\n\nstruct bc6h_enc_settings\n{\n    bool slow_mode;\n    bool fast_mode;\n    int refineIterations_1p;\n    int refineIterations_2p;\n    int fastSkipTreshold;\n};\n\nstruct bc6h_enc_state\n{\n    float block[64];\n\n    float best_err;\n    uint32 best_data[5];\t// 4, +1 margin for skips\n\n    float rgb_bounds[6];\n    float max_span;\n    int max_span_idx;\n\n    int mode;\n    int epb;\n    int qbounds[8];\n\n    // settings\n    uniform bool slow_mode;\n    uniform bool fast_mode;\n    uniform int refineIterations_1p;\n    uniform int refineIterations_2p;\n    uniform int fastSkipTreshold;\n};\n\nvoid bc6h_code_2p(uint32 data[5], int pqep[], uint32 qblock[2], int part_id, int mode);\nvoid bc6h_code_1p(uint32 data[5], int qep[8], uint32 qblock[2], int mode);\n\n///////////////////////////\n//   BC6H format data\n\ninline uniform int get_mode_prefix(uniform int mode)\n{\n    static uniform const int mode_prefix_table[] =\n    {\n        0, 1, 2, 6, 10, 14, 18, 22, 26, 30, 3, 7, 11, 15\n    };\n\n    return mode_prefix_table[mode];\n}\n\ninline uniform float get_span(uniform int mode)\n{\n    static uniform const float span_table[] =\n    {\n        0.9 * 0xFFFF /  64, //  (0) 4 / 10\n        0.9 * 0xFFFF /   4, //  (1) 5 / 7\n        0.8 * 0xFFFF / 256, //  (2) 3 / 11\n        -1, -1,\n        0.9 * 0xFFFF /  32, //  (5) 4 / 9\n        0.9 * 0xFFFF /  16, //  (6) 4 / 8\n        -1, -1,\n        0xFFFF,             //  (9) absolute\n        0xFFFF,             // (10) absolute\n        0.95 * 0xFFFF / 8,  // (11) 8 / 11\n        0.95 * 0xFFFF / 32, // (12) 7 / 12\n        6,                  // (13) 3 / 16\n    };\n\n    uniform int span = span_table[mode];\n    assert(span > 0);\n    return span;\n}\n\ninline uniform int get_mode_bits(uniform int mode)\n{\n    static uniform const int mode_bits_table[] =\n    {\n        10,  7, 11, -1, -1,\n         9,  8, -1, -1,  6,\n        10, 11, 12, 16,\n    };\n\n    uniform int mode_bits = mode_bits_table[mode];\n    assert(mode_bits > 0);\n    return mode_bits;\n}\n\n///////////////////////////\n// endpoint quantization\n\ninline int unpack_to_uf16(uint32 v, int bits)\n{\n    if (bits >= 15) return v;\n    if (v == 0) return 0;\n    if (v == (1<<bits)-1) return 0xFFFF;\n\n    return (v * 2 + 1) << (15-bits);\n}\n\nvoid ep_quant_bc6h(int qep[], float ep[], int bits, uniform int pairs)\n{\n    int levels = 1 << bits;\n\n    for (uniform int i = 0; i < 8 * pairs; i++)\n    {\n        int v = ((int)(ep[i] / (256 * 256f - 1) * (levels - 1) + 0.5));\n        qep[i] = clamp(v, 0, levels - 1);\n    }\n}\n\nvoid ep_dequant_bc6h(float ep[], int qep[], int bits, uniform int pairs)\n{\n    for (uniform int i = 0; i < 8 * pairs; i++)\n        ep[i] = unpack_to_uf16(qep[i], bits);\n}\n\nvoid ep_quant_dequant_bc6h(bc6h_enc_state state[], int qep[], float ep[], uniform int pairs)\n{\n    int bits = state->epb;\n    ep_quant_bc6h(qep, ep, bits, pairs);\n\n    for (uniform int i = 0; i < 2 * pairs; i++)\n    for (uniform int p = 0; p < 3; p++)\n    {\n        qep[i * 4 + p] = clamp(qep[i * 4 + p], state->qbounds[p], state->qbounds[4 + p]);\n    }\n\n    ep_dequant_bc6h(ep, qep, bits, pairs);\n\n}\n\n//////////////////////////\n// parameter estimation\n\nfloat bc6h_enc_2p_part_fast(bc6h_enc_state state[], int qep[16], uint32 qblock[2], int part_id)\n{\n    uint32 pattern = get_pattern(part_id);\n    uniform int bits = 3;\n    uniform int pairs = 2;\n    uniform int channels = 3;\n\n    float ep[16];\n    for (uniform int j = 0; j<pairs; j++)\n    {\n        int mask = get_pattern_mask(part_id, j);\n        block_segment_core(&ep[j * 8], state->block, mask, channels);\n    }\n\n    ep_quant_dequant_bc6h(state, qep, ep, 2);\n\n    float total_err = block_quant(qblock, state->block, bits, ep, pattern, channels);\n    return total_err;\n\n}\n\nvoid bc6h_enc_2p_list(bc6h_enc_state state[], int part_list[], uniform int part_count)\n{\n    if (part_count == 0) return;\n    uniform int bits = 3;\n    uniform int pairs = 2;\n    uniform int channels = 3;\n\n    int best_qep[24];\n    uint32 best_qblock[2];\n    int best_part_id = -1;\n    float best_err = 1e99;\n\n    for (uniform int part = 0; part<part_count; part++)\n    {\n        int part_id = part_list[part] & 31;\n\n        int qep[24];\n        uint32 qblock[2];\n        float err = bc6h_enc_2p_part_fast(state, qep, qblock, part_id);\n\n        if (err<best_err)\n        {\n            for (uniform int i = 0; i<8 * pairs; i++) best_qep[i] = qep[i];\n            for (uniform int k = 0; k<2; k++) best_qblock[k] = qblock[k];\n            best_part_id = part_id;\n            best_err = err;\n        }\n    }\n\n    // refine\n    uniform int refineIterations = state->refineIterations_2p;\n    for (uniform int _ = 0; _<refineIterations; _++)\n    {\n        float ep[24];\n        for (uniform int j = 0; j<pairs; j++)\n        {\n            int mask = get_pattern_mask(best_part_id, j);\n            opt_endpoints(&ep[j * 8], state->block, bits, best_qblock, mask, channels);\n        }\n\n        int qep[24];\n        uint32 qblock[2];\n        ep_quant_dequant_bc6h(state, qep, ep, 2);\n\n        uint32 pattern = get_pattern(best_part_id);\n        float err = block_quant(qblock, state->block, bits, ep, pattern, channels);\n\n        if (err<best_err)\n        {\n            for (uniform int i = 0; i<8 * pairs; i++) best_qep[i] = qep[i];\n            for (uniform int k = 0; k<2; k++) best_qblock[k] = qblock[k];\n            best_err = err;\n        }\n    }\n\n    if (best_err<state->best_err)\n    {\n        state->best_err = best_err;\n        bc6h_code_2p(state->best_data, best_qep, best_qblock, best_part_id, state->mode);\n    }\n}\n\nvoid bc6h_enc_2p(bc6h_enc_state state[])\n{\n    float full_stats[15];\n    compute_stats_masked(full_stats, state->block, -1, 3);\n\n    int part_list[32];\n    for (uniform int part = 0; part < 32; part++)\n    {\n        int mask = get_pattern_mask(part, 0);\n        float bound12 = block_pca_bound_split(state->block, mask, full_stats, 3);\n        int bound = (int)(bound12);\n        part_list[part] = part + bound * 64;\n    }\n    \n    partial_sort_list(part_list, 32, state->fastSkipTreshold);\n    bc6h_enc_2p_list(state, part_list, state->fastSkipTreshold);\n}\n\nvoid bc6h_enc_1p(bc6h_enc_state state[])\n{\n    float ep[8];\n    block_segment_core(ep, state->block, -1, 3);\n\n    int qep[8];\n    ep_quant_dequant_bc6h(state, qep, ep, 1);\n\n    uint32 qblock[2];\n    float err = block_quant(qblock, state->block, 4, ep, 0, 3);\n\n    // refine\n    uniform int refineIterations = state->refineIterations_1p;\n    for (uniform int i = 0; i<refineIterations; i++)\n    {\n        opt_endpoints(ep, state->block, 4, qblock, -1, 3);\n        ep_quant_dequant_bc6h(state, qep, ep, 1);\n        err = block_quant(qblock, state->block, 4, ep, 0, 3);\n    }\n\n    if (err < state->best_err)\n    {\n        state->best_err = err;\n        bc6h_code_1p(state->best_data, qep, qblock, state->mode);\n    }\n}\n\ninline void compute_qbounds(bc6h_enc_state state[], float rgb_span[3])\n{\n    float bounds[8];\n    for (uniform int p = 0; p < 3; p++)\n    {\n        float middle = (state->rgb_bounds[p] + state->rgb_bounds[3 + p]) / 2;\n\n        bounds[  p] = middle - rgb_span[p] / 2;\n        bounds[4+p] = middle + rgb_span[p] / 2;\n    }\n\n    ep_quant_bc6h(state->qbounds, bounds, state->epb, 1);\n}\n\nvoid compute_qbounds(bc6h_enc_state state[], float span)\n{\n    float rgb_span[3] = { span, span, span };\n    compute_qbounds(state, rgb_span);\n}\n\nvoid compute_qbounds2(bc6h_enc_state state[], float span, int max_span_idx)\n{\n    float rgb_span[3] = { span, span, span };\n    for (uniform int p = 0; p < 3; p++)\n    {\n        rgb_span[p] *= (p == max_span_idx) ? 2 : 1;\n    }\n    compute_qbounds(state, rgb_span);\n}\n\nvoid bc6h_test_mode(bc6h_enc_state state[], uniform int mode, uniform bool enc, uniform float margin)\n{\n    uniform int mode_bits = get_mode_bits(mode);\n    uniform float span = get_span(mode);\n    float max_span = state->max_span;\n    int max_span_idx = state->max_span_idx;\n\n    if (max_span * margin > span) return;\n\n    if (mode >= 10)\n    {\n        state->epb = mode_bits;\n        state->mode = mode;\n\n        compute_qbounds(state, span);\n        if (enc) bc6h_enc_1p(state);\n    }\n    else if (mode <= 1 || mode == 5 || mode == 9)\n    {\n        state->epb = mode_bits;\n        state->mode = mode;\n\n        compute_qbounds(state, span);\n        if (enc) bc6h_enc_2p(state);\n    }\n    else\n    {\n        state->epb = mode_bits;\n        state->mode = mode + max_span_idx;       \n        \n        compute_qbounds2(state, span, max_span_idx);\n        if (enc) bc6h_enc_2p(state);\n    }\n}\n\n//////////////////////////\n// BC6H bitstream coding\n\nint bit_at(int v, uniform int pos)\n{\n    return (v >> pos) & 1;\n}\n\nuint32 reverse_bits(uint32 v, uniform int bits)\n{\n    if (bits == 2)\n    {\n        return (v >> 1) + (v & 1) * 2;\n    }\n    if (bits == 6)\n    {\n        v = (v & 0x5555) * 2 + ((v >> 1) & 0x5555);\n        return (v >> 4) + ((v >> 2) & 3) * 4 + (v & 3) * 16;\n    }\n    else\n    {\n        assert(false);\n    }\n}\n\nvoid bc6h_pack(uint32 packed[], int qep[], int mode)\n{\n    if (mode == 0)\n    {\n        int pred_qep[16];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            pred_qep[     p] = qep[p];\n            pred_qep[ 4 + p] = (qep[ 4 + p] - qep[p]) & 31;\n            pred_qep[ 8 + p] = (qep[ 8 + p] - qep[p]) & 31;\n            pred_qep[12 + p] = (qep[12 + p] - qep[p]) & 31;\n        }\n\n        for (uniform int i = 1; i < 4; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(       qep[i * 4 + p] - qep[p] <= 15);\n            assert(-16 <= qep[i * 4 + p] - qep[p]);\n        }\n        \n        /*\n            g2[4], b2[4], b3[4], \n            r0[9:0], \n            g0[9:0], \n            b0[9:0], \n            r1[4:0], g3[4], g2[3:0],\n            g1[4:0], b3[0], g3[3:0], \n            b1[4:0], b3[1], b2[3:0], \n            r2[4:0], b3[2], \n            r3[4:0], b3[3]\n        */\n\n        uint32 pqep[10];\n\n        pqep[4] = pred_qep[4] + (pred_qep[ 8 + 1] & 15) * 64;\n        pqep[5] = pred_qep[5] + (pred_qep[12 + 1] & 15) * 64;\n        pqep[6] = pred_qep[6] + (pred_qep[ 8 + 2] & 15) * 64;\n\n        pqep[4] += bit_at(pred_qep[12 + 1], 4) << 5;\n        pqep[5] += bit_at(pred_qep[12 + 2], 0) << 5;\n        pqep[6] += bit_at(pred_qep[12 + 2], 1) << 5;\n\n        pqep[8] = pred_qep[ 8] + bit_at(pred_qep[12 + 2], 2) * 32;\n        pqep[9] = pred_qep[12] + bit_at(pred_qep[12 + 2], 3) * 32;\n\n        packed[0] = get_mode_prefix(0); \n        packed[0] += bit_at(pred_qep[ 8 + 1], 4) << 2;\n        packed[0] += bit_at(pred_qep[ 8 + 2], 4) << 3;\n        packed[0] += bit_at(pred_qep[12 + 2], 4) << 4;\n\n        packed[1] = (pred_qep[2] << 20) + (pred_qep[1] << 10) + pred_qep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (pqep[9] << 6) + pqep[8];\n    }\n    else if (mode == 1)\n    {\n        int pred_qep[16];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            pred_qep[     p] = qep[p];\n            pred_qep[ 4 + p] = (qep[ 4 + p] - qep[p]) & 63;\n            pred_qep[ 8 + p] = (qep[ 8 + p] - qep[p]) & 63;\n            pred_qep[12 + p] = (qep[12 + p] - qep[p]) & 63;\n        }\n\n        for (uniform int i = 1; i < 4; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(       qep[i * 4 + p] - qep[p] <= 31);\n            assert(-32 <= qep[i * 4 + p] - qep[p]);\n        }\n        \n        /*\n            g2[5], g3[4], g3[5], \n            r0[6:0], b3[0], b3[1], b2[4], \n            g0[6:0], b2[5], b3[2], g2[4], \n            b0[6:0], b3[3], b3[5], b3[4], \n            r1[5:0], g2[3:0], \n            g1[5:0], g3[3:0], \n            b1[5:0], b2[3:0], \n            r2[5:0], \n            r3[5:0]\n        */\n\n        uint32 pqep[8];\n\n        pqep[0] = pred_qep[0];\n        pqep[0] += bit_at(pred_qep[12 + 2], 0) << 7;\n        pqep[0] += bit_at(pred_qep[12 + 2], 1) << 8;\n        pqep[0] += bit_at(pred_qep[ 8 + 2], 4) << 9;\n\n        pqep[1] = pred_qep[1];\n        pqep[1] += bit_at(pred_qep[ 8 + 2], 5) << 7;\n        pqep[1] += bit_at(pred_qep[12 + 2], 2) << 8;\n        pqep[1] += bit_at(pred_qep[ 8 + 1], 4) << 9;\n\n        pqep[2] = pred_qep[2];\n        pqep[2] += bit_at(pred_qep[12 + 2], 3) << 7;\n        pqep[2] += bit_at(pred_qep[12 + 2], 5) << 8;\n        pqep[2] += bit_at(pred_qep[12 + 2], 4) << 9;\n\n        pqep[4] = pred_qep[4] + (pred_qep[ 8 + 1] & 15) * 64;\n        pqep[5] = pred_qep[5] + (pred_qep[12 + 1] & 15) * 64;\n        pqep[6] = pred_qep[6] + (pred_qep[ 8 + 2] & 15) * 64;\n\n        packed[0] = get_mode_prefix(1); \n        packed[0] += bit_at(pred_qep[ 8 + 1], 5) << 2;\n        packed[0] += bit_at(pred_qep[12 + 1], 4) << 3;\n        packed[0] += bit_at(pred_qep[12 + 1], 5) << 4;\n\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (pred_qep[12] << 6) + pred_qep[8];\n    }\n    else if (mode == 2 || mode == 3 || mode == 4)\n    {\n        /*\n            r0[9:0], g0[9:0], b0[9:0], \n            r1[3:0], xx[y], xx[y], g2[3:0], \n            g1[3:0], xx[y], xx[y], g3[3:0], \n            b1[3:0], xx[y], xx[y], b2[3:0], \n            r2[3:0], xx[y], xx[y], \n            r3[3:0], xx[y], xx[y]\n        */\n\n        int dqep[16];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            int mask = 15;\n            if (p == mode - 2) mask = 31;\n            dqep[p] = qep[p];\n            dqep[ 4 + p] = (qep[ 4 + p] - qep[p]) & mask;\n            dqep[ 8 + p] = (qep[ 8 + p] - qep[p]) & mask;\n            dqep[12 + p] = (qep[12 + p] - qep[p]) & mask;\n        }\n\n        for (uniform int i = 1; i < 4; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            int bits = 4;\n            if (p == mode - 2) bits = 5;\n            assert(                qep[i * 4 + p] - qep[p] <= (1<<bits)/2 - 1);\n            assert(-(1<<bits)/2 <= qep[i * 4 + p] - qep[p]);\n        }\n        \n        uint32 pqep[10];\n\n        pqep[0] = dqep[0] & 1023;\n        pqep[1] = dqep[1] & 1023;\n        pqep[2] = dqep[2] & 1023;\n\n        pqep[4] = dqep[4] + (dqep[ 8 + 1] & 15) * 64;\n        pqep[5] = dqep[5] + (dqep[12 + 1] & 15) * 64;\n        pqep[6] = dqep[6] + (dqep[ 8 + 2] & 15) * 64;\n\n        pqep[8] = dqep[8];\n        pqep[9] = dqep[12];\n\n        if (mode == 2)\n        {\n            /*\n                r0[9:0], g0[9:0], b0[9:0], \n                r1[3:0], r1[4],  r0[10], g2[3:0], \n                g1[3:0], g0[10], b3[0],  g3[3:0], \n                b1[3:0], b0[10], b3[1],  b2[3:0], \n                r2[3:0], r2[4],  b3[2], \n                r3[3:0], r3[4],  b3[3]\n            */\n\n            packed[0] = get_mode_prefix(2);\n\n            //\n            pqep[5] += bit_at(dqep[0 + 1], 10) << 4;\n            pqep[6] += bit_at(dqep[0 + 2], 10) << 4;\n            //\n            //\n\n            pqep[4] += bit_at(dqep[0 + 0], 10) << 5;\n            pqep[5] += bit_at(dqep[12 + 2], 0) << 5;\n            pqep[6] += bit_at(dqep[12 + 2], 1) << 5;\n            pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n            pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n        }\n        if (mode == 3)\n        {\n            /*\n                r0[9:0], g0[9:0], b0[9:0], \n                r1[3:0], r0[10], g3[4],  g2[3:0], \n                g1[3:0], g1[4],  g0[10], g3[3:0], \n                b1[3:0], b0[10], b3[1],  b2[3:0], \n                r2[3:0], b3[0],  b3[2], \n                r3[3:0], g2[4],  b3[3]\n            */\n\n            packed[0] = get_mode_prefix(3);\n\n            pqep[4] += bit_at(dqep[0 + 0], 10) << 4;\n            //\n            pqep[6] += bit_at(dqep[0 + 2], 10) << 4;\n            pqep[8] += bit_at(dqep[12 + 2], 0) << 4;\n            pqep[9] += bit_at(dqep[ 8 + 1], 4) << 4;\n\n            pqep[4] += bit_at(dqep[12 + 1], 4) << 5;\n            pqep[5] += bit_at(dqep[0 + 1], 10) << 5;\n            pqep[6] += bit_at(dqep[12 + 2], 1) << 5;\n            pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n            pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n        }\n        if (mode == 4)\n        {\n            /*\n                r0[9:0], g0[9:0], b0[9:0], \n                r1[3:0], r0[10], b2[4],  g2[3:0], \n                g1[3:0], g0[10], b3[0],  g3[3:0], \n                b1[3:0], b1[4],  b0[10], b2[3:0], \n                r2[3:0], b3[1],  b3[2], \n                r3[3:0], b3[4],  b3[3]\n            */\n\n            packed[0] = get_mode_prefix(4);\n\n            pqep[4] += bit_at(dqep[0 + 0], 10) << 4;\n            pqep[5] += bit_at(dqep[0 + 1], 10) << 4;\n            //\n            pqep[8] += bit_at(dqep[12 + 2], 1) << 4;\n            pqep[9] += bit_at(dqep[12 + 2], 4) << 4;\n\n            pqep[4] += bit_at(dqep[ 8 + 2], 4) << 5;\n            pqep[5] += bit_at(dqep[12 + 2], 0) << 5;\n            pqep[6] += bit_at(dqep[0 + 2], 10) << 5;\n            pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n            pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n        }\n\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (pqep[9] << 6) + pqep[8];\n    }\n    else if (mode == 5)\n    {\n        int dqep[16];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            dqep[p] = qep[p];\n            dqep[ 4 + p] = (qep[ 4 + p] - qep[p]) & 31;\n            dqep[ 8 + p] = (qep[ 8 + p] - qep[p]) & 31;\n            dqep[12 + p] = (qep[12 + p] - qep[p]) & 31;\n        }\n\n        for (uniform int i = 1; i < 4; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(       qep[i * 4 + p] - qep[p] <= 15);\n            assert(-16 <= qep[i * 4 + p] - qep[p]);\n        }\n     \n        /*\n            r0[8:0], b2[4],\n            g0[8:0], g2[4], \n            b0[8:0], b3[4], \n            r1[4:0], g3[4], g2[3:0],\n            g1[4:0], b3[0], g3[3:0], \n            b1[4:0], b3[1], b2[3:0], \n            r2[4:0], b3[2], \n            r3[4:0], b3[3]\n        */\n\n        uint32 pqep[10];\n\n        pqep[0] = dqep[0];\n        pqep[1] = dqep[1];\n        pqep[2] = dqep[2];\n        pqep[4] = dqep[4] + (dqep[ 8 + 1] & 15) * 64;\n        pqep[5] = dqep[5] + (dqep[12 + 1] & 15) * 64;\n        pqep[6] = dqep[6] + (dqep[ 8 + 2] & 15) * 64;\n        pqep[8] = dqep[8];\n        pqep[9] = dqep[12];\n\n        pqep[0] += bit_at(dqep[ 8 + 2], 4) << 9;\n        pqep[1] += bit_at(dqep[ 8 + 1], 4) << 9;\n        pqep[2] += bit_at(dqep[12 + 2], 4) << 9;\n        \n        pqep[4] += bit_at(dqep[12 + 1], 4) << 5;\n        pqep[5] += bit_at(dqep[12 + 2], 0) << 5;\n        pqep[6] += bit_at(dqep[12 + 2], 1) << 5;\n\n        pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n        pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n\n        packed[0] = get_mode_prefix(5); \n\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (pqep[9] << 6) + pqep[8];\n    }\n    else if (mode == 6 || mode == 7 || mode == 8)\n    {\n        /*\n            r0[7:0], xx[y], b2[4],\n            g0[7:0], xx[y], g2[4],\n            b0[7:0], xx[y], b3[4],\n            r1[4:0], xx[y], g2[3:0],\n            g1[4:0], xx[y], g3[3:0],\n            b1[4:0], xx[y], b2[3:0],\n            r2[4:0], xx[y],\n            r3[4:0], xx[y]\n        */\n\n        int dqep[16];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            int mask = 31;\n            if (p == mode - 6) mask = 63;\n            dqep[p] = qep[p];\n            dqep[ 4 + p] = (qep[ 4 + p] - qep[p]) & mask;\n            dqep[ 8 + p] = (qep[ 8 + p] - qep[p]) & mask;\n            dqep[12 + p] = (qep[12 + p] - qep[p]) & mask;\n        }\n\n        for (uniform int i = 1; i < 4; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            int bits = 5;\n            if (p == mode - 6) bits = 6;\n            assert(                qep[i * 4 + p] - qep[p] <= (1<<bits)/2 - 1);\n            assert(-(1<<bits)/2 <= qep[i * 4 + p] - qep[p]);\n        }\n        \n        uint32 pqep[10];\n\n        pqep[0] = dqep[0];\n        pqep[0] += bit_at(dqep[ 8 + 2], 4) << 9;\n\n        pqep[1] = dqep[1];\n        pqep[1] += bit_at(dqep[ 8 + 1], 4) << 9;\n\n        pqep[2] = dqep[2];\n        pqep[2] += bit_at(dqep[12 + 2], 4) << 9;\n\n        pqep[4] = dqep[4] + (dqep[ 8 + 1] & 15) * 64;\n        pqep[5] = dqep[5] + (dqep[12 + 1] & 15) * 64;\n        pqep[6] = dqep[6] + (dqep[ 8 + 2] & 15) * 64;\n\n        pqep[8] = dqep[8];\n        pqep[9] = dqep[12];\n\n        if (mode == 6)\n        {\n            /*\n                r0[7:0], g3[4], b2[4],\n                g0[7:0], b3[2], g2[4],\n                b0[7:0], b3[3], b3[4],\n                r1[4:0], r1[5], g2[3:0],\n                g1[4:0], b3[0], g3[3:0],\n                b1[4:0], b3[1], b2[3:0],\n                r2[5:0],\n                r3[5:0]\n            */\n\n            packed[0] = get_mode_prefix(6);\n\n            pqep[0] += bit_at(dqep[12 + 1], 4) << 8;\n            pqep[1] += bit_at(dqep[12 + 2], 2) << 8;\n            pqep[2] += bit_at(dqep[12 + 2], 3) << 8;\n            //\n            pqep[5] += bit_at(dqep[12 + 2], 0) << 5;\n            pqep[6] += bit_at(dqep[12 + 2], 1) << 5;\n            //\n            //\n        }\n        if (mode == 7)\n        {\n            /*\n                r0[7:0], b3[0], b2[4],\n                g0[7:0], g2[5], g2[4],\n                b0[7:0], g3[5], b3[4],\n                r1[4:0], g3[4], g2[3:0],\n                g1[4:0], g1[5], g3[3:0],\n                b1[4:0], b3[1], b2[3:0],\n                r2[4:0], b3[2],\n                r3[4:0], b3[3]\n            */\n\n            packed[0] = get_mode_prefix(7);\n\n            pqep[0] += bit_at(dqep[12 + 2], 0) << 8;\n            pqep[1] += bit_at(dqep[ 8 + 1], 5) << 8;\n            pqep[2] += bit_at(dqep[12 + 1], 5) << 8;\n            pqep[4] += bit_at(dqep[12 + 1], 4) << 5;\n            //\n            pqep[6] += bit_at(dqep[12 + 2], 1) << 5;\n            pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n            pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n        }\n        if (mode == 8)\n        {\n            /*\n                r0[7:0], b3[1], b2[4],\n                g0[7:0], b2[5], g2[4],\n                b0[7:0], b3[5], b3[4],\n                r1[4:0], g3[4], g2[3:0],\n                g1[4:0], b3[0], g3[3:0],\n                b1[4:0], b1[5], b2[3:0],\n                r2[4:0], b3[2],\n                r3[4:0], b3[3]\n            */\n\n            packed[0] = get_mode_prefix(8);\n\n            pqep[0] += bit_at(dqep[12 + 2], 1) << 8;\n            pqep[1] += bit_at(dqep[ 8 + 2], 5) << 8;\n            pqep[2] += bit_at(dqep[12 + 2], 5) << 8;\n            pqep[4] += bit_at(dqep[12 + 1], 4) << 5;\n            pqep[5] += bit_at(dqep[12 + 2], 0) << 5;\n            //\n            pqep[8] += bit_at(dqep[12 + 2], 2) << 5;\n            pqep[9] += bit_at(dqep[12 + 2], 3) << 5;\n        }\n\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (pqep[9] << 6) + pqep[8];\n    }\n    else if (mode == 9)\n    {\n        /*\n            r0[5:0], g3[4], b3[0], b3[1], b2[4], // 10\n            g0[5:0], g2[5], b2[5], b3[2], g2[4], // 10\n            b0[5:0], g3[5], b3[3], b3[5], b3[4], // 10\n            r1[5:0], g2[3:0],  // 10\n            g1[5:0], g3[3:0],  // 10\n            b1[5:0], b2[3:0],  // 10\n            r2[5:0],  // 6\n            r3[5:0]   // 6\n        */\n\n        uint32 pqep[10];\n\n        pqep[0] = qep[0];\n        pqep[0] += bit_at(qep[12 + 1], 4) << 6;\n        pqep[0] += bit_at(qep[12 + 2], 0) << 7;\n        pqep[0] += bit_at(qep[12 + 2], 1) << 8;\n        pqep[0] += bit_at(qep[ 8 + 2], 4) << 9;\n\n        pqep[1] = qep[1];\n        pqep[1] += bit_at(qep[ 8 + 1], 5) << 6;\n        pqep[1] += bit_at(qep[ 8 + 2], 5) << 7;\n        pqep[1] += bit_at(qep[12 + 2], 2) << 8;\n        pqep[1] += bit_at(qep[ 8 + 1], 4) << 9;\n\n        pqep[2] = qep[2];\n        pqep[2] += bit_at(qep[12 + 1], 5) << 6;\n        pqep[2] += bit_at(qep[12 + 2], 3) << 7;\n        pqep[2] += bit_at(qep[12 + 2], 5) << 8;\n        pqep[2] += bit_at(qep[12 + 2], 4) << 9;\n\n        pqep[4] = qep[4] + (qep[ 8 + 1] & 15) * 64;\n        pqep[5] = qep[5] + (qep[12 + 1] & 15) * 64;\n        pqep[6] = qep[6] + (qep[ 8 + 2] & 15) * 64;\n\n        packed[0] = get_mode_prefix(9);\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n        packed[3] = (qep[12] << 6) + qep[8];\n    }\n    else if (mode == 10)\n    {\n        // the only mode with nothing to do ~\n\n        packed[0] = get_mode_prefix(10);\n        packed[1] = (qep[2] << 20) + (qep[1] << 10) + qep[0];\n        packed[2] = (qep[6] << 20) + (qep[5] << 10) + qep[4];\n    }\n    else if (mode == 11)\n    {\n        int dqep[8];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            dqep[p] = qep[p];\n            dqep[4 + p] = (qep[4 + p] - qep[p]) & 511;\n        }\n            \n        for (uniform int i = 1; i < 2; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(        qep[i * 4 + p] - qep[p] <= 255);\n            assert(-256 <= qep[i * 4 + p] - qep[p]);\n        }\n\n        /*\n            r0[9:0], g0[9:0], b0[9:0],\n            r1[8:0], r0[10],\n            g1[8:0], g0[10],\n            b1[8:0], b0[10]\n        */\n\n        uint32 pqep[8];\n\n        pqep[0] = dqep[0] & 1023;\n        pqep[1] = dqep[1] & 1023;\n        pqep[2] = dqep[2] & 1023;\n\n        pqep[4] = dqep[4] + (dqep[0] >> 10) * 512;\n        pqep[5] = dqep[5] + (dqep[1] >> 10) * 512;\n        pqep[6] = dqep[6] + (dqep[2] >> 10) * 512;\n\n        packed[0] = get_mode_prefix(11);\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n    }    \n    else if (mode == 12)\n    {\n        int dqep[8];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            dqep[p] = qep[p];\n            dqep[4 + p] = (qep[4 + p] - qep[p]) & 255;\n        }\n            \n        for (uniform int i = 1; i < 2; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(        qep[i * 4 + p] - qep[p] <= 127);\n            assert(-128 <= qep[i * 4 + p] - qep[p]);\n        }\n\n        /*\n            r0[9:0], g0[9:0], b0[9:0], \n            r1[7:0], r0[10:11], \n            g1[7:0], g0[10:11],\n            b1[7:0], b0[10:11]\n        */\n\n        uint32 pqep[8];\n\n        pqep[0] = dqep[0] & 1023;\n        pqep[1] = dqep[1] & 1023;\n        pqep[2] = dqep[2] & 1023;\n\n        pqep[4] = dqep[4] + reverse_bits(dqep[0] >> 10, 2) * 256;\n        pqep[5] = dqep[5] + reverse_bits(dqep[1] >> 10, 2) * 256;\n        pqep[6] = dqep[6] + reverse_bits(dqep[2] >> 10, 2) * 256;\n\n        packed[0] = get_mode_prefix(12);\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n    }\n    else if (mode == 13)\n    {\n        int dqep[8];\n        for (uniform int p = 0; p < 3; p++)\n        {\n            dqep[p] = qep[p];\n            dqep[4 + p] = (qep[4 + p] - qep[p]) & 15;\n        }\n            \n        for (uniform int i = 1; i < 2; i++)\n        for (uniform int p = 0; p < 3; p++)\n        {\n            assert(      qep[i * 4 + p] - qep[p] <= 7);\n            assert(-8 <= qep[i * 4 + p] - qep[p]);\n        }\n\n        /*\n            r0[9:0], g0[9:0], b0[9:0],\n            r1[3:0], r0[10:15],\n            g1[3:0], g0[10:15],\n            b1[3:0], b0[10:15]\n        */\n\n        uint32 pqep[8];\n\n        pqep[0] = dqep[0] & 1023;\n        pqep[1] = dqep[1] & 1023;\n        pqep[2] = dqep[2] & 1023;\n\n        pqep[4] = dqep[4] + reverse_bits(dqep[0] >> 10, 6) * 16;\n        pqep[5] = dqep[5] + reverse_bits(dqep[1] >> 10, 6) * 16;\n        pqep[6] = dqep[6] + reverse_bits(dqep[2] >> 10, 6) * 16;\n\n        packed[0] = get_mode_prefix(13);\n        packed[1] = (pqep[2] << 20) + (pqep[1] << 10) + pqep[0];\n        packed[2] = (pqep[6] << 20) + (pqep[5] << 10) + pqep[4];\n    }\n    else\n    {\n        assert(false);\n    }\n}\n\nvoid bc6h_code_2p(uint32 data[5], int qep[], uint32 qblock[2], int part_id, int mode)\n{\n\tuniform int bits = 3;\n    uniform int pairs = 2;\n    uniform int channels = 3;\n\n    int flips = bc7_code_apply_swap_mode01237(qep, qblock, 1, part_id);\n\n\tfor (uniform int k=0; k<5; k++) data[k] = 0;\n    uniform int pos = 0;\n\n    uint32 packed[4];\n    bc6h_pack(packed, qep, mode);\n\n    // mode\n    put_bits(data, &pos, 5, packed[0]);\n\n    // endpoints\n    put_bits(data, &pos, 30, packed[1]);\n    put_bits(data, &pos, 30, packed[2]);\n    put_bits(data, &pos, 12, packed[3]);\n    \n    // partition\n    put_bits(data, &pos, 5, part_id);\n\n    // quantized values\n    bc7_code_qblock(data, &pos, qblock, bits, flips);\n\tbc7_code_adjust_skip_mode01237(data, 1, part_id);\n}\n\nvoid bc6h_code_1p(uint32 data[5], int qep[8], uint32 qblock[2], int mode)\n{\n    bc7_code_apply_swap_mode456(qep, 4, qblock, 4);\n\n    for (uniform int k = 0; k<5; k++) data[k] = 0;\n    uniform int pos = 0;\n\n    uint32 packed[4];\n    bc6h_pack(packed, qep, mode);\n\n    // mode\n    put_bits(data, &pos, 5, packed[0]);\n\n    // endpoints\n    put_bits(data, &pos, 30, packed[1]);\n    put_bits(data, &pos, 30, packed[2]);\n    \n    // quantized values\n    bc7_code_qblock(data, &pos, qblock, 4, 0);\n}\n\n//////////////////////////\n//       BC6H core\n\nvoid bc6h_setup(bc6h_enc_state state[])\n{\n    for (uniform int p = 0; p < 3; p++)\n    {\n        state->rgb_bounds[p  ] = 0xFFFF;\n        state->rgb_bounds[3+p] = 0;\n    }\n\n    // uf16 conversion, min/max\n    for (uniform int p = 0; p < 3; p++)\n    for (uniform int k = 0; k < 16; k++)\n    {\n        state->block[p * 16 + k] = (state->block[p * 16 + k] / 31) * 64;\n\n        state->rgb_bounds[p  ] = min(state->rgb_bounds[p  ], state->block[p * 16 + k]);\n        state->rgb_bounds[3+p] = max(state->rgb_bounds[3+p], state->block[p * 16 + k]);\n    }\n\n    state->max_span = 0;\n    state->max_span_idx = 0;\n\n    float rgb_span[0] = { 0, 0, 0 };\n    for (uniform int p = 0; p < 3; p++)\n    {\n        rgb_span[p] = state->rgb_bounds[3+p] - state->rgb_bounds[p];\n        if (rgb_span[p] > state->max_span)\n        {\n            state->max_span_idx = p;\n            state->max_span = rgb_span[p];\n        }\n    }\n}\n\ninline void CompressBlockBC6H_core(bc6h_enc_state state[])\n{\n    bc6h_setup(state);\n\n    if (state->slow_mode)\n    {\n        bc6h_test_mode(state, 0, true, 0);\n        bc6h_test_mode(state, 1, true, 0);\n        bc6h_test_mode(state, 2, true, 0);\n        bc6h_test_mode(state, 5, true, 0);\n        bc6h_test_mode(state, 6, true, 0);\n        bc6h_test_mode(state, 9, true, 0);\n        bc6h_test_mode(state, 10, true, 0);\n        bc6h_test_mode(state, 11, true, 0);\n        bc6h_test_mode(state, 12, true, 0);\n        bc6h_test_mode(state, 13, true, 0);\n    }\n    else\n    {        \n        if (state->fastSkipTreshold > 0)\n        {\n            bc6h_test_mode(state, 9, false, 0);\n            if (state->fast_mode) bc6h_test_mode(state, 1, false, 1);\n            bc6h_test_mode(state, 6, false, 1 / 1.2);\n            bc6h_test_mode(state, 5, false, 1 / 1.2);\n            bc6h_test_mode(state, 0, false, 1 / 1.2);\n            bc6h_test_mode(state, 2, false, 1);\n\n            bc6h_enc_2p(state);\n            if (!state->fast_mode) bc6h_test_mode(state, 1, true, 0);\n        }\n\n        bc6h_test_mode(state, 10, false, 0);\n        bc6h_test_mode(state, 11, false, 1);\n        bc6h_test_mode(state, 12, false, 1);\n        bc6h_test_mode(state, 13, false, 1);\n        bc6h_enc_1p(state);\n    } \n}\n\nvoid bc6h_enc_copy_settings(bc6h_enc_state state[], uniform bc6h_enc_settings settings[])\n{\n    state->slow_mode = settings->slow_mode;\n    state->fast_mode = settings->fast_mode;\n    state->fastSkipTreshold = settings->fastSkipTreshold;\n    state->refineIterations_1p = settings->refineIterations_1p;\n    state->refineIterations_2p = settings->refineIterations_2p;\n}\n\ninline void CompressBlockBC6H(uniform rgba_surface src[], int xx, uniform int yy, uniform uint8 dst[], uniform bc6h_enc_settings settings[])\n{\n    bc6h_enc_state _state;\n    varying bc6h_enc_state* uniform state = &_state;\n\n    bc6h_enc_copy_settings(state, settings);\n    load_block_interleaved_16bit(state->block, src, xx, yy);\n    state->best_err = 1e99;\n\n    CompressBlockBC6H_core(state);\n\n    store_data(dst, src->width, xx, yy, state->best_data, 4);\n}\n\nexport void CompressBlocksBC6H_ispc(uniform rgba_surface src[], uniform uint8 dst[], uniform bc6h_enc_settings settings[])\n{\n    for (uniform int yy = 0; yy<src->height / 4; yy++)\n    foreach(xx = 0 ... src->width / 4)\n    {\n        CompressBlockBC6H(src, xx, yy, dst, settings);\n    }\n}\n\n///////////////////////////////////////////////////////////\n//\t\t\t\t\t ETC encoding\n\nstruct etc_enc_settings\n{\n    int fastSkipTreshold;\n};\n\nstruct etc_enc_state\n{\n    float block[64];\n    int prev_qcenter[3];\n\n    float best_err;\n    uint32 best_data[2];\n\n    uniform bool diff;\n\n    // settings\n    uniform int fastSkipTreshold;\n};\n\ninline uniform int get_etc1_dY(uniform int table, uniform int q)\n{\n    static uniform const int etc_codeword_table[8][4] =\n    {\n        { -8, -2, 2, 8 },\n        { -17, -5, 5, 17 },\n        { -29, -9, 9, 29 },\n        { -42, -13, 13, 42 },\n        { -60, -18, 18, 60 },\n        { -80, -24, 24, 80 },\n        { -106, -33, 33, 106 },\n        { -183, -47, 47, 183 },\n    };\n\n    return etc_codeword_table[table][q];\n}\n\nuniform int remap_q[] = { 2, 3, 1, 0 };\n\nint get_remap2_q(int x)\n{\n    x -= 2;\n    if (x < 0) x = 1 - x;\n    return x;\n}\n\nint extend_4to8bits(int value)\n{\n    return (value << 4) | value;\n}\n\nint extend_5to8bits(int value)\n{\n    return (value << 3) | (value >> 2);\n}\n\nint quantize_4bits(float value)\n{\n    return clamp((value / 255.0f) * 15 + 0.5, 0, 15);\n}\n\nint quantize_5bits(float value)\n{\n    return clamp((value / 255.0f) * 31 + 0.5, 0, 31);\n}\n\nvoid center_quant_dequant(int qcenter[3], float center[3], uniform bool diff, int prev_qcenter[3])\n{\n    if (diff)\n    {\n        for (uniform int p = 0; p < 3; p++)\n        {\n            qcenter[p] = quantize_5bits(center[p]);\n\n            if (prev_qcenter[0] >= 0)\n            {\n                if (qcenter[p] - prev_qcenter[p] > 3) qcenter[p] = prev_qcenter[p] + 3;\n                if (qcenter[p] - prev_qcenter[p] < -4) qcenter[p] = prev_qcenter[p] - 4;\n            }\n\n            center[p] = extend_5to8bits(qcenter[p]);\n        }\n    }\n    else\n    {\n        for (uniform int p = 0; p < 3; p++)\n        {\n            qcenter[p] = quantize_4bits(center[p]);\n            center[p] = extend_4to8bits(qcenter[p]);\n        }\n    }\n}\n\nfloat quantize_pixels_etc1_half(uint32 qblock[1], float block[48], float center[3], uniform int table)\n{\n    float total_err = 0;\n    uint32 bits = 0;\n\n    for (uniform int y = 0; y < 2; y++)\n    for (uniform int x = 0; x < 4; x++)\n    {\n        float best_err = sq(255) * 3;\n        int best_q = -1;\n\n        for (uniform int q = 0; q < 4; q++)\n        {\n            int dY = get_etc1_dY(table, remap_q[q]);\n\n            float err = 0;\n            for (int p = 0; p < 3; p++)\n                err += sq(block[16 * p + y*4+x] - clamp(center[p] + dY, 0, 255));\n\n            if (err < best_err)\n            {\n                best_err = err;\n                best_q = q;\n            }\n        }\n\n        assert(best_q >= 0);\n\n        bits |= (best_q  & 1) << (x * 4 + y);\n        bits |= (best_q >> 1) << (x * 4 + y + 16);\n        total_err += best_err;\n    }\n\n    qblock[0] = bits;\n    return total_err;\n}\n\nfloat compress_etc1_half_1(uint32 out_qbits[1], int out_table[1], int out_qcenter[3], \n                           float half_pixels[], uniform bool diff, int prev_qcenter[3])\n{\n    float dc[3];\n\n    for (uniform int p = 0; p<3; p++) dc[p] = 0;\n\n    for (uniform int k = 0; k<8; k++)\n    {\n        for (uniform int p = 0; p<3; p++)\n            dc[p] += half_pixels[k + p * 16];\n    }\n\n    float best_error = sq(255) * 3 * 8.0f;\n    int best_table = -1;\n    int best_qcenter[3];\n    uint32 best_qbits;\n\n    for (uniform int table_level = 0; table_level < 8; table_level++)\n    {\n        float center[3];\n        int qcenter[3];\n        uint32 qbits;\n\n        for (uniform int p = 0; p < 3; p++) center[p] = dc[p] / 8 - get_etc1_dY(table_level, 2);\n        center_quant_dequant(qcenter, center, diff, prev_qcenter);\n\n        float err = quantize_pixels_etc1_half(&qbits, half_pixels, center, table_level);\n\n        if (err < best_error)\n        {\n            best_error = err;\n            best_table = table_level;\n            best_qbits = qbits;\n            for (uniform int p = 0; p < 3; p++) best_qcenter[p] = qcenter[p];\n        }\n    }\n    \n    out_table[0] = best_table;\n    out_qbits[0] = best_qbits;\n    for (uniform int p = 0; p < 3; p++) out_qcenter[p] = best_qcenter[p];\n    return best_error;\n}\n\nfloat optimize_center(float colors[4][10], uniform int p, uniform int table_level)\n{\n    float best_center = 0;\n    for (uniform int q = 0; q < 4; q++)\n    {\n        best_center += (colors[q][7 + p] - get_etc1_dY(table_level, q)) * colors[q][3];\n    }\n    best_center /= 8;\n\n    float best_err = 0;\n    for (uniform int q = 0; q < 4; q++)\n    {\n        float dY = get_etc1_dY(table_level, q);\n        best_err += sq(clamp(best_center + dY, 0, 255) - colors[q][7 + p]) * colors[q][3];\n    }\n\n    for (uniform int branch = 0; branch < 4; branch++)\n    {\n        float new_center = 0;\n        float sum = 0;\n        for (uniform int q = 0; q < 4; q++)\n        {\n            if (branch <= 1 && q <= branch) continue;\n            if (branch >= 2 && q >= branch) continue;\n            new_center += (colors[q][7 + p] - get_etc1_dY(table_level, q)) * colors[q][3];\n            sum += colors[q][3];\n        }\n\n        new_center /= sum;\n\n        float err = 0;\n        for (uniform int q = 0; q < 4; q++)\n        {\n            float dY = get_etc1_dY(table_level, q);\n            err += sq(clamp(new_center + dY, 0, 255) - colors[q][7 + p]) * colors[q][3];\n        }\n\n        if (err < best_err)\n        {\n            best_err = err;\n            best_center = new_center;\n        }\n    }\n\n    return best_center;\n}\n\nfloat compress_etc1_half_7(uint32 out_qbits[1], int out_table[1], int out_qcenter[3],\n                           float half_pixels[], etc_enc_state state[])\n{\n    int err_list[165];\n    int y_sorted_inv[8];\n    float y_sorted[8];\n\n    {\n        int y_sorted_idx[8];\n        for (uniform int k = 0; k < 8; k++)\n        {\n            float value = 0;\n            for (uniform int p = 0; p < 3; p++)\n                value += half_pixels[k + p * 16];\n\n            y_sorted_idx[k] = (((int)value) << 4) + k;\n        }\n\n        partial_sort_list(y_sorted_idx, 8, 8);\n\n        for (uniform int k = 0; k < 8; k++)\n            y_sorted_inv[k] = ((y_sorted_idx[k] & 0xF) << 4) + k;\n\n        for (uniform int k = 0; k < 8; k++)\n            y_sorted[k] = (y_sorted_idx[k] >> 4) / 3.0f;\n\n        partial_sort_list(y_sorted_inv, 8, 8);\n    }\n\n    uniform int idx = -1;\n    for (uniform int level1 = 0; level1 <= 8; level1++)\n    for (uniform int level2 = level1; level2 <= 8; level2++)\n    for (uniform int level3 = level2; level3 <= 8; level3++)\n    {\n        idx++;\n        assert(idx < 165);\n        \n        float sum[4];\n        float sum_sq[4];\n        float count[4];\n        float inv_count[4];\n\n        for (uniform int q = 0; q < 4; q++)\n        {\n            sum[q] = 0;\n            sum_sq[q] = 0;\n            count[q] = 0;\n            inv_count[q] = 0;\n        }\n\n        for (uniform int k = 0; k < 8; k++)\n        {\n            uniform int q = 0;\n            if (k >= level1) q = 1;\n            if (k >= level2) q = 2;\n            if (k >= level3) q = 3;\n\n            sum[q] += y_sorted[k];\n            sum_sq[q] += sq(y_sorted[k]);\n            count[q] += 1;\n        }\n\n        for (uniform int q = 0; q < 4; q++)\n        {\n            if (count[q] > 0) inv_count[q] = 1 / count[q];\n        }\n\n        float base_err = 0;\n        for (uniform int q = 0; q < 4; q++) base_err += sum_sq[q] - sq(sum[q]) * inv_count[q];\n\n        float t_err = sq(256) * 8;        \n        for (uniform int table_level = 0; table_level < 8; table_level++)\n        {\n            float center = 0;\n            for (uniform int q = 0; q < 4; q++) center += sum[q] - get_etc1_dY(table_level, q) * count[q];\n            center /= 8;\n\n            float err = base_err;\n            for (uniform int q = 0; q < 4; q++)\n            {\n                err += sq(center + get_etc1_dY(table_level, q) - sum[q] * inv_count[q])*count[q];\n            }\n\n            t_err = min(t_err, err);\n        }\n\n        int packed = (level1 * 16 + level2) * 16 + level3;\n\n        err_list[idx] = (((int)t_err) << 12) + packed;\n    }\n\n    partial_sort_list(err_list, 165, state->fastSkipTreshold);\n\n    float best_error = sq(255) * 3 * 8.0f;\n    int best_table = -1;\n    int best_qcenter[3];\n    uint32 best_qbits;\n\n    for (uniform int i = 0; i < state->fastSkipTreshold; i++)\n    {\n        int packed = err_list[i] & 0xFFF;\n        int level1 = (packed >> 8) & 0xF;\n        int level2 = (packed >> 4) & 0xF;\n        int level3 = (packed >> 0) & 0xF;\n                \n        float colors[4][10];\n\n        for (uniform int p = 0; p < 7; p++)\n        for (uniform int q = 0; q < 4; q++) colors[q][p] = 0;\n\n        uint32 qbits = 0;\n        for (uniform int kk = 0; kk < 8; kk++)\n        {\n            int k = y_sorted_inv[kk] & 0xF;\n\n            int qq = 0;\n            if (k >= level1) qq = 1;\n            if (k >= level2) qq = 2;\n            if (k >= level3) qq = 3;\n\n            uniform int xx = kk & 3;\n            uniform int yy = kk >> 2;\n\n            int qqq = get_remap2_q(qq);\n            qbits |= (qqq & 1) << (yy + xx * 4);\n            qbits |= (qqq >> 1) << (16 + yy + xx * 4);\n\n            float qvec[4];\n            for (uniform int q = 0; q < 4; q++)\n            {\n                qvec[q] = q == qq ? 1.0 : 0.0;\n                colors[q][3] += qvec[q];\n            }\n\n            for (uniform int p = 0; p < 3; p++)\n            {\n                float value = half_pixels[16 * p + kk];\n                for (uniform int q = 0; q < 4; q++)\n                {\n                    colors[q][p] += value * qvec[q];\n                    colors[q][4 + p] += sq(value) * qvec[q];\n                }\n            }\n        }\n        \n        float base_err = 0;\n        for (uniform int q = 0; q < 4; q++)\n        {\n            if (colors[q][3] > 0)\n            for (uniform int p = 0; p < 3; p++)\n            {\n                colors[q][7 + p] = colors[q][p] / colors[q][3];\n                base_err += colors[q][4 + p] - sq(colors[q][7 + p])*colors[q][3];\n            }\n        }\n\n        for (uniform int table_level = 0; table_level < 8; table_level++)\n        {\n            float center[3];\n            int qcenter[3];\n            \n            for (uniform int p = 0; p < 3; p++)\n            {\n                center[p] = optimize_center(colors, p, table_level);\n            }\n            \n            center_quant_dequant(qcenter, center, state->diff, state->prev_qcenter);\n            \n            float err = base_err;\n            for (uniform int q = 0; q < 4; q++)\n            {\n                int dY = get_etc1_dY(table_level, q);\n                for (uniform int p = 0; p < 3; p++)\n                    err += sq(clamp(center[p] + dY, 0, 255) - colors[q][7 + p])*colors[q][3];\n            }\n            \n            if (err < best_error)\n            {\n                best_error = err;\n                best_table = table_level;\n                best_qbits = qbits;\n                for (uniform int p = 0; p < 3; p++) best_qcenter[p] = qcenter[p];\n            }\n        }\n    }\n\n    out_table[0] = best_table;\n    out_qbits[0] = best_qbits;\n    for (uniform int p = 0; p < 3; p++) out_qcenter[p] = best_qcenter[p];\n    return best_error;\n}\n\nfloat compress_etc1_half(uint32 qbits[1], int table[1], int qcenter[3], float half_pixels[], etc_enc_state state[])\n{\n    float err = compress_etc1_half_7(qbits, table, qcenter, half_pixels, state);\n\n    for (uniform int p = 0; p < 3; p++)\n        state->prev_qcenter[p] = qcenter[p];\n\n    return err;\n}\n\n//////////////////////////\n//       ETC1 core\n\ninline uint32 bswap32(uint32 v)\n{\n    uint32 r = 0;\n    r += ((v >> 24) & 255) << 0;\n    r += ((v >> 16) & 255) << 8;\n    r += ((v >> 8) & 255) << 16;\n    r += ((v >> 0) & 255) << 24;\n    return r;\n}\n\nvoid etc_pack(uint32 data[], uint32 qbits[2], int tables[2], int qcenters[2][3], uniform int diff, uniform int flip)\n{\n    for (uniform int k = 0; k < 2; k++) data[k] = 0;\n    uniform int pos = 0;\n\n    if (diff == 0)\n    {\n        put_bits(data, &pos, 4, qcenters[1][0]);\n        put_bits(data, &pos, 4, qcenters[0][0]);\n\n        put_bits(data, &pos, 4, qcenters[1][1]);\n        put_bits(data, &pos, 4, qcenters[0][1]);\n\n        put_bits(data, &pos, 4, qcenters[1][2]);\n        put_bits(data, &pos, 4, qcenters[0][2]);\n    }\n    else\n    {\n        put_bits(data, &pos, 3, (qcenters[1][0] - qcenters[0][0]) & 7);\n        put_bits(data, &pos, 5, qcenters[0][0]);\n\n        put_bits(data, &pos, 3, (qcenters[1][1] - qcenters[0][1]) & 7);\n        put_bits(data, &pos, 5, qcenters[0][1]);\n\n        put_bits(data, &pos, 3, (qcenters[1][2] - qcenters[0][2]) & 7);\n        put_bits(data, &pos, 5, qcenters[0][2]);\n    }\n\n    put_bits(data, &pos, 1, flip);\n    put_bits(data, &pos, 1, diff);\n    put_bits(data, &pos, 3, tables[1]);\n    put_bits(data, &pos, 3, tables[0]);\n\n    uint32 all_qbits_flipped = (qbits[1] << 2) | qbits[0];\n    uint32 all_qbits = 0;\n\n    if (flip != 0) all_qbits = all_qbits_flipped;\n\n    if (flip == 0)\n    for (uniform int k = 0; k < 2; k++)\n    for (uniform int y = 0; y < 4; y++)\n    for (uniform int x = 0; x < 4; x++)\n    {\n        int bit = (all_qbits_flipped >> (k * 16 + x * 4 + y)) & 1;\n        all_qbits += bit << (k * 16 + y * 4 + x);\n    }\n\n    data[1] = bswap32(all_qbits);\n}\n\ninline void CompressBlockETC1_core(etc_enc_state state[])\n{\n    float flipped_block[48];\n\n    for (uniform int y = 0; y < 4; y++)\n    for (uniform int x = 0; x < 4; x++)\n    for (uniform int p = 0; p < 3; p++)\n    {\n        flipped_block[16 * p + x * 4 + y] = state->block[16 * p + y * 4 + x];\n    }\n\n    for (uniform int flip = 0; flip < 2; flip++)\n    for (uniform int diff = 1; diff >= 0; diff--)\n    {\n        state->diff = diff == 1;\n        state->prev_qcenter[0] = -1;\n\n        varying float * uniform pixels = state->block;\n        if (flip == 0) pixels = flipped_block;\n\n        uint32 qbits[2];\n        int tables[2];\n        int qcenters[2][3];\n\n        float err = 0;\n        err += compress_etc1_half(&qbits[0], &tables[0], qcenters[0], &pixels[0], state);\n        err += compress_etc1_half(&qbits[1], &tables[1], qcenters[1], &pixels[8], state);\n\n        if (err < state->best_err)\n        {\n            state->best_err = err;\n            etc_pack(state->best_data, qbits, tables, qcenters, diff, flip);\n        }\n    }\n}\n\nvoid etc_enc_copy_settings(etc_enc_state state[], uniform etc_enc_settings settings[])\n{\n    state->fastSkipTreshold = settings->fastSkipTreshold;\n}\n\ninline void CompressBlockETC1(uniform rgba_surface src[], int xx, uniform int yy, uniform uint8 dst[], uniform etc_enc_settings settings[])\n{\n    etc_enc_state _state;\n    varying etc_enc_state* uniform state = &_state;\n\n    etc_enc_copy_settings(state, settings);\n    load_block_interleaved(state->block, src, xx, yy);\n    state->best_err = 1e99;\n\n    CompressBlockETC1_core(state);\n\n    store_data(dst, src->width, xx, yy, state->best_data, 2);\n}\n\nexport void CompressBlocksETC1_ispc(uniform rgba_surface src[], uniform uint8 dst[], uniform etc_enc_settings settings[])\n{\n    for (uniform int yy = 0; yy<src->height / 4; yy++)\n    foreach(xx = 0 ... src->width / 4)\n    {\n        CompressBlockETC1(src, xx, yy, dst, settings);\n    }\n}\n"
  },
  {
    "path": "IntelCompressionPlugin/resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by IntelPlugin.rc\n//\n#define IDC_PRESETDELETE_BUTTON         3\n#define IDC_COMPRESSION_HELP            4\n#define IDC_COMPRESSION_COMBO           6\n#define IDC_COMPRESSION_HINT            7\n#define IDC_TEXTURETYPE_HELP            8\n#define IDC_TEXTURETYPE_COMBO           10\n#define IDC_TEXTURETYPE_HINT            11\n#define IDC_CUBEMIPLEVEL_CHECK          13\n#define IDC_MIPLEVEL_COMBO              15\n#define IDC_PRECOMPRESS_HELP            16\n#define IDC_NORMALIZE_CHECK             18\n#define IDC_FLIPX_CHECK                 19\n#define IDC_FLIPY_CHECK                 20\n#define IDC_MIPMAP_HELP                 21\n#define IDC_MIPMAPCOMBO                 23\n#define IDC_MIPMAP_COMBO                23\n#define IDC_PREVIEWPROXY_ORIGINAL       23\n#define IDC_MIPMAPS_HINT                24\n#define IDC_PREVIEWPROXY_COMPRESSED     24\n#define IDC_PREVIEW_BUTTON              25\n#define IDC_PREVIEWPROXY_ORIGINALTEXT   25\n#define IDC_PREVIEWPROXY_TEXT           26\n#define IDC_PRESET_COMBO                27\n#define IDC_PRESETSAVE_BUTTON           28\n#define IDC_PREVIEWPROXY_ZOOMIN         31\n#define IDC_PREVIEWPROXY_ZOOMOUT        32\n#define IDC_PREVIEWPROXY_ZOOMTEXT       33\n#define IDC_PREVIEWPROXY_ZOOM1X         34\n#define IDC_PREVIEWPROXY_ZOOM2X         35\n#define IDC_PREVIEWPROXY_ZOOM4X         36\n#define IDC_PREVIEWPROXY_ZOOMFIT        37\n#define IDC_PREVIEWPROXY_ZOOMHALF       38\n#define IDC_PREVIEWPROXY_ZOOMQUARTER    39\n#define IDC_PREVIEWPROXY_RGB            40\n#define IDC_PREVIEWPROXY_R              41\n#define IDC_PREVIEWPROXY_G              42\n#define IDC_PREVIEWPROXY_B              43\n#define IDC_PREVIEWPROXY_A              44\n#define IDC_PREVIEWPROXY_COMBOBOX       50\n#define IDC_PREVIEWPROXY_TEXTSIZEUNCOMPRESSED 54\n#define IDC_PREVIEWPROXY_TEXTSIZECOMPRESSED 55\n#define IDD_GETNAME                     109\n#define IDD_PREVIEW                     110\n#define IDD_LOADDIALOG                  111\n#define IDC_BUTTON1                     1001\n#define IDC_COMBO1                      1003\n#define IDC_EDIT1                       1005\n#define IDC_NAME_EDIT                   1005\n#define IDC_EXPOSURE_SLIDER             1006\n#define IDC_LOADDIALOG_MIPMAPCHECK      1007\n#define IDC_LOADDIALOG_ALPHAGROUP       1008\n#define IDC_LOADDIALOG_ALPHACHECK       1009\n#define IDC_LOADDIALOG_MIPMAPGROUP      1010\n#define IDD_MAINDIALOG                  16001\n#define IDD_ABOUT                       28950\n\n// Next default values for new objects\n// \n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NO_MFC                     1\n#define _APS_NEXT_RESOURCE_VALUE        112\n#define _APS_NEXT_COMMAND_VALUE         40001\n#define _APS_NEXT_CONTROL_VALUE         1010\n#define _APS_NEXT_SYMED_VALUE           121\n#endif\n#endif\n"
  },
  {
    "path": "IntelTextureWorks.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Solution Items\", \"Solution Items\", \"{AB3F9437-325F-430D-A6E0-5CBDBD53B73F}\"\n\tProjectSection(SolutionItems) = preProject\n\t\tREADME.md = README.md\n\tEndProjectSection\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"DirectXTex\", \"3rdParty\\DirectXTex\\DirectXTex\\DirectXTex_Desktop_2012.vcxproj\", \"{371B9FA9-4C90-4AC6-A123-ACED756D6C77}\"\nEndProject\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"IntelTextureWorks\", \"IntelCompressionPlugin\\IntelTextureWorks.vcxproj\", \"{FAA37424-40A7-47F4-98CB-4B9464145B0D}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Win32 = Debug|Win32\n\t\tDebug|x64 = Debug|x64\n\t\tProfile|Win32 = Profile|Win32\n\t\tProfile|x64 = Profile|x64\n\t\tRelease|Win32 = Release|Win32\n\t\tRelease|x64 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.ActiveCfg = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|Win32.Build.0 = Profile|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|Win32.Build.0 = Release|Win32\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64\n\t\t{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Debug|Win32.ActiveCfg = Debug|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Debug|Win32.Build.0 = Debug|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Debug|x64.Build.0 = Debug|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Profile|Win32.ActiveCfg = Release|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Profile|Win32.Build.0 = Release|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Profile|x64.ActiveCfg = Release|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Profile|x64.Build.0 = Release|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Release|Win32.ActiveCfg = Release|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Release|Win32.Build.0 = Release|Win32\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Release|x64.ActiveCfg = Release|x64\n\t\t{FAA37424-40A7-47F4-98CB-4B9464145B0D}.Release|x64.Build.0 = Release|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "PhotoshopScripts/IntelTextureWorks-ConvertCubeMap.jsx",
    "content": "﻿// Description:\n//\tThis script has been tried on Adobe Photoshop CC 2014.\n//\tThe script runs on both Windows or Mac-OS versions of Photoshop.\n//\tThe script should work with all color spaces and pixel depths\n//\tTo use, have an image open and run the script from Photoshop's \"File->Scripts\" menu.\n//      This script converts Layered cube maps with layer names -X,+X,-Z,+Z,-Y,+Y, to horizontal single layer format.\n//      Or horizontal/vertical cube map fomated documents to Layered cube map documents.\n//       The original image reamins unatered, a new image is always created.\n//       Any additional layer like Adjustment layers etc, will get duplicated into  the new image.\n//       \n//       Use this script to export a cubemap in split faces (into layers) format when color operating layers like adjustment layers \n//       are situates ontop of it. Then export the new file with the Intel Texture Works dds file format. \n//       This circumvents photoshops limitation to apply these color operation adjustment layers onto the inidividual layers and then\n//        save out the dds preserving the layers and not flattening it.\n//\n// Installation:\n//\tPlace this script in your Photoshop Presets\\Scripts directory and re-start Photoshop.\n//\tThe script will then appear in your \"File->Scripts...\" menu items.\n//\tFor more info on Photoshop scripting, see\n//\t\thttp://partners.Adobe.com/public/developer/photoshop/devcenter.html\n//\n\nvar gSquare = new UnitValue(256,\"px\");\nvar gZero = new UnitValue(0,\"px\");\n\nfunction main_body()\n{\n    if (!app.documents.length > 0) \n    {   \n        // stop if no document is opened.\n        alert(\"Sorry, No Current Document\");\n    } \n    else \n    {\n        var strtRulerUnits = app.preferences.rulerUnits;\n        if (strtRulerUnits != Units.PIXELS) \n        {\n            app.preferences.rulerUnits = Units.PIXELS; // selections are always in pixels\n        }\n\n        var origDoc = app.activeDocument;\n        var w = origDoc.width;\n        var h = origDoc.height;\n        var bits = origDoc.bitsPerChannel;\n        var layerName = new Array(\"+Y\",\"-X\",\"+Z\",\"+X\",\"-Z\",\"-Y\");\n        var orgCorners;  //image cubemap face coords into original Doc\n        var orgRot;\n        var newCornrner; //image cubemap face coords into new Doc\n        var newDoc;\n        \n        //Determine cube map format\n        if (origDoc.artLayers.length >= 6) //copy layered to horizontal cubemap format ----------------------------------------------------------------------------------\n        {\n            //-----------------Preparation-----------------------------------------------------------------\n            //store tile width\n            gSquare = w;\n            \n            //get coordinates to copy tioles from old to new document\n            orgCorners = square_corners();\n            newCorners =  horizontal_corners();\n\n            orgRot = new Array(0,0,0,0,0,0); //no rotations by default\n\n            //create new document ready for horizoal cube map aligment\n            newDoc = app.documents.add(gSquare*4,gSquare*3, origDoc.resolution,\"cubeMapHorizontal\",NewDocumentMode.RGB,DocumentFill.TRANSPARENT);\n            newDoc.bitsPerChannel = bits;\n                        \n            newDoc.info.source = \"Generated by IntelTextureTools from '\" + origDoc.name + \"'\";\n            newDoc.info.category = \"cubemap\";\n        \n            // duplicate  original document to be safe\n            var tempDoc;\n            activeDocument = origDoc;\n            tempDoc = origDoc.duplicate();\n            activeDocument = tempDoc;\n        \n            //force rgb mode\n            if (tempDoc.mode != DocumentMode.RGB) \n            {\n                tempDoc.changeMode(ChangeMode.RGB);\n            }\n            \n            //-----------------------face copy------------------------------------------------------\n            //copy faces from 'tempDoc' to 'newDoc'. Search for the 6 faces by name\n            var i;\n            for (i=0; i<6; i++)\n            {\n                //get layer\n                var layerRef = app.activeDocument.artLayers.getByName(layerName[i]);\n                \n                //if layer exists copy it into new document\n                if (layerRef != null)\n                {\n                    CopyTile(tempDoc, newDoc, orgCorners[i], newCorners[i], orgRot[i], layerRef);\n                }\n            }\n        \n           app.activeDocument = newDoc;\n           app.activeDocument.mergeVisibleLayers();            \n\n            //----------------------rest layers copy--------------------------------------------------------\n            //Now copy over using duplication the rest of the layers from temDoc to newDoc\n            var layerNameStr = layerName.toString(); //create a string array for searching\n            \n            //for all layers in the document\n            app.activeDocument = tempDoc;\n            \n            for (i=activeDocument.artLayers.length-1; i>=0; i--)\n            {\n                //Ommit the already processed cubemap faces. Search by name if the selected layer is a cubemap face\n                if (layerNameStr.indexOf(activeDocument.artLayers[i].name) == -1)\n               {\n                   //Duplicate form src doc into dst doc\n                    activeDocument.artLayers[i].duplicate(newDoc, ElementPlacement.INSIDE);\n                }\n            }\n            \n            //------------------------clean up------------------------------------------------------------\n            //close it without saving\n            tempDoc.close(SaveOptions.DONOTSAVECHANGES);\n        }\n        else if (w/4 == h/3) //copy horizontal cubemap format to layered ----------------------------------------------------------------------------------\n        {\n             //-----------------Preparation-----------------------------------------------------------------\n            //store tile width\n            gSquare = w/4;\n            \n            //get coordinates to copy tioles from old to new document\n            orgCorners = horizontal_corners();\n            newCorners = square_corners();\n\n            //create new document ready for horizoal cube map aligment\n            newDoc = app.documents.add(gSquare,gSquare, origDoc.resolution,\"cubeMapLayered\",NewDocumentMode.RGB,DocumentFill.TRANSPARENT);\n            newDoc.bitsPerChannel = bits;\n            newDoc.info.source = \"Generated by IntelTextureTools from '\" + origDoc.name + \"'\";\n            newDoc.info.category = \"cubemap\";\n\n            app.activeDocument = origDoc;\n            \n            //-----------------------face copy------------------------------------------------------\n            //get first layer where the cubemap is assumed and copy tiles into new doc as layers\n            var layerRef = app.activeDocument.artLayers[app.activeDocument.artLayers.length-1];\n            app.activeDocument.activeLayer = layerRef;\n            for (var i=0; i<layerName.length; i++)\n            {\n                CopyTilesToLayeredFormat(origDoc, newDoc, orgCorners[i], newCorners[i],  layerRef, layerName[i]);\n            }\n        \n            //----------------------rest layers copy--------------------------------------------------------\n            app.activeDocument = origDoc;\n            for (var i1=app.activeDocument.artLayers.length-2; i1>=0; i1--)\n            {\n                //Duplicate from src doc into dst doc\n                app.activeDocument.artLayers[i1].duplicate(newDoc, ElementPlacement.INSIDE);\n            }\n        \n            app.activeDocument = newDoc;\n        }\n        else if (w/3 == h/4) //copy vertical cubemap format to layered----------------------------------------------------------------------------------\n        {\n             //-----------------Preparation-----------------------------------------------------------------\n            //store tile width\n            gSquare = w/3;\n            \n            //get coordinates to copy tioles from old to new document\n            orgCorners = vertical_corners();\n            newCorners = square_corners();\n\n            //create new document ready for horizoal cube map aligment\n            newDoc = app.documents.add(gSquare,gSquare, origDoc.resolution,\"cubeMapLayered\",NewDocumentMode.RGB,DocumentFill.TRANSPARENT);\n            newDoc.bitsPerChannel = bits;\n            newDoc.info.source = \"Generated by IntelTextureTools from '\" + origDoc.name + \"'\";\n            newDoc.info.category = \"cubemap\";\n\n            app.activeDocument = origDoc;\n            \n            //-----------------------face copy------------------------------------------------------\n            //get first layer where the cubemap is assumed and copy tiles into new doc as layers\n            var layerRef = app.activeDocument.artLayers[app.activeDocument.artLayers.length-1];\n            app.activeDocument.activeLayer = layerRef;\n            for (var i=0; i<layerName.length; i++)\n            {\n                CopyTilesToLayeredFormat(origDoc, newDoc, orgCorners[i], newCorners[i],  layerRef, layerName[i]);\n            }\n        \n            //----------------------rest layers copy--------------------------------------------------------\n            app.activeDocument = origDoc;\n            for (var i1=app.activeDocument.artLayers.length-2; i1>=0; i1--)\n            {\n                //Duplicate from src doc into dst doc\n                app.activeDocument.artLayers[i1].duplicate(newDoc, ElementPlacement.INSIDE);\n            }\n        \n            app.activeDocument = newDoc;\n        }\n        else\n        {\n            alert(\"Document has not the right format. This script converts Layered cube maps with layer names -X,+X,-Z,+Z,-Y,+Y, to horizontal single layer format. Or horizontal/vertical cube map fomated documents to Layered cube map documents.\");\n        }\n        \n\n    \n        if (strtRulerUnits != Units.PIXELS) \n            app.preferences.rulerUnits = strtRulerUnits;\n    }\n}\n\nmain_body();\n\n//The target doc is layed out in a  horizontal cubemap format\n//       +Y\n//-X  +Z   +X   -Z\n//      -Y\nfunction horizontal_corners()\n{\n    var pyCorner = new Array(gSquare,gZero);\n    var pzCorner = step_down(pyCorner,gSquare);\n    var nyCorner = step_down(pzCorner,gSquare);\n    var nxCorner = step_right(pzCorner,-gSquare);\n    var pxCorner = step_right(pzCorner,gSquare);\n    var nzCorner = step_right(pxCorner,gSquare);\n    return new Array(pyCorner,nxCorner,pzCorner,pxCorner,nzCorner,nyCorner);\n}\n\n//The target doc is layed out in a  vertical cubemap format\n//       +Y\n//-X  +Z   +X  \n//      -Y\n//      -Z\nfunction vertical_corners()\n{\n    var pyCorner = new Array(gSquare,gZero);\n    var pzCorner = step_down(pyCorner,gSquare);\n    var nyCorner = step_down(pzCorner,gSquare);\n    var nxCorner = step_right(pzCorner,-gSquare);\n    var pxCorner = step_right(pzCorner,gSquare);\n    var nzCorner = step_down(nyCorner,gSquare);\n    return new Array(pyCorner,nxCorner,pzCorner,pxCorner,nzCorner,nyCorner);\n}\n\n//The original doc has one face per layer so the coords are at 0,0\nfunction square_corners()\n{\n    var origin = new Array(gZero,gZero);\n    return new Array(origin,origin,origin,origin,origin,origin);\n}\n\nfunction step_right(corner,size) { return new Array(corner[0]+size,corner[1]); }\n\nfunction step_down(corner,size) { return new Array(corner[0],corner[1]+size); }\n\n\nfunction CopyTilesToLayeredFormat(oDoc, nDoc, oCorner, nCorner,  srcLayer, layerName)\n{\n    var s = gSquare; \n    \n    //src coordinates of the copy rectangle corers\n    var oX  = new Array(oCorner[0]+s, oCorner[1]);\n    var oY  = new Array(oCorner[0],   oCorner[1]+s);\n    var oXY = new Array(oCorner[0]+s, oCorner[1]+s);\n    \n    //destination coordinates of the copy rectangle corners\n    var nX  = new Array(nCorner[0]+s, nCorner[1]);\n    var nY  = new Array(nCorner[0],   nCorner[1]+s);\n    var nXY = new Array(nCorner[0]+s, nCorner[1]+s);\n   \n    // store full copy coordinated\n    var oBound = new Array(oCorner,oX,oXY,oY);\n    var nBound = new Array(nCorner,nX,nXY,nY);\n   \n    //start form src document and activate layer, select and copy\n    activeDocument = oDoc;\n    activeDocument.activeLayer = srcLayer;\n    oDoc.selection.select(oBound);\n    oDoc.selection.copy();\n    oDoc.selection.deselect();\n\n    //activate dst document, select and past into selection\n    activeDocument = nDoc;\n    nDoc.selection.select(nBound);\n    var newLayer = nDoc.paste();\n    newLayer.name = layerName;\n    nDoc.selection.deselect();\n    \n    //revert to active src documetn\n    activeDocument = oDoc;\n}\n\n//Copy from srcLayer from oDoc to nDoc. The coordinates for copy selection are also passed.\nfunction CopyTile(oDoc, nDoc, oCorner, nCorner, angle, srcLayer)\n{\n    var s = gSquare; \n    \n    //src coordinates of the copy rectangle corers\n    var oX  = new Array(oCorner[0]+s, oCorner[1]);\n    var oY  = new Array(oCorner[0],   oCorner[1]+s);\n    var oXY = new Array(oCorner[0]+s, oCorner[1]+s);\n    \n    //destination coordinates of the copy rectangle corners\n    var nX  = new Array(nCorner[0]+s, nCorner[1]);\n    var nY  = new Array(nCorner[0],   nCorner[1]+s);\n    var nXY = new Array(nCorner[0]+s, nCorner[1]+s);\n   \n    // store full copy coordinated\n    var oBound = new Array(oCorner,oX,oXY,oY);\n    var nBound = new Array(nCorner,nX,nXY,nY);\n   \n    //start form src document and activate layer, select and copy\n    activeDocument = oDoc;\n    activeDocument.activeLayer = srcLayer;\n    oDoc.selection.select(oBound);\n    oDoc.selection.copy();\n    oDoc.selection.deselect();\n\n    //activate dst document, select and past into selection\n    activeDocument = nDoc;\n    nDoc.selection.select(nBound);\n    var newLayer = nDoc.paste();\n    \n    //rotate dst copy selection if needed\n    if (nDoc.bitsPerChannel == BitsPerChannelType.THIRTYTWO) \n    {\n        nDoc.selection.rotate(angle);\n    } \n    else \n    {\n        if (angle != 0) \n        {\n            newLayer.rotate(angle);\n        }\n    }\n    nDoc.selection.deselect();\n    \n    //revert to active src documetn\n    activeDocument = oDoc;\n}\n\n// eof\n\n"
  },
  {
    "path": "PhotoshopScripts/IntelTextureWorks-CubeMapGaussianBlur.jsx",
    "content": "﻿// Description:\n//\tThis script has been tried on Adobe Photoshop CC 2014.\n//\tThe script runs on both Windows or Mac-OS versions of Photoshop.\n//\tThe script should work with all color spaces and pixel depths\n//\tTo use, have an image open and run the script from Photoshop's \"File->Scripts\" menu.\n//\tThe currently open document should be a cubemap, each face should be in a layer\n//       and have the appropriate name +Y,-Y,+X,-X,+Z,-Z. Without the proper naming it will not work.\n//       It applies a Gaussian Blur Filter onto the CubeMap, mathcing also the edge pixels to alleviate discontiniouties between faces.\n//       The original image reamins unatered, a new image is always created.\n//\n// Installation:\n//\tPlace this script in your Photoshop Presets\\Scripts directory and re-start Photoshop.\n//\tThe script will then appear in your \"File->Scripts...\" menu items.\n//\tFor more info on Photoshop scripting, see\n//\t\thttp://partners.Adobe.com/public/developer/photoshop/devcenter.html\n//\n\nvar gSquare = new UnitValue(256,\"px\");\nvar gZero = new UnitValue(0,\"px\");\nvar bluramount = 100;\nvar isBreak = false;\n \nvar windowResourcePopUp = \"palette {  \\\n    orientation: 'column', \\\n    alignChildren: ['fill', 'top'],  \\\n    preferredSize:[300, 70], \\\n    text: 'CubeMapBlur',  \\\n    margins:15, \\\n    \\\n    bottomGroup: Group{ \\\n        txtMessage: StaticText {text:'Start Processing', size: [180,30], alignment:['center', 'center']} \\\n        cancelButton: Button { text: 'Cancel', properties:{name:'cancel'}, size: [60,24], alignment:['right', 'center'] }, \\\n    }\\\n}\"\n\n // String containing info needed to build the ScriptUI window\n var windowResource = \"dialog { \\\n\t\t\tvaluePanel: Panel { \\\n\t\t\t\torientation: 'column', \\\n\t\t\t\talignChildren: ['fill', 'top'], \\\n\t\t\t\ttext: 'Radius (1-200)', \\\n\t\t\t\tvalueText: EditText {}, \\\n\t\t\t\tbuttonsGroup: Group { \\\n\t\t\t\t\tcancelButton: Button {text: 'cancel', properties: {name: 'cancel'}}, \\\n\t\t\t\t\tokButton: Button {text: 'Ok', properties: {name: 'ok'}} \\\n\t\t\t\t} \\\n\t\t\t} \\\n\t\t}\"\n \nvar win;\n \n\nfunction showPopUp(message)\n{\n    win.show();\n    win.bottomGroup. txtMessage.text=message;\n    app.refresh();   \n}\nfunction closePopUp()\n{\n    win.close();\n}\n\nfunction CloseAll(newDoc, tgtDoc, strtRulerUnits)\n{\n     newDoc.close(SaveOptions.DONOTSAVECHANGES);\n     tgtDoc.close(SaveOptions.DONOTSAVECHANGES);\n     if (strtRulerUnits != Units.PIXELS) \n         app.preferences.rulerUnits = strtRulerUnits;\n}\n\nfunction main_body()\n{\n    if (!app.documents.length > 0) \n    {   \n        // stop if no document is opened.\n        alert(\"Sorry, No Current Document\");\n    } \n    else \n    {  \n        //Modal UI window\n        win = new Window(windowResource);\n        win.text = \"CubeMap Gaussian Blur\";\n        win.valuePanel.valueText.active = true;\n\n        // button callbacks\n        win.valuePanel.buttonsGroup.cancelButton.onClick = function() \n        {\n           bluramount=0;\n           return win.close();\n        };\n        win.valuePanel.buttonsGroup.okButton.onClick = function() \n        {\n          bluramount = Number(win.valuePanel.valueText.text);\n          win.close();\n        };\n\n        win.center();\n        win.show();\n        \n        //Create Non Modal UI mesage window\n        win = new Window(windowResourcePopUp);\n        win.bottomGroup.cancelButton.onClick = function()\n        {\n            isBreak = true;\n            win.close();\n        };\n\n       \n       if (bluramount <=0 || bluramount >200)\n       return;\n  \n        var strtRulerUnits = app.preferences.rulerUnits;\n        if (strtRulerUnits != Units.PIXELS) \n        {\n            app.preferences.rulerUnits = Units.PIXELS; // selections are always in pixels\n        }\n\n        var origDoc = app.activeDocument;\n        var newDoc;\n        var tgtDoc;\n        var w = origDoc.width;\n        var h = origDoc.height;\n        var bits = origDoc.bitsPerChannel;\n        var frontFacesNames = new Array(\"+Z\",\"-X\",\"+X\",\"-Y\",\"+Y\"); //have to be in this order center,left, right,bottom,top\n        var faceTargetCoords = new Array (new Array(1,1), new Array(0,1), new Array(2,1), new Array(1,2), new Array(1,0));\n        var frontFaceRotations = new Array(0,0,0,0,0);\n        var rightFacesNames = new Array(\"+X\",\"+Z\",\"-Z\",\"-Y\",\"+Y\");\n        var rightFaceRotations = new Array(0,0,0,-90,90);\n        var backFacesNames = new Array(\"-Z\",\"+X\",\"-X\",\"-Y\",\"+Y\");\n        var backFaceRotations = new Array(0,0,0,180,180);\n        var leftFacesNames = new Array(\"-X\",\"-Z\",\"+Z\",\"-Y\",\"+Y\");\n        var leftFaceRotations = new Array(0,0,0,90,-90);\n        var upFacesNames = new Array(\"+Y\",\"-X\",\"+X\",\"+Z\",\"-Z\");\n        var upFaceRotations = new Array(0,90,-90,0,180);\n        var bottomFacesNames = new Array(\"-Y\",\"-X\",\"+X\",\"-Z\",\"+Z\");\n        var bottomFaceRotations = new Array(0,-90,90,180,0);\n        \n        if (origDoc.artLayers.length >= 6)\n        {\n            //-----------------Preparation-----------------------------------------------------------------\n            gSquare = w; //store tile width\n                                \n            //create new document ready for horizoal cube map aligment\n            newDoc = app.documents.add(gSquare*3,gSquare*3, origDoc.resolution, \"cubeMapBlurr\", NewDocumentMode.RGB, DocumentFill.TRANSPARENT);\n            newDoc.bitsPerChannel = bits;\n\n            tgtDoc = app.documents.add(gSquare,gSquare, origDoc.resolution,  \" Blured\"+origDoc.name, NewDocumentMode.RGB, DocumentFill.TRANSPARENT);\n            tgtDoc.bitsPerChannel = bits; \n\n            showPopUp(\"Processing Face +Z (1/6)\");\n            BlurCubeMapFaceAlternate(frontFacesNames, faceTargetCoords, frontFaceRotations, bluramount, origDoc, newDoc, \"Blur +Z\", tgtDoc);\n            closePopUp();\n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }\n\n            showPopUp(\"Processing Face +X (2/6)\");\n            BlurCubeMapFaceAlternate(rightFacesNames, faceTargetCoords,rightFaceRotations, bluramount, origDoc, newDoc, \"Blur +X\", tgtDoc);\n            closePopUp();\n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }\n\n            showPopUp(\"Processing Face -X (3/6)\");\n            BlurCubeMapFaceAlternate(leftFacesNames, faceTargetCoords,leftFaceRotations, bluramount, origDoc, newDoc, \"Blur -X\", tgtDoc);\n            closePopUp();\n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }\n\n            showPopUp(\"Processing Face -Z (4/6)\");\n            BlurCubeMapFaceAlternate(backFacesNames, faceTargetCoords,backFaceRotations, bluramount, origDoc, newDoc, \"Blur -Z\", tgtDoc);\n            closePopUp();\n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }\n\n            showPopUp(\"Processing Face +Y (5/6)\");\n            BlurCubeMapFace(upFacesNames, faceTargetCoords,upFaceRotations, bluramount, origDoc, newDoc, \"Blur +Y\", tgtDoc);\n            closePopUp();\n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }\n\n            showPopUp(\"Processing Face -Y (6/6)\");\n            BlurCubeMapFace(bottomFacesNames, faceTargetCoords,bottomFaceRotations, bluramount, origDoc, newDoc, \"Blur -Y\", tgtDoc);\n            closePopUp();   \n            if (isBreak)\n            {\n                CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                return;\n            }        \n\n             showPopUp(\"FinalTouchUp\");\n             finalTouch(upFacesNames, faceTargetCoords, upFaceRotations, bluramount, tgtDoc, newDoc, \"FinalTouch Up\", tgtDoc);\n             if (isBreak)\n             {\n                 CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                 return;\n             }\n        \n             finalTouch(bottomFacesNames, faceTargetCoords, bottomFaceRotations, bluramount, tgtDoc, newDoc, \"FinalTouch Up\", tgtDoc);\n             closePopUp();        \n             if (isBreak)\n             {\n                 CloseAll(newDoc, tgtDoc, strtRulerUnits);\n                 return;\n             }\n             \n             //------------------------clean up------------------------------------------------------------\n             //close it without saving\n             newDoc.close(SaveOptions.DONOTSAVECHANGES);\n             \n             if (strtRulerUnits != Units.PIXELS) \n                 app.preferences.rulerUnits = strtRulerUnits;\n        }\n        else\n        {\n             alert(\"Please define 6 layers, one for each face of the cubemap with names -X,+X,-Z,+Z,-Y,+Y\");\n        }\n        \n    }\n}\n\nmain_body();\n\nfunction finalTouch(frontFacesNames, faceTargetCoords, frontFaceRotations, bluramount, origDoc, tmpDoc, descriptionStr, tgtDoc)\n{\n     //clear temp doc\n     app.activeDocument = tmpDoc;\n     app.activeDocument.activelayer = app.activeDocument.artLayers[0];\n     app.activeDocument.activelayer.clear();\n     \n    //Copy specific face (the first in list) and all adjacent faces (next 4) for bluring\n    var i=0;\n    for (i=0; i<frontFacesNames.length; i++)\n    {\n        //start form src document and activate layer, select and copy\n        app.activeDocument = origDoc;\n        app.activeDocument.suspendHistory(descriptionStr+\" step\"+i, \"CopyFromCubeMap(frontFacesNames, frontFaceRotations, i)\");\n      \n        //activate dst document, select and past into selection\n        app.activeDocument = tmpDoc;\n        PasteToTempFile(faceTargetCoords, frontFaceRotations, i);\n    }\n\n     app.activeDocument = tmpDoc;\n     app.activeDocument.mergeVisibleLayers();\n     \n     //Select area a bit larget than middle tile and apply artifact removal filter\n     app.activeDocument.selection.select(selecthalf_document());\n     app.activeDocument.activelayer = app.activeDocument.artLayers[0];\n     app.activeDocument.activelayer.applyDustAndScratches(bluramount/2,0);\n     app.activeDocument.selection.deselect();\n     \n    //copy all faces back into src doc\n    for (i=0; i<frontFacesNames.length; i++)\n    {\n        app.activeDocument = tmpDoc;\n        app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[i]));\n        app.activeDocument.selection.rotate(-frontFaceRotations[i]);   \n        app.activeDocument.selection.copy();\n        app.activeDocument.selection.deselect();\n              \n        app.activeDocument = tgtDoc;\n        app.activeDocument.suspendHistory(\"paste \"+frontFacesNames[i] , \"PasteTouchedBlurredTile(frontFacesNames[i])\");\n    }\n}\n\nfunction PasteTouchedBlurredTile(layername)\n{\n       app.activeDocument.activeLayer =  app.activeDocument.artLayers.getByName(layername);\n        app.activeDocument.selection.select(square_corners());\n        var newLayer = app.activeDocument.paste();\n        app.activeDocument.activelayer = newLayer;\n        newLayer.merge();\n}\n\nfunction BlurCubeMapFaceAlternate(frontFacesNames, faceTargetCoords, frontFaceRotations, bluramount, origDoc, newDoc, descriptionStr, tgtDoc)\n{\n     //Copy specific face (the first in list) and all adjacent faces (next 4) for bluring\n    var i=0;\n    for (i=0; i<frontFacesNames.length; i++)\n    {\n        //start form src document and activate layer, select and copy\n        app.activeDocument = origDoc;\n        app.activeDocument.suspendHistory(descriptionStr+\" step\"+i, \"CopyFromCubeMap(frontFacesNames, frontFaceRotations, i)\");\n\n        //activate dst document, select and past into selection\n        app.activeDocument = newDoc;\n        //app.activeDocument.suspendHistory(\"warpAdjacentFacesAndBlur\", \" PasteToTempFile(faceTargetCoords, frontFaceRotations, i)\");\n        PasteToTempFile(faceTargetCoords, frontFaceRotations, i);\n        \n        //revert to active src document\n        activeDocument = origDoc;\n    }\n   \n     app.activeDocument = newDoc;\n     app.activeDocument.mergeVisibleLayers();\n     \n     //frontFaceTargetCoords[3] is bottom tile\n     app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[3]));\n     app.activeDocument.selection.copy();     \n     app.activeDocument.selection.deselect();\n     app.activeDocument.selection.select(horizontal_corners(new Array(2,2)));\n     var newLayer = activeDocument.paste();\n     app.activeDocument.activelayer = newLayer;\n     app.activeDocument.selection.select(horizontal_corners(new Array(2,2)));\n     app.activeDocument.selection.rotate(-90);   \n     app.activeDocument.selection.deselect();\n     app.activeDocument.selection.select(horizontal_corners(new Array(0,2)));\n     var newLayer = activeDocument.paste();\n     app.activeDocument.activelayer = newLayer;\n     app.activeDocument.selection.select(horizontal_corners(new Array(0,2)));\n     app.activeDocument.selection.rotate(90);   \n     app.activeDocument.selection.deselect();    \n     app.activeDocument.mergeVisibleLayers();\n     \n     //frontFaceTargetCoords[4] is top tile\n     app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[4]));\n     app.activeDocument.selection.copy();     \n     app.activeDocument.selection.deselect();\n     app.activeDocument.selection.select(horizontal_corners(new Array(2,0)));\n     var newLayer = activeDocument.paste();\n     app.activeDocument.activelayer = newLayer;\n     app.activeDocument.selection.select(horizontal_corners(new Array(2,0)));\n     app.activeDocument.selection.rotate(90);   \n     app.activeDocument.selection.deselect();\n     app.activeDocument.selection.select(horizontal_corners(new Array(0,0)));\n     var newLayer = activeDocument.paste();\n     app.activeDocument.activelayer = newLayer;\n     app.activeDocument.selection.select(horizontal_corners(new Array(0,0)));\n     app.activeDocument.selection.rotate(-90);   \n     app.activeDocument.selection.deselect();    \n     app.activeDocument.mergeVisibleLayers();\n        \n     app.activeDocument.activelayer = app.activeDocument.artLayers[0];\n     app.activeDocument.activelayer.applyGaussianBlur(bluramount);\n\n      //Copy center tile to tgdoc\n      //frontFaceTargetCoords[0] is center tile\n      app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[0]));\n      app.activeDocument.selection.copy();\n      app.activeDocument.selection.deselect();\n      \n      //paste into correct cube map layer, frontFacesNames[0] is processed layer tile\n      app.activeDocument = tgtDoc;\n      app.activeDocument.suspendHistory(\"Paste \"+descriptionStr, \"PasteToCubeMapBlurredTile(frontFacesNames[0])\");\n}\n\nfunction BlurCubeMapFace(frontFacesNames, faceTargetCoords, frontFaceRotations, bluramount, origDoc, newDoc, descriptionStr, tgtDoc)\n{\n     //Copy specific face (the first in list) and all adjacent faces (next 4) for bluring\n    var i=0;\n    for (i=0; i<frontFacesNames.length; i++)\n    {\n        //start form src document and activate layer, select and copy\n        app.activeDocument = origDoc;\n        app.activeDocument.suspendHistory(descriptionStr+\" step\"+i, \"CopyFromCubeMap(frontFacesNames, frontFaceRotations, i)\");\n\n        //activate dst document, select and past into selection\n        app.activeDocument = newDoc;\n        //app.activeDocument.suspendHistory(\"warpAdjacentFacesAndBlur\", \" PasteToTempFile(faceTargetCoords, frontFaceRotations, i)\");\n        PasteToTempFile(faceTargetCoords, frontFaceRotations, i);\n        \n        //revert to active src document\n        activeDocument = origDoc;\n    }\n\n     app.activeDocument = newDoc;\n     app.activeDocument.mergeVisibleLayers();\n     \n     //warp and blur whole doc\n     warpAdjacentFaces();\n     \n    for (i=0; i<frontFacesNames.length; i++)\n    {\n        //start form src document and activate layer, select and copy\n        app.activeDocument = origDoc;\n        app.activeDocument.suspendHistory(descriptionStr+\" step\"+i, \"CopyFromCubeMap(frontFacesNames, frontFaceRotations, i)\");\n\n        //activate dst document, select and past into selection\n        app.activeDocument = newDoc;\n        //app.activeDocument.suspendHistory(\"warpAdjacentFacesAndBlur\", \" PasteToTempFile(faceTargetCoords, frontFaceRotations, i)\");\n        PasteToTempFile(faceTargetCoords, frontFaceRotations, i);\n        \n        //revert to active src document\n        activeDocument = origDoc;\n    }\n\n    app.activeDocument = newDoc;\n    app.activeDocument.mergeVisibleLayers();\n    app.activeDocument.activelayer = app.activeDocument.artLayers[0];\n    app.activeDocument.activelayer.applyGaussianBlur(bluramount);\n\n      //Copy center tile\n      //frontFaceTargetCoords[0] is center tile\n      app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[0]));\n      app.activeDocument.selection.copy();\n      app.activeDocument.selection.deselect();\n      \n      //paste into correct cube map layer, frontFacesNames[0] is processed layer tile\n      app.activeDocument = tgtDoc;\n      app.activeDocument.suspendHistory(\"Paste \"+descriptionStr, \"PasteToCubeMapBlurredTile(frontFacesNames[0])\");\n}\n\nfunction PasteToCubeMapBlurredTile(layername)\n{\n      var newLayer = app.activeDocument.paste();\n      newLayer.name = layername;     \n}\n\nfunction CopyFromCubeMap(frontFacesNames, frontFaceRotations, index)\n{\n     app.activeDocument.activeLayer =  app.activeDocument.artLayers.getByName(frontFacesNames[index]);\n     app.activeDocument.selection.select(square_corners());\n     app.activeDocument.selection.copy();\n     app.activeDocument.selection.deselect();\n}\nfunction PasteToTempFile(faceTargetCoords, frontFaceRotations, index)\n{\n    app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[index]));\n    var newLayer = activeDocument.paste();\n    app.activeDocument.activelayer = newLayer;\n    app.activeDocument.selection.select(horizontal_corners(faceTargetCoords[index]));\n    app.activeDocument.selection.rotate(frontFaceRotations[index]);   \n    app.activeDocument.selection.deselect();\n}\nfunction warpAdjacentFaces()\n{\n    warpHorizontal(gSquare, 0, gSquare, gSquare*2, \"left\");\n    warpHorizontal(gSquare, gSquare*2, gSquare*3, gSquare*2, \"right\");\n    warpVertical(0, gSquare, gSquare*2, gSquare, \"top\");\n    warpVertical(2*gSquare, gSquare, gSquare*2, gSquare*3, \"bottom\");\n}\n\n\n//The target doc is layed out in a  with the tile to blur in the middle and all others adjacent\n//     X\n// X T  X\n//     X\nfunction horizontal_corners(coords)\n{\n           var origin = new Array(gZero+coords[0]*gSquare, gZero+coords[1]*gSquare);\n           var oX  = step_right(origin, gSquare);\n           var oY  = step_down(origin, gSquare);\n           var oXY = step_downright(origin, gSquare);\n    \n           return new Array(origin,oX,oXY,oY);\n}\nfunction selecthalf_document()\n{\n           var origin = new Array(gZero+0.95*gSquare, gZero+0.95*gSquare);\n           var oX  = step_right(origin, 1.1*gSquare);\n           var oY  = step_down(origin, 1.1*gSquare);\n           var oXY = step_downright(origin, 1.1*gSquare);\n    \n           return new Array(origin,oX,oXY,oY);\n}\n\n//The original doc has one face per layer so the coords are at 0,0\nfunction square_corners()\n{\n    var origin = new Array(gZero,gZero);\n    var oX  = step_right(origin, gSquare);\n    var oY  = step_down(origin, gSquare);\n    var oXY =step_downright(origin, gSquare);\n    \n    return new Array(origin,oX,oXY,oY);\n}\n\nfunction step_right(corner,size) { return new Array(corner[0]+size,corner[1]); }\n\nfunction step_down(corner,size) { return new Array(corner[0],corner[1]+size); }\n\nfunction step_downright(corner,size) { return new Array(corner[0]+size,corner[1]+size); }\n\n\nfunction warpHorizontal(topDistance, leftDistance, rightDistance, bottomDistance, type)\n{\n   var width = rightDistance - leftDistance;\n   var increment = width/3;\n   \n   activeDocument.selection.select(new Array(new Array(leftDistance,topDistance), new Array(rightDistance,topDistance), new Array(rightDistance,bottomDistance),new Array(leftDistance,bottomDistance)));  \n    \n    var horizIncrements = new Array(0, increment, 2*increment, 3*increment);\n    var vertIncrements = new Array(0, increment, 2*increment,  3*increment);\n    \n    if (type==\"left\")\n        vertIncrements = new Array(3*increment, 2*increment, increment,  0);\n    \n   var idTrnf = charIDToTypeID( \"Trnf\" );\n    var desc4 = new ActionDescriptor();\n    var idnull = charIDToTypeID( \"null\" );\n        var ref2 = new ActionReference();\n        var idLyr = charIDToTypeID( \"Lyr \" );\n        var idOrdn = charIDToTypeID( \"Ordn\" );\n        var idTrgt = charIDToTypeID( \"Trgt\" );\n        ref2.putEnumerated( idLyr, idOrdn, idTrgt );\n    desc4.putReference( idnull, ref2 );\n    var idFTcs = charIDToTypeID( \"FTcs\" );\n    var idQCSt = charIDToTypeID( \"QCSt\" );\n    var idQcsa = charIDToTypeID( \"Qcsa\" );\n    desc4.putEnumerated( idFTcs, idQCSt, idQcsa );\n    var idOfst = charIDToTypeID( \"Ofst\" );\n        var desc5 = new ActionDescriptor();\n        var idHrzn = charIDToTypeID( \"Hrzn\" );\n        var idPxl = charIDToTypeID( \"#Pxl\" );\n        desc5.putUnitDouble( idHrzn, idPxl, 0.000000 );\n        var idVrtc = charIDToTypeID( \"Vrtc\" );\n        var idPxl = charIDToTypeID( \"#Pxl\" );\n        desc5.putUnitDouble( idVrtc, idPxl, 0.000000 );\n    var idOfst = charIDToTypeID( \"Ofst\" );\n    desc4.putObject( idOfst, idOfst, desc5 );\n    var idwarp = stringIDToTypeID( \"warp\" );\n        var desc6 = new ActionDescriptor();\n        var idwarpStyle = stringIDToTypeID( \"warpStyle\" );\n        var idwarpStyle = stringIDToTypeID( \"warpStyle\" );\n        var idwarpCustom = stringIDToTypeID( \"warpCustom\" );\n        desc6.putEnumerated( idwarpStyle, idwarpStyle, idwarpCustom );\n        var idwarpValue = stringIDToTypeID( \"warpValue\" );\n        desc6.putDouble( idwarpValue, 0.000000 );\n        var idwarpPerspective = stringIDToTypeID( \"warpPerspective\" );\n        desc6.putDouble( idwarpPerspective, 0.000000 );\n        var idwarpPerspectiveOther = stringIDToTypeID( \"warpPerspectiveOther\" );\n        desc6.putDouble( idwarpPerspectiveOther, 0.000000 );\n        var idwarpRotate = stringIDToTypeID( \"warpRotate\" );\n        var idOrnt = charIDToTypeID( \"Ornt\" );\n        var idHrzn = charIDToTypeID( \"Hrzn\" );\n        desc6.putEnumerated( idwarpRotate, idOrnt, idHrzn );\n        var idbounds = stringIDToTypeID( \"bounds\" );\n            var desc7 = new ActionDescriptor();\n            var idTop = charIDToTypeID( \"Top \" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idTop, idPxl, topDistance );\n            var idLeft = charIDToTypeID( \"Left\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idLeft, idPxl, leftDistance );\n            var idBtom = charIDToTypeID( \"Btom\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idBtom, idPxl, bottomDistance );\n            var idRght = charIDToTypeID( \"Rght\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idRght, idPxl, rightDistance );\n        var idRctn = charIDToTypeID( \"Rctn\" );\n        desc6.putObject( idbounds, idRctn, desc7 );\n        var iduOrder = stringIDToTypeID( \"uOrder\" );\n        desc6.putInteger( iduOrder, 4 );\n        var idvOrder = stringIDToTypeID( \"vOrder\" );\n        desc6.putInteger( idvOrder, 4 );\n        var idcustomEnvelopeWarp = stringIDToTypeID( \"customEnvelopeWarp\" );\n            var desc8 = new ActionDescriptor();\n            var idmeshPoints = stringIDToTypeID( \"meshPoints\" );\n                var list1 = new ActionList();\n                \n                //1st row\n                    var desc9 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc9.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[0] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc9.putUnitDouble( idVrtc, idPxl, topDistance - vertIncrements[0] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc9 );\n                    var desc10 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc10.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[1] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc10.putUnitDouble( idVrtc, idPxl, topDistance - vertIncrements[1]);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc10 );\n                    var desc11 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc11.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc11.putUnitDouble( idVrtc, idPxl, topDistance - vertIncrements[2] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc11 );\n                    var desc12 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc12.putUnitDouble( idHrzn, idPxl, rightDistance );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc12.putUnitDouble( idVrtc, idPxl, topDistance - vertIncrements[3] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc12 );\n                \n                //2nd row\n                    var desc13 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc13.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[0] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc13.putUnitDouble( idVrtc, idPxl, topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc13 );\n                    var desc14 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc14.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[1] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc14.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc14 );\n                    var desc15 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc15.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc15.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc15 );\n                    var desc16 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc16.putUnitDouble( idHrzn, idPxl, rightDistance );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc16.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc16 );\n                \n                //3rd row\n                    var desc17 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc17.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[0] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc17.putUnitDouble( idVrtc, idPxl,  topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc17 );\n                    var desc18 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc18.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[1] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc18.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc18 );\n                    var desc19 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc19.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc19.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc19 );\n                    var desc20 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc20.putUnitDouble( idHrzn, idPxl, rightDistance );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc20.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc20 );\n                \n                //4th row\n                    var desc21 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc21.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[0] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc21.putUnitDouble( idVrtc, idPxl, bottomDistance + vertIncrements[0] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc21 );\n                    var desc22 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc22.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[1] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc22.putUnitDouble( idVrtc, idPxl, bottomDistance + vertIncrements[1] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc22 );\n                    var desc23 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc23.putUnitDouble( idHrzn, idPxl, leftDistance + horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc23.putUnitDouble( idVrtc, idPxl, bottomDistance + vertIncrements[2] );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc23 );\n                    var desc24 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc24.putUnitDouble( idHrzn, idPxl, rightDistance );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc24.putUnitDouble( idVrtc, idPxl,  bottomDistance + vertIncrements[3]);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc24 );\n            desc8.putList( idmeshPoints, list1 );\n        var idcustomEnvelopeWarp = stringIDToTypeID( \"customEnvelopeWarp\" );\n        desc6.putObject( idcustomEnvelopeWarp, idcustomEnvelopeWarp, desc8 );\n    var idwarp = stringIDToTypeID( \"warp\" );\n    desc4.putObject( idwarp, idwarp, desc6 );\n    var idIntr = charIDToTypeID( \"Intr\" );\n    var idIntp = charIDToTypeID( \"Intp\" );\n    var idBcbc = charIDToTypeID( \"Bcbc\" );\n    desc4.putEnumerated( idIntr, idIntp, idBcbc );\n    executeAction( idTrnf, desc4, DialogModes.NO );\n    \n    activeDocument.selection.deselect()\n}\n\nfunction warpVertical(topDistance, leftDistance, rightDistance, bottomDistance, type)\n{  \n   var width = rightDistance - leftDistance;\n   var increment = width/3;\n  \n    activeDocument.selection.select(new Array(new Array(leftDistance,topDistance), new Array(rightDistance,topDistance), new Array(rightDistance,bottomDistance),new Array(leftDistance,bottomDistance)));\n    \n    var vertIncrements = new Array(0, increment, 2*increment, 3*increment);\n    var horizIncrements = new Array(3*increment, 2*increment, increment,  0);\n    \n    if (type==\"bottom\")\n       horizIncrements = new Array(0, increment, 2*increment,  3*increment);\n    \n   var idTrnf = charIDToTypeID( \"Trnf\" );\n    var desc4 = new ActionDescriptor();\n    var idnull = charIDToTypeID( \"null\" );\n        var ref2 = new ActionReference();\n        var idLyr = charIDToTypeID( \"Lyr \" );\n        var idOrdn = charIDToTypeID( \"Ordn\" );\n        var idTrgt = charIDToTypeID( \"Trgt\" );\n        ref2.putEnumerated( idLyr, idOrdn, idTrgt );\n    desc4.putReference( idnull, ref2 );\n    var idFTcs = charIDToTypeID( \"FTcs\" );\n    var idQCSt = charIDToTypeID( \"QCSt\" );\n    var idQcsa = charIDToTypeID( \"Qcsa\" );\n    desc4.putEnumerated( idFTcs, idQCSt, idQcsa );\n    var idOfst = charIDToTypeID( \"Ofst\" );\n        var desc5 = new ActionDescriptor();\n        var idHrzn = charIDToTypeID( \"Hrzn\" );\n        var idPxl = charIDToTypeID( \"#Pxl\" );\n        desc5.putUnitDouble( idHrzn, idPxl, 0.000000 );\n        var idVrtc = charIDToTypeID( \"Vrtc\" );\n        var idPxl = charIDToTypeID( \"#Pxl\" );\n        desc5.putUnitDouble( idVrtc, idPxl, 0.000000 );\n    var idOfst = charIDToTypeID( \"Ofst\" );\n    desc4.putObject( idOfst, idOfst, desc5 );\n    var idwarp = stringIDToTypeID( \"warp\" );\n        var desc6 = new ActionDescriptor();\n        var idwarpStyle = stringIDToTypeID( \"warpStyle\" );\n        var idwarpStyle = stringIDToTypeID( \"warpStyle\" );\n        var idwarpCustom = stringIDToTypeID( \"warpCustom\" );\n        desc6.putEnumerated( idwarpStyle, idwarpStyle, idwarpCustom );\n        var idwarpValue = stringIDToTypeID( \"warpValue\" );\n        desc6.putDouble( idwarpValue, 0.000000 );\n        var idwarpPerspective = stringIDToTypeID( \"warpPerspective\" );\n        desc6.putDouble( idwarpPerspective, 0.000000 );\n        var idwarpPerspectiveOther = stringIDToTypeID( \"warpPerspectiveOther\" );\n        desc6.putDouble( idwarpPerspectiveOther, 0.000000 );\n        var idwarpRotate = stringIDToTypeID( \"warpRotate\" );\n        var idOrnt = charIDToTypeID( \"Ornt\" );\n        var idHrzn = charIDToTypeID( \"Hrzn\" );\n        desc6.putEnumerated( idwarpRotate, idOrnt, idHrzn );\n        var idbounds = stringIDToTypeID( \"bounds\" );\n            var desc7 = new ActionDescriptor();\n            var idTop = charIDToTypeID( \"Top \" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idTop, idPxl, topDistance );\n            var idLeft = charIDToTypeID( \"Left\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idLeft, idPxl, leftDistance );\n            var idBtom = charIDToTypeID( \"Btom\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idBtom, idPxl, bottomDistance );\n            var idRght = charIDToTypeID( \"Rght\" );\n            var idPxl = charIDToTypeID( \"#Pxl\" );\n            desc7.putUnitDouble( idRght, idPxl, rightDistance );\n        var idRctn = charIDToTypeID( \"Rctn\" );\n        desc6.putObject( idbounds, idRctn, desc7 );\n        var iduOrder = stringIDToTypeID( \"uOrder\" );\n        desc6.putInteger( iduOrder, 4 );\n        var idvOrder = stringIDToTypeID( \"vOrder\" );\n        desc6.putInteger( idvOrder, 4 );\n        var idcustomEnvelopeWarp = stringIDToTypeID( \"customEnvelopeWarp\" );\n            var desc8 = new ActionDescriptor();\n            var idmeshPoints = stringIDToTypeID( \"meshPoints\" );\n                var list1 = new ActionList();\n                \n                //1st row\n                    var desc9 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc9.putUnitDouble( idHrzn, idPxl, leftDistance - horizIncrements[0] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc9.putUnitDouble( idVrtc, idPxl, topDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc9 );\n                    var desc10 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc10.putUnitDouble( idHrzn, idPxl, leftDistance + increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc10.putUnitDouble( idVrtc, idPxl, topDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc10 );\n                    var desc11 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc11.putUnitDouble( idHrzn, idPxl, leftDistance + 2*increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc11.putUnitDouble( idVrtc, idPxl, topDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc11 );\n                    var desc12 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc12.putUnitDouble( idHrzn, idPxl, rightDistance + horizIncrements[0]);\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc12.putUnitDouble( idVrtc, idPxl, topDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc12 );\n                \n                //2nd row\n                    var desc13 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc13.putUnitDouble( idHrzn, idPxl, leftDistance - horizIncrements[1] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc13.putUnitDouble( idVrtc, idPxl, topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc13 );\n                    var desc14 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc14.putUnitDouble( idHrzn, idPxl, leftDistance + increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc14.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc14 );\n                    var desc15 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc15.putUnitDouble( idHrzn, idPxl, leftDistance + 2*increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc15.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc15 );\n                    var desc16 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc16.putUnitDouble( idHrzn, idPxl, rightDistance + horizIncrements[1]  );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc16.putUnitDouble( idVrtc, idPxl,  topDistance + increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc16 );\n                \n                //3rd row\n                    var desc17 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc17.putUnitDouble( idHrzn, idPxl, leftDistance - horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc17.putUnitDouble( idVrtc, idPxl,  topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc17 );\n                    var desc18 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc18.putUnitDouble( idHrzn, idPxl, leftDistance +increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc18.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc18 );\n                    var desc19 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc19.putUnitDouble( idHrzn, idPxl, leftDistance + 2*increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc19.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc19 );\n                    var desc20 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc20.putUnitDouble( idHrzn, idPxl, rightDistance + horizIncrements[2] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc20.putUnitDouble( idVrtc, idPxl, topDistance + 2*increment );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc20 );\n                \n                //4th row\n                    var desc21 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc21.putUnitDouble( idHrzn, idPxl, leftDistance - horizIncrements[3] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc21.putUnitDouble( idVrtc, idPxl, bottomDistance );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc21 );\n                    var desc22 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc22.putUnitDouble( idHrzn, idPxl, leftDistance +increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc22.putUnitDouble( idVrtc, idPxl, bottomDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc22 );\n                    var desc23 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc23.putUnitDouble( idHrzn, idPxl, leftDistance +2*increment );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc23.putUnitDouble( idVrtc, idPxl, bottomDistance );\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc23 );\n                    var desc24 = new ActionDescriptor();\n                    var idHrzn = charIDToTypeID( \"Hrzn\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc24.putUnitDouble( idHrzn, idPxl, rightDistance + horizIncrements[3] );\n                    var idVrtc = charIDToTypeID( \"Vrtc\" );\n                    var idPxl = charIDToTypeID( \"#Pxl\" );\n                    desc24.putUnitDouble( idVrtc, idPxl,  bottomDistance);\n                var idrationalPoint = stringIDToTypeID( \"rationalPoint\" );\n                list1.putObject( idrationalPoint, desc24 );\n            desc8.putList( idmeshPoints, list1 );\n        var idcustomEnvelopeWarp = stringIDToTypeID( \"customEnvelopeWarp\" );\n        desc6.putObject( idcustomEnvelopeWarp, idcustomEnvelopeWarp, desc8 );\n    var idwarp = stringIDToTypeID( \"warp\" );\n    desc4.putObject( idwarp, idwarp, desc6 );\n    var idIntr = charIDToTypeID( \"Intr\" );\n    var idIntp = charIDToTypeID( \"Intp\" );\n    var idBcbc = charIDToTypeID( \"Bcbc\" );\n    desc4.putEnumerated( idIntr, idIntp, idBcbc );\n    executeAction( idTrnf, desc4, DialogModes.NO );\n\n    activeDocument.selection.deselect()\n}\n\n// eof\n\n"
  },
  {
    "path": "README.md",
    "content": "# DISCONTINUATION OF PROJECT #\nThis project will no longer be maintained by Intel.\nIntel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.\nIntel no longer accepts patches to this project.\n# Intel&reg; Texture Works Plugin for Photoshop*\n\n# Pre-Compiled Binary\n## Getting Started (Installation)\n1. Close Photoshop\n2. Download the IntelTextureWorks_1.0.4.zip file and expand it on your local computer\n3. Copy the desired plugin from either of the following unzipped folders\n\t* .../IntelTextureWorks_1.0.4\\Plugins\\x64\\IntelTextureWorks.8bi\n\t* .../IntelTextureWorks_1.0.4\\Plugins\\Win32\\IntelTextureWorks.8bi\n4. Paste the plugin into the appropriate Photoshop Plugin folder\n\t* D:\\Program Files\\Adobe Photoshop CC 2014\\Required\\Plug-Ins\\File Formats\n\t* D:\\Program Files\\Adobe\\Adobe Photoshop CS6 (64 Bit)\\Plug-ins\\File Formats\n5. Copy the cubemap scripts from:\n\t* .../IntelTextureWorks_1.0.4\\PhotoshopScripts\\IntelTextureWorks-ConvertCubeMap.jsx\n\t* .../IntelTextureWorks_1.0.4\\PhotoshopScripts\\IntelTextureWorks-CubeMapGaussianBlur.jsx\n6. Paste the cubemap scripts into:\n\t* D:\\Program Files\\Adobe Photoshop CC 2014\\Presets\\Scripts\n\n## Saving Files via Plugin\n1. File > Save As\n2. Select \"Save as type\" > **Intel&reg; Texture Works (\\*.DDS;\\*.DDS)**\n2. Navigate to store location\n3. Assign file name\n4. Save\n5. Select desired plugin options and preview (pan/zoom), as necessary\n6. Ok\n\n## Loading Files Saved via Plugin\nMultiple resident DDS plugins can result in a texture display error on load. To avoid this, use the following process to reload textures saved with the Intel&reg; Texture Works plugin for Photoshop\n\n1. File > Open As\n2. Select **Intel&reg; Texture Works (\\*.DDS;\\*.DDS)** as type (to the right of \"File name\" field)\n3. Select file\n4. Select desired mipmap loading options if applicable\n5. Select desired color profile loading options\n\n## Logging Bugs, Enhancements, & Feedback\nUse the [GitHub Issue Tracking System](https://github.com/GameTechDev/Intel-Texture-Works-Plugin/issues) to log your bugs, enhancement (requests), and feedback (general impressions appreciated). **Labels really help here - please use them**.\n\n## NOTE:\n* Not all authoring apps can read the latest BCn textures. We're keeping a running list of authoring app BCn load status on the Wiki [here](https://github.com/GameTechDev/Intel-Texture-Works-Plugin/wiki/BCn-App-Support)\n* To implement BCn texture compression in your own apps and engines [download the sample source code here](https://software.intel.com/en-us/articles/fast-ispc-texture-compressor-update)\n* The [FAQ](https://github.com/GameTechDev/Intel-Texture-Works-Plugin/wiki/FAQ) is also available on the Wiki\n\n## Requirements\n\n* Windows\\* (32/64) versions 7, 8, 10\n* Photoshop\\* CS6 through CC2015\n\n\n\n* * *\n\n\n# Source Code\n## Prerequisites ##\n\n- Visual Studio 2012 (or possibly higher, although so far all builds created with 2012)\n- Photoshop CS6 SDK, can be obtained from here: http://www.adobe.com/devnet/photoshop/sdk.html\n- Adobe Photoshop 32 or 64 bit, CS6 or higher.\n- Intel® Implicit SPMD Program Compiler (https://github.com/ispc/ispc/releases)\n## First time set-up ##\n\n- Install Photoshop CS6 SDK on developer machine\n- Copy ispc.exe to 3rdParty\\Intel\\Tools\\ directory\n- Open IntelTextureTools solution \n- Go to Property Manager and edit settings for Microsoft.Cpp.Win32.user and Microsoft.Cpp.x64.user, adding the following User Macro\n\tPHOTOSHOP_SDK_CS6 = <full path to location of Photoshop CS6 SDK> \n- Choose platform appropriate to the version of Photoshop you wish to test with (Win32 or x64)\n- Build! For convenience plugin binaries will be copied to \"~/Plugins/[platform]\" folder.\n\n## To easily run/debug from Visual Studio ##\n\n- create an alias/shortcut to the appropriate platform folder and place it in the matching Photoshop Plug-ins folder (this will allow photoshop to load plugin from build location) \n- in plugin project, select Properties->Configuration->Debugging->Target and browse to photoshop executable\n\n## 3rd Party code ## \n\nThis project utilizes the following code (located under 3rdParty folder)\n- DirectXTex, from https://github.com/Microsoft/DirectXTex (Sourced from tag Jul2015)\n- Intel, BC compression code and helpers \n\n\n```\n* Other names and brands may be claimed by their owners.\n```\n"
  },
  {
    "path": "license.txt",
    "content": "\nApache License\n Version 2.0, January 2004\n\n http://www.apache.org/licenses/ \n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION \n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and \ndistribution as defined by Sections 1 through 9 of this document. \n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright \nowner that is granting the License. \n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities \nthat control, are controlled by, or are under common control with that entity. \nFor the purposes of this definition, \"control\" means (i) the power, direct or \nindirect, to cause the direction or management of such entity, whether by \ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the \noutstanding shares, or (iii) beneficial ownership of such entity. \n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising \npermissions granted by this License. \n\n\"Source\" form shall mean the preferred form for making modifications, including \nbut not limited to software source code, documentation source, and configuration \nfiles. \n\n\"Object\" form shall mean any form resulting from mechanical transformation or \ntranslation of a Source form, including but not limited to compiled object code, \ngenerated documentation, and conversions to other media types. \n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made \navailable under the License, as indicated by a copyright notice that is included \nin or attached to the work (an example is provided in the Appendix below). \n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that \nis based on (or derived from) the Work and for which the editorial revisions, \nannotations, elaborations, or other modifications represent, as a whole, an \noriginal work of authorship. For the purposes of this License, Derivative Works \nshall not include works that remain separable from, or merely link (or bind by \nname) to the interfaces of, the Work and Derivative Works thereof. \n\n\"Contribution\" shall mean any work of authorship, including the original version \nof the Work and any modifications or additions to that Work or Derivative Works \nthereof, that is intentionally submitted to Licensor for inclusion in the Work \nby the copyright owner or by an individual or Legal Entity authorized to submit \non behalf of the copyright owner. For the purposes of this definition, \n\"submitted\" means any form of electronic, verbal, or written communication sent \nto the Licensor or its representatives, including but not limited to \ncommunication on electronic mailing lists, source code control systems, and \nissue tracking systems that are managed by, or on behalf of, the Licensor for \nthe purpose of discussing and improving the Work, but excluding communication \nthat is conspicuously marked or otherwise designated in writing by the copyright \nowner as \"Not a Contribution.\" \n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf \nof whom a Contribution has been received by Licensor and subsequently \nincorporated within the Work. \n\n2. Grant of Copyright License. Subject to the terms and conditions of this \nLicense, each Contributor hereby grants to You a perpetual, worldwide, \nnon-exclusive, no-charge, royalty-free, irrevocable copyright license to \nreproduce, prepare Derivative Works of, publicly display, publicly perform, \nsublicense, and distribute the Work and such Derivative Works in Source or \nObject form. \n\n3. Grant of Patent License. Subject to the terms and conditions of this License, \neach Contributor hereby grants to You a perpetual, worldwide, non-exclusive, \nno-charge, royalty-free, irrevocable (except as stated in this section) patent \nlicense to make, have made, use, offer to sell, sell, import, and otherwise \ntransfer the Work, where such license applies only to those patent claims \nlicensable by such Contributor that are necessarily infringed by their \nContribution(s) alone or by combination of their Contribution(s) with the Work \nto which such Contribution(s) was submitted. If You institute patent litigation \nagainst any entity (including a cross-claim or counterclaim in a lawsuit) \nalleging that the Work or a Contribution incorporated within the Work \nconstitutes direct or contributory patent infringement, then any patent licenses \ngranted to You under this License for that Work shall terminate as of the date \nsuch litigation is filed. \n\n4. Redistribution. You may reproduce and distribute copies of the Work or \nDerivative Works thereof in any medium, with or without modifications, and in \nSource or Object form, provided that You meet the following conditions: \n  You must give any other recipients of the Work or Derivative Works a copy of \n  this License; and \n\n\n  You must cause any modified files to carry prominent notices stating that You \n  changed the files; and \n\n\n  You must retain, in the Source form of any Derivative Works that You \n  distribute, all copyright, patent, trademark, and attribution notices from the \n  Source form of the Work, excluding those notices that do not pertain to any \n  part of the Derivative Works; and \n\n\n  If the Work includes a \"NOTICE\" text file as part of its distribution, then \n  any Derivative Works that You distribute must include a readable copy of the \n  attribution notices contained within such NOTICE file, excluding those notices \n  that do not pertain to any part of the Derivative Works, in at least one of \n  the following places: within a NOTICE text file distributed as part of the \n  Derivative Works; within the Source form or documentation, if provided along \n  with the Derivative Works; or, within a display generated by the Derivative \n  Works, if and wherever such third-party notices normally appear. The contents \n  of the NOTICE file are for informational purposes only and do not modify the \n  License. You may add Your own attribution notices within Derivative Works that \n  You distribute, alongside or as an addendum to the NOTICE text from the Work, \n  provided that such additional attribution notices cannot be construed as \n  modifying the License.\nYou may add Your own copyright statement to Your modifications and may provide \nadditional or different license terms and conditions for use, reproduction, or \ndistribution of Your modifications, or for any such Derivative Works as a whole, \nprovided Your use, reproduction, and distribution of the Work otherwise complies \nwith the conditions stated in this License. \n\n5. Submission of Contributions. Unless You explicitly state otherwise, any \nContribution intentionally submitted for inclusion in the Work by You to the \nLicensor shall be under the terms and conditions of this License, without any \nadditional terms or conditions. Notwithstanding the above, nothing herein shall \nsupersede or modify the terms of any separate license agreement you may have \nexecuted with Licensor regarding such Contributions. \n\n6. Trademarks. This License does not grant permission to use the trade names, \ntrademarks, service marks, or product names of the Licensor, except as required \nfor reasonable and customary use in describing the origin of the Work and \nreproducing the content of the NOTICE file. \n\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in \nwriting, Licensor provides the Work (and each Contributor provides its \nContributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY \nKIND, either express or implied, including, without limitation, any warranties \nor conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A \nPARTICULAR PURPOSE. You are solely responsible for determining the \nappropriateness of using or redistributing the Work and assume any risks \nassociated with Your exercise of permissions under this License. \n\n8. Limitation of Liability. In no event and under no legal theory, whether in \ntort (including negligence), contract, or otherwise, unless required by \napplicable law (such as deliberate and grossly negligent acts) or agreed to in \nwriting, shall any Contributor be liable to You for damages, including any \ndirect, indirect, special, incidental, or consequential damages of any character \narising as a result of this License or out of the use or inability to use the \nWork (including but not limited to damages for loss of goodwill, work stoppage, \ncomputer failure or malfunction, or any and all other commercial damages or \nlosses), even if such Contributor has been advised of the possibility of such \ndamages. \n\n9. Accepting Warranty or Additional Liability. While redistributing the Work or \nDerivative Works thereof, You may choose to offer, and charge a fee for, \nacceptance of support, warranty, indemnity, or other liability obligations \nand/or rights consistent with this License. However, in accepting such \nobligations, You may act only on Your own behalf and on Your sole \nresponsibility, not on behalf of any other Contributor, and only if You agree to \nindemnify, defend, and hold each Contributor harmless for any liability incurred \nby, or claims asserted against, such Contributor by reason of your accepting any \nsuch warranty or additional liability. \n\nEND OF TERMS AND CONDITIONS \n\nAPPENDIX: How to apply the Apache License to your work \n\nTo apply the Apache License to your work, attach the following boilerplate \nnotice, with the fields enclosed by brackets \"[]\" replaced with your own \nidentifying information. (Don't include the brackets!) The text should be \nenclosed in the appropriate comment syntax for the file format. We also \nrecommend that a file or class name and description of purpose be included on \nthe same \"printed page\" as the copyright notice for easier identification within \nthird-party archives. \n\nCopyright [yyyy] [name of copyright owner] Licensed under the Apache License, \nVersion 2.0 (the \"License\"); you may not use this file except in compliance with \nthe License. You may obtain a copy of the License at \nhttp://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or \nagreed to in writing, software distributed under the License is distributed on \nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express \nor implied. See the License for the specific language governing permissions and \nlimitations under the License.\n"
  }
]