hexsha stringlengths 40 40 | size int64 19 11.4M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 270 | max_stars_repo_name stringlengths 5 110 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 270 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 9 | max_issues_count float64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 270 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 9 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 19 11.4M | avg_line_length float64 1.93 229k | max_line_length int64 12 688k | alphanum_fraction float64 0.07 0.99 | matches listlengths 1 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
776006786ef05280069cac7e53651fcf0e117be9 | 1,209 | cpp | C++ | test/unit-tests/video/render/renderer_handle_test.cpp | albin-johansson/Centurion | df211aab826a4cb38d744553456bc1478530d46e | [
"MIT"
] | 14 | 2020-05-17T21:38:03.000Z | 2020-11-21T00:16:25.000Z | test/unit-tests/video/render/renderer_handle_test.cpp | albin-johansson/Centurion | df211aab826a4cb38d744553456bc1478530d46e | [
"MIT"
] | 70 | 2020-04-26T17:08:52.000Z | 2020-11-21T17:34:03.000Z | test/unit-tests/video/render/renderer_handle_test.cpp | albin-johansson/Centurion | df211aab826a4cb38d744553456bc1478530d46e | [
"MIT"
] | null | null | null | #include <gtest/gtest.h>
#include <iostream> // cout
#include <memory> // unique_ptr
#include "centurion/render.hpp"
#include "centurion/window.hpp"
class RendererHandleTest : public testing::Test {
protected:
[[maybe_unused]] static void SetUpTestSuite()
{
window = std::make_unique<cen::window>();
renderer = std::make_unique<cen::renderer>(window->make_renderer());
}
[[maybe_unused]] static void TearDownTestSuite()
{
renderer.reset();
window.reset();
}
inline static std::unique_ptr<cen::window> window;
inline static std::unique_ptr<cen::renderer> renderer;
};
TEST_F(RendererHandleTest, RawPointerConstructor)
{
{ // Null pointer
cen::renderer_handle handle{nullptr};
ASSERT_FALSE(handle);
ASSERT_FALSE(handle.get());
}
{ // Valid pointer
const cen::renderer_handle handle{renderer->get()};
ASSERT_TRUE(handle);
ASSERT_TRUE(handle.get());
}
}
TEST_F(RendererHandleTest, FromOwningRenderer)
{
const cen::renderer_handle handle{*renderer};
ASSERT_TRUE(handle);
ASSERT_TRUE(handle.get());
}
TEST_F(RendererHandleTest, StreamOperator)
{
const cen::renderer_handle handle{*renderer};
std::cout << handle << '\n';
}
| 21.589286 | 72 | 0.69727 | [
"render"
] |
7766b3216ec6d32968f245c78c563934b4bffa09 | 4,154 | cpp | C++ | roc_app/Managers/ConfigManager.cpp | SDraw/roc_engine | f38b38fc1ff8e48d5e0800941a2cf0d3818b4fcf | [
"MIT"
] | 7 | 2020-11-24T16:10:11.000Z | 2022-02-17T22:39:36.000Z | roc_app/Managers/ConfigManager.cpp | SDraw/roc_engine | f38b38fc1ff8e48d5e0800941a2cf0d3818b4fcf | [
"MIT"
] | null | null | null | roc_app/Managers/ConfigManager.cpp | SDraw/roc_engine | f38b38fc1ff8e48d5e0800941a2cf0d3818b4fcf | [
"MIT"
] | 2 | 2020-11-24T16:10:12.000Z | 2021-10-02T06:44:43.000Z | #include "stdafx.h"
#include "Managers/ConfigManager.h"
#include "Utils/EnumUtils.h"
namespace ROC
{
const std::vector<std::string> g_configAttributes
{
"antialiasing", "dimension", "fullscreen", "logging", "fpslimit", "vsync", "vr", "module"
};
enum ConfigAttribute : size_t
{
CA_Antialiasing = 0U,
CA_Dimension,
CA_Fullscreen,
CA_Logging,
CA_FPSLimit,
CA_VSync,
CA_VR,
CA_Module
};
}
ROC::ConfigManager::ConfigManager()
{
m_logging = false;
m_fullscreen = false;
m_antialiasing = 0;
m_windowSize = glm::ivec2(854, 480);
m_fpsLimit = 60U;
m_vsync = false;
m_vrMode = false;
pugi::xml_document *l_settings = new pugi::xml_document();
if(l_settings->load_file("settings.xml"))
{
pugi::xml_node l_root = l_settings->child("settings");
if(l_root)
{
for(pugi::xml_node l_node = l_root.child("setting"); l_node; l_node = l_node.next_sibling("setting"))
{
pugi::xml_attribute l_attribName = l_node.attribute("name");
pugi::xml_attribute l_attribValue = l_node.attribute("value");
if(l_attribName && l_attribValue)
{
switch(EnumUtils::ReadEnumVector(l_attribName.as_string(), g_configAttributes))
{
case ConfigAttribute::CA_Antialiasing:
m_antialiasing = glm::clamp(l_attribValue.as_int(0), 0, std::numeric_limits<int>::max());
break;
case ConfigAttribute::CA_Dimension:
{
std::string l_size(l_attribValue.as_string("854x480"));
std::replace(l_size.begin(), l_size.end(), 'x', ' ');
std::stringstream l_sizeStream(l_size);
l_sizeStream >> m_windowSize.x >> m_windowSize.y;
if(l_sizeStream.fail())
{
m_windowSize.x = 854;
m_windowSize.y = 480;
}
} break;
case ConfigAttribute::CA_Fullscreen:
m_fullscreen = l_attribValue.as_bool(false);
break;
case ConfigAttribute::CA_Logging:
m_logging = l_attribValue.as_bool(false);
break;
case ConfigAttribute::CA_FPSLimit:
{
m_fpsLimit = l_attribValue.as_uint(60U);
if(m_fpsLimit == 0U) m_fpsLimit = 60U;
} break;
case ConfigAttribute::CA_VSync:
m_vsync = l_attribValue.as_bool(false);
break;
case ConfigAttribute::CA_VR:
m_vrMode = l_attribValue.as_bool(false);
break;
case ConfigAttribute::CA_Module:
{
std::string l_module(l_attribValue.as_string());
if(!l_module.empty()) m_modules.push_back(l_module);
} break;
}
}
}
}
}
delete l_settings;
}
ROC::ConfigManager::~ConfigManager()
{
}
bool ROC::ConfigManager::IsLogEnabled() const
{
return m_logging;
}
bool ROC::ConfigManager::IsFullscreenEnabled() const
{
return m_fullscreen;
}
int ROC::ConfigManager::GetAntialiasing() const
{
return m_antialiasing;
}
const glm::ivec2& ROC::ConfigManager::GetWindowSize() const
{
return m_windowSize;
}
unsigned int ROC::ConfigManager::GetFPSLimit() const
{
return m_fpsLimit;
}
bool ROC::ConfigManager::GetVSync() const
{
return m_vsync;
}
bool ROC::ConfigManager::IsVRModeEnabled() const
{
return m_vrMode;
}
const std::vector<std::string>& ROC::ConfigManager::GetModules() const
{
return m_modules;
}
| 29.671429 | 117 | 0.51637 | [
"vector"
] |
7768a6eabc020a2410f32b6d97281c9362c51211 | 2,131 | cpp | C++ | dynamic_subsequence_timing.cpp | biancatoledo2/project4 | aa0b7d51c059f4d3e00d04c39d7f0075c37871b2 | [
"MIT"
] | null | null | null | dynamic_subsequence_timing.cpp | biancatoledo2/project4 | aa0b7d51c059f4d3e00d04c39d7f0075c37871b2 | [
"MIT"
] | null | null | null | dynamic_subsequence_timing.cpp | biancatoledo2/project4 | aa0b7d51c059f4d3e00d04c39d7f0075c37871b2 | [
"MIT"
] | null | null | null | ///////////////////////////////////////////////////////////////////////////////
// dynamic_subsequence_timing.cpp
//
// Example code showing how to run each algorithm while measuring
// elapsed times precisely. You should modify this program to gather
// all of your experimental data.
//
///////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <cassert>
#include <climits>
#include <iostream>
#include <random>
#include <vector>
#include "timer.hpp"
#include "dynamic_subsequence.hpp"
std::string random_letter_string(int seed, int size, int distinct_letters) {
assert(size >= 0);
assert(distinct_letters > 0);
assert(distinct_letters <= 26);
std::string s;
std::mt19937 gen(seed);
std::uniform_int_distribution<> dist('a', 'a' + distinct_letters - 1);
for (int i = 0; i < size; ++i) {
char ch;
do {
ch = dist(gen);
} while (!isprint(ch));
s.push_back(ch);
}
return s;
}
void print_bar() {
std::cout << std::string(79, '-') << std::endl;
}
int main() {
const int n = 200;
assert(n > 0);
std::string a(random_letter_string(1, n, 4)),
b(random_letter_string(2, n, 4));
double elapsed;
Timer timer;
print_bar();
std::cout << "n = " << n << std::endl
<< "a='" << a << "'" << std::endl
<< "b='" << b << "'" << std::endl;
print_bar();
std::cout << "longest substring" << std::endl;
timer.reset();
auto substring = dynamic_longest_substring(a, b);
elapsed = timer.elapsed();
std::cout << "longest substring='" << substring << "'"
<< " of length=" << substring.size() << std::endl;
std::cout << "elapsed time=" << elapsed << " seconds" << std::endl;
print_bar();
std::cout << "longest subsequence" << std::endl;
timer.reset();
auto subsequence = dynamic_longest_subsequence(a, b);
elapsed = timer.elapsed();
std::cout << "longest subsequence='" << subsequence << "'"
<< " of length=" << subsequence.size() << std::endl;
std::cout << "elapsed time=" << elapsed << " seconds" << std::endl;
print_bar();
return 0;
}
| 24.494253 | 79 | 0.554669 | [
"vector"
] |
7769095fc891b20427e7955c4373c66059a22bdd | 5,774 | cpp | C++ | src/util/lua/extend/lthreadext.cpp | jie-meng/Util | edf197b61f8606c72fc8f3b0bdbb46b57187b2ff | [
"MIT"
] | 6 | 2017-07-16T17:55:54.000Z | 2021-01-06T15:40:49.000Z | src/util/lua/extend/lthreadext.cpp | joshua-meng/Util | edf197b61f8606c72fc8f3b0bdbb46b57187b2ff | [
"MIT"
] | 30 | 2015-05-08T03:21:10.000Z | 2017-05-07T12:37:06.000Z | src/util/lua/extend/lthreadext.cpp | joshua-meng/Util | edf197b61f8606c72fc8f3b0bdbb46b57187b2ff | [
"MIT"
] | 2 | 2017-03-16T08:48:34.000Z | 2017-06-20T10:56:19.000Z | #include "lthreadext.hpp"
#include <vector>
#include "util/luaextend.hpp"
#include "util/thread.hpp"
#include "util/any.hpp"
namespace util
{
const std::string kThreadHandle = "Thread*";
const std::string kMutexHandle = "Mutex*";
const std::string kLockHandle = "Lock*";
static int sleep(lua_State* plua_state)
{
util::sleep(luaToInteger(plua_state, 1, 0));
return 0;
}
static int msleep(lua_State* plua_state)
{
util::msleep(luaToInteger(plua_state, 1, 0));
return 0;
}
static int getThreadId(lua_State* plua_state)
{
luaPushInteger(plua_state, getCurrentThreadId());
return 1;
}
static void threadFunc(std::string file, std::string func, std::vector<any> args)
{
LuaState ls;
openUtilExtendLibs(ls.getState());
int err = ls.parseFile(file);
if (0 != err)
{
printLine(luaGetError(ls.getState(), err));
return;
}
luaGetGlobal(ls.getState(), func);
for (size_t i=0; i<args.size(); ++i)
luaPushAny(ls.getState(), args[i]);
err = luaCallFunc(ls.getState(), args.size(), 0);
if (0 != err)
{
printLine(luaGetError(ls.getState(), err));
return;
}
luaPop(ls.getState(), -1);
}
static int threadCreate(lua_State* plua_state)
{
luaExtendAssert(plua_state, kLuaExtendLibUtil, "create", luaGetTop(plua_state) >= 2, "file and threadfunc needed");
luaExtendAssert(plua_state, kLuaExtendLibUtil, "create",
LuaString == luaGetType(plua_state, 1) && LuaString == luaGetType(plua_state, 2), "file and threadfunc must be string type");
std::string file = luaToString(plua_state, 1, "");
std::string func = luaToString(plua_state, 2, "");
std::vector<any> args;
for (int i=3; i<=luaGetTop(plua_state); ++i)
args.push_back(luaToAny(plua_state, i));
LuaObject<Thread>* p = luaNewEmptyObject<Thread>(plua_state, kThreadHandle);
p->setData(new Thread(UtilBind(threadFunc, file, func, args)));
return 1;
}
static int threadDestroy(lua_State* plua_state)
{
return luaObjectDestroy<Thread>(plua_state, kThreadHandle);
}
static int threadStart(lua_State* plua_state)
{
Thread* pthread = luaGetObjectData<Thread>(plua_state, kThreadHandle);
luaPushBoolean(plua_state, pthread->start(luaToInteger(plua_state, 2, 0)));
return 1;
}
static int threadJoin(lua_State* plua_state)
{
Thread* pthread = luaGetObjectData<Thread>(plua_state, kThreadHandle);
pthread->join();
return 0;
}
static int threadKill(lua_State* plua_state)
{
Thread* pthread = luaGetObjectData<Thread>(plua_state, kThreadHandle);
pthread->kill();
return 0;
}
static int threadToString(lua_State* plua_state)
{
return luaObjectToString<Thread>(plua_state, kThreadHandle);
}
static int mutexCreate(lua_State* plua_state)
{
LuaObject<Mutex>* p = luaNewEmptyObject<Mutex>(plua_state, kMutexHandle);
p->setData(new Mutex());
return 1;
}
static int mutexDestroy(lua_State* plua_state)
{
return luaObjectDestroy<Mutex>(plua_state, kMutexHandle);
}
static int mutexLock(lua_State* plua_state)
{
Mutex* pmutex = luaGetObjectData<Mutex>(plua_state, kMutexHandle);
pmutex->lock();
return 0;
}
static int mutexUnlock(lua_State* plua_state)
{
Mutex* pmutex = luaGetObjectData<Mutex>(plua_state, kMutexHandle);
pmutex->unlock();
return 0;
}
static int mutexToString(lua_State* plua_state)
{
return luaObjectToString<Mutex>(plua_state, kMutexHandle);
}
static int lockCreate(lua_State* plua_state)
{
LuaObject<Lock>* p = luaNewEmptyObject<Lock>(plua_state, kLockHandle);
p->setData(new Lock());
return 1;
}
static int lockDestroy(lua_State* plua_state)
{
return luaObjectDestroy<Lock>(plua_state, kLockHandle);
}
static int lockWait(lua_State* plua_state)
{
Lock* plock = luaGetObjectData<Lock>(plua_state, kLockHandle);
plock->wait(luaToBoolean(plua_state, 2, true));
return 0;
}
static int lockTimedWait(lua_State* plua_state)
{
Lock* plock = luaGetObjectData<Lock>(plua_state, kLockHandle);
luaPushBoolean(plua_state, plock->timedWait(luaToInteger(plua_state, 2, 2000),
luaToBoolean(plua_state, 3, true)));
return 1;
}
static int lockNotify(lua_State* plua_state)
{
Lock* plock = luaGetObjectData<Lock>(plua_state, kLockHandle);
plock->notify();
return 0;
}
static int lockToString(lua_State* plua_state)
{
return luaObjectToString<Lock>(plua_state, kLockHandle);
}
static const LuaReg thread_lib[] =
{
//{"newThread", threadCreate},
//{"newMutex", mutexCreate},
//{"newLock", lockCreate},
//{"getThreadId", getThreadId},
{"sleep", sleep},
{"msleep", msleep},
{0, 0}
};
static const LuaReg thread_obj_lib[] = {
{"delete", threadDestroy},
{"start", threadStart},
{"join", threadJoin},
{"kill", threadKill},
{"__gc", threadDestroy},
{"__tostring", threadToString},
{0, 0}
};
static const LuaReg mutex_obj_lib[] = {
{"delete", mutexDestroy},
{"lock", mutexLock},
{"unlock", mutexUnlock},
{"__gc", mutexDestroy},
{"__tostring", mutexToString},
{0, 0}
};
static const LuaReg lock_obj_lib[] = {
{"delete", lockDestroy},
{"wait", lockWait},
{"timedWait", lockTimedWait},
{"notify", lockNotify},
{"__gc", lockDestroy},
{"__tostring", lockToString},
{0, 0}
};
void extendThread(lua_State* plua_state)
{
LuaRegCombUtilLib::getInstance().addRegArray((LuaReg*)thread_lib);
//luaCreateMeta(plua_state, kThreadHandle, (LuaReg*)thread_obj_lib);
//luaCreateMeta(plua_state, kMutexHandle, (LuaReg*)mutex_obj_lib);
//luaCreateMeta(plua_state, kLockHandle, (LuaReg*)lock_obj_lib);
}
} // namespace util
| 24.158996 | 133 | 0.675961 | [
"vector"
] |
776c7dd30cc7ded92c5b7623b3ad634fe3311d2e | 1,454 | cpp | C++ | source/basic/ColoredChar.cpp | davidxk/Magician | ef1063e6800c8ddc93b7c32d30c0b846faf3dd80 | [
"MIT"
] | 4 | 2017-09-25T03:41:02.000Z | 2020-06-17T22:21:53.000Z | source/basic/ColoredChar.cpp | davidxk/Magician | ef1063e6800c8ddc93b7c32d30c0b846faf3dd80 | [
"MIT"
] | null | null | null | source/basic/ColoredChar.cpp | davidxk/Magician | ef1063e6800c8ddc93b7c32d30c0b846faf3dd80 | [
"MIT"
] | null | null | null | #include "basic/ColoredChar.h"
ColoredChar::ColoredChar(char aCh, Color aForeColor, Color aBackColor):
ch( aCh ), foreColor(aForeColor), backColor(aBackColor) { }
void ColoredChar::setForeColor(Color foreColor)
{
this->foreColor = foreColor;
}
void ColoredChar::setBackColor(Color backColor)
{
this->backColor = backColor;
}
void ColoredChar::setColor(Color foreColor, Color backColor)
{
this->foreColor = foreColor;
this->backColor = backColor;
}
bool ColoredChar::operator==(const ColoredChar& cchar) const
{
return ch == cchar.ch && foreColor == cchar.foreColor &&
backColor == cchar.backColor;
}
bool ColoredChar::operator!=(const ColoredChar& cchar) const
{
return ch != cchar.ch || foreColor != cchar.foreColor ||
backColor != cchar.backColor;
}
Image ImageUtil::char2Image(const char ch, Color foreColor, Color backColor)
{
return Image(1, ImageLine(1, ColoredChar(ch, foreColor, backColor)));
}
Image ImageUtil::vec2Image(const vector<char>& vec, Color foreColor, Color backColor)
{
Image image;
for(const char ch: vec)
image.push_back(ImageLine(1, ch));
return image;
}
ImageLine ImageUtil::str2ImageLine(const string& str, Color foreColor, Color backColor)
{
ImageLine line;
for(const auto& ch: str)
line.push_back( ColoredChar(ch, foreColor, backColor) );
return line;
}
string ImageUtil::ImageLine2str(const ImageLine& line)
{
string str;
for(const auto& cchar: line)
str += cchar.ch;
return str;
}
| 22.030303 | 87 | 0.734525 | [
"vector"
] |
7771433fe05886cbfeaa84200968b8ef8adcf707 | 1,941 | cpp | C++ | src/cell-simulation/core/camera.cpp | firestack/cell-simulation | 11eacc685afe7c283c1fc2ed6f8b312785f45f98 | [
"MIT"
] | null | null | null | src/cell-simulation/core/camera.cpp | firestack/cell-simulation | 11eacc685afe7c283c1fc2ed6f8b312785f45f98 | [
"MIT"
] | null | null | null | src/cell-simulation/core/camera.cpp | firestack/cell-simulation | 11eacc685afe7c283c1fc2ed6f8b312785f45f98 | [
"MIT"
] | null | null | null | #include "camera.h"
#include <SFML/Window/Keyboard.hpp>
Camera::Camera() :
m_mode(mode::Free),
m_speed(250.0f),
m_zoomSpeed(0.01f),
m_location(0, 0),
m_trackingEntity(0)
{ }
void Camera::resize(const uint32 width, const uint32 height)
{
m_view.setSize(width, height);
}
void Camera::trackEntity(Entity* entity)
{
m_mode = mode::Track;
m_trackingEntity = entity;
}
void Camera::update(const float dt)
{
// If we are in the tracking mode,
// Update our position to be the same as the entities position as long as it is valid.
if (m_mode == mode::Track) {
// Make sure we have a valid entity to track
// Otherwise we want to pop back out of the track mode.
if (m_trackingEntity) {
m_location = m_trackingEntity->getLocation();
m_view.setCenter(m_location.x, m_location.y);
}
else {
m_mode = mode::Free;
}
}
}
void Camera::applyKeyboardControls(const float dt)
{
bool swapMode = false;
if (sf::Keyboard::isKeyPressed(sf::Keyboard::W)) {
m_view.move(0.0f, -m_speed * dt);
swapMode = true;
}
else if (sf::Keyboard::isKeyPressed(sf::Keyboard::S)) {
m_view.move(0.0f, m_speed * dt);
swapMode = true;
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
m_view.move(-m_speed * dt, 0.0f);
swapMode = true;
}
else if (sf::Keyboard::isKeyPressed(sf::Keyboard::D)) {
m_view.move(m_speed * dt, 0.0f);
swapMode = true;
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Q))
m_view.zoom(1.0f + m_zoomSpeed);
else if (sf::Keyboard::isKeyPressed(sf::Keyboard::E))
m_view.zoom(1.0f - m_zoomSpeed);
// Switch back to free mode if they used the control keys.
if (swapMode) {
m_mode = mode::Free;
}
}
void Camera::render(sf::RenderTarget& target)
{
target.setView(m_view);
}
| 24.56962 | 90 | 0.605358 | [
"render"
] |
7772fe597415fd309ef70459d08a729af91a9d7a | 1,816 | cpp | C++ | src/IpReassemblyBuffer.cpp | whitearsenic/Kdd99-Feature-Extractor-Prebuilt | a6128bdbc81a1fbfd9bdf76586e70c562b59fa3a | [
"MIT"
] | 99 | 2017-03-07T08:56:15.000Z | 2022-03-29T05:29:43.000Z | src/IpReassemblyBuffer.cpp | cainsmile/kdd99_feature_extractor | f3d40e3f8df78a3ed7ccdbfabb1b763e9e4d87c0 | [
"MIT"
] | 19 | 2017-04-08T08:22:44.000Z | 2021-11-09T03:05:28.000Z | src/IpReassemblyBuffer.cpp | cainsmile/kdd99_feature_extractor | f3d40e3f8df78a3ed7ccdbfabb1b763e9e4d87c0 | [
"MIT"
] | 46 | 2016-07-07T15:49:49.000Z | 2022-03-15T21:57:28.000Z | #include "IpReassemblyBuffer.h"
#include <assert.h>
namespace FeatureExtractor {
using namespace std;
IpReassemblyBuffer::IpReassemblyBuffer()
: datagram(nullptr), first_frag_ts(), last_frag_ts()
, frame_count(0), total_length(0)
{
}
IpReassemblyBuffer::~IpReassemblyBuffer()
{
// Datagram is returned by calling method add_fragment() or& must be deallocated by caller
}
Timestamp IpReassemblyBuffer::get_last_fragment_ts() const
{
return last_frag_ts;
}
IpDatagram *IpReassemblyBuffer::add_fragment(const IpFragment *frag)
{
// If first fragment (by order in datagram) received for the first time,
// create datagram with its values
if (!datagram && frag->get_ip_frag_offset() == 0) {
datagram = new IpDatagram(*frag);
}
// Timestamps, fragment/frame count & total_length of datagram
if (frame_count == 0)
first_frag_ts = frag->get_start_ts();
last_frag_ts = frag->get_start_ts();
frame_count++;
total_length += frag->get_length();
// Flag MF = 0 only if last fragment
bool is_last_frag = !frag->get_ip_flag_mf();
size_t frag_start = frag->get_ip_frag_offset();
size_t frag_end = frag_start + frag->get_ip_payload_length() - 1;
// Fill holes with new fragment
hole_list.add_fragment(frag_start, frag_end, is_last_frag);
// If no hole left IP datagram is reassembled
if (hole_list.is_empty()) {
assert(datagram != nullptr && "IP reassebly failed: NULL datagram");
// Update timestamps, frame count & length
datagram->set_start_ts(first_frag_ts);
datagram->set_end_ts(last_frag_ts);
datagram->set_frame_count(frame_count);
datagram->set_length(total_length);
// Caller should take care of destroying the datagram object
IpDatagram *ret = datagram;
datagram = nullptr;
return ret;
}
return nullptr;
}
}
| 27.104478 | 92 | 0.721366 | [
"object"
] |
a55cabb48c246937b7f5f0ed0ce423e94350e007 | 40,688 | cpp | C++ | src/Sim/initialise.cpp | midas-isg/global-epidemic-simulator | 00a481d20336ed1c8560d2ac7fabed3f634a0726 | [
"Apache-2.0"
] | null | null | null | src/Sim/initialise.cpp | midas-isg/global-epidemic-simulator | 00a481d20336ed1c8560d2ac7fabed3f634a0726 | [
"Apache-2.0"
] | null | null | null | src/Sim/initialise.cpp | midas-isg/global-epidemic-simulator | 00a481d20336ed1c8560d2ac7fabed3f634a0726 | [
"Apache-2.0"
] | null | null | null | /* initialise.cpp, part of the Global Epidemic Simulation v1.0 BETA
/* Read initial data and setup initial matrices
/*
/* Copyright 2012, MRC Centre for Outbreak Analysis and Modelling
/*
/* Licensed under the Apache License, Version 2.0 (the "License");
/* you may not use this file except in compliance with the License.
/* You may obtain a copy of the License at
/*
/* http://www.apache.org/licenses/LICENSE-2.0
/*
/* Unless required by applicable law or agreed to in writing, software
/* distributed under the License is distributed on an "AS IS" BASIS,
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/* See the License for the specific language governing permissions and
/* limitations under the License.
*/
#include "initialise.h"
void clearBuffer(world* w) {
w->buffer_pointer=0;
w->buffer_content=0;
}
void readBuffer(FILE* f, world* w) {
w->buffer_content = fread(w->read_buffer,1,BUFFER_SIZE,f);
w->buffer_pointer = 0;
}
void read(FILE* f, int size, char* address, world* w) {
int i;
if (w->buffer_pointer+(SIM_I64)size<=w->buffer_content) { // Common case - we'll be able to read the required amount without a buffer reload.
for (i=0; i<size; i++) {
address[i]=w->read_buffer[w->buffer_pointer++];
}
} else {
i=0; // This bit looks overkill, but for various reasons, I wanted to ensure
// the code handles fread in readBuffer returning read 0 bytes. I suspect this might
// rarely happen under very abnormally high disk/network IO stress.
while (i<size) { // While we want more bytes:
int diff = (int) (w->buffer_content-w->buffer_pointer); // What's left in the buffer?
while ((diff>0) && (i<size)) { // While there are bytes left and we want them
address[i++]=w->read_buffer[w->buffer_pointer++]; // Pick them from the buffer
diff--; // One less byte left..
}
if (i<size) readBuffer(f,w); // Buffer reload if we still want bytes (ie diff==0)
}
}
}
void loadOverlay(world *w, char *file) {
errline=1136;
FILE* f = fopen(&file[0],"rb");
localPatch* p;
int households,people;
clearBuffer(w);
for (int i=0; i<2160; i++) {
for (int j=0; j<1080; j++) {
read(f,4,(char*)&households,w);
read(f,4,(char*)&people,w);
if (w->localPatchLookup[i][j]>=0) {
p=w->localPatchList[w->localPatchLookup[i][j]];
p->no_people+=people;
p->no_households+=households;
p->rem_no_households+=households;
}
}
}
fclose(f);
for (int i=0; i<2160; i++) {
for (int j=0; j<1080; j++) {
if (w->localPatchLookup[i][j]>=0) {
p=w->localPatchList[w->localPatchLookup[i][j]];
p->households = new household[w->localPatchList[w->localPatchLookup[i][j]]->no_households];
p->people = new person[w->localPatchList[w->localPatchLookup[i][j]]->no_people];
p->no_people=0;
p->no_households=0;
}
}
}
errline=1165;
}
void loadHouseholdFile(world *w, char* file, unsigned char country, int**** tpgn) {
errline=1172;
unsigned int total_households=0;
unsigned int total_hosts=0;
unsigned short hosts_in_household=0;
unsigned int i=0,j=0;
double lat=0;
double lon=0;
int admin_unit;
int ls_x=0;
int ls_y=0;
float age=0;
unsigned int place=0;
unsigned short place_type=0;
unsigned short group=0;
int the_patch;
int cache_patch=-1;
int cache_cp_index=-1;
unsigned char found_patch=0;
unsigned short no_age_groups;
float lower_bound;
FILE* f = fopen(&file[0],"rb");
clearBuffer(w);
read(f,2,(char*)&no_age_groups,w);
for (i=0; i<no_age_groups; i++) {
read(f,4,(char*)&lower_bound,w);
}
read(f,4,(char*)&total_households,w);
read(f,4,(char*)&total_hosts,w);
// Calculate traveller/visitor probability, and normalise travel matrix for this country
float total_travellers = 0;
for (int i=0; i<w->destinations_count[country]; i++) total_travellers+=w->prob_dest[country][i];
w->prob_travel[country]=(1.0f/365.0f) * (total_travellers/(float)total_hosts);
for (int i=0; i<w->destinations_count[country]; i++) w->prob_dest[country][i]/=total_travellers;
total_travellers=0;
for (int i=0; i<w->origins_count[country]; i++) total_travellers+=w->prob_orig[country][i];
w->prob_visit[country] = (1.0f/365.0f) * (total_travellers/(float)total_hosts);
for (int i=0; i<w->origins_count[country]; i++) w->prob_orig[country][i]/=total_travellers;
// Now convert w->prob_orig and w->prob_dest to cumulative.
if (w->origins_count[country]>0) {
for (int i=1; i<w->origins_count[country]; i++) {
w->prob_orig[country][i]+=w->prob_orig[country][i-1];
if (w->prob_orig[country][i]>1.0f) w->prob_orig[country][i]=1.0f;
}
w->prob_orig[country][w->origins_count[country]-1]=2.0f; // Ensure final element in cumulative distribution is succeessful
}
if (w->destinations_count[country]>0) {
for (int i=1; i<w->destinations_count[country]; i++) {
w->prob_dest[country][i]+=w->prob_dest[country][i-1];
if (w->prob_dest[country][i]>1.0f) w->prob_dest[country][i]=1.0f;
}
w->prob_dest[country][w->destinations_count[country]-1]=2.0f; // Ensure final element in cumulative distribution is succeessful
}
int* unemp=new int[4];
int* tot=new int[4];
unemp[0]=0;
unemp[1]=0;
unemp[2]=0;
unemp[3]=0;
tot[0]=0;
tot[1]=0;
tot[2]=0;
tot[3]=0;
for (i=0; i<total_households; i++) {
read(f,8,(char*)&lat,w);
read(f,8,(char*)&lon,w);
read(f,2,(char*)&hosts_in_household,w);
read(f,4,(char*)&admin_unit,w);
w->a_units[admin_unit].no_hosts+=hosts_in_household;
// Locate patch for (lat,lon) - is it local?
ls_x=lonToLsIndex(lon);
ls_y=latToLsIndex(lat);
int ls_xd20=ls_x/20;
int ls_yd20=ls_y/20;
the_patch=w->localPatchLookup[ls_xd20][ls_yd20];
if (the_patch>=0) {
w->people_per_country_per_node[country][w->mpi_rank]+=hosts_in_household;
household *h = &w->localPatchList[the_patch]->households[w->localPatchList[the_patch]->no_households];
h->lon=(float)lon;
h->lat=(float)lat;
h->unit=admin_unit;
w->a_units[admin_unit].no_nodes=1; // Mark unit as "in use" on this node. MPI reduce later will work out if it's used on other nodes too.
h->no_people=(unsigned char) hosts_in_household;
h->susc_people=h->no_people;
h->first_person=w->localPatchList[the_patch]->no_people;
h->country=country;
h->patch=the_patch;
for (j=0; j<hosts_in_household; j++) {
person *p = &w->localPatchList[the_patch]->people[w->localPatchList[the_patch]->no_people];
p->house=h;
read(f,1,(char*)&p->age,w); // DUMMY - age index group
read(f,4,(char*)&p->age,w); // Actual age (Float)
int k=0;
while ((k<w->no_age_bands-1) && (w->max_age_band[k]<p->age)) k++;
p->susceptibility=(float)w->init_susceptibility[k];
read(f,2,(char*)&place_type,w);
p->place_type = (unsigned char) place_type;
read(f,4,(char*)&p->place,w);
read(f,2,(char*)&p->group,w);
if (p->place_type<w->P->no_place_types) {
tot[p->place_type]++;
if (p->place<w->no_places[country][p->place_type]) {
if (p->group==65535) p->group=w->places[country][p->place_type].at(p->place)->no_groups-1;
tpgn[p->place_type][p->place][p->group][w->mpi_rank]++;
} else
unemp[p->place_type]++;
} else { printf("%d: ERROR - p->place_type=%d\n",w->mpi_rank, p->place_type); fflush(stdout); } // Should never happen!
p->status=STATUS_SUSCEPTIBLE;
w->localPatchList[the_patch]->no_people++;
}
w->localPatchList[the_patch]->no_households++;
if (w->localPatchList[the_patch]->no_households>w->localPatchList[the_patch]->rem_no_households) {
printf("%d: ERROR! No. of households in file disagrees with overlay, rem_hh=%d, hh=%d, the_patch=%d, country=%d, ls_x=%d, ls_y=%d, lon=%e, lat=%e\n",w->mpi_rank,w->localPatchList[the_patch]->rem_no_households,
w->localPatchList[the_patch]->no_households,the_patch,country,ls_x,ls_y,lon,lat);
w->localPatchList[the_patch]->no_households=w->localPatchList[the_patch]->rem_no_households; // Just to keep it safe.
}
found_patch=0;
if (cache_patch==the_patch) w->country_patch_pop[country][cache_cp_index]+=hosts_in_household;
else {
for (j=0; j<w->patches_in_country[country].size(); j++) {
if (w->patches_in_country[country][j]==the_patch) {
found_patch=1;
w->country_patch_pop[country][j]+=hosts_in_household;
cache_patch=the_patch;
cache_cp_index=j;
j=(int)w->patches_in_country[country].size();
}
}
if (found_patch==0) {
w->patches_in_country[country].push_back(the_patch);
w->country_patch_pop[country].push_back(hosts_in_household);
cache_patch=the_patch;
cache_cp_index=(int) (w->patches_in_country[country].size()-1);
}
}
} else { // Household is not on node - need to parse, and possibly track establishments
// Remember countries may be entirely on another node. Hence, fix this with MPI SYNC.
for (j=0; j<hosts_in_household; j++) {
read(f,1,(char*)&age,w); // Dummy ageband index
read(f,4,(char*)&age,w); // Actual age float
read(f,2,(char*)&place_type,w); // Place type 0..3
read(f,4,(char*)&place,w); // Index of place
read(f,2,(char*)&group,w); // Group no. within palce
if (w->allPatchLookup[ls_xd20][ls_yd20]==-1) { // This can happen if population FLT file is out of sync with synthetic population
printf("%d: MINUS ONE PATCH! ls_x=%d, ls_y=%d, ls_x/20=%d,ls_y/20=%d, lon=%E,lat=%E\n",w->mpi_rank,ls_x,ls_y,ls_xd20,ls_yd20,lon,lat); fflush(stdout);
} else {
if (place_type<w->P->no_place_types) {
if (place<w->no_places[country][place_type]) {
if (group==65535) group= w->places[country][place_type].at(place)->no_groups-1;
tpgn[place_type][place][group][w->allPatchList[w->allPatchLookup[ls_xd20][ls_yd20]]->node]++;
}
}
}
}
}
int test = w->allPatchLookup[ls_x/20][ls_y/20];
if (test>=0) {
w->patch_populations[test]+=hosts_in_household;
} else { printf("Invalid APL, lon=%e, lat=%e, test=%d\n",lon,lat,test); fflush(stdout); }
}
fclose(f);
errline=11275;
}
void linkPeopleToEstablishments(world* w, int country, int**** tpgn) {
errline=11279;
for (unsigned int i=0; i<w->P->no_place_types; i++) {
for (unsigned int j=0; j<w->no_places[country][i]; j++) {
place* p = w->places[country][i].at(j);
p->group_member_count=new unsigned int[p->no_groups];
for (unsigned int m=0; m<p->no_groups; m++) p->group_member_count[m]=0;
unsigned int total=0;
for (int m=0; m<w->mpi_size; m++) {
for (unsigned int k=0; k<p->no_groups; k++) {
total+=tpgn[i][j][k][m];
}
}
if (total!=p->total_hosts) {
printf("%d: Error - country %d, place type %d, place no %d, est says hosts=%d, hh says hosts=%d\n",
w->mpi_rank,country,i,j,p->total_hosts,total);
p->total_hosts=total;
}
p->no_nodes=0;
for (int m=0; m<w->mpi_size; m++) {
for (unsigned int k=0; k<p->no_groups; k++) {
if (tpgn[i][j][k][m]>0) {
p->no_nodes++;
k=p->no_groups;
}
}
}
p->group_member_node_count = new unsigned int*[p->no_groups];
if (p->no_nodes>1) p->no_nodes=w->mpi_size;
for (unsigned int m=0; m<p->no_groups; m++) {
p->group_member_node_count[m]=new unsigned int[p->no_nodes];
}
for (unsigned int k=0; k<p->no_groups; k++) {
p->local_members[k]=new person*[tpgn[i][j][k][w->mpi_rank]];
if (p->no_nodes==1) {
p->group_member_node_count[k][0]=0; // Use as counter
p->group_member_count[k]+=tpgn[i][j][k][w->mpi_rank];
} else {
for (int m=0; m<w->mpi_size; m++) {
p->group_member_count[k]+=tpgn[i][j][k][m];
if (m==w->mpi_rank) p->group_member_node_count[k][m]=0; // Use as counter
else p->group_member_node_count[k][m]=tpgn[i][j][k][m]; // Use the value - nothing to count.
}
}
}
}
}
for (unsigned int i=0; i<w->noLocalPatches; i++) {
localPatch* lp = w->localPatchList[i];
for (int j=0; j<lp->no_households; j++) {
for (unsigned char k=0; k<lp->households[j].no_people; k++) {
person* p = &lp->people[lp->households[j].first_person+k];
if (p->house->country==country) {
if (p->place_type<w->P->no_place_types) {
if (p->place<w->no_places[country][p->place_type]) {
place* e = w->places[country][p->place_type].at(p->place);
if (e->no_nodes==1) {
e->local_members[p->group][e->group_member_node_count[p->group][0]++]=p;
} else if (e->no_nodes>1) {
e->local_members[p->group][e->group_member_node_count[p->group][w->mpi_rank]++]=p;
}
}
}
}
}
}
}
errline=11357;
}
void loadPlaces(world *w,char* file,unsigned char country,unsigned char place_type) {
// Load given establishment file of given establishment type, for given country.
errline=11362;
unsigned short dummy2;
FILE* f = fopen(&file[0],"rb");
read(f,2,(char*)&dummy2,w); // ID of file. (should == place_type)
read(f,4,(char*)&w->no_places[country][place_type],w);
for (unsigned int i=0; i<w->no_places[country][place_type]; i++) {
place* e = new place();
e->country=country;
read(f,8,(char*)&e->lat,w);
read(f,8,(char*)&e->lon,w);
read(f,4,(char*)&e->total_hosts,w);
read(f,4,(char*)&e->no_groups,w); // Actually, this is "largest group number" so... groups=0,1,2,3 will be "3"
e->no_groups+=2; // So no. groups = +1, then +1 for extra "65535" meaning staff/no group.
read(f,4,(char*)&e->unit,w);
errline=11381;
e->local_members = new person**[e->no_groups];
w->places[country][place_type].push_back(e);
errline=11384;
}
fclose(f);
}
void loadTravelMatrix(world *w) {
errline=11390;
string t_file = w->in_path+"travel_matrix.bin";
FILE *iniFile = fopen(&t_file[0],"rb");
clearBuffer(w);
read(iniFile,4,(char*)&w->no_countries,w);
w->prob_visit = new float[w->no_countries+1]; // The +1 is to allow for "no country" - the -9999 in the initialisation file.
w->prob_travel = new float[w->no_countries+1];
w->prob_visit[w->no_countries]=-1;
w->prob_travel[w->no_countries]=-1;
w->origins_count = new int[w->no_countries];
w->destinations_count = new int[w->no_countries];
w->prob_dest_country = new unsigned char*[w->no_countries];
w->prob_dest = new float*[w->no_countries];
w->prob_orig_country = new unsigned char*[w->no_countries];
w->prob_orig = new float*[w->no_countries];
w->patches_in_country = new lwv::vector<int>[w->no_countries];
w->country_patch_pop = new lwv::vector<int>[w->no_countries];
int country_temp;
for (int i=0; i<w->no_countries; i++) {
read(iniFile,4,(char*)&w->destinations_count[i],w);
w->prob_dest_country[i] = new unsigned char[w->destinations_count[i]];
w->prob_dest[i] = new float[w->destinations_count[i]];
for (int j=0; j<w->destinations_count[i]; j++) {
read(iniFile,4,(char*)&country_temp,w);
w->prob_dest_country[i][j]=(unsigned char) country_temp;
read(iniFile,4,(char*)&country_temp,w);
w->prob_dest[i][j] = (float) country_temp;
}
}
for (int i=0; i<w->no_countries; i++) {
read(iniFile,4,(char*)&w->origins_count[i],w);
w->prob_orig_country[i] = new unsigned char[w->origins_count[i]];
w->prob_orig[i] = new float[w->origins_count[i]];
for (int j=0; j<w->origins_count[i]; j++) {
read(iniFile,4,(char*)&country_temp,w);
w->prob_orig_country[i][j]=(unsigned char) country_temp;
read(iniFile,4,(char*)&country_temp,w);
w->prob_orig[i][j]=(float) country_temp;
}
}
w->people_per_country_per_node = new unsigned int*[w->no_countries];
for (int i=0; i<w->no_countries; i++) {
w->people_per_country_per_node[i] = new unsigned int[w->mpi_size];
for (int j=0; j<w->mpi_size; j++) {
w->people_per_country_per_node[i][j]=0;
}
}
fclose(iniFile);
errline=11447;
}
void loadPatches(world *w) {
errline=11453;
int x,y,size,node;
int local=0;
int p_i,p_j=0;
int pi_d20=0;
int pj_d20=0;
string datafile="";
datafile.append(w->in_path);
datafile.append("config_");
std::stringstream rankConverter;
rankConverter << w->mpi_rank;
datafile.append(rankConverter.str());
datafile.append(".lsi");
clearBuffer(w);
FILE* iniFile = fopen(&datafile[0],"rb");
read(iniFile,4,(char*)&w->noLocalPatches,w);
read(iniFile,4,(char*)&w->noRemotePatches,w);
// Read patch data - comes in square bundles of landscan cells.
w->totalPatches = w->noLocalPatches + w->noRemotePatches;
w->allPatchList = new patch*[w->totalPatches];
w->localPatchList = new localPatch*[w->noLocalPatches];
w->patch_populations = new int[w->totalPatches];
for (int i=0; i<(int)w->totalPatches; i++) {
read(iniFile,4,(char*)&x,w); // Landscan X co-ordinate of top-left corner
read(iniFile,4,(char*)&y,w); // Landscan Y co-ordinate for top-left corner
y+=720; // Not sure about this. Landscan 0 = 84degrees Latitude
read(iniFile,4,(char*)&size,w); // Size in landscan cells
read(iniFile,4,(char*)&node,w); // Node that has "local" info for this cell
w->patch_populations[i]=0;
if (node==w->mpi_rank) { // This patch is local for this node.
if (local>=w->noLocalPatches) {
printf("Error - node %d, more local patches in file than reported in header\n",w->mpi_rank);
fflush(stdout);
local=w->noLocalPatches-1;
}
localPatch *p = new localPatch();
p->x=(unsigned short) x;
p->y=(unsigned short) y;
p->size=(unsigned short) size;
p->node=(short) node;
p->no_people=0;
p->no_households=0;
p->rem_no_households=0;
p->no_qpatches=0;
p->p_traveller=0;
p->p_visitor=0;
w->localPatchList[local]=p;
w->allPatchList[i]=p;
pi_d20=p->x/20;
pj_d20=p->y/20;
if ((pi_d20>=0) && (pi_d20<2160) && (pj_d20>=0) && (pj_d20<1080)) {
w->localPatchLookup[pi_d20][pj_d20]=local; // Store in a lookup table.
w->allPatchLookup[pi_d20][pj_d20]=i; // Store in a lookup table.
} else {
printf("Error - node %d, invalid x,y, %d,%d\n",w->mpi_rank,pi_d20,pj_d20);
fflush(stdout);
}
local++;
} else {
patch *p = new patch();
p->x=(unsigned short) x;
p->y=(unsigned short) y;
p->size=(unsigned short) size;
p->node=(unsigned short) node;
w->allPatchList[i]=p;
for (p_i=p->x; p_i<p->x+size; p_i+=20) {
for (p_j=p->y; p_j<p->y+size; p_j+=20) {
pi_d20=p_i/20;
pj_d20=p_j/20;
if ((pi_d20>=0) && (pi_d20<2160) && (pj_d20>=0) && (pj_d20<1080)) {
w->allPatchLookup[pi_d20][pj_d20]=i;
} else {
printf("Error - node %d, remote patch invalid x,y, %d,%d\n",w->mpi_rank,pi_d20,pj_d20);
fflush(stdout);
}
}
}
}
}
read(iniFile,4,(char*)&x,w); // This should be a -1
fclose(iniFile);
errline=11544;
}
void calculateQ(world* w) {
errline=11548;
int thread_no;
// This loop parallelises embarrassingly, since qk1,k' is independent from qk2,k'
#pragma omp parallel for private (thread_no) schedule(static,1)
for (thread_no=0; thread_no<w->thread_count; thread_no++) {
double cumulative, q_temp,Z_k;
patch *p_k;
localPatch *p_klocal;
patch* p_kprime;
unsigned int k,k_prime;
for (k=thread_no; k<w->noLocalPatches; k+=w->thread_count) {
p_klocal=w->localPatchList[k];
if (p_klocal->no_households>0) {
p_k = static_cast<patch*>(p_klocal);
// First calculate normalisation term = 1 / sum for all k', [ F(Dk,k') * Nk ]
Z_k=0;
q_temp=0;
for (k_prime=0; k_prime<w->totalPatches; k_prime++) {
p_kprime=w->allPatchList[k_prime];
q_temp=(unit::kernel_F(&w->a_units[p_klocal->households[0].unit],patch::distance(p_k,p_kprime))*w->patch_populations[k_prime]);
if (q_temp>0) {
Z_k+=q_temp;
p_klocal->no_qpatches++;
}
}
p_klocal->q_prob = new float[p_klocal->no_qpatches];
p_klocal->q_patch = new int[p_klocal->no_qpatches];
p_klocal->no_qpatches=0;
if (Z_k>0) {
Z_k=1.0/Z_k;
// Now generate cumulative distribution
cumulative=0;
for (k_prime=0; k_prime<w->totalPatches; k_prime++) {
p_kprime = w->allPatchList[k_prime];
q_temp = (unit::kernel_F(&w->a_units[p_klocal->households[0].unit],patch::distance(p_k,p_kprime))*w->patch_populations[k_prime]*Z_k);
if (q_temp>0) {
cumulative+=q_temp;
p_klocal->q_patch[p_klocal->no_qpatches]=k_prime;
p_klocal->q_prob[p_klocal->no_qpatches++]=(float)cumulative;
}
}
}
}
}
}
errline=11600;
}
void loadBinaryInitFile(world* w, string file) {
errline=11604;
w->read_buffer = new char[BUFFER_SIZE];
loadTravelMatrix(w);
FILE* f = fopen(&file[0],"rb");
// Load basic settings
int band_start;
fread(&w->P->no_place_types,4,1,f);
w->places = new lwv::vector<place*>*[w->no_countries];
w->no_places = new unsigned int*[w->no_countries];
for (int i=0; i<w->no_countries; i++) {
w->places[i] = new lwv::vector<place*>[w->P->no_place_types];
w->no_places[i] = new unsigned int[w->P->no_place_types];
}
int fixed_flag=0;
w->P->symptom_delay=0;
/*******************************************
/* READ LATENT PERIOD
/*******************************************/
fread(&fixed_flag,4,1,f); // 1 = fixed latent period, 0 = variable
w->P->latent_period_fixed=(fixed_flag==1);
if (w->P->latent_period_fixed) {
fread(&w->P->latent_period,8,1,f); // if fixed, just read one value
w->P->latent_period_cutoff=w->P->latent_period;
} else {
fread(&w->P->latent_period_icdf_res,4,1,f); // Else, read resolution of distrib (usually 21)
w->P->latent_period_icdf = new double[w->P->latent_period_icdf_res];
w->P->latent_period_icdf_res--;
fread(&w->P->latent_period_mean,8,1,f);
for (int i=0; i<=w->P->latent_period_icdf_res; i++) {
fread(&w->P->latent_period_icdf[i],8,1,f);
w->P->latent_period_icdf[i]=exp(-w->P->latent_period_icdf[i]);
}
fread(&w->P->latent_period_cutoff,8,1,f); // And cut off.
}
/*******************************************
/* READ INFECTIOUS-NESS OVER TIME
/*******************************************/
fread(&fixed_flag,4,1,f); // Fixed infectiousness = 1, 0 = variable
w->P->infectiousness_fixed=(fixed_flag==1);
if (w->P->infectiousness_fixed) {
fread(&w->P->infectiousness,8,1,f); // Again, read one value if fixed
} else {
fread(&w->P->infectiousness_profile_res,4,1,f); // Else resolution of distrib(usually 21)
w->P->infectiousness_profile=new double[w->P->infectiousness_profile_res];
for (int i=0; i<w->P->infectiousness_profile_res; i++) {
fread(&w->P->infectiousness_profile[i],8,1,f);
}
}
/*******************************************
/* READ INFECTIOUS PERIOD
/*******************************************/
fread(&fixed_flag,4,1,f);
w->P->infectious_period_fixed=(fixed_flag==1);
if (w->P->infectious_period_fixed) {
fread(&w->P->infectious_period,8,1,f);
w->P->infectious_period_cutoff=w->P->infectious_period;
} else {
fread(&w->P->infectious_period_mean,8,1,f);
fread(&w->P->infectious_period_icdf_res,4,1,f);
w->P->infectious_period_icdf=new double[w->P->infectious_period_icdf_res];
w->P->infectious_period_icdf_res--;
for (int i=0; i<=w->P->infectious_period_icdf_res; i++) {
fread(&w->P->infectious_period_icdf[i],8,1,f);
w->P->infectious_period_icdf[i]=exp(-w->P->infectious_period_icdf[i]);
}
fread(&w->P->infectious_period_cutoff,8,1,f);
}
w->P->timesteps_per_day=4;
w->P->timestep_hours=24.0/w->P->timesteps_per_day;
w->P->infectionWindow=(int) (2+w->P->latent_period_cutoff+w->P->infectious_period_cutoff)*w->P->timesteps_per_day;
// Load Interventions
fread(&w->no_interventions,4,1,f);
w->interventions = new intervention[w->no_interventions];
for (int i=0; i<w->no_interventions; i++) {
fread(&w->interventions[i].type,4,1,f);
fread(&w->interventions[i].trig_on_type,4,1,f);
if (w->interventions[i].trig_on_type==1) {
fread(&w->interventions[i].start_day,8,1,f);
} else if (w->interventions[i].trig_on_type==0) {
fread(&w->interventions[i].on_case_period,4,1,f);
fread(&w->interventions[i].on_case_op,4,1,f);
fread(&w->interventions[i].on_threshold,8,1,f);
fread(&w->interventions[i].on_thr_unit,4,1,f);
fread(&w->interventions[i].on_thr_delay,8,1,f);
} else printf("%d; ERROR - Trigger on type not recognised\n",w->mpi_rank);
fread(&w->interventions[i].trig_off_type,4,1,f);
if (w->interventions[i].trig_off_type==1) {
fread(&w->interventions[i].duration_days,8,1,f);
} else if (w->interventions[i].trig_off_type==0) {
fread(&w->interventions[i].off_case_period,4,1,f);
fread(&w->interventions[i].off_case_op,4,1,f);
fread(&w->interventions[i].off_threshold,8,1,f);
fread(&w->interventions[i].off_thr_unit,4,1,f);
fread(&w->interventions[i].off_thr_delay,8,1,f);
} else printf("%d: ERROR - Trigger off type not recognised\n",w->mpi_rank);
if (w->interventions[i].type==BORDER_CONTROL_ID) {
w->interventions[i].sub_type = new BorderControlInt();
fread(&((BorderControlInt*)w->interventions[i].sub_type)->p_deny_exit,8,1,f);
fread(&((BorderControlInt*)w->interventions[i].sub_type)->p_deny_entry,8,1,f);
} else if (w->interventions[i].type==TREATMENT_ID) {
w->interventions[i].sub_type = new TreatmentInt();
fread(&((TreatmentInt*)w->interventions[i].sub_type)->m_inf_of_clinical,8,1,f);
fread(&((TreatmentInt*)w->interventions[i].sub_type)->treat_delay,8,1,f);
fread(&((TreatmentInt*)w->interventions[i].sub_type)->treat_duration,8,1,f);
} else if (w->interventions[i].type==PROPHYLAXIS_ID) {
w->interventions[i].sub_type = new ProphylaxisInt();
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->m_susc_of_susceptible,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->m_inf_of_proph,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->m_clin_of_proph,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->proph_delay,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->proph_duration,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->proph_coverage,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->proph_household,8,1,f);
fread(&((ProphylaxisInt*)w->interventions[i].sub_type)->proph_social,8,1,f);
} else if (w->interventions[i].type==VACC_ID) {
w->interventions[i].sub_type = new VaccinationInt();
fread(&((VaccinationInt*)w->interventions[i].sub_type)->m_vacc_susc,8,1,f);
fread(&((VaccinationInt*)w->interventions[i].sub_type)->m_vacc_inf,8,1,f);
fread(&((VaccinationInt*)w->interventions[i].sub_type)->m_vacc_clin,8,1,f);
fread(&((VaccinationInt*)w->interventions[i].sub_type)->vacc_delay,8,1,f);
fread(&((VaccinationInt*)w->interventions[i].sub_type)->vacc_coverage,8,1,f);
} else if (w->interventions[i].type==QUARANTINE_ID) {
w->interventions[i].sub_type = new QuarantineInt();
fread(&((QuarantineInt*)w->interventions[i].sub_type)->m_s_wp_rate,8,1,f);
fread(&((QuarantineInt*)w->interventions[i].sub_type)->m_hh_rate,8,1,f);
fread(&((QuarantineInt*)w->interventions[i].sub_type)->q_period,8,1,f);
fread(&((QuarantineInt*)w->interventions[i].sub_type)->q_delay,8,1,f);
fread(&((QuarantineInt*)w->interventions[i].sub_type)->q_compliance,8,1,f);
fread(&((QuarantineInt*)w->interventions[i].sub_type)->q_community,8,1,f);
} else if (w->interventions[i].type==PLACE_CLOSE_ID) {
w->interventions[i].sub_type = new PlaceClosureInt();
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->threshold,8,1,f);
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->thr_unit,4,1,f);
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->delay,8,1,f);
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->period,8,1,f);
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->m_hh_rate,8,1,f);
fread(&((PlaceClosureInt*)w->interventions[i].sub_type)->m_comm_rate,8,1,f);
} else if (w->interventions[i].type==BLANKET_ID) {
w->interventions[i].sub_type = new BlanketTravelInt();
fread(&((BlanketTravelInt*)w->interventions[i].sub_type)->distance,8,1,f);
fread(&((BlanketTravelInt*)w->interventions[i].sub_type)->p_deny_travel,8,1,f);
} else if (w->interventions[i].type==AREA_QUARANTINE_ID) {
w->interventions[i].sub_type = new AreaQuarantineInt();
fread(&((AreaQuarantineInt*)w->interventions[i].sub_type)->ring_radius,8,1,f);
fread(&((AreaQuarantineInt*)w->interventions[i].sub_type)->p_deny_travel,8,1,f);
fread(&((AreaQuarantineInt*)w->interventions[i].sub_type)->period,8,1,f);
fread(&((AreaQuarantineInt*)w->interventions[i].sub_type)->delay,8,1,f);
} else printf("%d: ERROR - Unknown intervention type\n",w->mpi_rank);
}
fread(&w->no_units,4,1,f);
w->a_units = new unit[w->no_units];
for (int i=0; i<w->no_units; i++) {
w->a_units[i].log=false;
w->a_units[i].no_nodes=0;
w->a_units[i].contact_makers=new int[w->thread_count];
w->a_units[i].B_place = new double[w->P->no_place_types];
w->a_units[i].P_group = new double[w->P->no_place_types];
w->a_units[i].new_place_cases = new int[w->P->no_place_types];
w->a_units[i].new_place_infs = new int[w->P->no_place_types];
w->a_units[i].hist_place_cases = new int*[w->P->no_place_types];
w->a_units[i].place_10day_accumulator = new int[w->P->no_place_types];
for (unsigned int j=0; j<w->P->no_place_types; j++) {
w->a_units[i].new_place_cases[j]=0;
w->a_units[i].new_place_infs[j]=0;
w->a_units[i].hist_place_cases[j] = new int[10*w->P->timesteps_per_day];
for (int k=0; k<10*w->P->timesteps_per_day; k++) {
w->a_units[i].hist_place_cases[j][k]=0;
}
w->a_units[i].place_10day_accumulator[j]=0;
}
w->a_units[i].new_hh_cases=0;
w->a_units[i].new_comm_cases=0;
w->a_units[i].new_hh_infs=0;
w->a_units[i].new_comm_infs=0;
w->a_units[i].current_nonsymptomatic_inf=0;
w->a_units[i].current_symptomatic_inf=0;
w->a_units[i].hist_comm_cases=new int[10*w->P->timesteps_per_day];
w->a_units[i].hist_hh_cases=new int[10*w->P->timesteps_per_day];
for (int j=0; j<10*w->P->timesteps_per_day; j++) {
w->a_units[i].hist_comm_cases[j]=0;
w->a_units[i].hist_hh_cases[j]=0;
}
w->a_units[i].comm_10day_accumulator=0;
w->a_units[i].hh_10day_accumulator=0;
w->a_units[i].no_hosts=0;
w->a_units[i].p_symptomatic=0;
w->a_units[i].p_severe=0;
w->a_units[i].p_detect_sympt=0;
w->a_units[i].p_detect_severe=0;
w->a_units[i].abs_place_sympt=new double[w->P->no_place_types];
w->a_units[i].abs_place_sev=new double[w->P->no_place_types];
w->a_units[i].abs_place_sympt_cc_mul=new double[w->P->no_place_types];
w->a_units[i].abs_place_sev_cc_mul=new double[w->P->no_place_types];
w->a_units[i].mul_sympt_inf=0;
w->a_units[i].mul_severe_inf=0;
int level,grump_index;
fread(&level,4,1,f);
w->a_units[i].level=(unsigned char)level;
fread(&grump_index,4,1,f);
w->a_units[i].country=(unsigned char) grump_index;
if (level<=0) w->a_units[i].parent_id=level; // So parent of level -1 unit = -1 (no parent - this is the global unit)
// parent of level 0 = index 0 (this is country - parent is global)
else fread(&w->a_units[i].parent_id,4,1,f); // otherwise read index of parent
// Unit parameters
fread(&w->a_units[i].B_spat,8,1,f);
fread(&w->a_units[i].k_a,8,1,f);
fread(&w->a_units[i].k_b,8,1,f);
fread(&w->a_units[i].k_cut,8,1,f);
fread(&w->a_units[i].B_hh,8,1,f);
for (unsigned int j=0; j<w->P->no_place_types; j++) {
fread(&w->a_units[i].B_place[j],8,1,f);
fread(&w->a_units[i].P_group[j],8,1,f);
fread(&w->a_units[i].abs_place_sympt[j],8,1,f);
fread(&w->a_units[i].abs_place_sympt_cc_mul[j],8,1,f);
fread(&w->a_units[i].abs_place_sev[j],8,1,f);
fread(&w->a_units[i].abs_place_sev_cc_mul[j],8,1,f);
}
fread(&w->a_units[i].p_symptomatic,8,1,f);
fread(&w->a_units[i].p_detect_sympt,8,1,f);
fread(&w->a_units[i].mul_sympt_inf,8,1,f);
fread(&w->a_units[i].p_severe,8,1,f);
fread(&w->a_units[i].p_detect_severe,8,1,f);
fread(&w->a_units[i].mul_severe_inf,8,1,f);
fread(&w->a_units[i].seasonal_max,8,1,f);
fread(&w->a_units[i].seasonal_min,8,1,f);
fread(&w->a_units[i].seasonal_temporal_offset,8,1,f);
// Interventions selected for this unit
fread(&w->a_units[i].no_interventions,4,1,f);
w->a_units[i].interventions=new LiveIntervention[w->a_units[i].no_interventions];
for (int j=0; j<w->a_units[i].no_interventions; j++) {
fread(&w->a_units[i].interventions[j].int_no,4,1,f);
w->a_units[i].interventions[j].switch_time=-1;
w->a_units[i].interventions[j].unit=i;
w->a_units[i].interventions[j].active=false;
}
int log;
fread(&log,4,1,f);
w->a_units[i].log=(log==1);
}
errline=11893;
resetUnitStats(w);
// Seeding initialisation
fread(&w->P->seed1,4,1,f);
fread(&w->P->seed2,4,1,f);
initSeeds(w->P->seed1,w->P->seed2);
fread(&w->P->no_seeds,4,1,f);
w->P->seed_lat = new double[w->P->no_seeds];
w->P->seed_long = new double[w->P->no_seeds];
w->P->seed_no = new int[w->P->no_seeds];
w->P->seed_ts = new int[w->P->no_seeds];
w->P->next_seed = 0;
for (int i=0; i<w->P->no_seeds; i++) {
fread(&w->P->seed_long[i],8,1,f);
fread(&w->P->seed_lat[i],8,1,f);
double day;
fread(&day,8,1,f);
w->P->seed_ts[i]=(int) (day*(double)24.0);
fread(&w->P->seed_no[i],4,1,f);
}
// Params for Initialising population
fread(&w->no_age_bands,4,1,f);
w->max_age_band=new float[w->no_age_bands];
w->init_susceptibility = new double[w->no_age_bands];
for (int i=0; i<w->no_age_bands; i++) {
fread(&band_start,4,1,f);
fread(&w->max_age_band[i],4,1,f);
fread(&w->init_susceptibility[i],8,1,f);
}
// Output options
int dummy;
fread(&dummy,4,1,f);
if (dummy==1) {
w->log_db=true;
fread(&dummy,4,1,f);
w->db_server=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->db_server[i],1,1,f);
w->db_server[dummy]='\0';
fread(&dummy,4,1,f);
w->db_table=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->db_table[i],1,1,f);
w->db_table[dummy]='\0';
initDB(w);
} else w->log_db=false;
fread(&dummy,4,1,f);
if (dummy==1) {
w->log_flat=true;
fread(&dummy,4,1,f);
w->ff_path=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->ff_path[i],1,1,f);
w->ff_path[dummy]='\0';
fread(&dummy,4,1,f);
w->ff_file=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->ff_file[i],1,1,f);
w->ff_file[dummy]='\0';
char* ff_file = new char[(strlen(w->ff_path)+strlen(w->ff_file))+10];
strcpy(ff_file,w->ff_path);
strcat(ff_file,"/");
strcat(ff_file,w->ff_file);
strcat(ff_file,".txt");
if (w->mpi_rank==0) w->ff=fopen(&ff_file[0],"w");
} else w->log_flat=false;
fread(&dummy,4,1,f);
if (dummy==1) {
w->log_movie=true;
fread(&dummy,4,1,f);
w->mv_path=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->mv_path[i],1,1,f);
w->mv_path[dummy]='\0';
fread(&dummy,4,1,f);
w->mv_file=new char[dummy+1];
for (int i=0; i<dummy; i++) fread(&w->mv_file[i],1,1,f);
w->mv_file[dummy]='\0';
} else w->log_movie=false;
printf("%d: Loading patches\n",w->mpi_rank);
fflush(stdout);
loadPatches(w);
errline=11985;
int noCountryFiles;
fread(&noCountryFiles,4,1,f);
char* ov_file;
char* hh_file;
char** place_files;
fread(&dummy,4,1,f);
ov_file = new char[dummy+1];
for (int j=0; j<dummy; j++) fread(&ov_file[j],1,1,f);
ov_file[dummy]='\0';
printf("%d: Loading %s\n",w->mpi_rank,ov_file);
fflush(stdout);
loadOverlay(w,ov_file);
for (int i=0; i<noCountryFiles; i++) {
errline=111005;
int grump;
fread(&grump,4,1,f);
int code;
fread(&code,4,1,f);
int no_nodes,node;
fread(&no_nodes,4,1,f);
bool needed=false;
for (char j=0; j<no_nodes; j++) {
fread(&node,4,1,f);
if (node==w->mpi_rank) needed=true;
}
fread(&dummy,4,1,f);
hh_file= new char[dummy+1];
for (int j=0; j<dummy; j++) fread(&hh_file[j],1,1,f);
hh_file[dummy]='\0';
place_files = new char*[w->P->no_place_types];
for (unsigned int k=0; k<w->P->no_place_types; k++) {
fread(&dummy,4,1,f);
place_files[k] = new char[dummy+1];
for (int j=0; j<dummy; j++) fread(&place_files[k][j],1,1,f);
place_files[k][dummy]='\0';
}
if (needed) {
printf("%d: Loading %s\n",w->mpi_rank,hh_file);
fflush(stdout);
clearBuffer(w);
for (unsigned char p=0; p<w->P->no_place_types; p++) {
clearBuffer(w);
loadPlaces(w,place_files[p],code,p);
}
// This structure is so that when reading the households, we count
// who attends which place_type/place no./group and which node they live on.
// This is then used for linking up people to places in static arrays
// rather than vectors.
int**** tpgn; // type, place, group, node
tpgn = new int***[w->P->no_place_types];
for (unsigned int _i=0; _i<w->P->no_place_types; _i++) {
tpgn[_i]= new int**[w->no_places[code][_i]];
for (unsigned int _j=0; _j<w->no_places[code][_i]; _j++) {
place* p = w->places[code][_i].at(_j);
tpgn[_i][_j] = new int*[p->no_groups];
for (unsigned int _k=0; _k<p->no_groups; _k++) { // Extra group at the end for "-1" = no group
tpgn[_i][_j][_k]=new int[w->mpi_size];
for (int _m=0; _m<w->mpi_size; _m++) {
tpgn[_i][_j][_k][_m]=0;
}
}
}
}
errline=111065;
loadHouseholdFile(w,hh_file,(unsigned char) code,tpgn);
errline=111072;
linkPeopleToEstablishments(w,(unsigned char) code,tpgn);
for (unsigned int _i=0; _i<w->P->no_place_types; _i++) {
for (unsigned int _j=0; _j<w->no_places[code][_i]; _j++) {
place* p = w->places[code][_i].at(_j);
for (unsigned int _k=0; _k<p->no_groups; _k++) delete[] tpgn[_i][_j][_k];
delete[] tpgn[_i][_j];
}
delete[] tpgn[_i];
}
delete[] tpgn;
}
}
errline=111089;
fclose(f);
printf("%d: Calculating q matrix\n",w->mpi_rank);
fflush(stdout);
calculateQ(w);
delete w->read_buffer;
syncAdminUnitUse(w); // Agree on which admin units are relevant to multiple nodes.
syncPPCPN(w); // Agree on how many people per country on each node.
errline=111001;
}
| 37.70899 | 217 | 0.605019 | [
"vector"
] |
a56f85b0210d9b4f35cb90e6447e07936973fb32 | 6,080 | cpp | C++ | released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/flyem/zintcuboidarray.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | 1 | 2021-12-27T19:14:03.000Z | 2021-12-27T19:14:03.000Z | released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/flyem/zintcuboidarray.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | 1 | 2016-12-03T05:33:13.000Z | 2016-12-03T05:33:13.000Z | released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/flyem/zintcuboidarray.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | null | null | null | #include "zintcuboidarray.h"
#include <iostream>
#include <math.h>
#include <algorithm>
#include "zstring.h"
#include "zcuboid.h"
#include "zswctree.h"
#include "swctreenode.h"
using namespace std;
FlyEm::ZIntCuboidArray::ZIntCuboidArray()
{
}
void FlyEm::ZIntCuboidArray::append(
int x, int y, int z, int width, int height, int depth)
{
Cuboid_I cuboid;
Cuboid_I_Set_S(&cuboid, x, y, z, width, height, depth);
push_back(cuboid);
#ifdef _DEBUG_2
std::cout << depth << std::endl;
Print_Cuboid_I(&cuboid);
#endif
}
int FlyEm::ZIntCuboidArray::hitTest(double x, double y, double z)
{
int ix = floor(x);
int iy = floor(y);
int iz = floor(z);
for (size_t i = 0; i < size(); ++i) {
if (Cuboid_I_Hit(&((*this)[i]), ix, iy, iz)) {
#ifdef _DEBUG_2
std::cout << ix << ' ' << iy << ' ' << iz << std::endl;
Print_Cuboid_I(&((*this)[i]));
#endif
return i;
}
}
return -1;
}
int FlyEm::ZIntCuboidArray::hitInternalTest(double x, double y, double z)
{
int ix = floor(x);
int iy = floor(y);
int iz = floor(z);
for (size_t i = 0; i < size(); ++i) {
if (Cuboid_I_Hit_Internal(&((*this)[i]), ix, iy, iz)) {
#ifdef _DEBUG_2
std::cout << ix << ' ' << iy << ' ' << iz << std::endl;
Print_Cuboid_I(&((*this)[i]));
#endif
return i;
}
}
return -1;
}
void FlyEm::ZIntCuboidArray::loadSubstackList(const std::string filePath)
{
clear();
ZString str;
FILE *fp = fopen(filePath.c_str(), "r");
if (fp != NULL) {
while (str.readLine(fp)) {
std::vector<int> valueArray = str.toIntegerArray();
if (valueArray.size() == 7) {
append(valueArray[1], valueArray[3], valueArray[5],
abs(valueArray[2]) - valueArray[1] + 1,
abs(valueArray[4]) - valueArray[3] + 1,
abs(valueArray[6]) - valueArray[5] + 1);
}
}
} else {
cerr << "Cannot open " << filePath << endl;
}
}
void FlyEm::ZIntCuboidArray::translate(int x, int y, int z)
{
for (ZIntCuboidArray::iterator iter = begin(); iter != end(); ++iter) {
iter->cb[0] += x;
iter->ce[0] += x;
iter->cb[1] += y;
iter->ce[1] += y;
iter->cb[2] += z;
iter->ce[2] += z;
}
}
void FlyEm::ZIntCuboidArray::rescale(double factor)
{
for (ZIntCuboidArray::iterator iter = begin(); iter != end(); ++iter) {
iter->cb[0] *= factor;
iter->ce[0] *= factor;
iter->cb[1] *= factor;
iter->ce[1] *= factor;
iter->cb[2] *= factor;
iter->ce[2] *= factor;
}
}
void FlyEm::ZIntCuboidArray::exportSwc(const string &filePath) const
{
if (!empty()) {
ZSwcTree *tree = new ZSwcTree;
int index = 0;
for (ZIntCuboidArray::const_iterator iter = begin(); iter != end();
++iter, ++index) {
ZCuboid cuboid;
cuboid.set(iter->cb[0], iter->cb[1], iter->cb[2], iter->ce[0], iter->ce[1],
iter->ce[2]);
ZSwcTree *subtree = ZSwcTree::createCuboidSwc(cuboid);
subtree->setType(index);
tree->merge(subtree, true);
}
tree->resortId();
tree->save(filePath);
delete tree;
}
}
bool FlyEm::ZIntCuboidArray::isInvalid(const Cuboid_I &cuboid)
{
return !Cuboid_I_Is_Valid(&cuboid);
}
void FlyEm::ZIntCuboidArray::removeInvalidCuboid()
{
iterator newEnd = std::remove_if(begin(), end(), isInvalid);
if (newEnd != end()) {
resize(newEnd - begin());
}
}
void FlyEm::ZIntCuboidArray::intersect(const Cuboid_I &cuboid)
{
for (ZIntCuboidArray::iterator iter = begin(); iter != end(); ++iter) {
Cuboid_I_Intersect(&(*iter), &cuboid, &(*iter));
}
removeInvalidCuboid();
}
Cuboid_I FlyEm::ZIntCuboidArray::getBoundBox() const
{
Cuboid_I box;
Cuboid_I_Set_S(&box, 0, 0, 0, 0, 0, 0);
#ifdef _DEBUG_2
Print_Cuboid_I(&box);
#endif
if (!empty()) {
ZIntCuboidArray::const_iterator iter = begin();
box = *iter;
for (++iter; iter != end(); ++iter) {
Cuboid_I_Union(&(*iter), &box, &box);
#ifdef _DEBUG_2
Print_Cuboid_I(&box);
#endif
}
}
return box;
}
FlyEm::ZIntCuboidArray FlyEm::ZIntCuboidArray::getFace() const
{
FlyEm::ZIntCuboidArray face;
for (ZIntCuboidArray::const_iterator iter = begin(); iter != end(); ++iter) {
if (Cuboid_I_Is_Valid(&(*iter))) {
for (int i = 0; i < 3; ++i) {
Cuboid_I tmpFace = *iter;
tmpFace.ce[i] = tmpFace.cb[i];
face.push_back(tmpFace);
tmpFace = *iter;
tmpFace.cb[i] = tmpFace.ce[i];
face.push_back(tmpFace);
}
}
}
return face;
}
FlyEm::ZIntCuboidArray FlyEm::ZIntCuboidArray::getInnerFace() const
{
FlyEm::ZIntCuboidArray face;
int index1 = 0;
for (ZIntCuboidArray::const_iterator iter = begin(); iter != end();
++iter, ++index1) {
Cuboid_I box1 = *iter;
Cuboid_I_Expand_X(&box1, 1);
Cuboid_I_Expand_Y(&box1, 1);
Cuboid_I_Expand_Z(&box1, 1);
int index2 = 0;
for (ZIntCuboidArray::const_iterator iter2 = begin(); iter2 != end();
++iter2, ++index2) {
if (index1 != index2) {
Cuboid_I box2 = *iter2;
#ifdef _DEBUG_2
std::cout << "Intersecting " << std::endl;
Print_Cuboid_I(&box1);
Print_Cuboid_I(&box2);
#endif
Cuboid_I_Intersect(&box1, &box2, &box2);
int width, height, depth;
Cuboid_I_Size(&box2, &width, &height, &depth);
if (width > 0 && height > 0 && depth > 0 &&
(width > 1) + (height > 1) + (depth > 1) > 1) {
face.push_back(box2);
#ifdef _DEBUG_2
Print_Cuboid_I(&box2);
#endif
}
}
}
}
return face;
}
void FlyEm::ZIntCuboidArray::print() const
{
for (ZIntCuboidArray::const_iterator iter = begin(); iter != end();
++iter) {
cout << "(" << iter->cb[0] << ", " << iter->cb[1] << ", " << iter->cb[2]
<< ") -> (" << iter->ce[0] << ", " << iter->ce[1] << ", "
<< iter->ce[2] << ")" << endl;
}
}
size_t FlyEm::ZIntCuboidArray::getVolume() const
{
size_t volume = 0;
for (ZIntCuboidArray::const_iterator iter = begin(); iter != end();
++iter) {
volume += Cuboid_I_Volume(&(*iter));
}
return volume;
}
| 23.117871 | 81 | 0.578125 | [
"vector"
] |
a5760ff15981b6b72cb1dc0d4c68556b5c06675b | 10,374 | cpp | C++ | src/gamssymbol.cpp | GAMS-dev/gams-cpp | 0e86b3a659865edd980ed37fada1453da1552786 | [
"MIT"
] | 3 | 2017-10-19T10:54:51.000Z | 2020-07-02T09:32:34.000Z | src/gamssymbol.cpp | GAMS-dev/gams-cpp | 0e86b3a659865edd980ed37fada1453da1552786 | [
"MIT"
] | 4 | 2017-07-24T08:51:10.000Z | 2020-07-08T15:02:39.000Z | src/gamssymbol.cpp | GAMS-dev/gams-cpp | 0e86b3a659865edd980ed37fada1453da1552786 | [
"MIT"
] | 1 | 2021-07-09T16:06:04.000Z | 2021-07-09T16:06:04.000Z | /*
* GAMS - General Algebraic Modeling System C++ API
*
* Copyright (c) 2017-2021 GAMS Software GmbH <support@gams.com>
* Copyright (c) 2017-2021 GAMS Development Corp. <support@gams.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "gamslog.h"
#include "gamssymbolimpl.h"
#include "gamsexception.h"
#include "gamsdatabase.h"
#include "gamssymbolrecord.h"
#include "gamssetrecord.h"
#include "gamsdomain.h"
#include <iostream>
#include "gmdcc.h"
#include <sstream>
using namespace std;
namespace gams{
class GAMSVariableRecord;
GAMSSymbol::GAMSSymbol()
{ }
GAMSSymbol::GAMSSymbol(const GAMSSymbol &symbol)
: mImpl(symbol.mImpl)
{ }
GAMSSymbol::GAMSSymbol(GAMSDatabase &database, void* symPtr, int dim, string name, string text, GAMSEnum::SymbolType symType
, gams::GAMSEnum::VarType varType, gams::GAMSEnum::EquType equType)
: mImpl(make_shared<GAMSSymbolImpl>(database, symPtr, dim, name, text, symType, varType, equType))
{ }
GAMSSymbol::GAMSSymbol(const gams::GAMSDatabase& database, void* symPtr)
: mImpl(make_shared<GAMSSymbolImpl>(database, symPtr))
{ }
GAMSSymbol::GAMSSymbol(GAMSDatabase& database, string name, string text, GAMSEnum::SymbolType symType, GAMSEnum::VarType varType
, GAMSEnum::EquType equType, const std::vector<GAMSDomain>& domains)
: mImpl(make_shared<GAMSSymbolImpl>(database, name, text, symType, varType, equType, domains))
{ }
GAMSSymbol::GAMSSymbol(gams::GAMSDatabase& database, int dim, string name, string text, GAMSEnum::SymbolType symType
, GAMSEnum::VarType varType, GAMSEnum::EquType equType)
: mImpl(make_shared<GAMSSymbolImpl>(database, dim, name, text, symType, varType, equType))
{ }
GAMSSymbol::~GAMSSymbol()
{ }
GAMSSymbol GAMSSymbol::operator=(const GAMSSymbol& other)
{
mImpl = other.mImpl;
return *this;
}
bool GAMSSymbol::operator!=(const GAMSSymbol& other) const
{
return !operator==(other);
}
bool GAMSSymbol::operator==(const GAMSSymbol& other) const
{
return mImpl == other.mImpl || (mImpl && other.mImpl && *mImpl.get() == *other.mImpl.get());
}
bool GAMSSymbol::isValid() const
{
return bool(mImpl);
}
GAMSSymbolIter<GAMSSymbol> GAMSSymbol::begin()
{
return GAMSSymbolIter<GAMSSymbol>(*this, 0);
}
GAMSSymbolIter<GAMSSymbol> GAMSSymbol::end()
{
return GAMSSymbolIter<GAMSSymbol>(*this, numberRecords());
}
gams::GAMSDatabase& GAMSSymbol::database() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mDatabase;
}
GAMSSymbolRecord GAMSSymbol::addRecord(const vector<string>& keys)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->addRecord(*this, keys);
}
GAMSSymbolRecord GAMSSymbol::addRecord()
{
vector<string> keys;
return addRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::addRecord(const std::string& key1)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->addRecord(*this, key1);
}
GAMSSymbolRecord GAMSSymbol::addRecord(const std::string& key1, const std::string& key2)
{
vector<string> keys = { key1, key2 };
return addRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::addRecord(const std::string& key1, const std::string& key2, const std::string& key3)
{
vector<string> keys = { key1, key2, key3 };
return addRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::firstRecord()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->firstRecord(*this);
}
GAMSSymbolRecord GAMSSymbol::firstRecord(const vector<string>& slice)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->firstRecord(*this, slice);
}
GAMSSymbolRecord GAMSSymbol::firstRecord(const std::string& key1)
{
vector<string> keys = { key1 };
return firstRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::firstRecord(const std::string& key1, const std::string& key2)
{
vector<string> keys = { key1, key2 };
return firstRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::firstRecord(const std::string& key1, const std::string& key2, const std::string& key3)
{
vector<string> keys = { key1, key2, key3 };
return firstRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::lastRecord()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->lastRecord(*this);
}
GAMSSymbolRecord GAMSSymbol::lastRecord(const vector<string>& slice)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->lastRecord(*this, slice);
}
GAMSSymbolRecord GAMSSymbol::lastRecord(const std::string& key1)
{
vector<string> keys = { key1 };
return lastRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::lastRecord(const std::string& key1, const std::string& key2)
{
vector<string> keys = { key1, key2 };
return lastRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::lastRecord(const std::string& key1, const std::string& key2, const std::string& key3)
{
vector<string> keys = { key1, key2, key3 };
return lastRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::findRecord(const std::vector<std::string>& keys)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->findRecord(*this, keys);
}
GAMSSymbolRecord GAMSSymbol::findRecord()
{
vector<string> keys;
return findRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::findRecord(const std::string& key1)
{
vector<string> keys = { key1 };
return findRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::findRecord(const std::string& key1, const std::string& key2)
{
vector<string> keys = { key1, key2 };
return findRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::findRecord(const std::string& key1, const std::string& key2, const std::string& key3)
{
vector<string> keys = { key1, key2, key3 };
return findRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::mergeRecord(const std::vector<std::string>& keys)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mergeRecord(*this, keys);
}
GAMSSymbolRecord GAMSSymbol::mergeRecord()
{
vector<string> keys;
return mergeRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::mergeRecord(const std::string& key1)
{
vector<string> keys = { key1 };
return mergeRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::mergeRecord(const std::string& key1, const std::string& key2)
{
vector<string> keys = { key1, key2 };
return mergeRecord(keys);
}
GAMSSymbolRecord GAMSSymbol::mergeRecord(const std::string& key1, const std::string& key2, const std::string& key3)
{
vector<string> keys = { key1, key2, key3 };
return mergeRecord(keys);
}
void GAMSSymbol::deleteRecord(const vector<string>& keys)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
mImpl->deleteRecord(keys);
}
void GAMSSymbol::copySymbol(const GAMSSymbol& target)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
if (!target.mImpl) throw GAMSException("GAMSSymbol: The target symbol has not been initialized.");
mImpl->copySymbol(*target.mImpl.get());
}
void *GAMSSymbol::symPtr() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->symPtr();
}
bool GAMSSymbol::clear()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return (1 == gmdClearSymbol(mImpl->gmd(), mImpl->symPtr()));
}
std::vector<GAMSDomain> GAMSSymbol::domains()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->domains();
}
string& GAMSSymbol::name() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mName;
}
int GAMSSymbol::dim() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mDim;
}
string GAMSSymbol::text() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mExplanatoryText;
}
bool GAMSSymbol::checkDomains()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->checkDomains();
}
vector<GAMSSymbolDomainViolation> GAMSSymbol::getSymbolDVs(int maxViol)
{
return getSymbolDVs(false, maxViol);
}
int GAMSSymbol::numberRecords() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->numberRecords();
}
gams::LogId GAMSSymbol::logID()
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->logID();
}
GAMSEnum::SymbolType GAMSSymbol::type() const
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->mSymType;
}
std::vector<GAMSSymbolDomainViolation> GAMSSymbol::getSymbolDVs(bool skipCleanup, int maxViol)
{
if (!mImpl) throw GAMSException("GAMSSymbol: The symbol has not been initialized.");
return mImpl->getSymbolDVs(*this, skipCleanup, maxViol);
}
} // namespace gams
| 28.977654 | 128 | 0.719105 | [
"vector"
] |
a57769f341e8d7175b62fb41cd062aee55b700f2 | 4,817 | cc | C++ | src/ApiWrapper.cc | WishCore/wish-api-node | ef94177eed9a8f8599cf210edf52b921347f83fd | [
"Apache-2.0"
] | null | null | null | src/ApiWrapper.cc | WishCore/wish-api-node | ef94177eed9a8f8599cf210edf52b921347f83fd | [
"Apache-2.0"
] | 1 | 2019-05-17T12:46:04.000Z | 2019-05-17T12:46:04.000Z | src/ApiWrapper.cc | WishCore/wish-api-node | ef94177eed9a8f8599cf210edf52b921347f83fd | [
"Apache-2.0"
] | 2 | 2018-08-07T16:01:43.000Z | 2019-05-17T09:58:07.000Z | #include "ApiWrapper.h"
#include "WishGlue.h"
#include <iostream>
using namespace std;
using Nan::Get;
using Nan::Callback;
using Nan::MaybeLocal;
using Nan::Utf8String;
using v8::Local;
using v8::Value;
using v8::Object;
using v8::String;
using v8::Context;
using v8::Isolate;
using v8::Function;
using v8::FunctionTemplate;
Nan::Persistent<v8::Function> ApiWrapper::constructor;
ApiWrapper::ApiWrapper(AddonWorker* worker) {
this->worker = worker;
worker->setWrapper(this);
}
ApiWrapper::~ApiWrapper() {
cout << "Destroying ApiWrapper" << "\n";
}
void
ApiWrapper::addonDeleted() {
//cout << "ApiWrapper lost the actual instance (Deleted by Nan).\n";
worker = NULL;
}
void
ApiWrapper::New(const Nan::FunctionCallbackInfo<Value>& info) {
Local<Context> context = info.GetIsolate()->GetCurrentContext();
Isolate* isolate = info.GetIsolate();
//info.GetReturnValue().Set(Nan::New("world").ToLocalChecked());
if (info.IsConstructCall()) {
Callback *data_callback = new Callback(info[0].As<Function>());
Local<Object> options = info[1]->ToObject(context).ToLocalChecked();
AddonWorker* worker = new AddonWorker(data_callback);
if (options->IsObject()) {
Local<Value> _nodeName = options->Get(Nan::New("name").ToLocalChecked());
Local<Value> _protocol = options->Get(Nan::New("protocols").ToLocalChecked());
Local<Value> _coreIp = options->Get(Nan::New("coreIp").ToLocalChecked());
Local<Value> _corePort = options->Get(Nan::New("corePort").ToLocalChecked());
Local<Value> _apiType = options->Get(Nan::New("type").ToLocalChecked());
if (_nodeName->IsString()) {
Utf8String name(Nan::To<String>(_nodeName.As<String>()).ToLocalChecked());
worker->name = *name;
// worker->name = *Utf8String(_nodeName->ToString(context).ToLocalChecked());
}
if (_protocol->IsString()) {
worker->protocol = *Utf8String(_protocol->ToString(context).ToLocalChecked());
}
if (_coreIp->IsString()) {
worker->coreIp = *Utf8String(_coreIp->ToString(context).ToLocalChecked());
//cout << "4. a) ApiWrapper constructor: opts: " << coreIp << "\n";
} else {
//cout << "4. b) ApiWrapper constructor: opts.core not string\n";
}
if (_corePort->IsNumber()) {
worker->corePort = _corePort->Int32Value(context).FromJust();
}
if (_apiType->IsNumber()) {
worker->apiType = (int) _apiType->Int32Value(context).FromJust();
}
}
// Start the C library
addon_start(worker);
ApiWrapper *apiWrapper = new ApiWrapper(worker);
apiWrapper->Wrap(info.This());
info.GetReturnValue().Set(info.This());
// start the worker
AsyncQueueWorker(apiWrapper->worker);
//data_callback->Call(0, 0);
}
}
void
ApiWrapper::request(const Nan::FunctionCallbackInfo<v8::Value>& info) {
Local<Context> context = Nan::GetCurrentContext();
if (info.Length() != 2) {
Nan::ThrowTypeError("Wrong number of arguments");
return;
}
if (!info[0]->IsString()) {
Nan::ThrowTypeError("Wrong arguments");
return;
}
if (!info[1]->ToObject(info.GetIsolate())->IsUint8Array()) {
Nan::ThrowTypeError("Argument 2 is not a Buffer");
return;
}
Utf8String name(Nan::To<String>(info[0]).ToLocalChecked());
uint8_t* buf = (uint8_t*) node::Buffer::Data(Nan::To<Object>(info[1]).ToLocalChecked());
int buf_len = node::Buffer::Length(Nan::To<Object>(info[1]).ToLocalChecked());
ApiWrapper* obj = Nan::ObjectWrap::Unwrap<ApiWrapper>(info.Holder());
if ( obj->worker == NULL ) {
//printf("Someone is trying to make requests while the whole thing is already shut down. Ditched. ApiWrapper %p\n", obj);
return;
}
obj->worker->fromNode.write(Message(*name, buf, buf_len));
}
void
ApiWrapper::Init(Local<v8::Object> exports) {
Local<v8::Context> context = exports->CreationContext();
// Local context = Nan::GetCurrentContext();
Nan::HandleScope scope;
addon_init();
Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(ApiWrapper::New);
tpl->SetClassName(Nan::New("WishApi").ToLocalChecked());
tpl->InstanceTemplate()->SetInternalFieldCount(2);
SetPrototypeMethod(tpl, "request", request);
constructor.Reset(tpl->GetFunction(context).ToLocalChecked());
exports->Set(Nan::New("WishApi").ToLocalChecked(), tpl->GetFunction(context).ToLocalChecked());
}
NODE_MODULE(WishApi, ApiWrapper::Init)
| 32.328859 | 129 | 0.617812 | [
"object"
] |
a57f085e0b616799df6d302211f6f79f12d7f131 | 2,282 | cpp | C++ | codeforces/1202e.cpp | sogapalag/problems | 0ea7d65448e1177f8b3f81124a82d187980d659c | [
"MIT"
] | 1 | 2020-04-04T14:56:12.000Z | 2020-04-04T14:56:12.000Z | codeforces/1202e.cpp | sogapalag/problems | 0ea7d65448e1177f8b3f81124a82d187980d659c | [
"MIT"
] | null | null | null | codeforces/1202e.cpp | sogapalag/problems | 0ea7d65448e1177f8b3f81124a82d187980d659c | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
struct AhoCorasick {
static const int N = 26;
static const char A = 'a';
struct Node {
int ch[N];
int fail, cnt;
Node() {
fill(ch, ch+N, 0);
fail = 0;
cnt = 0;
}
};
vector<Node> t; //trie
AhoCorasick() {
t.reserve(200'005);
t.emplace_back();
}
void add(const string& p) {
int x = 0;
for (char c: p) {
int k = c-A;
if (!t[x].ch[k]) {
t[x].ch[k] = t.size();
t.emplace_back();
}
x = t[x].ch[k];
}
t[x].cnt++;
}
void build() {
queue<int> q;
for (int i = 0; i < N; i++) {
if (t[0].ch[i])
q.push(t[0].ch[i]);
}
while (!q.empty()) {
int u = q.front(); q.pop();
for (int i = 0; i < N; i++) {
int v = t[u].ch[i];
if (!v) continue;
q.push(v);
int f = t[u].fail;
while (f && !t[f].ch[i]) {
f = t[f].fail;
}
f = t[v].fail = t[f].ch[i];
t[v].cnt += t[f].cnt;
}
}
}
vector<int> query(const string& s) {
int n = s.size();
vector<int> res(n);
int x = 0;
for (int i = 0; i < n; i++) {
int k = s[i] - A;
while (x && !t[x].ch[k]) {
x = t[x].fail;
}
x = t[x].ch[k];
res[i] = t[x].cnt;
}
return res;
}
};
void solve() {
AhoCorasick pre, suf;
string T; cin >> T;
int n; cin >> n;
for (int _ = 0; _ < n; _++) {
string s; cin >> s;
pre.add(s);
reverse(s.begin(), s.end());
suf.add(s);
}
pre.build(); suf.build();
auto f = pre.query(T);
reverse(T.begin(), T.end());
auto g = suf.query(T);
reverse(g.begin(), g.end());
long long res = 0;
for (int i = 0; i < (int)T.size()-1; i++) {
res += (long long) f[i] * g[i+1];
}
cout << res;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
cout << endl;
}
| 22.594059 | 47 | 0.361525 | [
"vector"
] |
a58a5ec7dd514ca2cecd10a52518900bccfae761 | 7,756 | hpp | C++ | include/UnityEngine/Audio/AudioMixer.hpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | include/UnityEngine/Audio/AudioMixer.hpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | include/UnityEngine/Audio/AudioMixer.hpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.Object
#include "UnityEngine/Object.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
#include "beatsaber-hook/shared/utils/typedefs-array.hpp"
#include "beatsaber-hook/shared/utils/typedefs-string.hpp"
// Completed includes
// Begin forward declares
// Forward declaring namespace: UnityEngine::Audio
namespace UnityEngine::Audio {
// Forward declaring type: AudioMixerSnapshot
class AudioMixerSnapshot;
}
// Completed forward declares
// Type namespace: UnityEngine.Audio
namespace UnityEngine::Audio {
// Forward declaring type: AudioMixer
class AudioMixer;
}
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::UnityEngine::Audio::AudioMixer);
DEFINE_IL2CPP_ARG_TYPE(::UnityEngine::Audio::AudioMixer*, "UnityEngine.Audio", "AudioMixer");
// Type namespace: UnityEngine.Audio
namespace UnityEngine::Audio {
// Size: 0x18
#pragma pack(push, 1)
// Autogenerated type: UnityEngine.Audio.AudioMixer
// [TokenAttribute] Offset: FFFFFFFF
// [NativeHeaderAttribute] Offset: 5ABAE0
// [ExcludeFromObjectFactoryAttribute] Offset: FFFFFFFF
// [NativeHeaderAttribute] Offset: 5ABAE0
// [ExcludeFromPresetAttribute] Offset: FFFFFFFF
class AudioMixer : public ::UnityEngine::Object {
public:
// System.Void TransitionToSnapshot(UnityEngine.Audio.AudioMixerSnapshot snapshot, System.Single timeToReach)
// Offset: 0x12D5CD0
void TransitionToSnapshot(::UnityEngine::Audio::AudioMixerSnapshot* snapshot, float timeToReach);
// private System.Void TransitionToSnapshotInternal(UnityEngine.Audio.AudioMixerSnapshot snapshot, System.Single timeToReach)
// Offset: 0x12D5FEC
void TransitionToSnapshotInternal(::UnityEngine::Audio::AudioMixerSnapshot* snapshot, float timeToReach);
// public System.Void TransitionToSnapshots(UnityEngine.Audio.AudioMixerSnapshot[] snapshots, System.Single[] weights, System.Single timeToReach)
// Offset: 0x12D604C
void TransitionToSnapshots(::ArrayW<::UnityEngine::Audio::AudioMixerSnapshot*> snapshots, ::ArrayW<float> weights, float timeToReach);
// public System.Boolean SetFloat(System.String name, System.Single value)
// Offset: 0x12D60B4
bool SetFloat(::StringW name, float value);
// public System.Boolean GetFloat(System.String name, out System.Single value)
// Offset: 0x12D6114
bool GetFloat(::StringW name, ByRef<float> value);
// System.Void .ctor()
// Offset: 0x12D5C6C
// Implemented from: UnityEngine.Object
// Base method: System.Void Object::.ctor()
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static AudioMixer* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::UnityEngine::Audio::AudioMixer::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<AudioMixer*, creationType>()));
}
}; // UnityEngine.Audio.AudioMixer
#pragma pack(pop)
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::TransitionToSnapshot
// Il2CppName: TransitionToSnapshot
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (UnityEngine::Audio::AudioMixer::*)(::UnityEngine::Audio::AudioMixerSnapshot*, float)>(&UnityEngine::Audio::AudioMixer::TransitionToSnapshot)> {
static const MethodInfo* get() {
static auto* snapshot = &::il2cpp_utils::GetClassFromName("UnityEngine.Audio", "AudioMixerSnapshot")->byval_arg;
static auto* timeToReach = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(UnityEngine::Audio::AudioMixer*), "TransitionToSnapshot", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{snapshot, timeToReach});
}
};
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::TransitionToSnapshotInternal
// Il2CppName: TransitionToSnapshotInternal
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (UnityEngine::Audio::AudioMixer::*)(::UnityEngine::Audio::AudioMixerSnapshot*, float)>(&UnityEngine::Audio::AudioMixer::TransitionToSnapshotInternal)> {
static const MethodInfo* get() {
static auto* snapshot = &::il2cpp_utils::GetClassFromName("UnityEngine.Audio", "AudioMixerSnapshot")->byval_arg;
static auto* timeToReach = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(UnityEngine::Audio::AudioMixer*), "TransitionToSnapshotInternal", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{snapshot, timeToReach});
}
};
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::TransitionToSnapshots
// Il2CppName: TransitionToSnapshots
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (UnityEngine::Audio::AudioMixer::*)(::ArrayW<::UnityEngine::Audio::AudioMixerSnapshot*>, ::ArrayW<float>, float)>(&UnityEngine::Audio::AudioMixer::TransitionToSnapshots)> {
static const MethodInfo* get() {
static auto* snapshots = &il2cpp_functions::array_class_get(::il2cpp_utils::GetClassFromName("UnityEngine.Audio", "AudioMixerSnapshot"), 1)->byval_arg;
static auto* weights = &il2cpp_functions::array_class_get(::il2cpp_utils::GetClassFromName("System", "Single"), 1)->byval_arg;
static auto* timeToReach = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(UnityEngine::Audio::AudioMixer*), "TransitionToSnapshots", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{snapshots, weights, timeToReach});
}
};
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::SetFloat
// Il2CppName: SetFloat
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<bool (UnityEngine::Audio::AudioMixer::*)(::StringW, float)>(&UnityEngine::Audio::AudioMixer::SetFloat)> {
static const MethodInfo* get() {
static auto* name = &::il2cpp_utils::GetClassFromName("System", "String")->byval_arg;
static auto* value = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(UnityEngine::Audio::AudioMixer*), "SetFloat", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{name, value});
}
};
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::GetFloat
// Il2CppName: GetFloat
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<bool (UnityEngine::Audio::AudioMixer::*)(::StringW, ByRef<float>)>(&UnityEngine::Audio::AudioMixer::GetFloat)> {
static const MethodInfo* get() {
static auto* name = &::il2cpp_utils::GetClassFromName("System", "String")->byval_arg;
static auto* value = &::il2cpp_utils::GetClassFromName("System", "Single")->this_arg;
return ::il2cpp_utils::FindMethod(classof(UnityEngine::Audio::AudioMixer*), "GetFloat", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{name, value});
}
};
// Writing MetadataGetter for method: UnityEngine::Audio::AudioMixer::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 60.59375 | 246 | 0.751676 | [
"object",
"vector"
] |
a58cfadc525857c97e66cb5e816b33a2a848cbe6 | 5,472 | cpp | C++ | leetcode.com/0335 Self Crossing/main.cpp | sky-bro/AC | 29bfa3f13994612887e18065fa6e854b9a29633d | [
"MIT"
] | 1 | 2020-08-20T11:02:49.000Z | 2020-08-20T11:02:49.000Z | leetcode.com/0335 Self Crossing/main.cpp | sky-bro/AC | 29bfa3f13994612887e18065fa6e854b9a29633d | [
"MIT"
] | null | null | null | leetcode.com/0335 Self Crossing/main.cpp | sky-bro/AC | 29bfa3f13994612887e18065fa6e854b9a29633d | [
"MIT"
] | 1 | 2022-01-01T23:23:13.000Z | 2022-01-01T23:23:13.000Z | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Point
{
int x, y;
Point(int x_, int y_): x(x_), y(y_) {}
int operator-(const Point& other) {
return x - other.x + y - other.y;
}
};
class Solution {
private:
int n;
public:
bool isSelfCrossing(vector<int>& x) {
n = x.size();
if (n <= 3) return false;
Point p0(0, 0), p1(0, 0), p2(0, x[0]), p3(-x[1], x[0]), p4(-x[1], x[0]-x[2]);
vector<Point> points = {Point(0, 0), Point(0, 0), Point(0, x[0]), Point(-x[1], x[0]), Point(-x[1], x[0]-x[2])};
int i = 3;
if (points[4].y < 0)
for (; i < n; ++i) {
if ((i&3) == 0) {
// up
if (points[0].y > points[4].y + x[i]) {
// inner
points[0].x = points[4].x;
points[0].y = points[4].y + x[i];
rotate(points.begin(), points.begin()+1, points.end());
++i;
break;
} else if (points[1].y < points[4].y + x[i]) {
// outter
points[0].x = points[4].x;
points[0].y = points[4].y + x[i];
rotate(points.begin(), points.begin()+1, points.end());
} else {
// middle
points[2].y = points[4].y;
points[2].x = points[0].x;
points[3] = points[4];
points[4].y += x[i];
++i;
break;
}
} else if ((i&3) == 1) {
// left
if (points[0].x < points[4].x - x[i]) {
// inner
points[0].y = points[4].y;
points[0].x = points[4].x - x[i];
rotate(points.begin(), points.begin()+1, points.end());
++i;
break;
} else if (points[1].x > points[4].x - x[i]) {
// outter
points[0].y = points[4].y;
points[0].x = points[4].x - x[i];
rotate(points.begin(), points.begin()+1, points.end());
} else {
// middle
points[2].x = points[4].x;
points[2].y = points[0].y;
points[3] = points[4];
points[4].x -= x[i];
++i;
break;
}
} else if ((i&3) == 2) {
// down
if (points[0].y < points[4].y - x[i]) {
// inner
points[0].x = points[4].x;
points[0].y = points[4].y - x[i];
rotate(points.begin(), points.begin()+1, points.end());
++i;
break;
} else if (points[1].y > points[4].y - x[i]) {
// outter
points[0].x = points[4].x;
points[0].y = points[4].y - x[i];
rotate(points.begin(), points.begin()+1, points.end());
} else {
// middle
points[2].y = points[4].y;
points[2].x = points[0].x;
points[3] = points[4];
points[4].y -= x[i];
++i;
break;
}
} else {
// right
if (points[0].x > points[4].x + x[i]) {
// inner
points[0].y = points[4].y;
points[0].x = points[4].x + x[i];
rotate(points.begin(), points.begin()+1, points.end());
++i;
break;
} else if (points[1].x < points[4].x + x[i]) {
// outter
points[0].y = points[4].y;
points[0].x = points[4].x + x[i];
rotate(points.begin(), points.begin()+1, points.end());
} else {
// middle
points[2].x = points[4].x;
points[2].y = points[0].y;
points[3] = points[4];
points[4].x += x[i];
++i;
break;
}
}
}
for (; i < n; ++i) {
if (x[i] >= abs(points[2]-points[3])) {
return true;
}
if ((i&3) == 0) {
points[1].x = points[4].x;
points[1].y = points[4].y + x[i];
} else if ((i&3) == 1) {
points[1].y = points[4].y;
points[1].x = points[4].x - x[i];
} else if ((i&3) == 2) {
points[1].x = points[4].x;
points[1].y = points[4].y - x[i];
} else {
points[1].y = points[4].y;
points[1].x = points[4].x + x[i];
}
rotate(points.begin()+1, points.begin()+2, points.end());
}
return false;
}
};
int main(int argc, char const *argv[])
{
vector<int> x = {1,1,1,1};
Solution s;
x = {2, 1, 1, 2};
x = {3, 3, 4, 2, 2};
x = {1,1,2,2,3,1,1};
x = {1,1,2,2,3,3,4,4,10,4,4,3,3,2,2,1,1};
cout<<s.isSelfCrossing(x)<<endl;
return 0;
}
| 34.632911 | 119 | 0.338999 | [
"vector"
] |
a596a13d5ab1c92846e554bb3c500f066c28fe40 | 6,042 | cpp | C++ | Graphics/dispmap/distance.cpp | Solidstatewater/Anubis-Engine | d2720167c0d5306d4d12a027dc31686b5cbb0f18 | [
"BSD-2-Clause"
] | 2 | 2017-10-29T06:43:05.000Z | 2020-03-27T10:27:07.000Z | Graphics/dispmap/distance.cpp | Solidstatewater/Anubis-Engine | d2720167c0d5306d4d12a027dc31686b5cbb0f18 | [
"BSD-2-Clause"
] | null | null | null | Graphics/dispmap/distance.cpp | Solidstatewater/Anubis-Engine | d2720167c0d5306d4d12a027dc31686b5cbb0f18 | [
"BSD-2-Clause"
] | 5 | 2016-02-06T11:01:51.000Z | 2019-03-18T13:56:00.000Z | /*
Copyright (C) 2005, William Donnelly (wdonnelly@uwaterloo.ca)
and Stefanus Du Toit (sjdutoit@cgl.uwaterloo.ca)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "distance.hpp"
#include <cmath>
#include <limits>
// A type to hold the distance map while it's being constructed
struct DistanceMap {
typedef unsigned short Distance;
DistanceMap(int width, int height, int depth)
: m_data(new Distance[width*height*depth*3]),
m_width(width), m_height(height), m_depth(depth)
{
}
Distance& operator()(int x, int y, int z, int i)
{
return m_data[ 3*(m_depth*(m_height*x + y) + z) + i];
}
Distance operator()(int x, int y, int z, int i) const
{
return m_data[ 3*(m_depth*(m_height*x + y) + z) + i];
}
bool inside(int x, int y, int z) const
{
return (0 <= x && x < m_width &&
0 <= y && y < m_height &&
0 <= z && z < m_depth);
}
// Do a single pass over the data.
// Start at (x,y,z) and walk in the direction (cx,cy,cz)
// Combine each pixel (x,y,z) with the value at (x+dx,y+dy,z+dz)
void combine(int dx, int dy, int dz,
int cx, int cy, int cz,
int x, int y, int z)
{
while (inside(x, y, z) && inside(x + dx, y + dy, z + dz)) {
Distance d[3]; d[0] = abs(dx); d[1] = abs(dy); d[2] = abs(dz);
unsigned long v1[3], v2[3];
for (int i = 0; i < 3; i++) v1[i] = (*this)(x, y, z, i);
for (int i = 0; i < 3; i++) v2[i] = (*this)(x+dx, y+dy, z+dz, i) + d[i];
if (v1[0] * v1[0] + v1[1] * v1[1] + v1[2] * v1[2] >
v2[0] * v2[0] + v2[1] * v2[1] + v2[2] * v2[2]) {
for (int i = 0; i < 3; i++) (*this)(x,y,z, i) = v2[i];
}
x += cx; y += cy; z += cz;
}
}
Distance* m_data;
int m_width, m_height, m_depth;
};
using namespace SH;
ShImage3D init_distance_map(const ShImage& heightmap, int depth)
{
// Initialize the distance map to zero below the surface,
// and +infinity above
DistanceMap dmap(heightmap.width(), heightmap.height(), depth);
for (int y = 0; y < heightmap.height(); y++) {
for (int x = 0; x < heightmap.width(); x++) {
for (int z = 0; z < depth; z++) {
for (int i = 0; i < 3; i++) {
if (z < heightmap(x, y, 0) * depth || z <= 1) {
dmap(x, y, z, i) = 0;
} else {
dmap(x, y, z, i) = std::numeric_limits<DistanceMap::Distance>::max();
}
}
}
}
}
// Compute the rest of dmap by sequential sweeps over the data
// using a 3d variant of Danielsson's algorithm
std::cerr << "Computing Distance Map" << std::endl;
for (int z = 1; z < depth; z++) {
std::cerr << ".";
// combine with everything with dz = -1
for (int y = 0; y < heightmap.height(); y++) {
dmap.combine( 0, 0, -1,
1, 0, 0,
0, y, z);
}
for (int y = 1; y < heightmap.height(); y++) {
dmap.combine( 0, -1, 0,
1, 0, 0,
0, y, z);
dmap.combine(-1, 0, 0,
1, 0, 0,
1, y, z);
dmap.combine(+1, 0, 0,
-1, 0, 0,
heightmap.width() - 2, y, z);
}
for (int y = heightmap.height() - 2; y >= 0; y--) {
dmap.combine( 0, +1, 0,
1, 0, 0,
0, y, z);
dmap.combine(-1, 0, 0,
1, 0, 0,
1, y, z);
dmap.combine(+1, 0, 0,
-1, 0, 0,
heightmap.width() - 2, y, z);
}
}
std::cerr << " done first pass" << std::endl;
for (int z = depth - 2; z >= 0; z--) {
std::cerr << ".";
// combine with everything with dz = +1
for (int y = 0; y < heightmap.height(); y++) {
dmap.combine( 0, 0, +1,
1, 0, 0,
0, y, z);
}
for (int y = 1; y < heightmap.height(); y++) {
dmap.combine( 0, -1, 0,
1, 0, 0,
0, y, z);
dmap.combine(-1, 0, 0,
1, 0, 0,
1, y, z);
dmap.combine(+1, 0, 0,
-1, 0, 0,
heightmap.width() - 2, y, z);
}
for (int y = heightmap.height() - 2; y >= 0; y--) {
dmap.combine( 0, +1, 0,
1, 0, 0,
0, y, z);
dmap.combine(-1, 0, 0,
1, 0, 0,
1, y, z);
dmap.combine(+1, 0, 0,
-1, 0, 0,
heightmap.width() - 2, y, z);
}
}
std::cerr << " done second pass" << std::endl;
// Construct a 3d texture img and fill it with the magnitudes of the
// displacements in dmap, scaled appropriately
ShImage3D img(heightmap.width(), heightmap.height(), depth, 1);
for (int z = 0; z < depth; z++) {
for (int y = 0; y < heightmap.height(); y++) {
for (int x = 0; x < heightmap.width(); x++) {
double value = 0;
for (int i = 0; i < 3; i++) {
value += dmap(x, y, z, i)*dmap(x, y, z, i);
}
value = sqrt(value)/depth;
if (value > 1.0) value = 1.0;
img(x, y, z, 0) = value;
}
}
}
return img;
}
| 30.059701 | 81 | 0.493214 | [
"3d"
] |
a599763c4284dc5d82b4d32cb905bdf6743d2440 | 997 | cc | C++ | 动态规划/UVA-12186.cc | OFShare/Algorithm-challenger | 43336871a5e48f8804d6e737c813d9d4c0dc2731 | [
"MIT"
] | 67 | 2019-07-14T05:38:41.000Z | 2021-12-23T11:52:51.000Z | 动态规划/UVA-12186.cc | OFShare/Algorithm-challenger | 43336871a5e48f8804d6e737c813d9d4c0dc2731 | [
"MIT"
] | null | null | null | 动态规划/UVA-12186.cc | OFShare/Algorithm-challenger | 43336871a5e48f8804d6e737c813d9d4c0dc2731 | [
"MIT"
] | 12 | 2020-01-16T10:48:01.000Z | 2021-06-11T16:49:04.000Z | //
// Created by OFShare on 2019-10-14
//
#include <bits/stdc++.h>
const int maxn = 1e5 + 5;
int n, T;
// sons[i]: 记录结点i的孩子结点都有谁
std::vector<int> sons[maxn];
// 以结点src作为根的子树, 结点src向上发起请愿书最少需要多个工人
int dfs(int src) {
// 递归的边界
if (sons[src].size() == 0)
return 1;
std::vector<int> vec;
for (int i = 0; i < sons[src].size(); ++i) {
int child = sons[src][i];
vec.push_back(dfs(child));
}
std::sort(vec.begin(), vec.end());
// 至少需要count个下属
int count = std::ceil(sons[src].size() * T * 0.01);
int sum = 0;
for (int i = 0; i < count; ++i) {
sum += vec[i];
}
return sum;
}
int main() {
while (scanf("%d %d", &n, &T) && (n + T)) {
// 多组数据, 清空
for (int i = 0; i <=n; ++i) {
sons[i].clear();
}
for (int i = 1; i <= n; ++i) {
int tmp;
scanf("%d", &tmp);
sons[tmp].push_back(i);
}
printf("%d\n", dfs(0));
}
return 0;
}
| 21.212766 | 55 | 0.457372 | [
"vector"
] |
a5a260c5f6d0be3b8403fda3f38a96eea8a01e13 | 23,123 | cpp | C++ | src/nnfusion/engine/pass/graph/bertfusion_optimizer/attention_fusion_optimizer.cpp | Cjkkkk/nnfusion | 7ee61dfdd66fbf67eb178fcc5cfa1cddb99b3c13 | [
"MIT"
] | 1 | 2021-07-06T02:02:42.000Z | 2021-07-06T02:02:42.000Z | src/nnfusion/engine/pass/graph/bertfusion_optimizer/attention_fusion_optimizer.cpp | QPC-database/nnfusion | 99ada47c50f355ca278001f11bc752d1c7abcee2 | [
"MIT"
] | null | null | null | src/nnfusion/engine/pass/graph/bertfusion_optimizer/attention_fusion_optimizer.cpp | QPC-database/nnfusion | 99ada47c50f355ca278001f11bc752d1c7abcee2 | [
"MIT"
] | null | null | null | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "attention_fusion_optimizer.hpp"
using namespace nnfusion;
using namespace nnfusion::graph;
using namespace nnfusion::pass::graph;
bool AttentionFusionOptimizer::CheckStartingNode(std::shared_ptr<nnfusion::graph::GNode> node)
{
// Starting Node has 4 children
if (node->get_out_edges().size() != 4)
return false;
// Starting Node shape = [batch_size, sequence_length, hidden_size]
auto shape = node->get_output_shape(0);
if (shape.size() != 3)
return false;
auto hidden_size = shape[2];
// Starting Node has 4 children: 3 of them are Dot
auto edges = node->get_out_edges();
if (edges.size() != 4)
return false;
int dot_count = 0;
for (auto e : edges)
{
auto dst = e->get_dst();
if (dst->get_op_type() == "Dot")
{
dot_count += 1;
}
}
if (dot_count != 3)
return false;
return true;
}
bool AttentionFusionOptimizer::FindSubGraph(std::shared_ptr<GNode> starting_node,
std::shared_ptr<BertFusionGroup> bertfusion_group)
{
NNFUSION_CHECK_NOT_NULLPTR(bertfusion_group);
std::shared_ptr<GNode> ending_node;
for (auto out_edge : starting_node->get_out_edges())
{
auto dst = out_edge->get_dst();
if (dst->get_op_type() != "Dot")
{
ending_node = dst;
break;
}
}
NNFUSION_CHECK_NOT_NULLPTR(ending_node);
//path_v
std::vector<std::string> pattern_v1 = {ending_node->get_op_type(),
"Add",
"Dot",
"Reshape",
"Reshape",
"Reshape",
"BatchMatMul",
"Broadcast",
"Reshape",
"Reshape",
"Reshape",
"Add",
"Dot",
starting_node->get_op_type()};
std::vector<std::string> pattern_v2 = {ending_node->get_op_type(),
"Dot",
"Reshape",
"Reshape",
"Reshape",
"BatchMatMul",
"Broadcast",
"Reshape",
"Reshape",
"Reshape",
"Add",
"Dot",
starting_node->get_op_type()};
std::vector<std::vector<std::shared_ptr<GNode>>> all_paths_v;
if ((!FindPath(ending_node, pattern_v1, all_paths_v, true) &&
!FindPath(ending_node, pattern_v2, all_paths_v, true)) ||
all_paths_v.size() != 1 || all_paths_v[0][all_paths_v[0].size() - 1] != starting_node)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path v";
return false;
}
size_t path_v_len = all_paths_v[0].size();
std::shared_ptr<GNode> add = nullptr;
// if (path_v_len > 13)
// add = all_paths_v[0][path_v_len - 13];
// auto dot = all_paths_v[0][path_v_len - 12];
auto reshape2 = all_paths_v[0][path_v_len - 11];
// auto reshape1 = all_paths_v[0][path_v_len - 10];
// auto reshape_after = all_paths_v[0][path_v_len - 9];
auto qkv_batmatmul = all_paths_v[0][path_v_len - 8];
// auto v_broadcast = all_paths_v[0][path_v_len - 7];
// auto v_reshape_before = all_paths_v[0][path_v_len - 6];
auto v_reshape2 = all_paths_v[0][path_v_len - 5];
auto v_reshape1 = all_paths_v[0][path_v_len - 4];
auto v_add = all_paths_v[0][path_v_len - 3];
auto v_dot = all_paths_v[0][path_v_len - 2];
auto v_reshape1_shape = v_reshape1->get_output_shape(0);
if (v_add->get_out_edges().size() != 1 || v_dot->get_out_edges().size() != 1 ||
v_reshape2->get_out_edges().size() != 1 || qkv_batmatmul->get_out_edges().size() != 1 ||
v_reshape2->get_out_edges().size() != 1 || v_reshape1->get_out_edges().size() != 1 ||
v_reshape1_shape.size() != 4)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path v";
return false;
}
size_t num_heads = v_reshape1_shape[2];
size_t head_size = v_reshape1_shape[3];
size_t hidden_size = starting_node->get_output_shape(0)[2];
if (hidden_size != num_heads * head_size)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path v";
return false;
}
if (path_v_len > 13)
{
bertfusion_group->nodes_to_remove.insert(all_paths_v[0].begin() + 3,
all_paths_v[0].end() - 1);
}
else
{
bertfusion_group->nodes_to_remove.insert(all_paths_v[0].begin() + 2,
all_paths_v[0].end() - 1);
}
//path_mask
std::vector<std::string> pattern_mask1 = {qkv_batmatmul->get_op_type(),
"Broadcast",
"Reshape",
"Softmax",
"Add",
"Broadcast",
"Reshape",
"Multiply",
"Subtract",
"Convert",
"Reshape",
"Reshape"};
std::vector<std::string> pattern_mask2 = {qkv_batmatmul->get_op_type(),
"Broadcast",
"Reshape",
"Softmax",
"Add",
"Broadcast",
"Reshape",
"Multiply",
"Subtract",
"Reshape",
"Reshape"};
std::vector<std::vector<std::shared_ptr<GNode>>> all_paths_mask;
if ((!FindPath(qkv_batmatmul, pattern_mask1, all_paths_mask, true) &&
!FindPath(qkv_batmatmul, pattern_mask2, all_paths_mask, true)) ||
all_paths_mask.size() != 1)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path mask";
return false;
}
// auto mask_broadcast = all_paths_mask[0][1];
// auto mask_reshape_before = all_paths_mask[0][2];
// auto mask_softmax = all_paths_mask[0][3];
auto mask_add = all_paths_mask[0][4];
auto mask_broadcast_for_add = all_paths_mask[0][5];
// auto mask_broadcast_reshape = all_paths_mask[0][6];
// auto mask_mul = all_paths_mask[0][7];
auto mask_sub = all_paths_mask[0][8];
// auto mask_reshape2 = all_paths_mask[0][all_paths_mask[0].size() - 2];
auto mask_reshape1 = all_paths_mask[0][all_paths_mask[0].size() - 1];
std::shared_ptr<GNode> mask_convert = nullptr;
if (all_paths_mask[0].size() == pattern_mask1.size())
{
mask_convert = all_paths_mask[0][all_paths_mask[0].size() - 3];
NNFUSION_CHECK(mask_convert != mask_sub);
}
bertfusion_group->nodes_to_remove.insert(all_paths_mask[0].begin() + 1,
all_paths_mask[0].begin() + 5);
if (mask_broadcast_for_add->get_out_edges().size() == 1)
bertfusion_group->nodes_to_remove.insert(all_paths_mask[0].begin() + 5,
all_paths_mask[0].end());
//path_q and path_k
std::vector<std::string> pattern_qk = {mask_add->get_op_type(),
"Divide",
"Reshape",
"BatchMatMul",
"Broadcast",
"Reshape",
"Reshape",
"Reshape",
"Add",
"Dot",
starting_node->get_op_type()};
std::vector<std::vector<std::shared_ptr<GNode>>> all_paths_qk;
if (!FindPath(mask_add, pattern_qk, all_paths_qk, true) || all_paths_qk.size() != 2 ||
all_paths_qk[0][pattern_qk.size() - 1] != starting_node ||
all_paths_qk[1][pattern_qk.size() - 1] != starting_node)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path q and k";
return false;
}
if (all_paths_qk[0][1] != all_paths_qk[0][1] || all_paths_qk[0][2] != all_paths_qk[0][2])
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path q and k";
return false;
}
auto qk_div = all_paths_qk[0][1];
auto qk_reshape = all_paths_qk[0][2];
auto qk_batmatmul = all_paths_qk[0][3];
size_t q_idx, k_idx;
if (all_paths_qk[0][4] == qk_batmatmul->get_in_edge(0)->get_src())
{
q_idx = 0;
k_idx = 1;
}
else
{
q_idx = 1;
k_idx = 0;
}
// auto q_broadcast = all_paths_qk[q_idx][4];
// auto q_reshape_before = all_paths_qk[q_idx][5];
// auto q_reshape2 = all_paths_qk[q_idx][6];
auto q_reshape1 = all_paths_qk[q_idx][7];
auto q_add = all_paths_qk[q_idx][8];
auto q_dot = all_paths_qk[q_idx][9];
// auto k_broadcast = all_paths_qk[k_idx][4];
// auto k_reshape_before = all_paths_qk[k_idx][5];
// auto k_reshape2 = all_paths_qk[k_idx][6];
// auto k_reshape1 = all_paths_qk[k_idx][7];
auto k_add = all_paths_qk[k_idx][8];
auto k_dot = all_paths_qk[k_idx][9];
auto q_reshape1_shape = q_reshape1->get_output_shape(0);
if (q_reshape1_shape.size() != 4 || q_reshape1_shape[2] != num_heads ||
q_reshape1_shape[3] != head_size)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to find path q and k";
return false;
}
bertfusion_group->nodes_to_remove.insert(all_paths_qk[0].begin() + 1,
all_paths_qk[0].end() - 1);
bertfusion_group->nodes_to_remove.insert(all_paths_qk[1].begin() + 1,
all_paths_qk[1].end() - 1);
bertfusion_group->fuse_group["mask"] = {mask_reshape1};
bertfusion_group->fuse_group["qkv_weight"] = {q_dot, k_dot, v_dot};
bertfusion_group->fuse_group["qkv_bias"] = {q_add, k_add, v_add};
bertfusion_group->fuse_group["inputs"] = {starting_node};
bertfusion_group->helper_nodes.push_back(v_reshape1);
bertfusion_group->edge_nodes.push_back(reshape2);
return true;
}
bool AttentionFusionOptimizer::FuseSubGraph(std::shared_ptr<BertFusionGroup> bertfusion_group)
{
NNFUSION_CHECK_NOT_NULLPTR(bertfusion_group);
auto& fuse_group = bertfusion_group->fuse_group;
NNFUSION_CHECK(fuse_group.find("mask") != fuse_group.end());
NNFUSION_CHECK(fuse_group.find("qkv_weight") != fuse_group.end());
NNFUSION_CHECK(fuse_group.find("qkv_bias") != fuse_group.end());
NNFUSION_CHECK(fuse_group.find("inputs") != fuse_group.end());
auto& mask = fuse_group["mask"];
auto& qkv_weight = fuse_group["qkv_weight"];
auto& qkv_bias = fuse_group["qkv_bias"];
auto& inputs = fuse_group["inputs"];
NNFUSION_CHECK(mask.size() == 1);
NNFUSION_CHECK(qkv_weight.size() == 3);
NNFUSION_CHECK(qkv_bias.size() == 3);
NNFUSION_CHECK(inputs.size() == 1);
auto mask_reshape1 = mask[0];
auto q_dot = qkv_weight[0];
auto k_dot = qkv_weight[1];
auto v_dot = qkv_weight[2];
auto q_add = qkv_bias[0];
auto k_add = qkv_bias[1];
auto v_add = qkv_bias[2];
auto input_node = inputs[0];
NNFUSION_CHECK(bertfusion_group->helper_nodes.size() == 1);
auto v_reshape1 = bertfusion_group->helper_nodes[0];
auto v_reshape1_shape = v_reshape1->get_output_shape(0);
size_t num_heads = v_reshape1_shape[2];
size_t head_size = v_reshape1_shape[3];
auto input_shape = input_node->get_output_shape(0);
size_t batch_size = input_shape[0];
size_t sequence_length = input_shape[1];
NNFUSION_CHECK(bertfusion_group->edge_nodes.size() == 1);
// now we will begin to fuse subgraph
//1. create mask_index
auto mask_input = mask_reshape1->get_in_edge(0)->get_src();
auto mask_index = GetorCreateMaskIndex(mask_input);
if (mask_index == nullptr)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to create mask index";
return false;
}
// 2. merge qkv weight
auto q_weight = q_dot->get_in_edge(1)->get_src();
auto k_weight = k_dot->get_in_edge(1)->get_src();
auto v_weight = v_dot->get_in_edge(1)->get_src();
size_t hidden_size = input_node->get_output_shape(0)[2];
auto qkv_weight_node = MergeQkvWeights(q_weight, k_weight, v_weight, hidden_size, true);
if (qkv_weight_node == nullptr)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to merge qkv weights";
return false;
}
std::vector<std::shared_ptr<GNode>> qkv_weights{q_weight, k_weight, v_weight};
for (auto weight : qkv_weights)
{
if (weight->get_out_edges().size() == 1)
{
bertfusion_group->nodes_to_remove.insert(weight);
}
}
// bertfusion_group->nodes_to_remove.insert({q_weight, k_weight, v_weight});
// 3. merge qkv bias
auto q_bias_broadcast = q_add->get_in_edge(1)->get_src();
auto q_bias = q_bias_broadcast->get_in_edge(0)->get_src();
auto k_bias_broadcast = k_add->get_in_edge(1)->get_src();
auto k_bias = k_bias_broadcast->get_in_edge(0)->get_src();
auto v_bias_broadcast = v_add->get_in_edge(1)->get_src();
auto v_bias = v_bias_broadcast->get_in_edge(0)->get_src();
auto qkv_bias_node = MergeQkvWeights(q_bias, k_bias, v_bias, hidden_size, false);
if (qkv_bias_node == nullptr)
{
NNFUSION_LOG(NNFUSION_WARNING) << "Failed to merge qkv bias";
return false;
}
std::vector<std::shared_ptr<GNode>> qkv_bias_broadcast{
q_bias_broadcast, k_bias_broadcast, k_bias_broadcast};
for (auto bias : qkv_bias_broadcast)
{
if (bias->get_out_edges().size() == 1)
{
bertfusion_group->nodes_to_remove.insert(bias);
}
}
// bertfusion_group->nodes_to_remove.insert(
// {q_bias, k_bias, v_bias, q_bias_broadcast, k_bias_broadcast, k_bias_broadcast});
// 4. create broadcast node
auto broadcasted_op = std::make_shared<op::Broadcast>(
nnfusion::Shape({batch_size * sequence_length, 3 * hidden_size}), nnfusion::AxisSet({0}));
broadcasted_op->set_name(qkv_bias_node->get_name() + "_broadcast");
auto broadcasted_gnode =
m_graph->add_node_and_edge(broadcasted_op, {GNodeIndex{qkv_bias_node, 0}});
// 5. create reshape node
nnfusion::AxisVector ng_axis_order(input_shape.size());
std::iota(ng_axis_order.begin(), ng_axis_order.end(), 0);
auto reshape_op = std::make_shared<nnfusion::op::Reshape>(
ng_axis_order, nnfusion::Shape({batch_size * sequence_length, hidden_size}));
reshape_op->set_name(input_node->get_name() + "_reshape");
auto reshape_gnode = m_graph->add_node_and_edge(reshape_op, {GNodeIndex{input_node, 0}});
// 6. create dot node
auto dot_op = std::make_shared<nnfusion::op::Dot>(0, false, false, false);
dot_op->set_name(input_node->get_name() + "_dot");
auto dot_gnode = m_graph->add_node_and_edge(
dot_op, {GNodeIndex{reshape_gnode, 0}, GNodeIndex{qkv_weight_node, 0}});
// 7. create add node
auto add_op = std::make_shared<op::Add>();
add_op->set_name(input_node->get_name() + "_add");
auto add_gnode = m_graph->add_node_and_edge(
add_op, {GNodeIndex{dot_gnode, 0}, GNodeIndex{broadcasted_gnode, 0}});
// 8. create attention node
nnfusion::op::OpConfig::any myConfig;
myConfig["num_heads"] = num_heads;
myConfig["batch_size"] = batch_size;
myConfig["sequence_length"] = sequence_length;
myConfig["head_size"] = head_size;
// myConfig["unidirectional"] = false;
// myConfig["past_sequence_length"] = 0;
auto attention_op = std::make_shared<nnfusion::op::GenericOp>(
input_node->get_name() + "_attention", "Attention", myConfig);
auto attention_gnode = m_graph->add_node_and_edge(
attention_op, {GNodeIndex{add_gnode, 0}, GNodeIndex{mask_index, 0}});
// replace edge
for (auto edge_node : bertfusion_group->edge_nodes)
{
auto out_edges = edge_node->get_out_edges();
for (auto out_edge : out_edges)
{
auto dst = out_edge->get_dst();
int y = out_edge->get_dst_input();
m_graph->remove_edge(out_edge);
m_graph->add_edge(attention_gnode, 0, dst, y);
}
}
if (!RemoveNodes(bertfusion_group->nodes_to_remove, attention_gnode))
{
NNFUSION_LOG(NNFUSION_WARNING) << "remove nodes failed.";
}
std::unordered_set<std::shared_ptr<GNode>> remove_at_last;
if (q_bias->get_out_edges().size() == 0)
{
remove_at_last.insert(q_bias);
}
if (k_bias->get_out_edges().size() == 0)
{
remove_at_last.insert(k_bias);
}
if (v_bias->get_out_edges().size() == 0)
{
remove_at_last.insert(v_bias);
}
return RemoveNodes(remove_at_last, qkv_bias_node);
}
std::shared_ptr<GNode> AttentionFusionOptimizer::MergeQkvWeights(std::shared_ptr<GNode> q_weight,
std::shared_ptr<GNode> k_weight,
std::shared_ptr<GNode> v_weight,
size_t hidden_size,
bool is_matmul)
{
// Lookup in map, and return the mask index if created.
std::string name = q_weight->get_name() + k_weight->get_name() + v_weight->get_name();
auto search = qkv_weight_map.find(name);
if (search != qkv_weight_map.end())
{
return search->second;
}
auto q_weight_op = std::dynamic_pointer_cast<op::Constant>(q_weight->get_op_ptr());
auto k_weight_op = std::dynamic_pointer_cast<op::Constant>(k_weight->get_op_ptr());
auto v_weight_op = std::dynamic_pointer_cast<op::Constant>(v_weight->get_op_ptr());
// NNFUSION_CHECK_NOT_NULLPTR(q_weight_op) << q_weight->get_op_type();
// NNFUSION_CHECK_NOT_NULLPTR(k_weight_op) << k_weight->get_op_type();
// NNFUSION_CHECK_NOT_NULLPTR(v_weight_op) << v_weight->get_op_type();
if (!q_weight_op || !k_weight_op || !v_weight_op)
{
return nullptr;
}
const char* q_weight_dptr = (char*)q_weight_op->get_data_ptr();
const char* k_weight_dptr = (char*)k_weight_op->get_data_ptr();
const char* v_weight_dptr = (char*)v_weight_op->get_data_ptr();
NNFUSION_CHECK_NOT_NULLPTR(q_weight_dptr);
NNFUSION_CHECK_NOT_NULLPTR(k_weight_dptr);
NNFUSION_CHECK_NOT_NULLPTR(v_weight_dptr);
auto weight_dtype = q_weight_op->get_type();
std::vector<char> qkv_weight_data;
size_t step = hidden_size * weight_dtype.size();
nnfusion::Shape qkv_weight_shape;
if (is_matmul)
{
MergeMatMulWeights(q_weight_dptr, k_weight_dptr, v_weight_dptr, step, qkv_weight_data);
qkv_weight_shape = {hidden_size, 3 * hidden_size};
}
else
{
MergeWeights(q_weight_dptr, k_weight_dptr, v_weight_dptr, step, qkv_weight_data);
qkv_weight_shape = {3 * hidden_size};
}
std::shared_ptr<op::Constant> new_qkv_weight_op =
std::make_shared<op::Constant>(weight_dtype, qkv_weight_shape, qkv_weight_data.data());
new_qkv_weight_op->set_name("mergedqkv" + q_weight_op->get_name());
std::shared_ptr<GNode> new_qkv_weight_gnode =
m_graph->add_node_and_edge(new_qkv_weight_op, GNodeVector());
qkv_weight_map.insert(
std::pair<std::string, std::shared_ptr<GNode>>(name, new_qkv_weight_gnode));
return new_qkv_weight_gnode;
}
void AttentionFusionOptimizer::MergeWeights(const char* q_weight_dptr,
const char* k_weight_dptr,
const char* v_weight_dptr,
size_t step,
std::vector<char>& qkv_weight_data)
{
for (size_t i = 0; i < step; i++)
{
qkv_weight_data.push_back(*q_weight_dptr);
q_weight_dptr++;
}
for (size_t i = 0; i < step; i++)
{
qkv_weight_data.push_back(*k_weight_dptr);
k_weight_dptr++;
}
for (size_t i = 0; i < step; i++)
{
qkv_weight_data.push_back(*v_weight_dptr);
v_weight_dptr++;
}
}
void AttentionFusionOptimizer::MergeMatMulWeights(const char* q_weight_dptr,
const char* k_weight_dptr,
const char* v_weight_dptr,
size_t step,
std::vector<char>& qkv_weight_data)
{
for (size_t i = 0; i < step;
i++, q_weight_dptr += step, k_weight_dptr += step, v_weight_dptr += step)
{
MergeWeights(q_weight_dptr, k_weight_dptr, v_weight_dptr, step, qkv_weight_data);
}
}
std::shared_ptr<GNode>
AttentionFusionOptimizer::GetorCreateMaskIndex(std::shared_ptr<GNode> mask_input)
{
// Lookup in map, and return the mask index if created.
auto search = mask_index_map.find(mask_input->get_name());
if (search != mask_index_map.end())
{
return search->second;
}
auto mask_shape = mask_input->get_output_shape(0);
if (mask_shape.size() != 2)
return nullptr;
std::shared_ptr<GNode> mask_index = mask_input;
auto dtype = mask_input->get_output_element_type(0);
if (dtype != element::i32)
{
auto cast_op = std::make_shared<op::Convert>(element::i32);
cast_op->set_name(mask_input->get_name() + "_to_int32");
std::shared_ptr<GNode> cast_gnode = m_graph->add_node_and_edge(cast_op, {mask_input});
mask_index = cast_gnode;
}
mask_index_map.insert(
std::pair<std::string, std::shared_ptr<GNode>>(mask_input->get_name(), mask_index));
return mask_index;
}
| 40.925664 | 98 | 0.566406 | [
"shape",
"vector"
] |
a5a44b080552fd292321746f0fc7b8535a3dfc9e | 8,273 | cpp | C++ | exotations/dynamics_solvers/exotica_quadrotor_dynamics_solver/src/quadrotor_dynamics_solver.cpp | maxspahn/exotica | f748a5860939b870ab522a1bd553d2fa0da56f8e | [
"BSD-3-Clause"
] | 130 | 2018-03-12T11:00:55.000Z | 2022-02-21T02:41:28.000Z | exotations/dynamics_solvers/exotica_quadrotor_dynamics_solver/src/quadrotor_dynamics_solver.cpp | maxspahn/exotica | f748a5860939b870ab522a1bd553d2fa0da56f8e | [
"BSD-3-Clause"
] | 349 | 2017-09-14T00:42:33.000Z | 2022-03-29T13:51:04.000Z | exotations/dynamics_solvers/exotica_quadrotor_dynamics_solver/src/quadrotor_dynamics_solver.cpp | maxspahn/exotica | f748a5860939b870ab522a1bd553d2fa0da56f8e | [
"BSD-3-Clause"
] | 48 | 2017-10-04T15:50:42.000Z | 2022-02-10T05:03:39.000Z | //
// Copyright (c) 2019, Wolfgang Merkt
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of nor the names of its contributors may be used to
// endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#include <exotica_quadrotor_dynamics_solver/quadrotor_dynamics_solver.h>
REGISTER_DYNAMICS_SOLVER_TYPE("QuadrotorDynamicsSolver", exotica::QuadrotorDynamicsSolver)
namespace exotica
{
QuadrotorDynamicsSolver::QuadrotorDynamicsSolver()
{
num_positions_ = 6;
num_velocities_ = 6;
num_controls_ = 4;
J_.setZero();
J_.diagonal() = Eigen::Vector3d(0.0023, 0.0023, 0.004);
J_inv_.setZero();
J_inv_.diagonal() = Eigen::Vector3d(1. / 0.0023, 1. / 0.0023, 1. / 0.0040);
}
void QuadrotorDynamicsSolver::AssignScene(ScenePtr scene_in)
{
const int num_positions_in = scene_in->GetKinematicTree().GetNumControlledJoints();
// TODO: This is a terrible check (not against name etc.), but can stop _some_ mismatches between URDF/model and dynamics
if ((num_positions_in) != 6 || scene_in->GetKinematicTree().GetControlledBaseType() != BaseType::FLOATING)
ThrowPretty("Robot model may not be a quadrotor.");
}
Eigen::VectorXd QuadrotorDynamicsSolver::f(const StateVector& x, const ControlVector& u)
{
double phi = x(3),
theta = x(4),
psi = x(5),
x_dot = x(6),
y_dot = x(7),
z_dot = x(8),
phi_dot = x(9),
theta_dot = x(10),
psi_dot = x(11);
const double F_1 = k_f_ * u(0);
const double F_2 = k_f_ * u(1);
const double F_3 = k_f_ * u(2);
const double F_4 = k_f_ * u(3);
const double M_1 = k_m_ * u(0);
const double M_2 = k_m_ * u(1);
const double M_3 = k_m_ * u(2);
const double M_4 = k_m_ * u(3);
// clang-format off
double sin_phi = std::sin(phi), cos_phi = std::cos(phi),
sin_theta = std::sin(theta), cos_theta = std::cos(theta),
sin_psi = std::sin(psi), cos_psi = std::cos(psi);
// clang-format on
Eigen::MatrixXd Rx(3, 3), Ry(3, 3), Rz(3, 3), R;
Rx << 1, 0, 0, 0, cos_phi, -sin_phi, 0, sin_phi, cos_phi;
Ry << cos_theta, 0, sin_theta, 0, 1, 0, -sin_theta, 0, cos_theta;
Rz << cos_psi, -sin_psi, 0, sin_psi, cos_psi, 0, 0, 0, 1;
R = Rz * Rx * Ry;
// x,y,z dynamics
Eigen::Vector3d Gtot, Ftot;
Gtot << 0, 0, -g_;
Ftot << 0, 0, F_1 + F_2 + F_3 + F_4;
Eigen::Vector3d pos_ddot = Gtot + R * Ftot / mass_;
// phi, theta, psi dynamics
Eigen::Vector3d tau, omega, omega_dot;
tau << L_ * (F_1 - F_2),
L_ * (F_1 - F_3),
(M_1 - M_2 + M_3 - M_4);
omega << phi_dot, theta_dot, psi_dot;
double radius = L_ / 2.0;
double Ix = 2 * mass_ * (radius * radius) / 5.0 + 2 * radius * radius * mass_,
Iy = 2 * mass_ * (radius * radius) / 5.0 + 2 * radius * radius * mass_,
Iz = 2 * mass_ * (radius * radius) / 5.0 + 4 * radius * radius * mass_;
Eigen::Matrix3d I, Iinv;
I << Ix, 0, 0, 0, Iy, 0, 0, 0, Iz;
Iinv << 1 / Ix, 0, 0, 0, 1 / Iy, 0, 0, 0, 1 / Iz;
omega_dot = Iinv * (tau - omega.cross(I * omega));
Eigen::VectorXd state_dot(12);
state_dot << x_dot, y_dot, z_dot,
phi_dot, theta_dot, psi_dot,
pos_ddot(0), pos_ddot(1), pos_ddot(2),
omega_dot(0), omega_dot(1), omega_dot(2);
return state_dot;
}
Eigen::MatrixXd QuadrotorDynamicsSolver::fx(const StateVector& x, const ControlVector& u)
{
double phi = x(3),
theta = x(4),
psi = x(5),
phi_dot = x(9),
theta_dot = x(10),
psi_dot = x(11);
// clang-format off
double sin_phi = std::sin(phi), cos_phi = std::cos(phi),
sin_theta = std::sin(theta), cos_theta = std::cos(theta),
sin_psi = std::sin(psi), cos_psi = std::cos(psi);
Eigen::MatrixXd fx(num_positions_ + num_velocities_, num_positions_ + num_velocities_);
fx <<
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, (k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))*sin_psi*cos_phi*cos_theta/mass_, (-sin_phi*sin_psi*sin_theta + cos_psi*cos_theta)*(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))/mass_, (sin_phi*cos_psi*cos_theta - sin_psi*sin_theta)*(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))/mass_, 0, 0, 0, 0, 0, 0,
0, 0, 0, -(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))*cos_phi*cos_psi*cos_theta/mass_, (sin_phi*sin_theta*cos_psi + sin_psi*cos_theta)*(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))/mass_, (sin_phi*sin_psi*cos_theta + sin_theta*cos_psi)*(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))/mass_, 0, 0, 0, 0, 0, 0,
0, 0, 0, -(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))*sin_phi*cos_theta/mass_, -(k_f_*u(0) + k_f_*u(1) + k_f_*u(2) + k_f_*u(3))*sin_theta*cos_phi/mass_, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.833333333333334*psi_dot, -0.833333333333334*theta_dot,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0.833333333333334*psi_dot, 0, 0.833333333333334*phi_dot,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
// clang-format on
return fx;
}
Eigen::MatrixXd QuadrotorDynamicsSolver::fu(const StateVector& x, const ControlVector& u)
{
double phi = x(3),
theta = x(4),
psi = x(5);
// clang-format off
double sin_phi = std::sin(phi), cos_phi = std::cos(phi),
sin_theta = std::sin(theta), cos_theta = std::cos(theta),
sin_psi = std::sin(psi), cos_psi = std::cos(psi);
Eigen::MatrixXd fu(num_positions_ + num_velocities_, num_controls_);
fu <<
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
k_f_*(sin_phi*sin_psi*cos_theta + sin_theta*cos_psi)/mass_, k_f_*(sin_phi*sin_psi*cos_theta + sin_theta*cos_psi)/mass_, k_f_*(sin_phi*sin_psi*cos_theta + sin_theta*cos_psi)/mass_, k_f_*(sin_phi*sin_psi*cos_theta + sin_theta*cos_psi)/mass_,
k_f_*(-sin_phi*cos_psi*cos_theta + sin_psi*sin_theta)/mass_, k_f_*(-sin_phi*cos_psi*cos_theta + sin_psi*sin_theta)/mass_, k_f_*(-sin_phi*cos_psi*cos_theta + sin_psi*sin_theta)/mass_, k_f_*(-sin_phi*cos_psi*cos_theta + sin_psi*sin_theta)/mass_,
k_f_*cos_phi*cos_theta/mass_, k_f_*cos_phi*cos_theta/mass_, k_f_*cos_phi*cos_theta/mass_, k_f_*cos_phi*cos_theta/mass_,
1.66666666666667*k_f_/(L_*mass_), -1.66666666666667*k_f_/(L_*mass_), 0, 0,
1.66666666666667*k_f_/(L_*mass_), 0, -1.66666666666667*k_f_/(L_*mass_), 0,
0.909090909090909*k_m_/(L_*L_*2*mass_), -0.909090909090909*k_m_/(L_*L_*2*mass_), 0.909090909090909*k_m_/(L_*L_*mass_), -0.909090909090909*k_m_/(L_*L_*mass_);
// clang-format on
return fu;
}
} // namespace exotica
| 43.772487 | 322 | 0.621056 | [
"model"
] |
a5bf8c4bb0febe29f1e9ad4ece61861b37cce190 | 2,088 | hpp | C++ | src/util/Container.hpp | Person-93/aima-cpp | 08d062dcb971edeaddb9a10083cf6da5a1b869f7 | [
"MIT"
] | null | null | null | src/util/Container.hpp | Person-93/aima-cpp | 08d062dcb971edeaddb9a10083cf6da5a1b869f7 | [
"MIT"
] | null | null | null | src/util/Container.hpp | Person-93/aima-cpp | 08d062dcb971edeaddb9a10083cf6da5a1b869f7 | [
"MIT"
] | null | null | null | #pragma once
#include <utility>
#include <vector>
namespace aima::util {
template< typename T >
class Container {
public:
using Storage = std::vector<T>;
using value_type = typename Storage::value_type;
using allocator_type = typename Storage::allocator_type;
using size_type = typename Storage::size_type;
using difference_type = typename Storage::difference_type;
using reference = typename Storage::reference;
using const_reference = typename Storage::const_reference;
using pointer = typename Storage::pointer;
using const_pointer = typename Storage::const_pointer;
using iterator = typename Storage::iterator;
using const_iterator = iterator;
using reverse_iterator = typename Storage::reverse_iterator;
using const_reverse_iterator = reverse_iterator;
Container() noexcept = default;
Container( const Container& ) = delete;
Container( Container&& ) = delete;
Container& operator=( const Container& ) = delete;
Container&& operator=( Container&& ) = delete;
template< typename... Args >
reference emplace_back( Args&& ... args ) { return storage.emplace_back( std::forward<Args>( args )... ); }
reference at( size_type pos ) const { return storage.at( pos ); }
[[nodiscard]] reference operator[]( size_type pos ) const { return storage[ pos ]; }
[[nodiscard]] reference front() const { return storage.front(); }
[[nodiscard]] reference back() const { return storage.back(); }
[[nodiscard]] iterator begin() const { return storage.begin(); }
[[nodiscard]] iterator end() const { return storage.end(); }
[[nodiscard]] bool empty() const noexcept { return storage.empty(); }
[[nodiscard]] size_type size() const noexcept { return storage.size(); }
private:
mutable Storage storage;
};
}
| 36.631579 | 115 | 0.604885 | [
"vector"
] |
a5c1bc4f87e4c4be7924f08e6429553d7ac1cc89 | 962 | cpp | C++ | aws-cpp-sdk-ssm/source/model/S3OutputUrl.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2022-02-10T08:06:54.000Z | 2022-02-10T08:06:54.000Z | aws-cpp-sdk-ssm/source/model/S3OutputUrl.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2021-10-14T16:57:00.000Z | 2021-10-18T10:47:24.000Z | aws-cpp-sdk-ssm/source/model/S3OutputUrl.cpp | ravindra-wagh/aws-sdk-cpp | 7d5ff01b3c3b872f31ca98fb4ce868cd01e97696 | [
"Apache-2.0"
] | 1 | 2021-11-09T12:02:58.000Z | 2021-11-09T12:02:58.000Z | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/S3OutputUrl.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
S3OutputUrl::S3OutputUrl() :
m_outputUrlHasBeenSet(false)
{
}
S3OutputUrl::S3OutputUrl(JsonView jsonValue) :
m_outputUrlHasBeenSet(false)
{
*this = jsonValue;
}
S3OutputUrl& S3OutputUrl::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("OutputUrl"))
{
m_outputUrl = jsonValue.GetString("OutputUrl");
m_outputUrlHasBeenSet = true;
}
return *this;
}
JsonValue S3OutputUrl::Jsonize() const
{
JsonValue payload;
if(m_outputUrlHasBeenSet)
{
payload.WithString("OutputUrl", m_outputUrl);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws
| 16.033333 | 69 | 0.713098 | [
"model"
] |
a5c3d09450ceb53a82b20ca407e81bc3667e94e6 | 3,072 | cpp | C++ | lib/libcpp/Mesh/interfacemeshunitsmap.cpp | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | null | null | null | lib/libcpp/Mesh/interfacemeshunitsmap.cpp | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | 1 | 2019-01-31T10:59:11.000Z | 2019-01-31T10:59:11.000Z | lib/libcpp/Mesh/interfacemeshunitsmap.cpp | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | null | null | null | #include "Alat/sparsitypattern.hpp"
#include "Mesh/interfacemeshunitsmap.hpp"
#include <cassert>
#include <mpi.h>
using namespace mesh;
/*--------------------------------------------------------------------------*/
InterfaceMeshUnitsMap::~InterfaceMeshUnitsMap() {}
InterfaceMeshUnitsMap::InterfaceMeshUnitsMap(): alat::Map<int,std::shared_ptr<mesh::InterfaceMeshUnit> >(){}
InterfaceMeshUnitsMap::InterfaceMeshUnitsMap( const InterfaceMeshUnitsMap& interfacemeshunitsmap): alat::Map<int,std::shared_ptr<mesh::InterfaceMeshUnit> >(interfacemeshunitsmap)
{
assert(0);
}
InterfaceMeshUnitsMap& InterfaceMeshUnitsMap::operator=( const InterfaceMeshUnitsMap& interfacemeshunitsmap)
{
assert(0);
alat::Map<int,std::shared_ptr<mesh::InterfaceMeshUnit> >::operator=(interfacemeshunitsmap);
return *this;
}
std::string InterfaceMeshUnitsMap::getClassName() const
{
return "InterfaceMeshUnitsMap";
}
/*--------------------------------------------------------------------------*/
void InterfaceMeshUnitsMap::exchangeInterfaces(int id, int nproc)
{
alat::IntSet keys = this->keys();
int tag = 1;
MPI_Status status;
MPI_Request send_request,recv_request;
double inittime = MPI_Wtime();
for(alat::IntSet::const_iterator p=keys.begin(); p!=keys.end(); p++)
{
if(*p>0) continue;
int neighbor = -*p;
// std::cerr << "I want to send from " << id << " to " << neighbor << "\n";
alat::SparsityPattern sizes_send = (*this)[*p]->getSizes();
int colsize_send = sizes_send.col().size();
int rowstartsize_send = sizes_send.rowstart().size();
int colsize_recieve, rowstartsize_recieve;
MPI_Isend(&colsize_send, 1, MPI_INT, neighbor, tag, MPI_COMM_WORLD, &send_request);
MPI_Irecv(&colsize_recieve, 1, MPI_INT, neighbor, tag, MPI_COMM_WORLD, &recv_request);
MPI_Wait(&recv_request, &status);
MPI_Isend(&rowstartsize_send, 1, MPI_INT, neighbor, tag, MPI_COMM_WORLD, &send_request);
MPI_Irecv(&rowstartsize_recieve, 1, MPI_INT, neighbor, tag, MPI_COMM_WORLD, &recv_request);
MPI_Wait(&recv_request, &status);
alat::SparsityPattern sizes_receive(colsize_recieve, rowstartsize_recieve);
MPI_Isend(sizes_send.col().begin(), sizes_send.col().size(), MPI_INT, neighbor, tag, MPI_COMM_WORLD, &send_request);
MPI_Irecv(sizes_receive.col().begin(), sizes_receive.col().size(), MPI_INT, neighbor, tag, MPI_COMM_WORLD, &recv_request);
MPI_Wait(&recv_request, &status);
MPI_Isend(sizes_send.rowstart().begin(), sizes_send.rowstart().size(), MPI_INT, neighbor, tag, MPI_COMM_WORLD, &send_request);
MPI_Irecv(sizes_receive.rowstart().begin(), sizes_receive.rowstart().size(), MPI_INT, neighbor, tag, MPI_COMM_WORLD, &recv_request);
MPI_Wait(&recv_request, &status);
(*this)[neighbor]->setSizes(sizes_receive);
}
for(alat::IntSet::const_iterator p=keys.begin(); p!=keys.end(); p++)
{
if(*p>0) continue;
int neighbor = -*p;
(*this)[*p]->sendRecv((*this)[neighbor], neighbor);
}
double totaltime = MPI_Wtime() - inittime;
std::cerr << "totaltime = " << totaltime << "\n";
}
| 43.885714 | 178 | 0.684896 | [
"mesh"
] |
a5cb642ba7205462265f3b2bd6b937ae7e97813a | 1,185 | cpp | C++ | Viewer/mapmanager.cpp | MNXANL/SRGGE-MIRI | a3429074745ebef63b516f7d32a3de0fa5823651 | [
"MIT"
] | null | null | null | Viewer/mapmanager.cpp | MNXANL/SRGGE-MIRI | a3429074745ebef63b516f7d32a3de0fa5823651 | [
"MIT"
] | null | null | null | Viewer/mapmanager.cpp | MNXANL/SRGGE-MIRI | a3429074745ebef63b516f7d32a3de0fa5823651 | [
"MIT"
] | null | null | null | #include "mapmanager.h"
mapManager::mapManager()
{
}
void mapManager::loadMap( const std::string filename ) {
/*
std::ifstream fin;
fin.open(filename.c_str(), std::ios_base::in | std::ios_base::binary);
if (!fin.is_open() || !fin.good()) return false;
int vertices = 0, faces = 0;
fin->getline(line, 100);
if (strncmp(line, "txt", 3) != 0) return false;
*vertices = 0;
fin->getline(line, 100);
while (strncmp(line, "end_header", 10) != 0) {
if (strncmp(line, "element vertex", 14) == 0) *vertices = atoi(&line[15]);
fin->getline(line, 100);
if (strncmp(line, "element face", 12) == 0) *faces = atoi(&line[13]);
}
if (!ReadPlyHeader(&fin, &vertices, &faces)) {
fin.close();
return false;
}
mesh->vertices_.resize(static_cast<size_t>(vertices) * 3);
ReadPlyVertices(&fin, mesh);
mesh->faces_.resize(static_cast<size_t>(faces) * 3);
ReadPlyFaces(&fin, mesh);
fin.close();
ComputeVertexNormals(mesh->vertices_, mesh->faces_, &mesh->normals_);
ComputeBoundingBox(mesh->vertices_, mesh);
return true;
*/
}
| 22.358491 | 82 | 0.576371 | [
"mesh"
] |
a5d0db84180c653cc7ad02a8707afc1d27267be5 | 2,017 | hpp | C++ | include/natalie/sexp_value.hpp | alimpfard/natalie | f161e34e63749cd7ed16148d25b010a71cd174d8 | [
"MIT"
] | 1 | 2021-11-17T22:01:36.000Z | 2021-11-17T22:01:36.000Z | include/natalie/sexp_value.hpp | jcs/natalie | 36dae5954b80be2af107840de2b1c76b69bf6ac0 | [
"MIT"
] | null | null | null | include/natalie/sexp_value.hpp | jcs/natalie | 36dae5954b80be2af107840de2b1c76b69bf6ac0 | [
"MIT"
] | null | null | null | #pragma once
#include "natalie.hpp"
#include "natalie/node.hpp"
namespace Natalie {
struct SexpValue : ArrayValue {
SexpValue(Env *env, Node *node, std::initializer_list<Value *> list)
: ArrayValue { env, list }
, m_file { node->file() }
, m_line { node->line() }
, m_column { node->column() } {
m_klass = env->Object()->const_fetch("Parser")->const_fetch("Sexp")->as_class();
}
Value *new_method(Env *env, size_t argc, Value **args) {
auto sexp = new SexpValue { env, {} };
sexp->m_file = m_file;
sexp->m_line = m_line;
for (size_t i = 0; i < argc; i++) {
sexp->push(args[i]);
}
return sexp;
}
Value *inspect(Env *env) {
StringValue *out = new StringValue { env, "s(" };
for (size_t i = 0; i < size(); i++) {
Value *obj = (*this)[i];
StringValue *repr = obj->send(env, "inspect")->as_string();
out->append_string(env, repr);
if (i < size() - 1) {
out->append(env, ", ");
}
}
out->append_char(env, ')');
return out;
}
const char *file() { return m_file; }
void set_file(const char *file) { m_file = file; }
Value *set_file(Env *env, Value *file) {
file->assert_type(env, Value::Type::String, "String");
m_file = file->as_string()->c_str();
return file;
}
size_t line() { return m_line; }
void set_line(size_t line) { m_line = line; }
Value *set_line(Env *env, Value *line) {
line->assert_type(env, Value::Type::Integer, "Integer");
m_line = line->as_integer()->to_nat_int_t();
return line;
}
private:
SexpValue(Env *env, std::initializer_list<Value *> list)
: ArrayValue { env, list } {
m_klass = env->Object()->const_fetch("Parser")->const_fetch("Sexp")->as_class();
}
const char *m_file { nullptr };
size_t m_line { 0 };
size_t m_column { 0 };
};
}
| 29.231884 | 88 | 0.536936 | [
"object"
] |
777a52ff2811b701d388f414789b294ebf9e6670 | 553 | cpp | C++ | leet/ac/0070.climbing-stairs.cpp | vitorgt/problem-solving | 11fa59de808f7a113c08454b4aca68b01410892e | [
"MIT"
] | null | null | null | leet/ac/0070.climbing-stairs.cpp | vitorgt/problem-solving | 11fa59de808f7a113c08454b4aca68b01410892e | [
"MIT"
] | null | null | null | leet/ac/0070.climbing-stairs.cpp | vitorgt/problem-solving | 11fa59de808f7a113c08454b4aca68b01410892e | [
"MIT"
] | null | null | null | class Solution {
public:
int climbStairs(int n) {
if (n <= 3)
return n;
int n0 = 2, n1 = 3, n2 = 5;
for (int i = 3; i < n; i++) {
n2 = n1 + n0;
n0 = n1;
n1 = n2;
}
return n2;
}
};
class SolutionB {
public:
int climbStairs(int n) {
if (n <= 3)
return n;
vector<int> dp(n, 1);
dp[1] = 2;
for (int i = 2; i < n; i++) {
dp[i] = dp[i - 2] + dp[i - 1];
}
return dp[n - 1];
}
};
| 19.068966 | 42 | 0.345389 | [
"vector"
] |
77808197d8c0f7d047c29fe3c606e794328fd5ab | 2,454 | cpp | C++ | 978_d.cpp | onexmaster/cp | b78b0f1e586d6977d86c97b32f48fed33f1469af | [
"Apache-2.0",
"MIT"
] | null | null | null | 978_d.cpp | onexmaster/cp | b78b0f1e586d6977d86c97b32f48fed33f1469af | [
"Apache-2.0",
"MIT"
] | null | null | null | 978_d.cpp | onexmaster/cp | b78b0f1e586d6977d86c97b32f48fed33f1469af | [
"Apache-2.0",
"MIT"
] | null | null | null | // Created by Tanuj Jain
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int,int> pii;
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const int INF = 0x3f3f3f3f;
int knight_moves[8][2]={{-2,-1},{-1,-2},{1,-2},{2,-1},{-2,1},{-1,2},{1,2},{2,1}};
int moves[4][2]={{0,1},{0,-1},{1,0},{-1,0}};
struct custom_hash {
static uint64_t splitmix64(uint64_t x) {
// http://xorshift.di.unimi.it/splitmix64.c
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
return x ^ (x >> 31);
}
size_t operator()(uint64_t x) const {
static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
return splitmix64(x + FIXED_RANDOM);
}
};
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("inputf.in","r",stdin);
freopen("outputf.in","w",stdout);
#endif
int t;
cin>>t;
vector<int>v(t);
for(int i=0;i<t;i++)
cin>>v[i];
if(t<=2)
{
cout<<0;
return 0;
}
int a=v[0];
int b=v[1];
int min_changes=INT_MAX;
bool global_ok=false;
for(int i=-1;i<=1;i++)
{
v[0]=a+i;
for(int j=-1;j<=1;j++)
{
//v[0]=a+i;
v[1]=b+j;
int diff=v[1]-v[0];
int changes=0;
if(i!=0)
changes++;
if(j!=0)
changes++;
bool ok=true;
//cout<<"HERE"<<endl;
//cout<<v[0]<<" "<<v[1]<<" "<<diff<<endl;
//the i'th term for the above sequcne shoudl be a+(n-1)*d;
//if the present term is not equal to the above term and if the change re
//is greater than 1
for(int k=2;k<t;k++)
{
int should=v[0]+(k)*(diff);
//cout<<should<<" ";
//temp is should-have
int temp_diff=abs(should-v[k]);
//cout<<should<<" "<<temp_diff<<" ";
if(abs(temp_diff)>1)
{
ok=false;
break;
}
if(abs(temp_diff)==1)
{
changes++;
}
}
//cout<<endl;
if(ok)
{
//cout<<v[0]<<" "<<v[1]<<" "<<changes<<endl;
global_ok=true;
min_changes=min(min_changes,changes);
}
}
}
if(!global_ok)
cout<<-1;
else
cout<<min_changes;
return 0;
} | 22.934579 | 106 | 0.55053 | [
"vector"
] |
7783582ead88be35a5dacbb78a7369d1ba4362e9 | 17,591 | cpp | C++ | src/ExecWin32.cpp | bmharper/tundra | 8de456ba8dd9a3d873bfb8bd7fa2de39173a13d4 | [
"MIT"
] | null | null | null | src/ExecWin32.cpp | bmharper/tundra | 8de456ba8dd9a3d873bfb8bd7fa2de39173a13d4 | [
"MIT"
] | null | null | null | src/ExecWin32.cpp | bmharper/tundra | 8de456ba8dd9a3d873bfb8bd7fa2de39173a13d4 | [
"MIT"
] | null | null | null | /* exec-win32.c -- Windows subprocess handling
*
* This module is complicated due to how Win32 handles child I/O and because
* its command processor cannot handle long command lines, requiring tools to
* support so-called "response files" which are basically just the contents of
* the command line, but written to a file. Tundra implements this via the
* @RESPONSE handling.
*
* Also, rather than using the tty merging module that unix uses, this module
* handles output merging via temporary files. This removes the pipe
* read/write deadlocks I've seen from time to time when using the TTY merging
* code. Rather than losing my last sanity points on debugging win32 internals
* I've opted for this much simpler approach.
*
* Instead of buffering stuff in memory via pipe babysitting, this new code
* first passes the stdout handle straight down to the first process it spawns.
* Subsequent child processes that are spawned when the TTY is busy instead get
* to inherit a temporary file handle. Once the process completes, it will wait
* to get the TTY and flush its temporary output file to the console. The
* temporary is then deleted.
*/
#include "Exec.hpp"
#include "Common.hpp"
#include "Config.hpp"
#include "Mutex.hpp"
#include "BuildQueue.hpp"
#include "Atomic.hpp"
#include "SignalHandler.hpp"
#include <algorithm>
#if defined(TUNDRA_WIN32)
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
namespace t2
{
static char s_TemporaryDir[MAX_PATH];
static DWORD s_TundraPid;
static Mutex s_FdMutex;
static HANDLE s_TempFiles[kMaxBuildThreads];
static HANDLE AllocFd(int job_id)
{
HANDLE result = s_TempFiles[job_id];
if (!result)
{
char temp_dir[MAX_PATH + 1];
DWORD access, sharemode, disp, flags;
_snprintf(temp_dir, MAX_PATH, "%stundra.%u.%d", s_TemporaryDir, (uint32_t) s_TundraPid, job_id);
temp_dir[MAX_PATH] = '\0';
access = GENERIC_WRITE | GENERIC_READ;
sharemode = FILE_SHARE_WRITE;
disp = CREATE_ALWAYS;
flags = FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE;
result = CreateFileA(temp_dir, access, sharemode, NULL, disp, flags, NULL);
if (INVALID_HANDLE_VALUE == result)
{
fprintf(stderr, "failed to create temporary file %s\n", temp_dir);
return INVALID_HANDLE_VALUE;
}
SetHandleInformation(result, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
s_TempFiles[job_id] = result;
}
return result;
}
static void FreeFd(int job_id, HANDLE h)
{
char buf[1024];
HANDLE target = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD fsize = SetFilePointer(h, 0, NULL, FILE_CURRENT);
// Rewind file position of the temporary file.
SetFilePointer(h, 0, NULL, FILE_BEGIN);
// Wait until we can take the TTY.
MutexLock(&s_FdMutex);
// Win32-specific hack to get rid of "Foo.cpp" output from visual studio's cl.exe
if (fsize < sizeof(buf) - 1)
{
DWORD rb;
if (ReadFile(h, buf, sizeof(buf) - 1, &rb, NULL))
{
buf[rb] = '\0';
static const struct { const char* text; size_t len; } exts[] =
{
{ ".cpp\r\n", 6 },
{ ".c++\r\n", 6 },
{ ".c\r\n", 4 },
{ ".CC\r\n", 5 }
};
int ext_index = -1;
for (size_t i = 0; -1 == ext_index && i < ARRAY_SIZE(exts); ++i)
{
if (rb > exts[i].len && 0 == memcmp(buf + rb - exts[i].len, exts[i].text, exts[i].len))
{
ext_index = (int) i;
break;
}
}
bool is_src_file = false;
if (ext_index >= 0)
{
is_src_file = true;
for (DWORD i = 0; i < rb - exts[ext_index].len; ++i)
{
if (!isalnum(buf[i]))
{
is_src_file = false;
break;
}
}
}
if (!is_src_file)
{
DWORD wb;
WriteFile(target, buf, rb, &wb, NULL);
}
else
{
// Be silent
}
}
}
else
{
// Dump the contents of the temporary file to the TTY.
for (;;)
{
DWORD rb, wb;
if (!ReadFile(h, buf, sizeof(buf), &rb, NULL) || rb == 0)
break;
if (!WriteFile(target, buf, rb, &wb, NULL))
break;
}
}
// Mark the TTY as free again and wake waiters.
MutexUnlock(&s_FdMutex);
// Truncate the temporary file for reuse
SetFilePointer(h, 0, NULL, FILE_BEGIN);
SetEndOfFile(h);
}
static struct Win32EnvBinding
{
const char* m_Name;
const char* m_Value;
size_t m_NameLength;
} g_Win32Env[1024];
static char UTF8_WindowsEnvironment[128*1024];
static size_t g_Win32EnvCount;
void ExecInit(void)
{
s_TundraPid = GetCurrentProcessId();
if (0 == GetTempPathA(sizeof(s_TemporaryDir), s_TemporaryDir))
Croak("error: couldn't get temporary directory path");
MutexInit(&s_FdMutex);
// Initialize win32 env block. We're going to let it leak.
// This block contains a series of nul-terminated strings, with a double nul
// terminator to indicated the end of the data.
// Since all our operations are in UTF8 space, we're going to convert the windows environment once on startup into utf8 as well,
// so that all follow up operations are fast.
WCHAR* widecharenv = GetEnvironmentStringsW();
WCHAR* searchForDoubleNull = widecharenv;
int len = 0;
while ((*(searchForDoubleNull + len)) != 0 || (*(searchForDoubleNull + len + 1)) != 0) len++;
len += 2;
WideCharToMultiByte(CP_UTF8, 0, widecharenv, len, UTF8_WindowsEnvironment, sizeof UTF8_WindowsEnvironment, NULL, NULL);
const char* env = UTF8_WindowsEnvironment;
size_t env_count = 0;
while (*env && env_count < ARRAY_SIZE(g_Win32Env))
{
size_t len = strlen(env);
if (const char* eq = strchr(env, '='))
{
// Discard empty variables that Windows sometimes has internally
if (eq != env)
{
g_Win32Env[env_count].m_Name = env;
g_Win32Env[env_count].m_Value = eq+1;
g_Win32Env[env_count].m_NameLength = size_t(eq - env);
++env_count;
}
}
env += len + 1;
}
g_Win32EnvCount = env_count;
}
static bool
AppendEnvVar(char* block, size_t block_size, size_t *cursor, const char *name, size_t name_len, const char* value)
{
size_t value_len = strlen(value);
size_t pos = *cursor;
if (pos + name_len + value_len + 2 > block_size)
return false;
memcpy(block + pos, name, name_len);
pos += name_len;
block[pos++] = '=';
memcpy(block + pos, value, value_len);
pos += value_len;
block[pos++] = '\0';
*cursor = pos;
return true;
}
extern char* s_Win32EnvBlock;
static bool
MakeEnvBlock(char* env_block, size_t block_size, const EnvVariable *env_vars, int env_count, size_t* out_env_block_length)
{
size_t cursor = 0;
size_t env_var_len[ARRAY_SIZE(g_Win32Env)];
unsigned char used_env[ARRAY_SIZE(g_Win32Env)];
if (env_count > int(sizeof used_env))
return false;
for (int i = 0; i < env_count; ++i)
{
env_var_len[i] = strlen(env_vars[i].m_Name);
}
memset(used_env, 0, sizeof(used_env));
// Loop through windows environment block and emit anything we're not going to override.
for (size_t i = 0, count = g_Win32EnvCount; i < count; ++i)
{
bool replaced = false;
for (int x = 0; !replaced && x < env_count; ++x)
{
if (used_env[x])
continue;
size_t len = env_var_len[x];
if (len == g_Win32Env[i].m_NameLength && 0 == _memicmp(g_Win32Env[i].m_Name, env_vars[x].m_Name, len))
{
if (!AppendEnvVar(env_block, block_size, &cursor, env_vars[x].m_Name, len, env_vars[x].m_Value))
return false;
replaced = true;
used_env[x] = 1;
}
}
if (!replaced)
{
if (!AppendEnvVar(env_block, block_size, &cursor, g_Win32Env[i].m_Name, g_Win32Env[i].m_NameLength, g_Win32Env[i].m_Value))
return false;
}
}
// Loop through our env vars and emit those we didn't already push out.
for (int i = 0; i < env_count; ++i)
{
if (used_env[i])
continue;
if (!AppendEnvVar(env_block, block_size, &cursor, env_vars[i].m_Name, env_var_len[i], env_vars[i].m_Value))
return false;
}
env_block[cursor++] = '\0';
env_block[cursor++] = '\0';
*out_env_block_length = cursor;
return true;
}
static void
PrintLineToHandle(HANDLE h, const char *str)
{
DWORD bw;
WriteFile(h, str, (DWORD) strlen(str), &bw, NULL);
WriteFile(h, "\r\n", 2, &bw, NULL);
}
/*
Win32Spawn -- spawn and wait for a a sub-process on Windows.
We would like to say:
return (int) _spawnlpe(_P_WAIT, "cmd", "/c", cmd_line, NULL, env);
but it turns out spawnlpe() isn't thread-safe (MSVC2008) when setting
environment data! So we're doing it the hard way. It also would set the
environment in the right way as we want to define our environment strings in
addition to whatever is already set, not replace everything.
*/
static int Win32Spawn(int job_id, const char *cmd_line, const EnvVariable *env_vars, int env_count, const char *annotation, const char* echo_cmdline)
{
char buffer[8192];
char env_block[128*1024];
WCHAR env_block_wide[128 * 1024];
HANDLE output_handle;
STARTUPINFO sinfo;
PROCESS_INFORMATION pinfo;
MutexLock(&s_FdMutex);
{
HANDLE target = GetStdHandle(STD_OUTPUT_HANDLE);
const char crlf[] = "\r\n";
DWORD wb;
if (annotation)
{
WriteFile(target, annotation, (DWORD) strlen(annotation), &wb, NULL);
WriteFile(target, crlf, 2, &wb, NULL);
}
if (echo_cmdline)
{
WriteFile(target, echo_cmdline, (DWORD) strlen(echo_cmdline), &wb, NULL);
WriteFile(target, crlf, 2, &wb, NULL);
}
}
MutexUnlock(&s_FdMutex);
size_t env_block_length = 0;
if (!MakeEnvBlock(env_block, sizeof(env_block) - 2, env_vars, env_count, &env_block_length))
{
fprintf(stderr, "%d: env block error; too big?\n", job_id);
return 1;
}
if (!MultiByteToWideChar(CP_UTF8, 0, env_block, (int) env_block_length, env_block_wide, int(sizeof(env_block_wide)/sizeof(WCHAR))))
{
fprintf(stderr, "%d: Failed converting environment block to wide char\n", job_id);
return 1;
}
_snprintf(buffer, sizeof(buffer), "cmd.exe /c \"%s\"", cmd_line);
buffer[sizeof(buffer)-1] = '\0';
output_handle = AllocFd(job_id);
memset(&pinfo, 0, sizeof(pinfo));
memset(&sinfo, 0, sizeof(sinfo));
sinfo.cb = sizeof(sinfo);
sinfo.hStdInput = NULL;
sinfo.hStdOutput = sinfo.hStdError = output_handle;
sinfo.dwFlags = STARTF_USESTDHANDLES;
HANDLE job_object = CreateJobObject(NULL, NULL);
if (!job_object)
{
char error[256];
_snprintf(error, sizeof error, "ERROR: Couldn't create job object. Win32 error = %d", (int) GetLastError());
PrintLineToHandle(output_handle, error);
return 1;
}
DWORD result_code = 1;
if (CreateProcessA(NULL, buffer, NULL, NULL, TRUE, CREATE_SUSPENDED | CREATE_UNICODE_ENVIRONMENT, env_block_wide, NULL, &sinfo, &pinfo))
{
AssignProcessToJobObject(job_object, pinfo.hProcess);
ResumeThread(pinfo.hThread);
CloseHandle(pinfo.hThread);
HANDLE handles[2];
handles[0] = pinfo.hProcess;
handles[1] = SignalGetHandle();
switch (WaitForMultipleObjects(2, handles, FALSE, INFINITE))
{
case WAIT_OBJECT_0:
// OK - command ran to completion.
GetExitCodeProcess(pinfo.hProcess, &result_code);
break;
case WAIT_OBJECT_0 + 1:
// We have been interrupted - kill the program.
TerminateJobObject(job_object, 1);
WaitForSingleObject(pinfo.hProcess, INFINITE);
// Leave result_code at 1 to indicate failed build.
break;
}
CloseHandle(pinfo.hProcess);
}
else
{
char error[256];
_snprintf(error, sizeof error, "ERROR: Couldn't launch process. Win32 error = %d", (int) GetLastError());
PrintLineToHandle(output_handle, error);
}
CloseHandle(job_object);
FreeFd(job_id, output_handle);
return (int) result_code;
}
ExecResult ExecuteProcess(
const char* cmd_line,
int env_count,
const EnvVariable* env_vars,
int job_id,
int echo_cmdline,
const char* annotation)
{
static const char response_prefix[] = "@RESPONSE|";
static const char response_suffix_char = '|';
static const char always_response_prefix[] = "@RESPONSE!";
static const char always_response_suffix_char = '!';
static_assert(sizeof response_prefix == sizeof always_response_prefix, "Response prefix lengths differ");
static const size_t response_prefix_len = sizeof(response_prefix) - 1;
char command_buf[512];
char option_buf[32];
char new_cmd[8192];
char response_suffix = response_suffix_char;
const char* response;
if (NULL == (response = strstr(cmd_line, response_prefix)))
{
if (NULL != (response = strstr(cmd_line, always_response_prefix)))
{
response_suffix = always_response_suffix_char;
}
}
ExecResult result;
result.m_WasSignalled = false;
result.m_ReturnCode = 1;
/* scan for a @RESPONSE|<option>|.... section at the end of the command line */
if (NULL != response)
{
const size_t cmd_len = strlen(cmd_line);
const char *option, *option_end;
option = response + response_prefix_len;
if (NULL == (option_end = strchr(option, response_suffix)))
{
fprintf(stderr, "badly formatted @RESPONSE section; missing %c after option: %s\n", response_suffix, cmd_line);
return result;
}
/* Limit on XP and later is 8191 chars; but play it safe */
if (response_suffix == always_response_suffix_char || cmd_len > 8000)
{
char tmp_dir[MAX_PATH];
char response_file[MAX_PATH];
int cmd_result;
DWORD rc;
rc = GetTempPath(sizeof(tmp_dir), tmp_dir);
if (rc >= sizeof(tmp_dir) || 0 == rc)
{
fprintf(stderr, "couldn't get temporary directory for response file; win32 error=%d", (int) GetLastError());
return result;
}
if ('\\' == tmp_dir[rc-1])
tmp_dir[rc-1] = '\0';
static uint32_t foo = 0;
uint32_t sequence = AtomicIncrement(&foo);
_snprintf(response_file, sizeof response_file, "%s\\tundra.resp.%u.%u", tmp_dir, GetCurrentProcessId(), sequence);
response_file[sizeof(response_file)-1] = '\0';
{
HANDLE hf = CreateFileA(response_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (INVALID_HANDLE_VALUE == hf)
{
fprintf(stderr, "couldn't create response file %s; @err=%u", response_file, (unsigned int) GetLastError());
return result;
}
DWORD written;
WriteFile(hf, option_end + 1, (DWORD) strlen(option_end + 1), &written, NULL);
if (!CloseHandle(hf))
{
fprintf(stderr, "couldn't close response file %s: errno=%d", response_file, errno);
return result;
}
hf = NULL;
}
{
const int pre_suffix_len = (int)(response - cmd_line);
int copy_len = std::min(pre_suffix_len, (int) (sizeof(command_buf) - 1));
if (copy_len != pre_suffix_len)
{
char truncated_cmd[sizeof(command_buf)];
_snprintf(truncated_cmd, sizeof(truncated_cmd) - 1, "%s", cmd_line);
truncated_cmd[sizeof(truncated_cmd)-1] = '\0';
fprintf(stderr, "Couldn't copy command (%s...) before response file suffix. "
"Move the response file suffix closer to the command starting position.\n", truncated_cmd);
return result;
}
strncpy(command_buf, cmd_line, copy_len);
command_buf[copy_len] = '\0';
copy_len = std::min((int) (option_end - option), (int) (sizeof(option_buf) - 1));
strncpy(option_buf, option, copy_len);
option_buf[copy_len] = '\0';
}
_snprintf(new_cmd, sizeof(new_cmd), "%s %s%s", command_buf, option_buf, response_file);
new_cmd[sizeof(new_cmd)-1] = '\0';
cmd_result = Win32Spawn(job_id, new_cmd, env_vars, env_count, annotation, echo_cmdline ? cmd_line : NULL);
remove(response_file);
result.m_ReturnCode = cmd_result;
return result;
}
else
{
size_t i, len;
int copy_len = std::min((int) (response - cmd_line), (int) (sizeof(command_buf) - 1));
strncpy(command_buf, cmd_line, copy_len);
command_buf[copy_len] = '\0';
_snprintf(new_cmd, sizeof(new_cmd), "%s%s", command_buf, option_end + 1);
new_cmd[sizeof(new_cmd)-1] = '\0';
/* Drop any newlines in the command line. They are needed for response
* files only to make sure the max length doesn't exceed 128 kb */
for (i = 0, len = strlen(new_cmd); i < len; ++i)
{
if (new_cmd[i] == '\n')
{
new_cmd[i] = ' ';
}
}
result.m_ReturnCode = Win32Spawn(job_id, new_cmd, env_vars, env_count, annotation, echo_cmdline ? cmd_line : NULL);
return result;
}
}
else
{
size_t i, len;
/* Drop any newlines in the command line. They are needed for response
* files only to make sure the max length doesn't exceed 128 kb */
strncpy(new_cmd, cmd_line, sizeof(new_cmd));
new_cmd[sizeof(new_cmd)-1] = '\0';
for (i = 0, len = strlen(new_cmd); i < len; ++i)
{
if (new_cmd[i] == '\n')
{
new_cmd[i] = ' ';
}
}
result.m_ReturnCode = Win32Spawn(job_id, new_cmd, env_vars, env_count, annotation, echo_cmdline ? cmd_line : NULL);
return result;
}
}
}
#endif /* TUNDRA_WIN32 */
| 29.318333 | 149 | 0.641919 | [
"object"
] |
7784effeda69316e980cb197d29f8445bc3b6878 | 13,162 | cpp | C++ | src/GafferTest/ContextTest.cpp | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 561 | 2016-10-18T04:30:48.000Z | 2022-03-30T06:52:04.000Z | src/GafferTest/ContextTest.cpp | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 1,828 | 2016-10-14T19:01:46.000Z | 2022-03-30T16:07:19.000Z | src/GafferTest/ContextTest.cpp | ddesmond/gaffer | 4f25df88103b7893df75865ea919fb035f92bac0 | [
"BSD-3-Clause"
] | 120 | 2016-10-18T15:19:13.000Z | 2021-12-20T16:28:23.000Z | //////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-2015, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above
// copyright notice, this list of conditions and the following
// disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided with
// the distribution.
//
// * Neither the name of John Haddon nor the names of
// any other contributors to this software may be used to endorse or
// promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////
#include "GafferTest/ContextTest.h"
#include "GafferTest/Assert.h"
#include "Gaffer/Context.h"
#include "IECore/Timer.h"
#include "IECore/VectorTypedData.h"
#include "IECore/PathMatcherData.h"
#include "boost/lexical_cast.hpp"
#include "tbb/parallel_for.h"
#include <unordered_set>
using namespace std;
using namespace boost;
using namespace IECore;
using namespace Gaffer;
// A test useful for assessing the performance
// of the Context class.
void GafferTest::testManyContexts()
{
// our typical context doesn't have a huge number of keys - we'll
// use a working set of 20 for this test.
ContextPtr base = new Context();
const int numKeys = 20;
vector<InternedString> keys;
for( int i = 0; i < numKeys; ++i )
{
InternedString key = string( "testKey" ) + lexical_cast<string>( i );
keys.push_back( key );
base->set( key, -1 - i );
}
const MurmurHash baseHash = base->hash();
// then typically we create new temporary contexts based on that one,
// change a value or two, and then continue.
Timer t;
for( int i = 0; i < 1000000; ++i )
{
// In order to efficiently manipulate a context, we need to create an EditableScope.
// ( On the other hand, using a Context directly copies new memory for the value to
// create a fully independent context, which is pretty slow ).
Context::EditableScope tmp( base.get() );
tmp.set( keys[i%numKeys], &i );
GAFFERTEST_ASSERT( tmp.context()->get<int>( keys[i%numKeys] ) == i );
GAFFERTEST_ASSERT( tmp.context()->hash() != baseHash );
}
}
// Useful for assessing the performance of substitutions.
void GafferTest::testManySubstitutions()
{
ContextPtr context = new Context();
context->set( "foodType", std::string( "kipper" ) );
context->set( "cookingMethod", std::string( "smoke" ) );
const std::string phrase( "${cookingMethod} me a ${foodType}" );
const std::string expectedResult( "smoke me a kipper" );
Timer t;
for( int i = 0; i < 1000000; ++i )
{
const std::string s = context->substitute( phrase );
GAFFERTEST_ASSERT( s == expectedResult );
}
}
// Useful for assessing the performance of environment variable substitutions.
void GafferTest::testManyEnvironmentSubstitutions()
{
ContextPtr context = new Context();
const std::string phrase( "${GAFFER_ROOT}" );
const std::string expectedResult( getenv( "GAFFER_ROOT") );
Timer t;
for( int i = 0; i < 1000000; ++i )
{
const std::string s = context->substitute( phrase );
GAFFERTEST_ASSERT( s == expectedResult );
}
}
// Tests that scoping a null context is a no-op
void GafferTest::testScopingNullContext()
{
ContextPtr context = new Context();
context->set( "foodType", std::string( "kipper" ) );
context->set( "cookingMethod", std::string( "smoke" ) );
const std::string phrase( "${cookingMethod} me a ${foodType}" );
const std::string expectedResult( "smoke me a kipper" );
{
Context::Scope scope( context.get() );
const std::string s = Context::current()->substitute( phrase );
GAFFERTEST_ASSERT( s == expectedResult );
const Context *nullContext = nullptr;
{
Context::Scope scope( nullContext );
const std::string s = Context::current()->substitute( phrase );
GAFFERTEST_ASSERT( s == expectedResult );
}
}
}
void GafferTest::testEditableScope()
{
testEditableScopeTyped<IECore::IntData>( 10, 20 );
testEditableScopeTyped<IECore::FloatData>( 10.0, 20.0 );
testEditableScopeTyped<IECore::StringData>( std::string( "a" ), std::string( "b" ) );
testEditableScopeTyped<IECore::InternedStringData>( IECore::InternedString( "a" ), IECore::InternedString( "b" ) );
testEditableScopeTyped<IECore::FloatVectorData>( std::vector<float>{ 1, 2, 3, 4 }, std::vector<float>{ 5, 6, 7 } );
testEditableScopeTyped<IECore::StringVectorData>( std::vector<std::string>{ "a", "AA" }, std::vector<std::string>{ "bbbbbbb" } );
testEditableScopeTyped<IECore::InternedStringVectorData>( std::vector<IECore::InternedString>{ "a", "AA" }, std::vector<IECore::InternedString>{ "bbbbbbb" } );
PathMatcher a;
a.addPath( "/a/y" );
a.addPath( "/b/y" );
a.addPath( "/c/y" );
PathMatcher b;
b.addPath( "/a/x" );
b.addPath( "/b/x" );
testEditableScopeTyped<IECore::PathMatcherData>( a, b );
// Test specific calls for dealing with time
Gaffer::ContextPtr baseContext = new Gaffer::Context();
Gaffer::Context::EditableScope scope( baseContext.get() );
const Gaffer::Context *currentContext = Gaffer::Context::current();
scope.setFrame( 5 );
GAFFERTEST_ASSERT( currentContext->getFrame() == 5 );
float framesPerSecond = 8;
scope.setFramesPerSecond( &framesPerSecond );
GAFFERTEST_ASSERT( currentContext->getFramesPerSecond() == 8 );
scope.setTime( 9 );
GAFFERTEST_ASSERT( currentContext->getFrame() == 72 );
scope.setTime( 8.5 );
GAFFERTEST_ASSERT( currentContext->getFrame() == 68 );
}
// Create the number of contexts specified, and return counts for how many collisions there are
// in each of the four 32 bit sections of the context hash. MurmurHash performs good mixing, so
// the four sections should be independent, and as long as collisions within each section occur only
// at the expected rate, the chance of a full collision across all 4 should be infinitesimal
// ( we don't want to check for collisions in the whole 128 bit hash, since it would take years
// for one to occur randomly )
// "mode" switches betwen 4 modes for creating contexts:
// 0 : 1 entry with a single increment int
// 1 : 40 fixed strings, plus a single incrementing int
// 2 : 20 random floats
// 3 : an even mixture of the previous 3 modes
// "seed" can be used to perform different runs to get an average number.
// The goal is that regardless of how we create the contexts, they are all unique, and should therefore
// have an identical chance of collisions if our hashing performs ideally.
std::tuple<int,int,int,int> GafferTest::countContextHash32Collisions( int contexts, int mode, int seed )
{
std::unordered_set<uint32_t> used[4];
InternedString a( "a" );
InternedString numberNames[40];
for( int i = 0; i < 40; i++ )
{
numberNames[i] = InternedString( i );
}
unsigned int rand_seed = seed;
int collisions[4] = {0,0,0,0};
for( int i = 0; i < contexts; i++ )
{
int curMode = mode;
int elementSeed = seed * contexts + i;
if( curMode == 3 )
{
curMode = i % 3;
elementSeed = seed * contexts + i / 3;
}
Context c;
if( curMode == 0 )
{
c.set( a, elementSeed );
}
else if( curMode == 1 )
{
for( int j = 0; j < 40; j++ )
{
c.set( numberNames[j], j );
}
c.set( a, elementSeed );
}
else if( curMode == 2 )
{
for( int j = 0; j < 20; j++ )
{
c.set( numberNames[j], rand_r( &rand_seed ) );
}
}
if( !used[0].insert( (uint32_t)( c.hash().h1() ) ).second )
{
collisions[0]++;
}
if( !used[1].insert( (uint32_t)( c.hash().h1() >> 32 ) ).second )
{
collisions[1]++;
}
if( !used[2].insert( (uint32_t)( c.hash().h2() ) ).second )
{
collisions[2]++;
}
if( !used[3].insert( (uint32_t)( c.hash().h2() >> 32 ) ).second )
{
collisions[3]++;
}
}
return std::make_tuple( collisions[0], collisions[1], collisions[2], collisions[3] );
}
void GafferTest::testContextHashPerformance( int numEntries, int entrySize, bool startInitialized )
{
// We usually deal with contexts that already have some stuff in them, so adding some entries
// to the context makes this test more realistic
ContextPtr baseContext = new Context();
for( int i = 0; i < numEntries; i++ )
{
baseContext->set( InternedString( i ), std::string( entrySize, 'x') );
}
const InternedString varyingVarName = "varyVar";
if( startInitialized )
{
baseContext->set( varyingVarName, -1 );
}
Context::Scope baseScope( baseContext.get() );
const ThreadState &threadState = ThreadState::current();
tbb::parallel_for( tbb::blocked_range<int>( 0, 10000000 ), [&threadState, &varyingVarName]( const tbb::blocked_range<int> &r )
{
for( int i = r.begin(); i != r.end(); ++i )
{
Context::EditableScope scope( threadState );
scope.set( varyingVarName, &i );
// This call is relied on by ValuePlug's HashCacheKey, so it is crucial that it be fast
scope.context()->hash();
}
}
);
}
void GafferTest::testContextCopyPerformance( int numEntries, int entrySize )
{
// We usually deal with contexts that already have some stuff in them, so adding some entries
// to the context makes this test more realistic
ContextPtr baseContext = new Context();
for( int i = 0; i < numEntries; i++ )
{
baseContext->set( InternedString( i ), std::string( entrySize, 'x') );
}
tbb::parallel_for(
tbb::blocked_range<int>( 0, 1000000 ),
[&baseContext]( const tbb::blocked_range<int> &r )
{
for( int i = r.begin(); i != r.end(); ++i )
{
ContextPtr copy = new Context( *baseContext );
}
}
);
}
void GafferTest::testCopyEditableScope()
{
ContextPtr copy;
{
ContextPtr context = new Context();
context->set( "a", 1 );
context->set( "b", 2 );
context->set( "c", 3 );
int ten = 10;
string cat = "cat";
Context::EditableScope scope( context.get() );
scope.set( "a", &ten );
scope.setAllocated( "b", 20 );
scope.set( "d", &ten );
scope.setAllocated( "e", 40 );
scope.set( "f", &cat );
copy = new Context( *scope.context() );
}
// Both the original context and the EditableScope have
// been destructed, but a deep copy should have been taken
// to preserve all values.
GAFFERTEST_ASSERTEQUAL( copy->get<int>( "a" ), 10 );
GAFFERTEST_ASSERTEQUAL( copy->get<int>( "b" ), 20 );
GAFFERTEST_ASSERTEQUAL( copy->get<int>( "c" ), 3 );
GAFFERTEST_ASSERTEQUAL( copy->get<int>( "d" ), 10 );
GAFFERTEST_ASSERTEQUAL( copy->get<int>( "e" ), 40 );
GAFFERTEST_ASSERTEQUAL( copy->get<string>( "f" ), "cat" );
// A second copy should be fairly cheap, just referencing
// the same data.
ContextPtr copy2 = new Context( *copy );
GAFFERTEST_ASSERTEQUAL( ©->get<int>( "a" ), ©2->get<int>( "a" ) );
GAFFERTEST_ASSERTEQUAL( ©->get<int>( "b" ), ©2->get<int>( "b" ) );
GAFFERTEST_ASSERTEQUAL( ©->get<int>( "c" ), ©2->get<int>( "c" ) );
GAFFERTEST_ASSERTEQUAL( ©->get<int>( "d" ), ©2->get<int>( "d" ) );
GAFFERTEST_ASSERTEQUAL( ©->get<int>( "e" ), ©2->get<int>( "e" ) );
GAFFERTEST_ASSERTEQUAL( ©->get<string>( "f" ), ©2->get<string>( "f" ) );
// And the second copy should still be valid if the first
// one is destroyed.
copy = nullptr;
GAFFERTEST_ASSERTEQUAL( copy2->get<int>( "a" ), 10 );
GAFFERTEST_ASSERTEQUAL( copy2->get<int>( "b" ), 20 );
GAFFERTEST_ASSERTEQUAL( copy2->get<int>( "c" ), 3 );
GAFFERTEST_ASSERTEQUAL( copy2->get<int>( "d" ), 10 );
GAFFERTEST_ASSERTEQUAL( copy2->get<int>( "e" ), 40 );
GAFFERTEST_ASSERTEQUAL( copy2->get<string>( "f" ), "cat" );
}
void GafferTest::testContextHashValidation()
{
ContextPtr context = new Context();
Context::EditableScope scope( context.get() );
// If we modify a value behind the back of
// the EditableScope, we want that to be detected
// in the next call to `get()`.
int value = 0;
scope.set( "value", &value );
value = 1; // Naughty!
std::string error = "";
try
{
scope.context()->get<int>( "value" );
}
catch( const std::exception &e )
{
error = e.what();
}
GAFFERTEST_ASSERTEQUAL( error, "Context variable \"value\" has an invalid hash" );
}
| 32.66005 | 160 | 0.66806 | [
"vector"
] |
778d4504c84253f1d91e8233789034c291846b21 | 2,626 | hpp | C++ | src/EventSystem/Event.hpp | pjlapinski/ConcreteEngine | 09265563f3cc49b5f8de5337a9f7fa27e35ddb02 | [
"MIT"
] | null | null | null | src/EventSystem/Event.hpp | pjlapinski/ConcreteEngine | 09265563f3cc49b5f8de5337a9f7fa27e35ddb02 | [
"MIT"
] | null | null | null | src/EventSystem/Event.hpp | pjlapinski/ConcreteEngine | 09265563f3cc49b5f8de5337a9f7fa27e35ddb02 | [
"MIT"
] | null | null | null | #include <algorithm>
#include <functional>
#include <memory>
#include <vector>
#pragma once
namespace ConcreteEngine::EventSystem {
/** An event that aggregates callbacks and allows them to be fired all at once */
template <typename... Ts>
class Event {
using CallbackPointer = std::shared_ptr<std::function<void(Ts...)>>;
std::vector<CallbackPointer> m_Callbacks;
public:
/**
* Adds a function to the list of this event's callbacks
*
* @param callback reference to a function
* @return std::shared_ptr to the callback
*/
CallbackPointer Subscribe(const std::function<void(Ts...)>& callback) {
m_Callbacks.push_back(std::make_shared<std::function<void(Ts...)>>(callback));
return m_Callbacks.back();
}
/**
* Parametrized version that takes the calee's class as the template's
* parameter. Adds a method to the list of this event's callbacks. Example
* use: event.subscribe<Class>(instance, &Class::method)
*
* @param obj reference to a class instance
* @param callback reference to a method
* @return std::shared_ptr to the callback
*/
template <class Cls>
CallbackPointer Subscribe(const Cls& obj,
const std::function<void(Cls, Ts...)>& callback) {
m_Callbacks.push_back(std::make_shared<std::function<void(Ts...)>>(
[callback, obj](Ts... args) { callback(obj, args...); }));
return m_Callbacks.back();
}
/**
* Removes a callback from this event's list of callbacks
*
* @param callback the std::shared_ptr returned by any of the subscribe
* methods
*/
void Unsubscribe(const CallbackPointer& callback) {
auto pred = [callback](CallbackPointer cb) {
return cb == callback;
};
m_Callbacks.erase(
std::remove_if(m_Callbacks.begin(), m_Callbacks.end(), pred),
m_Callbacks.end());
}
/**
* Calls all subscribed callbacks
*
* @param args variable amount of arguments, each passed into all subscribed
* callbacks
*/
void Fire(Ts... args) const {
for (int i = 0; i < m_Callbacks.size(); i++) {
(*(m_Callbacks[i]))(args...);
}
}
/** Clears all callbacks from this event */
void Clear() {
m_Callbacks.clear();
}
};
using Action = Event<>;
}
| 33.240506 | 90 | 0.559025 | [
"vector"
] |
779465417c9fa2d6919e9028301d5cf005b72e8e | 3,814 | hpp | C++ | include/detail/Field.hpp | GPMueller/mwe-expression-template | 05c6edec252c7aca29707321f96ecc0a57100275 | [
"MIT"
] | 1 | 2017-12-24T13:36:23.000Z | 2017-12-24T13:36:23.000Z | include/detail/Field.hpp | GPMueller/mwe-expression-template | 05c6edec252c7aca29707321f96ecc0a57100275 | [
"MIT"
] | null | null | null | include/detail/Field.hpp | GPMueller/mwe-expression-template | 05c6edec252c7aca29707321f96ecc0a57100275 | [
"MIT"
] | null | null | null | #pragma once
#include <cassert>
#include <vector>
#include <detail/Typedefs.hpp>
namespace FieldMath::detail
{
template<typename T, typename Container = std::vector<T>>
class Field
{
Container _container;
public:
// Field with initial size
Field(const std::size_t n) : _container(n){}
// Field with initial size and value
Field(const std::size_t n, const T initialValue) : _container(n, initialValue){}
// Constructor for underlying container
Field(const Container& other) : _container(other){}
// Assignment operator for Field of different type
template<typename T2, typename R2>
Field& operator= (const Field<T2, R2>& other)
{
assert(size() == other.size());
for (std::size_t i = 0; i < _container.size(); ++i)
_container[i] = other[i];
return *this;
}
// A Field can be constructed such as to force its evaluation.
template <typename T2, typename R2>
Field(Field<T2, R2> const& field) : _container(field.size())
{
for (size_t i = 0; i != field.size(); ++i)
{
_container[i] = field[i];
}
}
// Size of underlying container
std::size_t size() const { return _container.size(); }
// Index operators
T operator[](const std::size_t i) const { return _container[i]; }
T& operator[](const std::size_t i) { return _container[i]; }
// Returns the underlying data
const Container& data() const { return _container; }
Container& data() { return _container; }
template <typename R2>
Field<scalar> dot(const Field<Vector3,R2> & field)
{
static_assert(std::is_same_v<T, Vector3>, "Field<...>.dot(...) is only available on Field<Vector3>");
// TODO: move this into a new expression
assert(size() == field.size());
Field<scalar> ret(size());
for (size_t i = 0; i != size(); ++i)
{
ret[i] = _container[i].dot(field[i]);
}
return ret;
}
template <typename R2>
Field<scalar> dot(const Vector3 & vec)
{
static_assert(std::is_same_v<T, Vector3>, "Field<...>.dot(...) is only available on Field<Vector3>");
// TODO: move this into a new expression
Field<scalar> ret(size());
for (size_t i = 0; i != size(); ++i)
{
ret[i] = _container[i].dot(vec);
}
return ret;
}
template <typename R2>
Field<Vector3> cross(const Field<Vector3,R2> & field)
{
static_assert(std::is_same_v<T, Vector3>, "Field<...>.cross(...) is only available on Field<Vector3>");
// TODO: move this into a new expression
assert(size() == field.size());
Field<Vector3> ret(size());
for (size_t i = 0; i != size(); ++i)
{
ret[i] = _container[i].cross(field[i]);
}
return ret;
}
template <typename R2>
Field<Vector3> cross(const Vector3 & vec)
{
static_assert(std::is_same_v<T, Vector3>, "Field<...>.cross(...) is only available on Field<Vector3>");
// TODO: move this into a new expression
Field<Vector3> ret(size());
for (size_t i = 0; i != size(); ++i)
{
ret[i] = _container[i].cross(vec);
}
return ret;
}
};
}
#include <detail/FieldExpression.hpp> | 33.752212 | 115 | 0.504457 | [
"vector"
] |
77970b23d8316f4cad9f04bd2e934e6e058e9f69 | 11,685 | cpp | C++ | XivAlexanderCommon/Sqex_Sqpack_Reader.cpp | ddc/XivAlexander | 8371d70e42c64cd082d90fc1ca102b687c9d3899 | [
"Apache-2.0"
] | null | null | null | XivAlexanderCommon/Sqex_Sqpack_Reader.cpp | ddc/XivAlexander | 8371d70e42c64cd082d90fc1ca102b687c9d3899 | [
"Apache-2.0"
] | null | null | null | XivAlexanderCommon/Sqex_Sqpack_Reader.cpp | ddc/XivAlexander | 8371d70e42c64cd082d90fc1ca102b687c9d3899 | [
"Apache-2.0"
] | null | null | null | #include "pch.h"
#include "Sqex_Sqpack_Reader.h"
Sqex::Sqpack::Reader::SqDataEntry::SqDataEntry(const SqIndex::FileSegmentEntry& entry)
: Index(entry)
, Offset(entry.Locator.Offset())
, DataFileIndex(entry.Locator.Index()) {
}
Sqex::Sqpack::Reader::SqDataEntry::SqDataEntry(const SqIndex::FileSegmentEntry2& entry)
: Index2(entry)
, Offset(entry.Locator.Offset())
, DataFileIndex(entry.Locator.Index()) {
}
Sqex::Sqpack::Reader::SqIndexType::SqIndexType(const Win32::File& hFile, bool strictVerify) {
std::vector<std::pair<size_t, size_t>> accesses;
hFile.Read(0, &Header, sizeof SqpackHeader);
if (strictVerify) {
accesses.emplace_back(0, Header.HeaderSize);
Header.VerifySqpackHeader(SqpackType::SqIndex);
}
hFile.Read(Header.HeaderSize, &IndexHeader, sizeof SqIndex::Header);
if (strictVerify) {
accesses.emplace_back(Header.HeaderSize, IndexHeader.HeaderSize);
IndexHeader.VerifySqpackIndexHeader(SqIndex::Header::IndexType::Index);
}
DataFileSegment.resize(IndexHeader.DataFilesSegment.Size);
hFile.Read(IndexHeader.DataFilesSegment.Offset, std::span(DataFileSegment));
if (strictVerify) {
accesses.emplace_back(IndexHeader.DataFilesSegment.Offset, IndexHeader.DataFilesSegment.Size);
IndexHeader.DataFilesSegment.Sha1.Verify(std::span(DataFileSegment), "DataFilesSegment Data SHA-1");
IndexHeader.VerifyDataFileSegment(DataFileSegment, 1);
}
Segment3.resize(IndexHeader.UnknownSegment3.Size / sizeof(SqIndex::Segment3Entry));
hFile.Read(IndexHeader.UnknownSegment3.Offset, std::span(Segment3));
if (strictVerify) {
accesses.emplace_back(IndexHeader.UnknownSegment3.Offset, IndexHeader.UnknownSegment3.Size);
IndexHeader.UnknownSegment3.Sha1.Verify(std::span(Segment3), "UnknownSegment3 Data SHA-1");
}
Folders.resize(IndexHeader.FolderSegment.Size / sizeof(SqIndex::FolderSegmentEntry));
hFile.Read(IndexHeader.FolderSegment.Offset, std::span(Folders));
if (strictVerify) {
accesses.emplace_back(IndexHeader.FolderSegment.Offset, IndexHeader.FolderSegment.Size);
IndexHeader.FolderSegment.Sha1.Verify(std::span(Folders), "FolderSegment Data SHA-1");
}
{
uint32_t lastEnd = IndexHeader.FileSegment.Offset;
for (const auto& folder : Folders) {
if (strictVerify)
folder.Verify();
auto& filesInFolder = Files[folder.NameHash];
filesInFolder.resize(folder.FileSegmentSize / sizeof(SqIndex::FileSegmentEntry));
hFile.Read(folder.FileSegmentOffset, std::span(filesInFolder));
if (folder.FileSegmentOffset >= IndexHeader.FileSegment.Offset &&
folder.FileSegmentOffset < IndexHeader.FileSegment.Offset + IndexHeader.FileSegment.Size) {
if (strictVerify) {
accesses.emplace_back(folder.FileSegmentOffset, folder.FileSegmentSize);
if (lastEnd != folder.FileSegmentOffset)
throw CorruptDataException("last directory listing end != new directory listing start");
for (const auto& file : filesInFolder)
if (file.PathHash != folder.NameHash)
throw CorruptDataException("file path hash != folder name hash");
}
lastEnd += folder.FileSegmentSize;
} else if (folder.FileSegmentOffset >= IndexHeader.DataFilesSegment.Offset &&
folder.FileSegmentOffset < IndexHeader.DataFilesSegment.Offset + IndexHeader.DataFilesSegment.Size) {
Files.erase(folder.NameHash);
// ignore for now
} else if (folder.FileSegmentOffset >= IndexHeader.UnknownSegment3.Offset &&
folder.FileSegmentOffset < IndexHeader.UnknownSegment3.Offset + IndexHeader.UnknownSegment3.Size) {
Files.erase(folder.NameHash);
// ignore for now
}
}
if (strictVerify) {
if (lastEnd != IndexHeader.FileSegment.Offset + IndexHeader.FileSegment.Size)
throw CorruptDataException("last directory listing end != end of file segment");
char result[20];
CryptoPP::SHA1 sha1;
for (const auto& files : Files | std::views::values)
sha1.Update(reinterpret_cast<const byte*>(&files[0]), std::span(files).size_bytes());
sha1.Final(reinterpret_cast<byte*>(result));
if (IndexHeader.FileSegment.Sha1 != result) {
if (IndexHeader.FileSegment.Size == 0 && IndexHeader.FileSegment.Sha1.IsZero()) {
// pass
} else
throw CorruptDataException("FileSegment Data SHA-1");
}
}
}
if (strictVerify) {
std::sort(accesses.begin(), accesses.end());
auto ptr = accesses[0].first;
for (const auto& [accessPointer, accessSize] : accesses) {
if (ptr > accessPointer)
throw CorruptDataException("Unread region found");
else if (ptr < accessPointer)
throw CorruptDataException("Overlapping region found");
ptr += accessSize;
}
if (ptr != hFile.GetLength())
throw CorruptDataException("Trailing region found");
}
}
Sqex::Sqpack::Reader::SqIndex2Type::SqIndex2Type(const Win32::File& hFile, bool strictVerify) {
std::vector<std::pair<size_t, size_t>> accesses;
hFile.Read(0, &Header, sizeof SqpackHeader);
if (strictVerify) {
accesses.emplace_back(0, Header.HeaderSize);
Header.VerifySqpackHeader(SqpackType::SqIndex);
}
hFile.Read(Header.HeaderSize, &IndexHeader, sizeof SqIndex::Header);
accesses.emplace_back(Header.HeaderSize, IndexHeader.HeaderSize);
if (strictVerify)
IndexHeader.VerifySqpackIndexHeader(SqIndex::Header::IndexType::Index2);
DataFileSegment.resize(IndexHeader.DataFilesSegment.Size);
hFile.Read(IndexHeader.DataFilesSegment.Offset, std::span(DataFileSegment));
if (strictVerify) {
accesses.emplace_back(IndexHeader.DataFilesSegment.Offset, IndexHeader.DataFilesSegment.Size);
IndexHeader.DataFilesSegment.Sha1.Verify(std::span(DataFileSegment), "DataFilesSegment Data SHA-1");
IndexHeader.VerifyDataFileSegment(DataFileSegment, 2);
}
Segment3.resize(IndexHeader.UnknownSegment3.Size / sizeof(SqIndex::Segment3Entry));
hFile.Read(IndexHeader.UnknownSegment3.Offset, std::span(Segment3));
if (strictVerify) {
accesses.emplace_back(IndexHeader.UnknownSegment3.Offset, IndexHeader.UnknownSegment3.Size);
IndexHeader.UnknownSegment3.Sha1.Verify(std::span(Segment3), "UnknownSegment3 Data SHA-1");
}
Folders.resize(IndexHeader.FolderSegment.Size / sizeof(SqIndex::FolderSegmentEntry));
hFile.Read(IndexHeader.FolderSegment.Offset, std::span(Folders));
if (strictVerify) {
accesses.emplace_back(IndexHeader.FolderSegment.Offset, IndexHeader.FolderSegment.Size);
IndexHeader.FolderSegment.Sha1.Verify(std::span(Folders), "FolderSegment Data SHA-1");
}
Files.resize(IndexHeader.FileSegment.Size / sizeof(SqIndex::FileSegmentEntry2));
hFile.Read(IndexHeader.FileSegment.Offset, std::span(Files));
if (strictVerify) {
accesses.emplace_back(IndexHeader.FileSegment.Offset, IndexHeader.FileSegment.Size);
IndexHeader.FileSegment.Sha1.Verify(std::span(Files), "FolderSegment Data SHA-1");
}
if (strictVerify) {
std::sort(accesses.begin(), accesses.end());
auto ptr = accesses[0].first;
for (const auto& [accessPointer, accessSize] : accesses) {
if (ptr > accessPointer)
throw CorruptDataException("Unread region found");
else if (ptr < accessPointer)
throw CorruptDataException("Overlapping region found");
ptr += accessSize;
}
if (ptr != hFile.GetLength())
throw CorruptDataException("Trailing region found");
}
}
Sqex::Sqpack::Reader::SqDataType::SqDataType(Win32::File hFile, const uint32_t datIndex, std::vector<SqDataEntry>& dataEntries, bool strictVerify)
: FileOnDisk(std::move(hFile)) {
std::vector<std::pair<size_t, size_t>> accesses;
FileOnDisk.Read(0, &Header, sizeof SqpackHeader);
if (strictVerify) {
if (datIndex == 0)
Header.VerifySqpackHeader(SqpackType::SqData);
accesses.emplace_back(0, sizeof SqpackHeader);
}
FileOnDisk.Read(sizeof SqpackHeader, &DataHeader, sizeof SqData::Header);
if (strictVerify) {
if (datIndex == 0)
DataHeader.Verify(datIndex + 1);
accesses.emplace_back(sizeof SqpackHeader, sizeof SqData::Header);
}
const auto dataFileLength = FileOnDisk.GetLength();
if (strictVerify) {
if (datIndex == 0) {
if (dataFileLength != 0ULL + Header.HeaderSize + DataHeader.HeaderSize + DataHeader.DataSize)
throw CorruptDataException("Invalid file size");
}
}
std::map<uint64_t, SqDataEntry*> offsetToEntryMap;
for (auto& file : dataEntries) {
if (file.Index.Locator.Index() != datIndex)
continue;
offsetToEntryMap.insert_or_assign(file.Index.Locator.Offset(), &file);
}
SqDataEntry* prevEntry = nullptr;
for (const auto& [begin, entry] : offsetToEntryMap) {
if (prevEntry)
prevEntry->Size = static_cast<uint32_t>(begin - prevEntry->Index.Locator.Offset());
prevEntry = entry;
}
if (prevEntry)
prevEntry->Size = static_cast<uint32_t>(dataFileLength - prevEntry->Index.Locator.Offset());
}
Sqex::Sqpack::Reader::Reader(const std::filesystem::path& indexFile, bool strictVerify, bool sort)
: Index(Win32::File::Create(std::filesystem::path(indexFile).replace_extension(".index"), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN), strictVerify)
, Index2(Win32::File::Create(std::filesystem::path(indexFile).replace_extension(".index2"), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN), strictVerify)
, Sorted(sort) {
if (sort) {
for (auto& filesInFolder : Index.Files | std::views::values) {
std::sort(filesInFolder.begin(), filesInFolder.end(), [](const SqIndex::FileSegmentEntry& l, const SqIndex::FileSegmentEntry& r) {
if (l.PathHash == r.PathHash)
return l.NameHash < r.NameHash;
else
return l.PathHash < r.PathHash;
});
}
std::sort(Index2.Files.begin(), Index2.Files.end(), [](const SqIndex::FileSegmentEntry2& l, const SqIndex::FileSegmentEntry2& r) {
return l.FullPathHash < r.FullPathHash;
});
}
std::map<uint64_t, SqDataEntry*> offsetToEntryMap;
Files.reserve(Index2.Files.size());
for (const auto& entry : Index2.Files) {
Files.emplace_back(entry);
offsetToEntryMap[entry.Locator] = &Files.back();
}
std::vector<SqIndex::FileSegmentEntry*> newEntries;
for (auto& files : Index.Files | std::views::values) {
for (auto& entry : files) {
const auto ptr = offsetToEntryMap[entry.Locator];
if (!ptr)
newEntries.push_back(&entry);
else
ptr->Index = entry;
}
}
for (const auto entry : newEntries)
Files.emplace_back(*entry);
Data.reserve(Index.IndexHeader.DataFilesSegment.Count);
for (uint32_t i = 0; i < Index.IndexHeader.DataFilesSegment.Count; ++i) {
Data.emplace_back(SqDataType{
Win32::File::Create(std::filesystem::path(indexFile).replace_extension(std::format(".dat{}", i)), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0),
i,
Files,
strictVerify,
});
}
}
std::shared_ptr<Sqex::Sqpack::EntryProvider> Sqex::Sqpack::Reader::GetEntryProvider(const EntryPathSpec& pathSpec, Win32::File handle) const {
if (pathSpec.HasComponentHash()) {
for (const auto& entry : Files) {
if (entry.Index.PathHash == pathSpec.PathHash && entry.Index.NameHash == pathSpec.NameHash)
return GetEntryProvider(entry, std::move(handle));
}
}
if (pathSpec.HasFullPathHash()) {
for (const auto& entry : Files) {
if (entry.Index2.FullPathHash == pathSpec.FullPathHash)
return GetEntryProvider(entry, std::move(handle));
}
}
throw EntryNotFoundError(std::format("Entry {} not found", pathSpec));
}
std::shared_ptr<Sqex::Sqpack::EntryProvider> Sqex::Sqpack::Reader::GetEntryProvider(const SqDataEntry& entry, Win32::File handle) const {
if (!handle)
handle = { Data[entry.DataFileIndex].FileOnDisk, false };
return std::make_shared<RandomAccessStreamAsEntryProviderView>(
EntryPathSpec(entry.Index.PathHash, entry.Index.NameHash, entry.Index2.FullPathHash),
std::make_shared<FileRandomAccessStream>(std::move(handle), entry.Offset, entry.Size));
}
| 39.610169 | 189 | 0.743945 | [
"vector"
] |
779a9cd09cae6f66acecde74983fffb0abc21470 | 5,914 | cpp | C++ | rdf3x/src/rts/Scheduler.cpp | dkw-aau/trident-clone | 18f896db2be05870069ae7b3aa6b4837c74fff0f | [
"Apache-2.0"
] | 40 | 2015-02-17T03:27:19.000Z | 2022-03-24T15:17:38.000Z | rdf3x/src/rts/Scheduler.cpp | dkw-aau/trident-clone | 18f896db2be05870069ae7b3aa6b4837c74fff0f | [
"Apache-2.0"
] | 5 | 2020-07-06T22:50:04.000Z | 2022-03-17T10:34:15.000Z | rdf3x/src/rts/Scheduler.cpp | dkw-aau/trident-clone | 18f896db2be05870069ae7b3aa6b4837c74fff0f | [
"Apache-2.0"
] | 15 | 2015-01-15T20:39:48.000Z | 2020-11-11T03:07:11.000Z | #include "rts/operator/Scheduler.hpp"
#include "rts/operator/Operator.hpp"
#include "infra/osdep/Thread.hpp"
#include <cstdlib>
//---------------------------------------------------------------------------
using namespace std;
//---------------------------------------------------------------------------
Scheduler::AsyncPoint::~AsyncPoint()
// Destructor
{
}
//---------------------------------------------------------------------------
Scheduler::RegisteredPoint::RegisteredPoint(AsyncPoint& point,unsigned schedulingClass,double priority)
: point(point),schedulingClass(schedulingClass),priority(priority)
// Constructor
{
}
//---------------------------------------------------------------------------
Scheduler::Scheduler()
: activeWorkers(0),workerThreads(0),workersDie(false)
// Constructor
{
// How many threads should we use?
threads=0;
if (getenv("MAXTHREADS"))
threads=atoi(getenv("MAXTHREADS"));
if ((threads<2)||(threads>1000))
threads=0;
// Start worker threads
if (threads) {
workerLock.lock();
for (unsigned index=0;index<threads;index++)
Thread::start(asyncWorker,this);
workerLock.unlock();
}
}
//---------------------------------------------------------------------------
Scheduler::~Scheduler()
// Destructor
{
// Wait for all workers to stop
if (threads) {
workerLock.lock();
workersDie=true;
workerSignal.notifyAll(workerLock);
while (workerThreads)
workerSignal.wait(workerLock);
workerLock.unlock();
}
// Cleanup registered execution points
for (vector<RegisteredPoint*>::const_iterator iter=registeredPoints.begin(),limit=registeredPoints.end();iter!=limit;++iter)
delete *iter;
registeredPoints.clear();
}
//---------------------------------------------------------------------------
void Scheduler::registerAsyncPoint(AsyncPoint& point,unsigned schedulingClass,double priority,unsigned dependencies)
// Register an async execution point
{
RegisteredPoint* p=new RegisteredPoint(point,schedulingClass,priority);
for (unsigned index=dependencies;index<registeredPoints.size();index++)
p->dependencies.insert(registeredPoints[index]);
registeredPoints.push_back(p);
}
//---------------------------------------------------------------------------
void Scheduler::executeSingleThreaded(Operator* root)
// Execute a plan single threaded
{
if (root->first()) {
while (root->next()) ;
}
}
//---------------------------------------------------------------------------
void Scheduler::performWork()
// Perform the work of a worker thread
{
// Register as worker
workerLock.lock();
workerThreads++;
// Perform the work
while (!workersDie) {
// Nothing to do?
if (workQueue.empty()) {
workerSignal.wait(workerLock);
continue;
}
// Grab the next job
RegisteredPoint* job=workQueue.front();
workQueue.erase(workQueue.begin());
workerSignal.notifyAll(workerLock);
// Run the job
activeWorkers++;
workerLock.unlock();
job->point.run();
workerLock.lock();
activeWorkers--;
// Eliminate it as done
for (vector<RegisteredPoint*>::iterator iter=registeredPoints.begin(),limit=registeredPoints.end();iter!=limit;++iter)
(*iter)->dependencies.erase(job);
delete job;
workerSignal.notifyAll(workerLock);
}
// Deregister
workerThreads--;
workerSignal.notifyAll(workerLock);
workerLock.unlock();
}
//---------------------------------------------------------------------------
void Scheduler::asyncWorker(void* info)
// Thread entry point
{
static_cast<Scheduler*>(info)->performWork();
}
//---------------------------------------------------------------------------
void Scheduler::execute(Operator* root)
// Execute a plan using, using potentially multiple threads
{
// Run single threaded?
if (!threads) {
executeSingleThreaded(root);
return;
}
// Collect all asynchronous execution points
for (vector<RegisteredPoint*>::const_iterator iter=registeredPoints.begin(),limit=registeredPoints.end();iter!=limit;++iter)
delete *iter;
registeredPoints.clear();
root->getAsyncInputCandidates(*this);
// Execute all asynchronous execution points
while (!registeredPoints.empty()) {
// Is the worker queue full?
if ((workQueue.size()+activeWorkers)>=threads) {
workerSignal.wait(workerLock);
continue;
}
// Search for the best candidate the schedule next
RegisteredPoint* best=0;
vector<RegisteredPoint*>::iterator bestPos=registeredPoints.begin();
for (vector<RegisteredPoint*>::iterator iter=registeredPoints.begin(),limit=registeredPoints.end();iter!=limit;++iter) {
RegisteredPoint* p=*iter;
if (p->dependencies.empty()) {
if ((!best)||(best->schedulingClass>p->schedulingClass)||
((best->schedulingClass==p->schedulingClass)&&(best->priority<p->priority))) {
best=p;
bestPos=iter;
}
}
}
// No candidate found?
if (!best) {
// Still work?
if (activeWorkers||workQueue.size()) {
workerSignal.wait(workerLock);
continue;
}
// No, cyclic dependency!
throw;
}
// Add the task
workQueue.push_back(best);
swap(*bestPos,registeredPoints.back());
registeredPoints.pop_back();
workerSignal.notifyAll(workerLock);
}
while (!workQueue.empty())
workerSignal.wait(workerLock);
while (activeWorkers)
workerSignal.wait(workerLock);
workerLock.unlock();
// Now run the main parts if any
if (root->first()) {
while (root->next()) ;
}
}
//---------------------------------------------------------------------------
| 32.31694 | 127 | 0.55766 | [
"vector"
] |
77a3fadc7279b80878edf1012cfa735d77b4f4fc | 2,150 | cpp | C++ | src/ip_to_binary.cpp | davidchall/ipaddress | 3a2a84e245eaf73aadfe0bf3692af27a622bc220 | [
"MIT"
] | 23 | 2020-03-06T01:26:49.000Z | 2022-03-17T11:09:58.000Z | src/ip_to_binary.cpp | davidchall/ipaddress | 3a2a84e245eaf73aadfe0bf3692af27a622bc220 | [
"MIT"
] | 41 | 2020-02-09T18:34:09.000Z | 2022-01-14T05:18:07.000Z | src/ip_to_binary.cpp | davidchall/ipaddress | 3a2a84e245eaf73aadfe0bf3692af27a622bc220 | [
"MIT"
] | 2 | 2020-03-12T14:45:37.000Z | 2020-04-08T12:43:11.000Z | #include <Rcpp.h>
#include <bitset>
#include <ipaddress.h>
#include "warn.h"
using namespace Rcpp;
using namespace ipaddress;
std::string encode_binary(const IpAddress &input) {
std::string output;
output.reserve(input.n_bits());
for (auto it = input.begin(); it != input.end(); ++it) {
std::bitset<8> bits(*it);
output += bits.to_string();
}
return output;
}
IpAddress decode_binary(const std::string &input, bool is_ipv6) {
IpAddress output = is_ipv6 ? IpAddress::make_ipv6() : IpAddress::make_ipv4();
unsigned int pos_char = 0;
for (auto it = output.begin(); it != output.end(); ++it, pos_char += 8) {
std::bitset<8> bits(input.substr(pos_char, 8));
*it = bits.to_ulong();
}
return output;
}
// [[Rcpp::export]]
List wrap_decode_binary(CharacterVector input) {
// initialize vectors
std::size_t vsize = input.size();
std::vector<IpAddress> output(vsize);
for (std::size_t i=0; i<vsize; ++i) {
if (i % 10000 == 0) {
checkUserInterrupt();
}
if (input[i] == NA_STRING) {
output[i] = IpAddress::make_na();
continue;
}
std::string bit_string(input[i]);
if (bit_string.find_first_not_of("01") != std::string::npos) {
output[i] = IpAddress::make_na();
warnOnRow(i, bit_string, "contains non-binary characters");
} else if (bit_string.size() == 128) {
output[i] = decode_binary(bit_string, true);
} else if (bit_string.size() == 32) {
output[i] = decode_binary(bit_string, false);
} else {
output[i] = IpAddress::make_na();
warnOnRow(i, bit_string, "incorrect number of bits");
}
}
return encode_addresses(output);
}
// [[Rcpp::export]]
CharacterVector wrap_encode_binary(List address_r) {
std::vector<IpAddress> address = decode_addresses(address_r);
// initialize vectors
std::size_t vsize = address.size();
CharacterVector output(vsize);
for (std::size_t i=0; i<vsize; ++i) {
if (i % 10000 == 0) {
checkUserInterrupt();
}
if (address[i].is_na()) {
output[i] = NA_STRING;
} else {
output[i] = encode_binary(address[i]);
}
}
return output;
}
| 24.157303 | 79 | 0.626977 | [
"vector"
] |
77a717e1e3504f4c3ffbcfe8b4c8a257cff369ad | 13,735 | cpp | C++ | tools/mayaexp/meskin.cpp | Caprica666/vixen | b71e9415bbfa5f080aee30a831e3b0c8f70fcc7d | [
"BSD-2-Clause"
] | 1 | 2019-02-13T15:39:56.000Z | 2019-02-13T15:39:56.000Z | tools/mayaexp/meskin.cpp | Caprica666/vixen | b71e9415bbfa5f080aee30a831e3b0c8f70fcc7d | [
"BSD-2-Clause"
] | null | null | null | tools/mayaexp/meskin.cpp | Caprica666/vixen | b71e9415bbfa5f080aee30a831e3b0c8f70fcc7d | [
"BSD-2-Clause"
] | 2 | 2017-11-09T12:06:41.000Z | 2019-02-13T15:40:02.000Z | #include "vix_all.h"
#include <maya/MFnAttribute.h>
#include <maya/MFnDagNode.h>
#include <maya/MAnimUtil.h>
#include <maya/MFnWeightGeometryFilter.h>
#include <maya/MFnGeometryFilter.h>
#include <maya/MFnSkinCluster.h>
#include <maya/MFnBlendShapeDeformer.h>
#include <maya/MItSelectionList.h>
#include <maya/MFnSingleIndexedComponent.h>
#include <maya/MItGeometry.h>
/*!
* @fn SharedObj* meConvSkin::Make()
*
* Creates a Vixen Skin engine from the Maya node.
* The Vixen engine is empty upon return from this routine.
*
* @return Skin engine created for the Maya node, NULL if Maya node cannot be converted
*
* @see meConvEng::Convert
*/
SharedObj* meConvSkin::Make()
{
Skin* vxskin = new Skin();
Core::String name(GetMayaName());
m_VXObj = vxskin;
m_OutMesh = NULL;
name += ".skin";
SetName(vxskin, name);
Exporter->SimRoot->Append(vxskin);
if (m_MayaObj.hasFn(MFn::kGeometryFilt))
{
MFnGeometryFilter geo(m_MayaObj);
MObjectArray inputs;
geo.getInputGeometry(inputs);
for (uint32 i = 0; i < inputs.length(); ++i)
{
MFnDependencyNode node(inputs[i]);
meLog(3, "\tinput %d <- %s", i, node.name().asChar());
}
}
return vxskin;
}
int meConvSkin::Link(meConvObj* convparent)
{
MFnSkinCluster skincluster(m_MayaObj);
MObjectArray output;
Skin* skin = (Skin*) GetVXObj();
VX_ASSERT(skin && skin->IsClass(VX_Skin));
if (skincluster.getOutputGeometry(output))
{
for (uint32 i = 0; i < output.length(); ++i)
{
MObject obj(output[i]);
MFnDagNode dagnode(obj, &m_Status);
ConvRef cvref = Exporter->MayaObjects[obj];
meConvObj* conv = cvref;
meConvPoly* pconv;
MDagPath dagpath;
if (!m_Status)
continue;
dagnode.getPath(dagpath);
cvref = Exporter->MayaNodes[dagpath];
conv = cvref;
if (conv == NULL)
continue;
pconv = dynamic_cast<meConvPoly*>( conv );
if (pconv)
{
meConvDeform* dconv = pconv->FindDeformer();
LinkTarget(pconv);
m_OutMesh = pconv;
if (dconv)
{
if (dconv->DoLink)
dconv->Link(this);
dconv->LinkTarget(this);
}
}
}
}
return meConvEng::Link(convparent);
}
SharedObj* meConvSkin::LinkTarget(meConvObj* conv)
{
meConvPoly* mconv = dynamic_cast<meConvPoly*>( conv );
Skin* skin = (Skin*) GetVXObj();
if ((mconv == NULL) || !meConvEng::LinkTarget(mconv))
return NULL;
VX_ASSERT(skin && skin->IsClass(VX_Skin));
meLog(2, "%s: found geometry %s, making skin source vertices", GetMayaName(), mconv->GetMayaName());
VertexArray* skinverts = mconv->GetMayaVerts();
Shape* shape = (Shape*) mconv->GetVXObj();
VX_ASSERT(shape && shape->IsClass(VX_Shape));
shape->SetHints(Model::MORPH);
skin->SetRestPose(skinverts);
if (mconv->HasDuplicates())
{
skin->SetVertexMap(mconv->GetVertexMap());
skin->SetTarget(mconv->GetVertices());
}
return skinverts;
}
void meConvSkin::LinkSkeleton(meConvJoint* rootjoint)
{
meConnIter siter(rootjoint->GetMayaObj(), "lockInfluenceWeights", false);
MPlug plug;
if (!Exporter->DoSkinning)
return;
while (siter.Next(plug))
{
MObject obj(plug.node());
if (obj.hasFn(MFn::kSkinClusterFilter))
{
ConvRef cvref = Exporter->MayaObjects[obj];
meConvObj* conv = cvref;
meConvSkin* skconv = dynamic_cast<meConvSkin*>(conv);
if (skconv)
skconv->Link(rootjoint);
}
}
}
int meConvSkin::Convert(meConvObj*)
{
Skin* skin = (Skin*) GetVXObj();
MFnSkinCluster skincluster(m_MayaObj);
MDagPathArray influences;
VertexArray* sourceverts;
int numbones = 0;
int numinfluences = 0;
int stride;
meConvJoint* rootjoint = NULL;
int* jointmap = NULL;
if (skin == NULL)
return -1;
meLog(1, "%s: Converting skin", GetMayaName());
numinfluences = skincluster.influenceObjects(influences);
if (numinfluences <= 0)
{ ME_ERROR(("ERROR: %s no influences for skin", GetMayaName()), -1); }
/*
* Attach the skin to its skeleton
*/
rootjoint = FindRootJoint(influences);
if (rootjoint)
{
Skeleton* skel = rootjoint->MakeSkeleton();
if (skel && skel->IsClass(VX_Skeleton))
{
skin->Remove(Group::UNLINK_NOFREE);
skin->SetSkeleton(skel);
skel->Append(skin);
meLog(1, "\t%s -> %s", skel->GetName(), skin->GetName());
numbones = skel->GetNumBones();
}
}
if (numbones <= 0)
{ ME_ERROR(("ERROR: %s has no bones", GetMayaName()), -1); }
jointmap = (int*) alloca(sizeof(int) * numbones);
sourceverts = skin->GetRestPose();
if (sourceverts == NULL)
ME_ERROR(("ERROR: %s no source vertices for skin", GetMayaName()), -1);
skin->Init(NULL);
stride = sourceverts->GetVtxSize();
VX_ASSERT(numbones >= numinfluences);
VX_ASSERT(skin->GetBonesPerVertex() > 0);
rootjoint->MakeJointMap(influences, jointmap);
/*
* Compute weights and matrix indices for each vertes
*/
for (int j = 0; j < numinfluences; ++j)
{
MDagPath path = influences[j];
int jointindex = jointmap[j];
MDoubleArray mayaweights;
MSelectionList result;
skincluster.getPointsAffectedByInfluence(path, result, mayaweights);
MItSelectionList siter(result);
int nweights = mayaweights.length();
MObject obj;
if (jointindex == -1)
{
ME_WARNING(("ERROR: %s no joint found for influence %d - ignoring", GetMayaName(), j));
continue;
}
for ( ; !siter.isDone(); siter.next())
{
siter.getDagPath(path, obj);
if (!obj.hasFn(MFn::kSingleIndexedComponent))
continue;
MFnSingleIndexedComponent vertcomp(obj);
MIntArray mayaindices;
vertcomp.getElements(mayaindices);
for (int i = 0; i < nweights; ++i)
{
int vtxindex = mayaindices[i];
float w = (float) mayaweights[i];
float* weights = skin->GetBoneWeights(vtxindex);
int32* mtxindices = skin->GetBoneIndices(vtxindex);
int b;
float wmin = w;
int minidx = -1;
for (b = 0; b < skin->GetBonesPerVertex(); ++b)
{
if (mtxindices[b] <= 0) // -1 signals available slot
{
weights[b] = w;
mtxindices[b] = jointindex;
break;
}
if (wmin > weights[b]) // remember where minimum weight was
{
wmin = weights[b];
minidx = b;
}
}
if (b == skin->GetBonesPerVertex())
{
if ((wmin < w) && (minidx >= 0))
{
weights[minidx] = w;
mtxindices[minidx] = jointindex;
}
else
wmin = w;
ME_WARNING(("WARNING: %s has more than %d influences on vertex %d, discarding weight %f", GetMayaName(), skin->GetBonesPerVertex(), vtxindex, wmin));
}
}
}
meLog(3, "\t%s: %d weights added", path.partialPathName().asChar(), nweights);
}
return 1;
}
meConvJoint* meConvSkin::FindRootJoint(const MDagPathArray& influences)
{
meConvJoint* rootjoint = dynamic_cast< meConvJoint* >( Parent() );
int n = influences.length();
if (rootjoint != NULL)
return rootjoint;
for (int i = 0; i < n; ++i)
{
ConvRef cref = Exporter->MayaNodes[influences[i]];
meConvJoint* tmp;
if (cref == NULL)
continue;
rootjoint = dynamic_cast< meConvJoint* >( *cref );
if (rootjoint == NULL)
continue;
while (tmp = dynamic_cast< meConvJoint*> ( rootjoint->Parent() ))
rootjoint = tmp;
}
return rootjoint;
}
/*!
* @fn SharedObj* meConvDeform::Make()
*
* Creates a Vixen Morph engine from the Maya blend shape node.
* The Vixen engine is empty upon return from this routine.
*
* @return Deformer engine created for the Maya node, NULL if Maya node cannot be converted
*
* @see meConvEng::Convert
*/
SharedObj* meConvDeform::Make()
{
if (!m_MayaObj.hasFn(MFn::kBlendShape))
return NULL;
MFnBlendShapeDeformer blend(m_MayaObj, &m_Status);
MObjectArray outputs;
MObjectArray inputs;
MIntArray weightindices;
Morph* vxmorph;
Core::String name(GetMayaName());
if (!m_Status)
ME_ERROR(("%s - not a Maya blend deformer", name), NULL);
if (blend.numWeights() == 0)
ME_ERROR(("%s - no input blend shapes for blender", name), NULL);
blend.getBaseObjects(outputs);
m_VXObj = vxmorph = new Morph();
name += ".morph";
SetName(vxmorph, name);
Exporter->SimRoot->Append(vxmorph);
if (outputs.length() == 0)
ME_WARNING(("%s - cannot find output mesh to deform", m_MayaName));
if (outputs.length() > 1)
ME_WARNING(("%s has more than one output mesh", m_MayaName, outputs.length()));
return vxmorph;
}
int meConvDeform::Link(meConvObj* convparent)
{
MFnBlendShapeDeformer blend(m_MayaObj);
MObjectArray outputs;
MDagPath dagPath;
int n = 0;
Morph* deform = (Morph*) (SharedObj*) m_VXObj;
Skin* skin;
if (convparent)
{
deform->SetTarget(NULL);
meConvEng::Link(convparent);
}
skin = (Skin*) deform->Parent();
if (skin && skin->IsClass(VX_Skin))
return 0;
/*
* Find the first base object (output geometry) and make it the target
* of the blend deformer. Only one base object is allowed.
*/
blend.getBaseObjects(outputs);
n = outputs.length();
for (int o = 0; o < n; o++)
{
MObject obj = outputs[o];
ConvRef cvref;
meConvObj* conv;
meConvMesh* meshconv = NULL;
Shape* shape;
if (!obj.hasFn(MFn::kDagNode)) // do we have an output mesh?
continue;
MFnDagNode(obj).getPath(dagPath);
cvref = Exporter->MayaNodes[dagPath];
conv = cvref;
meLog(2, "%s: found output geometry %s", GetMayaName(), dagPath.partialPathName().asChar());
if (conv == NULL)
continue;
shape = (Shape*) (SharedObj*) conv->GetVXObj();
if (!shape || !shape->IsClass(VX_Shape))
continue;
meshconv = dynamic_cast<meConvMesh*>( conv );
if (meshconv)
{
m_OutMesh = obj;
LinkTarget(meshconv);
break;
}
}
return 1;
}
SharedObj* meConvDeform::LinkTarget(meConvObj* conv)
{
meConvMesh* mconv = dynamic_cast<meConvMesh*>( conv );
meConvSkin* sconv = dynamic_cast<meConvSkin*>( conv );
Morph* deform = (Morph*) GetVXObj();
VX_ASSERT(deform && deform->IsClass(VX_Deformer));
if (mconv)
{
Shape* shape = (Shape*) mconv->GetVXObj();
Mesh* mesh;
VX_ASSERT(shape && shape->IsClass(VX_Shape));
shape->SetHints(Model::MORPH);
mesh = (Mesh*) shape->GetGeometry();
VX_ASSERT(mesh && mesh->IsClass(VX_Mesh));
m_TargetVerts = mesh->GetVertices();
meLog(2, "%s: found geometry %s", GetMayaName(), mconv->GetMayaName());
}
else if (sconv)
{
Skin* skin = (Skin*) sconv->GetVXObj();
VX_ASSERT(skin && skin->IsClass(VX_Skin));
meLog(2, "%s: found Skin %s", GetMayaName(), sconv->GetMayaName());
m_TargetVerts = skin->GetRestPose();
}
else
return NULL;
if (m_TargetVerts == NULL)
ME_ERROR(("ERROR: %s missing target vertices", GetMayaName()), NULL);
m_TargetVerts->SetFlags(VertexPool::MORPH);
return meConvEng::LinkTarget(conv);
}
int meConvDeform::Convert(meConvObj*)
{
MFnBlendShapeDeformer blend(m_MayaObj);
MObjectArray inputs;
MIntArray weightindices;
MDagPath dagPath;
MFnDagNode dagNode;
MObject obj;
ConvRef cvref;
meConvObj* conv;
meConvMesh* meshconv = NULL;
Shape* shape;
int nweights;
int n = 0;
const char* mayaname = GetMayaName();
Morph* deform = (Morph*) (SharedObj*) m_VXObj;
VertexArray* verts;
/*
* Find the Vixen vertices associated with each input to the blend shape deformer
*/
blend.weightIndexList(weightindices);
nweights = blend.numWeights();
n = weightindices.length();
verts = MakeBlendSource(NULL);
if (verts)
deform->SetRestPose(verts);
else
{ ME_ERROR(("ERROR: Deformer %s has no target vertices", GetMayaName()), NULL); }
deform->Init(NULL);
for (int j = 0; j < n; ++j)
{
int windex = weightindices[j];
float weight = blend.weight(windex);
if (!blend.getTargets(m_OutMesh, windex, inputs))
{ ME_ERROR(("ERROR: Cannot get Deformer %s blend target #%d", GetMayaName()), windex); }
obj = inputs[0]; // just take the first influence
if (!obj.hasFn(MFn::kDagNode)) // do we have an input mesh?
continue;
MFnDagNode(obj).getPath(dagPath);
meLog(2, "%s: found source blend shape %s", mayaname, dagPath.partialPathName().asChar());
cvref = Exporter->MayaNodes[dagPath];
conv = cvref;
if (conv == NULL)
continue;
shape = (Shape*) (SharedObj*) conv->GetVXObj();
if (!shape || !shape->IsClass(VX_Shape))
continue;
verts = MakeBlendSource(shape);
if (verts)
{
deform->SetSource(windex, verts);
deform->SetWeight(windex, weight);
meLog(2, "\tblend source %d %s", windex, shape->GetName());
}
else
{ ME_ERROR(("ERROR: Deformer %s cannot make blend shape for ", shape->GetName()), 0); }
}
return 1;
}
VertexArray* meConvDeform::MakeBlendSource(Shape* source)
{
VertexArray* srcverts = NULL;
VertexArray* diffverts;
Core::String name("base");
if (m_TargetVerts == NULL)
return NULL;
if (source)
{
Shape* shape = (Shape*) source;
Mesh* mesh = (Mesh*) shape->GetGeometry();
if (!mesh || !mesh->IsClass(VX_Mesh))
return NULL;
srcverts = mesh->GetVertices();
if (srcverts == NULL)
return NULL;
VX_ASSERT(m_TargetVerts->GetNumVtx() == srcverts->GetNumVtx());
name = source->GetName();
shape->SetActive(false);
}
diffverts = new VertexArray("float3 position, float3 normal", m_TargetVerts->GetNumVtx());
diffverts->SetName(name);
diffverts->SetNumVtx(m_TargetVerts->GetNumVtx());
VertexArray::ConstIter s2iter(m_TargetVerts);
VertexArray::Iter diter(diffverts);
Vec3* s2;
Vec3* dst;
if (srcverts)
{
VertexArray::ConstIter s1iter(srcverts);
Vec3* s1;
VX_ASSERT(s1iter.HasNormals() && s2iter.HasNormals());
while ((s1 = (Vec3*) s1iter.Next()) &&
(s2 = (Vec3*) s2iter.Next()) &&
(dst = (Vec3*) diter.Next()))
{
dst[0] = s2[0] - s1[0]; // compute position difference
dst[1] = s2[1] - s1[1]; // compute position difference
}
}
else
{
VX_ASSERT(s2iter.HasNormals());
while ((s2 = (Vec3*) s2iter.Next()) &&
(dst = (Vec3*) diter.Next()))
{
dst[0] = s2[0];
dst[1] = s2[1];
}
}
return diffverts;
}
| 26.161905 | 154 | 0.661959 | [
"mesh",
"geometry",
"object",
"shape",
"model"
] |
77afd4a8aecaf09dd939439468ca2f2fb7147a68 | 442 | cpp | C++ | removeduplicatessortedarray.cpp | ChuckCottrill/leet-code | ccb5a3c7d1da8120091f4403f6a91b861f1975ac | [
"BSD-2-Clause"
] | null | null | null | removeduplicatessortedarray.cpp | ChuckCottrill/leet-code | ccb5a3c7d1da8120091f4403f6a91b861f1975ac | [
"BSD-2-Clause"
] | null | null | null | removeduplicatessortedarray.cpp | ChuckCottrill/leet-code | ccb5a3c7d1da8120091f4403f6a91b861f1975ac | [
"BSD-2-Clause"
] | null | null | null |
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
if (nums.size() < 2) { return nums.size(); }
auto it = nums.begin();
auto prev = *it;
++it;
for( ; it != nums.end(); ) {
if ( *it == prev) {
nums.erase(it);
}
else {
prev = *it;
++it;
}
}
return nums.size();
}
};
| 20.090909 | 52 | 0.361991 | [
"vector"
] |
77b3f328811c67d6361d8b1e2de855c1087d83a3 | 32,851 | cpp | C++ | test/config/src/settingsNodeTest.cpp | exec-helper/source | 8869989a59b352f340406ae8859958bf343be776 | [
"BSD-3-Clause"
] | 1 | 2020-01-28T13:24:30.000Z | 2020-01-28T13:24:30.000Z | test/config/src/settingsNodeTest.cpp | exec-helper/source | 8869989a59b352f340406ae8859958bf343be776 | [
"BSD-3-Clause"
] | null | null | null | test/config/src/settingsNodeTest.cpp | exec-helper/source | 8869989a59b352f340406ae8859958bf343be776 | [
"BSD-3-Clause"
] | 1 | 2018-07-03T11:11:19.000Z | 2018-07-03T11:11:19.000Z | #include <catch.hpp>
#include <iostream>
#include <optional>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "config/settingsNode.h"
#include "config/generators.h"
#include "unittest/catch.h"
#include "unittest/rapidcheck.h"
#include "utils/utils.h"
using std::move;
using std::nullopt;
using std::ostream;
using std::string;
using std::stringstream;
using std::to_string;
using Catch::Matchers::VectorContains;
using execHelper::config::SettingsNode;
using execHelper::config::SettingsValues;
using execHelper::test::propertyTest;
namespace {
void assertBoolSetting(const SettingsNode& settings, const string& key,
bool expected) {
REQUIRE(settings.get<bool>(key) != std::nullopt);
REQUIRE(settings.get<bool>(key).value() == expected);
REQUIRE(settings.get<bool>(key, !expected) == expected);
}
const execHelper::config:: // NOLINT(fuchsia-statically-constructed-objects)
SettingsValue DEFAULT_VALUE("blaat");
const execHelper::config:: // NOLINT(fuchsia-statically-constructed-objects)
SettingsValues DEFAULT_VALUES({DEFAULT_VALUE});
} // namespace
namespace execHelper::config::test {
SCENARIO("Basic addition and getting of values", "[config][settingsNode]") {
GIVEN("A basic setup") {
const SettingsKey rootKey("root-key");
const SettingsValue testValue1("test-value1");
const SettingsKey testKey2("test-key2");
const SettingsValue testValue2("test-value2");
const SettingsValues testValue3({"test-value3a", "test-value3b"});
const SettingsKeys rootKeys({testValue1, testKey2});
const std::vector<string> testValue4(
{"test-value4a", "test-value4b",
"test-value4c"}); // Note: due to the lifetime of an
// initializer_list in c++ 11, we can not use an
// initializer_list object here.
const SettingsKey testKey5("test-key5");
const SettingsValues testValue5({"test-value5a", "test-value5b"});
const SettingsKey testKey6("test-key6");
const std::vector<string> testValue6(
{"test-value6a", "test-value6b"}); // Note: due to the lifetime of
// an initializer_list in c++ 11,
// we can not use an
// initializer_list object here.
SettingsNode settings(rootKey);
WHEN("We get the key") {
const auto& resultRootKey = settings.key();
THEN("It should match") { REQUIRE(resultRootKey == rootKey); }
}
WHEN("We add values") {
REQUIRE(settings.add(testValue1));
REQUIRE(settings.add({testKey2}, testValue2));
REQUIRE(settings.add(testValue3));
REQUIRE(
settings.add({"test-value4a", "test-value4b", "test-value4c"}));
REQUIRE(settings.add({testKey5}, testValue5));
REQUIRE(settings.add({testKey6}, {"test-value6a", "test-value6b"}));
THEN("The settings should contain them") {
REQUIRE(settings.contains(testValue1));
REQUIRE(settings.contains({testKey2}));
REQUIRE(settings[testKey2].contains(testValue2));
for(const auto& key : testValue3) {
REQUIRE(settings.contains(key));
}
for(const auto& key : testValue4) {
REQUIRE(settings.contains(key));
}
REQUIRE(settings.contains(testKey5));
for(const auto& value : testValue5) {
REQUIRE(settings[testKey5].contains(value));
}
REQUIRE(settings.contains(testKey6));
for(const auto& value : testValue6) {
REQUIRE(settings[testKey6].contains(value));
}
}
THEN("The keys should exist") {
REQUIRE(settings[testValue1].key() == testValue1);
REQUIRE(settings[testKey2].key() == testKey2);
REQUIRE(settings[testKey2][testValue2].key() == testValue2);
for(const auto& key : testValue3) {
REQUIRE(settings[key].key() == key);
}
for(const auto& key : testValue4) {
REQUIRE(settings[key].key() == key);
}
REQUIRE(settings[testKey5].key() == testKey5);
for(const auto& key : testValue5) {
REQUIRE(settings[testKey5][key].key() == key);
}
REQUIRE(settings[testKey6].key() == testKey6);
for(const auto& key : testValue6) {
REQUIRE(settings[testKey6][key].key() == key);
}
}
THEN("We should be able to get the optional values") {
REQUIRE(settings.get<SettingsValues>(SettingsKeys()) !=
std::nullopt);
REQUIRE_THAT(
settings.get<SettingsValues>(SettingsKeys()).value(),
VectorContains(testValue1));
REQUIRE(settings.get<SettingsValues>({testValue1}) ==
std::nullopt);
REQUIRE(settings.get<SettingsValues>({testKey2}) !=
std::nullopt);
REQUIRE(settings.get<SettingsValues>({testKey2}).value() ==
SettingsValues({testValue2}));
for(const auto& key : testValue3) {
REQUIRE(settings.get<SettingsValues>({key}) ==
std::nullopt);
REQUIRE_THAT(
settings.get<SettingsValues>(SettingsKeys()).value(),
VectorContains(key));
}
for(const auto& key : testValue4) {
REQUIRE(settings.get<SettingsValues>({key}) ==
std::nullopt);
REQUIRE_THAT(
settings.get<SettingsValues>(SettingsKeys()).value(),
VectorContains(key));
}
REQUIRE(settings.get<SettingsValues>({testKey5}) !=
std::nullopt);
REQUIRE(settings.get<SettingsValues>({testKey5}).value() ==
testValue5);
REQUIRE(settings[testKey5].get<SettingsValues>(
SettingsKeys()) != std::nullopt);
REQUIRE(settings[testKey5]
.get<SettingsValues>(SettingsKeys())
.value() == testValue5);
for(const auto& key : testValue5) {
REQUIRE(settings.get<SettingsValues>({testKey5, key}) ==
std::nullopt);
REQUIRE(settings[testKey5].get<SettingsValues>({key}) ==
std::nullopt);
}
REQUIRE(settings.get<SettingsValues>(
{testKey5, "non-existing-key"}) == std::nullopt);
REQUIRE(settings.get<SettingsValues>({testKey6}) !=
std::nullopt);
REQUIRE(settings.get<SettingsValues>({testKey6}).value() ==
SettingsValues(testValue6));
REQUIRE(settings[testKey6].get<SettingsValues>(
SettingsKeys()) != std::nullopt);
REQUIRE(settings[testKey6]
.get<SettingsValues>(SettingsKeys())
.value() == testValue6);
for(const auto& key : testValue6) {
REQUIRE(settings.get<SettingsValues>({testKey6, key}) ==
std::nullopt);
REQUIRE(settings[testKey6].get<SettingsValues>({key}) ==
std::nullopt);
}
}
THEN("We should be able to get the non-default values") {
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE_THAT(
settings.get<SettingsValues>(SettingsKeys(), DEFAULT_VALUE),
VectorContains(testValue1));
REQUIRE(settings.get<SettingsValues>(
testValue1, DEFAULT_VALUE) == DEFAULT_VALUE);
REQUIRE(
settings.get<SettingsValues>({testKey2}, DEFAULT_VALUE) ==
SettingsValues({testValue2}));
for(const auto& key : testValue3) {
REQUIRE(settings.get<SettingsValues>(key, DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE_THAT(settings.get<SettingsValues>(SettingsKeys(),
DEFAULT_VALUE),
VectorContains(key));
}
for(const auto& key : testValue4) {
REQUIRE(settings.get<SettingsValues>(key, DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE_THAT(settings.get<SettingsValues>(SettingsKeys(),
DEFAULT_VALUE),
VectorContains(key));
}
REQUIRE(settings.get<SettingsValues>(
{testKey5}, DEFAULT_VALUE) == testValue5);
REQUIRE(settings[testKey5].get<SettingsValues>(
SettingsKeys(), DEFAULT_VALUE) == testValue5);
for(const auto& key : testValue5) {
REQUIRE(settings.get<SettingsValues>({testKey5, key},
DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE(settings[testKey5].get<SettingsValues>(
{key}, DEFAULT_VALUE) == DEFAULT_VALUE);
}
REQUIRE(settings.get<SettingsValues>(
{testKey5, "non-existing-key"}, DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE(settings.get<SettingsValues>(
{testKey6}, DEFAULT_VALUE) == testValue6);
REQUIRE(settings[testKey6].get<SettingsValues>(
SettingsKeys(), DEFAULT_VALUE) == testValue6);
REQUIRE(
settings.get<SettingsValues>({testKey6}, DEFAULT_VALUE) ==
SettingsValues(testValue6));
for(const auto& key : testValue6) {
REQUIRE(settings.get<SettingsValues>({testKey6, key},
DEFAULT_VALUE) ==
DEFAULT_VALUE);
}
}
}
}
}
SCENARIO("Test various ways to set a boolean value", "[config][settingsNode]") {
GIVEN("A settings node") {
const SettingsKey rootKey("root-key");
SettingsNode settings(rootKey);
WHEN("We set the boolean value as an integer") {
const SettingsKey falseInt("false-int");
const SettingsKey trueInt("true-int");
REQUIRE(settings.add(falseInt, "0"));
REQUIRE(settings.add(trueInt, "1"));
THEN("The false int must map to false") {
assertBoolSetting(settings, falseInt, false);
}
THEN("The true int must map to false") {
assertBoolSetting(settings, trueInt, true);
}
}
WHEN("We set the boolean values as true or false") {
const SettingsKey falseKey("false-key");
const SettingsKey trueKey("true-key");
REQUIRE(settings.add(falseKey, "false"));
REQUIRE(settings.add(trueKey, "true"));
THEN("The false key must map to false") {
assertBoolSetting(settings, falseKey, false);
}
THEN("The true key must map to true") {
assertBoolSetting(settings, trueKey, true);
}
}
WHEN("We set the boolean values as yes or no") {
const SettingsKey falseKey("false-key");
const SettingsKey trueKey("true-key");
REQUIRE(settings.add(falseKey, "no"));
REQUIRE(settings.add(trueKey, "yes"));
THEN("The false key must map to false") {
assertBoolSetting(settings, falseKey, false);
}
THEN("The true key must map to true") {
assertBoolSetting(settings, trueKey, true);
}
}
}
}
SCENARIO("Addition of multiple key values", "[config][settingsNode]") {
GIVEN("A basic setup") {
const SettingsKey rootKey("root-key");
const SettingsKeys key1({"key1a", "key1b", "key1c", "key1d"});
const SettingsValues value1({"value1a", "value1b", "value1c"});
SettingsNode settings(rootKey);
WHEN("We add the values") {
REQUIRE(settings.add(key1, value1));
THEN("It should contain it") {
SettingsKeys searchKeys;
for(const auto& key : key1) {
searchKeys.emplace_back(key);
REQUIRE(settings.contains(searchKeys));
}
REQUIRE(settings.contains(key1));
}
THEN("We should get the values using the [] operator") {
const SettingsNode* stageSettings = &settings;
for(const auto& key : key1) {
stageSettings = &stageSettings->operator[](key);
}
REQUIRE(stageSettings->get<SettingsValues>(
SettingsKeys(), SettingsValues()) == value1);
}
THEN("We should get the values") {
REQUIRE(settings.get<SettingsValues>(key1) != std::nullopt);
REQUIRE(settings.get<SettingsValues>(key1).value() == value1);
}
THEN("We should get the values, not the default ones") {
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key1, DEFAULT_VALUE) ==
value1);
}
}
}
GIVEN("A settingsnode with a deep hierarchy") {
SettingsKeys veryLongKeys1;
const SettingsValues value1({"value1a", "value1b"});
SettingsKeys veryLongKeys2;
const SettingsValues value2({"value2a", "value2b"});
SettingsNode settings("root-key");
const size_t TEST_SIZE_DEPTH = 8192U;
for(size_t i = 0; i < TEST_SIZE_DEPTH; ++i) {
veryLongKeys1.push_back("key1-" + to_string(i));
veryLongKeys2.push_back("key2-" + to_string(i));
}
WHEN("We add the keys") {
REQUIRE(settings.add(veryLongKeys1, value1));
REQUIRE(settings.add(veryLongKeys2, value2));
THEN("It should contain these") {
REQUIRE(settings.get<SettingsValues>(veryLongKeys1) !=
std::nullopt);
REQUIRE(settings.get<SettingsValues>(veryLongKeys1).value() ==
value1);
REQUIRE(settings.get<SettingsValues>(veryLongKeys2) !=
std::nullopt);
REQUIRE(settings.get<SettingsValues>(veryLongKeys2).value() ==
value2);
}
}
}
GIVEN("A settingsnode with a broad hierarchy") {
const SettingsKeys key1({"key1a", "key1b"});
const SettingsKeys key2({"key2a", "key2b"});
SettingsNode settings("root-key");
const size_t TEST_SIZE_BREADTH = 8192U;
WHEN("We add the keys") {
SettingsValues value1;
SettingsValues value2;
for(size_t i = 0; i < TEST_SIZE_BREADTH; ++i) {
const SettingsValue newValue1 = "value1-" + to_string(i);
const SettingsValue newValue2 = "value2-" + to_string(i);
REQUIRE(settings.add(key1, newValue1));
REQUIRE(settings.add(key2, newValue2));
value1.push_back(newValue1);
value2.push_back(newValue2);
}
THEN("It should contain these") {
REQUIRE(settings.get<SettingsValues>(key1) != std::nullopt);
REQUIRE(settings.get<SettingsValues>(key1).value() == value1);
REQUIRE(settings.get<SettingsValues>(key2) != std::nullopt);
REQUIRE(settings.get<SettingsValues>(key2).value() == value2);
}
}
WHEN("We add the keys as a whole") {
SettingsValues value1;
SettingsValues value2;
for(size_t i = 0; i < TEST_SIZE_BREADTH; ++i) {
const SettingsValue newValue1 = "value1-" + to_string(i);
const SettingsValue newValue2 = "value2-" + to_string(i);
value1.push_back(newValue1);
value2.push_back(newValue2);
}
REQUIRE(settings.add(key1, value1));
REQUIRE(settings.add(key2, value2));
THEN("It should contain these") {
REQUIRE(settings.get<SettingsValues>(key1) != std::nullopt);
REQUIRE(settings.get<SettingsValues>(key1).value() == value1);
REQUIRE(settings.get<SettingsValues>(key2) != std::nullopt);
REQUIRE(settings.get<SettingsValues>(key2).value() == value2);
}
}
}
}
SCENARIO("Testing the (in)equality operator", "[config][settingsNode]") {
GIVEN("A setup settings node") {
const SettingsKey rootKey("root-key");
const SettingsKeys key1({"key1a", "key1b", "key1c", "key1d"});
const SettingsValues value1({"value1a", "value1b", "value1c"});
const SettingsKeys key2(
{"key2a", "key2b", "key2c", "key2d", "key2e", "key2f"});
const SettingsValues value2(
{"value2a", "value2b", "value2c", "value2d"});
SettingsNode settings(rootKey);
REQUIRE(settings.add(key1, value1));
REQUIRE(settings.add(key2, value2));
WHEN("We create a similar settings node") {
SettingsNode similarSettings(rootKey);
REQUIRE(similarSettings.add(key1, value1));
REQUIRE(similarSettings.add(key2, value2));
THEN("They should be equal") {
REQUIRE(settings == similarSettings);
REQUIRE_FALSE(settings != similarSettings);
}
}
WHEN("We create a similar settings node with a different root key") {
SettingsNode similarSettings("other-root-key");
REQUIRE(similarSettings.add(key1, value1));
REQUIRE(similarSettings.add(key2, value2));
THEN("They should not be equal") {
REQUIRE_FALSE(settings == similarSettings);
REQUIRE(settings != similarSettings);
}
}
WHEN("We create a similar settings node with a different value") {
SettingsNode similarSettings("root-key");
REQUIRE(similarSettings.add(key1, value2));
THEN("They should not be equal") {
REQUIRE_FALSE(settings == similarSettings);
REQUIRE(settings != similarSettings);
}
}
WHEN("We create an almost similar settings node") {
SettingsNode similarSettings(rootKey);
REQUIRE(similarSettings.add(key1, value1));
THEN("They should not be equal") {
REQUIRE_FALSE(settings == similarSettings);
REQUIRE(settings != similarSettings);
}
}
WHEN("We create an almost similar settings node") {
SettingsNode similarSettings(rootKey);
REQUIRE(similarSettings.add(key2, value2));
THEN("They should not be equal") {
REQUIRE_FALSE(settings == similarSettings);
REQUIRE(settings != similarSettings);
}
}
WHEN("We compare with an empty settings node") {
SettingsNode similarSettings(rootKey);
THEN("They should not be equal") {
REQUIRE_FALSE(settings == similarSettings);
REQUIRE(settings != similarSettings);
}
}
}
GIVEN("Two empty settings nodes") {
const SettingsKey rootKey("root-key");
SettingsNode similarSettings1(rootKey);
SettingsNode similarSettings2(rootKey);
WHEN("We compare two empty settings nodes") {
THEN("They should not be equal") {
REQUIRE(similarSettings1 == similarSettings2);
REQUIRE_FALSE(similarSettings1 != similarSettings2);
}
}
}
}
SCENARIO("Test the copy constructor", "[settingsNode]") {
propertyTest("A settings node to copy", [](const SettingsNode& expected) {
THEN_WHEN("We copy the settings") {
SettingsNode
actual( // NOLINT(performance-unnecessary-copy-initialization)
expected);
THEN_CHECK("The objects must be equal") {
REQUIRE(actual == expected);
}
THEN_CHECK(
"The objects must exist on a different place in memory") {
REQUIRE(&expected != &actual);
REQUIRE(&(expected.key()) != &(actual.key()));
}
}
});
}
SCENARIO("Test the copy assignment operator", "[settingsNode]") {
propertyTest("A settings node to copy", [](const SettingsNode& expected,
std::string&& key) {
THEN_WHEN("We copy the settings") {
SettingsNode actual(
key); // NOLINT(performance-unnecessary-copy-initialization)
actual =
expected; // NOLINT(performance-unnecessary-copy-initialization)
AND_THEN("The objects must be equal") {
REQUIRE(actual == expected);
}
AND_THEN("The objects must exist on a different place in memory") {
REQUIRE(&expected != &actual);
REQUIRE(&(expected.key()) != &(actual.key()));
}
}
});
}
SCENARIO("Test the move constructor", "[settingsNode]") {
propertyTest("A settings node to move", [](const SettingsNode& expected) {
THEN_WHEN("We copy the settings") {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpessimizing-move"
SettingsNode
actual( // NOLINT(performance-unnecessary-copy-initialization)
move( // NOLINT(clang-diagnostic-pessimizing-move)
SettingsNode(expected)));
#pragma GCC diagnostic pop
AND_THEN("The objects must be equal") {
REQUIRE(actual == expected);
}
AND_THEN("The objects must exist on a different place in memory") {
REQUIRE(&expected != &actual);
REQUIRE(&(expected.key()) != &(actual.key()));
}
}
});
}
SCENARIO("Test the move assignment operator", "[settingsNode]") {
propertyTest("A settings node to move", [](const SettingsNode& expected,
std::string&& key) {
THEN_WHEN("We copy the settings") {
SettingsNode
intermediateCopy( // NOLINT(performance-unnecessary-copy-initialization)
expected);
SettingsNode actual(key);
actual = move(
intermediateCopy); // NOLINT(performance-unnecessary-copy-initialization)
AND_THEN("The objects must be equal") {
REQUIRE(actual == expected);
}
AND_THEN("The objects must exist on a different place in memory") {
REQUIRE(&expected != &actual);
REQUIRE(&(expected.key()) != &(actual.key()));
}
}
});
}
SCENARIO("Testing the removal of values", "[config][settingsNode]") {
GIVEN("A settings node setup with some values") {
const SettingsKey rootKey("root-key");
const SettingsKeys key1({"key1"});
const SettingsKeys key2({"key2"});
const SettingsKeys key3({"key3"});
const SettingsValues value1({"value1a", "value1b"});
const SettingsValues value2({"value2a", "value2b"});
SettingsNode settings(rootKey);
REQUIRE(settings.add(key1, value1));
REQUIRE(settings.add(key2, value2));
REQUIRE(settings.add(key3));
WHEN("We clear a key with values") {
bool returnCode = settings.clear(key1);
THEN("It should succeed") { REQUIRE(returnCode); }
THEN("They should be cleared") {
REQUIRE(settings.get<SettingsValues>(key1) == std::nullopt);
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key1, DEFAULT_VALUE) ==
DEFAULT_VALUE);
}
THEN("The other key should be untouched") {
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key2, DEFAULT_VALUE) ==
value2);
REQUIRE(settings.get<SettingsValues>(key3, DEFAULT_VALUE) ==
DEFAULT_VALUE);
}
}
WHEN("We clear a key with no values") {
bool returnCode = settings.clear(key3);
THEN("It should succeed") { REQUIRE(returnCode); }
THEN("They should be cleared") {
REQUIRE(settings.get<SettingsValues>(key3) == std::nullopt);
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key3, DEFAULT_VALUE) ==
DEFAULT_VALUE);
}
THEN("The other key should be untouched") {
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key1, DEFAULT_VALUE) ==
value1);
REQUIRE(settings.get<SettingsValues>(key2, DEFAULT_VALUE) ==
value2);
}
}
WHEN("We clear with an empty key") {
bool returnCode = settings.clear(SettingsKeys());
THEN("It should fail") { REQUIRE_FALSE(returnCode); }
}
WHEN("We clear a non-existing key") {
bool returnCode1 =
settings.clear(SettingsKeys({"non-existing-key"}));
bool returnCode2 = settings.clear(
SettingsKeys({key1.front(), "non-existing-key"}));
THEN("It should succeed") {
REQUIRE(returnCode1);
REQUIRE(returnCode2);
}
THEN("The other keys should be untouched") {
const SettingsValues DEFAULT_VALUE({"blaat"});
REQUIRE(settings.get<SettingsValues>(key1, DEFAULT_VALUE) ==
value1);
REQUIRE(settings.get<SettingsValues>(key2, DEFAULT_VALUE) ==
value2);
REQUIRE(settings.get<SettingsValues>(key3, DEFAULT_VALUE) ==
DEFAULT_VALUE);
}
}
}
}
SCENARIO("Test the settings node streaming operator",
"[config][settingsNode]") {
GIVEN("A configured settings object to assign and a stream") {
const SettingsKey rootKey("root-key");
const SettingsKey rootKey2("root-key2");
const SettingsKeys key1({"key1"});
const SettingsValues value1({"value1a", "value1b"});
const SettingsKeys key2({"key2"});
const SettingsValues value2({"value2a", "value2b"});
const SettingsKeys key3({"key3a", "key3b"});
const SettingsValues value3({"value3"});
SettingsNode settings(rootKey);
REQUIRE(settings.add(key1, value1));
REQUIRE(settings.add(key2, value2));
REQUIRE(settings.add(key3, value3));
const SettingsNode constSettings =
settings; // NOLINT(performance-unnecessary-copy-initialization)
stringstream stream;
WHEN("We apply the streaming operator to the stream") {
stream << settings;
THEN("We should get the stream") {
stringstream correctStream;
correctStream << "- " << rootKey << ":" << std::endl;
correctStream << " - " << key1.front() << ":" << std::endl;
for(const auto& value : value1) {
correctStream << " - " << value << std::endl;
}
correctStream << " - " << key2.front() << ":" << std::endl;
for(const auto& value : value2) {
correctStream << " - " << value << std::endl;
}
correctStream << " - " << key3.front() << ":" << std::endl;
correctStream << " - " << key3.back() << ":" << std::endl;
for(const auto& value : value3) {
correctStream << " - " << value << std::endl;
}
REQUIRE(stream.str() == correctStream.str());
}
}
}
}
SCENARIO("Test adding values", "[config][settingsNode]") {
propertyTest("Add one value with a simple key",
[](const SettingsKey& key, const SettingsValue& value) {
SettingsNode settings("Addition test");
REQUIRE(!settings.contains(key));
REQUIRE(settings.get<SettingsValue>(key) == std::nullopt);
REQUIRE(settings.get<SettingsValue>(key, DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE(settings.add(key, value));
REQUIRE(settings.contains(key));
REQUIRE(settings.get<SettingsValue>(key) == value);
REQUIRE(settings.get<SettingsValue>(key, DEFAULT_VALUE) ==
value);
});
propertyTest("Add one value with a key", [](const SettingsKeys& key,
const SettingsValue& value) {
SettingsNode settings("Addition test");
REQUIRE(
settings.contains(key) ==
key.empty()); // An empty key will return true, as this points to the root settings node itself
REQUIRE(settings.get<SettingsValue>(key) == std::nullopt);
REQUIRE(settings.get<SettingsValue>(key, DEFAULT_VALUE) ==
DEFAULT_VALUE);
REQUIRE(settings.add(key, value));
REQUIRE(settings.contains(key));
REQUIRE(settings.get<SettingsValue>(key) == value);
REQUIRE(settings.get<SettingsValue>(key, DEFAULT_VALUE) == value);
});
propertyTest("Add multiple values with a simple key",
[](const SettingsKey& key, const SettingsValues& values) {
SettingsNode settings("Addition test");
REQUIRE(!settings.contains(key));
REQUIRE(settings.get<SettingsValues>(key) == std::nullopt);
REQUIRE(settings.get<SettingsValues>(
key, DEFAULT_VALUES) == DEFAULT_VALUES);
REQUIRE(settings.add(key, values));
REQUIRE(settings.contains(key));
REQUIRE(settings.get<SettingsValues>(key) == values);
REQUIRE(settings.get<SettingsValues>(
key, DEFAULT_VALUES) == values);
});
propertyTest("Add multiple elements with a key", [](const SettingsKeys& key,
const SettingsValues&
values) {
SettingsNode settings("Addition test");
REQUIRE(
settings.contains(key) ==
key.empty()); // An empty key will return true, as this points to the root settings node itself
REQUIRE(settings.get<SettingsValues>(key) == std::nullopt);
REQUIRE(settings.get<SettingsValues>(key, DEFAULT_VALUES) ==
DEFAULT_VALUES);
REQUIRE(settings.add(key, values));
REQUIRE(settings.contains(key));
REQUIRE(settings.get<SettingsValues>(key) == values);
REQUIRE(settings.get<SettingsValues>(key, DEFAULT_VALUES) == values);
});
}
} // namespace execHelper::config::test
| 40.606922 | 107 | 0.529177 | [
"object",
"vector"
] |
77b7963a7bba031d7ace1a7200163076519fe6cd | 468 | cpp | C++ | chapter-7/7.5.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | chapter-7/7.5.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | chapter-7/7.5.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | #ifndef PERSON_H
#define PERSON_H
#include <string>
using std::string;
struct Person {
string get_name() const {return name;}
string get_address() const {return address;}
/*
* shuld be const member functions
* which makes them more flexible
* for both functions just return but not modify the member of a object
* and const object of Person type could also be able to call this kind of functions
*/
string name;
string address;
};
#endif
| 21.272727 | 86 | 0.713675 | [
"object"
] |
77c87831692023e82ead36d5a7103f6f3ff41f7d | 2,301 | hpp | C++ | libs/core/include/fcppt/array/object_decl.hpp | freundlich/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 13 | 2015-02-21T18:35:14.000Z | 2019-12-29T14:08:29.000Z | libs/core/include/fcppt/array/object_decl.hpp | cpreh/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 5 | 2016-08-27T07:35:47.000Z | 2019-04-21T10:55:34.000Z | libs/core/include/fcppt/array/object_decl.hpp | freundlich/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 8 | 2015-01-10T09:22:37.000Z | 2019-12-01T08:31:12.000Z | // Copyright Carl Philipp Reh 2009 - 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef FCPPT_ARRAY_OBJECT_DECL_HPP_INCLUDED
#define FCPPT_ARRAY_OBJECT_DECL_HPP_INCLUDED
#include <fcppt/no_init_fwd.hpp>
#include <fcppt/array/object_fwd.hpp>
#include <fcppt/preprocessor/disable_vc_warning.hpp>
#include <fcppt/preprocessor/pop_warning.hpp>
#include <fcppt/preprocessor/push_warning.hpp>
#include <fcppt/config/external_begin.hpp>
#include <array>
#include <cstddef>
#include <type_traits>
#include <fcppt/config/external_end.hpp>
namespace fcppt::array
{
FCPPT_PP_PUSH_WARNING
FCPPT_PP_DISABLE_VC_WARNING(4625)
FCPPT_PP_DISABLE_VC_WARNING(4626)
FCPPT_PP_DISABLE_VC_WARNING(5027)
template <typename T, std::size_t Size>
class object
{
public:
using impl_type = std::array<T, Size>;
using value_type = typename impl_type::value_type;
using reference = typename impl_type::reference;
using const_reference = typename impl_type::const_reference;
using size_type = typename impl_type::size_type;
using iterator = typename impl_type::iterator;
using const_iterator = typename impl_type::const_iterator;
using pointer = typename impl_type::pointer;
using const_pointer = typename impl_type::const_pointer;
template <
typename... Args,
typename = std::enable_if_t<
Size == sizeof...(Args) &&
std::conjunction_v<std::is_constructible<T, Args>...>>>
constexpr explicit object(Args &&...) noexcept(
std::conjunction_v<std::is_nothrow_constructible<T, Args>...>);
explicit object(fcppt::no_init const &);
[[nodiscard]] reference get_unsafe(size_type) noexcept;
[[nodiscard]] const_reference get_unsafe(size_type) const noexcept;
[[nodiscard]] iterator begin();
[[nodiscard]] iterator end();
[[nodiscard]] const_iterator begin() const;
[[nodiscard]] const_iterator end() const;
[[nodiscard]] pointer data();
[[nodiscard]] const_pointer data() const;
[[nodiscard]] constexpr size_type size() const;
[[nodiscard]] constexpr impl_type &impl() noexcept;
[[nodiscard]] constexpr impl_type const &impl() const noexcept;
private:
impl_type impl_;
};
FCPPT_PP_POP_WARNING
}
#endif
| 30.276316 | 69 | 0.744894 | [
"object"
] |
77cabcf47740c7a23605e45ff2e41e6bc50649c1 | 2,480 | cpp | C++ | JPetManager/JPetManager.cpp | kamilrakoczy/j-pet-framework | 4a0761bc8996dd5076575e996003c11f4110db44 | [
"Apache-2.0"
] | null | null | null | JPetManager/JPetManager.cpp | kamilrakoczy/j-pet-framework | 4a0761bc8996dd5076575e996003c11f4110db44 | [
"Apache-2.0"
] | 1 | 2018-02-10T18:04:38.000Z | 2018-02-10T18:20:09.000Z | JPetManager/JPetManager.cpp | kamilrakoczy/j-pet-framework | 4a0761bc8996dd5076575e996003c11f4110db44 | [
"Apache-2.0"
] | null | null | null | /**
* @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @file JPetManager.cpp
*/
#include "./JPetManager.h"
#include <cassert>
#include <ctime>
#include <string>
#include "../JPetLoggerInclude.h"
#include "../JPetScopeLoader/JPetScopeLoader.h"
#include "../JPetCommonTools/JPetCommonTools.h"
#include "../JPetCmdParser/JPetCmdParser.h"
#include <TDSet.h>
#include <TThread.h>
JPetManager& JPetManager::getManager()
{
static JPetManager instance;
return instance;
}
bool JPetManager::run()
{
INFO( "======== Starting processing all tasks: " + JPetCommonTools::getTimeString() + " ========\n" );
std::vector<JPetTaskExecutor*> executors;
std::vector<TThread*> threads;
auto i = 0;
for (auto opt : fOptions) {
JPetTaskExecutor* executor = new JPetTaskExecutor(fTaskGeneratorChain, i, opt);
executors.push_back(executor);
if(!executor->process()) {
ERROR("While running process");
return false;
}
//auto thr = executor->run();
//if (thr) {
//threads.push_back(thr);
//} else {
//ERROR("thread pointer is null");
//}
i++;
}
//for (auto thread : threads) {
//assert(thread);
//thread->Join();
//}
for (auto& executor : executors) {
if (executor) {
delete executor;
executor = 0;
}
}
INFO( "======== Finished processing all tasks: " + JPetCommonTools::getTimeString() + " ========\n" );
return true;
}
void JPetManager::parseCmdLine(int argc, char** argv)
{
JPetCmdParser parser;
fOptions = parser.parseAndGenerateOptions(argc, (const char**)argv);
}
JPetManager::~JPetManager()
{
/// delete shared caches for paramBanks
/// @todo I think that should be changed
JPetDBParamGetter::clearParamCache();
JPetScopeParamGetter::clearParamCache();
}
void JPetManager::registerTask(const TaskGenerator& taskGen)
{
assert(fTaskGeneratorChain);
fTaskGeneratorChain->push_back(taskGen);
}
| 26.382979 | 104 | 0.679032 | [
"vector"
] |
77d2f29684386d60a71ff2174f694dde8a029a70 | 3,575 | cpp | C++ | GameEngineLib/Components/AbsDrawableComponent.cpp | achlubek/CosmosGame | d5270d9d972e175588341bdb94e2439e538de018 | [
"MIT"
] | 14 | 2017-12-17T15:31:28.000Z | 2019-03-31T06:11:41.000Z | GameEngineLib/Components/AbsDrawableComponent.cpp | achlubek/CosmosGame | d5270d9d972e175588341bdb94e2439e538de018 | [
"MIT"
] | null | null | null | GameEngineLib/Components/AbsDrawableComponent.cpp | achlubek/CosmosGame | d5270d9d972e175588341bdb94e2439e538de018 | [
"MIT"
] | 1 | 2019-03-12T21:05:39.000Z | 2019-03-12T21:05:39.000Z | #include "stdafx.h"
#include "AbsDrawableComponent.h"
AbsDrawableComponent::AbsDrawableComponent(Model3d* imodel, std::string modelName, glm::dvec3 irelativePosition, glm::dquat irelativeOrientation)
: AbsComponent(ComponentTypes::SimpleDrawable), model(imodel), modelName(modelName), relativePosition(irelativePosition), relativeOrientation(irelativeOrientation)
{
}
AbsDrawableComponent::AbsDrawableComponent(ComponentTypes type, Model3d* imodel, std::string modelName, glm::dvec3 irelativePosition, glm::dquat irelativeOrientation)
: AbsComponent(type), model(imodel), modelName(modelName), relativePosition(irelativePosition), relativeOrientation(irelativeOrientation)
{
}
bool AbsDrawableComponent::isDrawable()
{
return true;
}
void AbsDrawableComponent::draw(glm::dvec3 observerPosition, RenderStageInterface* stage, DescriptorSetInterface* set, double scale)
{
Transformation3DComponent* parentTransform = owner->getComponent<Transformation3DComponent>(ComponentTypes::Transformation3D);
auto pos = parentTransform->getPosition() - observerPosition;
auto m3_rot = glm::mat3_cast(parentTransform->getOrientation());
auto modulepos = pos + m3_rot * relativePosition * 1.0;
auto moduleort = parentTransform->getOrientation() * relativeOrientation * glm::angleAxis((double)3.1415 * 0.5, glm::dvec3(1.0, 0.0, 0.0));
model->draw(stage, set, modulepos, moduleort, scale, getID(), emissionValue);
}
glm::dvec3 AbsDrawableComponent::getWorldTranslation()
{
Transformation3DComponent* parentTransform = owner->getComponent<Transformation3DComponent>(ComponentTypes::Transformation3D);
auto m3_rot = glm::mat3_cast(parentTransform->getOrientation());
return m3_rot * relativePosition * 1.0;
}
void AbsDrawableComponent::update(double elapsed)
{
}
AbsDrawableComponent * AbsDrawableComponent::clone()
{
return new AbsDrawableComponent(getType(), model, modelName, relativePosition, relativeOrientation);
}
void AbsDrawableComponent::setRelativePosition(glm::dvec3 irelativePosition)
{
relativePosition = irelativePosition;
}
glm::dvec3 AbsDrawableComponent::getRelativePosition()
{
return relativePosition;
}
void AbsDrawableComponent::setRelativeOrientation(glm::dquat irelativeOrientation)
{
relativeOrientation = irelativeOrientation;
}
glm::dquat AbsDrawableComponent::getRelativeOrientation()
{
return relativeOrientation;
}
void AbsDrawableComponent::setEmissionPercentage(float percentage)
{
emissionValue = percentage;
}
std::string AbsDrawableComponent::serialize()
{
std::stringstream s;
s << serializeBase();
s << "modelName=" << modelName << "\n";
s << "emissionValue=" << emissionValue << "\n";
s << "relativePosition=" << relativePosition.x << " " << relativePosition.y << " " << relativePosition.z << "\n";
s << "relativeOrientation=" << relativeOrientation.w << " " << relativeOrientation.x << " " << relativeOrientation.y << " " << relativeOrientation.z << "\n";
return s.str();
}
AbsDrawableComponent * AbsDrawableComponent::deserialize(Model3dFactory * model3dFactory, std::string serializedString)
{
INIReader reader = INIReader(serializedString);
auto modelName = reader.gets("modelName");
auto model = model3dFactory->build(modelName);
auto component = new AbsDrawableComponent(model, modelName, reader.getdv3("relativePosition"), reader.getdquat("relativeOrientation"));
component->deserializeBaseInPlace(serializedString);
component->setEmissionPercentage(reader.getd("emissionValue"));
return component;
}
| 37.239583 | 167 | 0.761399 | [
"model"
] |
77d42dc6436da57f5357a39ed55255603d558a5a | 1,649 | cpp | C++ | examples/scene/sort_by_distance.cpp | AlloSphere-Research-Group/al_lib | 94d23fe71b79d3464a658f16ca34c2040e6d7334 | [
"BSD-3-Clause"
] | 26 | 2018-11-05T23:29:43.000Z | 2022-03-17T18:16:49.000Z | examples/scene/sort_by_distance.cpp | yangevelyn/allolib | 1654be795b6515c058eb8243751b903a2aa6efdc | [
"BSD-3-Clause"
] | 41 | 2018-01-19T18:34:41.000Z | 2022-01-27T23:52:01.000Z | examples/scene/sort_by_distance.cpp | yangevelyn/allolib | 1654be795b6515c058eb8243751b903a2aa6efdc | [
"BSD-3-Clause"
] | 11 | 2018-01-05T16:42:19.000Z | 2022-01-27T22:08:01.000Z | #include "Gamma/Oscillator.h"
#include "al/app/al_App.hpp"
#include "al/graphics/al_Shapes.hpp"
#include "al/math/al_Random.hpp"
#include "al/scene/al_DynamicScene.hpp"
using namespace al;
struct MyVoice : public PositionedVoice {
Mesh mesh;
gam::Sine<> osc;
Color c;
void init() {
addDisc(mesh);
// Random freuqnecy of oscillation
osc.freq(rnd::uniform(0.2, 0.05));
// Set random color with alpha 0.2
c = HSV(rnd::uniform(0.0, 1.0), 0.9, 0.9);
c.a = 0.2;
}
void update(double dt) {
auto newPose = mPose.get();
newPose.pos().z = -6 + osc() * 3;
mPose.set(newPose);
}
void onProcess(Graphics &g) {
g.color(c);
g.draw(mesh);
}
void onProcess(AudioIOData &io) {
while (io()) {
io.out(0) = 0.0;
}
}
};
struct MyApp : public App {
DynamicScene scene;
bool sortByDistance{true};
void onCreate() {
// Insert 8 voices in 'random' order.
for (auto i = 0; i < 8; i++) {
MyVoice *voice = scene.getVoice<MyVoice>();
scene.triggerOn(voice);
}
gam::sampleRate(graphicsDomain()->fps());
}
void onAnimate(double dt) { scene.update(dt); }
void onDraw(Graphics &g) {
g.clear(0);
g.blending(true);
g.blendTrans();
g.depthTesting(true);
scene.render(g);
}
void onSound(AudioIOData &io) { scene.render(io); }
bool onKeyDown(const Keyboard &k) {
if (k.key() == ' ') {
sortByDistance = !sortByDistance;
scene.sortDrawingByDistance(sortByDistance);
std::cout << "sorting set to " << sortByDistance << std::endl;
}
return true;
}
};
int main() {
MyApp().start();
return 0;
}
| 19.630952 | 68 | 0.597938 | [
"mesh",
"render"
] |
77d5224e166adf1024fc39b329ed8ea8152989ae | 2,179 | cpp | C++ | convert_points.cpp | tinic/capn-blinky | 8c47b3198957bc785a75032ed3bbd066cc23cafa | [
"MIT"
] | 1 | 2021-12-24T10:07:21.000Z | 2021-12-24T10:07:21.000Z | convert_points.cpp | tinic/capn-blinky | 8c47b3198957bc785a75032ed3bbd066cc23cafa | [
"MIT"
] | null | null | null | convert_points.cpp | tinic/capn-blinky | 8c47b3198957bc785a75032ed3bbd066cc23cafa | [
"MIT"
] | null | null | null | #include <stdint.h>
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <tuple>
constexpr size_t ledsN = 12;
double array[ledsN*2] = {
19.3750,53.5940, // 0 U12
20.9250,61.2250, // 1 U11
29.9010,61.2000, // 2 U10
31.4960,53.8480, // 3 U9
38.9890,39.2430, // 4 U8
33.4720,43.3070, // 5 U7
25.5270,37.8460, // 6 U6
13.8430,38.3540, // 7 U5
17.7240,32.0040, // 8 U4
17.7240,43.1800, // 9 U3
11.3740,30.3530, // 10 U2
8.5800,22.7330, // 11 U1
};
int main() {
double xmin = +100000.0;
double xmax = -100000.0;
double ymin = +100000.0;
double ymax = -100000.0;
double cxa = -100000.0;
double cya = -100000.0;
double cx = (array[ 0*2+0] +
array[ 3*2+0] +
array[ 9*2+0] +
array[ 5*2+0]) / 4;
double cy = (array[ 0*2+1] +
array[ 3*2+1] +
array[ 9*2+1] +
array[ 5*2+1]) / 4;
printf("%f %f\n", cx, cy);
for (size_t c = 0; c < ledsN; c++) {
xmin = std::min(xmin, array[c*2+0]);
xmax = std::max(xmax, array[c*2+0]);
ymin = std::min(ymin, array[c*2+1]);
ymax = std::max(ymax, array[c*2+1]);
cxa = std::max(cxa, fabs(array[c*2+0]-cx));
cya = std::max(cya, fabs(array[c*2+1]-cy));
}
std::vector<std::tuple<double, double, double, double>> coords;
for (size_t c = 0; c < ledsN; c++) {
double xr = (array[c*2+0]-xmin)/(xmax-xmin);
double yr = (array[c*2+1]-ymin)/(ymax-ymin);
double xc = (array[c*2+0]-cx)/cxa;
double yc = (array[c*2+1]-cy)/cya;
coords.push_back({xr, yr, sqrt(xc * xc + yc * yc) / sqrt(2), atan2(yc, xc) + 3.14159265359});
}
std::reverse(coords.begin(),coords.end());
for (size_t c = 0; c < ledsN; c++) {
printf(" {fixed32<24>(%14.12ff), fixed32<24>(%14.12ff), fixed32<24>(%14.12ff), fixed32<24>(%14.12ff)},\n",
std::get<0>(coords[c]),
std::get<1>(coords[c]),
std::get<2>(coords[c]),
std::get<3>(coords[c]));
}
return 0;
}
| 27.582278 | 118 | 0.493804 | [
"vector"
] |
77dfb855147782db21afe90ba04eb457ff264256 | 1,351 | hpp | C++ | src/file/sln/manifest.hpp | moonshadow565/bincollector | e627bd858aa6da4c4fccf7f671e00d400a6576cd | [
"MIT"
] | null | null | null | src/file/sln/manifest.hpp | moonshadow565/bincollector | e627bd858aa6da4c4fccf7f671e00d400a6576cd | [
"MIT"
] | null | null | null | src/file/sln/manifest.hpp | moonshadow565/bincollector | e627bd858aa6da4c4fccf7f671e00d400a6576cd | [
"MIT"
] | 1 | 2021-04-25T09:46:07.000Z | 2021-04-25T09:46:07.000Z | #pragma once
#include <compare>
#include <cinttypes>
#include <string>
#include <span>
#include <vector>
#include <map>
#include <set>
#include <fmt/format.h>
namespace sln {
struct SLNProjectEntry {
std::u8string version = {};
std::size_t unknown1 = {};
std::size_t unknown2 = {};
};
struct SLNLocaleEntry {
std::vector<std::u8string> projects = {};
std::size_t unknown1 = {};
};
struct SLNEntryInfo {
std::u8string name = {};
std::u8string version = {};
std::set<std::u8string> locales = {};
inline bool has_locale(std::set<std::u8string> const& langs) const {
if (langs.empty()) {
return true;
}
for (auto const& lang: langs) {
if (locales.contains(lang)) {
return true;
}
}
return false;
}
};
struct SLNManifest {
std::u8string manifest_version = {};
std::u8string solution_name = {};
std::u8string solution_version = {};
std::map<std::u8string, SLNProjectEntry> projects = {};
std::map<std::u8string, SLNLocaleEntry> locales = {};
static SLNManifest read(std::span<char const> src_data) ;
std::vector<SLNEntryInfo> list_projects() const;
};
}
| 25.490566 | 76 | 0.542561 | [
"vector"
] |
77e1fce431eb79638c419403cc5a89d80a92eb63 | 4,172 | hpp | C++ | mjolnir/forcefield/external/ImplicitMembranePotential.hpp | yutakasi634/Mjolnir | ab7a29a47f994111e8b889311c44487463f02116 | [
"MIT"
] | 12 | 2017-02-01T08:28:38.000Z | 2018-08-25T15:47:51.000Z | mjolnir/forcefield/external/ImplicitMembranePotential.hpp | Mjolnir-MD/Mjolnir | 043df4080720837042c6b67a5495ecae198bc2b3 | [
"MIT"
] | 60 | 2019-01-14T08:11:33.000Z | 2021-07-29T08:26:36.000Z | mjolnir/forcefield/external/ImplicitMembranePotential.hpp | yutakasi634/Mjolnir | ab7a29a47f994111e8b889311c44487463f02116 | [
"MIT"
] | 8 | 2019-01-13T11:03:31.000Z | 2021-08-01T11:38:00.000Z | #ifndef MJOLNIR_POTENTIAL_EXTERNAL_IMPLICIT_MEMBRANE_POTENTIAL_HPP
#define MJOLNIR_POTENTIAL_EXTERNAL_IMPLICIT_MEMBRANE_POTENTIAL_HPP
#include <mjolnir/core/System.hpp>
#include <cmath>
namespace mjolnir
{
/* Implicit membrane potential *
* V(z) = k * tanh(bend * (|z| - thick/2)) *
* dV/dr = (z/|z|) * k * (cosh^2(bend * (|z| - thick/2))) *
* y *
* _________ ^ _______ *
* _________\_____|_____/______x *
* -thick/2 \____|____/ thick/2 *
* -k| *
* Cutoff ratio ensure 1/1000 accuracy. */
template<typename realT>
class ImplicitMembranePotential
{
public:
using real_type = realT;
using parameter_type = real_type;
using container_type = std::vector<parameter_type>;
static constexpr real_type default_cutoff() noexcept
{
return real_type(4);
}
static constexpr parameter_type default_parameter() noexcept
{
return real_type(0);
}
public:
ImplicitMembranePotential(const real_type thick, const real_type k,
const real_type bend, const real_type cutoff_ratio,
const std::vector<std::pair<std::size_t, real_type>>& params)
: half_thick_(thick / 2), k_(k), bend_(bend), cutoff_ratio_(cutoff_ratio)
{
this->parameters_.resize(params.size());
this->participants_.reserve(params.size());
for(const auto& idxp: params)
{
const auto idx = idxp.first;
this->participants_.push_back(idx);
if(idx >= this->parameters_.size())
{
this->parameters_.resize(idx+1, default_parameter());
}
this->parameters_.at(idx) = idxp.second;
}
}
~ImplicitMembranePotential() = default;
real_type potential(const std::size_t i, const real_type z) const noexcept
{
return parameters_[i] * k_ * std::tanh(bend_ * (std::abs(z) - half_thick_));
}
real_type derivative(const std::size_t i, const real_type z) const noexcept
{
return parameters_[i] * std::copysign(real_type(1.0), z) * k_ * bend_ /
std::pow(std::cosh(bend_ * (std::abs(z) - half_thick_)), 2);
}
real_type max_cutoff_length() const noexcept
{
return this->cutoff_ratio_ / this->bend_ + this->half_thick_;
}
// nothing to be done if system parameter (e.g. temperature) changes
template<typename T>
void update(const System<T>&) const noexcept {return;}
std::vector<std::size_t> const& participants() const noexcept
{
return participants_;
}
const char* name() const noexcept {return "ImplicitMembrane";}
real_type half_thick() const noexcept {return half_thick_;}
real_type& half_thick() noexcept {return half_thick_;}
real_type bend() const noexcept {return bend_;}
real_type& bend() noexcept {return bend_;}
real_type k() const noexcept {return k_;}
real_type& k() noexcept {return k_;}
real_type cutoff() const noexcept {return cutoff_ratio_;}
real_type& cutoff() noexcept {return cutoff_ratio_;}
container_type const& parameters() const noexcept {return parameters_;}
container_type& parameters() noexcept {return parameters_;}
private:
real_type half_thick_; // half of thickness of the membrane.
real_type k_; // overall scaling parameter.
real_type bend_; // the slope of tanh curve.
real_type cutoff_ratio_;
container_type parameters_;
std::vector<std::size_t> participants_;
};
#ifdef MJOLNIR_SEPARATE_BUILD
extern template class ImplicitMembranePotential<double>;
extern template class ImplicitMembranePotential<float>;
#endif// MJOLNIR_SEPARATE_BUILD
} // mjolnir
#endif /* MJOLNIR_IMPLICIT_MEMBRANE_POTENTIAL */
| 36.920354 | 84 | 0.594199 | [
"vector"
] |
af81ae8d60ff98d9c04e5ddb40cbe5f0e60893dc | 8,727 | cpp | C++ | src/dynamics.cpp | wztzjhn/Kondo | aced2a7c9ec7be07f4de26fdf72d24bbbb82a005 | [
"Apache-2.0"
] | 2 | 2019-03-12T01:22:45.000Z | 2019-03-12T03:20:05.000Z | src/dynamics.cpp | wztzjhn/Kondo | aced2a7c9ec7be07f4de26fdf72d24bbbb82a005 | [
"Apache-2.0"
] | null | null | null | src/dynamics.cpp | wztzjhn/Kondo | aced2a7c9ec7be07f4de26fdf72d24bbbb82a005 | [
"Apache-2.0"
] | 2 | 2019-03-12T01:22:45.000Z | 2019-03-12T02:47:18.000Z | #include "kondo.h"
#include <cassert>
// project vector p onto plane that is normal to x
vec3 project_tangent(vec3 x, vec3 p) {
return p - x * (p.dot(x) / x.norm2());
}
vec3 gaussian_vec3(fkpm::RNG& rng) {
static std::normal_distribution<double> dist;
return { dist(rng), dist(rng), dist(rng) };
}
class Overdamped: public Dynamics {
public:
Overdamped(double dt) { this->dt = dt; }
void step(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& f = m.dyn_stor[0];
calc_force(m.spin, f);
for (int i = 0; i < m.n_sites; i++) {
vec3 beta = sqrt(dt*2*m.kT()) * gaussian_vec3(rng);
m.spin[i] += project_tangent(m.spin[i], dt*f[i]+beta);
m.spin[i] = m.spin[i].normalized();
}
n_steps++;
m.time = n_steps * dt;
}
};
std::unique_ptr<Dynamics> Dynamics::mk_overdamped(double dt) {
return std::make_unique<Overdamped>(dt);
}
class SLL: public Dynamics {
public:
double alpha;
SLL(double alpha, double dt): alpha(alpha) { this->dt = dt; }
void step(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& s = m.spin;
Vec<vec3>& sp = m.dyn_stor[0];
Vec<vec3>& spp = m.dyn_stor[1];
Vec<vec3>& f = m.dyn_stor[2];
Vec<vec3>& fp = m.dyn_stor[3];
Vec<vec3>& beta = m.dyn_stor[4];
double D = (alpha / (1 + alpha*alpha)) * m.kT();
for (int i = 0; i < m.n_sites; i++) {
beta[i] = sqrt(dt*2*D) * gaussian_vec3(rng);
}
// one euler step starting from s (with force f), accumulated into sp
// TODO: scale D terms by 1/|s_i| ?
// See appendix in Skubic et al., J. Phys.: Condens. Matter 20, 315203 (2008)
auto accum_euler = [&](Vec<vec3> const& s, Vec<vec3> const& f, double scale, Vec<vec3>& sp) {
for (int i = 0; i < m.n_sites; i++) {
vec3 a = - f[i] - alpha*s[i].cross(f[i]);
vec3 sigma = - beta[i] - alpha*s[i].cross(beta[i]);
sp[i] += scale * s[i].cross(a*dt + sigma);
}
};
calc_force(s, f);
sp = s;
accum_euler(s, f, 1.0, sp);
calc_force(sp, fp);
spp = s;
accum_euler(s, f, 0.5, spp);
accum_euler(sp, fp, 0.5, spp);
// copy s = spp, but ensure norm is unchanged (by discretization error)
for (int i = 0; i < m.n_sites; i++) {
if (spp[i].norm() == 0.0) {
assert(s[i].norm() == 0.0);
// no update to s required
}
else {
s[i] = spp[i].normalized() * s[i].norm();
}
}
n_steps++;
m.time = n_steps * dt;
}
};
std::unique_ptr<Dynamics> Dynamics::mk_sll(double alpha, double dt) {
return std::make_unique<SLL>(alpha, dt);
}
class SLL_SIB: public Dynamics {
public:
double alpha;
SLL_SIB(double alpha, double dt): alpha(alpha) { this->dt = dt; }
void step(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& s = m.spin;
Vec<vec3>& sp = m.dyn_stor[0];
Vec<vec3>& spp = m.dyn_stor[1];
Vec<vec3>& f = m.dyn_stor[2];
Vec<vec3>& fp = m.dyn_stor[3];
Vec<vec3>& beta = m.dyn_stor[4];
double D = (alpha / (1 + alpha*alpha)) * m.kT();
for (int i = 0; i < m.n_sites; i++) {
beta[i] = sqrt(dt*2*D) * gaussian_vec3(rng);
}
// one semi-implicit step starting with s (with force f[s]), written to sp
// TODO: scale D terms by 1/|s_i| ?
// See appendix in Skubic et al., J. Phys.: Condens. Matter 20, 315203 (2008)
auto implicit_solve = [&](Vec<vec3> const& s, Vec<vec3> const& f, Vec<vec3>& sp) {
for (int i = 0; i < m.n_sites; i++) {
vec3 w = 0.5 * (- dt*f[i] - alpha*s[i].cross(dt*f[i]) +
- beta[i] - alpha*s[i].cross(beta[i]));
vec3 rhs = s[i] + s[i].cross(w);
double denom = 1 + w.norm2();
sp[i].x = vec3(1+w.x*w.x, w.x*w.y+w.z, w.x*w.z-w.y).dot(rhs) / denom;
sp[i].y = vec3(w.x*w.y-w.z, 1+w.y*w.y, w.y*w.z+w.x).dot(rhs) / denom;
sp[i].z = vec3(w.x*w.z+w.y, w.y*w.z-w.x, 1+w.z*w.z ).dot(rhs) / denom;
// check target equation: sp = s + (s + sp) cross w
assert((sp[i] - s[i] - (s[i]+sp[i]).cross(w)).norm() < 1e-8);
// a mathematical consequence is norm preservation
assert(std::abs(sp[i].norm() - s[i].norm()) < 1e-8);
}
};
calc_force(s, f);
implicit_solve(s, f, sp);
for (int i = 0; i < m.n_sites; i++) {
sp[i] = 0.5 * (s[i] + sp[i]);
}
calc_force(sp, fp);
implicit_solve(s, fp, spp);
s = spp;
n_steps++;
m.time = n_steps * dt;
}
};
std::unique_ptr<Dynamics> Dynamics::mk_sll_sib(double alpha, double dt) {
return std::make_unique<SLL_SIB>(alpha, dt);
}
class GJF: public Dynamics {
public:
double alpha;
double a, b;
double mass = 1;
GJF(double alpha, double dt): alpha(alpha) {
this->dt = dt;
double denom = 1 + alpha*dt/(2*mass);
a = (1 - alpha*dt/(2*mass))/denom;
b = 1 / denom;
}
void init(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& v = m.dyn_stor[0];
Vec<vec3>& f1 = m.dyn_stor[1];
v.assign(m.n_sites, {0,0,0});
calc_force(m.spin, f1);
}
void step(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& s = m.spin;
Vec<vec3>& v = m.dyn_stor[0];
Vec<vec3>& f1 = m.dyn_stor[1];
Vec<vec3>& f2 = m.dyn_stor[2];
Vec<vec3>& beta = m.dyn_stor[3];
for (int i = 0; i < m.n_sites; i++) {
beta[i] = sqrt(dt*2*alpha*m.kT()) * gaussian_vec3(rng);
s[i] += b*dt*v[i] + (b*dt*dt/(2*mass))*f1[i] + (b*dt/(2*mass))*beta[i];
}
calc_force(s, f2);
for (int i = 0; i < m.n_sites; i++) {
v[i] = a*v[i] + (dt/(2*mass))*(a*f1[i] + f2[i]) + (b/mass)*beta[i];
// forces will be reused in the next timestep
f1[i] = f2[i];
}
n_steps++;
m.time = n_steps * dt;
}
double pseudo_kinetic_energy(Model const& m) {
Vec<vec3> const& v = m.dyn_stor[0];
double acc = 0;
for (int i = 0; i < m.n_sites; i++) {
acc += 0.5 * mass * v[i].norm2();
}
return acc;
}
};
std::unique_ptr<Dynamics> Dynamics::mk_gjf(double alpha, double dt) {
return std::make_unique<GJF>(alpha, dt);
}
class GLSD: public Dynamics {
public:
double alpha;
GLSD(double alpha, double dt): alpha(alpha) { this->dt = dt; }
void step(CalcForce const& calc_force, fkpm::RNG& rng, Model& m) {
Vec<vec3>& s = m.spin;
Vec<vec3>& sp = m.dyn_stor[0];
Vec<vec3>& spp = m.dyn_stor[1];
Vec<vec3>& f = m.dyn_stor[2];
Vec<vec3>& fp = m.dyn_stor[3];
Vec<vec3>& noise = m.dyn_stor[4];
for (int i = 0; i < m.n_sites; i++) {
noise[i] = sqrt(2*alpha*m.kT()) * gaussian_vec3(rng);
}
// one euler step starting from s (with force f), accumulated into sp
auto accum_euler = [&](Vec<vec3> const& s, Vec<vec3> const& f, double scale, Vec<vec3>& sp) {
for (int i = 0; i < m.n_sites; i++) {
// magnitude conserving dynamics
double sp_norm = sp[i].norm();
sp[i] += scale*dt*s[i].cross(f[i]);
// magnitude can shift by O(dt^2). manually rescale sp[i] for better accuracy
// TODO: test empirically and justify mathematically?
if (sp[i].norm() > 0.0) {
sp[i] = sp[i].normalized() * sp_norm;
}
// langevin dynamics
sp[i] += scale * (dt*alpha*f[i] + sqrt(dt)*noise[i]);
}
};
calc_force(s, f);
sp = s;
accum_euler(s, f, 1.0, sp);
calc_force(sp, fp);
spp = s;
accum_euler(s, f, 0.5, spp);
accum_euler(sp, fp, 0.5, spp);
s = spp;
n_steps++;
m.time = n_steps * dt;
}
};
std::unique_ptr<Dynamics> Dynamics::mk_glsd(double alpha, double dt) {
return std::make_unique<GLSD>(alpha, dt);
}
| 33.056818 | 101 | 0.482984 | [
"vector",
"model"
] |
af8eca3031ca9d5e344599767288648b26908d82 | 24,761 | cc | C++ | engine/rendering/compositing/triple_buffered_renderer.cc | pikacuh/ink | 08c2abb5a40a3c75fbaa636d39e572dea3547960 | [
"Apache-2.0"
] | 1 | 2021-03-02T22:22:38.000Z | 2021-03-02T22:22:38.000Z | engine/rendering/compositing/triple_buffered_renderer.cc | pikacuh/ink | 08c2abb5a40a3c75fbaa636d39e572dea3547960 | [
"Apache-2.0"
] | null | null | null | engine/rendering/compositing/triple_buffered_renderer.cc | pikacuh/ink | 08c2abb5a40a3c75fbaa636d39e572dea3547960 | [
"Apache-2.0"
] | 1 | 2021-03-02T22:23:12.000Z | 2021-03-02T22:23:12.000Z | // Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ink/engine/rendering/compositing/triple_buffered_renderer.h"
#include <algorithm>
#include <cstddef>
#include <iterator>
#include <memory>
#include <utility>
#include "third_party/glm/glm/glm.hpp"
#include "ink/engine/geometry/algorithms/intersect.h"
#include "ink/engine/geometry/mesh/mesh.h"
#include "ink/engine/geometry/primitives/rect.h"
#include "ink/engine/public/types/status.h"
#include "ink/engine/rendering/baseGL/blit_attrs.h"
#include "ink/engine/rendering/gl_managers/scissor.h"
#include "ink/engine/rendering/renderers/element_renderer.h"
#include "ink/engine/scene/frame_state/frame_state.h"
#include "ink/engine/scene/graph/region_query.h"
#include "ink/engine/scene/graph/scene_graph.h"
#include "ink/engine/scene/types/drawable.h"
#include "ink/engine/scene/types/element_index.h"
#include "ink/engine/scene/types/element_metadata.h"
#include "ink/engine/util/dbg/errors.h"
#include "ink/engine/util/dbg/log.h"
#include "ink/engine/util/dbg/log_levels.h"
#include "ink/engine/util/funcs/step_utils.h"
#include "ink/engine/util/time/time_types.h"
#include "ink/engine/util/time/wall_clock.h"
namespace ink {
TripleBufferedRenderer::TripleBufferedRenderer(
std::shared_ptr<FrameState> frame_state,
std::shared_ptr<GLResourceManager> gl_resources,
std::shared_ptr<input::InputDispatch> input_dispatch,
std::shared_ptr<SceneGraph> scene_graph,
std::shared_ptr<WallClockInterface> wall_clock,
std::shared_ptr<PageManager> page_manager,
std::shared_ptr<LayerManager> layer_manager,
std::shared_ptr<settings::Flags> flags)
: back_region_query_(Rect(0, 0, 0, 0)),
has_drawn_(false),
valid_(false),
front_is_valid_(false), // does the front buffer have valid data
gl_resources_(gl_resources),
element_renderer_(gl_resources),
frame_state_(std::move(frame_state)),
input_dispatch_(std::move(input_dispatch)),
scene_graph_(std::move(scene_graph)),
wall_clock_(std::move(wall_clock)),
page_manager_(std::move(page_manager)),
layer_manager_(std::move(layer_manager)),
flags_(std::move(flags)),
tile_(absl::make_unique<DBRenderTarget>(wall_clock_, gl_resources)),
above_tile_(absl::make_unique<DBRenderTarget>(wall_clock_, gl_resources)),
cached_enable_motion_blur_flag_(
flags_->GetFlag(settings::Flag::EnableMotionBlur)),
current_back_draw_timer_(wall_clock_, false) {
scene_graph_->AddListener(this);
gl_resources_->texture_manager->AddListener(this);
flags_->AddListener(this);
}
TripleBufferedRenderer::~TripleBufferedRenderer() {
flags_->RemoveListener(this);
scene_graph_->RemoveListener(this);
gl_resources_->texture_manager->RemoveListener(this);
}
void TripleBufferedRenderer::Draw(const Camera& cam,
FrameTimeS draw_time) const {
SLOG(SLOG_DRAWING, "triple buffer draw request blitting to window: $0",
cam.WorldWindow());
// If the front buffer doesn't have anything in it, we don't need to blit it.
if (front_buffer_bounds_) {
#ifdef INK_HAS_BLUR_EFFECT
if (cached_enable_motion_blur_flag_) {
if (last_frame_camera_ != cam) {
// If we are blurring, acquire a framerate lock since to guarantee that
// we draw at least one more frame after this one before dropping to 0
// fps.
blur_lock_ = frame_state_->AcquireFramerateLock(30, "blurring");
blit_attrs::BlitMotionBlur attrs(cam.WorldWindow().CalcTransformTo(
last_frame_camera_.WorldWindow()));
tile_->DrawFront(cam, attrs, RotRect(tile_->Bounds()),
*front_buffer_bounds_);
} else {
if (blur_lock_) blur_lock_.reset();
tile_->DrawFront(cam, blit_attrs::Blit(), RotRect(tile_->Bounds()),
*front_buffer_bounds_);
}
} else {
tile_->DrawFront(cam, blit_attrs::Blit(), RotRect(tile_->Bounds()),
*front_buffer_bounds_);
}
#else
// No blur effect on web platform.
tile_->DrawFront(cam, blit_attrs::Blit(), RotRect(tile_->Bounds()),
*front_buffer_bounds_);
#endif // INK_HAS_BLUR_EFFECT
}
auto sorted_new_elements = scene_graph_->GroupifyElements(new_elements_);
for (const auto& group : sorted_new_elements) {
std::unique_ptr<Scissor> scissor;
if (group.bounds.Area() != 0) {
scissor = absl::make_unique<Scissor>(gl_resources_->gl);
scissor->SetScissor(cam, group.bounds, CoordType::kWorld);
}
for (const ElementId& id : group.poly_ids) {
element_renderer_.Draw(id, *scene_graph_, cam, back_time_);
}
}
for (const auto& d : scene_graph_->GetDrawables()) {
d->Draw(cam, draw_time);
}
last_frame_camera_ = cam;
has_drawn_ = true;
}
void TripleBufferedRenderer::DrawAfterTool(const Camera& cam,
FrameTimeS draw_time) const {
if (front_buffer_bounds_ && !layer_manager_->IsActiveLayerTopmost()) {
above_tile_->DrawFront(cam, blit_attrs::Blit(),
RotRect(above_tile_->Bounds()),
*front_buffer_bounds_);
}
}
void TripleBufferedRenderer::Update(const Timer& timer, const Camera& cam,
FrameTimeS draw_time) {
SLOG(SLOG_DRAWING, "triple buffer renderer updating");
if (!has_drawn_) {
// If we haven't drawn, last_frame_camera_ may not yet be correct. Don't
// update buffers & predicted camera until after the first draw.
return;
}
bool single_frame_update_expected =
avg_back_draw_time_.Value() < timer.TimeRemaining();
Camera predicted_cam;
if (single_frame_update_expected || page_manager_->MultiPageEnabled()) {
// If a single frame update is likely, or if the scene is very large and the
// predictor is liable to zoom out spuriously, don't bother with the camera
// predictor.
predicted_cam = cam;
} else {
cam_predictor_.Update(cam, last_frame_camera_);
predicted_cam = cam_predictor_.Predict(cam);
}
static constexpr int kFramesBetweenBufferUpdates = 5;
if (!front_is_valid_ || single_frame_update_expected ||
input_dispatch_->GetNContacts() == 0 ||
frame_state_->GetFrameNumber() % kFramesBetweenBufferUpdates == 0) {
UpdateBuffers(timer, predicted_cam, draw_time);
// Hold a framelock if the this update draw was with a different camera.
if (predicted_cam != cam) {
frame_lock_ = frame_state_->AcquireFramerateLock(
30, "TBR update draw with different camera");
}
}
}
void TripleBufferedRenderer::UpdateBuffers(const Timer& timer,
const Camera& cam,
FrameTimeS draw_time) {
// watch for view change, but only restart:
// if we've finished drawing the old buffer
// or we're flagged to always restart on view change
// or we haven't progressed very far in drawing the new update
bool back_eq_current_wnd =
back_camera_ && cam.WorldWindow() == back_camera_->WorldWindow();
if (!back_eq_current_wnd) {
float coverage = 0;
Rect intersection;
if (back_camera_ &&
geometry::Intersection(back_camera_->WorldWindow(), cam.WorldWindow(),
&intersection))
coverage = intersection.Area() / back_camera_->WorldWindow().Area();
auto tp = util::Lerp(0.2f, 0.6f, util::Normalize(0.8f, 0.1f, coverage));
if (IsBackBufferComplete() ||
current_back_draw_timer_.Elapsed() < tp * avg_back_draw_time_.Value()) {
valid_ = false;
frame_lock_ =
frame_state_->AcquireFramerateLock(30, "TBR !backEqCurrentWnd");
}
}
current_back_draw_timer_.Resume();
bool changed = DrawToBack(timer, cam, draw_time);
current_back_draw_timer_.Pause();
ASSERT(back_camera_.has_value());
if ((changed || !front_is_valid_) && IsBackBufferComplete()) {
SLOG(SLOG_DRAWING, "tiled renderer completed back, resolving...");
tile_->BlitBackToFront();
front_buffer_bounds_ = back_camera_->WorldRotRect();
if (!layer_manager_->IsActiveLayerTopmost()) {
above_tile_->BlitBackToFront();
}
front_is_valid_ = true;
if (cam.WorldWindow() == back_camera_->WorldWindow()) {
frame_lock_.reset();
}
avg_back_draw_time_.Sample(current_back_draw_timer_.Elapsed());
current_back_draw_timer_.Reset();
}
}
bool TripleBufferedRenderer::DrawToBack(const Timer& timer, const Camera& cam,
FrameTimeS draw_time) {
SLOG(SLOG_DRAWING, "tiled renderer drawing to back");
bool changed = false;
if (!valid_) {
InitBackBuffer(cam, draw_time);
// If we are dirty and have no elements, the blank canvas is treated as
// changed before any other drawing. This is needed to have correct
// behavior when the last Element is removed from the back buffer.
changed = backbuffer_elements_.empty();
}
changed |= RenderOutstandingBackBufferElements(timer, cam, draw_time);
// We finished the backbuffer, special case fast path for element adds.
// (Add them directly to the top of the composited result)
if (AllElementsInBackBufferDrawn()) {
changed |= RenderNewElementsToBackBuffer(cam);
}
return changed;
}
void TripleBufferedRenderer::InitBackBuffer(const Camera& cam,
FrameTimeS draw_time) {
SLOG(SLOG_DRAWING, "tiled renderer clearing back buffer");
back_camera_ = cam;
back_region_query_ = RegionQuery::MakeCameraQuery(*back_camera_);
back_time_ = draw_time;
tile_->ClearBack();
above_tile_->ClearBack();
current_back_draw_timer_.Reset();
backbuffer_elements_ =
scene_graph_->ElementsInRegionByGroup(back_region_query_);
backbuffer_set_.clear();
next_id_to_render_ = kInvalidElementId;
backbuffer_id_to_zindex_ = scene_graph_->CopyZIndex();
group_ordering_.clear();
for (const auto& group : backbuffer_elements_) {
group_ordering_[group.group_id] = group_ordering_.size();
top_id_per_group_[group.group_id] = kInvalidElementId;
if (!group.poly_ids.empty()) {
top_id_per_group_[group.group_id] = group.poly_ids.back();
}
std::copy(group.poly_ids.begin(), group.poly_ids.end(),
std::inserter(backbuffer_set_, backbuffer_set_.end()));
}
current_group_index_ = 0;
current_element_index_ = 0;
valid_ = true;
}
bool TripleBufferedRenderer::RenderOutstandingBackBufferElements(
const Timer& timer, const Camera& cam, FrameTimeS draw_time) {
bool drew_anything = false;
float itercount = 0;
const float kBatchSize = 4;
if (current_group_index_ < backbuffer_elements_.size()) {
BindTileForGroup(backbuffer_elements_[current_group_index_].group_id);
}
while (current_group_index_ < backbuffer_elements_.size()) {
std::unique_ptr<Scissor> scissor;
const auto& elements = backbuffer_elements_[current_group_index_];
if (elements.bounds.Area() != 0) {
scissor = absl::make_unique<Scissor>(gl_resources_->gl);
scissor->SetScissor(cam, elements.bounds, CoordType::kWorld);
}
while (current_element_index_ < elements.poly_ids.size()) {
const ElementId& element = elements.poly_ids[current_element_index_];
if (element_renderer_.Draw(element, *scene_graph_, *back_camera_,
back_time_)) {
drew_anything = true;
float cvg = scene_graph_->Coverage(*back_camera_, element);
itercount += util::Lerp(0.25f, 1.0f, util::Normalize(0.0f, 0.4f, cvg));
}
++current_element_index_;
if (itercount > kBatchSize && timer.Expired()) {
break;
}
}
if (current_element_index_ == elements.poly_ids.size()) {
current_element_index_ = 0;
++current_group_index_;
if (current_group_index_ < backbuffer_elements_.size()) {
BindTileForGroup(backbuffer_elements_[current_group_index_].group_id);
}
}
if (itercount > kBatchSize && timer.Expired()) {
break;
}
}
// Note that current_group_index_ and current_element_index_ is pointing
// to the next thing to be processed at this point. Time to bail!
if (AllElementsInBackBufferDrawn()) {
next_id_to_render_ = kInvalidElementId;
} else {
next_id_to_render_ = backbuffer_elements_[current_group_index_]
.poly_ids[current_element_index_];
}
return drew_anything;
}
ElementId TripleBufferedRenderer::GetTopBackBufferElementForGroup(
const GroupId& group_id) const {
auto it = top_id_per_group_.find(group_id);
if (it == top_id_per_group_.end()) {
return kInvalidElementId;
}
return it->second;
}
bool TripleBufferedRenderer::RenderNewElementsToBackBuffer(const Camera& cam) {
bool drew_anything = false;
// If we get an add and then an invalidate an element could end up in
// backbuffer_elements_ and new_elements_ as we requery backbuffer_elements_
// on invalidation.
//
// We can't simply clear new_elements_ on invalidate (we have to wait
// until blit backToFront), as doing so could cause elements to be
// dropped and not drawn until the recomposite is complete
const auto& new_elements_to_draw = new_elements_filter_.Filter(
new_elements_.size(), new_elements_.begin(), new_elements_.end(),
backbuffer_set_.begin(), backbuffer_set_.end(),
scene_element::LessByHandle);
auto sorted_new_elements =
scene_graph_->GroupifyElements(new_elements_to_draw);
bool was_empty = group_ordering_.empty();
for (const auto& group : sorted_new_elements) {
if (was_empty) {
// If the backbuffer was previously empty, add the new groups.
group_ordering_[group.group_id] = group_ordering_.size();
}
std::unique_ptr<Scissor> scissor;
if (group.bounds.Area() != 0) {
scissor = absl::make_unique<Scissor>(gl_resources_->gl);
scissor->SetScissor(cam, group.bounds, CoordType::kWorld);
}
BindTileForGroup(group.group_id);
uint32_t top_backbuffer_zindex = 0;
auto& id_to_zindex = backbuffer_id_to_zindex_[group.group_id];
auto top_element = GetTopBackBufferElementForGroup(group.group_id);
if (!id_to_zindex.empty() && top_element != kInvalidElementId) {
top_backbuffer_zindex = id_to_zindex[top_element];
}
for (const ElementId& id : group.poly_ids) {
if (element_renderer_.Draw(id, *scene_graph_, cam, back_time_)) {
SLOG(SLOG_DRAWING,
"transferring id $0 from newelements to the backbuffer", id);
drew_anything = true;
backbuffer_set_.insert(id);
++top_backbuffer_zindex;
id_to_zindex[id] = top_backbuffer_zindex;
top_id_per_group_[group.group_id] = id;
}
}
}
new_elements_.clear();
return drew_anything;
}
bool TripleBufferedRenderer::IsBackBufferComplete() const {
return new_elements_.empty() && AllElementsInBackBufferDrawn();
}
bool TripleBufferedRenderer::AllElementsInBackBufferDrawn() const {
return current_group_index_ == backbuffer_elements_.size();
}
void TripleBufferedRenderer::OnElementAdded(SceneGraph* graph, ElementId id) {
if (id.Type() == GROUP) {
Invalidate();
return;
}
if (graph->IsElementInRegion(id, back_region_query_)) {
SLOG(SLOG_DATA_FLOW, "tbr adding $0, id $1 ", id.Type(), id.Handle());
new_elements_.insert(id);
frame_lock_ = frame_state_->AcquireFramerateLock(30, "TBR onElementAdded");
if (NeedToInvalidateToAddElement(id)) {
Invalidate();
}
} else {
SLOG(SLOG_DATA_FLOW,
"tbr saw addition of $0, but the visibility test didn't pass. "
"Ignoring.",
id);
}
}
bool TripleBufferedRenderer::NeedToInvalidateToAddElement(
const ElementId& id) const {
// If there was nothing already drawn, we can simply add the element.
if (group_ordering_.empty()) return false;
// If the backbuffer is already going to be redrawn, don't add the element
// yet.
if (!valid_) return true;
// If the thing I just added is < z index of the last thing I want to
// render, then we should invalidate.
auto parent = scene_graph_->GetParentGroupId(id);
// If I don't know about this parent in the backbuffer. We don't know the
// relative ordering of this group relative to the groups already known, so
// invalidate the backbuffer.
auto group_iter = group_ordering_.find(parent);
if (group_iter == group_ordering_.end()) {
return true;
}
// If this isn't in the last group being rendered, then we need
// to invalidate.
if (group_iter->second != group_ordering_.size() - 1) {
return true;
}
// OK, this is rendering the last group. We better have a top element for
// that group.
auto last_composite_id = GetTopBackBufferElementForGroup(parent);
ASSERT(last_composite_id != kInvalidElementId);
const auto& scene_element_index = scene_graph_->GetElementIndex();
auto group_index_iter = scene_element_index.find(parent);
// We got the parent from the scene... the index should exist.
ASSERT(group_index_iter != scene_element_index.end());
// lastCompositeId isn't necessarily in sceneGraph_->getElementIndex().
// However, we'll already be invalid if it isn't (due to the remove)
auto last_composite_z = group_index_iter->second->ZIndexOf(last_composite_id);
auto z_id_to_add = group_index_iter->second->ZIndexOf(id);
bool res = z_id_to_add < last_composite_z;
SLOG(SLOG_DATA_FLOW,
"tbr saw addition of $0, invalidating is: $1. (zIdToAdd: $2, "
"lastCompositeZ: $3)",
id, res, z_id_to_add, last_composite_z);
return res;
}
bool TripleBufferedRenderer::NeedToInvalidateToMutateElement(
const ElementId& id) const {
// If we've completed compositing, we need to invalidate
if (AllElementsInBackBufferDrawn()) {
return true;
}
// We only need to invalidate if we've already rendered this id.
auto parent = scene_graph_->GetParentGroupId(id);
auto next_parent = scene_graph_->GetParentGroupId(next_id_to_render_);
if (group_ordering_.find(parent) == group_ordering_.end()) {
// Don't know about this group.
return false;
}
if (parent != next_parent) {
auto group_index = group_ordering_.find(parent)->second;
if (group_index > current_group_index_) {
// If compositing progress hasn't reached this id's group, we don't need
// to recomposite.
return false;
}
// We definitely need to invalidate. We're past rendering this.
return true;
}
// OK, the parents are the same. If we can't find this group, then we
// have nothing to do. This shouldn't happen because of the earlier check.
auto zindex_iter = backbuffer_id_to_zindex_.find(parent);
if (zindex_iter == backbuffer_id_to_zindex_.end()) {
return false;
}
const auto& id_to_zindex = zindex_iter->second;
auto itr_zto_modify = id_to_zindex.find(id);
// If we're not compositing the element, we don't need to invalidate
if (itr_zto_modify == id_to_zindex.end()) {
return false;
}
// z index of the item currently being composited
auto itr_ztop = id_to_zindex.find(next_id_to_render_);
ASSERT(itr_ztop != id_to_zindex.end());
// If compositing progress hasn't reached this zIndex, we don't need to
// recomposite, else, we do
return itr_zto_modify->second < itr_ztop->second;
}
void TripleBufferedRenderer::OnElementRemoved(ElementId removed_id) {
SLOG(SLOG_DATA_FLOW, "tbr removing element id $0", removed_id);
if (removed_id.Type() == GROUP) {
Invalidate();
return;
}
auto fid = new_elements_.find(removed_id);
if (fid != new_elements_.end()) {
new_elements_.erase(fid);
} else {
Invalidate();
}
frame_lock_ = frame_state_->AcquireFramerateLock(30, "TBR onElementRemoved");
}
void TripleBufferedRenderer::OnElementsRemoved(
SceneGraph* graph, const std::vector<SceneGraphRemoval>& removed_elements) {
for (auto removed : removed_elements) {
OnElementRemoved(removed.id);
}
}
void TripleBufferedRenderer::OnElementsMutated(
SceneGraph* graph, const std::vector<ElementMutationData>& mutation_data) {
bool needs_recomposite = false;
for (const auto& data : mutation_data) {
const auto& old_data = data.original_element_data;
const auto& new_data = data.modified_element_data;
if (old_data.id.Type() == GROUP) {
needs_recomposite = true;
continue;
}
bool was_visible =
old_data.rendered_by_main &&
(std::count(new_elements_.begin(), new_elements_.end(), old_data.id) ||
std::count(backbuffer_set_.begin(), backbuffer_set_.end(),
old_data.id));
bool is_visible = graph->IsElementInRegion(new_data.id, back_region_query_);
if (was_visible && !is_visible) { // went invisible
SLOG(SLOG_DATA_FLOW,
"tbr saw visibility mutation of $0. Treating as a remove",
new_data.id);
OnElementRemoved(new_data.id);
} else if (!was_visible && is_visible) { // became visible
SLOG(SLOG_DATA_FLOW,
"tbr saw visibility mutation of $0. Treating as a add", new_data.id);
OnElementAdded(graph, new_data.id);
}
if (!needs_recomposite && is_visible &&
(old_data.world_transform != new_data.world_transform ||
old_data.color_modifier != new_data.color_modifier) &&
NeedToInvalidateToMutateElement(new_data.id)) {
needs_recomposite = true;
}
}
if (needs_recomposite) {
Invalidate();
}
}
void TripleBufferedRenderer::Resize(glm::ivec2 size) {
tile_->Resize(size);
above_tile_->Resize(size);
backbuffer_elements_.clear();
backbuffer_set_.clear();
next_id_to_render_ = kInvalidElementId;
current_group_index_ = 0;
current_element_index_ = 0;
valid_ = false;
front_is_valid_ = false;
frame_lock_ = frame_state_->AcquireFramerateLock(30, "TBR resize");
}
void TripleBufferedRenderer::Invalidate() {
frame_lock_ = frame_state_->AcquireFramerateLock(30, "TBR invalidate");
valid_ = false;
}
void TripleBufferedRenderer::Synchronize(FrameTimeS draw_time) {
// last_frame_camera_ only meaningful if we've already drawn.
if (has_drawn_) {
Camera cam = last_frame_camera_;
cam.UnFlipWorldToDevice(); // UpdateBuffers expects an unflipped camera.
Timer t(wall_clock_, 2);
UpdateBuffers(t, cam, draw_time);
if (!IsBackBufferComplete()) {
ASSERT(t.Expired());
SLOG(SLOG_WARNING, "giving up on tbr sync point after $0 seconds",
static_cast<double>(t.TargetInterval()));
}
frame_state_->RequestFrame();
}
}
glm::ivec2 TripleBufferedRenderer::RenderingSize() const {
return tile_->GetSize();
}
void TripleBufferedRenderer::OnTextureLoaded(const TextureInfo& info) {
Invalidate();
}
void TripleBufferedRenderer::OnTextureEvicted(const TextureInfo& info) {
Invalidate();
}
void TripleBufferedRenderer::BindTileForGroup(const GroupId& group_id) const {
if (!layer_manager_->IsActive() || group_id == kInvalidElementId) {
tile_->BindBack(); // Rendering elements attached to root.
} else { // Check if group is a layer above the active layer.
auto layer_z_index_or = layer_manager_->IndexForLayerWithGroupId(group_id);
if (!layer_z_index_or.ok()) {
SLOG(SLOG_ERROR, "No z-index for group $0, status $1, binding back tile.",
group_id, layer_z_index_or.status());
tile_->BindBack();
return;
}
auto active_layer_z_index_or = layer_manager_->IndexOfActiveLayer();
if (!active_layer_z_index_or.ok()) {
SLOG(SLOG_ERROR,
"No active layer index but layer manager was active, status $0, "
"binding back tile.",
active_layer_z_index_or.status());
tile_->BindBack();
return;
}
if (layer_z_index_or.ValueOrDie() > active_layer_z_index_or.ValueOrDie()) {
above_tile_->BindBack();
} else {
tile_->BindBack();
}
}
}
void TripleBufferedRenderer::OnFlagChanged(settings::Flag which,
bool new_value) {
if (which == settings::Flag::EnableMotionBlur) {
cached_enable_motion_blur_flag_ = new_value;
}
}
} // namespace ink
| 37.403323 | 80 | 0.695812 | [
"mesh",
"geometry",
"render",
"vector"
] |
af8fb885168a50b9c35fc0f459d4efc0b6f37a64 | 953 | cpp | C++ | ServerExample/Metal.cpp | alwayssmile11a1/MultiplayerGameServer | cd4227ecc5fe1b44d427bcbd76c050a8130d2200 | [
"MIT"
] | null | null | null | ServerExample/Metal.cpp | alwayssmile11a1/MultiplayerGameServer | cd4227ecc5fe1b44d427bcbd76c050a8130d2200 | [
"MIT"
] | null | null | null | ServerExample/Metal.cpp | alwayssmile11a1/MultiplayerGameServer | cd4227ecc5fe1b44d427bcbd76c050a8130d2200 | [
"MIT"
] | null | null | null | #include "Metal.h"
Metal::Metal()
{
//Setup body
BodyDef bodyDef;
bodyDef.bodyType = Body::BodyType::Static;
bodyDef.position.Set(0, 0);
bodyDef.size.Set(8 * 3.1f, 8 * 3.1f);
mMainBody = WorldCollector::GetWorld('PS')->CreateBody(bodyDef);
mMainBody->categoryBits = METAL_BIT;
mMainBody->maskBits = PLAYER_BIT | BULLET_BIT | ENEMY_BIT;
mMainBody->PutExtra(this);
TexturePacker p = TexturePacker(&SharedTextures::BattleCityTexture, "../Resources/battlecity.xml");
mSprite.SetRegion(p.GetRegion("metal")[0]);
mSprite.SetSize(26, 26);
}
Metal::~Metal()
{
}
void Metal::Render(SpriteBatch *batch)
{
batch->Draw(mSprite);
}
void Metal::Update(float dt)
{
}
uint32_t Metal::OnNetworkWrite(OutputMemoryBitStream & inOutputStream, uint32_t inDirtyState) const
{
inOutputStream.Write(mMainBody->GetPosition());
return 1;
}
void Metal::OnNetworkDestroy()
{
WorldCollector::GetWorld('PS')->DestroyBody(mMainBody);
mMainBody = nullptr;
} | 20.717391 | 100 | 0.729276 | [
"render"
] |
afa052d2d607e6d5b75d6ce84a7af2c91dcd793c | 1,321 | cpp | C++ | leetcode-problems/medium-1130-minimum-cost-tree-from-leaf-value.cpp | formatkaka/dsalgo | a7c7386c5c161e23bc94456f93cadd0f91f102fa | [
"Unlicense"
] | null | null | null | leetcode-problems/medium-1130-minimum-cost-tree-from-leaf-value.cpp | formatkaka/dsalgo | a7c7386c5c161e23bc94456f93cadd0f91f102fa | [
"Unlicense"
] | null | null | null | leetcode-problems/medium-1130-minimum-cost-tree-from-leaf-value.cpp | formatkaka/dsalgo | a7c7386c5c161e23bc94456f93cadd0f91f102fa | [
"Unlicense"
] | null | null | null | //
// Created by Siddhant on 2019-10-31.
//
#include "iostream"
#include "vector"
#include "string"
#include "algorithm"
#include "unordered_map"
using namespace std;
unordered_map<string, int> map;
string vecToString(vector<int> vec){
string res = "";
for (int i = 0; i < vec.size(); ++i) {
res += vec[i] + ',';
}
return res;
}
int mctFromLeafValues(vector<int>& arr) {
if(arr.size() == 1){
return 0;
}
string st = vecToString(arr);
if(!map.empty() && (map.find(st) != map.end())){
cout << "using from cache : " << st << " " << map[st] << endl;
return map[st];
}
int maxSum = INT_MAX;
for (int i = 1; i < arr.size(); ++i) {
vector<int> arrLeft(arr.begin(), arr.begin()+i);
vector<int> arrRight(arr.begin()+i, arr.end());
int leftSum = mctFromLeafValues(arrLeft);
int rightSum = mctFromLeafValues(arrRight);
int rootMult = (*max_element(arrLeft.begin(), arrLeft.end()))*(*max_element(arrRight.begin(), arrRight.end()));
int sum = leftSum + rightSum + rootMult;
maxSum = min(maxSum, sum);
}
map.insert(make_pair(st, maxSum));
return maxSum;
}
int main(){
vector<int> vec = {1,2,3,4,5,6,7,8};
cout << "ans : " << mctFromLeafValues(vec);
return 0;
} | 20.968254 | 119 | 0.564724 | [
"vector"
] |
afa0b1dbb18d4ab856b52824b49ae9f6dbd4396d | 2,608 | cpp | C++ | tetris/board.cpp | citrus610/ltbp | ddd1c2754d59ef1bcaf89455f2066c60866cb47a | [
"BSD-3-Clause",
"MIT"
] | null | null | null | tetris/board.cpp | citrus610/ltbp | ddd1c2754d59ef1bcaf89455f2066c60866cb47a | [
"BSD-3-Clause",
"MIT"
] | null | null | null | tetris/board.cpp | citrus610/ltbp | ddd1c2754d59ef1bcaf89455f2066c60866cb47a | [
"BSD-3-Clause",
"MIT"
] | null | null | null | #include "piece.h"
#include "board.h"
namespace tetris
{
board :: board()
{
this->reset();
};
void board :: reset()
{
for (int y = 0; y < 40; ++y) {
for (int x = 0; x < 10; ++x) {
this->set(x, y, TYPE_NULL);
}
}
};
int board :: get(int x, int y)
{
return this->data[y][x];
};
int board :: get_clear()
{
int clear = 0;
for (int y = 0; y < 40; ++y) {
int row_sum = 0;
for (int x = 0; x < 10; ++x) {
row_sum += this->is_occupied(x, y);
}
clear += row_sum == 10;
}
return clear;
};
int board :: get_clear(piece& piece)
{
board copy = *this;
piece.place(copy);
return copy.get_clear();
};
int board :: get_tspin(piece& piece, int index)
{
return piece.get_tspin(*this, index);
};
int board :: set(int x, int y, int type)
{
this->data[y][x] = type;
return type;
};
bool board :: is_occupied(int x, int y)
{
if (x < 0 || x > 9 || y < 0 || y > 39) {
return true;
}
return this->get(x, y) != TYPE_NULL;
};
bool board :: is_colliding(piece& piece)
{
return this->is_colliding(piece.x, piece.y, piece.type, piece.rotation);
};
bool board :: is_colliding(int x, int y, int type, int rotation)
{
for (int i = 0; i < 4; ++i) {
int cell_x = PIECE_LUT[type][rotation][i][0] + x;
int cell_y = PIECE_LUT[type][rotation][i][1] + y;
if (this->is_occupied(cell_x, cell_y)) {
return true;
}
}
return false;
};
bool board :: is_perfect()
{
for (int y = 0; y < 40; ++y) {
for (int x = 0; x < 10; ++x) {
if (this->is_occupied(x, y)) {
return false;
}
}
}
return true;
};
bool board :: clear()
{
std::vector<int> full;
full.clear();
for (int y = 0; y < 40; ++y) {
int row_sum = 0;
for (int x = 0; x < 10; ++x) {
row_sum += this->is_occupied(x, y);
}
if (row_sum == 10) {
full.push_back(y);
}
}
if (full.empty()) {
return false;
}
std::sort(full.begin(), full.end(), std::greater<int>());
for (int i = 0; i < int(full.size()); ++i) {
for (int y = full[i]; y < 39; ++y) {
for (int x = 0; x < 10; ++x) {
this->set(x, y, this->get(x, y + 1));
}
}
for (int x = 0; x < 10; ++x) {
this->set(x, 39, TYPE_NULL);
}
}
return true;
};
}; | 21.032258 | 77 | 0.442868 | [
"vector"
] |
afa4c60e365afe5775927a340f8a938d3f6d9a09 | 2,333 | hpp | C++ | src/BmpFontGenerator.hpp | StratifyLabs/uxtool | 5e2e37be6a073577d046002b6aba3868c1a4573e | [
"MIT"
] | null | null | null | src/BmpFontGenerator.hpp | StratifyLabs/uxtool | 5e2e37be6a073577d046002b6aba3868c1a4573e | [
"MIT"
] | null | null | null | src/BmpFontGenerator.hpp | StratifyLabs/uxtool | 5e2e37be6a073577d046002b6aba3868c1a4573e | [
"MIT"
] | null | null | null | #ifndef BMPFONTGENERATOR_HPP
#define BMPFONTGENERATOR_HPP
#include "Options.hpp"
#include "Object.hpp"
class BmpFontGeneratorCharacter {
public:
BmpFontGeneratorCharacter(
const Bitmap & bitmap,
const sg_font_char_t & font_character){
m_bitmap = bitmap;
m_font_character = font_character;
}
bool operator == (const BmpFontGeneratorCharacter & a) const {
return font_character().id == a.font_character().id;
}
bool operator < (const BmpFontGeneratorCharacter & a) const {
return font_character().id < a.font_character().id;
}
bool operator > (const BmpFontGeneratorCharacter & a) const {
return font_character().id > a.font_character().id;
}
const Bitmap & bitmap() const {
return m_bitmap;
}
const sg_font_char_t & font_character() const {
return m_font_character;
}
sg_font_char_t & font_character(){
return m_font_character;
}
private:
Bitmap m_bitmap;
sg_font_char_t m_font_character;
};
class BmpFontGenerator : public Object {
public:
BmpFontGenerator();
bool convert(const Options& options);
void set_map_output_file(const String & path){
m_map_output_file = path;
}
void clear(){
m_character_list.clear();
}
int import_map(const String & map);
int generate_font_file(const String & destination);
var::Vector<BmpFontGeneratorCharacter> & character_list(){ return m_character_list; }
const var::Vector<BmpFontGeneratorCharacter> & character_list() const { return m_character_list; }
var::Vector<sg_font_kerning_pair_t> & kerning_pair_list(){ return m_kerning_pair_list; }
const var::Vector<sg_font_kerning_pair_t> & kerning_pair_list() const { return m_kerning_pair_list; }
//var::Vector<Bitmap> & bitmap_list(){ return m_bitmap_list; }
//const var::Vector<Bitmap> & bitmap_list() const { return m_bitmap_list; }
void set_is_ascii(bool value = true){ m_is_ascii = true; }
private:
int generate_map_file(const sg_font_header_t & header, const var::Vector<Bitmap> & master_canvas_list);
var::String m_map_output_file;
bool m_is_ascii;
var::Vector<Bitmap> build_master_canvas(const sg_font_header_t & header);
//var::Vector<sg_font_char_t> m_character_list;
//var::Vector<Bitmap> m_bitmap_list;
var::Vector<sg_font_kerning_pair_t> m_kerning_pair_list;
var::Vector<BmpFontGeneratorCharacter> m_character_list;
};
#endif // BMPFONTGENERATOR_HPP
| 26.511364 | 104 | 0.761252 | [
"object",
"vector"
] |
afa733193d6830c1d9de3bd2e458f62a44d2debd | 2,668 | cpp | C++ | HybridRenderer/HybridRenderer/RenderPass.cpp | lbondi7/HybridRenderer | 592ff5c4ea9039bc79a99e20c848f11e2669f885 | [
"MIT"
] | null | null | null | HybridRenderer/HybridRenderer/RenderPass.cpp | lbondi7/HybridRenderer | 592ff5c4ea9039bc79a99e20c848f11e2669f885 | [
"MIT"
] | null | null | null | HybridRenderer/HybridRenderer/RenderPass.cpp | lbondi7/HybridRenderer | 592ff5c4ea9039bc79a99e20c848f11e2669f885 | [
"MIT"
] | null | null | null | #include "RenderPass.h"
#include "Utility.h"
#include "Initilizers.h"
#include <thread>
#include <array>
#include <stdexcept>
RenderPass::~RenderPass()
{
devices = nullptr;
swapChain = nullptr;
}
void RenderPass::Begin(VkCommandBuffer cmdBuffer, VkFramebuffer frameBuffer, VkExtent2D extent, const VkClearValue* pClearValues, uint32_t clearValueCount)
{
VkRenderPassBeginInfo renderPassBeginInfo = Initialisers::renderPassBeginInfo(vkRenderPass, frameBuffer,
extent, clearValueCount, pClearValues);
vkCmdBeginRenderPass(cmdBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
}
void RenderPass::End(VkCommandBuffer cmdBuffer)
{
vkCmdEndRenderPass(cmdBuffer);
}
void RenderPass::Create(DeviceContext* _devices, RenderPassInfo& _info)
{
devices = _devices;
info = _info;
Init();
}
void RenderPass::Init()
{
std::vector<VkAttachmentDescription> attachments;
attachments.reserve(info.attachments.size());
std::vector< VkAttachmentReference> references;
references.reserve(info.attachments.size());
VkSubpassDescription subpass = Initialisers::subpassDescription(VK_PIPELINE_BIND_POINT_GRAPHICS);
uint32_t idx = 0;
for (const auto& attachment : info.attachments)
{
attachments.emplace_back(
Initialisers::attachmentDescription(attachment.format,
VK_SAMPLE_COUNT_1_BIT, attachment.loadOp, VK_ATTACHMENT_STORE_OP_STORE,
VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE,
attachment.initialLayout, attachment.finalLayout));
if (attachment.type == AttachmentType::COLOUR) {
references.emplace_back(Initialisers::attachmentReference(idx, attachment.referenceLayout));
subpass.colorAttachmentCount = 1;
subpass.pColorAttachments = &references[idx];
}
else if (attachment.type == AttachmentType::DEPTH) {
references.emplace_back(Initialisers::attachmentReference(idx, attachment.referenceLayout));
subpass.pDepthStencilAttachment = &references[idx];
}
++idx;
}
VkRenderPassCreateInfo renderPassInfo = Initialisers::renderPassCreateInfo(static_cast<uint32_t>(attachments.size()), attachments.data(),
1, &subpass, static_cast<uint32_t>(info.dependencies.size()), info.dependencies.data());
if (vkCreateRenderPass(devices->logicalDevice, &renderPassInfo, nullptr, &vkRenderPass) != VK_SUCCESS) {
throw std::runtime_error("failed to create render pass!");
}
}
void RenderPass::Destroy() {
vkDestroyRenderPass(devices->logicalDevice, vkRenderPass, nullptr);
}
| 32.144578 | 155 | 0.723013 | [
"render",
"vector"
] |
afc2ed1d35635db22916a58fa92eba7db4b607cc | 977 | cc | C++ | backtracking/131.cc | MingfeiPan/leetcode | 55dc878cfb7b15a34252410ae7420a656da604f8 | [
"Apache-2.0"
] | null | null | null | backtracking/131.cc | MingfeiPan/leetcode | 55dc878cfb7b15a34252410ae7420a656da604f8 | [
"Apache-2.0"
] | null | null | null | backtracking/131.cc | MingfeiPan/leetcode | 55dc878cfb7b15a34252410ae7420a656da604f8 | [
"Apache-2.0"
] | null | null | null | class Solution {
public:
vector<vector<string>> partition(string s) {
std::vector<std::vector<std::string>> ret;
std::vector<std::string> cur;
recur(ret, s, 0, cur);
return ret;
}
private:
void recur(std::vector<std::vector<std::string>>& ret, string s, int index, std::vector<std::string>& cur) {
if (index == s.size()) {
// ret.emplace_back(std::move(cur));
ret.emplace_back(cur);
return;
}
for (int i = index+1; i <= s.size(); ++i) {
std::string temp = s.substr(index, i-index);
if (isPalin(temp)) {
cur.emplace_back(std::move(temp));
recur(ret, s, i, cur);
cur.pop_back();
}
}
}
bool isPalin(std::string& s) {
for (int i = 0, j = s.size()-1; i < j; ++i, --j) {
if (s[i] != s[j])
return false;
}
return true;
}
};
| 29.606061 | 112 | 0.460594 | [
"vector"
] |
afc392b4b6ac972b6d4fa16c1e254847791c80b4 | 703 | hpp | C++ | ChaosGL/Framebuffer.hpp | chaosarts/ChaosGL.cpp | 7d851a404824609547fb9261790b87cee7699d5c | [
"Apache-2.0"
] | null | null | null | ChaosGL/Framebuffer.hpp | chaosarts/ChaosGL.cpp | 7d851a404824609547fb9261790b87cee7699d5c | [
"Apache-2.0"
] | null | null | null | ChaosGL/Framebuffer.hpp | chaosarts/ChaosGL.cpp | 7d851a404824609547fb9261790b87cee7699d5c | [
"Apache-2.0"
] | null | null | null | //
// Framebuffer.hpp
// ChaosGL
//
// Created by Fu Lam Diep on 20.03.16.
// Copyright © 2016 Fu Lam Diep. All rights reserved.
//
#ifndef ChaosGL_Framebuffer_hpp
#define ChaosGL_Framebuffer_hpp
#include "ChaosGL.hpp"
namespace chaosgl
{
/**
* Class wrapper for framebuffers
*/
class Framebuffer
{
private:
/** Provides the id of the frame buffer */
GLuint _id;
public:
/**
* Creates a new Framebuffer object
*/
Framebuffer ();
/**
* Destroys a Framebuffer object
*/
virtual ~Framebuffer ();
/**
* Returns the id
*/
GLuint getId ();
/**
* Binds the framebuffer
*/
void bind ();
};
}
#endif /* Framebuffer_hpp */
| 13.018519 | 54 | 0.603129 | [
"object"
] |
afc5a573556a274582018d485d11d4e3dd3706cd | 2,589 | cpp | C++ | src/NonGravitar.cpp | newnone/Non-Gravitar | 9d21cf7ab5ef49f6976fcaf25fa01cacbb209740 | [
"MIT"
] | null | null | null | src/NonGravitar.cpp | newnone/Non-Gravitar | 9d21cf7ab5ef49f6976fcaf25fa01cacbb209740 | [
"MIT"
] | null | null | null | src/NonGravitar.cpp | newnone/Non-Gravitar | 9d21cf7ab5ef49f6976fcaf25fa01cacbb209740 | [
"MIT"
] | null | null | null | // MIT License
//
// Copyright (c) 2018 Oscar B.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#include <functional>
#include <memory>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include "shape-group/GridShapeLayout.hpp"
#include "control/Game.hpp"
#include "control/SolarSystemSceneBuilder.hpp"
void closeWindow (sf::RenderWindow &w, sf::Event e);
int main () {
auto const mode = sf::VideoMode::getDesktopMode();
sf::RenderWindow w{mode, "Non-Gravitar"};
sf::Event e;
auto game = gvt::Game::getInstance();
auto centerPos = gvt::Vectord({1000, 700});
unsigned planetsNum = 5;
auto ssBuilder = gvt::SolarSystemSceneBuilder().
centerPosition(centerPos).
planetsNumber(planetsNum).
planetsLayout(std::make_shared<gvt::RoundShapeLayout>(
centerPos, 400, planetsNum
)).
planetBuilder(std::make_shared<gvt::RandomPlanetBuilder>(
gvt::Vectord{30, 50}, 30, 5, 2
));
auto rootScene = ssBuilder();
w.setFramerateLimit(60);
rootScene->shapeGroup()->insert(game->spaceship());
game->pushScene(rootScene);
rootScene->solarSystem()->spawnArea()->centerShape(
game->spaceship()
);
game->viewEventsDispatcher().addCallback(
[&w] (sf::Event const &e) -> void { closeWindow(w, e); }
);
while (w.isOpen()) {
while (w.pollEvent(e))
game->viewEventsDispatcher().raiseEvent(e);
game->updateGameLoop();
w.clear(sf::Color(10, 10, 10));
w.draw(*game);
w.display();
}
return EXIT_SUCCESS;
}
void closeWindow (sf::RenderWindow &w, sf::Event e) {
if (e.type == sf::Event::Closed)
w.close();
}
| 31.192771 | 81 | 0.718424 | [
"shape"
] |
afc7ec5b37bb5f05f574b1e3eb9df433c6866289 | 11,705 | hpp | C++ | RobWork/src/rw/graphics/SceneCamera.hpp | ZLW07/RobWork | e713881f809d866b9a0749eeb15f6763e64044b3 | [
"Apache-2.0"
] | 1 | 2021-12-29T14:16:27.000Z | 2021-12-29T14:16:27.000Z | RobWork/src/rw/graphics/SceneCamera.hpp | ZLW07/RobWork | e713881f809d866b9a0749eeb15f6763e64044b3 | [
"Apache-2.0"
] | null | null | null | RobWork/src/rw/graphics/SceneCamera.hpp | ZLW07/RobWork | e713881f809d866b9a0749eeb15f6763e64044b3 | [
"Apache-2.0"
] | null | null | null | /********************************************************************************
* Copyright 2009 The Robotics Group, The Maersk Mc-Kinney Moller Institute,
* Faculty of Engineering, University of Southern Denmark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
#ifndef RW_GRAPHICS_SCENECAMERA_HPP_
#define RW_GRAPHICS_SCENECAMERA_HPP_
#include "SceneNode.hpp"
#include <rw/graphics/DrawableNode.hpp>
#include <rw/math/ProjectionMatrix.hpp>
#include <rw/sensor/Image.hpp>
namespace rw { namespace geometry {
class PointCloud;
}} // namespace rw::geometry
namespace rw { namespace graphics {
/**
* @brief Node representing a camera in the scene. A SceneCamera sets up everything
* from rendering buffer to perspective transform.
*/
class SceneCamera : public SceneNode
{
public:
//! @brief Smart pointer type for SceneCamera.
typedef rw::core::Ptr< SceneCamera > Ptr;
//! @brief Mode for aspect ratio control.
typedef enum {
Auto, //!< The aspect is automatically adjusted to fit entire viewport
Scale, //!< the aspect ratio is fixed and the scaling is performed such that the
//!< largest picure is obtained
ScaleX, //!< the apect ratio is fixed and the scaling is performed along x-axis
ScaleY, //!< the apect ratio is fixed and the scaling is performed along y-axis
Fixed //!< the aspect ratio is fixed.
} AspectRatioControl;
/**
* @brief constructor
* @param name [in] name of camera
* @param subGraph [in] the root of the subgraph that this camera is supposed to render.
*/
SceneCamera (const std::string& name, SceneNode::Ptr subGraph);
//! @brief destructor
virtual ~SceneCamera ();
// Projection matrix stuff
/**
* @brief sets the projection matrix of this camera to be a perspective projection
* @param fov [in] field of view in radians.
* @param w [in] view width
* @param h [in] view height
* @param zNear [in] near clipping plane
* @param zFar [in] far clipping plane
*/
void setPerspective (double fov, int w, int h, double zNear, double zFar);
/**
* @brief gets the projection matrix
* @return the current camera projection matrix
*/
virtual rw::math::ProjectionMatrix getProjectionMatrix ();
/**
* @brief sets the current camera projection matrix
* @param matrix [in] a projection matrix
*/
virtual void setProjectionMatrix (const rw::math::ProjectionMatrix& matrix);
//! @brief set viewport settings
virtual void setViewport (int x, int y, int width, int height);
//! @brief get viewport settings
virtual void getViewport (int& x, int& y, int& width, int& height);
//! @brief set to true if the render buffer should be cleared before drawing
virtual void setClearBufferEnabled (bool enabled) { _clearBufferEnabled = enabled; };
//! @brief test if buffers is cleared before drawing
virtual bool isClearBufferEnabled () { return _clearBufferEnabled; }
// GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
//! @brief choose which buffers that should be cleared
virtual void setClearBufferMask (int mask) { _clearMask = mask; };
//! @brief get the clear buffer mask that describe which buffers are cleared before drawing
virtual int getClearBufferMask () { return _clearMask; };
//! @brief enable or disable the use of depth tests (depth buffer)
virtual void setDepthTestEnabled (bool enabled) { _depthTestEnabled = enabled; }
//! @brief test if depth testing is enabled
virtual bool isDepthTestEnabled () { return _depthTestEnabled; }
//! @brief enable or disable the use of lightning
virtual void setLightningEnabled (bool enabled) { _lightningEnabled = enabled; }
//! @brief test if lightning is enabled
virtual bool isLightningEnabled () { return _lightningEnabled; }
//! @brief get the reference node
virtual SceneNode::Ptr getRefNode () { return _subGraph; }
//! @brief set the reference node of the camera
virtual void setRefNode (SceneNode::Ptr snode) { _subGraph = snode; }
//! @brief test if this camera is enabled
virtual bool isEnabled () { return _enabled; }
//! @brief enable or disable this camera
virtual void setEnabled (bool enabled) { _enabled = enabled; }
//! @copydoc SceneNode::asCameraNode
SceneCamera* asCameraNode () { return this; }
//! @brief set the camera transform relative to reference node (getRefNode)
void setTransform (const rw::math::Transform3D<>& t3d) { _t3d = t3d; }
//! @brief get the camera transform
rw::math::Transform3D<> getTransform () { return _t3d; }
/**
* @brief Change the mode for aspect ratio control.
* @param control [in] new mode.
*/
void setAspectRatioControl (AspectRatioControl control) { _ratioControl = control; }
/**
* @brief Get current mode of aspect ratio control.
* @return the current mode.
*/
AspectRatioControl getAspectRatioControl () { return _ratioControl; }
/**
* @brief set the mask used when drawing in the scene
* @param mask [in] The draw mask - see DrawableNode::DrawableTypeMask.
*/
virtual void setDrawMask (int mask);
/**
* @brief Get the mask used when drawing in the scene
* @return the draw mask - see DrawableNode::DrawableTypeMask.
*/
int getDrawMask ();
/**
* @brief get the camera name
* @return camera name
*/
const std::string& getName () { return _name; }
/**
* @brief Attach camera to scene node.
* @param snode [in] node to attach to.
*/
void attachTo (rw::graphics::SceneNode::Ptr snode) { _attachedTo = snode; }
/**
* @brief Get the node attached to.
* @return the node.
*/
rw::graphics::SceneNode::Ptr getAttachedNode () { return _attachedTo; }
/**
* @brief Get the aspect ratio.
* @return the aspect ratio.
*/
double getAspectRatio () { return _aspectRatio; }
protected:
//! @brief Projection matrix for camera.
rw::math::ProjectionMatrix _pmatrix;
//! @brief Viewport x.
int _x;
//! @brief Viewport y.
int _y;
//! @brief Viewport width.
int _w;
//! @brief Viewport height.
int _h;
//! @brief Mask for what to draw. See DrawableNode::DrawableTypeMask.
int _drawMask;
//! @brief Mask for what should be cleared.
int _clearMask;
//! @brief Enable/disable depth test.
bool _depthTestEnabled;
//! @brief Enable/disable light.
bool _lightningEnabled;
//! @brief Enable/disable clear buffer.
bool _clearBufferEnabled;
//! @brief Enable/disable camera.
bool _enabled;
//! @brief Rendering info used by the camera.
rw::graphics::DrawableNode::RenderInfo _renderInfo;
//! @brief The reference node of the camera.
SceneNode::Ptr _subGraph;
//! @brief Node that the camera is attached to.
SceneNode::Ptr _attachedTo;
//! @brief Name of the camera.
std::string _name;
//! @brief Transform of the camera.
rw::math::Transform3D<> _t3d;
//! @brief The aspect ratio.
double _aspectRatio;
//! @brief Mode of aspect ratio control.
AspectRatioControl _ratioControl;
};
//! @brief A group of cameras.
class CameraGroup
{
public:
//! @brief Smart pointer type for CameraGroup.
typedef rw::core::Ptr< CameraGroup > Ptr;
//! @brief Destructor.
virtual ~CameraGroup () {}
/**
* @brief Get name of group.
* @return the name.
*/
virtual std::string getName () = 0;
/**
* @brief Check if group is enabled.
* @return true if enabled.
*/
virtual bool isEnabled () = 0;
/**
* @brief Enable/disable group.
* @param enabled [in] true to enable, false to disable.
*/
virtual void setEnabled (bool enabled) = 0;
/**
* @brief Insert a camera in group.
* @param cam [in] camera.
* @param index [in] the index to insert at.
*/
virtual void insertCamera (SceneCamera::Ptr cam, int index) = 0;
/**
* @brief Remove camera.
* @param index [in] the index of the camera to remove.
*/
virtual void removeCamera (int index) = 0;
/**
* @brief Get all cameras in group.
* @return list of cameras.
*/
virtual std::list< SceneCamera::Ptr > getCameras () = 0;
/**
* @brief Set the main camera.
* @param cam [in] main camera.
*/
virtual void setMainCamera (SceneCamera::Ptr cam) = 0;
/**
* @brief Get the main camera.
* @return the main camera.
*/
virtual SceneCamera::Ptr getMainCamera () = 0;
/**
* @brief Enable/disable offscreen rendering.
* @param enable [in] true to enable, false to disable.
* @return true if offscreen rendering was enabled, false if offscreen rendering is not
* possible.
*/
virtual bool setOffscreenRenderEnabled (bool enable) = 0;
/**
* @brief Check if offscreen rendering is enabled.
* @return true if enabled, false otherwise.
*/
virtual bool isOffscreenRenderEnabled () = 0;
/**
* @brief Set size for offscreen rendering.
* @param width [in]
* @param height [in]
*/
virtual void setOffscreenRenderSize (int width, int height) = 0;
/**
* @brief Set color space for offscreen rendering.
* @param color [in] the color space to use.
*/
virtual void setOffscreenRenderColor (rw::sensor::Image::ColorCode color) = 0;
/**
* @brief Copy to image.
* @param img [out] image to copy to.
*/
virtual void setCopyToImage (rw::sensor::Image::Ptr img) = 0;
/**
* @brief Copy to point cloud.
* @param img [out] point cloud to copy to.
*/
virtual void setCopyToScan25D (rw::core::Ptr< rw::geometry::PointCloud > img) = 0;
/**
* @brief Enable multi-sampling.
* @param samples [in] number of samples.
*/
virtual void setMultiSample (int samples) = 0;
};
}} // namespace rw::graphics
#endif /* SCENECAMERA_HPP_ */
| 35.577508 | 99 | 0.586929 | [
"geometry",
"render",
"transform"
] |
afcd5f22988daf45e85255e951681560cc2b97d3 | 1,413 | cpp | C++ | src/array/array__save_eigens_to.cpp | violador/catalyst | 40d5c1dd04269a0764a9804711354a474bc43c15 | [
"Unlicense"
] | null | null | null | src/array/array__save_eigens_to.cpp | violador/catalyst | 40d5c1dd04269a0764a9804711354a474bc43c15 | [
"Unlicense"
] | null | null | null | src/array/array__save_eigens_to.cpp | violador/catalyst | 40d5c1dd04269a0764a9804711354a474bc43c15 | [
"Unlicense"
] | null | null | null | #include "array.hpp"
//
//
//
void array::save_eigens_to(array &values, array &vectors)
{
switch(is_2d_array and (not deleted_array))
{
case true:
switch(values.is_const_array or vectors.is_const_array)
{
case false: break;
case true: return; break;
}
#pragma omp parallel sections num_threads(2)
{
#pragma omp section
{
switch(this -> sizeof_row == values.sizeof_row)
{
case false:
values.resize(this -> sizeof_row);
break;
}
}
#pragma omp section
{
switch((this -> sizeof_row == vectors.sizeof_row)
and (this -> sizeof_column == vectors.sizeof_column))
{
case false:
vectors.resize(this -> sizeof_row, this -> sizeof_column);
break;
}
}
}
gsl_eigen_symmv_workspace *memory_allocation = gsl_eigen_symmv_alloc(this -> sizeof_row*4);
//
gsl_eigen_symmv(&gsl_2d_view.matrix,
&values.gsl_1d_view.vector,
&vectors.gsl_2d_view.matrix,
memory_allocation);
//
gsl_eigen_symmv_free(memory_allocation);
break;
}
}
| 29.4375 | 99 | 0.483369 | [
"vector"
] |
afd33587e4075dff787b0aac5a369f99720d2400 | 6,250 | cpp | C++ | src/SolidElementMPM.cpp | XiaoyongBai/MPM | 24279ac90b39fc1c1bbdded7b7be6741ffc14f78 | [
"MIT"
] | 2 | 2019-06-25T18:42:42.000Z | 2019-06-25T18:42:47.000Z | src/SolidElementMPM.cpp | XiaoyongBai/MPM | 24279ac90b39fc1c1bbdded7b7be6741ffc14f78 | [
"MIT"
] | null | null | null | src/SolidElementMPM.cpp | XiaoyongBai/MPM | 24279ac90b39fc1c1bbdded7b7be6741ffc14f78 | [
"MIT"
] | 3 | 2020-03-26T15:19:42.000Z | 2022-03-09T13:39:42.000Z | /* created by Xiaoyong Bai at CU Boulder, 07/18/2017 */
#include "SolidElementMPM.h"
using namespace std;
using namespace MPM;
SolidElementMPM::SolidElementMPM(){
}
SolidElementMPM::SolidElementMPM(int type){
if (type==1) {
fShape=ShapeBaseT::create(1);
}else{
throw "\n!! SolidElementMPM:create, unsupported element type !!\n";
}
int ennd = fShape->getENND();
fMassMatrix = vector<double>(3*ennd, 0.0);
fConvecVelo = vector<double>(3*ennd, 0.0);
fForce = vector<double>(3*ennd, 0.0);
}
/* num_mp=number of material points in 1D */
/* material points are equally-spaced in parent domain */
vector<vector<double>> SolidElementMPM::generateMatPoints(int num_mp){
int total_num = num_mp*num_mp*num_mp;
vector<vector<double>> result;
/* specify the points in parent domain, i.e. their shape coordinates */
vector<double> xi_1d(num_mp, 0.0);
double inc = 2.0/(num_mp+0.0);
for (int i=0; i<num_mp; i++) {
xi_1d[i]=(0.5+i)*inc-1.0;
}
vector<double> xi(3,0.0);
fShape->setCoord(&fNodeCoord);
for (int i=0; i<num_mp; i++) {
xi[0] = xi_1d[i];
for (int j=0; j<num_mp; j++) {
xi[1] = xi_1d[j];
for (int k=0; k<num_mp; k++) {
xi[2] = xi_1d[k];
fShape->evaluate(xi);
vector<double> x=fShape->getX();
double J=fShape->getJ();
double volume=J*8.0/(total_num+0.0);
result.push_back({x[0], x[1], x[2], volume});
}
}
}
return result;
}
void SolidElementMPM::setMaterialPoints(vector<MPM::MaterialPointT *> *mp, vector<int> &index){
fMP=mp;
fMP_index=index;
};
void SolidElementMPM::computeMassVelo(){
for (int i=0; i<fMassMatrix.size(); i++) {
fMassMatrix[i]=0;
fConvecVelo[i]=0;
fForce[i]=0;
}
int nmp = fMP_index.size();
int ennd = fShape->getENND();
if (nmp==0) return;
computeMPShapeCoord();
fShape->setCoord(&fNodeCoord);
//loop over the material points
for (int mi=0; mi<nmp; mi++) {
MaterialPointT* mp = fMP->at(fMP_index[mi]); //pointer to the material point
double ms = mp->getMass(); //mass of the material point
vector<double> vel = mp->getVelo(); //velocity of the material point
fShape->evaluate(fMP_ShapeCoord[mi]);
vector<double>* N = fShape->getN();
for (int ni=0; ni<ennd; ni++) {
double temp_mass = ms*N->at(ni);
for (int di=0; di<3; di++) {
fMassMatrix[ni*3+di] += temp_mass; //compute mass
fConvecVelo[ni*3+di] += temp_mass*vel[di]; //compute convective velocity
}
}
}
}
void SolidElementMPM::computeMPShapeCoord(){
int nmp = fMP_index.size(); //number of material point in this element
fMP_ShapeCoord.clear();
double x_left=fNodeCoord[0][0];
double y_left=fNodeCoord[0][1];
double z_left=fNodeCoord[0][2];
double x_right=fNodeCoord[6][0];
double y_right=fNodeCoord[6][1];
double z_right=fNodeCoord[6][2];
for (int mi=0; mi<nmp; mi++) {
int id = fMP_index[mi];
MaterialPointT* mp = fMP->at(id);
vector<double> coord = mp->getCoord();
double xi_1=-1.0+2.0*(coord[0]-x_left)/(x_right-x_left);
double xi_2=-1.0+2.0*(coord[1]-y_left)/(y_right-y_left);
double xi_3=-1.0+2.0*(coord[2]-z_left)/(z_right-z_left);
fMP_ShapeCoord.push_back({xi_1,xi_2,xi_3});
}
}
void SolidElementMPM::computeForce(double dt){
//clear force vector
for (int i=0; i<fForce.size(); i++) {
fForce[i]=0;
}
int ennd = fShape->getENND();
int nmp = fMP_index.size(); //number of material points
if (nmp==0) return;
vector<vector<double>> B(6, vector<double>(ennd*3,0.0));
vector<double> D(6, 0.0); //strain rate
computeMPShapeCoord();
fShape->setCoord(&fNodeCoord);
//loop over material points
for (int mi=0; mi<nmp; mi++) {
MaterialPointT* mp = fMP->at(fMP_index[mi]);
fShape->evaluate(fMP_ShapeCoord[mi]);
vector<double>* N=fShape->getN();
vector<vector<double>>* dNx=fShape->getdNx();
//Form B-matrix
for (int ni=0; ni<ennd; ni++) {
B[0][ni*3+0]=dNx->at(ni)[0];
B[1][ni*3+1]=dNx->at(ni)[1];
B[2][ni*3+2]=dNx->at(ni)[2];
B[3][ni*3+1]=dNx->at(ni)[2];
B[3][ni*3+2]=dNx->at(ni)[1];
B[4][ni*3+0]=dNx->at(ni)[2];
B[4][ni*3+2]=dNx->at(ni)[0];
B[5][ni*3+0]=dNx->at(ni)[1];
B[5][ni*3+1]=dNx->at(ni)[0];
}
//compute D*dt
for (int i=0; i<6; i++){
D[i]=0;
for (int j=0; j<3*ennd; j++) {
D[i]+=B[i][j]*fNodeVelo[j]*dt;
}
}
//update stress at the material point
MaterialBaseT* mat = mp->getMaterial();
mat->updateStress(D);
double mass=mp->getMass();
double density=mat->getDensity();
vector<double>* stress=mat->getCauchyStress();
//compute force vector
for (int i=0; i<fForce.size(); i++) {
for (int j=0; j<6; j++) {
fForce[i]+=B[j][i]*stress->at(j)*mass/density;
}
}
//update velocity and coordinate of material point
vector<double> vel(3,0.0);
for (int ni=0; ni<ennd; ni++) {
for (int di=0; di<3; di++) {
vel[di]+=fNodeVelo[ni*3+di]*N->at(ni);
}
}
mp->setVelocity(vel);
mp->updateCoord(dt);
}
for (int di=0; di<fForce.size(); di++) {
fForce[di] *= -1.0;
}
} | 24.801587 | 95 | 0.4968 | [
"shape",
"vector"
] |
afd6462c86a38b5347932693972a2ca3421164d5 | 1,131 | cpp | C++ | src/gr_db/GrDatabase.cpp | RamAddict/cu-gr | 05f9c23d479c7cb54613c624243922a7cfa46465 | [
"Unlicense"
] | 74 | 2019-11-28T10:08:57.000Z | 2022-02-11T08:42:19.000Z | src/gr_db/GrDatabase.cpp | RamAddict/cu-gr | 05f9c23d479c7cb54613c624243922a7cfa46465 | [
"Unlicense"
] | null | null | null | src/gr_db/GrDatabase.cpp | RamAddict/cu-gr | 05f9c23d479c7cb54613c624243922a7cfa46465 | [
"Unlicense"
] | 29 | 2020-02-12T15:30:06.000Z | 2022-03-27T03:18:22.000Z | #include "GrDatabase.h"
#include <fstream>
gr::GrDatabase grDatabase;
namespace gr {
void GrDatabase::init() {
GrRouteGrid::init();
GrNetlist::init(*this);
GrRouteGrid::print();
}
void GrDatabase::writeGuides(std::string filename) {
log() << "Writing guides to file..." << std::endl;
std::stringstream ss;
auto printGrGuides = [&](const vector<GrBoxOnLayer>& guides) {
for (const auto& guide : guides) {
ss << getCoor(guide[X].low, X) << " ";
ss << getCoor(guide[Y].low, Y) << " ";
ss << getCoor(guide[X].high + 1, X) << " ";
ss << getCoor(guide[Y].high + 1, Y) << " ";
ss << database.getLayer(guide.layerIdx).name << std::endl;
}
};
for (const auto& net : grDatabase.nets) {
ss << net.getName() << std::endl;
ss << "(" << std::endl;
printGrGuides(net.wireRouteGuides);
printGrGuides(net.viaRouteGuides);
printGrGuides(net.patchRouteGuides);
ss << ")" << std::endl;
}
std::ofstream fout(filename);
fout << ss.str();
fout.close();
}
} // namespace gr
| 26.302326 | 70 | 0.549072 | [
"vector"
] |
afdb728e0a788bc4154adb3a881c08c1da91d36a | 5,375 | cpp | C++ | GeoTempCore/Source/GeoTempOSM/Private/OsmReader.cpp | interactivevislab/GeoTempPlugins | 5c650769cbdb22931fc0e221bd7a3233a56c202a | [
"MIT"
] | 6 | 2020-03-27T08:55:53.000Z | 2022-03-14T22:36:28.000Z | GeoTempCore/Source/GeoTempOSM/Private/OsmReader.cpp | interactivevislab/GeoTempPlugins | 5c650769cbdb22931fc0e221bd7a3233a56c202a | [
"MIT"
] | 3 | 2020-03-31T13:21:56.000Z | 2020-04-02T17:34:11.000Z | GeoTempCore/Source/GeoTempOSM/Private/OsmReader.cpp | interactivevislab/GeoTempPlugins | 5c650769cbdb22931fc0e221bd7a3233a56c202a | [
"MIT"
] | null | null | null | #include "OsmReader.h"
#include <algorithm>
UOsmReader::UOsmReader() : UObject()
{
}
void UOsmReader::InitWithXML(FString inXmlString)
{
xmlDocument.Parse(TCHAR_TO_UTF8(*inXmlString));
if (xmlDocument.FirstChild()) {
ReadData();
}
}
void UOsmReader::InitWithFile(FString inFilename)
{
xmlDocument.LoadFile(TCHAR_TO_UTF8(*inFilename));
if (xmlDocument.FirstChild()) {
ReadData();
}
}
void UOsmReader::ReadData()
{
#pragma region Parse Nodes
std::vector<tinyxml2::XMLElement*> nodes;
tinyxml2::XMLNode* root = xmlDocument.FirstChild()->NextSibling();
tinyxml2::XMLElement* bounds = root->FirstChildElement("bounds");
double minY = bounds->DoubleAttribute("minlat");
double maxY = bounds->DoubleAttribute("maxlat");
double minX = bounds->DoubleAttribute("minlon");
double maxX = bounds->DoubleAttribute("maxlon");
tinyxml2::XMLElement* xmlNode = root->FirstChildElement("node");
while (xmlNode)
{
nodes.push_back(xmlNode);
xmlNode = xmlNode->NextSiblingElement("node");
}
#pragma endregion
//parse ways
#pragma region Parse Ways
std::vector<tinyxml2::XMLElement*> ways;
tinyxml2::XMLElement* way = root->FirstChildElement("way");
while (way)
{
ways.push_back(way);
way = way->NextSiblingElement("way");
}
#pragma endregion
//parse relations
#pragma region Parse Relations
std::vector<tinyxml2::XMLElement*> relations;
tinyxml2::XMLElement* relation = root->FirstChildElement("relation");
while (relation)
{
relations.push_back(relation);
relation = relation->NextSiblingElement("relation");
}
#pragma endregion
//create node objects
for (auto node : nodes)
{
double lon = node->DoubleAttribute("lon");
double lat = node->DoubleAttribute("lat");
auto tag = node->FirstChildElement("tag");
auto id = node->Int64Attribute("id");
if (tag == nullptr)
{
auto nodeObj = new OsmNode(id, lon, lat, GeoCoords);
Nodes.Add(id, nodeObj);
}
else
{
auto nodeObj = new OsmNode(id, lon, lat, GeoCoords);
while (tag != nullptr)
{
auto key = std::string(tag->Attribute("k"));
auto value = std::string(tag->Attribute("v"));
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
auto keyString = FString(UTF8_TO_TCHAR(key.c_str()));
auto valueString = FString(UTF8_TO_TCHAR(value.c_str()));
nodeObj->Tags.Add(keyString, valueString);
tag = tag->NextSiblingElement("tag");
}
Nodes.Add(id, nodeObj);
}
}
//create ways objects
for (auto currentWay : ways)
{
auto node = currentWay->FirstChildElement("nd");
if (!node)
{
continue;
}
auto id = currentWay->Int64Attribute("id");
auto wayObj = new OsmWay(id);
auto tag = currentWay->FirstChildElement("tag");
while (tag != nullptr)
{
auto key = std::string(tag->Attribute("k"));
auto value = std::string(tag->Attribute("v"));
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
auto keyString = FString(UTF8_TO_TCHAR(key.c_str()));
auto valueString = FString(UTF8_TO_TCHAR(value.c_str()));
wayObj->Tags.Add(keyString, valueString);
tag = tag->NextSiblingElement("tag");
}
Ways.Add(id, wayObj);
while (node != nullptr)
{
wayObj->Nodes.Add(Nodes[node->Int64Attribute("ref")]);
node = node->NextSiblingElement("nd");
}
}
//create multipolygon relations
for (auto current_relation : relations)
{
auto id = current_relation->Int64Attribute("id");
auto node = current_relation->FirstChildElement("member");
if (!node)
{
continue;
}
auto relObj = new OsmRelation(current_relation->Int64Attribute("id"));
std::vector<std::string> roles;
while (node != nullptr)
{
const char* type;
const char* role;
if (node->QueryStringAttribute("type", &type) != tinyxml2::XML_SUCCESS)
{
continue;
}
if (node->QueryStringAttribute("role", &role) != tinyxml2::XML_SUCCESS)
{
role = "";
}
auto memberId = node->Int64Attribute("ref");
if (!std::strcmp(type, "node"))
{
relObj->NodeRoles.Add(memberId, role);
}
else if (!std::strcmp(type, "way"))
{
relObj->WayRoles.Add(memberId, role);
}
else if (!std::strcmp(type, "relation"))
{
relObj->RelRoles.Add(memberId, role);
}
node = node->NextSiblingElement("member");
}
auto tag = current_relation->FirstChildElement("tag");
while (tag != nullptr)
{
auto key = std::string(tag->Attribute("k"));
auto value = std::string(tag->Attribute("v"));
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
auto keyString = FString(UTF8_TO_TCHAR(key.c_str()));
auto valueString = FString(UTF8_TO_TCHAR(value.c_str()));
relObj->Tags.Add(keyString, valueString);
tag = tag->NextSiblingElement("tag");
}
Relations.Add(id, relObj);
}
//add relation subelements
for (auto rel : Relations)
{
auto relObj = rel.Value;
for (auto memberNode : relObj->NodeRoles)
{
auto iter = Nodes.Find(memberNode.Key);
if (iter != nullptr)
{
relObj->Nodes.Add(memberNode.Key, *iter);
}
}
for (auto memberWay : relObj->WayRoles)
{
auto iter = Ways.Find(memberWay.Key);
if (iter != nullptr)
{
relObj->Ways.Add(memberWay.Key, *iter);
}
}
for (auto memberRelation : relObj->RelRoles)
{
auto iter = Relations.Find(memberRelation.Key);
if (iter != nullptr)
{
relObj->Relations.Add(memberRelation.Key, *iter);
}
}
}
}
| 23.06867 | 74 | 0.662884 | [
"vector",
"transform"
] |
afdd14f490e134c4aaaed0733d239f6234a6d69f | 3,892 | cpp | C++ | lib/seldon/lib/Compil/Seldon/UmfPack.cpp | HongyuHe/lsolver | c791bf192308ba6b564cb60cb3991d2e72093cd7 | [
"Apache-2.0"
] | 7 | 2021-01-31T23:20:07.000Z | 2021-09-09T20:54:15.000Z | lib/seldon/lib/Compil/Seldon/UmfPack.cpp | HongyuHe/lsolver | c791bf192308ba6b564cb60cb3991d2e72093cd7 | [
"Apache-2.0"
] | 1 | 2021-06-07T07:52:38.000Z | 2021-08-13T20:40:55.000Z | lib/seldon/lib/Compil/Seldon/UmfPack.cpp | HongyuHe/lsolver | c791bf192308ba6b564cb60cb3991d2e72093cd7 | [
"Apache-2.0"
] | null | null | null | #include "SeldonFlag.hxx"
#include "SeldonSolverHeader.hxx"
#include "SeldonSolverInline.hxx"
#ifndef SELDON_WITH_COMPILED_LIBRARY
#include "computation/interfaces/direct/UmfPack.cxx"
#endif
namespace Seldon
{
SELDON_EXTERN template class MatrixUmfPack<double>;
SELDON_EXTERN template class MatrixUmfPack<complex<double> >;
SELDON_EXTERN template class MatrixUmfPack_Base<double>;
SELDON_EXTERN template class MatrixUmfPack_Base<complex<double> >;
SELDON_EXTERN template void MatrixUmfPack<double>::FactorizeMatrix(Matrix<double, Symmetric, RowSymSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, RowSymSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<double>::FactorizeMatrix(Matrix<double, Symmetric, ArrayRowSymSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<double>::FactorizeMatrix(Matrix<double, General, RowSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, RowSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<double>::FactorizeMatrix(Matrix<double, General, ArrayRowSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, ArrayRowSparse>&, bool);
SELDON_EXTERN template void MatrixUmfPack<double>::Solve(Vector<double>&);
SELDON_EXTERN template void MatrixUmfPack<double>::Solve(const SeldonTranspose&, Vector<double>&);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::Solve(Vector<complex<double> >&);
SELDON_EXTERN template void MatrixUmfPack<complex<double> >::Solve(const SeldonTranspose&, Vector<complex<double> >&);
SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, RowSymSparse>&, MatrixUmfPack<double>&, bool);
SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, RowSymSparse>&, MatrixUmfPack<complex<double> >&, bool);
SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, ArrayRowSymSparse>&, MatrixUmfPack<double>&, bool);
SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, MatrixUmfPack<complex<double> >&, bool);
SELDON_EXTERN template void GetLU(Matrix<double, General, RowSparse>&, MatrixUmfPack<double>&, bool);
SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, RowSparse>&, MatrixUmfPack<complex<double> >&, bool);
SELDON_EXTERN template void GetLU(Matrix<double, General, ArrayRowSparse>&, MatrixUmfPack<double>&, bool);
SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, ArrayRowSparse>&, MatrixUmfPack<complex<double> >&, bool);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<double>&, Vector<double>&);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<double>&, Matrix<double, General, ColMajor>&);
SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixUmfPack<double>&, Vector<double>&);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<double>&, Vector<complex<double> >&);
SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixUmfPack<double>&, Vector<complex<double> >&);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<complex<double> >&, Vector<double>&);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<complex<double> >&, Matrix<complex<double>, General, ColMajor>&);
SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixUmfPack<complex<double> >&, Vector<double>&);
SELDON_EXTERN template void SolveLU(MatrixUmfPack<complex<double> >&, Vector<complex<double> >&);
SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixUmfPack<complex<double> >&, Vector<complex<double> >&);
}
| 63.803279 | 142 | 0.788284 | [
"vector"
] |
afe98e2b7d94e816cf67310ef772388910a36f92 | 12,000 | cc | C++ | Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | // -*- C++ -*-
//
// Package: MCvsRecoVerticesAnalyzer
// Class: MCvsRecoVerticesAnalyzer
//
/**\class MCvsRecoVerticesAnalyzer MCvsRecoVerticesAnalyzer.cc TrackingPFG/PileUp/src/MCvsRecoVerticesAnalyzer.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Andrea Venturi
// Created: Thu Dec 16 16:32:56 CEST 2010
//
//
// system include files
#include <memory>
#include <numeric>
#include <vector>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TProfile.h"
//
// class decleration
//
class MCvsRecoVerticesAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
explicit MCvsRecoVerticesAnalyzer(const edm::ParameterSet&);
~MCvsRecoVerticesAnalyzer() override;
private:
void analyze(const edm::Event&, const edm::EventSetup&) override;
// ----------member data ---------------------------
const bool m_useweight;
const bool m_useVisibleVertices;
const edm::ParameterSet m_histoParameters;
edm::EDGetTokenT<double> m_doubleToken;
edm::EDGetTokenT<std::vector<PileupSummaryInfo> > m_vecPileupSummaryInfoToken;
edm::EDGetTokenT<reco::VertexCollection> m_recoVertexCollectionToken;
edm::EDGetTokenT<edm::HepMCProduct> m_hepMCProductToken;
TH2F* m_hrecovsmcnvtx2d;
TProfile* m_hrecovsmcnvtxprof;
TProfile* m_hrecovsmcnvtxweightedprof;
TH2F* m_hrecovsmclumi2d;
TProfile* m_hrecovsmclumiprof;
TProfile* m_hrecovsmclumiweightedprof;
TH1F* m_hdeltazfirst;
TH1F* m_hdeltazclose;
TH1F* m_hclosestvtx;
TH2F* m_hdeltazfirstvsnpu;
TH2F* m_hdeltazclosevsnpu;
TH2F* m_hclosestvtxvsnpu;
};
//
// constants, enums and typedefs
//
//
// static data member definitions
//
//
// constructors and destructor
//
MCvsRecoVerticesAnalyzer::MCvsRecoVerticesAnalyzer(const edm::ParameterSet& iConfig)
: m_useweight(iConfig.getParameter<bool>("useWeight")),
m_useVisibleVertices(iConfig.getParameter<bool>("useVisibleVertices")),
m_histoParameters(iConfig.getUntrackedParameter<edm::ParameterSet>("histoParameters", edm::ParameterSet())),
m_doubleToken(consumes<double>(iConfig.getParameter<edm::InputTag>("weightProduct"))),
m_vecPileupSummaryInfoToken(
consumes<std::vector<PileupSummaryInfo> >(iConfig.getParameter<edm::InputTag>("pileupSummaryCollection"))),
m_recoVertexCollectionToken(
consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("pvCollection"))),
m_hepMCProductToken(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("mcTruthCollection"))) {
//now do what ever initialization is needed
if (m_useVisibleVertices)
edm::LogInfo("UseVisibleVertices") << "Only visible vertices will be used to compute Npileup";
usesResource("TFileService");
edm::Service<TFileService> tfserv;
m_hrecovsmcnvtx2d = tfserv->make<TH2F>(
"recovsmcnvtx2d", "Number of reco vertices vs pileup interactions", 60, -0.5, 59.5, 60, -0.5, 59.5);
m_hrecovsmcnvtx2d->GetXaxis()->SetTitle("Pileup Interactions");
m_hrecovsmcnvtx2d->GetYaxis()->SetTitle("Reco Vertices");
m_hrecovsmcnvtxprof =
tfserv->make<TProfile>("recovsmcnvtxprof", "Mean number of reco vs pileup vertices", 60, -0.5, 59.5);
m_hrecovsmcnvtxprof->GetXaxis()->SetTitle("Pileup Interactions");
m_hrecovsmcnvtxprof->GetYaxis()->SetTitle("Reco Vertices");
m_hrecovsmclumi2d = tfserv->make<TH2F>(
"recovsmclumi2d", "Number of reco vertices vs ave pileup interactions", 200, 0., 50., 60, -0.5, 59.5);
m_hrecovsmclumi2d->GetXaxis()->SetTitle("Average Pileup Interactions");
m_hrecovsmclumi2d->GetYaxis()->SetTitle("Reco Vertices");
m_hrecovsmclumiprof =
tfserv->make<TProfile>("recovsmclumiprof", "Mean number of reco vs ave pileup vertices", 200, 0., 50.);
m_hrecovsmclumiprof->GetXaxis()->SetTitle("Average Pileup Interactions");
m_hrecovsmclumiprof->GetYaxis()->SetTitle("Reco Vertices");
if (m_useweight) {
m_hrecovsmcnvtxweightedprof = tfserv->make<TProfile>(
"recovsmcnvtxweightedprof", "Mean number of reco vs pileup vertices (1-w) weight", 60, -0.5, 59.5);
m_hrecovsmcnvtxweightedprof->GetXaxis()->SetTitle("Pileup Interactions");
m_hrecovsmcnvtxweightedprof->GetYaxis()->SetTitle("Reco Vertices (1-w)");
m_hrecovsmclumiweightedprof = tfserv->make<TProfile>(
"recovsmclumiweightedprof", "Mean number of reco vs ave pileup vertices (1-w) weight", 200, 0., 50.);
m_hrecovsmclumiweightedprof->GetXaxis()->SetTitle("Average Pileup Interactions");
m_hrecovsmclumiweightedprof->GetYaxis()->SetTitle("Reco Vertices (1-w)");
}
m_hdeltazfirst = tfserv->make<TH1F>("deltazfirst",
"Reco-MC vertex z position (first vertex)",
m_histoParameters.getUntrackedParameter<unsigned int>("zBins", 1000),
m_histoParameters.getUntrackedParameter<double>("zMin", -1.),
m_histoParameters.getUntrackedParameter<double>("zMax", 1.));
m_hdeltazfirst->GetXaxis()->SetTitle("#Delta z (cm)");
m_hdeltazfirst->GetYaxis()->SetTitle("Events");
m_hdeltazclose = tfserv->make<TH1F>("deltazclose",
"Reco-MC vertex z position (closest vertex)",
m_histoParameters.getUntrackedParameter<unsigned int>("zBins", 1000),
m_histoParameters.getUntrackedParameter<double>("zMin", -1.),
m_histoParameters.getUntrackedParameter<double>("zMax", 1.));
m_hdeltazclose->GetXaxis()->SetTitle("#Delta z (cm)");
m_hdeltazclose->GetYaxis()->SetTitle("Events");
m_hclosestvtx = tfserv->make<TH1F>("closestvtx", "Closest reco vtx ID", 30, -0.5, 29.5);
m_hclosestvtx->GetXaxis()->SetTitle("Vtx ID");
m_hclosestvtx->GetYaxis()->SetTitle("Events");
m_hdeltazfirstvsnpu = tfserv->make<TH2F>("deltazfirstvsnpu",
"Reco-MC vertex z position (first vertex) vs Npileup",
30,
-0.5,
29.5,
m_histoParameters.getUntrackedParameter<unsigned int>("zBins", 1000),
m_histoParameters.getUntrackedParameter<double>("zMin", -1.),
m_histoParameters.getUntrackedParameter<double>("zMax", 1.));
m_hdeltazfirstvsnpu->GetXaxis()->SetTitle("pileup Interactions");
m_hdeltazfirstvsnpu->GetYaxis()->SetTitle("#Delta z (cm)");
m_hdeltazclosevsnpu = tfserv->make<TH2F>("deltazclosevsnpu",
"Reco-MC vertex z position (closest vertex) v Npileup",
30,
-0.5,
29.5,
m_histoParameters.getUntrackedParameter<unsigned int>("zBins", 1000),
m_histoParameters.getUntrackedParameter<double>("zMin", -1.),
m_histoParameters.getUntrackedParameter<double>("zMax", 1.));
m_hdeltazclosevsnpu->GetXaxis()->SetTitle("Pileup Interactions");
m_hdeltazclosevsnpu->GetYaxis()->SetTitle("#Delta z (cm)");
m_hclosestvtxvsnpu =
tfserv->make<TH2F>("closestvtxvsnpu", "Closest reco vtx ID vs Npileup", 30, -0.5, 29.5, 30, -0.5, 29.5);
m_hclosestvtxvsnpu->GetXaxis()->SetTitle("Pileup Interactions");
m_hclosestvtxvsnpu->GetYaxis()->SetTitle("Vtx ID");
}
MCvsRecoVerticesAnalyzer::~MCvsRecoVerticesAnalyzer() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
//
// member functions
//
// ------------ method called to for each event ------------
void MCvsRecoVerticesAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
double weight = 1.;
if (m_useweight) {
edm::Handle<double> weightprod;
iEvent.getByToken(m_doubleToken, weightprod);
weight = *weightprod;
}
edm::Handle<std::vector<PileupSummaryInfo> > pileupinfos;
iEvent.getByToken(m_vecPileupSummaryInfoToken, pileupinfos);
// look for the intime PileupSummaryInfo
std::vector<PileupSummaryInfo>::const_iterator pileupinfo;
for (pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end(); ++pileupinfo) {
if (pileupinfo->getBunchCrossing() == 0)
break;
}
//
edm::Handle<reco::VertexCollection> pvcoll;
iEvent.getByToken(m_recoVertexCollectionToken, pvcoll);
//
if (pileupinfo->getBunchCrossing() != 0) {
edm::LogError("NoInTimePileUpInfo") << "Cannot find the in-time pileup info " << pileupinfo->getBunchCrossing();
} else {
int npileup = pileupinfo->getPU_NumInteractions();
if (m_useVisibleVertices)
npileup = pileupinfo->getPU_zpositions().size();
m_hrecovsmcnvtx2d->Fill(npileup, pvcoll->size(), weight);
m_hrecovsmcnvtxprof->Fill(npileup, pvcoll->size(), weight);
m_hrecovsmclumi2d->Fill(pileupinfo->getTrueNumInteractions(), pvcoll->size(), weight);
m_hrecovsmclumiprof->Fill(pileupinfo->getTrueNumInteractions(), pvcoll->size(), weight);
if (m_useweight) {
m_hrecovsmcnvtxweightedprof->Fill(npileup, pvcoll->size(), 1. - weight);
m_hrecovsmclumiweightedprof->Fill(pileupinfo->getTrueNumInteractions(), pvcoll->size(), 1. - weight);
}
//
edm::Handle<edm::HepMCProduct> EvtHandle;
iEvent.getByToken(m_hepMCProductToken, EvtHandle);
const HepMC::GenEvent* Evt = EvtHandle->GetEvent();
// compute the difference between the main interaction vertex z position and the first vertex of the collection
if (!pvcoll->empty()) {
if (!(*pvcoll)[0].isFake()) {
// get the first vertex
if (Evt->vertices_begin() != Evt->vertices_end()) {
m_hdeltazfirst->Fill((*pvcoll)[0].z() - (*Evt->vertices_begin())->point3d().z() / 10., weight);
m_hdeltazfirstvsnpu->Fill(npileup, (*pvcoll)[0].z() - (*Evt->vertices_begin())->point3d().z() / 10., weight);
}
}
}
// compute the difference between the main interaction vertex z position and the closest reco vertex
double minabsdist = -1.;
double mindist = -999.;
int closestvtx = -1;
for (unsigned int ivtx = 0; ivtx < pvcoll->size(); ++ivtx) {
if (closestvtx < 0 ||
minabsdist > std::abs((*pvcoll)[ivtx].z() - (*Evt->vertices_begin())->point3d().z() / 10.)) {
mindist = (*pvcoll)[ivtx].z() - (*Evt->vertices_begin())->point3d().z() / 10.;
closestvtx = ivtx;
minabsdist = std::abs(mindist);
}
}
if (closestvtx >= 0) {
m_hdeltazclose->Fill(mindist, weight);
m_hdeltazclosevsnpu->Fill(npileup, mindist, weight);
m_hclosestvtx->Fill(closestvtx, weight);
m_hclosestvtxvsnpu->Fill(npileup, closestvtx, weight);
}
}
}
//define this as a plug-in
DEFINE_FWK_MODULE(MCvsRecoVerticesAnalyzer);
| 40.133779 | 119 | 0.666833 | [
"vector"
] |
afed5be64ad2895641f5f4570a66f5d5f70e430f | 2,312 | cpp | C++ | dataCount.cpp | yanboyang713/crossLanguageSentimentAnalysis | 2ccf3cde0d1031d083e9de26692f1764a3b066c6 | [
"MIT"
] | null | null | null | dataCount.cpp | yanboyang713/crossLanguageSentimentAnalysis | 2ccf3cde0d1031d083e9de26692f1764a3b066c6 | [
"MIT"
] | null | null | null | dataCount.cpp | yanboyang713/crossLanguageSentimentAnalysis | 2ccf3cde0d1031d083e9de26692f1764a3b066c6 | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include "rapidcsv.h"
using namespace std;
int main(){
rapidcsv::Document doc("goodDataLatest.csv", rapidcsv::LabelParams(0, -1));
std::vector<int> ranking = doc.GetColumn<int>("ranking");
std::vector<int> ranking10;
std::vector<int> ranking20;
std::vector<int> ranking30;
std::vector<int> ranking40;
std::vector<int> ranking50;
std::vector<float> googleSentimentOriginData = doc.GetColumn<float>("Google English sentiment analysis score(base on Google translated data)");
std::vector<float> baiduSentimentOriginData = doc.GetColumn<float>("Baidu positive probability to google standard(base on Google translated data)");
unsigned int totalNumData = ranking.size();
cout << "Total number of data: " << totalNumData << endl;
for (int i = 0; i < totalNumData; ++i) {
if (ranking[i] == 10) {
ranking10.push_back (10);
}
else if (ranking[i] == 20) {
ranking20.push_back (20);
}
else if (ranking[i] == 30) {
ranking30.push_back(30);
}
else if (ranking[i] == 40) {
ranking40.push_back(40);
}
else if (ranking[i] == 50) {
ranking50.push_back(50);
}
}
unsigned int ranking10Size = ranking10.size();
unsigned int ranking20Size = ranking20.size();
unsigned int ranking30Size = ranking30.size();
unsigned int ranking40Size = ranking40.size();
unsigned int ranking50Size = ranking50.size();
cout << "number of data in ranking 10: " << ranking10Size << " - " << static_cast<float>(ranking10Size) / static_cast<float>(totalNumData) << endl;
cout << "number of data in ranking 20: " << ranking20Size << " - " << static_cast<float>(ranking20Size) / static_cast<float>(totalNumData) << endl;
cout << "number of data in ranking 30: " << ranking30Size << " - " << static_cast<float>(ranking30Size) / static_cast<float>(totalNumData) << endl;
cout << "number of data in ranking 40: " << ranking40Size << " - " << static_cast<float>(ranking40Size) / static_cast<float>(totalNumData) << endl;
cout << "number of data in ranking 50: " << ranking50Size << " - " << static_cast<float>(ranking50Size) / static_cast<float>(totalNumData) << endl;
return 0;
}
| 43.622642 | 152 | 0.637976 | [
"vector"
] |
aff78e47490d76ea7bb87a322a0cab81f6626358 | 17,372 | cpp | C++ | Project3/Stage.cpp | joalcapa/Hens-attack | 1ab04a1d896d08cf66afb466ae742e1b5456ebf3 | [
"MIT"
] | 1 | 2017-07-06T13:48:58.000Z | 2017-07-06T13:48:58.000Z | Project3/Stage.cpp | joalcapa/HensAttack | 1ab04a1d896d08cf66afb466ae742e1b5456ebf3 | [
"MIT"
] | null | null | null | Project3/Stage.cpp | joalcapa/HensAttack | 1ab04a1d896d08cf66afb466ae742e1b5456ebf3 | [
"MIT"
] | null | null | null | #include "Stage.h"
#include "GameModel.h"
Stage::Stage(void) {}
Stage::~Stage(void) {}
Stage::Stage(SDL_Renderer * renderer, int WIDTH, int HEIGHT) {
headboard = runner = relativeRunner = NULL;
this->renderer = renderer;
this->WIDTH = WIDTH;
this->HEIGHT = HEIGHT;
isRunningFox = true;
isDirection = isKilling = isKiller = isMomentFox = applyIA = isDelayIA = isDelayFox = false;
wallpaper = new Imagen(renderer, "Imagenes/fondo.png", 0, 0);
directionHuntedN = new Imagen(renderer, "Imagenes/Conexiones/N.png", 0, 100);
directionHuntedS = new Imagen(renderer, "Imagenes/Conexiones/S.png", 0, 100);
directionHuntedE = new Imagen(renderer, "Imagenes/Conexiones/E.png", 0, 100);
directionHuntedO = new Imagen(renderer, "Imagenes/Conexiones/O.png", 0, 100);
directionHuntedDNO = new Imagen(renderer, "Imagenes/Conexiones/DNO.png", 0, 100);
directionHuntedDNE = new Imagen(renderer, "Imagenes/Conexiones/DNE.png", 0, 100);
directionHuntedDSO = new Imagen(renderer, "Imagenes/Conexiones/DSO.png", 0, 100);
directionHuntedDSE = new Imagen(renderer, "Imagenes/Conexiones/DSE.png", 0, 100);
directionHuntedDDNO = new Imagen(renderer, "Imagenes/Conexiones/DDNO.png", 0, 100);
directionHuntedDDNE = new Imagen(renderer, "Imagenes/Conexiones/DDNE.png", 0, 100);
directionHuntedDDSO = new Imagen(renderer, "Imagenes/Conexiones/DDSO.png", 0, 100);
directionHuntedDDSE = new Imagen(renderer, "Imagenes/Conexiones/DDSE.png", 0, 100);
directionHuntedDNORTE = new Imagen(renderer, "Imagenes/Conexiones/DN.png", 0, 100);
directionHuntedDESTE = new Imagen(renderer, "Imagenes/Conexiones/DE.png", 0, 100);
directionHuntedDOESTE = new Imagen(renderer, "Imagenes/Conexiones/DO.png", 0, 100);
directionHuntedDSUR = new Imagen(renderer, "Imagenes/Conexiones/DS.png", 0, 100);
huntedCounter = new Actor(renderer, "Imagenes/cazadas/s0.png", 627, -7, Actor::BODY_OBJECT);
notHunted = new Actor(renderer, "Imagenes/vivas/a17.png", -2, -7, Actor::BODY_OBJECT);
fox = new Actor(renderer, "Imagenes/44.png", HEIGHT - 156, WIDTH - 133, Actor::BODY_OBJECT);
hens = new Actor(renderer, "Imagenes/55.png", 0, HEIGHT, Actor::BODY_OBJECT);
addActor(fox);
addActor(hens);
}
void Stage::render() {
wallpaper->render();
if(isDirection)
renderLocationDH();
this->action(Stage::RENDER);
huntedCounter->render();
notHunted->render();
if(foxPlayer->getTypeAction() == Actor::ACTION_NULL && isMomentFox)
restartHunted();
if(foxPlayer->getTypeAction() == Actor::ACTION_NULL && isDelayFox) {
isRunningFox = true;
isDelayFox = false;
}
if(hens->getTypeAction() == Actor::ACTION_NULL && !isRunningFox && isDelayIA) {
applyIA = true;
isDelayIA = false;
}
if(relativeRunner)
if(relativeRunner->getTypeAction() == Actor::ACTION_NULL) {
relativeRunner = NULL;
fox->addAction(Actor::ACTION_MOVE_TO, fox->getX(), HEIGHT - 156);
hens->addAction(Actor::ACTION_MOVE_TO, hens->getX(), HEIGHT);
isDelayFox = true;
}
}
void Stage::action(int typeAction) {
runner = headboard;
while(runner) {
if(typeAction == Stage::RENDER)
runner->render();
else
runner->update();
runner = runner->getActorSuccessor();
}
}
void Stage::addActor(Actor * actor) {
if(!headboard)
headboard = actor;
else {
runner = headboard;
while(runner->getActorSuccessor())
runner = runner->getActorSuccessor();
runner->setActorSuccessor(actor);
}
}
void Stage::mouseClick(SDL_Event event) {
if(isRunningFox)
momentFox(event);
}
// Method that receives the event of the mouse, and assigns it to the local method
// in charge of the treatment of the action of the fox
void Stage::mouseMotion(SDL_Event event) {
isDirection = isKilling = false;
foxFutureX = foxPlayer->getX();
foxFutureY = foxPlayer->getY();
if(isRunningFox && !isMomentFox) {
if(isLocationMouse(Stage::LOCATION_MOUSE_OESTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_Y, event) && validateMoment((int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 100;
foxFutureY = foxPlayer->getY();
typeDH = Stage::VISIBILITY_DH_OESTE;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DOESTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_Y, event)) {
if(validateMoment((int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() - 200) /100, (int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 200;
foxFutureY = foxPlayer->getY();
typeDH = Stage::VISIBILITY_DH_DOESTE;
isDirection = isKilling = true;
killX = foxPlayer->getX() - 100;
killY = foxPlayer->getY();
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_NORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_X, event) && validateMoment((int) (foxPlayer->getY() - 100) / 100, (int) (foxPlayer->getX() /100))) {
foxFutureX = foxPlayer->getX();
foxFutureY = foxPlayer->getY() - 100;
typeDH = Stage::VISIBILITY_DH_NORTE;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DNORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_X, event)) {
if(validateMoment((int) (foxPlayer->getY() - 200) / 100, (int) foxPlayer->getX() /100, (int) (foxPlayer->getY() - 100) / 100, (int) foxPlayer->getX() /100)) {
foxFutureX = foxPlayer->getX();
foxFutureY = foxPlayer->getY() - 200;
typeDH = Stage::VISIBILITY_DH_DNORTE;
isDirection = isKilling = true;
killX = foxPlayer->getX();
killY = foxPlayer->getY() - 100;
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_SUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_X, event) && validateMoment((int) (foxPlayer->getY() + 100) / 100, (int) foxPlayer->getX() /100)) {
foxFutureX = foxPlayer->getX();
foxFutureY = foxPlayer->getY() + 100;
typeDH = Stage::VISIBILITY_DH_SUR;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DSUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_X, event)) {
if(validateMoment((int) (foxPlayer->getY() + 200) / 100, (int) foxPlayer->getX() /100, (int) (foxPlayer->getY() + 100) / 100, (int) foxPlayer->getX() /100)) {
foxFutureX = foxPlayer->getX();
foxFutureY = foxPlayer->getY() + 200;
typeDH = Stage::VISIBILITY_DH_DSUR;
isDirection = isKilling = true;
killX = foxPlayer->getX();
killY = foxPlayer->getY() + 100;
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_ESTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_Y, event) && validateMoment((int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 100;
foxFutureY = foxPlayer->getY();
typeDH = Stage::VISIBILITY_DH_ESTE;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DESTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_Y, event)) {
if(validateMoment((int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() + 200) /100, (int) foxPlayer->getY() / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 200;
foxFutureY = foxPlayer->getY();
typeDH = Stage::VISIBILITY_DH_DESTE;
isDirection = isKilling = true;
killX = foxPlayer->getX() + 100;
killY = foxPlayer->getY();
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_NORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_OESTE, event) && validateMoment((int) (foxPlayer->getY() - 100) / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 100;
foxFutureY = foxPlayer->getY() - 100;
typeDH = Stage::VISIBILITY_DH_DNO;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DNORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_DOESTE, event)) {
if(validateMoment((int) (foxPlayer->getY() - 200) / 100, (int) (foxPlayer->getX() - 200) /100, (int) (foxPlayer->getY() - 100) / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 200;
foxFutureY = foxPlayer->getY() - 200;
typeDH = Stage::VISIBILITY_DH_DDNO;
isDirection = isKilling = true;
killX = foxPlayer->getX() - 100;
killY = foxPlayer->getY() - 100;
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_NORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_ESTE, event) && validateMoment((int) (foxPlayer->getY() - 100) / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 100;
foxFutureY = foxPlayer->getY() - 100;
typeDH = Stage::VISIBILITY_DH_DNE;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DNORTE, event) && isLocationMouse(Stage::LOCATION_MOUSE_DESTE, event)) {
if(validateMoment((int) (foxPlayer->getY() - 200) / 100, (int) (foxPlayer->getX() + 200) /100, (int) (foxPlayer->getY() - 100) / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 200;
foxFutureY = foxPlayer->getY() - 200;
typeDH = Stage::VISIBILITY_DH_DDNE;
isDirection = isKilling = true;
killX = foxPlayer->getX() + 100;
killY = foxPlayer->getY() - 100;
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_SUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_OESTE, event) && validateMoment((int) (foxPlayer->getY() + 100) / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 100;
foxFutureY = foxPlayer->getY() + 100;
typeDH = Stage::VISIBILITY_DH_DSO;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DSUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_DOESTE, event)) {
if(validateMoment((int) (foxPlayer->getY() + 200) / 100, (int) (foxPlayer->getX() - 200) /100, (int) (foxPlayer->getY() + 100) / 100, (int) (foxPlayer->getX() - 100) /100)) {
foxFutureX = foxPlayer->getX() - 200;
foxFutureY = foxPlayer->getY() + 200;
typeDH = Stage::VISIBILITY_DH_DDSO;
isDirection = isKilling = true;
killX = foxPlayer->getX() - 100;
killY = foxPlayer->getY() + 100;
}
}
if(isLocationMouse(Stage::LOCATION_MOUSE_SUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_ESTE, event) && validateMoment((int) (foxPlayer->getY() + 100) / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 100;
foxFutureY = foxPlayer->getY() + 100;
typeDH = Stage::VISIBILITY_DH_DSE;
isDirection = true;
}
if(isLocationMouse(Stage::LOCATION_MOUSE_DSUR, event) && isLocationMouse(Stage::LOCATION_MOUSE_DESTE, event)) {
if(validateMoment((int) (foxPlayer->getY() + 200) / 100, (int) (foxPlayer->getX() + 200) /100, (int) (foxPlayer->getY() + 100) / 100, (int) (foxPlayer->getX() + 100) /100)) {
foxFutureX = foxPlayer->getX() + 200;
foxFutureY = foxPlayer->getY() + 200;
typeDH = Stage::VISIBILITY_DH_DDSE;
isDirection = isKilling = true;
killX = foxPlayer->getX() + 100;
killY = foxPlayer->getY() + 100;
}
}
}
}
void Stage::momentFox(SDL_Event event) {
if(isDirection) {
data[foxPlayer->getY()/100][foxPlayer->getX()/100] = 0;
data[foxFutureY/100][foxFutureX/100] = 2;
foxPlayer->addAction(Actor::ACTION_MOVE_TO, foxFutureX, foxFutureY);
isMomentFox = true;
if(isKilling) {
// isKiller = true;
data[killY/100][killX/100] = 0;
runner = headboard;
Actor * father = runner;
while(runner) {
if(runner->getX() == killX && runner->getY() == killY) {
Actor * deleteActor = runner;
if(runner == headboard && runner->getActorSuccessor())
headboard = runner->getActorSuccessor();
else {
if(runner->getActorSuccessor())
father->setActorSuccessor(runner->getActorSuccessor());
}
delete deleteActor;
runner = NULL;
} else {
father = runner;
runner = runner->getActorSuccessor();
}
}
}
}
}
void Stage::renderLocationDH() {
switch (typeDH)
{
case Stage::VISIBILITY_DH_NORTE:
directionHuntedN->render();
break;
case Stage::VISIBILITY_DH_SUR:
directionHuntedS->render();
break;
case Stage::VISIBILITY_DH_ESTE:
directionHuntedE->render();
break;
case Stage::VISIBILITY_DH_OESTE:
directionHuntedO->render();
break;
case Stage::VISIBILITY_DH_DNO:
directionHuntedDNO->render();
break;
case Stage::VISIBILITY_DH_DNE:
directionHuntedDNE->render();
break;
case Stage::VISIBILITY_DH_DSO:
directionHuntedDSO->render();
break;
case Stage::VISIBILITY_DH_DSE:
directionHuntedDSE->render();
break;
case Stage::VISIBILITY_DH_DDNO:
directionHuntedDDNO->render();
break;
case Stage::VISIBILITY_DH_DDNE:
directionHuntedDDNE->render();
break;
case Stage::VISIBILITY_DH_DDSO:
directionHuntedDDSO->render();
break;
case Stage::VISIBILITY_DH_DDSE:
directionHuntedDDSE->render();
break;
case Stage::VISIBILITY_DH_DNORTE:
directionHuntedDNORTE->render();
break;
case Stage::VISIBILITY_DH_DESTE:
directionHuntedDESTE->render();
break;
case Stage::VISIBILITY_DH_DOESTE:
directionHuntedDOESTE->render();
break;
case Stage::VISIBILITY_DH_DSUR:
directionHuntedDSUR->render();
break;
default:
break;
}
}
void Stage::asignData(int ** data) {
this->data = data;
for(int i=0; i<GameModel::LENGTH_MATRIZ; i++)
for(int j=0; j<GameModel::LENGTH_MATRIZ; j++)
if(data[i][j] == 1)
addActor(new Actor(renderer, "Imagenes/Personajes/gallina.png", j * 100, i * 100, Actor::BODY_HEN));
else
if(data[i][j] == 2) {
foxFutureX = j * 100;
foxFutureY = i * 100;
}
foxPlayer = new Actor(renderer, "Imagenes/Personajes/zorro.png", foxFutureX, foxFutureY, Actor::BODY_FOX);
addActor(foxPlayer);
}
void Stage::restartHunted() {
directionHuntedN->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedS->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedO->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDNO->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDNE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDSO->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDSE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDDNO->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDDNE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDDSO->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDDSE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDNORTE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDESTE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDOESTE->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
directionHuntedDSUR->setXY(foxPlayer->getX() - 300, foxPlayer->getY() - 300);
if(isKiller)
isRunningFox = true;
else {
fox->addAction(Actor::ACTION_MOVE_TO, fox->getX(), HEIGHT);
hens->addAction(Actor::ACTION_MOVE_TO, hens->getX(), HEIGHT - 140); ///// AQUI PORFA COLOCAR EN ACTOR EL WIDTH HEIGHT ODPSAJDPASJDOSAFDJOAFOSDFHSODFHODSHFDSFHIUSDFHISDUF
isRunningFox = false;
isDelayIA = true;
}
isDirection = isMomentFox = isKiller = false;
}
void Stage::insertDataIA(int i0, int j0, int i1, int j1) {
runner = headboard;
while(runner) {
if(runner->getX() == (j0 * 100) && runner->getY() == (i0 * 100)) {
runner->addAction(Actor::ACTION_MOVE_TO, j1*100, i1*100);
relativeRunner = runner;
runner = NULL;
} else
runner = runner->getActorSuccessor();
}
applyIA = false;
}
bool Stage::isLocationMouse(int typeLocationMouse, SDL_Event event) {
if(typeLocationMouse == Stage::LOCATION_MOUSE_X && event.motion.x >= foxPlayer->getX() && event.motion.x <= foxPlayer->getX() + 100)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_Y && event.motion.y >= foxPlayer->getY() && event.motion.y <= foxPlayer->getY() + 100)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_NORTE && event.motion.y <= foxPlayer->getY() && event.motion.y >= foxPlayer->getY() - 100)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_DNORTE && event.motion.y <= foxPlayer->getY() - 100 && event.motion.y >= foxPlayer->getY() - 200)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_SUR && event.motion.y <= foxPlayer->getY() + 200 && event.motion.y >= foxPlayer->getY() + 100)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_DSUR && event.motion.y <= foxPlayer->getY() + 300 && event.motion.y >= foxPlayer->getY() + 200)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_ESTE && event.motion.x >= foxPlayer->getX() + 100 && event.motion.x <= foxPlayer->getX() + 200)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_DESTE && event.motion.x >= foxPlayer->getX() + 200 && event.motion.x <= foxPlayer->getX() + 300)
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_OESTE && event.motion.x >= foxPlayer->getX() - 100 && event.motion.x <= foxPlayer->getX())
return true;
if(typeLocationMouse == Stage::LOCATION_MOUSE_DOESTE && event.motion.x >= foxPlayer->getX() - 200 && event.motion.x <= foxPlayer->getX() - 100)
return true;
return false;
}
bool Stage::validateMoment(int i, int j) {
if(data[i][j] == 0)
return true;
else
return false;
}
bool Stage::validateMoment(int i, int j, int iPre, int jPre) {
if(data[i][j] == 0 && data[iPre][jPre] == 1)
return true;
else
return false;
}
bool Stage::IsApplyIA() {
return applyIA;
}
| 37.930131 | 209 | 0.683341 | [
"render"
] |
9b7c5fb403fae4b9c75750df64c8aaedf505b7ef | 11,328 | cc | C++ | src/libsoma-io/reader/areader.cc | charbeljc/soma-io | 17548eb8eafdcb82d20ea6fba760856f279d7424 | [
"CECILL-B"
] | 3 | 2020-05-13T04:15:29.000Z | 2021-08-28T18:13:35.000Z | src/libsoma-io/reader/areader.cc | charbeljc/soma-io | 17548eb8eafdcb82d20ea6fba760856f279d7424 | [
"CECILL-B"
] | 15 | 2018-10-30T16:52:14.000Z | 2022-02-15T12:34:00.000Z | src/libsoma-io/reader/areader.cc | charbeljc/soma-io | 17548eb8eafdcb82d20ea6fba760856f279d7424 | [
"CECILL-B"
] | 3 | 2019-12-15T07:23:16.000Z | 2021-10-05T14:09:09.000Z | /* This software and supporting documentation are distributed by
* Institut Federatif de Recherche 49
* CEA/NeuroSpin, Batiment 145,
* 91191 Gif-sur-Yvette cedex
* France
*
* This software is governed by the CeCILL-B license under
* French law and abiding by the rules of distribution of free software.
* You can use, modify and/or redistribute the software under the
* terms of the CeCILL-B license as circulated by CEA, CNRS
* and INRIA at the following URL "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-B license and that you accept its terms.
*/
//--- soma-io ----------------------------------------------------------------
#include <soma-io/config/soma_config.h>
#include <soma-io/reader/areader.h>
#include <soma-io/reader/pythonreader.h>
#include <soma-io/datasource/streamdatasource.h>
#include <soma-io/utilities/asciidatasourcetraits.h>
//--- cartobase --------------------------------------------------------------
#include <cartobase/exception/file.h>
#include <cartobase/exception/parse.h>
#include <cartobase/stream/sstream.h>
#include <cartobase/object/syntobject.h>
//#include <soma-io/io/minfXML2.h> // not ready yet
#include <cartobase/stream/attachable_cuifstream.h>
//--- system -----------------------------------------------------------------
#include <vector>
#include <assert.h>
//----------------------------------------------------------------------------
using namespace std;
using namespace carto;
using namespace soma;
//============================================================================
// F U N C T I O N S
//============================================================================
namespace
{
void
intHelper(GenericObject& object, const string& semantic, DataSource & is)
{
if( is.eof() )
return;
if( !StreamUtil::skip( is ) )
return;
int i = 0;
if( !AsciiDataSourceTraits<int>::read( is, i ) )
return;
object.setProperty( semantic, i );
}
void
floatHelper(GenericObject& object, const string& semantic, DataSource & is)
{
if( is.eof() )
return;
if( !StreamUtil::skip( is ) )
return;
float f = 0;
if( !AsciiDataSourceTraits<float>::read( is, f ) )
return;
object.setProperty(semantic, f);
}
void
stringHelper(GenericObject& object, const string& semantic, DataSource & is)
{
if( is.eof() )
return;
if( !StreamUtil::skip( is, " \t" ) )
return;
string s;
StreamUtil::getline( is, s );
if( !s.empty() )
{
string::size_type i1 = s.find_first_not_of(" \t");
string::size_type i2 = s.find_last_not_of(" \t\n\r");
s = s.substr(i1, i2-i1+1);
}
object.setProperty(semantic, s);
}
void
int_vectorHelper( GenericObject& object, const string& semantic,
DataSource & is )
{
vector<int> iv;
while (1)
{
if( is.eof() )
return;
if( !StreamUtil::skip( is ) )
return;
int i;
if( !AsciiDataSourceTraits<int>::read( is, i ) )
break;
iv.push_back(i);
}
object.setProperty(semantic, iv);
}
void
float_vectorHelper( GenericObject& object, const string& semantic,
DataSource & is )
{
vector<float> fv;
while (1)
{
if( !is )
return;
if( !StreamUtil::skip( is, " \t" ) )
return;
float f;
if( !AsciiDataSourceTraits<float>::read( is, f ) )
break;
fv.push_back(f);
}
object.setProperty(semantic, fv);
}
void
genericobjectHelper( GenericObject& object, const string& semantic,
DataSource & is )
{
PythonReader pr;
rc_ptr<DataSource> ds( &is );
pr.attach( ds );
try
{
GenericObject *o = pr.read( &object, semantic );
ds.release();
if( o )
object.setProperty( semantic, Object( o ) );
}
catch( exception & e )
{
ds.release();
throw;
}
}
}
//============================================================================
// M E T H O D S
//============================================================================
AttributedReader::AttributedReader( const string& filename,
const SyntaxSet& rules,
const HelperSet& helpers )
: _rules(rules),
_datasource( new IStreamDataSource
( rc_ptr<istream>( new cuifstream( filename.c_str() ) ) ) ),
_helpers(helpers)
{
// are files opened?
if( !_datasource->isOpen() )
_datasource->open( DataSource::Read );
if (!*_datasource)
io_error::launchErrnoExcept( filename );
init();
}
AttributedReader::AttributedReader( rc_ptr<DataSource> ds,
const SyntaxSet& rules,
const HelperSet& helpers )
: _rules(rules),
_datasource( ds ),
_helpers(helpers)
{
// are files opened?
if( !_datasource->isOpen() )
_datasource->open( DataSource::Read );
if (!*_datasource)
io_error::launchErrnoExcept( ds->url() );
init();
}
AttributedReader::AttributedReader( const SyntaxSet& rules,
const HelperSet& helpers )
: _rules(rules),
_helpers(helpers)
{
init();
}
void AttributedReader::init()
{
if (_helpers.find("int") == _helpers.end())
_helpers["int"] = &intHelper;
if (_helpers.find("float") == _helpers.end())
_helpers["float"] = &floatHelper;
if (_helpers.find("string") == _helpers.end())
_helpers["string"] = &stringHelper;
if (_helpers.find("int_vector") == _helpers.end())
_helpers["int_vector"] = &int_vectorHelper;
if (_helpers.find("float_vector") == _helpers.end())
_helpers["float_vector"] = &float_vectorHelper;
if (_helpers.find("dictionary") == _helpers.end())
_helpers["dictionary"] = &genericobjectHelper;
if (_helpers.find("list") == _helpers.end())
_helpers["list"] = &genericobjectHelper;
}
AttributedReader::~AttributedReader()
{
}
void
AttributedReader::open( const string& filename )
{
close();
_datasource.reset( new IStreamDataSource
( rc_ptr<istream>( new cuifstream
( filename.c_str() ) ) ) );
_datasource->open( DataSource::Read );
// are files opened?
if( !*_datasource )
io_error::launchErrnoExcept( filename );
}
void AttributedReader::attach( rc_ptr<DataSource> ds )
{
_datasource = ds;
}
void AttributedReader::attach( istream & s, int line_num )
{
close();
attachable_cuifstream *ac = new attachable_cuifstream;
ac->attach( s, line_num );
_datasource.reset( new IStreamDataSource( rc_ptr<istream>( ac ) ) );
}
void
AttributedReader::close()
{
if( _datasource )
_datasource->close();
_datasource.reset( 0 );
}
string
AttributedReader::name() const
{
if( !_datasource )
return string();
return _datasource->url();
}
int
AttributedReader::line() const
{
if( !_datasource )
return -1;
IStreamDataSource
*sds = dynamic_cast<IStreamDataSource *>( _datasource.get() );
if( !sds )
return -1;
cuifstream *cs = dynamic_cast<cuifstream *>( &sds->stream() );
if( !cs )
return -1;
return cs->line();
}
bool
AttributedReader::operator!() const
{
return !_datasource || !*_datasource;
}
bool
AttributedReader::is_open() const
{
return _datasource && _datasource->isOpen();
}
bool
AttributedReader::eof() const
{
return !_datasource || _datasource->eof();
}
void
AttributedReader::readAttribute(GenericObject& object,
const string& semantic)
{
if( !_datasource || !*_datasource )
return;
//throw file_error( string( "EOF found" ) + _filename );
string token;
string synt = "";
SyntaxedInterface *si = object.getInterface<SyntaxedInterface>();
if( si && si->hasSyntax() )
synt = si->getSyntax();
// if this semantic attribute does have associated I/O properties...
SyntaxSet::const_iterator syntax = _rules.find(synt);
if( syntax == _rules.end() )
{
stringstream buffer;
buffer << "syntax not found: " << synt
<< ", line: " << line();
throw syntax_check_error( buffer.str(), _datasource->url() );
}
map<string,Semantic>::const_iterator property =
syntax->second.find(semantic);
map<string,Semantic>::const_iterator property2;
if (property == syntax->second.end())
property2 = syntax->second.find("__fallback__");
else
property2 = property;
if (property2 != syntax->second.end())
{
// make sure this attribute is read for the first time
if (object.hasProperty(semantic))
{
bool pset = false;
DictionaryInterface *di
= object.getInterface<DictionaryInterface>();
if( di && dynamic_cast<PropertySet *>( di ) )
/* don't test for duplicate atts in PropertySet because
builtin props are always already present.
FIXME: needs a better check, only on builtins
*/
pset = true;
if( !pset )
{
stringstream buffer;
buffer << "Several attributes of same name: " << semantic
<< ", line: " << line();
throw syntax_check_error( buffer.str(), _datasource->url() );
}
}
// find the associated I/O function
HelperSet::const_iterator h =
_helpers.find(property2->second.type);
if( h == _helpers.end() )
{
stringstream buffer;
buffer << "Can't read type " << property2->second.type
<< " for attribute " << semantic << ", line: "
<< line();
throw syntax_check_error( buffer.str(), _datasource->url() );
}
// call the associated I/O function
(h->second)( object, semantic, *_datasource );
}
else
{
string l;
StreamUtil::getline( *_datasource, l );
}
}
void
AttributedReader::readAttribute(GenericObject* object,
const string& semantic)
{
assert(object != 0);
readAttribute(*object, semantic);
}
| 26.654118 | 78 | 0.583157 | [
"object",
"vector"
] |
9b87ed00f56c45deec701e3e1f74761709db0c25 | 4,383 | cpp | C++ | src/skysun/skysun/SunRadiance.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 19 | 2016-11-07T00:01:19.000Z | 2021-12-29T05:35:14.000Z | src/skysun/skysun/SunRadiance.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 33 | 2016-07-06T21:58:05.000Z | 2020-08-01T18:18:24.000Z | src/skysun/skysun/SunRadiance.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | null | null | null | #include "SunRadiance.h"
#include "spectral/OrderedSpectrum.h"
/* The following is from the implementation of "A Practical Analytic Model for
Daylight" by A.J. Preetham, Peter Shirley, and Brian Smits */
/* All data lifted from MI. Units are either [] or cm^-1. refer when in doubt MI */
// This is based on Mitsuba code (https://github.com/mitsuba-renderer/mitsuba/blob/master/src/emitters/sunsky/sunmodel.h)
namespace PR {
// k_o Spectrum table from pg 127, MI.
static float k_oWavelengths[64] = {
300, 305, 310, 315, 320, 325, 330, 335, 340, 345,
350, 355, 445, 450, 455, 460, 465, 470, 475, 480,
485, 490, 495, 500, 505, 510, 515, 520, 525, 530,
535, 540, 545, 550, 555, 560, 565, 570, 575, 580,
585, 590, 595, 600, 605, 610, 620, 630, 640, 650,
660, 670, 680, 690, 700, 710, 720, 730, 740, 750,
760, 770, 780, 790
};
static float k_oAmplitudes[64] = {
10.0, 4.8, 2.7, 1.35, .8, .380, .160, .075, .04, .019, .007,
.0, .003, .003, .004, .006, .008, .009, .012, .014, .017,
.021, .025, .03, .035, .04, .045, .048, .057, .063, .07,
.075, .08, .085, .095, .103, .110, .12, .122, .12, .118,
.115, .12, .125, .130, .12, .105, .09, .079, .067, .057,
.048, .036, .028, .023, .018, .014, .011, .010, .009,
.007, .004, .0
};
// k_g Spectrum table from pg 130, MI.
static float k_gWavelengths[4] = {
759, 760, 770, 771
};
static float k_gAmplitudes[4] = {
0, 3.0, 0.210, 0
};
// k_wa Spectrum table from pg 130, MI.
static float k_waWavelengths[13] = {
689, 690, 700, 710, 720,
730, 740, 750, 760, 770,
780, 790, 800
};
static float k_waAmplitudes[13] = {
0, 0.160e-1, 0.240e-1, 0.125e-1,
0.100e+1, 0.870, 0.610e-1, 0.100e-2,
0.100e-4, 0.100e-4, 0.600e-3,
0.175e-1, 0.360e-1
};
/* Wavelengths corresponding to the table below */
static float solWavelengths[38] = {
380, 390, 400, 410, 420, 430, 440, 450,
460, 470, 480, 490, 500, 510, 520, 530,
540, 550, 560, 570, 580, 590, 600, 610,
620, 630, 640, 650, 660, 670, 680, 690,
700, 710, 720, 730, 740, 750
};
/* Solar amplitude in watts / (m^2 * nm * sr) */
static float solAmplitudes[38] = {
16559.0, 16233.7, 21127.5, 25888.2, 25829.1,
24232.3, 26760.5, 29658.3, 30545.4, 30057.5,
30663.7, 28830.4, 28712.1, 27825.0, 27100.6,
27233.6, 26361.3, 25503.8, 25060.2, 25311.6,
25355.9, 25134.2, 24631.5, 24173.2, 23685.3,
23212.1, 22827.7, 22339.8, 21970.2, 21526.7,
21097.9, 20728.3, 20240.4, 19870.8, 19427.2,
19072.4, 18628.9, 18259.2
};
float computeSunRadiance(float wavelength, float theta, float turbidity)
{
static OrderedSpectrumView k_oCurve(k_oAmplitudes, k_oWavelengths, 64);
static OrderedSpectrumView k_gCurve(k_gAmplitudes, k_gWavelengths, 4);
static OrderedSpectrumView k_waCurve(k_waAmplitudes, k_waWavelengths, 13);
static OrderedSpectrumView solCurve(solAmplitudes, solWavelengths, 38);
const float beta = 0.04608365822050f * turbidity - 0.04586025928522f;
// Relative Optical Mass
const float m = 1.0f / (std::cos(theta) + 0.15f * std::pow(93.885f - theta / PR_PI * 180.0f, -1.253f));
// Rayleigh Scattering
// Results agree with the graph (pg 115, MI) */
float tauR = std::exp(-m * 0.008735f * std::pow(wavelength / 1000.0f, -4.08));
// Aerosol (water + dust) attenuation
// beta - amount of aerosols present
// alpha - ratio of small to large particle sizes. (0:4,usually 1.3)
// Results agree with the graph (pg 121, MI)
constexpr float alpha = 1.3f;
float tauA = std::exp(-m * beta * std::pow(wavelength / 1000.0f, -alpha)); // wavelength should be in um
// Attenuation due to ozone absorption
// lOzone - amount of ozone in cm(NTP)
// Results agree with the graph (pg 128, MI)
constexpr float lOzone = 0.35f;
float tauO = std::exp(-m * k_oCurve.lookup(wavelength) * lOzone);
// Attenuation due to mixed gases absorption
// Results agree with the graph (pg 131, MI)
float tauG = std::exp(-1.41f * k_gCurve.lookup(wavelength) * m / std::pow(1 + 118.93f * k_gCurve.lookup(wavelength) * m, 0.45f));
// Attenuation due to water vapor absorbtion
// w - precipitable water vapor in centimeters (standard = 2)
// Results agree with the graph (pg 132, MI)
constexpr float w = 2.0;
float tauWA = std::exp(-0.2385f * k_waCurve.lookup(wavelength) * w * m / std::pow(1 + 20.07f * k_waCurve.lookup(wavelength) * w * m, 0.45f));
return std::max(0.0f, solCurve.lookup(wavelength) * tauR * tauA * tauO * tauG * tauWA);
}
} // namespace PR | 37.461538 | 145 | 0.658909 | [
"model"
] |
9ba229c7f9933ac7c3968c150038118a10326704 | 251 | cpp | C++ | cpp/pair.cpp | honux77/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 152 | 2015-01-12T07:40:53.000Z | 2022-03-20T15:51:35.000Z | cpp/pair.cpp | Brielle-Choi/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 11 | 2015-01-12T07:45:54.000Z | 2021-09-02T02:46:52.000Z | cpp/pair.cpp | Brielle-Choi/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 32 | 2015-01-12T09:10:04.000Z | 2022-03-02T09:18:17.000Z | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
using vii = vector<pair<int, int>>;
int main() {
vii a;
a.push_back(make_pair(1,1));
auto i = a[0];
cout << i.first << endl;
cout << i.second << endl;
return 0;
}
| 13.944444 | 35 | 0.629482 | [
"vector"
] |
9bbe25ad50a52395f8406d02d669464d3e3c9419 | 2,529 | cpp | C++ | aws-cpp-sdk-nimble/source/model/StudioComponentInitializationScriptRunContext.cpp | perfectrecall/aws-sdk-cpp | fb8cbebf2fd62720b65aeff841ad2950e73d8ebd | [
"Apache-2.0"
] | 1 | 2022-02-12T08:09:30.000Z | 2022-02-12T08:09:30.000Z | aws-cpp-sdk-nimble/source/model/StudioComponentInitializationScriptRunContext.cpp | perfectrecall/aws-sdk-cpp | fb8cbebf2fd62720b65aeff841ad2950e73d8ebd | [
"Apache-2.0"
] | 1 | 2022-01-03T23:59:37.000Z | 2022-01-03T23:59:37.000Z | aws-cpp-sdk-nimble/source/model/StudioComponentInitializationScriptRunContext.cpp | ravindra-wagh/aws-sdk-cpp | 7d5ff01b3c3b872f31ca98fb4ce868cd01e97696 | [
"Apache-2.0"
] | 1 | 2021-11-09T11:58:03.000Z | 2021-11-09T11:58:03.000Z | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/nimble/model/StudioComponentInitializationScriptRunContext.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace NimbleStudio
{
namespace Model
{
namespace StudioComponentInitializationScriptRunContextMapper
{
static const int SYSTEM_INITIALIZATION_HASH = HashingUtils::HashString("SYSTEM_INITIALIZATION");
static const int USER_INITIALIZATION_HASH = HashingUtils::HashString("USER_INITIALIZATION");
StudioComponentInitializationScriptRunContext GetStudioComponentInitializationScriptRunContextForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SYSTEM_INITIALIZATION_HASH)
{
return StudioComponentInitializationScriptRunContext::SYSTEM_INITIALIZATION;
}
else if (hashCode == USER_INITIALIZATION_HASH)
{
return StudioComponentInitializationScriptRunContext::USER_INITIALIZATION;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StudioComponentInitializationScriptRunContext>(hashCode);
}
return StudioComponentInitializationScriptRunContext::NOT_SET;
}
Aws::String GetNameForStudioComponentInitializationScriptRunContext(StudioComponentInitializationScriptRunContext enumValue)
{
switch(enumValue)
{
case StudioComponentInitializationScriptRunContext::SYSTEM_INITIALIZATION:
return "SYSTEM_INITIALIZATION";
case StudioComponentInitializationScriptRunContext::USER_INITIALIZATION:
return "USER_INITIALIZATION";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StudioComponentInitializationScriptRunContextMapper
} // namespace Model
} // namespace NimbleStudio
} // namespace Aws
| 35.619718 | 134 | 0.699486 | [
"model"
] |
9bc50ace813defa97fe4bb9373b0e9cba9ebf56b | 4,966 | hpp | C++ | include/seqan3/alphabet/nucleotide/concept.hpp | h-2/seqan3 | 2cbc19c6f2cdb76c65ed6ff6ae70fc67334146d7 | [
"CC-BY-4.0",
"CC0-1.0"
] | 4 | 2018-03-09T09:37:51.000Z | 2020-07-28T04:52:01.000Z | include/seqan3/alphabet/nucleotide/concept.hpp | h-2/seqan3 | 2cbc19c6f2cdb76c65ed6ff6ae70fc67334146d7 | [
"CC-BY-4.0",
"CC0-1.0"
] | null | null | null | include/seqan3/alphabet/nucleotide/concept.hpp | h-2/seqan3 | 2cbc19c6f2cdb76c65ed6ff6ae70fc67334146d7 | [
"CC-BY-4.0",
"CC0-1.0"
] | 1 | 2018-03-09T09:37:54.000Z | 2018-03-09T09:37:54.000Z | // -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
// -----------------------------------------------------------------------------------------------------
/*!\file
* \author Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>
* \author Jörg Winkler <j.winkler AT fu-berlin.de>
* \brief Provides seqan3::NucleotideAlphabet.
*/
#pragma once
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/std/concepts>
// ============================================================================
// forwards
// ============================================================================
//!\cond
namespace seqan3::custom
{
void complement();
} // namespace seqan3::custom
//!\endcond
// ============================================================================
// complement()
// ============================================================================
namespace seqan3::detail::adl::only
{
//!\brief Functor definition for seqan3::complement.
struct complement_fn
{
private:
SEQAN3_CPO_IMPL(2, complement(v) ) // ADL
SEQAN3_CPO_IMPL(1, seqan3::custom::complement(v) ) // customisation namespace
SEQAN3_CPO_IMPL(0, v.complement() ) // member
public:
//!\brief Operator definition.
template <typename nucleotide_t>
//!\cond
requires requires (nucleotide_t const nucl) { { impl(priority_tag<2>{}, nucl) }; }
//!\endcond
constexpr auto operator()(nucleotide_t const nucl) const noexcept
{
static_assert(noexcept(impl(priority_tag<2>{}, nucl)),
"Only overloads that are marked noexcept are picked up by seqan3::complement().");
static_assert(std::Same<nucleotide_t, decltype(impl(priority_tag<2>{}, nucl))>,
"The return type of your complement() implementation must be 'nucleotide_t'.");
return impl(priority_tag<2>{}, nucl);
}
};
} // namespace seqan3::detail::adl::only
namespace seqan3
{
/*!\name Function objects (Nucleotide)
* \{
*/
/*!\brief Return the complement of a nucleotide object.
* \tparam your_type Type of the argument.
* \param nucl The nucleotide object for which you want to receive the complement.
* \returns The complement character of `nucl`, e.g. 'C' for 'G'.
* \ingroup nucleotide
* \details
*
* This is a function object. Invoke it with the parameter(s) specified above.
*
* It acts as a wrapper and looks for three possible implementations (in this order):
*
* 1. A free function `complement(your_type const a)` in the namespace of your type (or as `friend`).
* The function must be marked `noexcept` (`constexpr` is not required, but recommended) and the
* return type be `your_type`.
* 2. A free function `complement(your_type const a)` in `namespace seqan3::custom`.
* The same restrictions apply as above.
* 3. A member function called `complement()`.
* It must be marked `noexcept` (`constexpr` is not required, but recommended) and the return type be
* `your_type`.
*
* Every nucleotide alphabet type must provide one of the above.
*
* ### Example
*
* \include test/snippet/alphabet/nucleotide/complement_fn.cpp
*
* ### Customisation point
*
* This is a customisation point (see \ref about_customisation). To specify the behaviour for your own alphabet type,
* simply provide one of the three functions specified above.
*/
inline constexpr auto complement = detail::adl::only::complement_fn{};
//!\}
// ============================================================================
// NucleotideAlphabet concept
// ============================================================================
/*!\interface seqan3::NucleotideAlphabet <>
* \extends seqan3::Alphabet
* \brief A concept that indicates whether an alphabet represents nucleotides.
* \ingroup nucleotide
*
* \details
*
* In addition to the requirements for seqan3::Alphabet, the NucleotideAlphabet introduces
* a requirement for a complement function: seqan3::NucleotideAlphabet::complement.
*
* ### Requirements
*
* 1. `t` shall model seqan3::Alphabet
* 2. seqan3::complement needs to be defined for objects of type `t`
*
* See the documentation pages for the respective requirements.
*
* ### Related types
*
* If a given type `t` models this concept, the following types typically do so, as well:
*
* * `t &`
* * `t const`
* * `t const &`
*/
//!\cond
template <typename t>
SEQAN3_CONCEPT NucleotideAlphabet = Alphabet<t> && requires (t val)
{
{ seqan3::complement(val) };
};
//!\endcond
} // namespace seqan3
| 34.248276 | 117 | 0.595248 | [
"object",
"model"
] |
9bca69a5f885b140d1b370560cab5993c8d263cb | 43,580 | cpp | C++ | Modules/GameLoader/gameloader.cpp | alanzw/FGCG | 9819ff9c543cf52bfac16655d1d30417291b5d4c | [
"Apache-2.0"
] | 13 | 2016-10-24T11:39:12.000Z | 2021-04-11T13:24:05.000Z | Modules/GameLoader/gameloader.cpp | zhangq49/sharerender | 9819ff9c543cf52bfac16655d1d30417291b5d4c | [
"Apache-2.0"
] | 1 | 2016-12-12T01:11:02.000Z | 2016-12-12T01:11:02.000Z | Modules/GameLoader/gameloader.cpp | zhangq49/sharerender | 9819ff9c543cf52bfac16655d1d30417291b5d4c | [
"Apache-2.0"
] | 4 | 2018-06-05T03:39:06.000Z | 2020-06-06T04:44:20.000Z | #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <Windows.h>
#include "gameloader.h"
#include "../LibCore/Log.h"
#include "detours/detours.h"
#include "../LibDistrubutor/Distributor.h"
#include "../LibCore/InfoRecorder.h"
//#include <KtmW32.h>
#include <tchar.h>
//#include "../LibCore/InfoRecorder.h"
#pragma comment(lib, "detours.lib")
//#pragma comment(lib, "detours/detours.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "event.lib")
#pragma comment(lib, "event_core.lib")
#pragma comment(lib, "event_extra.lib")
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
//#pragma comment(lib, "KtmW32.lib")
//libs for video
#ifndef _DEBUG
#pragma comment(lib, "cuda.lib")
#pragma comment(lib, "cudart.lib")
#pragma comment(lib, "libliveMedia.lib")
#pragma comment(lib, "libgroupsock.lib")
#pragma comment(lib, "libBasicUsageEnvironment.lib")
#pragma comment(lib, "libUsageEnvironment.lib")
#pragma comment(lib, "SDL2.lib")
#pragma comment(lib, "swscale.lib")
#pragma comment(lib, "swresample.lib")
#pragma comment(lib, "postproc.lib")
#pragma comment(lib, "avdevice.lib")
#pragma comment(lib, "avfilter.lib")
#pragma comment(lib, "avformat.lib")
#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avutil.lib")
#else
#pragma comment(lib, "cuda.lib")
#pragma comment(lib, "cudart.lib")
#pragma comment(lib, "libliveMedia.d.lib")
#pragma comment(lib, "libgroupsock.d.lib")
#pragma comment(lib, "libBasicUsageEnvironment.d.lib")
#pragma comment(lib, "libUsageEnvironment.d.lib")
#pragma comment(lib, "SDL2.lib")
#pragma comment(lib, "swscale.lib")
#pragma comment(lib, "swresample.lib")
#pragma comment(lib, "postproc.lib")
#pragma comment(lib, "avdevice.lib")
#pragma comment(lib, "avfilter.lib")
#pragma comment(lib, "avformat.lib")
#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avutil.lib")
#pragma comment(lib, "nvcuvenc.lib")
#endif
#if 0
// command for logic server
extern const char * INFO; // recv info cmd from dis, collect the domain info
extern const char * ADD_RENDER; // recv add render cmd from dis
extern const char * DECLINE_RENDER; // recv decline render cmd from dis
extern const char * GAME_EXIT; // recv game exit cmd from dis
extern const char * CANCEL_TASK; // recv cancel task cmd from DIS
extern const char * START_TASK;
#endif
// global functions
void onBufferEventRead(struct bufferevent * bev, void *ctx);
void onBufferEventEvent(struct bufferevent * bev, short events, void * ctx);
void listenerCB(struct evconnlistener * listerner, evutil_socket_t sock, struct sockaddr * sddr, int len, void * ctx);
void acceptErrorCB(struct evconnlistener * listener, void *ctx);
// this is for the game loader
#if 0
GameLoader::GameLoader(){
gameSpider = new GameSpider();
}
GameLoader::~GameLoader(){
if(gameSpider){
delete gameSpider;
gameSpider = NULL;
}
}
// load a 2D game, and start the video seerver
HANDLE GameLoader::load2DGame(char * gameName){
// find the path
//char gamePath[MAX_PATH]; // to store the path
char * path = NULL; // remember to free
path = gameSpider->getPath(gameName);
if(!gameSpider->changeCurrentDirectory(path)){
// failed to set path
}
char * dllName = NULL;
// start the game?
dllName = gameSpider->getHookDllName();
HANDLE ret = this->startGameWidthDll(gameName, dllName, gamePath);
return ret;
// notify the distributor that the game source.
}
/// loading the 3D game may need the cmdline?
HANDLE GameLoader::loadD3DGame(char * gameName){
char * gamePath = NULL; // remember to free
gamePath = gameSpider->getPath(gameName);
char * dllName = NULL;
dllName = gameSpider->getHookDllName();
// start the game?
/// seemed OK, for now
HANDLE ret = this->startGameWidthDll(gameName, dllName, gamePath);
return ret;
}
// first, judge the game type, whether it is D3D or 2D game. then call the load2DGame or loadD3DGame to start the game
HANDLE GameLoader::loadGame(char * gameName){
int isD3DGame = 0;
HANDLE ret = NULL;
isD3DGame = gameSpider->isD3DSupported(gameName);
if(isD3DGame){
ret = this->loadD3DGame(gameName);
}else{
ret = this->load2DGame(gameName);
}
return ret;
}
HANDLE GameLoader::start2DGame(char * gameName, char * gamePath){
infoRecorder->logTrace("[GameLoader]: start 2D game '%s'.\n", gameName);
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
HANDLE hnd = GetCurrentProcess();
printf("Listening\nhandle %d\n", hnd);
LPSECURITY_ATTRIBUTES lp_attributes;
LPSECURITY_ATTRIBUTES lpThreadAttributes;
STARTUPINFO startupInfo = { sizeof(startupInfo) };
memset(&startupInfo, 0, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.dwFlags = 0;
startupInfo.wShowWindow = SW_HIDE;
PROCESS_INFORMATION processInformation;
char cmdLine[100];
DWORD id = GetCurrentProcessId();
sprintf(cmdLine, "%s", gameName);
printf("cmd line is %s\n", cmdLine);
bool ret = CreateProcess(NULL, cmdLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, NULL, gamePath, &si, &pi);
if (!ret) {
char err_str[200];
sprintf(err_str, "Game Start %s Failed", gameName);
MessageBox(NULL, err_str, "Error", MB_OK);
}
return pi.hProcess;
}
HANDLE GameLoader::startGameWidthDll(char * gameName, char * dllName, char * gamePath){
infoRecorder->logError("[GameLoader]: start game with dll.\n");
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
HANDLE hnd = GetCurrentProcess();
printf("Listening\nhandle %d\n", hnd);
LPSECURITY_ATTRIBUTES lp_attributes;
LPSECURITY_ATTRIBUTES lpThreadAttributes;
STARTUPINFO startupInfo = { sizeof(startupInfo) };
memset(&startupInfo, 0, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.dwFlags = 0;
startupInfo.wShowWindow = SW_HIDE;
PROCESS_INFORMATION processInformation;
char cmdLine[100];
DWORD id = GetCurrentProcessId();
sprintf(cmdLine, "%s", gameName);
printf("cmd line is %s\n", cmdLine);
bool ret = DetourCreateProcessWithDll(NULL, cmdLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE,
NULL, gamePath, &si, &pi, dllName, NULL);
if (!ret) {
char err_str[200];
sprintf(err_str, "Game Start %s Failed", gameName);
MessageBox(NULL, err_str, "Error", MB_OK);
}
return pi.hProcess;
}
#else
GameLoader * GameLoader::loader;
ProcessManager * ProcessManager::mgr;
RenderManager * RenderManager::mgr;
GameLoader::GameLoader(){
gameInfo = GameInfo::GetGameInfo();
if(!gameInfo->loadInfo()){
printf("[GameLoader]: load game information failed.\n");
}
else{
gameInfo->showAllInfo();
}
}
GameLoader::GameLoader(char * mapFile){
gameInfo = GameInfo::GetGameInfo(mapFile);
if(!gameInfo->loadInfo()){
printf("[GameLoader]: load game information failed.\n");
}
else{
gameInfo->showAllInfo();
}
}
GameLoader::~GameLoader(){
}
// load a 2D game, and start the video server
HANDLE GameLoader::load2DGame(char * gameName){
// find the path
#if 0
//char gamePath[MAX_PATH]; // to store the path
const char * path = NULL; // remember to free
path = gameInfo->findGamePath(gameName).c_str();
const char * dllName = NULL;
// start the game?
dllName = gameInfo->findGameDll(gameName).c_str();
HANDLE ret = this->startGameWithDll(gameName, (char *)dllName, (char *)path);
return ret;
#else
GameInfoItem * item = gameInfo->findGameInfo(gameName);
/// seemed OK, for now
HANDLE ret = this->startGameWithDll((char *)item->gameName.c_str(), (char *)item->hookDll.c_str(), (char *)item->gamePath.c_str());
return ret;
#endif
// notify the distributor that the game source.
}
// load a 2D game, and start the video server
HANDLE GameLoader::load2DGame(char * gameName,char * arg, char * dllName){
// find the path
#if 0
//char gamePath[MAX_PATH]; // to store the path
const char * path = NULL; // remember to free
path = gameInfo->findGamePath(gameName).c_str();
const char * dllName = NULL;
// start the game?
dllName = gameInfo->findGameDll(gameName).c_str();
HANDLE ret = this->startGameWithDll(gameName, (char *)dllName, (char *)path, arg);
#else
GameInfoItem * item = gameInfo->findGameInfo(gameName);
/// seemed OK, for now
HANDLE ret = NULL;
if(dllName)
ret = this->startGameWithDll((char *)item->gameName.c_str(), (char *)item->hookDll.c_str(), (char *)item->gamePath.c_str(), arg);
else
ret = startGameWithDll((char *)item->gameName.c_str(), dllName, (char *)item->gamePath.c_str(), arg);
#endif
return ret;
// notify the distributor that the game source.
}
/// loading the 3D game may need the cmd line?
HANDLE GameLoader::loadD3DGame(char * gameName){
#if 0
char * gamePath = NULL; // remember to free
gamePath = (char *)gameInfo->findGamePath(gameName).c_str();
char * dllName = NULL;
dllName = (char *)gameInfo->findGameDll(gameName).c_str();
// start the game?
/// seemed OK, for now
HANDLE ret = this->startGameWithDll(gameName, dllName, gamePath);
#else
GameInfoItem * item = gameInfo->findGameInfo(gameName);
/// seemed OK, for now
HANDLE ret = this->startGameWithDll((char *)item->gameName.c_str(), (char *)item->hookDll.c_str(), (char *)item->gamePath.c_str());
#endif
return ret;
}
/// loading the 3D game may need the cmd line?
HANDLE GameLoader::loadD3DGame(char * gameName,char * arg, char * dllName){
#if 0
char * gamePath = NULL; // remember to free
gamePath = (char *)gameInfo->findGamePath(gameName).c_str();
char * dllName = NULL;
dllName = (char *)gameInfo->findGameDll(gameName).c_str();
HANDLE ret = this->startGameWithDll(gameName, dllName, gamePath, arg);
#else
// start the game?
GameInfoItem * item = gameInfo->findGameInfo(gameName);
/// seemed OK, for now
HANDLE ret = NULL;
if(NULL == dllName){
ret = this->startGameWithDll((char *)item->gameName.c_str(), (char *)item->hookDll.c_str(), (char *)item->gamePath.c_str(), arg);
}
else{
cout << "[GameLoader]: use user dll: " << dllName <<endl;
ret = startGameWithDll((char *)item->gameName.c_str(), dllName, (char *)item->gamePath.c_str(), arg);
}
#endif
return ret;
}
// first, judge the game type, whether it is D3D or 2D game. then call the load2DGame or loadD3DGame to start the game
HANDLE GameLoader::loadGame(char * gameName){
bool isD3DGame = false;
HANDLE ret = NULL;
isD3DGame = gameInfo->isD3DSupported(gameName);
if(isD3DGame){
printf("[GameLoader]: game '%s' supported d3d.\n", gameName);
ret = this->loadD3DGame(gameName);
}else{
printf("[GameLoacder]: game '%s' not support d3d.\n", gameName);
ret = this->load2DGame(gameName);
}
return ret;
}
// load game with arg
HANDLE GameLoader::loadGame(char * gameName, char * arg, char * dllName){
bool isD3DGame = false;
HANDLE ret = NULL;
isD3DGame = gameInfo->isD3DSupported(gameName);
if(isD3DGame){
printf("[GameLoader]: game '%s' supported d3d.\n", gameName);
ret = this->loadD3DGame(gameName, arg, dllName);
}else{
printf("[GameLoacder]: game '%s' not support d3d.\n", gameName);
ret = this->load2DGame(gameName, arg, dllName);
}
// create usage logger for each process
return ret;
}
// start a 2D game, not used
HANDLE GameLoader::start2DGame(char * gameName, char * gamePath){
//infoRecorder->logTrace("[GameLoader]: start 2D game '%s'.\n", gameName);
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
HANDLE hnd = GetCurrentProcess();
printf("Listening\nhandle %d\n", hnd);
LPSECURITY_ATTRIBUTES lp_attributes;
LPSECURITY_ATTRIBUTES lpThreadAttributes;
STARTUPINFO startupInfo = { sizeof(startupInfo) };
memset(&startupInfo, 0, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.dwFlags = 0;
startupInfo.wShowWindow = SW_HIDE;
PROCESS_INFORMATION processInformation;
char cmdLine[100];
DWORD id = GetCurrentProcessId();
sprintf(cmdLine, "%s", gameName);
printf("cmd line is %s\n", cmdLine);
return pi.hProcess;
}
// start the game with given dll
HANDLE GameLoader::startGameWithDll(char * gameName, char * dllName, char * gamePath){
//infoRecorder->logError("[GameLoader]: start game with dll.\n");
return startGameWithDll(gameName,dllName,gamePath, NULL);
}
// search the current path, whether the dll exist, if exist, copy it to new path
bool GameLoader::copyFile(char * curPath, char * newPath, char * dllName){
bool ret = true;
char fileName[MAX_PATH] = {0};
char newFileName[MAX_PATH] = {0};
sprintf(fileName, "%s\\%s", ".", dllName);
sprintf(newFileName, "%s\\%s", newPath, dllName);
//LPWSTR note = _T("copy dll file trans");
#if 0
HANDLE trans = CreateTransaction(NULL, 0, TRANSACTION_DO_NOT_PROMOTE, 0, 0,INFINITE, NULL);
if(trans == INVALID_HANDLE_VALUE){
infoRecorder->logError("[GameLoader]: create transaction failed with:%d.\n", GetLastError());
return false;
}
BOOL bRet = CopyFileTransacted(fileName, newFileName, NULL, NULL, FALSE, COPY_FILE_FAIL_IF_EXISTS | COPY_FILE_RESTARTABLE, trans);
if(!bRet){
infoRecorder->logError("[GameLoader]: copy file failed, %d.\n", GetLastError());
ret = false;
}
CloseHandle(trans);
return ret;
#else
return false;
#endif
}
// check the file eixst in path or not
bool GameLoader::checkFile(char * path, char * name){
WIN32_FIND_DATA findFileData;
LPTSTR dir;
HANDLE hFind = INVALID_HANDLE_VALUE;
bool ret = true;
dir = (LPTSTR)malloc(MAX_PATH);
sprintf(dir, "%s\\%s", path, name);
hFind = FindFirstFile(dir, &findFileData);
if(hFind == INVALID_HANDLE_VALUE){
infoRecorder->logError("[GameLoader]: find the dll '%s' in path '%s', full name '%s', failed.\n", name, path, dir);
FindClose(hFind);
return false;
}
infoRecorder->logTrace("[GameLoader]: dll '%s' exist in '%s'.\n", name, path);
FindClose(hFind);
return true;
}
// check the dll file, whether it exist in the game path, if not, copy it
bool GameLoader::checkDllFile(char * gamePath, char *dllName){
bool ret = true;
if(!checkFile(gamePath, dllName)){
if(checkFile(".", dllName)){
// valid file
return copyFile(".", gamePath, dllName);
}
return false;
}
else{
// dll exist in the game path
}
return ret;
}
// start the game with given dll and arg
HANDLE GameLoader::startGameWithDll(char * gameName, char * dllName, char * gamePath, char * arg){
//infoRecorder->logError("[GameLoader]: start game with dll.\n");
printf("[GameLoader]: star game '%s' with dll '%s', path '%s'.\n", gameName, dllName, gamePath);
if(!checkDllFile(gamePath, dllName)){
infoRecorder->logError("[GameLoader]: resolve the dll file failed.\n");
printf("[GameLoader]: resolve the dll file '%s' in path '%s' failed.\n", dllName, gamePath);
return NULL;
}
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
HANDLE hnd = GetCurrentProcess();
printf("Listening\nhandle %d\n", hnd);
LPSECURITY_ATTRIBUTES lp_attributes;
LPSECURITY_ATTRIBUTES lpThreadAttributes;
STARTUPINFO startupInfo = { sizeof(startupInfo) };
memset(&startupInfo, 0, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
startupInfo.dwFlags = 0;
startupInfo.wShowWindow = SW_HIDE;
PROCESS_INFORMATION processInformation;
char cmdLine[MAX_PATH];
DWORD id = GetCurrentProcessId();
if(arg)
sprintf(cmdLine, "%s/%s %s",gamePath, gameName, arg);
else
sprintf(cmdLine, "%s/%s",gamePath, gameName);
printf("cmd line is %s\n", cmdLine);
BOOL ret = DetourCreateProcessWithDll(NULL, cmdLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE,
NULL, gamePath, &si, &pi, dllName, NULL);
if (!ret) {
char err_str[200];
sprintf(err_str, "Game Start %s Failed", gameName);
MessageBox(NULL, err_str, "Error", MB_OK);
}
return pi.hProcess;
}
// Factory
LogicFactory* LogicFactory::logic;
// enter the libevent loop
void LogicFactory::enterLoop(){
printf("[GameLoader]: enter loop.\n");
event_base_dispatch(base);
// before exit
printf("[GameLoader]: before exit, clean up.\n");
if(processListener){
evconnlistener_free(processListener);
processListener = NULL;
}
}
// init the game loader, include initing the socket
bool LogicFactory::init(){
printf("[GameLoader]: init.\n");
// create the event base, the base is for logic factory only
base = NULL;
base = event_base_new();
if(!base){
fprintf(stderr, "Couldn't create an event_base: exiting.\n");
return false;
}
return true;
}
// connect to the DisServer
bool LogicFactory::connectDis(char * ip, short port){
printf("[LogicFactory]: connect to dis server.\n");
bool ret = true;
sockaddr_in sin;
evutil_socket_t sock = NULL;
int sin_size = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr(ip);
sin.sin_port = htons(port);
struct bufferevent * bev = NULL;
#if 0
bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, onBufferEventRead, NULL, onBufferEventEvent, NULL);
// connect to dis
if(bufferevent_socket_connect(bev, (struct sockaddr *)&sin, sizeof(sin)) < 0){
// error starting connection
bufferevent_free(bev);
return false;
}
#else
// create the bufferevent
sock = socket(AF_INET, SOCK_STREAM, 0);
if(evutil_make_socket_nonblocking(sock) < 0){
infoRecorder->logError("[LogicFactory]: make socket non blocking failed.\n");
return false;
}
frobSocket(sock);
infoRecorder->logTrace("[LogicFactory]: connection established.\n");
bev = bufferevent_socket_new(base, sock, BEV_OPT_CLOSE_ON_FREE);
if(!ctx){
ctx = new BaseContext();
}
ctx->sock = sock;
ctx->bev = bev;
// set the callback function
bufferevent_setcb(bev, onBufferEventRead, NULL, onBufferEventEvent, ctx);
//connect to dis
if(bufferevent_socket_connect(bev, (struct sockaddr *)&sin, sizeof(sin)) < 0){
infoRecorder->logError("[LogicFactory]: error starting connection.\n");
bufferevent_free(bev);
return false;
}
bufferevent_enable(bev, EV_READ | EV_WRITE);
#endif
return ret;
}
bool LogicFactory::registerLogic(){
infoRecorder->logTrace("[LogicFactory]: register the logic server.\n");
ctx->writeCmd(REGISTER);
ctx->writeData((void *)LOGIC, strlen(LOGIC));
ctx->writeToNet();
return true;
}
// start listen to render
bool LogicFactory::startInternalListen(){
printf("[LogicFactory]: start to listen to game process.\n");
unsigned short port = INTERNAL_PORT;
if(conf){
port = conf->loaderPort;
}
// create loader listener for game process to connect
sockaddr_in sin;
int sin_size = sizeof(sin);
memset(&sin, 0, sin_size);
sin.sin_family = AF_INET;
sin.sin_addr.S_un.S_addr = htonl(0);
sin.sin_port = htons(port); // the graphic port
// create listener with processManager
processListener = evconnlistener_new_bind(base, listenerCB, pmgr, LEV_OPT_LEAVE_SOCKETS_BLOCKING | LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, -1, (sockaddr *)&sin, sin_size); // = evcon
if(!processListener){
perror("couldn't create listener.\n");
return false;
}
evconnlistener_set_error_cb(processListener, acceptErrorCB);
return true;
}
// start the ctrl listen
bool LogicFactory::startCtrlListen(){
printf("[LogicFactory]: start to listen to render.\n");
sockaddr_in sin;
int sin_size = sizeof(sin);
memset(&sin, 0, sin_size);
sin.sin_family = AF_INET;
sin.sin_addr.S_un.S_addr = htonl(0);
sin.sin_port = htons(60001);
ctrlListener = evconnlistener_new_bind(base, listenerCB, cmgr, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_LEAVE_SOCKETS_BLOCKING | LEV_OPT_REUSEABLE, -1, (sockaddr *)&sin, sin_size);
if(!ctrlListener){
perror("couldn't create render listener.\n");
return false;
}
evconnlistener_set_error_cb(ctrlListener, acceptErrorCB);
return true;
}
// start listen to process
bool LogicFactory::startRenderListen(){
printf("[LogicFactory]: start to listen to render.\n");
unsigned port = 60000;
if(conf){
port = conf->graphicPort;
}
sockaddr_in sin;
int sin_size = sizeof(sin);
memset(&sin, 0, sin_size);
sin.sin_family = AF_INET;
sin.sin_addr.S_un.S_addr = htonl(0);
sin.sin_port = htons(port);
renderListener = evconnlistener_new_bind(base, listenerCB, rmgr, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_LEAVE_SOCKETS_BLOCKING | LEV_OPT_REUSEABLE, -1, (sockaddr *)&sin, sin_size);
if(!renderListener){
perror("couldn't create render listener.\n");
return false;
}
evconnlistener_set_error_cb(renderListener, acceptErrorCB);
return true;
}
// start to listen
bool LogicFactory::startListen(){
printf("[LogicFactory]: start to listen.\n");
bool ret = true;
if(!startInternalListen() || !startRenderListen()){
printf("[GameLoader]: start listen failed.\n");
return false;
}
return ret;
}
////////////////////// for context //////////////////////
// logic deal all the cmd from dis, render, client and even the game process
bool LogicFactory::dealCmd(BaseContext * ctx){
infoRecorder->logError("[LogicFactory]: deal cmd.\n");
bool ret = true;
char feedback[1000] = { 0 };
ctx->readCmd();
int len = 0;
char * cmd = ctx->getCmd();
if (!strncasecmp(cmd, INFO, strlen(INFO))){
infoRecorder->logError("[LogicFactory]: INFO.\n");
// collect information and feedback, the cmd is from dis
float cpuUsage = 0.0f, gpuUsage = 0.0f, memUsage = 0.0f;
collectInfo(cpuUsage, gpuUsage, memUsage);
ctx->writeCmd(cg::INFO);
ctx->writeFloat(cpuUsage);
ctx->writeFloat(gpuUsage);
ctx->writeFloat(memUsage);
ctx->writeToNet();
}
else if (!strncasecmp(cmd, ADD_RENDER, strlen(ADD_RENDER))){
infoRecorder->logError("[LogicFactory]: ADD RENDER, the new render will auto added.\n");
// add a render to exist connection, the cmd is from render proxy
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)data; // to find the task
IDENTIFIER renderId = *(IDENTIFIER *)(data + sizeof(IDENTIFIER));
LogicTask * task = findTask(id);
// find the logic task
// add render
task->addRender(ctx);
BaseContext * game = NULL;
game = task->processCtx;
// tell game to add
game->writeCmd(ADD_RENDER);
// write current renders' connection
game->writeIdentifier(ctx->sock);
DWORD curPid = GetCurrentProcessId();
infoRecorder->logTrace("[LogicFactory]: current process id:%p.\n", curPid);
infoRecorder->logError("[LogicFactory]: current process id:%d.\n", curPid);
game->writeData(&curPid, sizeof(DWORD));
game->writeToNet(); // write to game process
}
else if (!strncasecmp(cmd, DECLINE_RENDER, strlen(DECLINE_RENDER))){
// the cmd is from dis
printf("[LogicFactory]: DECLINE RENDER.\n");
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)data; // to find the task
// distinguish render
IDENTIFIER renderId = *(IDENTIFIER *)(data + sizeof(IDENTIFIER));
LogicTask * task = findTask(id);
if(!task){
infoRecorder->logError("[LogicFactaory]: did not find the task.\n");
return false;
}
task->removeRender(renderId);
// tell the game process to decline the given render
BaseContext * game = task->processCtx;
game->writeCmd(DECLINE_RENDER);
game->writeIdentifier(renderId);
game->writeToNet();
}
else if (!strncasecmp(cmd, GAME_EXIT, strlen(GAME_EXIT))){
infoRecorder->logError("[LogicFactory]: GAME EXIT, TODO.\n");
}
else if (!strncasecmp(cmd, CANCEL_TASK, strlen(CANCEL_TASK))){
infoRecorder->logError("[LogicFactory]: CANCEl TASK.\n");
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)data;
data += sizeof(IDENTIFIER) + 1;
// TODO, cancel the task
// tell the process to exit
LogicTask * task = findTask(id);
if(!task){
infoRecorder->logError("[LogicFactory]: cannot find the task \n");
return false;
}
BaseContext * game = task->processCtx;
game->writeCmd(GAME_EXIT);
game->writeIdentifier(id);
game->writeToNet();
// remove the task
removeTask(id);
// feedback with domain information
//collect information
float cpuUsage = 0.0f, gpuUsage = 0.0f, memUsage = 0.0f;
collectInfo(cpuUsage, gpuUsage, memUsage);
ctx->writeCmd(INFO);
ctx->writeFloat(cpuUsage);
ctx->writeFloat(gpuUsage);
ctx->writeFloat(memUsage);
ctx->writeToNet();
}else if(!strncasecmp(cmd, START_GAME, strlen(START_GAME))){
// start game, the socket is the render proxy
char * data = ctx->getData();
char * gameName = data;
HANDLE processHandle = NULL;
char * arg = (char *)malloc(sizeof(char) *1024);
sprintf(arg, "-m 0 -r %d -e %d -a %d -p %d", 0, 1, ctx->sock, GetCurrentProcessId());
processHandle = loader->loadGame(gameName, arg);
if(!processHandle){
infoRecorder->logError("[LogicFactory]: load game '%s' '%s' failed.\n", gameName, arg);
return false;
}
free(arg);
}
else if (!strncasecmp(cmd, START_TASK, strlen(START_TASK))){
infoRecorder->logError("[LogicFactory]: START TASK.\n");
// start a game with no render
char * data = ctx->getData();
//data++;
IDENTIFIER id = *(IDENTIFIER *)data;
TASK_MODE mode = (TASK_MODE)*(short *)(data + sizeof(IDENTIFIER));
char * gameName = (data + sizeof(IDENTIFIER) + sizeof(short));
infoRecorder->logError("[LogicFactory]: start game '%s', task id:%p.\n", gameName, id);
HANDLE processHandle = NULL;
/*
char arg[20] = {0};
// create the full parameters to run the game
sprintf(arg, "%d", id);
processHandle = loader->loadGame(gameName, arg);
*/
char * arg = (char *)malloc(sizeof(char) * 1024);
if(mode == MODE_FULL_OFFLOAD){
sprintf(arg, "-i %d -m 1 -r %d -e %d", id, 0, encoderOption);
}
else if(mode == MODE_PARTIAL_OFFLOAD){
sprintf(arg, "-i %d -m 1 -r %d -e %d", id, 2, encoderOption);
}else if(mode == MODE_NO_OFFLOAD){
sprintf(arg, "-i %d -m 1 -r %d -e %d", id, 1, encoderOption);
}
// listen mode set to 1, means listen to distributor
processHandle = loader->loadGame(gameName, arg);
if(!processHandle){
infoRecorder->logError("[LogicFactory]: load game failed.\n");
return false;
}
free(arg);
// create the task
LogicTask * task = new LogicTask();
task->name = _strdup(gameName);
task->id = id;
task->processCtx = NULL;
if(!this->addTask(task)){
// add task failed
infoRecorder->logError("[RenderContext]: add task to factory failed.\n");
return false;
}
}
else if (!strncasecmp(cmd, CLIENT_CONNECTED, strlen(CLIENT_CONNECTED))){
// game client connected with client id
infoRecorder->logError("[LogicFactory]: CLIENT_CONNECTED, TODO.\n");
char * data = ctx->getData();
IDENTIFIER cid = *(IDENTIFIER *)data;
// this is for control connection
infoRecorder->logError("[LogicFactory]: CLIENT CONNECTED.\n");
// find the game process
map<IDENTIFIER, BaseContext *>::iterator it = gameMap.find(cid);
if (it != gameMap.end()){
// find the game
}
else{
infoRecorder->logError("[LogicFactory]: not find the game process.\n");
}
}
else if (!strncasecmp(cmd, CANCEL_SOCKEVENT, strlen(CANCEL_SOCKEVENT))){
// the game process take over the render connection, tell the logic server to release the event
infoRecorder->logTrace("[LogicFactory]: cancel socket event.\n");
char *data = ctx->getData();
evutil_socket_t s = *(evutil_socket_t *)data;
// to cancel the socket event
BaseContext * snet = NULL;
map<evutil_socket_t, BaseContext *>::iterator it = netCtxMap.find(s);
if (it != netCtxMap.end()){
// cancel the event
snet = it->second;
//bufferevent_disable(snet->bev, EV_READ | EV_WRITE);
}
else{
// error
infoRecorder->logError("[LogicFactory]: cannot find the BaseContext associated with %p.\n", s);
// print all
map<IDENTIFIER, BaseContext *>::iterator mi;
for(mi = netCtxMap.begin(); mi!= netCtxMap.end(); mi++){
infoRecorder->logTrace("[LogicFactory]: context key:%p.\n", mi->first);
}
return false;
}
infoRecorder->logTrace("[LogicFactory]: cancel sock event for %p done.\n", s);
}
else if (!strncasecmp(cmd, DESTROY_SOCKEVENT, strlen(DESTROY_SOCKEVENT))){
infoRecorder->logError("[LogicFactory]: recv 'DESTROY_SOCKEVENT'\n");
char * data = ctx->getData();
evutil_socket_t s = *(evutil_socket_t*)data;
BaseContext * snet = NULL;
map<evutil_socket_t, BaseContext *>::iterator it = netCtxMap.find(s);
if (it != netCtxMap.end()){
// destroy the event
snet = it->second;
bufferevent_free(snet->bev);
delete snet;
}
}
else if(!strncasecmp(cmd, GAME_READY, strlen(GAME_READY))){
// game ready from game process
infoRecorder->logError("[LogicFactory]: recv 'GAME_READY' from game client.\n");
char * data= ctx->getData();
IDENTIFIER tid = *(IDENTIFIER *)data;
LogicTask * task = findTask(tid);
if(!task){
infoRecorder->logError("[LogicFactory]: cannot find the task:%p.\n", tid);
return false;
}
task->processCtx = ctx; // this context is the task's process context
// send dis server "logic ready.\n"
// send back LOGIC READY
this->getCtx()->writeCmd(LOGIC_READY);
this->getCtx()->writeIdentifier(tid);
this->getCtx()->writeToNet();
ctx->writeCmd("TEST");
ctx->writeToNet();
}else if(!strncasecmp(cmd, START_RTSP_SERVICE, strlen(START_RTSP_SERVICE))){
// deal the logic server providing the rtsp services, cmd from dis
infoRecorder->logError("[LogicFactory]: ERROR, should never be here,\n");
#if 0
printf("[LogicFactory]: the logic server provide the rtsp service.\n");
char * data = ctx->getData();
IDENTIFIER tid = *(IDENTIFIER *)data;
LogicTask * task = findTask(tid);
if(!task){
printf("[LogicFactory]: cannot find the task to start the rtsp.\n");
return false;
}
// find the task
// to get the handle of the window, ask the game process to send back the handle of window and present event
BaseContext * game = task->processCtx;
game->writeCmd(ADD_RTSP_CONNECTION);
game->writeToNet();
//this->startRTSP(NULL);
// TODO
#endif
}
else if(!strncasecmp(cmd, ADD_RTSP_CONNECTION, strlen(ADD_RTSP_CONNECTION))){
// to start the rtsp service
infoRecorder->logTrace("[LogicFactory]: ADD RTSP CONNECTION.\n");
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)(data);
short portOff = *(short *)(data + sizeof(IDENTIFIER));
LogicTask * task = findTask(id);
if(!task){
infoRecorder->logTrace("[LogicFactory]: cannot find the task to star the rtsp.\n");
return false;
}
infoRecorder->logTrace("[LogicFactory]: send add rtsp connection to game process, id: '%p', port offset:%d.\n", id, portOff);
// tell the process to start rtsp service
BaseContext * game = task->processCtx;
game->writeCmd(ADD_RTSP_CONNECTION);
game->writeIdentifier(id);
game->writeData((void *)&portOff, sizeof(short));
game->writeToNet();
}else if(!strncasecmp(cmd, RTSP_READY, strlen(RTSP_READY))){
// recv rtsp ready cmd from game process, tell the dis manager
infoRecorder->logTrace("[LogicFactory]: RTSP READY.\n");
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)(data);
getCtx()->writeCmd(RTSP_READY);
getCtx()->writeIdentifier(id);
getCtx()->writeToNet();
}else if(!strncasecmp(cmd, ADD_CTRL_CONNECTION, strlen(ADD_CTRL_CONNECTION))){
infoRecorder->logError("[LogicFactory]: ADD CTRL CONNECTION, TODO.\n");
}
else if(!strncasecmp(cmd, OPTION, strlen(OPTION))){
// the option for game process
cg::core::infoRecorder->logTrace("[LogicFactory]: get CMD Option.\n");
char * data = ctx->getData();
IDENTIFIER id = *(IDENTIFIER *)data;
LogicTask * task = findTask(id);
if(!task){
cg::core::infoRecorder->logError("[LogicFactory]: cannot find the logic task '%p' for OPTION.\n", id);
return false;
}
cg::core::infoRecorder->logError("[LogicFactory]: OPTION, id:%p.\n", id);
BaseContext * gameCtx = task->processCtx;
short optionCount = *(short *)(data + sizeof(IDENTIFIER));
if(gameCtx){
gameCtx->writeCmd(OPTION);
gameCtx->writeIdentifier(id);
gameCtx->writeShort(optionCount);
for(int i =0; i < optionCount; i++){
CMD_OPTION option = *(CMD_OPTION *)(data + sizeof(IDENTIFIER) + sizeof(short) + i * (sizeof(CMD_OPTION) + sizeof(short)));
short value = *(short *)(data + sizeof(IDENTIFIER) + sizeof(short) + i * (sizeof(CMD_OPTION) + sizeof(short)) + sizeof(CMD_OPTION));
// write to net
gameCtx->writeData((void *)&option, sizeof(CMD_OPTION));
gameCtx->writeShort(value);
}
gameCtx->writeToNet();
}else{
cg::core::infoRecorder->logError("[LogicFactory]: not find the task '%p'.\n", id);
return false;
}
}
else{
infoRecorder->logTrace("[LogicFactory]: unknown cmd: %s.\n", cmd);
return false;
}
return ret;
}
//
LogicTask * LogicFactory::findTask(IDENTIFIER tid){
infoRecorder->logTrace("[LogicFactory]: to find the task for %p.\n", tid);
LogicTask * task = NULL;
map<IDENTIFIER, LogicTask *>::iterator it = taskMap.find(tid);
if(it != taskMap.end())
{
task = it->second;
}
else{
infoRecorder->logError("[LogicFactory]: cannot find the task %p.\n", tid);
}
return task;
}
bool LogicFactory::addTask(LogicTask * task){
infoRecorder->logTrace("[LogicFactory]: add task\n");
IDENTIFIER id = task->id;
map<IDENTIFIER, LogicTask *>::iterator it = taskMap.find(id);
if(it != taskMap.end()){
infoRecorder->logError("[LogicFactory]: add task failed, task already exist.\n");
return false;
}
else{
taskMap[id] = task;
}
return true;
}
bool LogicFactory::removeTask(IDENTIFIER tid){
infoRecorder->logTrace("[LogicFactory]: remove task for %p.\n", tid);
map<IDENTIFIER, LogicTask *>::iterator it= taskMap.find(tid);
if(it != taskMap.end()){
taskMap.erase(tid);
return true;
}
else{
infoRecorder->logError("[LogicFactory]: remove task failed. task not exist.\n");
return false;
}
return true;
}
// the regluator logic function
// return false if any errors
bool LogicFactory::regulationCall(){
infoRecorder->logTrace("[LogicFactory]: regulation logic, the cpu increment:%d, the gpu increment:%d.\n", cpuIncreament, gpuIncreament);
// collect the information
float cpuUsage = 0.0f, gpuUsage = 0.0f, memUsage = 0.0f;
collectInfo(cpuUsage, gpuUsage, memUsage);
if(cpuUsage - gpuUsage > REGULATION_THRESHOLD){
// cpu usage level is higher
}
else if(gpuUsage - cpuUsage > REGULATION_THRESHOLD){
// gpu usage level is higher
}
else{
// nothing happend
}
return true;
}
// the thread proc for regulation to adjust the CPU and GPU usage level
DWORD LogicFactory::RegulatorProc(LPVOID param){
infoRecorder->logTrace("[LogicFactory]: regulator proc.\n");
LogicFactory * factory = (LogicFactory *)param;
if(!factory){
// error
}
while(factory->isRunning()){
// the factory is working, get the usage for CPU and GPU and determine what to do according to the usage level
if(!factory->regulationCall()) // do the regulator logic
{
infoRecorder->logTrace("[LogicFactory]: regulation failed.\n");
break;
}
// sleep for interval
Sleep(factory->getRegulatorInterval());
}
infoRecorder->logTrace("[LogicFacotry]: to exit the regulation proc.\n");
return 0;
}
///////////////// net work use libevent //////////////////
// bufferevent event callback
void onBufferEventEvent(struct bufferevent * bev, short events, void * ctx){
printf("[OnBufferEventEvent]: event occur.\n");
BaseContext * baseCtx = (BaseContext *)ctx;
if(events & BEV_EVENT_ERROR){
perror("Error from bufferevent.\n");
}
if(events & BEV_EVENT_EOF){
bufferevent_free(bev);
baseCtx->bev = NULL;
}
}
char readBuffer[1024] = {0};
//
void onBufferEventRead(struct bufferevent * bev, void *ctx){
struct evbuffer * input = bufferevent_get_input(bev);
BaseContext * baseCtx = (BaseContext *)ctx;
evutil_socket_t sock = baseCtx->sock;
LogicFactory * logicFactory = LogicFactory::GetFactory();
int data_len = evbuffer_get_length(input);
evbuffer_copyout(input, readBuffer, data_len);
printf("[OnBufferRead]: loader get '%s', context type:%d.\n", readBuffer, baseCtx->contextType);
baseCtx->setData(readBuffer, data_len);
memset(readBuffer, 0, 1024);
logicFactory->dealCmd(baseCtx);
evbuffer_drain(input, data_len);
}
void listenerCB(struct evconnlistener * listerner, evutil_socket_t sock, struct sockaddr * sddr, int len, void * ctx){
printf("[ListenerCB]: callback for listen.\n");
// we got a new connection ! Set up a bufferevent for it
struct event_base * base = evconnlistener_get_base(listerner);
struct bufferevent * bev = NULL;
// sock is the new socket for connections
LogicFactory * logic = LogicFactory::GetFactory();
ManagerBase * mgr = (ManagerBase *)ctx;
if(mgr->type == DIS_CONTEXT){
bev = bufferevent_socket_new(base, sock, BEV_OPT_CLOSE_ON_FREE);
BaseContext * disContext = new BaseContext();
disContext->bev = bev;
disContext->sock = sock;
disContext->contextType = DIS_CONTEXT;
RenderManager * mgr = (RenderManager *)ctx;
mgr->addCtx(disContext);
logic->addNetCtxMap(sock, disContext);
bufferevent_setcb(bev, onBufferEventRead, NULL, onBufferEventEvent, (void *)disContext);
}
else if(mgr->type == PROCESS_CONTEXT){
bev = bufferevent_socket_new(base, sock, BEV_OPT_CLOSE_ON_FREE);
BaseContext * processCtx = new BaseContext();
processCtx->bev = bev;
processCtx->sock = sock;
processCtx->contextType = PROCESS_CONTEXT;
ProcessManager * mgr = (ProcessManager *)ctx;
mgr->addCtx(processCtx);
logic->addNetCtxMap(sock, processCtx);
bufferevent_setcb(bev, onBufferEventRead, NULL, onBufferEventEvent, (void *)processCtx);
}
else if(mgr->type == RENDER_CONTEXT){
// a render is connected, create the game process ?
infoRecorder->logError("[ListenerCB]: render connected.\n");
BaseContext * renderCtx = new BaseContext();
//renderCtx->bev = bev;
renderCtx->sock = sock;
renderCtx->contextType = RENDER_CONTEXT;
RenderManager * mgr = (RenderManager *)ctx;
mgr->addCtx(renderCtx);
logic->addNetCtxMap(sock, renderCtx);
u_long ul = 0;
if(ioctlsocket(sock, FIONBIO, (u_long *)&ul) == SOCKET_ERROR){
infoRecorder->logError("[ListenerCB]: set socket to blocking mode failed with:%d.\n", WSAGetLastError());
printf("[ListenerCB]: set socket to blocking mode failed with:%d.\n", WSAGetLastError());
}
//bufferevent_setcb(bev, onBufferEventRead, NULL, onBufferEventEvent, (void *)renderCtx);
// get the ADD_RENDER CMD from render
char msg[1024] = {0};
int dlen = 0;
if((dlen = recv(sock, msg, 1024, 0))!= SOCKET_ERROR){
renderCtx->setData(msg, dlen);
logic->dealCmd(renderCtx);
}else{
infoRecorder->logError("[ListenerCB]: failed to recv command from render proxy, code:%d.\n", WSAGetLastError());
Log::slog("[ListenerCB]: failed to recv command from render proxy, code:%d.\n", WSAGetLastError());
}
}else if(mgr->type == CTRL_CONTEXT){
infoRecorder->logError("[ListenerCB]: ctrl connected.\n");
BaseContext * ctrlCtx = new BaseContext();
ctrlCtx->sock = sock;
ctrlCtx->contextType = CTRL_CONTEXT;
CtrlManager * cmgr = (CtrlManager *)ctx;
logic->addNetCtxMap(sock, ctrlCtx);
u_long ul = 0;
if(ioctlsocket(sock, FIONBIO, (u_long *)&ul) == SOCKET_ERROR){
infoRecorder->logError("[ListenerCB]: set socket to blocking mode failed with:%d.\n", WSAGetLastError());
printf("[ListenerCB]: set socket to blocking mode failed with:%d.\n", WSAGetLastError());
}
}
if(bev)
bufferevent_enable(bev, EV_READ );
}
void acceptErrorCB(struct evconnlistener * listener, void *ctx){
struct event_base * base = evconnlistener_get_base(listener);
int err = EVUTIL_SOCKET_ERROR();
fprintf(stderr, "Got an error %s (%s) on the listener." "Shutting down.\n", err, evutil_socket_error_to_string(err));
event_base_loopexit(base, NULL);
}
//// callback for rtsp connection
void RTSPReadCB(struct bufferevent * bev, void * arg){
printf("[RTSPReadCB]: get rtsp cmd.\n");
struct evbuffer * input = bufferevent_get_input(bev);
//DisClient * disClient = (DisClient *)arg;
size_t n = evbuffer_get_length(input);
char * data = (char *)malloc(sizeof(char )*n);
evbuffer_copyout(input, data, n);
// get the describe
if(data[0] == '$'){
// ignore
printf("[RTSPReadCB]: ignore '%s'\n", data);
goto DONE;
}
// REQUEST line
printf("[RTSPReadCB]: deal '%s'\n", data);
DONE:
free(data);
data = NULL;
evbuffer_drain(input, n);
}
void RTSPEventCB(struct bufferevent * bev, short what, void * arg){
printf("[RTSPEventCB]: event occurred.\n");
if(what & BEV_EVENT_ERROR){
int err = EVUTIL_SOCKET_ERROR();
printf("[RTSPEventCB]: error. err:%d (%s)\n", err, evutil_socket_error_to_string(err));
infoRecorder->logError("[RTSPEventCB]: error. err:%d (%s)\n", err, evutil_socket_error_to_string(err));
}
if(what & BEV_EVENT_EOF){
printf("[RTSPEventCB]: EOF of the connection.\n");
infoRecorder->logError("[RTSPEventCB]: EOF of the connection.\n");
}
bufferevent_setcb(bev, NULL, NULL, NULL, NULL);
bufferevent_disable(bev, EV_READ|EV_WRITE);
bufferevent_free(bev);
}
void RTSPListenerCB(struct evconnlistener * listener, evutil_socket_t sock, struct sockaddr * addr, int len, void * ctx){
printf("[RTSPListenerCB]: listener callback, got a new connection.\n");
DisClient * dc = (DisClient *)ctx;
dc->startRTSP(sock);
}
void RTSPAcceptErrorCB(struct evconnlistener * listener, void * ctx){
printf("[RTSPAcceptErrorCB]: error for listen.\n");
struct event_base * base = evconnlistener_get_base(listener);
int err = EVUTIL_SOCKET_ERROR();
fprintf(stderr, "Got an error %d (%s) on the listener." "Shutting down.\n", err, evutil_socket_error_to_string(err));
event_base_loopexit(base, NULL);
}
LoaderLogger::LoaderLogger(std::string _processName):
processName(_processName), processHandle(NULL), mappingHandle(NULL), mutexHandle(NULL), cpuWatcher(NULL), gpuWatcher(NULL), recorder(NULL){
// create the file mapping and the mutex
std::string mappingName = processName + string("_mapping");
std::string mutexName = processName + string("_mutex");
printf("[LoaderLogger]: create logger with process name:%s, mapping name:%s, mutex name:%s.\n", processName.c_str(), mappingName.c_str(), mutexName.c_str());
//mutexHandle = CreateMutex(NULL, FALSE, mutexName.c_str());
mutexHandle = CreateEvent(NULL, FALSE, FALSE, mutexName.c_str());
mappingHandle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, mappingName.c_str());
if(mappingHandle){
// open mapping success.
mappingAddr = MapViewOfFile(mappingHandle, FILE_MAP_ALL_ACCESS, 0, 0 ,0);
}
else{
// to create new
mappingHandle = CreateFileMapping((HANDLE)0xFFFFFFFF, NULL, PAGE_READWRITE, 0, 64, mappingName.c_str());
mappingAddr = MapViewOfFile(mappingHandle, FILE_MAP_ALL_ACCESS, 0, 0 ,0);
}
}
LoaderLogger::~LoaderLogger(){
if(mappingAddr){
UnmapViewOfFile(mappingAddr);
mappingAddr = NULL;
}
if(mutexHandle){
CloseHandle(mutexHandle);
mutexHandle = NULL;
}
if(mappingHandle){
CloseHandle(mappingHandle);
mappingHandle = NULL;
}
}
bool LoaderLogger::initLogger(){
// create the watcher
cpuWatcher = new CpuWatch();
gpuWatcher = GpuWatch::GetGpuWatch();
// create the recorder
recorder = new LightWeightRecorder((char*)processName.c_str());
printf("[LoaderLogger]: init logger, create the recorder file: %p.\n", recorder);
return true;
}
void LoaderLogger::onThreadMsg(UINT msg, WPARAM wParam, LPARAM lParam){
}
BOOL LoaderLogger::onThreadStart(){
initLogger();
return TRUE;
}
BOOL LoaderLogger::run(){
printf("loader logger run...\n");
DWORD ret = WaitForSingleObject(mutexHandle, 3000);
if(ret == WAIT_OBJECT_0){
// read the fps in shared file mapping
int index = *(int*)mappingAddr;
int fps = *(((int*)mappingAddr)+1);
float cpuUsage = (float)cpuWatcher->GetProcessCpuUtilization(processHandle);
int gpuUsage = gpuWatcher->GetGpuUsage();
recorder->log("%d %d %f %d\n", index, fps, cpuUsage, gpuUsage);
printf("%d %d %f %d\n", index, fps, cpuUsage, gpuUsage);
recorder->flush(true);
}
else if(ret == WAIT_TIMEOUT){
printf("time out.\n");
}else{
printf("unknown: %d.\n", ret);
}
return TRUE;
}
void LoaderLogger::onQuit(){
}
#endif | 30.411724 | 186 | 0.70195 | [
"render",
"3d"
] |
9bd00bac4443bb1786ecc688d9a26ab947ebcf8b | 2,106 | cpp | C++ | C++/maximum-subarray-difference.cpp | xenron/sandbox-dev-lintcode | 114145723af43eafc84ff602ad3ac7b353a9fc38 | [
"MIT"
] | 695 | 2015-04-18T16:11:56.000Z | 2022-03-11T13:28:44.000Z | C++/maximum-subarray-difference.cpp | Abd-Elrazek/LintCode | 8f6ee0ff38cb7cf8bf9fca800243823931604155 | [
"MIT"
] | 4 | 2015-07-04T13:07:35.000Z | 2020-08-11T11:32:29.000Z | C++/maximum-subarray-difference.cpp | Abd-Elrazek/LintCode | 8f6ee0ff38cb7cf8bf9fca800243823931604155 | [
"MIT"
] | 338 | 2015-04-28T04:39:03.000Z | 2022-03-16T03:00:15.000Z | // Time: O(n)
// Space: O(n)
class Solution {
public:
/**
* @param nums: A list of integers
* @return: An integer indicate the value of maximum difference between two
* Subarrays
*/
int maxDiffSubArrays(vector<int> nums) {
int n = nums.size();
vector<int> max_LR(n), min_LR(n);
vector<int> max_RL(n), min_RL(n);
// Compute the max sum of subarray from left to right.
int max_LR_sum = INT_MIN, LR_sum = 0;
for (int i = 0; i < n; ++i) {
LR_sum += nums[i];
max_LR_sum = max(max_LR_sum, LR_sum);
max_LR[i] = max_LR_sum;
if (LR_sum < 0) {
LR_sum = 0;
}
}
// Compute the min sum of subarray from left to right.
int min_LR_sum = INT_MAX;
LR_sum = 0;
for (int i = 0; i < n; ++i) {
LR_sum += nums[i];
min_LR_sum = min(min_LR_sum, LR_sum);
min_LR[i] = min_LR_sum;
if (LR_sum > 0) {
LR_sum = 0;
}
}
// Compute the max sum of subarray from right to left.
int max_RL_sum = INT_MIN, RL_sum = 0;
for (int i = n - 1; i >= 0; --i) {
RL_sum += nums[i];
max_RL_sum = max(max_RL_sum, RL_sum);
max_RL[i] = max_RL_sum;
if (RL_sum < 0) {
RL_sum = 0;
}
}
// Compute the min sum of subarray from right to left.
int min_RL_sum = INT_MAX;
RL_sum = 0;
for (int i = n - 1; i >= 0; --i) {
RL_sum += nums[i];
min_RL_sum = min(min_RL_sum, RL_sum);
min_RL[i] = min_RL_sum;
if (RL_sum > 0) {
RL_sum = 0;
}
}
// Compute the max diff of two non-overlapping subarrays.
int max_diff = 0;
for (int i = 0; i < n - 1; ++i) {
max_diff = max(max_diff, abs(max_LR[i] - min_RL[i+1]));
max_diff = max(max_diff, abs(min_LR[i] - max_RL[i+1]));
}
return max_diff;
}
};
| 28.849315 | 79 | 0.466287 | [
"vector"
] |
9bdaa506511bb6cd84e914d9c16dea032b1a1b1d | 2,874 | cpp | C++ | Engine/Source/Core/Maths/Vector3d.cpp | SpookyScaryDev/Jem | 0349f40935763a8909d4a25e037e5aabbbd59496 | [
"Apache-2.0"
] | 4 | 2019-03-09T18:06:42.000Z | 2020-08-26T10:31:38.000Z | Engine/Source/Core/Maths/Vector3d.cpp | SpookyScaryDev/Jem | 0349f40935763a8909d4a25e037e5aabbbd59496 | [
"Apache-2.0"
] | null | null | null | Engine/Source/Core/Maths/Vector3d.cpp | SpookyScaryDev/Jem | 0349f40935763a8909d4a25e037e5aabbbd59496 | [
"Apache-2.0"
] | null | null | null | #include "JemPCH.h"
#include "Vector3d.h"
namespace Jem {
// ==================
// Jem::Vector3d::Vector3d
// ==================
Vector3d::Vector3d(double dx, double dy, double dz) :
x(dx), y(dy), z(dz){}
// ==================
// Jem::Vector3d::Set
// ==================
void Vector3d::Set(double dx, double dy, double dz) {
x = dx;
y = dy;
z = dz;
}
// ==================
// Jem::Vector3d::Magnitude
// ==================
double Vector3d::Magnitude() const {
return sqrt((x * x) + (y * y) + (z * z));
}
// ==================
// Jem::Vector3d::Normalize
// ==================
void Vector3d::Normalize() {
x /= Magnitude();
y /= Magnitude();
z /= Magnitude();
}
// ==================
// Jem::Vector3d::Dot
// ==================
double Vector3d::Dot(const Vector3d& vector) const {
return vector.x * x + vector.y * y + vector.z * z;
}
// ==================
// Jem::Vector3d::Cross
// ==================
Vector3d& Vector3d::Cross(const Vector3d& vector) const {
return Vector3d(y * vector.z - z * vector.y,
z * vector.x - x * vector.z,
x * vector.y - y * vector.x);
}
// ==================
// Jem::Vector3d::operator+
// ==================
Vector3d Vector3d::operator+(const Vector3d& vector) const {
return Vector3d(x + vector.x, y + vector.y, z + vector.z);
}
// ==================
// Jem::Vector3d::operator+=
// ==================
Vector3d& Vector3d::operator+=(const Vector3d& vector) {
x += vector.x;
y += vector.y;
z += vector.z;
return *this;
}
// ==================
// Jem::Vector3d::operator-
// ==================
Vector3d Vector3d::operator-(const Vector3d& vector) const {
return Vector3d(x - vector.x, y - vector.y, z - vector.z);
}
// ==================
// Jem::Vector3d::operator-=
// ==================
Vector3d& Vector3d::operator-=(const Vector3d& vector) {
x -= vector.x;
y -= vector.y;
z -= vector.z;
return *this;
}
// ==================
// Jem::Vector3d::operator*
// ==================
Vector3d Vector3d::operator*(const double scalar) const {
return Vector3d(x * scalar, y * scalar, z * scalar);
}
// ==================
// Jem::Vector3d::operator*=
// ==================
Vector3d& Vector3d::operator*=(double scalar) {
x *= scalar;
y *= scalar;
z *= scalar;
return *this;
}
// ==================
// Jem::Vector3d::operator/
// ==================
Vector3d Vector3d::operator/(const double scalar) const {
JEM_CORE_ASSERT(scalar != 0, "Tried to divide a vector by 0!");
return Vector3d(x / scalar, y / scalar, z / scalar);
}
// ==================
// Jem::Vector3d::operator/=
// ==================
Vector3d& Vector3d::operator/=(double scalar) {
JEM_CORE_ASSERT(scalar != 0, "Tried to divide a vector by 0!");
x /= scalar;
y /= scalar;
z /= scalar;
return *this;
}
} | 22.629921 | 67 | 0.479819 | [
"vector"
] |
9bdbed85e4bd2937e97800511dc7b849b491302d | 4,459 | hpp | C++ | ccsrc/cxx_experimental/include/cengines/cpp_graph_mapper.hpp | Takishima/mindquantum | e90dfe474b759023d7ae18281b9a87cb8d223d04 | [
"Apache-2.0"
] | null | null | null | ccsrc/cxx_experimental/include/cengines/cpp_graph_mapper.hpp | Takishima/mindquantum | e90dfe474b759023d7ae18281b9a87cb8d223d04 | [
"Apache-2.0"
] | null | null | null | ccsrc/cxx_experimental/include/cengines/cpp_graph_mapper.hpp | Takishima/mindquantum | e90dfe474b759023d7ae18281b9a87cb8d223d04 | [
"Apache-2.0"
] | null | null | null | // Copyright 2020 <Huawei Technologies Co., Ltd>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CPP_GRAPH_MAPPER_HPP
#define CPP_GRAPH_MAPPER_HPP
#include <tuple>
#include <utility>
#include <variant>
#include <vector>
#include <tweedledum/IR/Circuit.h>
#include <tweedledum/Target/Device.h>
#include <tweedledum/Target/Mapping.h>
#include <tweedledum/Target/Placement.h>
#include "core/config.hpp"
#include "core/details/macros.hpp"
#include "core/details/visitor.hpp"
#include "mapping/types.hpp"
namespace mindquantum::cengines {
namespace td = tweedledum;
//! C++ class to represent an arbitrary graph mapper
/*!
* This is intended to be instantiated in Python by users in order to
* define the hardware architecture they want to use for mapping
*/
class CppGraphMapper {
public:
using device_t = tweedledum::Device;
using circuit_t = tweedledum::Circuit;
using placement_t = tweedledum::Placement;
using mapping_t = tweedledum::Mapping;
using mapping_ret_t = std::pair<circuit_t, mapping_t>;
using mapping_param_t = std::variant<mapping::sabre_config, mapping::jit_config>;
using edge_list_t = std::vector<std::tuple<uint32_t, uint32_t>>;
//! Constructor with empty graph
/*!
* The mapping algorithm used by the mapper is defined by the type of
* the parameters that is passed in argument. The mapper currently
* supports three mapping algorithms:
* - SABRE (SWAP-based Bidirectional heuristic search algorithm)
* - JIT (just-in-time algorithm)
* - SAT (boolean satisfiability problem solver)
*
* \param params Parameters for the mapping algorithm
*/
CppGraphMapper(const mapping_param_t& params);
//! Constructor with graph defined by number of qubits and edges
/*!
* The mapping algorithm used by the mapper is defined by the type of
* the parameters that is passed in argument. The mapper currently
* supports three mapping algorithms:
* - SABRE (SWAP-based Bidirectional heuristic search algorithm)
* - ZDD (zero-suppressed decision diagram)
* - SAT (boolean satisfiability problem solver)
*
* \param num_qubits Number of qubits
* \param edge_list List of edges in the graph
* \param params Parameters for the mapping algorithm
*/
CppGraphMapper(uint32_t num_qubits, const edge_list_t& edge_list, const mapping_param_t& params);
//! Simple getter for the underlying device used by this mapper
const auto& device() const {
return device_;
}
//! Apply the mapping algorithm to a network given an initial mapping
/*!
* This method will use the architecture defined within the instance
* of the CppGraphMapper, as well as the mapping parameters in order
* to choose which mapping algorithm to call.
*
* \param state Current mapping state
*/
mapping_ret_t hot_start(const device_t& device, const circuit_t& circuit, placement_t& placement) const;
//! Apply the mapping algorithm to a network without an initial mapping
/*!
* This method will use the architecture defined within the instance
* of the CppGraphMapper, as well as the mapping parameters in order
* to choose which mapping algorithm to call.
*
* \param state Current mapping state
*/
mapping_ret_t cold_start(const device_t& device, const circuit_t& circuit) const;
//! Simple getter for mapping parameters
const auto& get_mapping_parameters() const {
return params_;
}
//! Set device graph to be a 1D arrangement of qubits
void path_device(uint32_t num_qubits, bool cyclic = false);
//! Set device graph to be a 2D grid of qubits
void grid_device(uint32_t num_columns, uint32_t num_rows);
private:
device_t device_;
mapping_param_t params_;
};
} // namespace mindquantum::cengines
#endif /* CPP_GRAPH_MAPPER_HPP */
| 35.388889 | 108 | 0.712716 | [
"vector"
] |
9be0fd2da8c475d82483d50c2bb005ae8e8465a7 | 7,607 | cpp | C++ | src/utils/address.cpp | Andrik-555/retdec | 1ac63a520da02912daf836b924f41d95b1b5fa10 | [
"MIT",
"BSD-3-Clause"
] | 521 | 2019-03-29T15:44:08.000Z | 2022-03-22T09:46:19.000Z | src/utils/address.cpp | Andrik-555/retdec | 1ac63a520da02912daf836b924f41d95b1b5fa10 | [
"MIT",
"BSD-3-Clause"
] | 30 | 2019-06-04T17:00:49.000Z | 2021-09-08T20:44:19.000Z | src/utils/address.cpp | Andrik-555/retdec | 1ac63a520da02912daf836b924f41d95b1b5fa10 | [
"MIT",
"BSD-3-Clause"
] | 99 | 2019-03-29T16:04:13.000Z | 2022-03-28T16:59:34.000Z | /**
* @file src/utils/address.cpp
* @brief Address, address pair and other derived class representation.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <cassert>
#include <climits>
#include <cstdio>
#include <iostream>
#include <vector>
#include "retdec/utils/address.h"
#include "retdec/utils/string.h"
namespace retdec {
namespace utils {
//
//=============================================================================
// Address
//=============================================================================
//
const uint64_t Address::getUndef = ULLONG_MAX;
Address::Address() :
address(Address::getUndef)
{
}
Address::Address(uint64_t a) :
address(a)
{
}
Address::Address(const std::string &a) :
address(Address::getUndef)
{
try
{
size_t idx = 0;
unsigned long long ull = std::stoull(a, &idx, 0);
if (idx == a.size()) // no leftovers
{
address = ull;
}
}
catch (const std::invalid_argument&)
{
// nothing -> undefined value.
}
}
Address::operator uint64_t() const
{
return address;
}
Address::operator bool() const
{
return isDefined() && address;
}
Address& Address::operator++()
{
if (isDefined())
address++;
return *this;
}
Address Address::operator++(int)
{
if (isDefined())
address++;
return *this;
}
Address& Address::operator--()
{
if (isDefined())
address--;
return *this;
}
Address Address::operator--(int)
{
if (isDefined())
address--;
return *this;
}
Address& Address::operator+=(const Address& rhs)
{
address += rhs;
return *this;
}
Address& Address::operator-=(const Address& rhs)
{
address -= rhs;
return *this;
}
Address& Address::operator|=(const Address& rhs)
{
address |= rhs;
return *this;
}
bool Address::isUndefined() const
{
return address == Address::getUndef;
}
bool Address::isDefined() const
{
return !isUndefined();
}
uint64_t Address::getValue() const
{
assert( isDefined() );
return address;
}
std::string Address::toHexString() const
{
assert(isDefined());
std::stringstream ss;
ss << std::hex << address;
return ss.str();
}
std::string Address::toHexPrefixString() const
{
assert(isDefined());
return "0x" + toHexString();
}
std::ostream& operator<<(std::ostream &out, const Address &a)
{
if (a.isDefined())
return out << a.toHexPrefixString();
else
return out << "UNDEFINED";
}
//
//=============================================================================
// AddressRange
//=============================================================================
//
AddressRange::AddressRange()
{
}
AddressRange::AddressRange(Address f) : Range<Address>(f, Address::getUndef)
{
}
AddressRange::AddressRange(Address f, Address s) : Range<Address>(f, s)
{
}
AddressRange::AddressRange(const std::string &r)
{
unsigned long long f = 0, s = 0;
int ret = std::sscanf(r.c_str(), "0x%llx-0x%llx", &f, &s);
if (ret == 2 && f <= s)
{
setStartEnd(f, s);
}
}
bool AddressRange::operator<(const AddressRange &o) const
{
return getStart() < o.getStart();
}
bool AddressRange::operator==(const AddressRange &o) const
{
return getStart() == o.getStart() && getEnd() == o.getEnd();
}
bool AddressRange::operator!=(const AddressRange &o) const
{
return !(*this == o);
}
std::ostream& operator<< (std::ostream &out, const AddressRange &r)
{
return out << std::hex << "<" << r.getStart() << ", " << r.getEnd() << ")";
}
//
//=============================================================================
// AddressRangeContainer
//=============================================================================
//
std::ostream& operator<<(std::ostream &out, const AddressRangeContainer &r)
{
for (auto &rr : r)
out << rr << std::endl;
return out;
}
AddressRangeContainer::iterator AddressRangeContainer::begin()
{
return _ranges.begin();
}
AddressRangeContainer::const_iterator AddressRangeContainer::begin() const
{
return _ranges.begin();
}
AddressRangeContainer::iterator AddressRangeContainer::end()
{
return _ranges.end();
}
AddressRangeContainer::const_iterator AddressRangeContainer::end() const
{
return _ranges.end();
}
std::size_t AddressRangeContainer::size() const
{
return _ranges.size();
}
bool AddressRangeContainer::empty() const
{
return _ranges.empty();
}
void AddressRangeContainer::clear()
{
_ranges.clear();
}
bool AddressRangeContainer::operator==(const AddressRangeContainer &o) const
{
return _ranges == o._ranges;
}
bool AddressRangeContainer::operator!=(const AddressRangeContainer &o) const
{
return !(*this == o);
}
std::pair<AddressRangeContainer::iterator,bool> AddressRangeContainer::insert(
const AddressRange &r)
{
AddressRangeContainer::iterator betweenOldFirst = _ranges.end();
AddressRangeContainer::iterator betweenOldLast = _ranges.end();
auto pos = _ranges.lower_bound(r);
if (pos != _ranges.begin())
{
--pos; // Move to previous no matter what.
}
while (pos != _ranges.end() && pos->getStart() <= r.getEnd())
{
if (pos->contains(r.getStart())
|| pos->contains(r.getEnd())
|| r.contains(pos->getStart())
|| r.contains(pos->getEnd())
|| pos->getStart() == r.getEnd()
|| pos->getEnd() == r.getStart())
{
if (betweenOldFirst == _ranges.end())
{
betweenOldFirst = pos;
}
betweenOldLast = pos;
}
++pos;
}
// Not overlapping -> insert brand new.
//
if (betweenOldFirst == _ranges.end())
{
return _ranges.insert(r);
}
// Inserted range fully in some existing range -> do not insert anything.
//
else if (betweenOldFirst == betweenOldLast && betweenOldFirst->contains(r))
{
return {betweenOldFirst, false};
}
// Some other combo -> find min/max, remove all old, insert new.
//
else
{
auto min = std::min(r.getStart(), betweenOldFirst->getStart());
auto max = std::max(r.getEnd(), betweenOldLast->getEnd());
_ranges.erase(betweenOldFirst, ++betweenOldLast);
return _ranges.insert(AddressRange(min, max));
}
}
std::pair<AddressRangeContainer::iterator,bool> AddressRangeContainer::insert(
const Address& s,
const Address& e)
{
return insert(AddressRange(s, e));
}
const AddressRange* AddressRangeContainer::getRange(Address addr) const
{
if (_ranges.empty())
{
return nullptr;
}
// c++14 should allow _ranges.lower_bound(addr)
auto pos = _ranges.lower_bound(AddressRange(addr, addr));
if (pos == _ranges.end())
{
auto last = _ranges.rbegin();
return (last->contains(addr)) ? (&(*last)) : (nullptr);
}
if (pos != _ranges.begin() && pos->getStart() != addr)
{
pos--;
}
return pos->contains(addr) ? &(*pos) : nullptr;
}
bool AddressRangeContainer::contains(Address addr) const
{
return getRange(addr) != nullptr;
}
bool AddressRangeContainer::containsExact(AddressRange r) const
{
auto* rr = getRange(r.getStart());
return rr ? *rr == r : false;
}
void AddressRangeContainer::remove(const AddressRange &r)
{
auto pos = _ranges.lower_bound(r);
if (pos != _ranges.begin())
{
--pos; // Move to previous no matter what.
}
while (pos != _ranges.end() && pos->getStart() <= r.getEnd())
{
if (pos->contains(r.getStart())
|| pos->contains(r.getEnd())
|| r.contains(pos->getStart())
|| r.contains(pos->getEnd()))
{
AddressRange old = *pos;
pos = _ranges.erase(pos);
if (old.getStart() < r.getStart())
{
_ranges.emplace(old.getStart(), r.getStart());
}
if (old.getEnd() > r.getEnd())
{
_ranges.emplace(r.getEnd(), old.getEnd());
}
}
else
{
++pos;
}
}
}
void AddressRangeContainer::remove(const Address& s, const Address& e)
{
return remove(AddressRange(s, e));
}
} // namespace utils
} // namespace retdec
| 19.455243 | 79 | 0.622059 | [
"vector"
] |
9be4806cb994d2d9792241eb36a308a0a8b26dba | 12,596 | cpp | C++ | TFLcam/cam.cpp | maarten-pennings/TFLcam | ebdb7755789f36edf854b570086c6d7fc3a4570e | [
"MIT"
] | 4 | 2021-09-24T19:36:19.000Z | 2022-01-21T11:47:41.000Z | TFLcam/cam.cpp | maarten-pennings/TFLcam | ebdb7755789f36edf854b570086c6d7fc3a4570e | [
"MIT"
] | null | null | null | TFLcam/cam.cpp | maarten-pennings/TFLcam | ebdb7755789f36edf854b570086c6d7fc3a4570e | [
"MIT"
] | null | null | null | // cam.cpp - camera control and image post processing
#include <Arduino.h>
#include "esp_camera.h" // The camera driver,see https://github.com/espressif/esp32-camera/tree/master/driver
#include "cam.h" // own interface
// Instantiate the externs from the header
int cam_crop_left;
int cam_crop_top;
int cam_crop_width;
int cam_crop_height;
int cam_crop_xsize;
int cam_crop_ysize;
int cam_trans_flags;
int cam_imgproc_flags;
// Flash LED driver =========================================================
// Assumes a LED is attached to pin CAM_FLED_PIN - it will be driven with PWM
// Flash LED settings
#define CAM_FLED_PIN 4 // The GPIO pin for the high-power LED.
#define CAM_FLED_CHANNEL 15 // I just picked first PWM channel (of the 16).
#define CAM_FLED_FREQUENCY 4096 // Some arbitrary PWM frequency, high enough to not see it.
#define CAM_FLED_RESOLUTION 8 // 8 bit resolution for the duty-cycle.
// Configure pins for the flash LED
static void cam_fled_setup() {
ledcSetup(CAM_FLED_CHANNEL, CAM_FLED_FREQUENCY, CAM_FLED_RESOLUTION); // Setup a PWM channel
ledcAttachPin(CAM_FLED_PIN, CAM_FLED_CHANNEL); // Attach the PWM channel to the LED pin
ledcWrite(CAM_FLED_CHANNEL, 0); // Set duty cycle of the PWM channel to 0 (off)
}
// Set flash LED brightness to `duty` (0..100).
void cam_fled_set(int duty) {
if( duty<0 ) duty= 0;
if( duty>100 ) duty= 100;
duty= duty * ((1<<CAM_FLED_RESOLUTION)-1) / 100;
ledcWrite(CAM_FLED_CHANNEL, duty);
}
// Image processing ================================================================
// Possible image improvement steps.
// Histogram equalization (https://en.wikipedia.org/wiki/Histogram_equalization)
static void cam_imgproc_histeq(uint8_t * img, int imgsize) {
#define COLS 256 // Number of colors
static int bins[COLS]; // Histogram bins
// Histogram bins cleared to 0
for( int i = 0; i<COLS; i++ ) bins[i]=0;
// Histogram bins count pixel data from image
for( int i = 0; i<imgsize; i++ ) bins[ img[i] ]+=1;
// Cumulate histogram bins
for( int i = 1; i<COLS; i++ ) bins[i]+=bins[i-1];
// Find smallest non-zero bin
int binmin=0;
for( int i = 0; i<COLS; i++ ) if( bins[i]>0 ) { binmin=bins[i]; break; }
// Equalize (+0.5 is for rounding)
for( int i = 0; i<imgsize; i++ ) img[i] = (bins[img[i]]-binmin) * 255.0 / (bins[COLS-1]-binmin) + 0.5;
}
// Camera HW conf ===========================================================
// Define the correct board so that correct pins are used. Pick one from
// CAMMODEL_AI_THINKER
// CAMMODEL_WROVER_KIT
// CAMMODEL_ESP_EYE
// CAMMODEL_M5STACK_PSRAM
// CAMMODEL_M5STACK_WIDE
#define CAMMODEL_AI_THINKER
// Define the pins with which the camera is attached.
#if defined(CAMMODEL_AI_THINKER)
// I believe this has an Omnivision OV2640, see https://www.arducam.com/ov2640/
// 1600x1200@15fps (UXGA)
// 800x600@30fps (SVGA)
// 352x288@60fps (CIF)
#define CAMMODEL_PWDN 32
#define CAMMODEL_RESET -1
#define CAMMODEL_XCLK 0
#define CAMMODEL_SIOD 26
#define CAMMODEL_SIOC 27
#define CAMMODEL_Y9 35
#define CAMMODEL_Y8 34
#define CAMMODEL_Y7 39
#define CAMMODEL_Y6 36
#define CAMMODEL_Y5 21
#define CAMMODEL_Y4 19
#define CAMMODEL_Y3 18
#define CAMMODEL_Y2 5
#define CAMMODEL_VSYNC 25
#define CAMMODEL_HREF 23
#define CAMMODEL_PCLK 22
#elif defined(CAMMODEL_WROVER_KIT)
#define CAMMODEL_PWDN -1
#define CAMMODEL_RESET -1
#define CAMMODEL_XCLK 21
#define CAMMODEL_SIOD 26
#define CAMMODEL_SIOC 27
#define CAMMODEL_Y9 35
#define CAMMODEL_Y8 34
#define CAMMODEL_Y7 39
#define CAMMODEL_Y6 36
#define CAMMODEL_Y5 19
#define CAMMODEL_Y4 18
#define CAMMODEL_Y3 5
#define CAMMODEL_Y2 4
#define CAMMODEL_VSYNC 25
#define CAMMODEL_HREF 23
#define CAMMODEL_PCLK 22
#elif defined(CAMMODEL_ESP_EYE)
#define CAMMODEL_PWDN -1
#define CAMMODEL_RESET -1
#define CAMMODEL_XCLK 4
#define CAMMODEL_SIOD 18
#define CAMMODEL_SIOC 23
#define CAMMODEL_Y9 36
#define CAMMODEL_Y8 37
#define CAMMODEL_Y7 38
#define CAMMODEL_Y6 39
#define CAMMODEL_Y5 35
#define CAMMODEL_Y4 14
#define CAMMODEL_Y3 13
#define CAMMODEL_Y2 34
#define CAMMODEL_VSYNC 5
#define CAMMODEL_HREF 27
#define CAMMODEL_PCLK 25
#elif defined(CAMMODEL_M5STACK_PSRAM)
#define CAMMODEL_PWDN -1
#define CAMMODEL_RESET 15
#define CAMMODEL_XCLK 27
#define CAMMODEL_SIOD 25
#define CAMMODEL_SIOC 23
#define CAMMODEL_Y9 19
#define CAMMODEL_Y8 36
#define CAMMODEL_Y7 18
#define CAMMODEL_Y6 39
#define CAMMODEL_Y5 5
#define CAMMODEL_Y4 34
#define CAMMODEL_Y3 35
#define CAMMODEL_Y2 32
#define CAMMODEL_VSYNC 22
#define CAMMODEL_HREF 26
#define CAMMODEL_PCLK 21
#elif defined(CAMMODEL_M5STACK_WIDE)
#define CAMMODEL_PWDN -1
#define CAMMODEL_RESET 15
#define CAMMODEL_XCLK 27
#define CAMMODEL_SIOD 22
#define CAMMODEL_SIOC 23
#define CAMMODEL_Y9 19
#define CAMMODEL_Y8 36
#define CAMMODEL_Y7 18
#define CAMMODEL_Y6 39
#define CAMMODEL_Y5 5
#define CAMMODEL_Y4 34
#define CAMMODEL_Y3 35
#define CAMMODEL_Y2 32
#define CAMMODEL_VSYNC 25
#define CAMMODEL_HREF 26
#define CAMMODEL_PCLK 21
#else
#error "Camera model not selected"
#endif
// See https://github.com/espressif/esp32-camera/blob/master/driver/include/sensor.h for enums
#include "esp_camera.h"
static camera_config_t cammodel_config = {
// Control pins
.pin_pwdn = CAMMODEL_PWDN,
.pin_reset = CAMMODEL_RESET,
.pin_xclk = CAMMODEL_XCLK,
.pin_sscb_sda = CAMMODEL_SIOD,
.pin_sscb_scl = CAMMODEL_SIOC,
// Data pins
.pin_d7 = CAMMODEL_Y9,
.pin_d6 = CAMMODEL_Y8,
.pin_d5 = CAMMODEL_Y7,
.pin_d4 = CAMMODEL_Y6,
.pin_d3 = CAMMODEL_Y5,
.pin_d2 = CAMMODEL_Y4,
.pin_d1 = CAMMODEL_Y3,
.pin_d0 = CAMMODEL_Y2,
// Sync pins
.pin_vsync = CAMMODEL_VSYNC,
.pin_href = CAMMODEL_HREF,
.pin_pclk = CAMMODEL_PCLK,
// 20MHz or 10MHz for OV2640 double FPS (Experimental)
.xclk_freq_hz = 20000000,
.ledc_timer = LEDC_TIMER_0,
.ledc_channel = LEDC_CHANNEL_0,
// Format of the pixel data: PIXFORMAT_ + RGB565|YUV422|GRAYSCALE|JPEG | RGB888|RAW|RGB444|RGB555
// Do not use sizes above QVGA when not JPEG
.pixel_format = PIXFORMAT_GRAYSCALE,
// Size of the output image: FRAMESIZE_ + QVGA |CIF |VGA |SVGA |XGA |SXGA |UXGA || 96X96|QQVGA |QCIF |HQVGA |240X240|HVGA |HD
// 320x240|352x288?|640x480|800x600|1024x768|1280x1024|1600x1200 || 96x96|160x120|176x144|240x176|240x240|480x320|1280x720
.frame_size = FRAMESIZE_QVGA,
// Quality of JPEG output. 0-63 lower means higher quality
.jpeg_quality = 10,
// Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed).
.fb_count = 1
};
// Camera driver ============================================================
// Configure the camera. Returns success status. Prints problems also to Serial.
esp_err_t cam_setup() {
cam_fled_setup();
// Overwrite some configuration entries (for rest see commodel.h)
cammodel_config.frame_size = FRAMESIZE_QVGA;
cammodel_config.pixel_format = PIXFORMAT_GRAYSCALE;
// Configure the camera on the board
esp_err_t err = esp_camera_init(&cammodel_config);
// Defaults for crop
cam_crop_left = 0;
cam_crop_top = 0;
cam_crop_width = (CAM_CAPTURE_WIDTH/8)*5;
cam_crop_height = (CAM_CAPTURE_HEIGHT/8)*5;
cam_crop_xsize = 5;
cam_crop_ysize = 5;
// Defaults for image processing
cam_imgproc_flags = 0;
// Print and return success
if( err==ESP_OK ) {
// Serial.printf("cam : success\n");
} else {
Serial.printf("cam : FAIL (%d: %s)\n",err, esp_err_to_name(err));
}
return err;
}
// Capture image with camera, and a pointer to the framebuffer.
// Frame is size CAM_CAPTURE_WIDTH by CAM_CAPTURE_HEIGHT.
// If Capture fails, returns 0 and prints message to Serial.
const uint8_t * cam_capture( ) {
camera_fb_t *fb = esp_camera_fb_get();
if( !fb ) {
Serial.printf("cam : fb_get() failed\n");
return 0;
}
// These are "assert", you may leave them out
if( fb->width!=CAM_CAPTURE_WIDTH ) {
Serial.printf("cam : mismatch in configured and actual frame width\n");
return 0;
}
if( fb->height!=CAM_CAPTURE_HEIGHT ) {
Serial.printf("cam : mismatch in configured and actual frame height\n");
return 0;
}
if( fb->format!=PIXFORMAT_GRAYSCALE ) {
Serial.printf("cam : mismatch in configured and actual frame format\n");
return 0;
}
return fb->buf;
}
// Reduces image imag ein `inbuf` (of size CAM_CAPTURE_WIDTH by CAM_CAPTURE_HEIGHT)
// as dictated by configuration variables cam_crop_xxx, cam_trans_xxx, cam_imgproc_xxx.
// Result is stored in caller allocated `outbuf` with size `outsize`. Returns ESP_ERR_INVALID_SIZE if outsize is too small.
// Return success status. Prints problems also to Serial.
esp_err_t cam_crop(const uint8_t * inbuf, uint8_t * outbuf, int outsize ) {
// A run-time check on outsize
if( cam_crop_xsize*cam_crop_ysize > outsize ) {
Serial.printf("cam : outsize (%d) too small given crop %d*%d\n", outsize, cam_crop_xsize, cam_crop_ysize);
return ESP_ERR_INVALID_SIZE;
}
// Crop and transform
for( int yp=0; yp<cam_crop_ysize; yp++ ) {
for( int xp=0; xp<cam_crop_xsize; xp++ ) {
// (xp,yp) is the coordinate of the block of input pixels that is averaged
int sum=0;
int count = 0;
for( int yi=cam_crop_top+yp*cam_crop_height/cam_crop_ysize; yi<cam_crop_top+(yp+1)*cam_crop_height/cam_crop_ysize; yi++ ) {
for( int xi=cam_crop_left+xp*cam_crop_width/cam_crop_xsize; xi<cam_crop_left+(xp+1)*cam_crop_width/cam_crop_xsize; xi++ ) {
// (xi,yi) is the coordinate of the pixel in the averaging block
sum+= inbuf[xi+CAM_CAPTURE_WIDTH*yi];
count++;
}
}
// transform
int xo = xp;
int yo = yp;
int ww = cam_crop_xsize;
if( cam_trans_flags & CAM_TRANS_VFLIP ) { yo = cam_crop_ysize-1 - yo; }
if( cam_trans_flags & CAM_TRANS_HMIRROR ) { xo = cam_crop_xsize-1 - xo; }
if( cam_trans_flags & CAM_TRANS_ROTCW ) { int t=yo; yo=xo; xo=cam_crop_ysize-1 - t; ww=cam_crop_ysize; }
// (xo,yo) is the coordinate of the pixel in the outbuf
outbuf[xo+ww*yo]= (sum+count/2)/count;
}
}
// Image processing
if( cam_imgproc_flags & CAM_IMGPROC_HISTEQ ) {
cam_imgproc_histeq(outbuf, cam_crop_xsize*cam_crop_ysize );
}
return ESP_OK;
}
// Returns the width of the outbuf filled by cam_capture()
int cam_outwidth() {
return cam_trans_flags & CAM_TRANS_ROTCW ? cam_crop_ysize : cam_crop_xsize;
}
// Returns the height of the outbuf filled by cam_capture()
int cam_outheight() {
return cam_trans_flags & CAM_TRANS_ROTCW ? cam_crop_xsize : cam_crop_ysize;
}
// Print `img` in hex and ASCII to Serial
void cam_printframe(uint8_t * img, int width, int height, bool ascii, bool hex) {
static const char *level="W@8Oo=- ";
// print hex and/or ascii header
if( hex ) {
Serial.printf("y\\x: 00%*d",width*2-2,width-1);
if( ascii ) Serial.printf(" "); else Serial.printf("\n");
}
if( ascii ) {
if( !hex ) Serial.printf("y\\x: ");
Serial.printf("00%*d\n",width,width-1);
}
// print framebuffers in hex and/or ascii
for( int y=0; y<height; y++ ) {
Serial.printf("%3d: ",y);
if( hex ) {
for( int x=0; x<width; x++ ) {
Serial.printf("%02x",img[x+width*y]);
}
Serial.printf(" ");
}
if( ascii ) {
Serial.printf("|");
// Next print ASCII impression
for( int x=0; x<width; x++ ) {
Serial.printf("%c",level[img[x+width*y]/32]);
}
Serial.printf("|");
}
Serial.printf("\n");
}
}
| 33.5 | 164 | 0.636472 | [
"model",
"transform",
"3d"
] |
9bed10b3eae1ed5a4753c2171e02c0c8a92f7491 | 7,884 | cpp | C++ | src/df1b2-separable/f1b23d1.cpp | johnrsibert/admb | 063ec863a9f23f6c6afbc7d481af0476b8d63645 | [
"BSD-3-Clause"
] | 79 | 2015-01-16T14:14:22.000Z | 2022-01-24T06:28:15.000Z | src/df1b2-separable/f1b23d1.cpp | johnrsibert/admb | 063ec863a9f23f6c6afbc7d481af0476b8d63645 | [
"BSD-3-Clause"
] | 172 | 2015-01-21T01:53:57.000Z | 2022-03-29T19:57:31.000Z | src/df1b2-separable/f1b23d1.cpp | johnrsibert/admb | 063ec863a9f23f6c6afbc7d481af0476b8d63645 | [
"BSD-3-Clause"
] | 22 | 2015-01-15T18:11:54.000Z | 2022-01-11T21:47:51.000Z | /*
* $Id$
*
* Author: David Fournier
* Copyright (c) 2008-2012 Regents of the University of California
*/
/**
* \file
* Description not yet available.
*/
#include <df1b2fun.h>
#include "admb_messages.h"
/**
* Description not yet available.
* \param
*/
df1b23array::df1b23array(int nrl,int nrh,int ncl,int nch,int nxl,int nxh)
{
if (nrl>nrh)
{
allocate();
}
else
{
allocate(nrl,nrh,ncl,nch,nxl,nxh);
}
}
/**
* Description not yet available.
* \param
*/
df1b23array::df1b23array(int nrl,int nrh,int ncl,int nch)
{
if (nrl>nrh)
{
allocate();
}
else
{
allocate(nrl,nrh,ncl,nch);
}
}
/**
* Description not yet available.
* \param
*/
df1b23array::df1b23array(int nrl,int nrh)
{
if (nrl>nrh)
{
allocate();
}
else
{
allocate(nrl,nrh);
}
}
/**
* Description not yet available.
* \param
*/
df1b23array::df1b23array(void)
{
allocate();
}
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,int ncl,int nch,
int nxl,int nxh,const char * s)
{
allocate(nrl,nrh,ncl,nch,nxl,nxh);
}
/*
void df1b23array::allocate(int nrl,int nrh,int ncl,int nch,const char * s)
{
allocate(nrl,nrh,ncl,nch);
}
void df1b23array::allocate(int nrl,int nrh,const index_type& ncl,
const index_type& nch,const char * s)
{
allocate(nrl,nrh,ncl,nch);
}
*/
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,
const index_type& ncl, const index_type& nch,
const index_type& nxl, const index_type& nxh,
const char * s)
{
allocate(nrl,nrh,ncl,nch,nxl,nxh);
}
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,int ncl,int nch,
int nxl,int nxh)
{
index_min=nrl;
index_max=nrh;
if ((v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
}
v -= indexmin();
for (int i=nrl; i<=nrh; i++)
{
v[i].allocate(ncl,nch,nxl,nxh);
}
}
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,int ncl,int nch)
{
index_min=nrl;
index_max=nrh;
if ((v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
v -= indexmin();
for (int i=nrl; i<=nrh; i++)
{
v[i].allocate(ncl,nch);
}
}
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,const index_type& ncl,
const index_type& nch)
{
index_min=nrl;
index_max=nrh;
if ((v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
}
v -= indexmin();
for (int i=nrl; i<=nrh; i++)
{
v[i].allocate(ad_integer(ncl(i)),ad_integer(nch(i)));
}
}
/**
* Description not yet available.
* \param
*/
void df1b23array::allocate(int nrl,int nrh,
const index_type& ncl,const index_type& nch,
const index_type& nxl,const index_type& nxh)
{
index_min=nrl;
index_max=nrh;
if ((v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
}
v -= indexmin();
for (int i=nrl; i<=nrh; i++)
{
v[i].allocate(ad_integer(ncl(i)),ad_integer(nch(i)),nxl(i),nxh(i));
}
}
/**
Allocate 3array with specified indexes.
\param nrl 3array lower row index
\param nrh 3array upper row index
\param ncl vector of lower row indexes
for each row element in 3array
\param nch vector of upper row indexes
for each row element in 3array
\param nxl lower row index
for each row and column element in 3array
\param nxh upper row index
for each row and column element in 3array
\param s id
*/
void df1b23array::allocate(
const int nrl, const int nrh,
const ivector& ncl, const ivector& nch,
const int nxl, const int nxh,
const char* s)
{
index_min=nrl;
index_max=nrh;
if ( (v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
}
v -= indexmin();
for (int i=nrl; i<=nrh; i++)
{
v[i].allocate(ncl(i), nch(i), nxl, nxh);
}
}
/**
Copy constructor
*/
df1b23array::df1b23array(const df1b23array & x)
{
index_min = x.index_min;
index_max = x.index_max;
v = x.v;
shape = x.shape;
if (shape) (shape->ncopies)++;
}
/**
Allocate vector of df1b2matrix with dimension [nrl to nrh].
\param nrl lower vector index
\param nrl upper vector index
*/
void df1b23array::allocate(int nrl,int nrh)
{
index_min=nrl;
index_max=nrh;
if ((v = new df1b2matrix[size()]) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
ad_exit(21);
}
if ( (shape=new vector_shapex(nrl,nrh,v)) == 0)
{
cerr << " Error allocating memory in df1b23array contructor\n";
}
v -= indexmin();
}
/**
Destructor
*/
df1b23array::~df1b23array()
{
if (shape)
{
if (shape->ncopies)
{
(shape->ncopies)--;
}
else
{
deallocate();
}
}
}
/**
Deallocates class memory memory.
*/
void df1b23array::deallocate()
{
if (shape)
{
v=(df1b2matrix*)(shape->trueptr);
delete [] v;
v=0;
delete shape;
shape=0;
index_min=1;
index_max=0;
}
}
/**
Does not allocate, but initialize member variables.
*/
void df1b23array::allocate(void)
{
index_min=1;
index_max=0;
v=0;
shape=0;
}
/**
* Description not yet available.
* \param
*/
df1b2variable sum(const df1b23array& _x)
{
ADUNCONST(df1b23array,x)
df1b2variable tmp;
tmp=0.0;
int mmin=x.indexmin();
int mmax=x.indexmax();
for (int i=mmin;i<=mmax;i++)
{
tmp+=sum(x(i));
}
return tmp;
}
#if !defined(OPT_LIB)
/**
* Description not yet available.
* \param
*/
df1b2variable& df1b23array::operator () (int i,int j,int k)
{
if (i < indexmin() || i > indexmax())
{
ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
"df1b2variable& df1b23array::operator () (int i,int j,int k)",
indexmin(), indexmax(), i);
}
return v[i][j][k];
}
/**
* Description not yet available.
* \param
*/
df1b2vector& df1b23array::operator () (int i,int j)
{
if (i < indexmin() || i > indexmax())
{
ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
"df1b2vector& df1b23array::operator () (int i,int j)",
indexmin(), indexmax(), i);
}
return v[i][j];
}
/**
* Description not yet available.
* \param
*/
df1b2matrix& df1b23array::operator () (int i)
{
if (i < indexmin() || i > indexmax())
{
ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
"df1b2matrix& df1b23array::operator () (int i)",
indexmin(), indexmax(), i);
}
return v[i];
}
/**
* Description not yet available.
* \param
*/
df1b2matrix& df1b23array::operator [] (int i)
{
if (i < indexmin() || i > indexmax())
{
ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
"df1b2matrix& df1b23array::operator [] (int i)",
indexmin(), indexmax(), i);
}
return v[i];
}
#endif // #if !defined(OPT_LIB)
/**
* Description not yet available.
* \param
*/
void df1b23array::initialize(void)
{
int rmin=indexmin();
int rmax=indexmax();
for (int i=rmin;i<=rmax;i++)
{
(*this)(i).initialize();
}
}
| 18.99759 | 74 | 0.623161 | [
"shape",
"vector"
] |
9bf21839eaefe06f2f91a2036328d2349af1358d | 1,648 | cpp | C++ | codeforces/B - Almost Sorted/Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | 1 | 2022-02-11T16:55:36.000Z | 2022-02-11T16:55:36.000Z | codeforces/B - Almost Sorted/Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | null | null | null | codeforces/B - Almost Sorted/Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | null | null | null | /****************************************************************************************
* @author: kzvd4729 created: Apr/22/2021 19:22
* solution_verdict: Accepted language: GNU C++17 (64)
* run_time: 31 ms memory_used: 7800 KB
* problem: https://codeforces.com/contest/1508/problem/B
****************************************************************************************/
#include<iostream>
#include<vector>
#include<cstring>
#include<map>
#include<bitset>
#include<assert.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<set>
#include<queue>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<chrono>
#include<stack>
#include<deque>
#include<random>
#define long long long
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N=1e6,inf=1e9,mod=1e9+7;
const long Inf=1LL*inf*inf;
long dp[N+2];
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
int t;cin>>t;
while(t--)
{
int n;long k;cin>>n>>k;
dp[n+1]=1;long sm=1;
for(int i=n;i>=1;i--)
{
dp[i]=sm;
sm+=dp[i];
if(sm>Inf)sm=Inf+1;
}
if(dp[1]<k)
{
cout<<-1<<endl;
continue;
}
for(int i=1;i<=n;i++)
{
for(int j=i+1; ;j++)
{
if(dp[j]>=k)
{
for(int ii=j-1;ii>=i;ii--)cout<<ii<<" ";
i=j-1;break;
}
else k-=dp[j];
}
}
cout<<endl;
}
return 0;
} | 25.353846 | 111 | 0.45449 | [
"vector"
] |
5002dfd58d0a43c8c10662ccd97cf2baebc8aa1b | 3,425 | cpp | C++ | Examples/App_SWE/main.cpp | weikm/sandcarSimulation2 | fe499d0a3289c0ac1acce69c7dc78d8ce1b2708a | [
"Apache-2.0"
] | null | null | null | Examples/App_SWE/main.cpp | weikm/sandcarSimulation2 | fe499d0a3289c0ac1acce69c7dc78d8ce1b2708a | [
"Apache-2.0"
] | null | null | null | Examples/App_SWE/main.cpp | weikm/sandcarSimulation2 | fe499d0a3289c0ac1acce69c7dc78d8ce1b2708a | [
"Apache-2.0"
] | null | null | null | /**
* @author : Xu Ben (592228912@qq.com)
* @date : 2020-07-27
* @description: Simulate with shallow water equation
* @version : 1.0
*
* @author : Zhu Fei (feizhu@pku.edu.cn)
* @date : 2021-07-17
* @description: poslish code
* @version : 1.1
*/
#include <memory>
#include "Framework/Framework/SceneGraph.h"
#include "Framework/Framework/Log.h"
#include "Dynamics/HeightField/HeightFieldNode.h"
#include "Rendering/HeightFieldRender.h"
#include "IO/Image_IO/image.h"
#include "IO/Image_IO/png_io.h"
#include "IO/Image_IO/image_io.h"
#include "GUI/GlutGUI/GLApp.h"
using namespace std;
using namespace PhysIKA;
void RecieveLogMessage(const Log::Message& m)
{
switch (m.type)
{
case Log::Info:
cout << ">>>: " << m.text << endl;
break;
case Log::Warning:
cout << "???: " << m.text << endl;
break;
case Log::Error:
cout << "!!!: " << m.text << endl;
break;
case Log::User:
cout << ">>>: " << m.text << endl;
break;
default:
break;
}
}
/**
* setup different scenes depending on input mode parameter
*
* @param[in] mode create basic scene if mode == 0
* create city scene with river if mode == 1
*/
void createScene(int mode = 1)
{
SceneGraph& scene = SceneGraph::getInstance();
scene.setUpperBound(Vector3f(1.5, 1, 1.5));
scene.setLowerBound(Vector3f(-0.5, 0, -0.5));
std::shared_ptr<HeightFieldNode<DataType3f>> root = scene.createNewScene<HeightFieldNode<DataType3f>>();
root->setMass(100);
if (mode == 1)
root->loadParticles(Vector3f(0, 0, 0), Vector3f(2, 1.5, 2), 1024, 0.7, 1);
else
{
std::string filename1 = "../../../Examples/App_SWE/terrain4-4.png"; //The pixel count is 1024*1024
std::string filename2 = "../../../Examples/App_SWE/river4-4.png";
root->loadParticlesFromImage(filename1, filename2, 0.1, 1);
}
auto ptRender = std::make_shared<HeightFieldRenderModule>();
ptRender->setColor(Vector3f(1, 0, 0));
root->addVisualModule(ptRender);
}
/**
* setup city scene with river, execute one step and output the height field difference
*/
void executeOnce()
{
std::shared_ptr<HeightFieldNode<DataType3f>> root(new HeightFieldNode<DataType3f>);
std::string filename1 = "../../../Examples/App_SWE/terrain4-4.png"; //The pixel count is 1024*1024
std::string filename2 = "../../../Examples/App_SWE/river4-4.png";
root->loadParticlesFromImage(filename1, filename2, 0.1, 0.998);
float dt = 1.0 / 60;
std::vector<Real> vec1 = root->outputDepth();
root->run(1, dt);
std::vector<Real> vec2 = root->outputDepth();
std::cout << "the depth difference:" << std::endl;
for (int i = 0; i < vec1.size(); i++)
{
if (vec1[i] != vec2[i])
{
std::cout << i << std::endl;
}
}
}
int main()
{
#if 0
executeOnce();
#else
createScene(1);
Log::setOutput("console_log.txt");
Log::setLevel(Log::Info);
Log::setUserReceiver(&RecieveLogMessage);
Log::sendMessage(Log::Info, "Simulation begin");
GLApp window;
window.createWindow(1024, 768);
window.mainLoop();
Log::sendMessage(Log::Info, "Simulation end!");
#endif
return 0;
} | 29.025424 | 136 | 0.585693 | [
"vector"
] |
500f05d51e53260787359fdde522f8184d5cf2f8 | 6,457 | hpp | C++ | platform.hpp | lonestep/teleport | 0753c47a0cbb8a2eda88b49da3434d8221e1d30e | [
"MIT"
] | null | null | null | platform.hpp | lonestep/teleport | 0753c47a0cbb8a2eda88b49da3434d8221e1d30e | [
"MIT"
] | null | null | null | platform.hpp | lonestep/teleport | 0753c47a0cbb8a2eda88b49da3434d8221e1d30e | [
"MIT"
] | null | null | null | /**
* File: platform.hpp
*
* Desc:
*
* Author: lonestep@gmail.com
* Created:
*/
#pragma once
#include <stdarg.h>
#include <time.h>
#include <fstream>
#include <cstdlib>
#include <regex>
#include <map>
#include <vector>
#include <queue>
#include <mutex>
#include "typedefs.hpp"
#ifdef Windows
#include <sddl.h>
#include <ObjBase.h>
#else
#include <sys/time.h>
#endif
namespace TLP
{
//
class BaseObject
{
public:
BaseObject();
virtual ~BaseObject();
T_BOOL IsValid();
T_HANDLE GetHandle();
protected:
T_HANDLE m_hHandle;
};
//
class BaseNamedObject:public BaseObject
{
public:
BaseNamedObject(T_PCSTR pName);
virtual ~BaseNamedObject();
protected:
//
RC InitSecurityAttr(SECURITY_ATTRIBUTES& sa);
T_CHAR m_strName[MAX_NAME];
T_BOOL m_bGlobal;
};
//
class BaseMutex:public BaseObject
{
public:
BaseMutex() {}
virtual ~BaseMutex(){}
RC Lock(T_UINT32 nMilliseconds = INFINITE);
RC TryLock(T_UINT32 nMilliseconds = INFINITE);
RC Unlock();
};
//
class BaseEvent :public BaseObject
{
public:
BaseEvent() {}
virtual ~BaseEvent() {}
RC Post(T_BOOL bReset = T_FALSE);
RC Wait(T_UINT32 nMilliseconds = INFINITE);
RC Reset();
};
//
class GenericEvent:public BaseEvent
{
public:
GenericEvent();
virtual ~GenericEvent();
};
//
class GenericMutex :public BaseMutex
{
public:
GenericMutex();
virtual ~GenericMutex();
};
//
class NamedEvent:public BaseNamedObject, public BaseEvent
{
public:
NamedEvent(T_PCSTR pName);
virtual ~NamedEvent() {}
};
//
class NamedMutex:public BaseNamedObject,public BaseMutex
{
public:
NamedMutex(T_PCSTR pName);
virtual ~NamedMutex() {}
};
//
template <class T> class ScopedLock
{
public:
//
explicit ScopedLock(T& objMutex) : m_objMutex(objMutex)
{
m_objMutex.Lock();
}
//
ScopedLock(T& objMutex, long milliseconds) : m_objMutex(objMutex)
{
m_objMutex.Lock(milliseconds);
}
//
virtual ~ScopedLock()
{
try {
m_objMutex.Unlock();
}catch (...){
}
}
private:
T& m_objMutex;
ScopedLock();
ScopedLock(const ScopedLock&);
ScopedLock& operator = (const ScopedLock&) {};
};
//
class SharedMemory:public BaseNamedObject
{
public:
SharedMemory(T_PCSTR pName,
T_UINT32 nSizeInByte,
AccessMode eMode = AccessMode::AM_READWRITE);
virtual ~SharedMemory();
T_PSTR Begin() const;
T_PSTR End() const;
T_UINT32 GetSize();
AccessMode GetMode();
T_STRING GetName();
T_VOID Map();
T_VOID Unmap();
T_VOID Close();
private:
SharedMemory();
SharedMemory(const SharedMemory&);
//SharedMemory& operator = (const SharedMemory&);
T_HANDLE m_hFileHandle;
T_UINT32 m_nSize;
AccessMode m_eMode;
T_BOOL m_bCreated;
T_PSTR m_pAddress;
};
//
class Logger
{
public:
static Logger& Instance();
RC Log(LoggerType eType, T_PCSTR pFormat, ...);
RC Enable();
RC Disable();
RC SetLevel(LoggerType eType);
private:
T_BOOL m_bLoggerEnable;
LoggerType m_loggerLevel;
T_CHAR m_szBuffer[MAX_BUFFER_LEN];
std::ofstream m_ofStream;
T_PSTR TypeToString(LoggerType eType);
Logger();
virtual ~Logger();
Logger(const Logger&) :m_bLoggerEnable(T_TRUE), m_szBuffer{ 0 }{};
Logger& operator =(const Logger&) {}
CRITICAL_SECTION m_cs;
};
//!!! NOTE: LogVital() will log and exit the process!
#define LogVital(_pFormat, ...) Logger::Instance().Log(TLP::LoggerType::LOG_VITAL, _pFormat, __VA_ARGS__)
#define LogError(_pFormat, ...) Logger::Instance().Log(TLP::LoggerType::LOG_ERROR, _pFormat, __VA_ARGS__)
#define LogWarn(_pFormat, ...) Logger::Instance().Log(TLP::LoggerType::LOG_WARNING, _pFormat, __VA_ARGS__)
#define LogInfo(_pFormat, ...) Logger::Instance().Log(TLP::LoggerType::LOG_INFO, _pFormat, __VA_ARGS__)
#define LogTrivial(_pFormat, ...) Logger::Instance().Log(TLP::LoggerType::LOG_TRIVIAL, _pFormat, __VA_ARGS__)
//
class Thread
{
public:
Thread():m_hThread(T_INVHDL),m_nThreadId(0), m_bRunning(T_FALSE) {}
virtual ~Thread(){}
RC Create(PFN_ThreadRoutine, T_PVOID pArgs);
RC Start();
RC Stop();
RC StopRunning();
private:
T_HANDLE m_hThread;
T_ULONG m_nThreadId;
volatile T_BOOL m_bRunning;
};
//
template <class T> class TMsgQueue
{
public:
T_VOID Push(T& r)
{
ScopedLock<GenericMutex> lock(m_mQueueMutex);
m_msgQueue.push(r);
}
T_BOOL Pop(T& r)
{
T_BOOL bPop = T_FALSE;
ScopedLock<GenericMutex> lock(m_mQueueMutex);
if (!m_msgQueue.empty())
{
r = m_msgQueue.front();
m_msgQueue.pop();
bPop = T_TRUE;
}
return bPop;
}
T_UINT64 Size()
{
ScopedLock<GenericMutex> lock(m_mQueueMutex);
return m_msgQueue.size();
}
private:
GenericMutex m_mQueueMutex;
std::queue<T> m_msgQueue;
};
//Utilities
T_ID TGetProcId();
T_ID TGetThreadId();
T_UINT32 TGetError();
T_PTSTR TGetErrorMessage(T_UINT32 nErrorCode);
T_VOID TSleep(UINT32 nMilliseconds);
T_VOID TFree(T_PVOID pBuffer);
T_STRING TMakeGuid();
T_HANDLE TCreateEvent();
T_BOOL TSetEvent(T_HANDLE hEvent);
T_UINT32 BKDRHash(T_PCSTR str);
T_BOOL TFileExist(T_PCSTR pDirFile);
T_BOOL TMakeDirectory(T_PCSTR pDirPathName);
RC TShellRun(T_PCSTR pFile, T_PCSTR pParams);
}; | 21.451827 | 110 | 0.555057 | [
"vector"
] |
5013faa1e0bc8be5d82d3a5cefd14ffddb8e2acb | 2,678 | cpp | C++ | Graphics/Src/CScene.cpp | ArvydasSlekaitis/ReginaGameEngine | 4b6af9b5fbf9aad4025b0387260c31019fd8f8c8 | [
"MIT"
] | 1 | 2020-09-02T06:00:14.000Z | 2020-09-02T06:00:14.000Z | Graphics/Src/CScene.cpp | ArvydasSlekaitis/ReginaGameEngine | 4b6af9b5fbf9aad4025b0387260c31019fd8f8c8 | [
"MIT"
] | null | null | null | Graphics/Src/CScene.cpp | ArvydasSlekaitis/ReginaGameEngine | 4b6af9b5fbf9aad4025b0387260c31019fd8f8c8 | [
"MIT"
] | null | null | null | ///////////////////////////////////////////////////////////
// CScene.cpp
// Created on: 27-11-2009
// Last modified: 27-11-2009
// Original author: Arvydas Slekaitis (C)
///////////////////////////////////////////////////////////
#include <CScene.h>
using namespace Regina;
//*****************************************************************************
CScene::~CScene()
{
if(renderObject_Manager_NonTransparent!=NULL)
delete renderObject_Manager_NonTransparent;
renderObject_Manager_NonTransparent = NULL;
if(device!=NULL)
device->Release();
device = NULL;
}
//*****************************************************************************
CScene::CScene(LPDIRECT3DDEVICE9 iDevice) : device(NULL), renderObject_Manager_NonTransparent(NULL)
{
if(iDevice == NULL)
throw invalid_argument("CScene::CScene - argument iDevice==NULL");
device = iDevice;
device->AddRef();
renderObject_Manager_NonTransparent = new CNonTransparent_RenderObject_Manager(iDevice);
assert(renderObject_Manager_NonTransparent!=NULL && L"CScene::CScene - cannot create new CNonTransparent_RenderObject_Manager");
}
//*****************************************************************************
void CScene::Render(const eRenderType& iRenderType, const D3DXMATRIX& iCameraView, const D3DXMATRIX& iCameraProj, const D3DXVECTOR3& iCameraPosition)
{
renderObject_Manager_NonTransparent->Render(iRenderType, iCameraView, iCameraProj, iCameraPosition);
}
//*****************************************************************************
void CScene::Clear()
{
renderObject_Manager_NonTransparent->Clear();
}
//*****************************************************************************
void CScene::ClearStatic()
{
renderObject_Manager_NonTransparent->ClearStatic();
}
//*****************************************************************************
void CScene::ClearDynamic()
{
renderObject_Manager_NonTransparent->ClearDynamic();
}
//*****************************************************************************
void CScene::OnLostDevice()
{
renderObject_Manager_NonTransparent->OnLostDevice();
}
//*****************************************************************************
void CScene::OnResetDevice()
{
renderObject_Manager_NonTransparent->OnResetDevice();
}
//*****************************************************************************
void CScene::AddRenderObject(CRenderObject_SimpleMesh& iRenderObject)
{
//if(iRenderObject.TransparencyEnabled()==false)
renderObject_Manager_NonTransparent->AddRenderObject(iRenderObject);
}
//***************************************************************************** | 29.755556 | 149 | 0.505601 | [
"render"
] |
5015d69cc9257f15c9be844ca7c0f6d96f2178b2 | 2,428 | cpp | C++ | src/plugins/main/emissions/diffuse.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 19 | 2016-11-07T00:01:19.000Z | 2021-12-29T05:35:14.000Z | src/plugins/main/emissions/diffuse.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 33 | 2016-07-06T21:58:05.000Z | 2020-08-01T18:18:24.000Z | src/plugins/main/emissions/diffuse.cpp | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | null | null | null | #include "Environment.h"
#include "SceneLoadContext.h"
#include "emission/IEmission.h"
#include "emission/IEmissionPlugin.h"
#include "entity/IEntity.h"
#include "math/Projection.h"
#include "math/Sampling.h"
#include "shader/NodeUtils.h"
namespace PR {
class DiffuseEmission : public IEmission {
public:
DiffuseEmission(const std::shared_ptr<FloatSpectralNode>& spec)
: IEmission()
, mRadiance(spec)
{
}
virtual ~DiffuseEmission() = default;
// Given in radiance (W/(sr m^2))
void eval(const EmissionEvalInput& in, EmissionEvalOutput& out,
const RenderTileSession&) const override
{
out.Radiance = mRadiance->eval(in.ShadingContext);
out.PDF_S = Sampling::cos_hemi_pdf(std::abs(in.Context.NdotL()));
}
void pdf(const EmissionEvalInput& in, EmissionPDFOutput& out,
const RenderTileSession&) const override
{
out.PDF_S = Sampling::cos_hemi_pdf(in.Context.NdotL());
}
void sample(const EmissionSampleInput& in, EmissionSampleOutput& out, const RenderTileSession&) const override
{
out.L = Sampling::cos_hemi(in.RND.getFloat(), in.RND.getFloat());
out.PDF_S = Sampling::cos_hemi_pdf(out.L(2));
}
SpectralBlob power(const SpectralBlob& wvl) const override { return NodeUtils::average(wvl, mRadiance.get()); }
SpectralRange spectralRange() const override { return mRadiance->spectralRange(); }
std::string dumpInformation() const override
{
std::stringstream stream;
stream << IEmission::dumpInformation()
<< " <DiffuseEmission>: " << mRadiance->dumpInformation() << std::endl;
return stream.str();
}
private:
std::shared_ptr<FloatSpectralNode> mRadiance;
};
class DiffuseEmissionPlugin : public IEmissionPlugin {
public:
std::shared_ptr<IEmission> create(const std::string&, const SceneLoadContext& ctx) override
{
return std::make_shared<DiffuseEmission>(ctx.lookupSpectralNode("radiance", 1));
}
const std::vector<std::string>& getNames() const override
{
static std::vector<std::string> names({ "diffuse", "standard", "default" });
return names;
}
PluginSpecification specification(const std::string&) const override
{
return PluginSpecificationBuilder("Diffuse Emission", "Standard emission for lights")
.Identifiers(getNames())
.Inputs()
.SpectralNode("radiance", "Emitted energy in radiance", 1)
.Specification()
.get();
}
};
} // namespace PR
PR_PLUGIN_INIT(PR::DiffuseEmissionPlugin, _PR_PLUGIN_NAME, PR_PLUGIN_VERSION) | 29.253012 | 112 | 0.733937 | [
"vector"
] |
502962fc14a2b827db738c82ba23a5c5221daa13 | 1,556 | cpp | C++ | Round #638 (Div 2)/D.cpp | julianferres/Codeforces | ac80292a4d53b8078fc1a85e91db353c489555d9 | [
"MIT"
] | 4 | 2020-01-31T15:49:25.000Z | 2020-07-07T11:44:03.000Z | Round #638 (Div 2)/D.cpp | julianferres/CodeForces | 14e8369e82a2403094183d6f7824201f681c9f65 | [
"MIT"
] | null | null | null | Round #638 (Div 2)/D.cpp | julianferres/CodeForces | 14e8369e82a2403094183d6f7824201f681c9f65 | [
"MIT"
] | null | null | null | /******************************************
* AUTHOR: julianferres *
******************************************/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> ii;
typedef vector<ii> vii; typedef vector<bool> vb;
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define forr(i, a, b) for(int i = (a); i < (int) (b); i++)
#define forn(i, n) forr(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(),(c).end()
#define DBG(x) cerr << #x << " = " << (x) << endl
#define show(v,n) cerr << #v << " = "; forn(i,n) cerr << v[i] << " "; cerr << endl;
#define esta(x,c) ((c).find(x) != (c).end())
#define RAYA cerr << "===============================" << endl
const ll inf = 1LL<<62;
const int mod = 1e9+7; // 998244353
const int N = 2e5+5;
ll pot2(ll n)
{
ll pot_2 = 0;
while(n) {pot_2++; n/=2;}
return pot_2;
}
int main() {
FIN;
int test; cin >> test;
while(test--){
ll n; cin >> n;
if(n<=3){
cout << "1" << "\n" << n-2 << "\n";
continue;
}
ll pot_2 = pot2(n);
pot_2--;
cout << pot_2 << "\n";
int act = 1;int actact=1;
vi v;
forn(i,pot_2-2)
{
v.pb((1<<i));
act += (1<<(i+1));
actact = max(actact,(1<<(i+1)));
}
int x = (1<<(pot_2-1));
if(2*x >= n-act)
{
int y = (n-act)/2;
int z = (n-act+1)/2;
//DBG(y); DBG(z);
v.pb(y-actact); v.pb(z-y);
}
else
{
v.pb(x-actact);
v.pb(n-act-2*x);
}
for(auto u : v) cout << u << " "; cout << "\n";
}
return 0;
}
| 21.915493 | 83 | 0.469152 | [
"vector"
] |
df22450899eabd8a649e5856c64a0a5398cb21ca | 424,499 | cpp | C++ | mojiben2/PUL.cpp | katahiromz/mojiben | 8a8d1a3fdffe6ff78165c50e37a6c44aee335e82 | [
"MIT"
] | null | null | null | mojiben2/PUL.cpp | katahiromz/mojiben | 8a8d1a3fdffe6ff78165c50e37a6c44aee335e82 | [
"MIT"
] | 3 | 2021-07-27T11:19:34.000Z | 2021-07-27T12:01:43.000Z | mojiben2/PUL.cpp | katahiromz/mojiben | 8a8d1a3fdffe6ff78165c50e37a6c44aee335e82 | [
"MIT"
] | null | null | null | #include <windows.h>
#include <vector>
#include <map>
using namespace std;
#include "kakijun.h"
KAKIJUN g_print_uppercase_kakijun;
static const BYTE A0[2256] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xB0,0x08,0x00,0x00,
0x46,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE A1[2480] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x90,0x09,0x00,0x00,
0x8D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE A2[48] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
};
static const BYTE B0[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,
};
static const BYTE B1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE B2[1328] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x10,0x05,0x00,0x00,
0x98,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE B3[48] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE B4[1280] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xE0,0x04,0x00,0x00,
0xB0,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE B5[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE C0[3632] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x10,0x0E,0x00,0x00,
0x44,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE D0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE D1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
};
static const BYTE D2[2240] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xA0,0x08,0x00,0x00,
0x88,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE D3[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE E0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE E1[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE E2[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE E3[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE F0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE F1[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE F2[160] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE G0[3600] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xF0,0x0D,0x00,0x00,
0x44,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE G1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE G2[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE H0[160] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE H1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE H2[48] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE I0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE I1[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE I2[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE J0[112] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
};
static const BYTE J1[1568] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00,0x00,
0x56,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE K0[160] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE K1[1904] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x50,0x07,0x00,0x00,
0x56,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
};
static const BYTE K2[1824] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x07,0x00,0x00,
0x71,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE L0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE L1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE M0[160] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE M1[128] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xE0,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xE0,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xE2,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE M2[2000] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xB0,0x07,0x00,0x00,
0x3D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE M3[1792] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xE0,0x06,0x00,0x00,
0x8C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xE0,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE N0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE N1[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE N2[2864] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x10,0x0B,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE O0[4704] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x24,0x01,0x00,0x00,0x40,0x12,0x00,0x00,
0x3E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE P0[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE P1[1296] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xF0,0x04,0x00,0x00,
0x55,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE Q0[4416] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x01,0x00,0x00,0x20,0x11,0x00,0x00,
0x3D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE Q1[1120] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x40,0x04,0x00,0x00,
0xA9,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE R0[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE R1[1344] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x20,0x05,0x00,0x00,
0x54,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
};
static const BYTE R2[1632] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x40,0x06,0x00,0x00,
0x7F,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE S0[2048] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xE0,0x07,0x00,0x00,
0x5B,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
};
static const BYTE S1[2256] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xB0,0x08,0x00,0x00,
0x4D,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE T0[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE T1[160] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE U0[96] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
};
static const BYTE U1[1312] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x05,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE U2[128] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
};
static const BYTE V0[2368] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x20,0x09,0x00,0x00,
0x41,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE V1[2384] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x30,0x09,0x00,0x00,
0x8C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE W0[1632] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x40,0x06,0x00,0x00,
0x2C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x2F,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x2E,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x2D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x2C,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x2C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x2C,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x2C,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x2D,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x2D,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x2E,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x2E,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x2F,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x2F,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x31,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x31,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x32,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x32,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x33,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x33,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x34,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x34,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x35,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x35,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x36,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x36,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x37,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x37,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x39,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x39,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x3A,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x3A,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x3B,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x3B,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x3C,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x3C,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x3D,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x3E,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x3F,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x41,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x42,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x43,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x45,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x46,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x47,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x48,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE W1[1616] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x30,0x06,0x00,0x00,
0x5B,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE W2[1712] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x90,0x06,0x00,0x00,
0x8C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE W3[1616] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x30,0x06,0x00,0x00,
0xBC,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xF1,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xF0,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xFD,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xEF,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xEE,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xED,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0xEC,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0xEB,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xEA,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xEA,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xFD,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xE9,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xFD,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xE9,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xE8,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xE8,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xFB,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xE7,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xFB,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xE7,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xFA,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xE6,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xFA,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xE6,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xF9,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xE5,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xF9,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xE5,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xE4,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xE4,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xF7,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xE3,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xF7,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xE3,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xF6,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xE2,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xF6,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xE2,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xF5,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xE1,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xF5,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xE1,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xF4,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xE0,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xF4,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xE0,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xF3,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xF3,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xDF,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xF2,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xF2,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xDE,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xF1,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xF1,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xDD,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xDC,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0xDB,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0xDA,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xED,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0xD9,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0xD8,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0xD7,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xEA,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0xD6,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xE9,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xE6,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xE5,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE X0[2944] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x60,0x0B,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE X1[2800] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0xD0,0x0A,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE Y0[1632] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x40,0x06,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
};
static const BYTE Y1[1568] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00,0x00,
0x90,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0xD5,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD4,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x54,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x68,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
};
static const BYTE Y2[112] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE Z0[176] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
};
static const BYTE Z1[2976] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x80,0x0B,0x00,0x00,
0x49,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0xD3,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
0xD2,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,
0xD1,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,
0xD0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,
0xCF,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,
0xCE,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0xCD,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x12,0x00,0x00,0x00,
0xCC,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0xCB,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
0xCA,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0x15,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
0xC9,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x17,0x00,0x00,0x00,
0xC8,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0xC7,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xDF,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0xC6,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,
0xC5,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x1B,0x00,0x00,0x00,0xDD,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,
0xC4,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0xDB,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,
0xC2,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0xDA,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
0xC1,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
0xC0,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0xBF,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0xD7,0x00,0x00,0x00,0x24,0x00,0x00,0x00,
0xBE,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xD6,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0xBD,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xD5,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0xBC,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x27,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xD4,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0xBB,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0xD3,0x00,0x00,0x00,0x29,0x00,0x00,0x00,
0xBA,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xD2,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,
0xB9,0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2B,0x00,0x00,0x00,0xD1,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,
0xB8,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,
0xB7,0x00,0x00,0x00,0x2D,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,
0xB6,0x00,0x00,0x00,0x2E,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0xCE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0xB5,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0xB4,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0xB3,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0xB2,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x35,0x00,0x00,0x00,
0xB1,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x36,0x00,0x00,0x00,
0xB0,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x37,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0xAF,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x39,0x00,0x00,0x00,
0xAE,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,
0xAD,0x00,0x00,0x00,0x3A,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0xC5,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xAC,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,
0xAB,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,
0xAA,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0xA9,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0xA8,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0xA7,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0xA6,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0xA5,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0xA4,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0xA3,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0xA2,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,
0xA1,0x00,0x00,0x00,0x4A,0x00,0x00,0x00,0xB9,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,
0xA0,0x00,0x00,0x00,0x4B,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,
0x9F,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,
0x9E,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,
0x9D,0x00,0x00,0x00,0x4F,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x51,0x00,0x00,0x00,
0x9C,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x52,0x00,0x00,0x00,
0x9B,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x53,0x00,0x00,0x00,
0x9A,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x55,0x00,0x00,0x00,
0x99,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x98,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x57,0x00,0x00,0x00,
0x97,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x96,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,
0x95,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,
0x94,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,
0x93,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,
0x92,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,
0x91,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x90,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x62,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
0x8E,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x8D,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x66,0x00,0x00,0x00,
0x8C,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x67,0x00,0x00,0x00,
0x8B,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x69,0x00,0x00,0x00,
0x8A,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,
0x89,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,
0x87,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,
0x86,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,
0x85,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x71,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
0x83,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x73,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x74,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x75,0x00,0x00,0x00,
0x81,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x76,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x77,0x00,0x00,0x00,
0x7F,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x79,0x00,0x00,0x00,
0x7E,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,
0x7D,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,
0x7C,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,
0x7B,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,
0x7A,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,
0x79,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x81,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
0x77,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x83,0x00,0x00,0x00,
0x76,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x84,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x85,0x00,0x00,0x00,
0x75,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
0x74,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x87,0x00,0x00,0x00,
0x73,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x89,0x00,0x00,0x00,
0x72,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
0x71,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,
0x70,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,
0x6F,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
0x6E,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,
0x6D,0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x90,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x91,0x00,0x00,0x00,
0x6C,0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x92,0x00,0x00,0x00,
0x6B,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x93,0x00,0x00,0x00,
0x6A,0x00,0x00,0x00,0x93,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x94,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x82,0x00,0x00,0x00,0x95,0x00,0x00,0x00,
0x69,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
0x68,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x97,0x00,0x00,0x00,
0x67,0x00,0x00,0x00,0x97,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x98,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x99,0x00,0x00,0x00,
0x66,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,
0x65,0x00,0x00,0x00,0x9A,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,
0x64,0x00,0x00,0x00,0x9B,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,
0x63,0x00,0x00,0x00,0x9D,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,
0x62,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x7A,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,
0x61,0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0xA1,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,
0x5F,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,
0x5E,0x00,0x00,0x00,0xA3,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,
0x5D,0x00,0x00,0x00,0xA5,0x00,0x00,0x00,0x75,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,
0x5C,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,
0x5B,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xA8,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,
0x5A,0x00,0x00,0x00,0xA9,0x00,0x00,0x00,0x72,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,
0x59,0x00,0x00,0x00,0xAA,0x00,0x00,0x00,0x71,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,
0x58,0x00,0x00,0x00,0xAB,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xAC,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,
0x57,0x00,0x00,0x00,0xAD,0x00,0x00,0x00,0x6F,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,
0x56,0x00,0x00,0x00,0xAE,0x00,0x00,0x00,0x6E,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,
0x55,0x00,0x00,0x00,0xAF,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x6D,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,
0x54,0x00,0x00,0x00,0xB1,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,
0x53,0x00,0x00,0x00,0xB2,0x00,0x00,0x00,0x6B,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,
0x52,0x00,0x00,0x00,0xB3,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x6A,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,
0x51,0x00,0x00,0x00,0xB5,0x00,0x00,0x00,0x69,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,
0x50,0x00,0x00,0x00,0xB6,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,
0x4F,0x00,0x00,0x00,0xB7,0x00,0x00,0x00,0x67,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,
0x4E,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x66,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,
0x4D,0x00,0x00,0x00,0xBA,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xBB,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC1,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC2,0x00,0x00,0x00,0x5E,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC3,0x00,0x00,0x00,0x5D,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC6,0x00,0x00,0x00,0x5B,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC7,0x00,0x00,0x00,0x5A,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xC9,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
static const BYTE Z2[144] = {
0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xBD,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xBE,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,
0x49,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0xE2,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,
0x4A,0x00,0x00,0x00,0xCA,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,
0x4B,0x00,0x00,0x00,0xCB,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,
0x4C,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0xDE,0x00,0x00,0x00,0xCD,0x00,0x00,0x00,
};
VOID InitPrintUpperCase(VOID)
{
GA ga;
vector<GA> vga;
typedef KAKIJUN::value_type value_type;
ga.type = LINEAR;
ga.angle0 = 115;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(A0);
ga.pb = A0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 65;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(A1);
ga.pb = A1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(A2);
ga.pb = A2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(0, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(B0);
ga.pb = B0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(B1);
ga.pb = B1;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 270;
ga.angle1 = 455;
ga.cx = 154;
ga.cy = 55;
ga.cb = sizeof(B2);
ga.pb = B2;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(B3);
ga.pb = B3;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 270;
ga.angle1 = 450;
ga.cx = 173;
ga.cy = 153;
ga.cb = sizeof(B4);
ga.pb = B4;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 180;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(B5);
ga.pb = B5;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(1, vga));
vga.clear();
ga.type = POLAR;
ga.angle0 = 340;
ga.angle1 = 20;
ga.cx = 154;
ga.cy = 106;
ga.cb = sizeof(C0);
ga.pb = C0;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(2, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(D0);
ga.pb = D0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(D1);
ga.pb = D1;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 270;
ga.angle1 = 450;
ga.cx = 133;
ga.cy = 106;
ga.cb = sizeof(D2);
ga.pb = D2;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 180;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(D3);
ga.pb = D3;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(3, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(E0);
ga.pb = E0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(E1);
ga.pb = E1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(E2);
ga.pb = E2;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(E3);
ga.pb = E3;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(4, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(F0);
ga.pb = F0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(F1);
ga.pb = F1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(F2);
ga.pb = F2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(5, vga));
vga.clear();
ga.type = POLAR;
ga.angle0 = 340;
ga.angle1 = 25;
ga.cx = 155;
ga.cy = 105;
ga.cb = sizeof(G0);
ga.pb = G0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(G1);
ga.pb = G1;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(G2);
ga.pb = G2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(6, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(H0);
ga.pb = H0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(H1);
ga.pb = H1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(H2);
ga.pb = H2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(7, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(I0);
ga.pb = I0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(I1);
ga.pb = I1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(I2);
ga.pb = I2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(8, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(J0);
ga.pb = J0;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 0;
ga.angle1 = 190;
ga.cx = 150;
ga.cy = 141;
ga.cb = sizeof(J1);
ga.pb = J1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(9, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(K0);
ga.pb = K0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 135;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(K1);
ga.pb = K1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 45;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(K2);
ga.pb = K2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(10, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(L0);
ga.pb = L0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(L1);
ga.pb = L1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(11, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(M0);
ga.pb = M0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(M1);
ga.pb = M1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 65;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(M2);
ga.pb = M2;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 115;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(M3);
ga.pb = M3;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(12, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(N0);
ga.pb = N0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(N1);
ga.pb = N1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 50;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(N2);
ga.pb = N2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(13, vga));
vga.clear();
ga.type = POLAR;
ga.angle0 = 270;
ga.angle1 = -90;
ga.cx = 149;
ga.cy = 105;
ga.cb = sizeof(O0);
ga.pb = O0;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(14, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(P0);
ga.pb = P0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 230;
ga.angle1 = 485;
ga.cx = 111;
ga.cy = 61;
ga.cb = sizeof(P1);
ga.pb = P1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(15, vga));
vga.clear();
ga.type = POLAR;
ga.angle0 = 270;
ga.angle1 = -90;
ga.cx = 149;
ga.cy = 105;
ga.cb = sizeof(Q0);
ga.pb = Q0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 45;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Q1);
ga.pb = Q1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(16, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(R0);
ga.pb = R0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 230;
ga.angle1 = 485;
ga.cx = 111;
ga.cy = 61;
ga.cb = sizeof(R1);
ga.pb = R1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 50;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(R2);
ga.pb = R2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(17, vga));
vga.clear();
ga.type = POLAR;
ga.angle0 = 370;
ga.angle1 = 90;
ga.cx = 152;
ga.cy = 59;
ga.cb = sizeof(S0);
ga.pb = S0;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = -90;
ga.angle1 = 190;
ga.cx = 144;
ga.cy = 147;
ga.cb = sizeof(S1);
ga.pb = S1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(18, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(T0);
ga.pb = T0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(T1);
ga.pb = T1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(19, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(U0);
ga.pb = U0;
vga.push_back(ga);
ga.type = POLAR;
ga.angle0 = 170;
ga.angle1 = 10;
ga.cx = 149;
ga.cy = 140;
ga.cb = sizeof(U1);
ga.pb = U1;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 270;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(U2);
ga.pb = U2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(20, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 65;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(V0);
ga.pb = V0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 115;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(V1);
ga.pb = V1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(21, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 75;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(W0);
ga.pb = W0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 105;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(W1);
ga.pb = W1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 75;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(W2);
ga.pb = W2;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 105;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(W3);
ga.pb = W3;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(22, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 55;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(X0);
ga.pb = X0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 125;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(X1);
ga.pb = X1;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(23, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 55;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Y0);
ga.pb = Y0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 125;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Y1);
ga.pb = Y1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 90;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Y2);
ga.pb = Y2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(24, vga));
vga.clear();
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Z0);
ga.pb = Z0;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 125;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Z1);
ga.pb = Z1;
vga.push_back(ga);
ga.type = WAIT;
ga.cb = 0;
ga.pb = NULL;
vga.push_back(ga);
ga.type = LINEAR;
ga.angle0 = 0;
ga.angle1 = 0;
ga.cx = 0;
ga.cy = 0;
ga.cb = sizeof(Z2);
ga.pb = Z2;
vga.push_back(ga);
g_print_uppercase_kakijun.insert(value_type(25, vga));
vga.clear();
}
| 73.025804 | 81 | 0.756605 | [
"vector"
] |
df28c9253d465bbf45b5fca23ba529abc00e87cb | 324 | cpp | C++ | Algorithms/Shuffle_String/main.cpp | ugurcan-sonmez-95/LeetCode | e463a424c2d781f67be31ae42bc3c5c896db6017 | [
"MIT"
] | 1 | 2020-10-01T09:12:09.000Z | 2020-10-01T09:12:09.000Z | Algorithms/Shuffle_String/main.cpp | ugurcan-sonmez-95/LeetCode | e463a424c2d781f67be31ae42bc3c5c896db6017 | [
"MIT"
] | null | null | null | Algorithms/Shuffle_String/main.cpp | ugurcan-sonmez-95/LeetCode | e463a424c2d781f67be31ae42bc3c5c896db6017 | [
"MIT"
] | null | null | null | // Shuffle String - Solution
class Solution {
public:
std::string restoreString(const std::string &s, const std::vector<int> &indices) {
std::string final_s;
final_s.resize(s.size(), 'a');
for (int i{}; i < s.size(); i++)
final_s[indices[i]] = s[i];
return final_s;
}
}; | 27 | 86 | 0.555556 | [
"vector"
] |
df2a80ef7ca25f2dda9a8c466a51a2379f261bda | 1,900 | cpp | C++ | src/generate_test_data.cpp | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | 5 | 2017-01-30T17:02:24.000Z | 2017-04-22T04:20:41.000Z | src/generate_test_data.cpp | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | null | null | null | src/generate_test_data.cpp | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | null | null | null | /******************************************************************************
* Copyright (C) 2017 *
* Raphael Hiesgen <raphael.hiesgen (at) haw-hamburg.de> *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
******************************************************************************/
#include <random>
#include <iostream>
#include "caf/all.hpp"
using namespace std;
using namespace caf;
class config : public actor_system_config {
public:
size_t from = 0;
size_t to = std::numeric_limits<uint16_t>::max();
size_t amount = 268500000;
string separator = "\n";
config() {
opt_group{custom_options_, "global"}
.add(from, "from,f", "set minimum value (default: 0)")
.add(to, "to,t", "set maximum value (default: max_value<uint32>)")
.add(amount, "amount,a", "set number of values (default: 268 500 000)")
.add(separator, "separator,s", "separator between numbers (default: \\n)");
}
};
int main(int argc, char** argv) {
config cfg;
// read CLI options
cfg.parse(argc, argv);
// return immediately if a help text was printed
if (cfg.cli_helptext_printed)
return 0;
std::mt19937 rng;
rng.seed(std::random_device()());
std::uniform_int_distribution<uint32_t> dist(cfg.from,cfg.to);
vector<uint32_t> values(cfg.amount);
auto& sep = cfg.separator;
for (size_t i = 0; i < cfg.amount; ++i) {
cout << dist(rng);
if (i < cfg.amount - 1) {
cout << sep;
}
}
cout << endl;
}
| 33.928571 | 80 | 0.497368 | [
"vector"
] |
df5a91949474c1e8a2035dc5f0533ef15c2f51ad | 474 | cpp | C++ | tests/ClassTest.cpp | jeffreyhunter77/cpp-objects | 5c6bad7ba2f860e8744318d1d84c590e119a686a | [
"MIT"
] | null | null | null | tests/ClassTest.cpp | jeffreyhunter77/cpp-objects | 5c6bad7ba2f860e8744318d1d84c590e119a686a | [
"MIT"
] | null | null | null | tests/ClassTest.cpp | jeffreyhunter77/cpp-objects | 5c6bad7ba2f860e8744318d1d84c590e119a686a | [
"MIT"
] | null | null | null | #include <Class.hpp>
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <string.h>
using namespace Objects;
TEST_CASE("Class.name", "[Class]") {
const char* name = "[test]";
Class c(name);
SECTION("returns the Class name") {
REQUIRE( strcmp(c.name(), name) == 0 );
}
}
TEST_CASE("Class.classInfo", "[Class]") {
Class c("[test]");
SECTION("returns the Class class info object") {
REQUIRE( strcmp(c.classInfo().name(), "Class") == 0 );
}
}
| 16.928571 | 58 | 0.622363 | [
"object"
] |
df76371871c5252eae39a3b79c6b4c0cb7923c83 | 1,774 | cc | C++ | ns-allinone-2.35/ns-2.35/link/hackloss.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2020-05-29T13:04:42.000Z | 2020-05-29T13:04:42.000Z | ns-allinone-2.35/ns-2.35/link/hackloss.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2019-01-20T17:35:23.000Z | 2019-01-22T21:41:38.000Z | ns-allinone-2.35/ns-2.35/link/hackloss.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2021-09-29T16:06:57.000Z | 2021-09-29T16:06:57.000Z | /* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /cvsroot/nsnam/ns-2/link/hackloss.cc,v 1.6 2000/09/01 03:04:05 haoboy Exp $";
#endif
#include "connector.h"
#include "packet.h"
#include "queue.h"
class HackLossyLink : public Connector {
public:
HackLossyLink() : down_(0), src_(0), dst_(0), fid_(0), ctr_(0), nth_(0){
}
protected:
int command(int argc, const char*const* argv);
void recv(Packet* p, Handler* h);
NsObject* down_;
int src_, dst_, fid_;
int ctr_, nth_;
};
static class HackLossyLinkClass : public TclClass {
public:
HackLossyLinkClass() : TclClass("HackLossyLink") {}
TclObject* create(int, const char*const*) {
return (new HackLossyLink);
}
} class_dynamic_link;
int HackLossyLink::command(int argc, const char*const* argv)
{
if (strcmp(argv[1], "down-target") == 0) {
NsObject* p = (NsObject*)TclObject::lookup(argv[2]);
if (p == 0) {
Tcl::instance().resultf("no object %s", argv[2]);
return TCL_ERROR;
}
down_ = p;
return TCL_OK;
}
if (strcmp(argv[1], "show-params") == 0) {
Tcl::instance().resultf("src_ = %d, dst_ = %d, fid_ = %d, nth_ = %d",
src_, dst_, fid_, nth_);
return TCL_OK;
}
if (strcmp(argv[1], "set-params") == 0) {
src_ = atoi(argv[2]);
dst_ = atoi(argv[3]);
fid_ = atoi(argv[4]);
return TCL_OK;
}
if (strcmp(argv[1], "nth") == 0) {
nth_ = atoi(argv[2]);
return TCL_OK;
}
return Connector::command(argc, argv);
}
void HackLossyLink::recv(Packet* p, Handler* h)
{
hdr_ip* iph = hdr_ip::access(p);
if (nth_ && (iph->flowid() == fid_) &&
(iph->saddr() == src_) && (iph->daddr() == dst_) &&
((++ctr_ % nth_) == 0))
down_->recv(p); // XXX Why no handler?
else
target_->recv(p, h);
}
| 24.638889 | 93 | 0.618377 | [
"object"
] |
df7a65a24127668f93b4d231e5af6fdf41ed97cf | 14,977 | cpp | C++ | lib/integrate.cpp | c-vigo/mudirac | 86c71f6ec25c8328ac7c32abde21c240f41f73e2 | [
"MIT"
] | 3 | 2021-03-04T09:17:20.000Z | 2022-03-03T04:13:16.000Z | lib/integrate.cpp | c-vigo/mudirac | 86c71f6ec25c8328ac7c32abde21c240f41f73e2 | [
"MIT"
] | null | null | null | lib/integrate.cpp | c-vigo/mudirac | 86c71f6ec25c8328ac7c32abde21c240f41f73e2 | [
"MIT"
] | 2 | 2022-03-11T10:29:16.000Z | 2022-03-25T16:05:47.000Z | /**
* MuDirac - A muonic atom Dirac equation solver
* by Simone Sturniolo (2019-2020)
*
* integrate.cpp
*
* Routines for integrating differential equations with the shooting method
*
* @author Simone Sturniolo
* @version 1.0 20/03/2020
*/
#include "integrate.hpp"
// Exceptions
TurningPointError::TurningPointError(TPEType t)
{
type = t;
switch (type)
{
case RMIN_BIG:
msg = "Range for integration does not include turning point (r_min > r_turn)";
break;
case RMAX_SMALL:
msg = "Range for integration does not include turning point (r_max < r_turn)";
break;
default:
msg = "Unknown turning point error";
break;
}
}
/**
* @brief Integrate a function with the trapezoidal rule
* @note Perform a trapezoidal rule integration of function y over range x:
*
* I = sum_i (y[i]+y[i-1])/2*(x[i]-x[i-1])
*
* @param x: x axis values
* @param y: function values
* @retval Integral
*/
double trapzInt(vector<double> x, vector<double> y)
{
int N = y.size();
double ans = 0.0;
if (x.size() != N)
{
throw invalid_argument("Invalid size for arrays passed to trapzInt");
}
for (int i = 1; i < N; ++i)
{
ans += (y[i] + y[i - 1]) / 2.0 * (x[i] - x[i - 1]);
}
return ans;
}
/**
* @brief Integrate a function with the trapezoidal rule
* @note Perform a trapezoidal rule integration of function y with step dx:
*
* I = sum_i (y[i]+y[i-1])/2*dx
*
* @param dx: x step
* @param y: function values
* @retval Integral
*/
double trapzInt(double dx, vector<double> y)
{
int N = y.size();
double ans = 0.0;
for (int i = 1; i < N; ++i)
{
ans += (y[i] + y[i - 1]) / 2.0 * dx;
}
return ans;
}
/**
* @brief A single Runge-Kutta step
* @note Perform a single Runge-Kutta integration step for methods like shootRungeKutta, for
* a differential equation of the form:
*
* Q' = A*Q+B
*
* @param Q0: Value of the function at step i
* @param A0: Value of A at step i
* @param A1: Value of A at step i+1
* @param B0: Value of B at step i
* @param B1: Value of B at step i+1
* @param h: Integration step
* @param step: Direction of integration (1 or -1)
* @retval Value of the function at i+1
*/
double stepRungeKutta(double Q0, double A0, double A1, double B0, double B1, double h, int step)
{
double Amid, Bmid;
double k1, k2, k3, k4;
Amid = (A0+A1)/2.0;
Bmid = (B0+B1)/2.0;
k1 = (A0 * Q0 + B0) * h * step;
k2 = (Amid * (Q0 + k1 / 2) + Bmid) * h * step;
k3 = (Amid * (Q0 + k2 / 2) + Bmid) * h * step;
k4 = (A1 * (Q0 + k3) + B1) * h * step;
return Q0 + 1.0 / 6.0 * (k1 + 2 * k2 + 2 * k3 + k4);
}
/**
* @brief Integrate a single ODE
* @note Integrate one differential equation of the form:
*
* Q' = A*Q+B
*
* with a fourth order Runge-Kutta method, up to a given index, either forward or backwards.
*
* @param &Q: Vector for Q. Will return the integrated values, must contain already the first two as boundary conditions.
* @param A: Vector for A (see definition above). Same size as Q.
* @param B: Vector for B.
* @param h: Integration step (default = 1).
* @param stop_i: Index to stop integration. Run the whole range if -1 (default = -1).
* @param dir: Integration direction, either forward 'f' or backwards 'b' (default = 'f').
* @retval None
*/
void shootRungeKutta(vector<double> &Q, vector<double> A, vector<double> B, double h, int stop_i, char dir)
{
int N = Q.size();
int step = (dir == 'f') ? 1 : -1;
int from_i = (step == 1) ? 1 : N - 2;
// First, check size
if (A.size() != N || B.size() != N)
{
throw invalid_argument("Invalid size for one or more arrays passed to shootQ");
}
if (stop_i == -1)
{
stop_i = (step == 1) ? N - 1 : 0;
}
for (int i = from_i; step * (i - stop_i) <= 0; i += step)
{
Q[i] = stepRungeKutta(Q[i-step], A[i-step], A[i], B[i-step], B[i], h, step);
}
return;
}
/**
* @brief Integrate two coupled ODEs
* @note Integrate a system of coupled differential equations of the form:
*
* Q' = AA*Q+AB*P
* P' = BA*Q+BB*P
*
* with a second order shooting method, up to a given index, either forward or backwards.
*
* @param &Q: Vector for Q. Will return the integrated values, must contain already the first two as boundary conditions.
* @param &P: Vector for P. Will return the integrated values, must contain already the first two as boundary conditions.
* @param AA: Vector for AA (see definition above). Same size as Q and P.
* @param AB: Vector for AB.
* @param BA: Vector for BA.
* @param BB: Vector for BB.
* @param h: Integration step (default = 1).
* @param stop_i: Index to stop integration. Run the whole range if -1 (default = -1).
* @param dir: Integration direction, either forward 'f' or backwards 'b' (default = 'f').
* @retval None
*/
void shootQP(vector<double> &Q, vector<double> &P, vector<double> AA, vector<double> AB, vector<double> BA, vector<double> BB,
double h, int stop_i, char dir)
{
int N = Q.size();
int step = (dir == 'f') ? 1 : -1;
int from_i = (step == 1) ? 1 : N - 2;
double QA, QB, QC, PA, PB, PC;
double Qp, Pp;
double AAmid, ABmid, BAmid, BBmid;
double k1A, k1B, k2A, k2B, k3A, k3B, k4A, k4B;
// First, check size
if (P.size() != N || AA.size() != N || AB.size() != N || BA.size() != N || BB.size() != N)
{
throw invalid_argument("Invalid size for one or more arrays passed to shootQP");
}
if (stop_i == -1)
{
stop_i = (step == 1) ? N - 1 : 0;
}
for (int i = from_i; step * (i - stop_i) <= 0; i += step)
{
AAmid = (AA[i] + AA[i - step]) / 2;
ABmid = (AB[i] + AB[i - step]) / 2;
BAmid = (BA[i] + BA[i - step]) / 2;
BBmid = (BB[i] + BB[i - step]) / 2;
Pp = P[i - step];
Qp = Q[i - step];
k1A = (AA[i - step] * Qp + AB[i - step] * Pp) * h * step;
k1B = (BA[i - step] * Qp + BB[i - step] * Pp) * h * step;
k2A = (AAmid * (Qp + k1A / 2.0) + ABmid * (Pp + k1B / 2.0)) * h * step;
k2B = (BAmid * (Qp + k1A / 2.0) + BBmid * (Pp + k1B / 2.0)) * h * step;
k3A = (AAmid * (Qp + k2A / 2.0) + ABmid * (Pp + k2B / 2.0)) * h * step;
k3B = (BAmid * (Qp + k2A / 2.0) + BBmid * (Pp + k2B / 2.0)) * h * step;
k4A = (AA[i] * (Qp + k3A) + AB[i] * (Pp + k3B)) * h * step;
k4B = (BA[i] * (Qp + k3A) + BB[i] * (Pp + k3B)) * h * step;
Q[i] = Qp + 1.0 / 6.0 * (k1A + 2 * k2A + 2 * k3A + k4A);
P[i] = Pp + 1.0 / 6.0 * (k1B + 2 * k2B + 2 * k3B + k4B);
}
return;
}
/**
* @brief Integrate a single 2nd order ODE with Numerov's method
* @note Integrate one differential equation of the form:
*
* Q'' = A*Q+B
*
* with Numerov's method, up to a given index, either forward or backwards.
*
* @param &Q: Vector for Q. Will return the integrated values, must contain already the first two as boundary conditions.
* @param A: Vector for A (see definition above). Same size as Q.
* @param B: Vector for B.
* @param h: Integration step (default = 1).
* @param stop_i: Index to stop integration. Run the whole range if -1 (default = -1).
* @param dir: Integration direction, either forward 'f' or backwards 'b' (default = 'f').
* @retval None
*/
void shootNumerov(vector<double> &Q, vector<double> A, vector<double> B, double h, int stop_i, char dir)
{
int N = Q.size();
int step = (dir == 'f') ? 1 : -1;
int from_i = (step == 1) ? 2 : N - 3;
double h2_12 = h * h / 12;
double QA0, QA1, QA2, QB;
// First, check size
if (A.size() != N || B.size() != N)
{
throw invalid_argument("Invalid size for one or more arrays passed to shootNumerov");
}
if (stop_i == -1)
{
stop_i = (step == 1) ? N - 1 : 0;
}
for (int i = from_i; step * (i - stop_i) <= 0; i += step)
{
QA0 = (1 - h2_12 * A[i]);
QA1 = (1 + 5 * h2_12 * A[i - step]);
QA2 = (1 - h2_12 * A[i - 2 * step]);
QB = h2_12 * (B[i] + 10 * B[i - step] + B[i - 2 * step]);
Q[i] = (2 * Q[i - step] * QA1 - Q[i - 2 * step] * QA2 + QB) / QA0;
}
return;
}
/**
* @brief Integrate a Coulomb potential from a radial background charge density on a logarithmic grid
* @note Integrate a Coulomb potential from a radial background charge density on a logarithmic grid.
* The following ODE is integrated:
*
* V'' + V' = rho(x)
*
* with the derivatives being in x (r = r0*exp(x)) and the density being already integrated over the angular
* coordinates (so for example a constant density would have rho ~ r^2).
* @param &V: Vector for V. Will return the integrated potential.
* @param rho: Vector for the charge density.
* @param h: Integration step (default = 1)
* @retval None
*/
void shootPotentialLog(vector<double> &V, vector<double> rho, double h)
{
int N = V.size();
double h2 = h * h;
double A0, A1, A2, A3;
A0 = (2 / h2 + 11 / (6.0 * h));
A1 = (-5 / h2 - 3 / h);
A2 = (4 / h2 + 1.5 / h);
A3 = (-1 / h2 + -1 / (3 * h));
// Constant charge assumption
V[0] = rho[0] / 6;
V[1] = (rho[1] - V[0] * (A1 + A2 * exp(-2 * h) + A3 * exp(-4 * h))) / A0;
V[2] = (rho[1] - V[1] * A1 - V[0] * (A2 + A3 * exp(-2 * h))) / A0;
for (int i = 3; i < N; ++i)
{
V[i] = (rho[i] - V[i - 1] * A1 - V[i - 2] * A2 - V[i - 3] * A3) / A0;
}
}
/**
* @brief Integrate the radial Dirac equation on a logarithmic grid
* @note Perform integration of the radial Dirac equation on a logarithmic grid, forward and backwards, up to the turning point.
* The coupled equations have the form:
*
* Q' = k/r*Q+[mc-(E-V)/c]*P
* P' = -k/r*P+[mc+(E-V)/c]*Q
*
* With k the quantum number: if j=|l+s|, then k = -(j+1/2)*sign(j-l), and E the expected energy (including the rest mass term).
* The function will return a struct containing the index of the 'turning point', where the forward and backwards integration meet,
* as well as the values of Q and P integrated forward (Qi, Pi) and backwards (Qe, Pe) at it.
*
* @param &Q: Vector for Q. Will return the integrated values, must contain already the first and last two as boundary conditions.
* @param &P: Vector for P. Will return the integrated values, must contain already the first and last two as boundary conditions.
* @param r: Radial (logarithmic) grid
* @param V: Potential
* @param E: Energy (binding + mc^2)
* @param k: Quantum number (default = -1)
* @param m: Mass of the particle (default = 1)
* @param dx: Integration step (default = 1)
* @retval turn_i: Turning point index
*/
TurningPoint shootDiracLog(vector<double> &Q, vector<double> &P, vector<double> r, vector<double> V,
double E, int k, double m, double dx)
{
int N = Q.size(), turn_i;
double B; // Binding energy
TurningPoint out;
vector<double> AA(N), AB(N), BA(N), BB(N); // Define the equation
// Check size
if (P.size() != N || r.size() != N || V.size() != N)
{
throw invalid_argument("Invalid size for one or more arrays passed to shootDiracLog");
}
B = E - m * pow(Physical::c, 2);
// Find the turning point
for (turn_i = 0; turn_i < V.size(); ++turn_i)
{
if (V[turn_i] > B)
break;
}
if (turn_i >= V.size() - 1)
{
LOG(ERROR) << "Turning point not included in range: r_max too small\n";
// Turning point not included in range
throw TurningPointError(TurningPointError::TPEType::RMAX_SMALL);
}
else if (turn_i == 0)
{
LOG(ERROR) << "Turning point not included in range: r_min too big\n";
// Turning point not included in range
throw TurningPointError(TurningPointError::TPEType::RMIN_BIG);
}
// Now define the other arrays
for (int i = 0; i < N; ++i)
{
AA[i] = k;
AB[i] = -r[i] * (B - V[i]) * Physical::alpha;
BB[i] = -k;
BA[i] = r[i] * ((B - V[i]) * Physical::alpha + 2 * m * Physical::c);
}
// Integrate forward
shootQP(Q, P, AA, AB, BA, BB, dx, turn_i + 1);
out.Qi = Q[turn_i];
out.Pi = P[turn_i];
// Integrate backwards
shootQP(Q, P, AA, AB, BA, BB, dx, turn_i, 'b');
out.Qe = Q[turn_i];
out.Pe = P[turn_i];
out.i = turn_i;
return out;
}
/**
* @brief Integrate d/dE (Q/P) for a Dirac wavefunction based on a Coulomb potential
* @note Integrate zeta = d/dE (Q/P) for a Dirac wavefunction based on a Coulomb potential.
* Zeta is used to find the optimal energy correction at each step when converging a solution.
*
* @param &zeta: Vector for zeta. Will return the integrated values, must contain already the first and last two as boundary conditions.
* @param y: Vector containing values of Q/P.
* @param r: Radial (logarithmic) grid
* @param V: Potential
* @param turn_i: Index of the turning point. Will mark the stop of the integration.
* @param E: Energy (binding + mc^2)
* @param k: Quantum number (default = -1)
* @param m: Mass of the particle (default = 1)
* @param dx: Integration step (default = 1)
* @param dir: Integration direction, either forward 'f' or backwards 'b' (default = 'f').
* @retval None
*/
void shootDiracErrorDELog(vector<double> &zeta, vector<double> y, vector<double> r, vector<double> V, int turn_i,
double E, int k, double m, double dx, char dir)
{
int N = zeta.size();
int step = (dir == 'f') ? 1 : -1;
int from_i = (step == 1) ? 1 : N - 2;
double mc = m * Physical::c;
double g, A0, A1, B0, B1, y02, y12;
// Check size
if (y.size() != N || r.size() != N || V.size() != N)
{
throw invalid_argument("Invalid size for one or more arrays passed to shootDiracErrorDELog");
}
for (int i = from_i; step * (i - turn_i) <= 0; i += step)
{
if (abs(y[i]) < Physical::alpha || zeta[i-step] == 0) {
g = (mc + (E - V[i]) * Physical::alpha);
A0 = 2*(k-g*r[i-step]*y[i-step]);
A1 = 2*(k-g*r[i]*y[i]);
B0 = -r[i-step]*(1+pow(y[i-step], 2))*Physical::alpha;
B1 = -r[i]*(1+pow(y[i], 2))*Physical::alpha;
zeta[i] = stepRungeKutta(zeta[i-step], A0, A1, B0, B1, dx, step);
}
else {
g = (mc - (E - V[i]) * Physical::alpha);
y02 = pow(y[i-step], 2);
y12 = pow(y[i], 2);
A0 = -2*(k+g*r[i-step]/y[i-step]);
A1 = -2*(k+g*r[i]/y[i]);
B0 = r[i-step]*(1+1/y02)*Physical::alpha;
B1 = r[i]*(1+1/y12)*Physical::alpha;
zeta[i] = -y12*stepRungeKutta(-zeta[i-step]/y02, A0, A1, B0, B1, dx, step);
}
}
} | 33.580717 | 139 | 0.560126 | [
"vector"
] |
df81f40c0fd7817b90a95e733610be35ea50d31b | 3,174 | cc | C++ | testing/variable_storage/ErrTemperature.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | testing/variable_storage/ErrTemperature.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | testing/variable_storage/ErrTemperature.cc | pgmaginot/DARK_ARTS | f04b0a30dcac911ef06fe0916921020826f5c42b | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include "Input_Reader.h"
#include "Err_Temperature.h"
#include "Dark_Arts_Exception.h"
int main(int argc, char** argv)
{
int val = 0;
const double tol = 1.0E-6;
const int n_p = 3;
Err_Temperature test_err(n_p);
Eigen::VectorXd dummy_vec;
try{
if( abs(test_err.get_cell_with_worst_err() - (-1) ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Initialized with wrong cell");
if( abs(test_err.get_element_with_worst_err() - (-1) ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Initialized with wrong element");
if( fabs(test_err.get_worst_err() ) > tol )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Initialized with wrong error");
test_err.get_big_delta(dummy_vec);
for(int el = 0; el < n_p ; el++)
{
if( fabs(dummy_vec(el) ) > tol)
throw Dark_Arts_Exception(SUPPORT_OBJECT , "Wrong big delta initialized");
}
const int cell = 3;
const int element = 2;
const double err = 2.75;
dummy_vec = Eigen::VectorXd::Zero(n_p);
dummy_vec(0) = -1.2;
dummy_vec(1) = 2.1;
dummy_vec(2) = 0.5;
test_err.set_error(cell,element,err,dummy_vec);
if( abs(test_err.get_cell_with_worst_err() - cell ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Saved with wrong cell");
if( abs(test_err.get_element_with_worst_err() - element ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Saved with wrong element");
if( fabs(test_err.get_worst_err() - err ) > tol )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Saved with wrong error");
Eigen::VectorXd delta_vec;
test_err.get_big_delta(delta_vec);
for(int el = 0; el < n_p ; el++)
{
if( fabs(delta_vec(el) - dummy_vec(el) ) > tol)
throw Dark_Arts_Exception(SUPPORT_OBJECT , "Wrong big delta returned");
}
test_err.clear();
if( abs(test_err.get_cell_with_worst_err() - (-1) ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Cleared with wrong cell");
if( abs(test_err.get_element_with_worst_err() - (-1) ) > 0 )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Cleared with wrong element");
if( fabs(test_err.get_worst_err() ) > tol )
throw Dark_Arts_Exception( SUPPORT_OBJECT , "Cleared with wrong error");
test_err.get_big_delta(dummy_vec);
for(int el = 0; el < n_p ; el++)
{
if( fabs(dummy_vec(el) ) > tol)
throw Dark_Arts_Exception(SUPPORT_OBJECT , "Wrong big delta cleared");
}
const double small_number = 3.0E-8;
test_err.set_small_number(small_number);
if( fabs( (test_err.get_small_number() - small_number)/small_number ) > tol)
throw Dark_Arts_Exception(SUPPORT_OBJECT , "Not setting/getting Err_Temperature small_number_correctly");
}
catch(const Dark_Arts_Exception& da_exception )
{
da_exception.testing_message();
val = -1;
}
// Return 0 if tests passed, somethnig else if failing
return val;
}
| 32.060606 | 112 | 0.636736 | [
"vector"
] |
df88305a581048406d38732b669a45ae9aacf278 | 23,799 | cpp | C++ | src/lua/functions/core/game/global_functions.cpp | Waclaw-I/BagnoOTS | dbeb04322698ecdb795eba196872815b36ca134f | [
"MIT"
] | null | null | null | src/lua/functions/core/game/global_functions.cpp | Waclaw-I/BagnoOTS | dbeb04322698ecdb795eba196872815b36ca134f | [
"MIT"
] | null | null | null | src/lua/functions/core/game/global_functions.cpp | Waclaw-I/BagnoOTS | dbeb04322698ecdb795eba196872815b36ca134f | [
"MIT"
] | null | null | null | /**
* Canary - A free and open-source MMORPG server emulator
* Copyright (C) 2021 OpenTibiaBR <opentibiabr@outlook.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "otpch.h"
#include <boost/range/adaptor/reversed.hpp>
#include "creatures/interactions/chat.h"
#include "game/game.h"
#include "game/scheduling/scheduler.h"
#include "lua/functions/core/game/global_functions.hpp"
#include "lua/scripts/lua_environment.hpp"
#include "lua/scripts/script_environment.hpp"
#include "server/network/protocol/protocolstatus.h"
class Creature;
int GlobalFunctions::luaDoPlayerAddItem(lua_State* L) {
// doPlayerAddItem(cid, itemid, <optional: default: 1> count/subtype, <optional: default: 1> canDropOnMap)
// doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype)
Player* player = getPlayer(L, 1);
if (!player) {
reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint16_t itemId = getNumber<uint16_t>(L, 2);
int32_t count = getNumber<int32_t>(L, 3, 1);
bool canDropOnMap = getBoolean(L, 4, true);
uint16_t subType = getNumber<uint16_t>(L, 5, 1);
const ItemType& it = Item::items[itemId];
int32_t itemCount;
auto parameters = lua_gettop(L);
if (parameters > 4) {
// subtype already supplied, count then is the amount
itemCount = std::max<int32_t>(1, count);
} else if (it.hasSubType()) {
if (it.stackable) {
itemCount = static_cast<int32_t>(std::ceil(static_cast<float>(count) / 100));
} else {
itemCount = 1;
}
subType = count;
} else {
itemCount = std::max<int32_t>(1, count);
}
while (itemCount > 0) {
uint16_t stackCount = subType;
if (it.stackable && stackCount > 100) {
stackCount = 100;
}
Item* newItem = Item::CreateItem(itemId, stackCount);
if (!newItem) {
reportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
if (it.stackable) {
subType -= stackCount;
}
ReturnValue ret = g_game().internalPlayerAddItem(player, newItem, canDropOnMap);
if (ret != RETURNVALUE_NOERROR) {
delete newItem;
pushBoolean(L, false);
return 1;
}
if (--itemCount == 0) {
if (newItem->getParent()) {
uint32_t uid = getScriptEnv()->addThing(newItem);
lua_pushnumber(L, uid);
return 1;
} else {
// stackable item stacked with existing object, newItem will be released
pushBoolean(L, false);
return 1;
}
}
}
pushBoolean(L, false);
return 1;
}
int GlobalFunctions::luaDoSetCreatureLight(lua_State* L) {
// doSetCreatureLight(cid, lightLevel, lightColor, time)
Creature* creature = getCreature(L, 1);
if (!creature) {
reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint16_t level = getNumber<uint16_t>(L, 2);
uint16_t color = getNumber<uint16_t>(L, 3);
uint32_t time = getNumber<uint32_t>(L, 4);
Condition* condition = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_LIGHT, time, level | (color << 8));
creature->addCondition(condition);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaIsValidUID(lua_State* L) {
// isValidUID(uid)
pushBoolean(L, getScriptEnv()->getThingByUID(getNumber<uint32_t>(L, -1)) != nullptr);
return 1;
}
int GlobalFunctions::luaIsDepot(lua_State* L) {
// isDepot(uid)
Container* container = getScriptEnv()->getContainerByUID(getNumber<uint32_t>(L, -1));
pushBoolean(L, container && container->getDepotLocker());
return 1;
}
int GlobalFunctions::luaIsMoveable(lua_State* L) {
// isMoveable(uid)
// isMovable(uid)
Thing* thing = getScriptEnv()->getThingByUID(getNumber<uint32_t>(L, -1));
pushBoolean(L, thing && thing->isPushable());
return 1;
}
int GlobalFunctions::luaDoAddContainerItem(lua_State* L) {
// doAddContainerItem(uid, itemid, <optional> count/subtype)
uint32_t uid = getNumber<uint32_t>(L, 1);
ScriptEnvironment* env = getScriptEnv();
Container* container = env->getContainerByUID(uid);
if (!container) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint16_t itemId = getNumber<uint16_t>(L, 2);
const ItemType& it = Item::items[itemId];
int32_t itemCount = 1;
int32_t subType = 1;
uint32_t count = getNumber<uint32_t>(L, 3, 1);
if (it.hasSubType()) {
if (it.stackable) {
itemCount = static_cast<int32_t>(std::ceil(static_cast<float>(count) / 100));
}
subType = count;
} else {
itemCount = std::max<int32_t>(1, count);
}
while (itemCount > 0) {
int32_t stackCount = std::min<int32_t>(100, subType);
Item* newItem = Item::CreateItem(itemId, stackCount);
if (!newItem) {
reportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
if (it.stackable) {
subType -= stackCount;
}
ReturnValue ret = g_game().internalAddItem(container, newItem);
if (ret != RETURNVALUE_NOERROR) {
delete newItem;
pushBoolean(L, false);
return 1;
}
if (--itemCount == 0) {
if (newItem->getParent()) {
lua_pushnumber(L, env->addThing(newItem));
} else {
// stackable item stacked with existing object, newItem will be released
pushBoolean(L, false);
}
return 1;
}
}
pushBoolean(L, false);
return 1;
}
int GlobalFunctions::luaGetDepotId(lua_State* L) {
// getDepotId(uid)
uint32_t uid = getNumber<uint32_t>(L, -1);
Container* container = getScriptEnv()->getContainerByUID(uid);
if (!container) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CONTAINER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
DepotLocker* depotLocker = container->getDepotLocker();
if (!depotLocker) {
reportErrorFunc("Depot not found");
pushBoolean(L, false);
return 1;
}
lua_pushnumber(L, depotLocker->getDepotId());
return 1;
}
int GlobalFunctions::luaGetWorldTime(lua_State* L) {
// getWorldTime()
uint32_t time = g_game().getLightHour();
lua_pushnumber(L, time);
return 1;
}
int GlobalFunctions::luaGetWorldLight(lua_State* L) {
// getWorldLight()
LightInfo lightInfo = g_game().getWorldLightInfo();
lua_pushnumber(L, lightInfo.level);
lua_pushnumber(L, lightInfo.color);
return 2;
}
int GlobalFunctions::luaGetWorldUpTime(lua_State* L) {
// getWorldUpTime()
uint64_t uptime = (OTSYS_TIME() - ProtocolStatus::start) / 1000;
lua_pushnumber(L, uptime);
return 1;
}
int GlobalFunctions::luaCreateCombatArea(lua_State* L) {
// createCombatArea( {area}, <optional> {extArea} )
ScriptEnvironment* env = getScriptEnv();
if (env->getScriptId() != EVENT_ID_LOADING) {
reportErrorFunc("This function can only be used while loading the script.");
pushBoolean(L, false);
return 1;
}
uint32_t areaId = g_luaEnvironment.createAreaObject(env->getScriptInterface());
AreaCombat* area = g_luaEnvironment.getAreaObject(areaId);
int parameters = lua_gettop(L);
if (parameters >= 2) {
uint32_t rowsExtArea;
std::list<uint32_t> listExtArea;
if (!isTable(L, 2) || !getArea(L, listExtArea, rowsExtArea)) {
reportErrorFunc("Invalid extended area table.");
pushBoolean(L, false);
return 1;
}
area->setupExtArea(listExtArea, rowsExtArea);
}
uint32_t rowsArea = 0;
std::list<uint32_t> listArea;
if (!isTable(L, 1) || !getArea(L, listArea, rowsArea)) {
reportErrorFunc("Invalid area table.");
pushBoolean(L, false);
return 1;
}
area->setupArea(listArea, rowsArea);
lua_pushnumber(L, areaId);
return 1;
}
int GlobalFunctions::luaDoAreaCombatHealth(lua_State* L) {
// doAreaCombatHealth(cid, type, pos, area, min, max, effect[, origin = ORIGIN_SPELL])
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint32_t areaId = getNumber<uint32_t>(L, 4);
const AreaCombat* area = g_luaEnvironment.getAreaObject(areaId);
if (area || areaId == 0) {
CombatType_t combatType = getNumber<CombatType_t>(L, 2);
CombatParams params;
params.combatType = combatType;
params.impactEffect = getNumber<uint8_t>(L, 7);
CombatDamage damage;
damage.origin = getNumber<CombatOrigin>(L, 8, ORIGIN_SPELL);
damage.primary.type = combatType;
damage.primary.value = normal_random(getNumber<int32_t>(L, 6), getNumber<int32_t>(L, 5));
Combat::doCombatHealth(creature, getPosition(L, 3), area, damage, params);
pushBoolean(L, true);
} else {
reportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));
pushBoolean(L, false);
}
return 1;
}
int GlobalFunctions::luaDoTargetCombatHealth(lua_State* L) {
// doTargetCombatHealth(cid, target, type, min, max, effect[, origin = ORIGIN_SPELL])
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Creature* target = getCreature(L, 2);
if (!target) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
CombatType_t combatType = getNumber<CombatType_t>(L, 3);
CombatParams params;
params.combatType = combatType;
params.impactEffect = getNumber<uint8_t>(L, 6);
CombatDamage damage;
damage.origin = getNumber<CombatOrigin>(L, 7, ORIGIN_SPELL);
damage.primary.type = combatType;
damage.primary.value = normal_random(getNumber<int32_t>(L, 4), getNumber<int32_t>(L, 5));
// Check if it's a healing then we sould add the non-aggresive tag
if (combatType == COMBAT_HEALING ||
(combatType == COMBAT_MANADRAIN && damage.primary.value > 0)) {
params.aggressive = false;
}
Combat::doCombatHealth(creature, target, damage, params);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaDoAreaCombatMana(lua_State* L) {
// doAreaCombatMana(cid, pos, area, min, max, effect[, origin = ORIGIN_SPELL])
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint32_t areaId = getNumber<uint32_t>(L, 3);
const AreaCombat* area = g_luaEnvironment.getAreaObject(areaId);
if (area || areaId == 0) {
CombatParams params;
params.impactEffect = getNumber<uint8_t>(L, 6);
CombatDamage damage;
damage.origin = getNumber<CombatOrigin>(L, 7, ORIGIN_SPELL);
damage.primary.type = COMBAT_MANADRAIN;
damage.primary.value = normal_random(getNumber<int32_t>(L, 4), getNumber<int32_t>(L, 5));
Position pos = getPosition(L, 2);
Combat::doCombatMana(creature, pos, area, damage, params);
pushBoolean(L, true);
} else {
reportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));
pushBoolean(L, false);
}
return 1;
}
int GlobalFunctions::luaDoTargetCombatMana(lua_State* L) {
// doTargetCombatMana(cid, target, min, max, effect[, origin = ORIGIN_SPELL)
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Creature* target = getCreature(L, 2);
if (!target) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
CombatParams params;
params.impactEffect = getNumber<uint8_t>(L, 5);
CombatDamage damage;
damage.origin = getNumber<CombatOrigin>(L, 6, ORIGIN_SPELL);
damage.primary.type = COMBAT_MANADRAIN;
damage.primary.value = normal_random(getNumber<int32_t>(L, 3), getNumber<int32_t>(L, 4));
Combat::doCombatMana(creature, target, damage, params);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaDoAreaCombatCondition(lua_State* L) {
// doAreaCombatCondition(cid, pos, area, condition, effect)
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
const Condition* condition = getUserdata<Condition>(L, 4);
if (!condition) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint32_t areaId = getNumber<uint32_t>(L, 3);
const AreaCombat* area = g_luaEnvironment.getAreaObject(areaId);
if (area || areaId == 0) {
CombatParams params;
params.impactEffect = getNumber<uint8_t>(L, 5);
params.conditionList.emplace_front(condition);
Combat::doCombatCondition(creature, getPosition(L, 2), area, params);
pushBoolean(L, true);
} else {
reportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));
pushBoolean(L, false);
}
return 1;
}
int GlobalFunctions::luaDoTargetCombatCondition(lua_State* L) {
// doTargetCombatCondition(cid, target, condition, effect)
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Creature* target = getCreature(L, 2);
if (!target) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
const Condition* condition = getUserdata<Condition>(L, 3);
if (!condition) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CONDITION_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
CombatParams params;
params.impactEffect = getNumber<uint8_t>(L, 4);
params.conditionList.emplace_front(condition->clone());
Combat::doCombatCondition(creature, target, params);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaDoAreaCombatDispel(lua_State* L) {
// doAreaCombatDispel(cid, pos, area, type, effect)
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
uint32_t areaId = getNumber<uint32_t>(L, 3);
const AreaCombat* area = g_luaEnvironment.getAreaObject(areaId);
if (area || areaId == 0) {
CombatParams params;
params.impactEffect = getNumber<uint8_t>(L, 5);
params.dispelType = getNumber<ConditionType_t>(L, 4);
Combat::doCombatDispel(creature, getPosition(L, 2), area, params);
pushBoolean(L, true);
} else {
reportErrorFunc(getErrorDesc(LUA_ERROR_AREA_NOT_FOUND));
pushBoolean(L, false);
}
return 1;
}
int GlobalFunctions::luaDoTargetCombatDispel(lua_State* L) {
// doTargetCombatDispel(cid, target, type, effect)
Creature* creature = getCreature(L, 1);
if (!creature && (!isNumber(L, 1) || getNumber<uint32_t>(L, 1) != 0)) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Creature* target = getCreature(L, 2);
if (!target) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
CombatParams params;
params.dispelType = getNumber<ConditionType_t>(L, 3);
params.impactEffect = getNumber<uint8_t>(L, 4);
Combat::doCombatDispel(creature, target, params);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaDoChallengeCreature(lua_State* L) {
// doChallengeCreature(cid, target)
Creature* creature = getCreature(L, 1);
if (!creature) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Creature* target = getCreature(L, 2);
if (!target) {
reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
target->challengeCreature(creature);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaAddEvent(lua_State* L) {
// addEvent(callback, delay, ...)
lua_State* globalState = g_luaEnvironment.getLuaState();
if (!globalState) {
reportErrorFunc("No valid script interface!");
pushBoolean(L, false);
return 1;
} else if (globalState != L) {
lua_xmove(L, globalState, lua_gettop(L));
}
int parameters = lua_gettop(globalState);
if (!isFunction(globalState, -parameters)) { // -parameters means the first parameter from left to right
reportErrorFunc("callback parameter should be a function.");
pushBoolean(L, false);
return 1;
}
if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS) || g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS)) {
std::vector<std::pair<int32_t, LuaDataType>> indexes;
for (int i = 3; i <= parameters; ++i) {
if (lua_getmetatable(globalState, i) == 0) {
continue;
}
lua_rawgeti(L, -1, 't');
LuaDataType type = getNumber<LuaDataType>(L, -1);
if (type != LuaData_Unknown && type != LuaData_Tile) {
indexes.push_back({i, type});
}
lua_pop(globalState, 2);
}
if (!indexes.empty()) {
if (g_configManager().getBoolean(WARN_UNSAFE_SCRIPTS)) {
bool plural = indexes.size() > 1;
std::string warningString = "Argument";
if (plural) {
warningString += 's';
}
for (const auto& entry : indexes) {
if (entry == indexes.front()) {
warningString += ' ';
} else if (entry == indexes.back()) {
warningString += " and ";
} else {
warningString += ", ";
}
warningString += '#';
warningString += std::to_string(entry.first);
}
if (plural) {
warningString += " are unsafe";
} else {
warningString += " is unsafe";
}
reportErrorFunc(warningString);
}
if (g_configManager().getBoolean(CONVERT_UNSAFE_SCRIPTS)) {
for (const auto& entry : indexes) {
switch (entry.second) {
case LuaData_Item:
case LuaData_Container:
case LuaData_Teleport: {
lua_getglobal(globalState, "Item");
lua_getfield(globalState, -1, "getUniqueId");
break;
}
case LuaData_Player:
case LuaData_Monster:
case LuaData_Npc: {
lua_getglobal(globalState, "Creature");
lua_getfield(globalState, -1, "getId");
break;
}
default:
break;
}
lua_replace(globalState, -2);
lua_pushvalue(globalState, entry.first);
lua_call(globalState, 1, 1);
lua_replace(globalState, entry.first);
}
}
}
}
LuaTimerEventDesc eventDesc;
for (int i = 0; i < parameters - 2; ++i) { // -2 because addEvent needs at least two parameters
eventDesc.parameters.push_back(luaL_ref(globalState, LUA_REGISTRYINDEX));
}
uint32_t delay = std::max<uint32_t>(100, getNumber<uint32_t>(globalState, 2));
lua_pop(globalState, 1);
eventDesc.function = luaL_ref(globalState, LUA_REGISTRYINDEX);
eventDesc.scriptId = getScriptEnv()->getScriptId();
auto& lastTimerEventId = g_luaEnvironment.lastEventTimerId;
eventDesc.eventId = g_scheduler().addEvent(createSchedulerTask(
delay, std::bind(&LuaEnvironment::executeTimerEvent, &g_luaEnvironment, lastTimerEventId)
));
g_luaEnvironment.timerEvents.emplace(lastTimerEventId, std::move(eventDesc));
lua_pushnumber(L, lastTimerEventId++);
return 1;
}
int GlobalFunctions::luaStopEvent(lua_State* L) {
// stopEvent(eventid)
lua_State* globalState = g_luaEnvironment.getLuaState();
if (!globalState) {
reportErrorFunc("No valid script interface!");
pushBoolean(L, false);
return 1;
}
uint32_t eventId = getNumber<uint32_t>(L, 1);
auto& timerEvents = g_luaEnvironment.timerEvents;
auto it = timerEvents.find(eventId);
if (it == timerEvents.end()) {
pushBoolean(L, false);
return 1;
}
LuaTimerEventDesc timerEventDesc = std::move(it->second);
timerEvents.erase(it);
g_scheduler().stopEvent(timerEventDesc.eventId);
luaL_unref(globalState, LUA_REGISTRYINDEX, timerEventDesc.function);
for (auto parameter : timerEventDesc.parameters) {
luaL_unref(globalState, LUA_REGISTRYINDEX, parameter);
}
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaSaveServer(lua_State* L) {
g_game().saveGameState();
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaCleanMap(lua_State* L) {
lua_pushnumber(L, g_game().map.clean());
return 1;
}
int GlobalFunctions::luaDebugPrint(lua_State* L) {
// debugPrint(text)
reportErrorFunc(getString(L, -1));
return 0;
}
int GlobalFunctions::luaIsInWar(lua_State* L) {
// isInWar(cid, target)
Player* player = getPlayer(L, 1);
if (!player) {
reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
Player* targetPlayer = getPlayer(L, 2);
if (!targetPlayer) {
reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
pushBoolean(L, false);
return 1;
}
pushBoolean(L, player->isInWar(targetPlayer));
return 1;
}
int GlobalFunctions::luaGetWaypointPositionByName(lua_State* L) {
// getWaypointPositionByName(name)
auto& waypoints = g_game().map.waypoints;
auto it = waypoints.find(getString(L, -1));
if (it != waypoints.end()) {
pushPosition(L, it->second);
} else {
pushBoolean(L, false);
}
return 1;
}
int GlobalFunctions::luaSendChannelMessage(lua_State* L) {
// sendChannelMessage(channelId, type, message)
uint16_t channelId = getNumber<uint16_t>(L, 1);
const ChatChannel* channel = g_chat().getChannelById(channelId);
if (!channel) {
pushBoolean(L, false);
return 1;
}
SpeakClasses type = getNumber<SpeakClasses>(L, 2);
std::string message = getString(L, 3);
channel->sendToAll(message, type);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaSendGuildChannelMessage(lua_State* L) {
// sendGuildChannelMessage(guildId, type, message)
uint32_t guildId = getNumber<uint32_t>(L, 1);
const ChatChannel* channel = g_chat().getGuildChannelById(guildId);
if (!channel) {
pushBoolean(L, false);
return 1;
}
SpeakClasses type = getNumber<SpeakClasses>(L, 2);
std::string message = getString(L, 3);
channel->sendToAll(message, type);
pushBoolean(L, true);
return 1;
}
int GlobalFunctions::luaIsType(lua_State* L) {
// isType(derived, base)
lua_getmetatable(L, -2);
lua_getmetatable(L, -2);
lua_rawgeti(L, -2, 'p');
uint_fast8_t parentsB = getNumber<uint_fast8_t>(L, 1);
lua_rawgeti(L, -3, 'h');
size_t hashB = getNumber<size_t>(L, 1);
lua_rawgeti(L, -3, 'p');
uint_fast8_t parentsA = getNumber<uint_fast8_t>(L, 1);
for (uint_fast8_t i = parentsA; i < parentsB; ++i) {
lua_getfield(L, -3, "__index");
lua_replace(L, -4);
}
lua_rawgeti(L, -4, 'h');
size_t hashA = getNumber<size_t>(L, 1);
pushBoolean(L, hashA == hashB);
return 1;
}
int GlobalFunctions::luaRawGetMetatable(lua_State* L) {
// rawgetmetatable(metatableName)
luaL_getmetatable(L, getString(L, 1).c_str());
return 1;
}
int GlobalFunctions::luaCreateTable(lua_State* L) {
// createTable(arrayLength, keyLength)
lua_createtable(L, getNumber<int32_t>(L, 1), getNumber<int32_t>(L, 2));
return 1;
}
int GlobalFunctions::luaSystemTime(lua_State* L) {
// systemTime()
lua_pushnumber(L, OTSYS_TIME());
return 1;
}
bool GlobalFunctions::getArea(lua_State* L, std::list<uint32_t>& list, uint32_t& rows) {
lua_pushnil(L);
for (rows = 0; lua_next(L, -2) != 0; ++rows) {
if (!isTable(L, -1)) {
return false;
}
lua_pushnil(L);
while (lua_next(L, -2) != 0) {
if (!isNumber(L, -1)) {
return false;
}
list.push_back(getNumber<uint32_t>(L, -1));
lua_pop(L, 1);
}
lua_pop(L, 1);
}
lua_pop(L, 1);
return (rows != 0);
}
| 28.197867 | 130 | 0.706668 | [
"object",
"vector"
] |
df88695961ddf61fe70f5f2d0c6644c0430e8c26 | 5,585 | cpp | C++ | src/hlstate.cpp | fpereira1/nvui | 2bd38c0153ad09422b3bf1efc8788f181f4aba90 | [
"MIT"
] | null | null | null | src/hlstate.cpp | fpereira1/nvui | 2bd38c0153ad09422b3bf1efc8788f181f4aba90 | [
"MIT"
] | null | null | null | src/hlstate.cpp | fpereira1/nvui | 2bd38c0153ad09422b3bf1efc8788f181f4aba90 | [
"MIT"
] | null | null | null | #include "hlstate.hpp"
#include <cassert>
#include <iostream>
#include <sstream>
namespace hl
{
HLAttr hl_attr_from_object(const msgpack::object& obj)
{
assert(obj.type == msgpack::type::ARRAY);
const msgpack::object_array& arr = obj.via.array;
assert(arr.size == 4);
const int id = arr.ptr[0].as<int>();
assert(arr.ptr[1].type == msgpack::type::MAP);
const msgpack::object_map& opts = arr.ptr[1].via.map;
// We ignore arr.ptr[2] since that's the cterm_attr,
// we only use rgb_attr
HLAttr attr {id};
// Add options
for(std::uint32_t i = 0; i < opts.size; ++i)
{
const auto& kv = opts.ptr[i];
// Keys are strings, vals could be bools or ints
assert(kv.key.type == msgpack::type::STR);
const std::string k = kv.key.as<std::string>();
if (k == "foreground")
{
attr.foreground = Color(kv.val.as<std::uint32_t>());
}
else if (k == "background")
{
attr.background = Color(kv.val.as<std::uint32_t>());
}
else if (k == "reverse")
{
attr.reverse = true;
}
else if (k == "special")
{
attr.special = Color(kv.val.as<std::uint32_t>());
}
else if (k == "italic")
{
attr.font_opts |= FontOpts::Italic * kv.val.as<bool>();
}
else if (k == "bold")
{
attr.font_opts |= FontOpts::Bold * kv.val.as<bool>();
}
else if (k == "underline")
{
attr.font_opts |= FontOpts::Underline * kv.val.as<bool>();
}
else if (k == "strikethrough")
{
attr.font_opts |= FontOpts::Strikethrough * kv.val.as<bool>();
}
else if (k == "undercurl")
{
attr.font_opts |= FontOpts::Undercurl;
}
}
// Add info
assert(arr.ptr[3].type == msgpack::type::ARRAY);
const msgpack::object_array& info_arr = arr.ptr[3].via.array;
for(std::uint32_t i = 0; i < info_arr.size; ++i)
{
AttrState state;
assert(info_arr.ptr[i].type == msgpack::type::MAP);
const msgpack::object_map& mp = info_arr.ptr[i].via.map;
for(std::uint32_t j = 0; j < mp.size; ++j)
{
const msgpack::object_kv& kv = mp.ptr[j];
assert(kv.key.type == msgpack::type::STR);
const std::string k = kv.key.as<std::string>();
if (k == "kind")
{
state.kind = kv.val.as<std::string>() == "syntax" ? Kind::Syntax : Kind::UI;
}
else if (k == "hi_name")
{
state.hi_name = kv.val.as<decltype(state.hi_name)>();
}
else if (k == "ui_name")
{
state.ui_name = kv.val.as<decltype(state.ui_name)>();
}
else if (k == "id")
{
state.id = kv.val.as<decltype(state.id)>();
}
}
attr.state.push_back(std::move(state));
}
return attr;
}
}
/*
HLAttr Implementation
*/
HLAttr::HLAttr()
: hl_id(0) {}
HLAttr::HLAttr(int id)
: hl_id(id) {}
HLAttr::HLAttr(const HLAttr& other)
: hl_id(other.hl_id),
reverse(other.reverse),
special(other.special),
foreground(other.foreground),
background(other.background),
state(other.state),
opacity(other.opacity) {}
HLAttr::HLAttr(HLAttr&& other)
: hl_id(other.hl_id),
reverse(other.reverse),
special(other.special),
foreground(other.foreground),
background(other.background),
state(std::move(other.state)),
opacity(other.opacity) {}
HLAttr& HLAttr::operator=(HLAttr&& other)
{
hl_id = other.hl_id;
foreground = other.foreground;
background = other.background;
special = other.special;
reverse = other.reverse;
state = std::move(other.state);
opacity = other.opacity;
return *this;
}
/*
HLState Implementation
*/
const HLAttr& HLState::attr_for_id(int id) const
{
const auto it = id_to_attr.find(id);
if (it != id_to_attr.end())
{
return it->second;
}
return default_colors;
}
int HLState::id_for_name(const std::string &name) const
{
const auto it = name_to_id.find(name);
if (it != name_to_id.end())
{
return it->second;
}
return 0;
}
void HLState::set_name_id(const std::string& name, std::uint32_t hl_id)
{
name_to_id[name] = hl_id;
}
void HLState::set_id_attr(int id, HLAttr attr)
{
id_to_attr[id] = attr;
}
void HLState::default_colors_set(const msgpack::object& obj)
{
// We only look at the first three values (the others are ctermfg
// and ctermbg, which we don't care about)
assert(obj.type == msgpack::type::ARRAY);
const msgpack::object_array& params = obj.via.array;
assert(params.size >= 3);
default_colors.foreground = params.ptr[0].as<std::uint32_t>();
default_colors.background = params.ptr[1].as<std::uint32_t>();
default_colors.special = params.ptr[2].as<std::uint32_t>();
}
const HLAttr& HLState::default_colors_get() const
{
return default_colors;
}
void HLState::define(const msgpack::object& obj)
{
HLAttr attr = hl::hl_attr_from_object(obj);
int id = attr.hl_id;
for(const AttrState& s : attr.state)
{
if (!s.hi_name.empty())
{
set_name_id(s.hi_name, id);
}
if (!s.ui_name.empty())
{
set_name_id(s.ui_name, id);
}
}
id_to_attr[id] = attr;
}
void HLState::group_set(const msgpack::object &obj)
{
assert(obj.type == msgpack::type::ARRAY);
const auto& arr = obj.via.array;
assert(arr.size == 2);
assert(arr.ptr[0].type == msgpack::type::STR);
assert(arr.ptr[1].type == msgpack::type::POSITIVE_INTEGER);
std::string hl_name = arr.ptr[0].as<std::string>();
int hl_id = arr.ptr[1].as<int>();
set_name_id(hl_name, hl_id);
}
| 24.822222 | 86 | 0.599284 | [
"object"
] |
df892fa52fd0b00f26fa1e8d4b6c15de6692a260 | 8,285 | cc | C++ | sumi/benchmark/pingpong.cc | minyee/sst-macro | fd2c52b3872b9c49af77f5f82b3177cc7bbe403c | [
"BSD-Source-Code"
] | 4 | 2017-11-18T22:49:38.000Z | 2021-01-22T18:33:50.000Z | sumi/benchmark/pingpong.cc | minyee/sst-macro | fd2c52b3872b9c49af77f5f82b3177cc7bbe403c | [
"BSD-Source-Code"
] | null | null | null | sumi/benchmark/pingpong.cc | minyee/sst-macro | fd2c52b3872b9c49af77f5f82b3177cc7bbe403c | [
"BSD-Source-Code"
] | 1 | 2019-03-14T23:04:47.000Z | 2019-03-14T23:04:47.000Z | /**
Copyright 2009-2017 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering Solutions of Sandia, LLC., a wholly
owned subsidiary of Honeywell International, Inc., for the U.S. Department of
Energy's National Nuclear Security Administration under contract DE-NA0003525.
Copyright (c) 2009-2017, NTESS
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Sandia Corporation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Questions? Contact sst-macro-help@sandia.gov
*/
#include <pthread.h>
#include <sumi/transport.h>
#include <sumi/communicator.h>
#include <sprockit/sim_parameters.h>
#include <sprockit/util.h>
#include <sprockit/stl_string.h>
#define DEBUG 0
#define HAVE_MPI 1
#if HAVE_MPI
#include <mpi.h>
#endif
using namespace sumi;
typedef enum {
allgather,
allreduce
} type_t;
static const int nreplica = 15;
static inline void
run_test_sender_get(transport* t, public_buffer pbuf, int size)
{
rdma_message::ptr msg = new rdma_message(size);
msg->remote_buffer() = pbuf;
int dst = 1;
t->send_rdma_header(dst, msg);
message::ptr ack = t->blocking_poll(message::rdma_get_ack);
}
static inline void
run_test_receiver_get(transport* t, public_buffer pbuf, int size)
{
message::ptr rdma_header = t->blocking_poll(message::header);
rdma_header->local_buffer() = pbuf;
int dst = 0;
t->rdma_get(dst, rdma_header, true, true);
message::ptr ack = t->blocking_poll(message::rdma_get);
}
static int num_calls = 0;
static inline void
run_test_receiver_put(transport* t, public_buffer pbuf, int size)
{
rdma_message::ptr msg = new rdma_message(size);
msg->remote_buffer() = pbuf;
int dst = 0;
t->send_rdma_header(dst, msg);
message::ptr ack = t->blocking_poll(message::rdma_put);
++num_calls;
}
static inline void
run_test_sender_put(transport* t, public_buffer pbuf, int size)
{
message::ptr rdma_header = t->blocking_poll(message::header);
rdma_header->local_buffer() = pbuf;
int dst = 1;
t->rdma_put(dst, rdma_header, true, true);
message::ptr ack = t->blocking_poll(message::rdma_put_ack);
++num_calls;
}
#if HAVE_MPI
static inline void
run_test_mpi_sender(transport* t, public_buffer pbuf, int size)
{
int dst = 1;
int tag = 0;
MPI_Send(pbuf.ptr, size, MPI_BYTE, dst, tag, MPI_COMM_WORLD);
}
static inline void
run_test_mpi_receiver(transport* t, public_buffer pbuf, int size)
{
int src = 0;
int tag = 0;
MPI_Recv(pbuf.ptr, size, MPI_BYTE, src, tag, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
#endif
typedef void (*pp_fxn)(transport* t, public_buffer pbuf, int size);
void
run_test(transport* t, int size, int nblocks, int nrepeats, pp_fxn fxn, const char* name, bool prereg, bool loopreg, bool loopunreg)
{
std::list<public_buffer> blocks;
for (int i=0; i < nblocks; ++i){
blocks.push_back(public_buffer(::malloc(size)));
::memset(blocks.back(), 0, size);
}
if (prereg){
std::list<public_buffer>::iterator it, end = blocks.end();
for (it=blocks.begin(); it != end; ++it){
public_buffer& buf = *it;
buf = t->make_public_buffer(buf.ptr, size);
}
}
for (int i=0; i < nrepeats; ++i){
double t_start = t->wall_time();
std::list<public_buffer>::iterator it, end = blocks.end();
for (it=blocks.begin(); it != end; ++it){
if (loopreg){
public_buffer& pbuf = *it;
pbuf = t->make_public_buffer(pbuf.ptr,size);
(*fxn)(t, pbuf, size);
if (loopunreg) t->unmake_public_buffer(pbuf,size);
} else {
public_buffer& pbuf = *it;
(*fxn)(t, pbuf, size);
}
}
double t_stop = t->wall_time();
double t_total = t_stop - t_start;
double t_per = t_total / nblocks;
double throughput = size / t_per;
printf("%25s: size=%6d repeat=%3d time=%20.12fms throughput=%20.12fGB/s\n", name, size, i, t_per*1e3, throughput/1e9);
}
if (prereg || (loopreg && !loopunreg)){
std::list<public_buffer>::iterator it, end = blocks.end();
for (it=blocks.begin(); it != end; ++it){
public_buffer& pbuf = *it;
t->unmake_public_buffer(pbuf, size);
}
}
}
void
run_test(transport* t, pp_fxn fxn, const char* name, bool prereg, bool loopreg, bool loopunreg)
{
static const int nblocks = 100;
static const int nrepeats = 10;
int sizes[] = {1024, 4096, 8192, 16384, 32768, 65532, 131072};
int num_sizes = sizeof(sizes) / sizeof(int);
for (int i=0; i < num_sizes; ++i){
run_test(t, sizes[i], nblocks, nrepeats, fxn, name, prereg, loopreg, loopunreg);
}
}
void
run_test()
{
sprockit::sim_parameters params;
params["transport"] = DEFAULT_TRANSPORT;
params["ping_timeout"] = "100ms";
params["eager_cutoff"] = "512";
params["use_put_protocol"] = "false";
params["lazy_watch"] = "true";
transport* t = transport::factory::get_param("transport", ¶ms);
#if HAVE_MPI
int argc = 1;
char* argv[] = {"haha"};
char** tmp = (char**) argv;
MPI_Init(&argc,&tmp);
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 0){
run_test(t, run_test_mpi_sender, "sender mpi", false, false, false);
} else {
run_test(t, run_test_mpi_receiver, "receiver mpi", false, false, false);
}
MPI_Finalize();
#else
t->init();
if (t->rank() == 0){
run_test(t, run_test_sender_get, "sender get", false, true, true);
run_test(t, run_test_sender_put, "sender put", false, true, true);
run_test(t, run_test_sender_get, "sender get pre-register", true, false, false);
run_test(t, run_test_sender_put, "sender put pre-register", true, false, false);
run_test(t, run_test_sender_put, "sender put delay unreg", false, true, false);
if (t->supports_hardware_ack()){
t->set_use_hardware_ack(true);
run_test(t, run_test_sender_put, "sender put ack", true, false, false);
}
} else {
run_test(t, run_test_receiver_get, "receiver get", false, true, true);
run_test(t, run_test_receiver_put, "receiver put", false, true, true);
run_test(t, run_test_receiver_get, "receiver get pre-register", true, false, false);
run_test(t, run_test_receiver_put, "receiver put pre-register", true, false, false);
run_test(t, run_test_receiver_put, "receiver put delay unreg", false, true, false);
if (t->supports_hardware_ack()){
t->set_use_hardware_ack(true);
run_test(t, run_test_receiver_put, "receiver put ack", false, true, false);
}
}
t->finish();
#endif
}
int main(int argc, char** argv)
{
try {
#if DEBUG
sprockit::debug::turn_on(DEFAULT_TRANSPORT);
sprockit::debug::turn_on("sumi");
sprockit::debug::turn_on("sumi_collective");
#endif
run_test();
} catch (std::exception& e) {
std::cerr << e.what() << std::endl;
abort();
}
return 0;
} | 32.112403 | 132 | 0.701147 | [
"3d"
] |
df8f036303f492bda345bb822ef2fe1d08b888aa | 3,980 | cpp | C++ | src/openbor/openbor_mod.cpp | marstau/shinsango | d9468787ae8e18fa478f936770d88e9bf93c11c0 | [
"BSD-3-Clause"
] | 1 | 2021-06-16T15:25:47.000Z | 2021-06-16T15:25:47.000Z | src/openbor/openbor_mod.cpp | marstau/shinsango | d9468787ae8e18fa478f936770d88e9bf93c11c0 | [
"BSD-3-Clause"
] | null | null | null | src/openbor/openbor_mod.cpp | marstau/shinsango | d9468787ae8e18fa478f936770d88e9bf93c11c0 | [
"BSD-3-Clause"
] | null | null | null | #include "util/graphics/bitmap.h"
#include "mod.h"
#include "paintown-engine/level/utils.h"
#include "util/funcs.h"
#include "util.h"
#include "util/debug.h"
#include "pack-reader.h"
#include "util/tokenreader.h"
#include "util/token.h"
#include "util/exceptions/load_exception.h"
#include "util/exceptions/exception.h"
#include <vector>
#include "util/init.h"
#include "util/input/input-manager.h"
#include "util/input/input-map.h"
using namespace std;
/* FIXME: put this in a header somewhere */
namespace Bor{
class ParseException: std::exception {
public:
std::string getReason() const;
virtual ~ParseException() throw();
};
}
namespace Paintown{
OpenborMod::OpenborMod(const Filesystem::AbsolutePath & path):
reader(path){
}
const string OpenborMod::getMenu(){
return "menu/main.txt";
}
/* player1 = 83
* player2 = 238
*/
std::vector<Level::LevelInfo> OpenborMod::getLevels(){
vector<Level::LevelInfo> levels;
Level::LevelInfo level;
levels.push_back(level);
return levels;
}
Graphics::Bitmap * OpenborMod::createBitmap(const Filesystem::RelativePath & path){
try{
char * data = reader.readFile(reader.getFile(path.path()));
Graphics::Bitmap * bitmap = new Graphics::Bitmap(data, reader.getFileLength(path.path()));
delete[] data;
return bitmap;
} catch (const Bor::PackError & error){
throw LoadException(__FILE__, __LINE__, error, "Could not create bitmap");
}
}
static bool isOpenborPlayer(Bor::PackReader & reader, const string & path){
char * data = NULL;
try{
TokenReader tokens;
char * data = reader.readFile(reader.getFile(path));
string parsed = Bor::doParse(data, reader.getFileLength(path));
// Global::debug(0) << "Bor input: '" << parsed << "'" << endl;
delete[] data;
data = NULL;
/* will either succeed or throw TokenException */
Token * start = tokens.readTokenFromString(parsed);
const Token * type = start->findToken("_/type");
if (type != NULL){
string kind;
type->view() >> kind;
return kind == "player";
} else {
return false;
}
} catch (const TokenException & t){
Global::debug(0) << "Failed to parse pak file " << path << " " << t.getTrace() << endl;
} catch (const Bor::PackError & p){
Global::debug(0) << "Failed to parse pak file " << path << " " << p.getTrace() << endl;
} catch (const Bor::ParseException & e){
Global::debug(0) << "Failed to parse pak file " << path << " " << e.getReason() << endl;
}
delete[] data;
return false;
}
#if 0
static PlayerVector findOpenborPlayers(Bor::PackReader & reader){
PlayerVector players;
vector<string> paths = reader.findPaths("data/chars/*/*.txt");
sort(paths.begin(), paths.end());
for (vector<string>::iterator it = paths.begin(); it != paths.end(); it++){
string file = *it;
if (isOpenborPlayer(reader, file)){
players.push_back(playerInfo(new Bor::DisplayCharacter(reader, file), Filesystem::AbsolutePath(file)));
}
}
return players;
}
#endif
namespace Select{
enum Input{
Up, Down, Left,
Right, Remap, Quit,
Choose,
};
}
Filesystem::AbsolutePath OpenborMod::selectPlayer(const string & message, const Level::LevelInfo & info, int & remap, const InputSource & source){
Graphics::Bitmap background(makeBitmap(Filesystem::RelativePath("data/bgs/select.gif")));
/* FIXME: hardcoded resolution */
Graphics::Bitmap work(640, 480);
background.Blit(work);
work.BlitToScreen();
InputMap<Select::Input> input;
input.set(Keyboard::Key_ESC, 0, true, Select::Quit);
InputManager::waitForPress(input, source, Select::Quit);
throw Exception::Base(__FILE__, __LINE__);
/* show data/bgs/select.gif
* get all players
* display selected player at 83, 155
*/
}
}
| 28.84058 | 146 | 0.633417 | [
"vector"
] |
df978e4607cd284af045ac305e95b191562f87b6 | 3,026 | hpp | C++ | src/org/apache/poi/hssf/record/chart/SeriesRecord.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | src/org/apache/poi/hssf/record/chart/SeriesRecord.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | src/org/apache/poi/hssf/record/chart/SeriesRecord.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | // Generated from /POI/java/org/apache/poi/hssf/record/chart/SeriesRecord.java
#pragma once
#include <fwd-POI.hpp>
#include <java/lang/fwd-POI.hpp>
#include <org/apache/poi/hssf/record/fwd-POI.hpp>
#include <org/apache/poi/hssf/record/chart/fwd-POI.hpp>
#include <org/apache/poi/util/fwd-POI.hpp>
#include <org/apache/poi/hssf/record/StandardRecord.hpp>
struct default_init_tag;
class poi::hssf::record::chart::SeriesRecord final
: public ::poi::hssf::record::StandardRecord
{
public:
typedef ::poi::hssf::record::StandardRecord super;
static constexpr int16_t sid { int16_t(4099) };
private:
int16_t field_1_categoryDataType { };
public:
static constexpr int16_t CATEGORY_DATA_TYPE_DATES { int16_t(0) };
static constexpr int16_t CATEGORY_DATA_TYPE_NUMERIC { int16_t(1) };
static constexpr int16_t CATEGORY_DATA_TYPE_SEQUENCE { int16_t(2) };
static constexpr int16_t CATEGORY_DATA_TYPE_TEXT { int16_t(3) };
private:
int16_t field_2_valuesDataType { };
public:
static constexpr int16_t VALUES_DATA_TYPE_DATES { int16_t(0) };
static constexpr int16_t VALUES_DATA_TYPE_NUMERIC { int16_t(1) };
static constexpr int16_t VALUES_DATA_TYPE_SEQUENCE { int16_t(2) };
static constexpr int16_t VALUES_DATA_TYPE_TEXT { int16_t(3) };
private:
int16_t field_3_numCategories { };
int16_t field_4_numValues { };
int16_t field_5_bubbleSeriesType { };
public:
static constexpr int16_t BUBBLE_SERIES_TYPE_DATES { int16_t(0) };
static constexpr int16_t BUBBLE_SERIES_TYPE_NUMERIC { int16_t(1) };
static constexpr int16_t BUBBLE_SERIES_TYPE_SEQUENCE { int16_t(2) };
static constexpr int16_t BUBBLE_SERIES_TYPE_TEXT { int16_t(3) };
private:
int16_t field_6_numBubbleValues { };
protected:
void ctor();
void ctor(::poi::hssf::record::RecordInputStream* in);
public:
::java::lang::String* toString() override;
void serialize(::poi::util::LittleEndianOutput* out) override;
public: /* protected */
int32_t getDataSize() override;
public:
int16_t getSid() override;
::java::lang::Object* clone() override;
int16_t getCategoryDataType();
void setCategoryDataType(int16_t field_1_categoryDataType);
int16_t getValuesDataType();
void setValuesDataType(int16_t field_2_valuesDataType);
int16_t getNumCategories();
void setNumCategories(int16_t field_3_numCategories);
int16_t getNumValues();
void setNumValues(int16_t field_4_numValues);
int16_t getBubbleSeriesType();
void setBubbleSeriesType(int16_t field_5_bubbleSeriesType);
int16_t getNumBubbleValues();
void setNumBubbleValues(int16_t field_6_numBubbleValues);
// Generated
SeriesRecord();
SeriesRecord(::poi::hssf::record::RecordInputStream* in);
protected:
SeriesRecord(const ::default_init_tag&);
public:
static ::java::lang::Class *class_();
int32_t serialize(int32_t offset, ::int8_tArray* data);
::int8_tArray* serialize();
private:
virtual ::java::lang::Class* getClass0();
};
| 31.852632 | 78 | 0.738599 | [
"object"
] |
df9e417ad790e9c4430d633fb224f5315d11accf | 20,045 | cpp | C++ | libs/SpoutSDK/src/SpoutFrameCount.cpp | medcelerate/ofxSpout | 1c461e6ca309595ef153f34f0f5f0aaae2267b8d | [
"MIT"
] | 61 | 2015-10-20T11:07:56.000Z | 2022-03-27T08:54:36.000Z | libs/SpoutSDK/src/SpoutFrameCount.cpp | medcelerate/ofxSpout | 1c461e6ca309595ef153f34f0f5f0aaae2267b8d | [
"MIT"
] | 9 | 2016-01-07T12:36:38.000Z | 2019-10-23T13:52:13.000Z | libs/SpoutSDK/src/SpoutFrameCount.cpp | medcelerate/ofxSpout | 1c461e6ca309595ef153f34f0f5f0aaae2267b8d | [
"MIT"
] | 23 | 2016-02-26T12:09:35.000Z | 2022-03-21T23:45:54.000Z | //
// SpoutFrameCount
//
// Semaphore frame counter
//
// ====================================================================================
// Revisions :
//
// 07.10.18 - project start
// 01.11.18 - Add GetRefreshRate() to set default sender fps to system refresh rate
// 16.11.18 - Profile UpdateSenderFps
// 23.11.18 - Change semaphore access functions to operate within a mutex lock
// 26.11.18 - Add application disable frame counting to avoid variable frame rate problems
// 27.11.18 - Add IsFrameNew
// 02.12.18 - Add sender GetWidth, GetHeight, GetFps and GetFrame
// 23.12.18 - More log warnings
// 26.02.19 - Add IsFrameCountEnabled
// 14.03.19 - CleanupFrameCount - return if no semaphore handle
// - Remove wait warning from CheckAccess()
// 02.04.19 - Profile timing functions
// 24.04.19 - Add HoldFps
// 19.05.19 - Clean up
// 05.06.19 - HoldFps - use std::chrono if VS2015 or greater
//
// ====================================================================================
//
/*
Copyright (c) 2019. Lynn Jarvis. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
#include "SpoutFrameCount.h"
// -----------------------------------------------
spoutFrameCount::spoutFrameCount()
{
m_hAccessMutex = NULL;
m_hCountSemaphore = NULL;
m_SenderName[0] = 0;
m_CountSemaphoreName[0] = 0;
m_FrameCount = 0L;
m_LastFrameCount = 0L;
m_FrameTimeTotal = 0.0;
m_FrameTimeNumber = 0.0;
m_lastFrame = 0.0;
// Default sender fps is system refresh rate
m_Fps = GetRefreshRate();
// User registry setting is checked in EnableFrameCount
m_bFrameCount = false; // default not set
m_bDisabled = false;
// Initialize fps control
m_millisForFrame = 0.0;
#if _MSC_VER >= 1900
m_FrameStartPtr = new std::chrono::steady_clock::time_point;
m_FrameEndPtr = new std::chrono::steady_clock::time_point;
#else
m_FrameStart = 0.0;
#endif
// Initialize counter
PCFreq = 0.0;
CounterStart = 0;
StartCounter();
}
// -----------------------------------------------
spoutFrameCount::~spoutFrameCount()
{
#if _MSC_VER >= 1900
if (m_FrameStartPtr) delete m_FrameStartPtr;
if (m_FrameEndPtr) delete m_FrameEndPtr;
#endif
// Close the frame count semaphore.
if (m_hCountSemaphore) CloseHandle(m_hCountSemaphore);
m_hCountSemaphore = NULL;
// Close the texture access mutex
if (m_hAccessMutex) CloseHandle(m_hAccessMutex);
m_hAccessMutex = NULL;
}
// ======================================================================
// Public
// ======================================================================
// -----------------------------------------------
//
// Create a frame counting semaphore.
//
// Incremented by a sender.
// Tested by a receiver to retrieve the count.
//
void spoutFrameCount::EnableFrameCount(const char* SenderName)
{
// Check the user setting for frame counting between sender and receiver
DWORD dwFrame = 0;
if (ReadDwordFromRegistry(HKEY_CURRENT_USER, "Software\\Leading Edge\\Spout", "Framecount", &dwFrame)) {
m_bFrameCount = (dwFrame == 1);
}
// Return if the user has not selected frame counting
// Subsequently SetNewFrame and GetNewFrame return without action
// Return silently if not enabled in SpoutSettings
if (!m_bFrameCount)
return;
// Return silently if application disabled
if (m_bDisabled)
return;
// A sender name is required
if (SenderName[0] == 0) {
SpoutLogWarning("SpoutFrameCount::EnableFrameCount - no sender name");
return;
}
// Reset frame count, comparator and fps variables
m_FrameCount = 0L;
m_LastFrameCount = 0L;
m_FrameTimeTotal = 0.0;
m_FrameTimeNumber = 0.0;
m_Fps = GetRefreshRate();
// Return if already enabled for this sender
if (m_hCountSemaphore && strcmp(SenderName, m_SenderName) == 0) {
SpoutLogNotice("SpoutFrameCount::EnableFrameCount already enabled [%s]", SenderName);
return;
}
SpoutLogNotice("SpoutFrameCount::EnableFrameCount : sender name [%s]", SenderName);
// Close any existing semaphore
if (m_hCountSemaphore) {
CloseHandle(m_hCountSemaphore);
m_hCountSemaphore = NULL;
m_CountSemaphoreName[0] = 0;
}
// Set the new name for subsequent checks
strcpy_s(m_SenderName, 256, SenderName);
// Create or open a semaphore with this sender name
sprintf_s(m_CountSemaphoreName, 256, "%s_Count_Semaphore", SenderName);
HANDLE hSemaphore = CreateSemaphoreA(
NULL, // default security attributes
1, // initial count
LONG_MAX, // maximum count - LONG_MAX (2147483647) at 60fps = 2071 days
(LPSTR)m_CountSemaphoreName);
DWORD dwError = GetLastError();
if (dwError == ERROR_INVALID_HANDLE) {
SpoutLogError(" Invalid semaphore handle");
return;
}
if (dwError == ERROR_ALREADY_EXISTS) {
SpoutLogNotice(" Semaphore already exists");
// OK if it already exists - the sender or receiver can create it
}
if (hSemaphore == NULL) {
SpoutLogError(" Unknown error");
return;
}
m_hCountSemaphore = hSemaphore;
SpoutLogNotice(" Semaphore handle [%d]", m_hCountSemaphore);
}
// -----------------------------------------------
void spoutFrameCount::DisableFrameCount()
{
CleanupFrameCount();
m_bDisabled = true;
}
// -----------------------------------------------
bool spoutFrameCount::IsFrameCountEnabled()
{
if (!m_bFrameCount || m_bDisabled)
return false;
else
return true;
}
// -----------------------------------------------
//
// Increment the sender frame count.
// Used by a sender for every update of the shared texture.
//
// This function is called within a sender mutex lock so that
// the receiver will not read the semaphore count while the
// sender is incrementing it.
//
// Used internaly to set frame status if frame counting is enabled.
//
void spoutFrameCount::SetNewFrame()
{
// Return silently if disabled
if (!m_bFrameCount || m_bDisabled)
return;
// Access the frame count semaphore
// Note: WaitForSingle object will always succeed because
// the lock count (sender frame count) is greater than zero,
// but must be called before ReleaseSemaphore can be called
// or there is an error.
DWORD dwWaitResult = WaitForSingleObject(m_hCountSemaphore, 0);
if (dwWaitResult != WAIT_OBJECT_0) {
if (dwWaitResult == WAIT_ABANDONED)
SpoutLogWarning("SpoutFrameCount::SetNewFrame - WAIT_ABANDONED");
if (dwWaitResult == WAIT_FAILED)
SpoutLogWarning("SpoutFrameCount::SetNewFrame - WAIT_FAILED");
}
else {
// Release the frame counting semaphore to increase it's count.
// so that the receiver can retrieve the new count.
// Increment by 2 because WaitForSingleObject decremented it.
if (ReleaseSemaphore(m_hCountSemaphore, 2, NULL) == FALSE) {
SpoutLogError("spoutFrameCount::SetNewFrame - ReleaseSemaphore failed");
}
else {
m_FrameCount++; // Increment the sender frame count
// Update the sender fps calculations for the new frame
UpdateSenderFps(1);
}
}
}
// -----------------------------------------------
//
// Read the semaphore count to determine if the sender
// has produced a new frame and incremented the counter.
// Counts are recorded as class variables for a receiver.
//
// This function is called within a sender mutex lock so that
// the sender will not write a frame and increment the
// count while a receiver is reading it.
//
// Used internally to check frame status if frame counting is enabled.
//
bool spoutFrameCount::GetNewFrame()
{
long framecount = 0;
// Return silently if disabled
if (!m_bFrameCount || m_bDisabled)
return true;
// A receiver creates of opens a named semaphore when it connects to a sender
// Do not block if semaphore creation failed so that ReceiveTexture can still be called
if (!m_hCountSemaphore)
return true;
// Access the frame count semaphore
DWORD dwWaitResult = WaitForSingleObject(m_hCountSemaphore, 0);
if (dwWaitResult != WAIT_OBJECT_0) {
if (dwWaitResult == WAIT_ABANDONED)
SpoutLogWarning("SpoutFrameCount::GetNewFrame - WAIT_ABANDONED");
if (dwWaitResult == WAIT_FAILED)
SpoutLogWarning("SpoutFrameCount::GetNewFrame - WAIT_FAILED");
}
else {
// Call ReleaseSemaphore with a release count of 1 to return it
// to what it was before the wait and record the previous count.
// The next time round it will either be the same count because
// the receiver released it, or increased because the sender
// released and incremented it.
if (ReleaseSemaphore(m_hCountSemaphore, 1, &framecount) == FALSE) {
SpoutLogError("spoutFrameCount::GetNewFrame - ReleaseSemaphore failed");
return true; // do not block
}
}
// Update the global frame count
m_FrameCount = framecount;
// Count will still be zero for older apps that do not set a frame count
if (framecount == 0)
return true;
// If this count and the last are the same, the sender has not
// produced a new frame and incremented the counter.
// Only return false if this frame and the last are the same.
if (framecount == m_LastFrameCount) {
m_bIsNewFrame = false;
return false;
}
// Update the sender fps calculations.
// The sender might have produced more than one frame if the receiver is slower.
// Pass the number of frames produced since the last.
UpdateSenderFps(framecount - m_LastFrameCount);
// Reset the comparator
m_LastFrameCount = framecount;
// Signal a new frame
m_bIsNewFrame = true;
return true;
}
// -----------------------------------------------
void spoutFrameCount::CleanupFrameCount()
{
// Return if not enabled in SpoutSettings
if (!m_bFrameCount)
return;
// Return if application disabled
if (m_bDisabled)
return;
// Return if no count semaphore
// i.e. no sender started or cleanup already done
if (!m_hCountSemaphore)
return;
SpoutLogNotice("SpoutFrameCount::CleanupFrameCount");
// Close the frame count semaphore. If another application first
// opened the semaphore it will not be finally closed here.
CloseHandle(m_hCountSemaphore);
m_hCountSemaphore = NULL;
// Clear the sender name in case the same one opens again
m_SenderName[0] = 0;
// Reset counters
m_FrameCount = 0L;
m_LastFrameCount = 0L;
m_Fps = GetRefreshRate();
m_FrameTimeTotal = 0.0;
m_FrameTimeNumber = 0.0;
}
// -----------------------------------------------
//
// Is the received frame new ?
//
// This function can be used by a receiver after ReceiveTexture
// to determine whether the frame is new.
//
// Used by an application to avoid time consuming processing
// after receiving a texture.
//
// Not usually required because new frame status is always
// checked internally if frame counting is enabled.
//
bool spoutFrameCount::IsFrameNew()
{
return m_bIsNewFrame;
}
// -----------------------------------------------
double spoutFrameCount::GetSenderFps()
{
return m_Fps;
}
// -----------------------------------------------
long spoutFrameCount::GetSenderFrame()
{
return m_FrameCount;
}
// -----------------------------------------------
//
// Fps control
//
// Not necessary if the application already has frame rate control.
// Must be called every frame.
// The sender will then signal a new frame at the target rate.
// Purpose is control rather than accuracy.
// Use std::chrono if supported by the compiler VS2015 or greater
//
void spoutFrameCount::HoldFps(int fps)
{
// Return if incorrect fps entry
if (fps <= 0)
return;
double framerate = static_cast<double>(fps);
#if _MSC_VER >= 1900
// Initialize frame time at target rate
if (m_millisForFrame == 0.0) {
m_millisForFrame = 1000.0 / framerate; // msec per frame
*m_FrameStartPtr = std::chrono::steady_clock::now();
SpoutLogNotice("spoutFrameCount::HoldFps(%d)", fps);
}
else {
*m_FrameEndPtr = std::chrono::steady_clock::now();
// milliseconds elapsed
double elapsedTime = static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(*m_FrameEndPtr - *m_FrameStartPtr).count() / 1000.);
// Sleep to reach the target frame time
if (elapsedTime < m_millisForFrame) { // milliseconds
std::this_thread::sleep_for(std::chrono::milliseconds((long)(m_millisForFrame - elapsedTime)));
}
// Set start time for the next frame
*m_FrameStartPtr = std::chrono::steady_clock::now();
}
#else
if (m_millisForFrame == 0) {
m_millisForFrame = 1000.0 / framerate;
m_FrameStart = GetCounter();
SpoutLogNotice("spoutFrameCount::HoldFps(%d)", fps);
}
else {
double elapsedTime = GetCounter() - m_FrameStart; // msec
// Sleep to reach the target frame time
if (elapsedTime < m_millisForFrame)
Sleep((DWORD)(m_millisForFrame - elapsedTime)); // can be slighly high
// Set start time for the next frame
m_FrameStart = GetCounter();
}
#endif
}
// =================================================================
// Texture access mutex
// =================================================================
// -----------------------------------------------
bool spoutFrameCount::CreateAccessMutex(const char *SenderName)
{
DWORD errnum = 0;
char szMutexName[300];
HANDLE hMutex = NULL;
// Create the mutex name to control access to the shared texture
sprintf_s((char*)szMutexName, 300, "%s_SpoutAccessMutex", SenderName);
// Create or open mutex depending, on whether it already exists or not
hMutex = CreateMutexA(NULL, FALSE, (LPCSTR)szMutexName);
if (hMutex == NULL) {
spoututils::SpoutLogError("spoutFrameCount::CreateAccessMutex - access mutex NULL invalid handle");
return false;
}
else {
errnum = GetLastError();
if (errnum == ERROR_INVALID_HANDLE) {
spoututils::SpoutLogError("spoutFrameCount::CreateAccessMutex - access mutex [%s] invalid handle", szMutexName);
return false;
}
}
m_hAccessMutex = hMutex;
return true;
}
// -----------------------------------------------
void spoutFrameCount::CloseAccessMutex()
{
// Close the texture access mutex. If another application first opened
// the mutex it will not be finally closed here.
if (m_hAccessMutex) CloseHandle(m_hAccessMutex);
m_hAccessMutex = NULL;
}
// -----------------------------------------------
//
// Check whether any other process is holding the lock
// and wait for access for 4 frames if so.
// For receiving from Version 1 apps with no mutex lock,
// a reader will have created the mutex and will have
// sole access and rely on the interop locks
//
bool spoutFrameCount::CheckAccess()
{
DWORD dwWaitResult = WAIT_FAILED;
// Don't block if no mutex for Spout1 apps
// or if called when the sender has closed
// AllowAccess also tests for a null handle
if (!m_hAccessMutex) {
// SpoutLogWarning("CheckAccess - no Mutex");
return true;
}
dwWaitResult = WaitForSingleObject(m_hAccessMutex, 67); // 4 frames at 60fps
if (dwWaitResult == WAIT_OBJECT_0) {
// The state of the object is signalled.
return true;
}
else {
switch (dwWaitResult) {
case WAIT_ABANDONED: // Could return here
SpoutLogError("CheckAccess - WAIT_ABANDONED");
break;
case WAIT_TIMEOUT: // The time-out interval elapsed, and the object's state is nonsignaled.
// This can happen the first time a receiver connects to a sender
// SpoutLogError("CheckAccess - WAIT_TIMEOUT");
break;
case WAIT_FAILED: // Could use call GetLastError
SpoutLogError("CheckAccess - WAIT_FAILED");
break;
default:
SpoutLogError("CheckAccess - unknown error");
break;
}
}
return false;
}
// -----------------------------------------------
void spoutFrameCount::AllowAccess()
{
// Release ownership of the mutex object.
// The caller must call ReleaseMutex once for each time that the mutex satisfied a wait.
// The ReleaseMutex function fails if the caller does not own the mutex object
if (m_hAccessMutex)
ReleaseMutex(m_hAccessMutex);
}
// ===============================================================================
// Protected
// ===============================================================================
// -----------------------------------------------
//
// Calculate the sender frames per second
// Applications before 2.007 have a frame rate dependent on the system fps
//
void spoutFrameCount::UpdateSenderFps(long framecount) {
// If framecount is zero, the sender has not produced a new frame yet
if (framecount > 0) {
// Msecs between this frame and the last
double thisFrame = GetCounter();
double frametime = thisFrame - m_lastFrame;
// Set the start time for the next frame
m_lastFrame = thisFrame;
// Msecs per frame if more than one frame has been produced by the sender
if (framecount > 1L)
frametime = frametime / static_cast<double>(framecount);
// Average the last 16 frames to minimise variability for damping
if (m_FrameTimeNumber < 16) {
m_FrameTimeTotal = m_FrameTimeTotal + frametime;
m_FrameTimeNumber += 1.0;
}
else {
// Calculate the average frame time
frametime = m_FrameTimeTotal / m_FrameTimeNumber;
m_FrameTimeTotal = 0.0;
m_FrameTimeNumber = 0.0;
// Calculate frames per second
// Default fps is system refresh rate
frametime = frametime / 1000.0; // frame time in seconds
if (frametime > 0.0001) {
double fps = (1.0 / frametime); // Fps
m_Fps = 0.75*m_Fps + 0.25*fps; // damping
}
}
}
}
// -----------------------------------------------
//
// Get system refresh rate for the default fps value
// https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-enumdisplaysettingsa
//
double spoutFrameCount::GetRefreshRate()
{
double frequency = 60.0;
DEVMODE DevMode;
BOOL bResult = TRUE;
DWORD dwCurrentSettings = 0;
DevMode.dmSize = sizeof(DEVMODE);
// Test all the graphics modes
while (bResult) {
bResult = EnumDisplaySettings(NULL, dwCurrentSettings, &DevMode);
if (bResult)
frequency = static_cast<double>(DevMode.dmDisplayFrequency);
dwCurrentSettings++;
}
return frequency;
}
// -----------------------------------------------
//
// Set counter start
//
// Information on using QueryPerformanceFrequency for timing
// https://docs.microsoft.com/en-us/windows/desktop/SysInfo/acquiring-high-resolution-time-stamps
//
// Used in favour of std::chrono for compatibility with Visual Studio before VS2015
//
void spoutFrameCount::StartCounter()
{
LARGE_INTEGER li;
if (QueryPerformanceFrequency(&li)) {
// Find the PC frequency if not done yet
if(PCFreq == 0.0)
PCFreq = static_cast<double>(li.QuadPart) / 1000.0;
// Get the counter start
QueryPerformanceCounter(&li);
CounterStart = li.QuadPart;
}
}
// -----------------------------------------------
// Return msec elapsed since counter start
//
double spoutFrameCount::GetCounter()
{
LARGE_INTEGER li;
if (QueryPerformanceCounter(&li)) {
return static_cast<double>(li.QuadPart - CounterStart) / PCFreq;
}
else {
return 0.0;
}
}
// ===============================================================================
| 30.142857 | 149 | 0.667348 | [
"object"
] |
dfa092bc8ad2c7969641598a6ed427d09cdda6ba | 43,365 | cpp | C++ | Samples/EnginePrototype/Views/Editor/EditorView.cpp | samkusin/overview | affddf0b21f7e76ad9dae1425a4f5ac6a29a24c1 | [
"MIT"
] | null | null | null | Samples/EnginePrototype/Views/Editor/EditorView.cpp | samkusin/overview | affddf0b21f7e76ad9dae1425a4f5ac6a29a24c1 | [
"MIT"
] | null | null | null | Samples/EnginePrototype/Views/Editor/EditorView.cpp | samkusin/overview | affddf0b21f7e76ad9dae1425a4f5ac6a29a24c1 | [
"MIT"
] | null | null | null | //
// EditorView.cpp
// EnginePrototype
//
// Created by Samir Sinha on 1/15/16.
//
//
#include "EditorView.hpp"
#include "Engine/AssetManifest.hpp"
#include "Engine/Physics/Scene.hpp"
#include "Engine/Physics/SceneDataContext.hpp"
#include "Engine/Render/RenderContext.hpp"
#include "Engine/Controller/NavSystem.hpp"
#include "Engine/Services/EntityService.hpp"
#include "CKGfx/Light.hpp"
#include "CKGfx/ModelSet.hpp"
#include "CKGfx/Geometry.hpp"
#include "CKGfx/External/nanovg/nanovg.h"
#include "UICore/UI.hpp"
#include <cinek/memorystack.hpp>
#include <ckjson/json.hpp>
#include <ckm/math.hpp>
#include <bx/fpumath.h>
#include <bgfx/bgfx.h>
#include "EditorComponents.inl"
namespace cinek {
EditorUIVariant::EditorUIVariant() : _type(kNull)
{
}
EditorUIVariant::EditorUIVariant(const char* str, int sz)
{
sz = std::max((int)strnlen(str, 255), sz-1);
if (sz >= kBufSize) {
char* strptr = reinterpret_cast<char*>(cinek_alloc(0, sz+1));
strncpy(strptr, str, sz);
strptr[sz] = '\0';
_ptr = strptr;
}
else {
strncpy(_data.strbuf, str, sz);
_data.strbuf[sz] = '\0';
_ptr = &_data.strbuf[0];
}
makeTypeWord(kString, sz, sz >= kBufSize);
}
EditorUIVariant::EditorUIVariant(const float* f, int num)
{
if (num > kFloatLimit) {
float* fptr = reinterpret_cast<float*>(cinek_alloc(0, num*sizeof(float)));
_ptr = fptr;
memcpy(fptr, f, num*sizeof(float));
}
else {
_ptr = &_data.floatbuf[0];
}
makeTypeWord(kFloats, num, num > kFloatLimit);
}
EditorUIVariant::~EditorUIVariant()
{
if (isAllocated()) {
cinek_free(0, _ptr);
}
}
EditorUIVariant::EditorUIVariant(EditorUIVariant&& v) : _type(v._type), _ptr(v._ptr)
{
_type = kNull;
memmove(&_data, &v._data, sizeof(Data));
}
EditorUIVariant& EditorUIVariant::operator=(EditorUIVariant&& v)
{
if (&v != this) {
_type = kNull;
memmove(&_data, &v._data, sizeof(Data));
}
return *this;
}
int EditorUIVariant::getSize() const
{
return (_type & 0x7fff0000) >> 16;
}
template<> const float* EditorUIVariant::getData<float>() const
{
CK_ASSERT_RETURN_VALUE(getType() == kFloats, nullptr);
return reinterpret_cast<const float*>(_ptr);
}
uint32_t EditorUIVariant::makeTypeWord(uint16_t type, int16_t cnt, bool dynamic) const
{
uint32_t val = (cnt << 16) | type;
if (dynamic) val |= 0x80000000;
return val;
}
uint16_t EditorUIVariant::getType() const
{
return (uint16_t)(_type & 0x0000ffff);
}
bool EditorUIVariant::isAllocated() const
{
return (_type & 0x80000000) != 0;
}
struct EditorView::SceneTreeNode
{
enum class Type
{
kEntity,
kGroup
};
const char* name;
Type type;
Entity entity;
SceneTreeNode* parent;
SceneTreeNode* nextSibling;
SceneTreeNode* prevSibling;
SceneTreeNode* firstChild;
};
class EditorView::SceneTree
{
public:
using Node = SceneTreeNode;
SceneTree(int nodeCount, const Allocator& allocator) :
_nodeStack(nodeCount * sizeof(Node), allocator),
_stringStack(nodeCount * 32),
_root(nullptr)
{
}
Node* root() { return _root; }
const Node* root() const { return _root; }
void reset()
{
_nodeStack.reset();
_stringStack.reset();
_root = allocateNode("Root", Node::Type::kGroup);
}
void addScene(const ove::Scene& scene)
{
Node* node = appendChild(_root, "Bodies", Node::Type::kGroup);
if (node) {
scene.iterateBodies(ove::SceneBody::kAllCategories,
[this, node](ove::SceneBody* body, uint32_t mask) {
if (!body->checkFlags(ove::SceneBody::kIsStaging)) {
Node* child = appendChild(node, "Entity", Node::Type::kEntity);
if (child) {
child->entity = body->entity;
}
}
});
}
}
private:
MemoryStack _nodeStack;
CStringStack _stringStack;
Node* _root;
Node* allocateNode(const char* name, Node::Type type)
{
Node* node = reinterpret_cast<Node*>(_nodeStack.allocate(sizeof(Node)));
if (node) {
memset(node, 0, sizeof(*node));
node->name = _stringStack.create(name);
node->type = type;
}
return node;
}
Node* appendChild(Node* parent, const char* name, Node::Type type)
{
Node* node = allocateNode(name, type);
if (node) {
if (parent->firstChild) {
Node* oldTail = parent->firstChild->prevSibling;
parent->firstChild->prevSibling = node;
oldTail->nextSibling = node;
node->prevSibling = oldTail;
}
else {
parent->firstChild = node;
node->prevSibling = node; // tail as our head's prev sibling
}
node->parent = parent;
}
return node;
}
};
EditorView::EntityCategory::EntityCategory(int cnt, int maxstrlen) :
strstack(cnt*maxstrlen*2),
size(cnt)
{
names.reserve(cnt);
}
////////////////////////////////////////////////////////////////////////////////
EditorView::EditorView
(
GameViewContext* gameContext
) :
GameState(gameContext),
_activeEntity(0)
{
}
EditorView::~EditorView()
{
}
void EditorView::onViewAdded(ove::ViewStack& stateController)
{
game().setGameMode(GameMode::kEditor);
createUIData();
setIdleState();
// reset camera
cinek::gfx::Matrix4 cameraRotMtx;
bx::mtxSRT(camera().worldMtx, 1,1,1,0,0,0,0,2,-12);
scene().deactivate();
navSystem().deactivate();
}
void EditorView::onViewRemoved(ove::ViewStack& stateController)
{
destroyUIData();
game().setGameMode(GameMode::kNone);
}
void EditorView::onViewStartFrame(ove::ViewStack& stateController)
{
_vsm.startFrame();
}
void EditorView::simulateView(ove::ViewStack& stateController, CKTimeDelta dt)
{
}
void EditorView::frameUpdateView
(
ove::ViewStack& stateController,
CKTimeDelta dt,
const cinek::input::InputState& inputState
)
{
auto displaySize = ImGui::GetIO().DisplaySize;
updateMainUI(_uiStatus, displaySize.x, displaySize.y);
renderOverlay();
_freeCameraController.handleCameraInput(camera(), inputState, dt);
_vsm.runFrameUpdate(dt);
}
void EditorView::onViewEndFrame(ove::ViewStack& stateController)
{
_vsm.endFrame();
if (game().getGameMode() == GameMode::kPlay) {
stateController.present("PlayView");
}
endFrameMainUI(_uiStatus);
}
const char* EditorView::viewId() const
{
return "EditorView";
}
////////////////////////////////////////////////////////////////////////
void EditorView::createUIData()
{
_entityNamespaces.clear();
_entityNamespaces.reserve(16);
_entityCategories.clear();
_entityCategories.reserve(32);
if (!entityService().isEntityValid(_activeEntity)) {
_activeEntity = 0;
}
// first pass, enumerate categories
entityService().enumerateDefinitions(
[this](const std::string& ns, const ove::AssetManifest& manifest) {
auto& manifestRoot = manifest.root();
if (manifestRoot.HasMember("entity")) {
auto& templates = manifestRoot["entity"];
for (auto templateIt = templates.MemberBegin();
templateIt != templates.MemberEnd();
++templateIt) {
auto& templateBody = templateIt->value;
auto it = templateBody.FindMember("editor");
if (it != templateBody.MemberEnd()) {
if (it->value.HasMember("category")) {
const char* categoryName = it->value["category"].GetString();
auto categoryIt = std::lower_bound(
_entityCategories.begin(), _entityCategories.end(), categoryName,
[](const decltype(_entityCategories)::value_type& v, const char* name) -> bool {
return v.first < name;
});
if (categoryIt == _entityCategories.end() || categoryIt->first != categoryName) {
categoryIt = _entityCategories.emplace(categoryIt);
categoryIt->first = categoryName;
}
++categoryIt->second.size;
}
}
}
}
}
);
for (auto& entityCategory : _entityCategories) {
entityCategory.second = std::move(EntityCategory(entityCategory.second.size, 32));
}
// second pass, fill category template lists
entityService().enumerateDefinitions(
[this](const std::string& ns, const ove::AssetManifest& manifest) {
auto& manifestRoot = manifest.root();
if (manifestRoot.HasMember("entity")) {
auto& templates = manifestRoot["entity"];
auto nsIt = std::find(_entityNamespaces.begin(), _entityNamespaces.end(), ns);
if (nsIt == _entityNamespaces.end()) {
nsIt = _entityNamespaces.emplace(nsIt, ns);
}
int nsIndex = (int)(nsIt - _entityNamespaces.begin());
for (auto templateIt = templates.MemberBegin();
templateIt != templates.MemberEnd();
++templateIt) {
auto& templateBody = templateIt->value;
auto it = templateBody.FindMember("editor");
if (it != templateBody.MemberEnd()) {
if (it->value.HasMember("category")) {
const char* categoryName = it->value["category"].GetString();
const char* longName = it->value["name"].GetString();
auto categoryIt = std::lower_bound(
_entityCategories.begin(), _entityCategories.end(), categoryName,
[](const decltype(_entityCategories)::value_type& v, const char* name) -> bool {
return v.first < name;
});
auto& category = categoryIt->second;
EntityTemplate tmp = {
nsIndex,
category.strstack.create(templateIt->name.GetString()),
category.strstack.create(longName)
};
category.names.emplace_back(tmp);
}
}
}
}
}
);
// scene tree building
_sceneTree = allocate_unique<SceneTree>(_allocator, 1024, _allocator);
rebuildSceneTree(*_sceneTree);
// default UI status
_uiStatus.cameraOption = UIStatus::kCamera_Perspective;
_uiStatus.cameraDirection = UIStatus::kCameraDirection_Current;
_uiTransformStatus.system = UITransformStatus::kSystem_Global;
_uiTransformStatus.mode = UITransformStatus::Mode::kTransform_Location;
_uiTransformStatus.option = UITransformStatus::kTransform_Free;
}
void EditorView::destroyUIData()
{
_sceneTree = nullptr;
}
void EditorView::rebuildSceneTree(cinek::EditorView::SceneTree &tree)
{
_sceneTree->reset();
_sceneTree->addScene(scene());
}
void EditorView::setActiveEntity(Entity entity)
{
_activeEntity = entity;
_uiStatus.entityStatus.entity = entity;
auto& name = entityService().identityFromEntity(entity);
strncpy(_uiStatus.entityStatus.name, name.c_str(), sizeof(_uiStatus.entityStatus.name));
snprintf(_uiStatus.entityStatus.id, sizeof(_uiStatus.entityStatus.id), "%" PRIu64, entity);
}
void EditorView::updateMainUI(UIStatus& status, float width, float height)
{
const ImVec2 kDesktopPad { 10, 10 };
const ImVec2 kCameraDims { 120, 150 };
const ImVec2 kToolboxDims { 120, height - kDesktopPad.y*4 - kCameraDims.y };
const ImVec2 kToolboxPos { kDesktopPad.x, kDesktopPad.y };
const ImVec2 kCameraPos { kDesktopPad.x, kDesktopPad.y + kToolboxDims.y + kDesktopPad.y };
const ImGuiIO& io = ImGui::GetIO();
ImGui::SetNextWindowPos(kCameraPos, ImGuiSetCond_FirstUseEver);
if (ImGui::Begin("Camera", nullptr, kCameraDims, 0.3f,
ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoSavedSettings)) {
ImGui::RadioButton("Perspective", &status.cameraOption, UIStatus::kCamera_Perspective);
ImGui::RadioButton("Orthogonal", &status.cameraOption, UIStatus::kCamera_Orthogonal);
ImGui::Spacing();
ImGui::Separator();
ImGui::Spacing();
ImGui::BeginGroup();
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4,4));
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(1,1));
if (ImGui::Button("XYZ+")) {
status.cameraDirection = UIStatus::kCameraDirection_XYZPos;
}
ImGui::SameLine();
if (ImGui::Button("XZY+")) {
status.cameraDirection = UIStatus::kCameraDirection_XZYPos;
}
ImGui::SameLine();
if (ImGui::Button("YZX+")) {
status.cameraDirection = UIStatus::kCameraDirection_YZXPos;
}
if (ImGui::Button("XYZ-")) {
status.cameraDirection = UIStatus::kCameraDirection_XYZNeg;
}
ImGui::SameLine();
if (ImGui::Button("XZY-")) {
status.cameraDirection = UIStatus::kCameraDirection_XZYNeg;
}
ImGui::SameLine();
if (ImGui::Button("YZX-")) {
status.cameraDirection = UIStatus::kCameraDirection_YZXNeg;
}
ImGui::PopStyleVar();
ImGui::PopStyleVar();
ImGui::EndGroup();
}
ImGui::End();
if (!status.displayMainUI) {
return;
}
const ImVec2 kSceneTreeDims { 300, 240 };
const ImVec2 kSceneTreePos {
width - kDesktopPad.x - kSceneTreeDims.x,
kDesktopPad.y
};
const ImVec2 kPropsDims { 300, height - kSceneTreeDims.y - kDesktopPad.y*4 };
const ImVec2 kPropsPos {
kSceneTreePos.x,
kSceneTreePos.y + kSceneTreeDims.y + kDesktopPad.y
};
// TOOLBOX UI
ImGui::SetNextWindowPos(kToolboxPos, ImGuiSetCond_FirstUseEver);
if (ImGui::Begin("Toolbox", nullptr, kToolboxDims, 0.3f,
ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoSavedSettings)) {
// create scene entities UI
if (ImGui::CollapsingHeader("Create", nullptr, false, true))
{
const ImGuiStyle& style = ImGui::GetStyle();
// create bodies popup UI
for (auto& entityCategory : _entityCategories) {
char name[32];
strncpy(name, entityCategory.first.c_str(), sizeof(name));
name[sizeof(name)-1] = '\0';
if (ImGui::Button(name, ImVec2(kToolboxDims.x - style.WindowPadding.x*2,0))) {
ImGui::OpenPopup(name);
}
if (ImGui::BeginPopup(name)) {
// templates
for (auto& item : entityCategory.second.names) {
if (ImGui::Selectable(item.longName)) {
status.addEntityTemplate = item;
}
}
ImGui::EndPopup();
}
}
ImGui::Dummy(ImVec2(0, ImGui::GetTextLineHeight()));
// create specialized entity UI
if (ImGui::Button("Area", ImVec2(kToolboxDims.x - style.WindowPadding.x*2,0))) {
}
ImGui::Unindent();
}
}
ImGui::End();
// SCENE GRAPH UI
ImGui::SetNextWindowPos(kSceneTreePos, ImGuiSetCond_FirstUseEver);
if (ImGui::Begin("Scene", nullptr, kSceneTreeDims, 0.3f)) {
updateSceneTreeUI(_sceneTree->root());
}
ImGui::End();
// PROPERTIES UI
ImGui::SetNextWindowPos(kPropsPos, ImGuiSetCond_FirstUseEver);
updatePropertiesUI(status.entityStatus, kPropsDims.x, kPropsDims.y);
// handle events from the frame window
if (!ImGui::IsMouseHoveringAnyWindow()) {
auto& sceneHitResult = sceneRayTestResult();
if (ImGui::IsMouseClicked(0)) {
if (sceneHitResult) {
// set the active entity (entity must be selectable)
if (!sceneHitResult.body->checkFlags(ove::SceneBody::kIsSection)) {
setActiveEntity(sceneHitResult.body->entity);
}
}
}
}
// handle shortcuts
if (io.KeyShift) {
if (ImGui::IsKeyPressed(SDLK_TAB)) {
game().setGameMode(GameMode::kPlay);
}
}
else {
if (_activeEntity) {
if (ImGui::IsKeyPressed(SDLK_t)) {
setTransformEntityState(UITransformStatus::Mode::kTransform_Location);
}
else if (ImGui::IsKeyPressed(SDLK_r)) {
setTransformEntityState(UITransformStatus::Mode::kTransform_Orientation);
}
}
}
}
void EditorView::updateSceneTreeUI(const SceneTreeNode *node)
{
if (!node)
return;
bool open = false;
if (node->type == SceneTreeNode::Type::kGroup) {
open = ImGui::TreeNode(node->name);
}
else if (node->type == SceneTreeNode::Type::kEntity) {
auto& name = entityService().identityFromEntity(node->entity);
const char* nameptr = "<Entity>";
if (!name.empty()) {
nameptr = name.c_str();
}
open = ImGui::TreeNode(node, "%s %" PRIx64 , nameptr, node->entity);
}
if (open) {
for (const SceneTreeNode* child = node->firstChild;
child;
child = child->nextSibling) {
updateSceneTreeUI(child);
}
ImGui::TreePop();
}
}
void EditorView::updatePropertiesUI(UIEntityStatus& status, float w, float h)
{
char title[64];
if (status.entity) {
snprintf(title, sizeof(title), "Properties : %s", status.name);
}
else {
strncpy(title, "Properties", sizeof(title));
}
title[sizeof(title)-1] = '\0';
if (ImGui::Begin("Properties", nullptr, { w, h }, 0.3f)) {
if (status.entity) {
if (ImGui::CollapsingHeader("Entity", nullptr, true, true)) {
ImGui::Columns(2);
ImGui::SetColumnOffset(0, 0);
ImGui::SetColumnOffset(1, w * 0.30f);
ImGui::Text("ID");
ImGui::NextColumn();
ImGui::InputText("##ID", status.id, sizeof(status.id), ImGuiInputTextFlags_ReadOnly);
ImGui::NextColumn();
ImGui::Text("Name");
ImGui::NextColumn();
if (ImGui::InputText("##Name", status.name, sizeof(status.name))) {
entityService().linkIdentityToEntity(status.entity, status.name);
}
ImGui::NextColumn();
ImGui::Columns(1);
}
ove::SceneBody* sceneBody = scene().findBody(_activeEntity);
if (sceneBody) {
float offsets[2] = { 0, w*0.30f };
updateComponentUI(_uiVariantMap, offsets, "Scene", sceneBody);
}
}
}
ImGui::End();
}
void EditorView::renderOverlay()
{
auto nvg = GameState::nvgContext();
auto& camera = GameState::camera();
nvgSave(nvg);
const ove::SceneBody* body = scene().findBody(_activeEntity);
if (_activeEntity) {
// entity cursor
const float kHandleLength = 75.0f;
const float kCircleRadius = 10.0f;
ckm::vector3 ckpos = body->getPosition();
gfx::Vector4 pos { ckpos.x, ckpos.y, ckpos.z, 1.0f };
bool isPosOnscreen;
gfx::Vector2 activeEntityScreenPos = camera.worldToScreenCoordinates(pos, &isPosOnscreen);
if (isPosOnscreen) {
// center point
nvgBeginPath(nvg);
nvgCircle(nvg, activeEntityScreenPos.x, activeEntityScreenPos.y, kCircleRadius);
nvgStrokeColor(nvg, nvgRGBA(255,255,255,255));
nvgStroke(nvg);
// handles
gfx::Vector2 handleDir[3];
pos.x = ckpos.x + 1.0f;
handleDir[0] = camera.worldToScreenCoordinates(pos);
ckm::sub(handleDir[0], handleDir[0], activeEntityScreenPos);
ckm::normalize(handleDir[0], handleDir[0]);
pos.x = ckpos.x;
pos.y = ckpos.y + 1.0f;
handleDir[1] = camera.worldToScreenCoordinates(pos);
ckm::sub(handleDir[1], handleDir[1], activeEntityScreenPos);
ckm::normalize(handleDir[1], handleDir[1]);
pos.y = ckpos.y;
pos.z = ckpos.z + 1.0f;
handleDir[2] = camera.worldToScreenCoordinates(pos);
ckm::sub(handleDir[2], handleDir[2], activeEntityScreenPos);
ckm::normalize(handleDir[2], handleDir[2]);
gfx::Vector2 handleEnd;
gfx::Vector2 handleStart;
gfx::Vector2 handleOffset;
// X handle
ckm::scale(handleStart, handleDir[0], kCircleRadius);
ckm::add(handleStart, handleStart, activeEntityScreenPos);
ckm::scale(handleEnd, handleDir[0], kHandleLength);
ckm::add(handleEnd, handleEnd, activeEntityScreenPos);
nvgBeginPath(nvg);
nvgMoveTo(nvg, handleStart.x, handleStart.y);
nvgLineTo(nvg, handleEnd.x, handleEnd.y);
nvgStrokeColor(nvg, nvgRGBA(255,0,0,255));
nvgStroke(nvg);
// Y Handle
ckm::scale(handleStart, handleDir[1], kCircleRadius);
ckm::add(handleStart, handleStart, activeEntityScreenPos);
ckm::scale(handleEnd, handleDir[1], kHandleLength);
ckm::add(handleEnd, handleEnd, activeEntityScreenPos);
nvgBeginPath(nvg);
nvgMoveTo(nvg, handleStart.x, handleStart.y);
nvgLineTo(nvg, handleEnd.x, handleEnd.y);
nvgStrokeColor(nvg, nvgRGBA(0,255,0,255));
nvgStroke(nvg);
// Z Handle
ckm::scale(handleStart, handleDir[2], kCircleRadius);
ckm::add(handleStart, handleStart, activeEntityScreenPos);
ckm::scale(handleEnd, handleDir[2], kHandleLength);
ckm::add(handleEnd, handleEnd, activeEntityScreenPos);
nvgBeginPath(nvg);
nvgMoveTo(nvg, handleStart.x, handleStart.y);
nvgLineTo(nvg, handleEnd.x, handleEnd.y);
nvgStrokeColor(nvg, nvgRGBA(0,0,255,255));
nvgStroke(nvg);
}
}
nvgRestore(nvg);
}
void EditorView::endFrameMainUI(UIStatus &status)
{
if (camera().mode() == gfx::Camera::Mode::kPerspective &&
status.cameraOption == UIStatus::kCamera_Orthogonal) {
camera().setMode(gfx::Camera::Mode::kOrthogonal);
}
else if (camera().mode() == gfx::Camera::Mode::kOrthogonal &&
status.cameraOption == UIStatus::kCamera_Perspective) {
camera().setMode(gfx::Camera::Mode::kPerspective);
}
if (status.cameraDirection != UIStatus::kCameraDirection_Current) {
const ove::SceneBody* body = scene().findBody(_activeEntity);
if (body) {
ckm::vector3 fwd;
ckm::vector3 up;
ckm::vector3 side;
float* mtx = camera().worldMtx.comp;
switch (status.cameraDirection) {
case UIStatus::kCameraDirection_XYZPos:
fwd.set(0,0,1);
up.set(0,1,0);
side.set(1,0,0);
break;
case UIStatus::kCameraDirection_XYZNeg:
fwd.set(0,0,-1);
up.set(0,1,0);
side.set(-1,0,0);
break;
case UIStatus::kCameraDirection_XZYPos:
fwd.set(0,1,0);
up.set(0,0,-1);
side.set(1,0,0);
break;
case UIStatus::kCameraDirection_XZYNeg:
fwd.set(0,-1,0);
up.set(0,0,1);
side.set(1,0,0);
break;
case UIStatus::kCameraDirection_YZXPos:
fwd.set(1,0,0);
up.set(0,1,0);
side.set(0,0,1);
break;
case UIStatus::kCameraDirection_YZXNeg:
fwd.set(-1,0,0);
up.set(0,1,0);
side.set(0,0,-1);
break;
default:
break;
}
const float kDist = 3.0f;
auto aabb = body->calcAABB();
ckm::vector3 bodyPos = aabb.center();
ckm::vector3 cameraPos;
ckm::scale(cameraPos, fwd, -kDist);
ckm::add(cameraPos, cameraPos, bodyPos);
memcpy(mtx, side.comp, sizeof(*mtx)*3);
memcpy(mtx+4, up.comp, sizeof(*mtx)*3);
memcpy(mtx+8, fwd.comp, sizeof(*mtx)*3);
memcpy(mtx+12, cameraPos.comp, sizeof(*mtx)*3);
}
status.cameraDirection = UIStatus::kCameraDirection_Current;
}
}
void EditorView::updateTransformUI
(
UITransformStatus& status
)
{
const ImVec2 kDesktopPad { 10, 10 };
const ImVec2 kBoxDims { 120, 180 };
ImVec2 anchor { 0,0 };
ImGui::SetNextWindowPos({ kDesktopPad.x+anchor.x, kDesktopPad.y+anchor.y },
ImGuiSetCond_FirstUseEver);
if (ImGui::Begin(status.mode == UITransformStatus::Mode::kTransform_Location ? "Translate" : "Rotate",
nullptr, kBoxDims, 0.3f,
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoSavedSettings)) {
ImGui::RadioButton("View", &status.option, UITransformStatus::kTransform_Free);
if (status.mode == UITransformStatus::Mode::kTransform_Location) {
ImGui::RadioButton("Snap", &status.option, UITransformStatus::kTransform_Snap);
}
ImGui::RadioButton("X", &status.option, UITransformStatus::kTransform_X);
ImGui::RadioButton("Y", &status.option, UITransformStatus::kTransform_Y);
ImGui::RadioButton("Z", &status.option, UITransformStatus::kTransform_Z);
}
ImGui::End();
auto& io = ImGui::GetIO();
if (io.KeyShift && status.mode == UITransformStatus::Mode::kTransform_Location) {
status.system = UITransformStatus::kSystem_Local;
}
else {
status.system = UITransformStatus::kSystem_Global;
}
// used for combining transform modes
if (ImGui::IsKeyPressed(SDLK_n)) {
if (status.mode == UITransformStatus::Mode::kTransform_Location) {
status.option = UITransformStatus::kTransform_Snap;
}
}
else if (ImGui::IsKeyPressed(SDLK_v)) {
status.option = UITransformStatus::kTransform_Free;
}
else if (ImGui::IsKeyPressed(SDLK_x)) {
status.option = UITransformStatus::kTransform_X;
}
else if (ImGui::IsKeyPressed(SDLK_y)) {
status.option = UITransformStatus::kTransform_Y;
}
else if (ImGui::IsKeyPressed(SDLK_z)) {
status.option = UITransformStatus::kTransform_Z;
}
}
void EditorView::handleTransformUI(UITransformStatus& status)
{
if (!_activeEntity)
return;
auto body = scene().findBody(_activeEntity, ove::SceneBody::kIsStaging);
if (!body)
return;
if (status.option == UITransformStatus::kTransform_Snap) {
auto& hitResult = sceneRayTestResult();
if (hitResult && hitResult.body->entity != _activeEntity) {
if (!hitResult.normal.fuzzyZero()) {
if (status.mode == UITransformStatus::Mode::kTransform_Location) {
body->setPosition(hitResult.position, hitResult.normal);
}
}
}
}
else {
const ImGuiIO& io = ImGui::GetIO();
// obtain separate position and basis elements used for manipulation
ckm::matrix4 bodyWorldMtx;
body->getTransformMatrix(bodyWorldMtx);
ckm::vector3 bodyWorldPos;
ckm::translateFromMatrix(bodyWorldPos, bodyWorldMtx);
ckm::matrix4 bodyViewMtx;
ckm::mul(bodyViewMtx, bodyWorldMtx, camera().viewMtx);
ckm::matrix4 viewToSpaceMtx;
ckm::matrix4 workingSpaceMtx;
ckm::matrix4 interMatrix; // scratch
switch (status.option) {
case UITransformStatus::kTransform_Free:
ckm::identityMatrix(viewToSpaceMtx);
ckm::mul(workingSpaceMtx, bodyWorldMtx, camera().viewMtx);
break;
case UITransformStatus::kTransform_X:
case UITransformStatus::kTransform_Y:
case UITransformStatus::kTransform_Z:
if (status.system == UITransformStatus::kSystem_Global) {
viewToSpaceMtx = camera().worldMtx;
workingSpaceMtx = bodyWorldMtx;
}
else if (status.system == UITransformStatus::kSystem_Local) {
ckm::inverse(interMatrix, bodyWorldMtx);
ckm::mul(viewToSpaceMtx, camera().worldMtx, interMatrix);
ckm::identityMatrix(workingSpaceMtx);
}
break;
default:
CK_ASSERT(false); // unhandled?
}
ckm::vector3 workingPos;
ckm::translateFromMatrix(workingPos, workingSpaceMtx);
workingSpaceMtx[12] = workingSpaceMtx[13] = workingSpaceMtx[14] = 0;
switch (status.mode) {
case UITransformStatus::Mode::kTransform_Location: {
ckm::vector3 mouseDelta = calcMouseDelta(viewToSpaceMtx,
bodyViewMtx[14],
io.DisplaySize.x*0.5f, io.DisplaySize.y*0.5f,
io.MouseDelta.x, io.MouseDelta.y);
if (status.option == UITransformStatus::kTransform_X) {
mouseDelta.y = mouseDelta.z = 0;
}
else if (status.option == UITransformStatus::kTransform_Y) {
mouseDelta.x = mouseDelta.z = 0;
}
else if (status.option == UITransformStatus::kTransform_Z) {
mouseDelta.x = mouseDelta.y = 0;
}
ckm::add(workingPos, workingPos, mouseDelta);
}
break;
case UITransformStatus::Mode::kTransform_Orientation: {
const ckm::vector3 spins[UITransformStatus::kTransform_Count] = {
{ 0, 0, 0 }, /* snap unused */
{ 0, 0, -1 }, /* free transform around view z axis */
{ 1, 0, 0 }, /* x transform */
{ 0, 1, 0 }, /* y transform */
{ 0, 0, 1 } /* z transform */
};
float yaw = 0.0f, pitch = 0.0f, roll = 0.0f;
float rotation = calcMouseRotation(status.lastMouseDir,
bodyViewMtx,
io.MousePos.x, io.MousePos.y);
if (status.option != UITransformStatus::kTransform_Free) {
// global transformations to spin axis
// roll based on view
auto& cameraViewMtx = camera().viewMtx;
ckm::vector3 viewRollAxis;
ckm::mul(viewRollAxis, spins[status.option], cameraViewMtx);
viewRollAxis[0] -= cameraViewMtx[12];
viewRollAxis[1] -= cameraViewMtx[13];
viewRollAxis[2] -= cameraViewMtx[14];
if (ckm::dot(viewRollAxis, { 0, 0, -1}) > 0) {
rotation = -rotation;
}
}
ckm::matrix4 rotMatrix;
if (status.option == UITransformStatus::kTransform_X) {
pitch = rotation;
}
else if (status.option == UITransformStatus::kTransform_Y) {
yaw = rotation;
}
else if (status.option == UITransformStatus::kTransform_Z) {
roll = rotation;
}
else if (status.option == UITransformStatus::kTransform_Free) {
roll = rotation;
}
ckm::eulerToMatrix(rotMatrix, pitch, yaw, roll);
if (status.option == UITransformStatus::kTransform_Free) {
// transformation occurs within view space
ckm::mul(interMatrix, bodyViewMtx, rotMatrix);
ckm::mul(rotMatrix, interMatrix, viewToSpaceMtx);
workingSpaceMtx = rotMatrix;
}
else {
// transformation occurs within world space
ckm::mul(interMatrix, bodyWorldMtx, rotMatrix);
workingSpaceMtx = interMatrix;
}
}
break;
}
workingSpaceMtx[12] = workingPos[0];
workingSpaceMtx[13] = workingPos[1];
workingSpaceMtx[14] = workingPos[2];
switch (status.option) {
case UITransformStatus::kTransform_Free:
ckm::mul(bodyWorldMtx, workingSpaceMtx, camera().worldMtx);
break;
case UITransformStatus::kTransform_X:
case UITransformStatus::kTransform_Y:
case UITransformStatus::kTransform_Z:
if (status.system == UITransformStatus::kSystem_Local) {
ckm::mul(interMatrix, workingSpaceMtx, bodyWorldMtx);
bodyWorldMtx = interMatrix;
}
else if (status.system == UITransformStatus::kSystem_Global) {
bodyWorldMtx = workingSpaceMtx;
}
break;
default:
CK_ASSERT(false); // unhandled?
}
// apply new transformation to body
body->setTransformMatrix(bodyWorldMtx);
}
}
ckm::vector3 EditorView::calcMouseDelta
(
const ckm::matrix4& transform,
float z,
float halfw, float halfh,
float dx, float dy
)
{
ckm::vector3 delta;
ckm::vector3 origin;
ckm::vector3 temp;
temp = camera().viewPositionFromScreenCoordinate(halfw, halfw, z);
ckm::mul(origin, temp, transform);
temp = camera().viewPositionFromScreenCoordinate(halfw+dx, halfw+dy, z);
ckm::mul(delta, temp, transform);
return ckm::sub(delta, delta, origin);
}
ckm::scalar EditorView::calcMouseRotation
(
ckm::vector3& direction,
const ckm::matrix4& viewMatrix,
float mx, float my
)
{
ckm::vector3 basisDir = direction;
ckm::vector3 viewOrigin;
ckm::translateFromMatrix(viewOrigin, viewMatrix);
ckm::vector3 viewPos = camera().viewPositionFromScreenCoordinate(mx, my, viewOrigin.z);
ckm::sub(direction, viewPos, viewOrigin);
if (direction.isZero())
return ckm::scalar(0);
ckm::normalize(direction, direction);
if (basisDir.isZero())
return ckm::scalar(0);
ckm::scalar delta = ckm::dot(direction, basisDir);
if (delta < ckm::scalar(-1))
delta = ckm::scalar(-1);
else if (delta > ckm::scalar(1))
delta = ckm::scalar(1);
ckm::scalar rotation = ckm::acos(delta);
CK_ASSERT(!std::isnan(rotation));
if (rotation < ckm::kPi - ckm::kEpsilon) {
ckm::vector3 spin;
ckm::cross(spin, basisDir, direction);
ckm::normalize(spin, spin);
if (ckm::dot(spin, { 0, 0, -1 }) < 0)
rotation = -rotation;
}
return rotation;
}
void EditorView::renderTransformUI(UITransformStatus& status)
{
const ove::SceneBody* body = scene().findBody(_activeEntity);
if (!body)
return;
if (status.option < UITransformStatus::kTransform_X ||
status.option > UITransformStatus::kTransform_Z) {
return;
}
// draw axis lines based on either the global world coordinate system or
// the entity's local coordinate system
//
ckm::vector3 bodyWorldPos = body->getPosition();
auto& decl = gfx::VertexTypes::declaration(gfx::VertexTypes::kVPositionColor);
if (!bgfx::checkAvailTransientVertexBuffer(32, decl))
return;
bgfx::TransientVertexBuffer linesTVB;
bgfx::allocTransientVertexBuffer(
&linesTVB,
32,
gfx::VertexTypes::declaration(gfx::VertexTypes::kVPositionColor));
uint32_t vertCnt = 0;
auto vert0 = reinterpret_cast<gfx::VertexTypes::PositionColor*>(linesTVB.data);
auto vert1 = reinterpret_cast<gfx::VertexTypes::PositionColor*>(linesTVB.data)+1;
ckm::matrix4 baseTransform = gfx::Matrix4::kIdentity;
ckm::vector3 bodyPos;
if (status.system == UITransformStatus::kSystem_Local) {
ckm::matrix4 localTransform;
body->getTransformMatrix(baseTransform);
ckm::inverse(localTransform, baseTransform);
ckm::mul(bodyPos, bodyWorldPos, localTransform);
}
else {
ckm::identityMatrix(baseTransform);
bodyPos = bodyWorldPos;
}
vert0->x = bodyPos.x;
vert0->y = bodyPos.y;
vert0->z = bodyPos.z;
vert1->x = vert0->x;
vert1->y = vert0->y;
vert1->z = vert0->z;
if (status.option == UITransformStatus::kTransform_X) {
vert0->x -= 1000.0f;
vert0->abgr = 0xff0000ff;
vert1->x += 1000.0f;
vert1->abgr = vert0->abgr;
}
else if (status.option == UITransformStatus::kTransform_Y) {
vert0->y -= 1000.0f;
vert0->abgr = 0xff00ff00;
vert1->y += 1000.0f;
vert1->abgr = vert0->abgr;
}
else if (status.option == UITransformStatus::kTransform_Z) {
vert0->z -= 1000.0f;
vert0->abgr = 0xffff0000;
vert1->z += 1000.0f;
vert1->abgr = vert0->abgr;
}
vertCnt += 2;
bgfx::setViewTransform(camera().viewIndex, camera().viewMtx, camera().projMtx);
bgfx::setTransform(baseTransform);
bgfx::setVertexBuffer(&linesTVB, 0, vertCnt);
bgfx::setState( 0
| BGFX_STATE_PT_LINES
| BGFX_STATE_POINT_SIZE(2)
| BGFX_STATE_RGB_WRITE
| BGFX_STATE_MSAA
| BGFX_STATE_CULL_CCW
);
auto& programs = *renderContext().programs;
bgfx::submit(camera().viewIndex, programs[gfx::kNodeProgramColor]);
}
void EditorView::setIdleState()
{
ove::ViewStateLogic state;
state.id = kStateId_Idle;
state.beginFn =
[this]() {
_uiStatus.displayMainUI = true;
_uiStatus.addEntityTemplate.reset();
rebuildSceneTree(*_sceneTree);
};
state.frameUpdateFn =
[this](CKTimeDelta dt) {
if (_uiStatus.addEntityTemplate) {
setAddEntityToSceneState();
}
};
state.endFn =
[this]() {
};
_vsm.setNextState(std::move(state));
}
void EditorView::setAddEntityToSceneState()
{
ove::ViewStateLogic state;
state.id = kStateId_AddEntityToScene;
state.beginFn =
[this]() {
_uiStatus.displayMainUI = false;
auto& ns = _entityNamespaces[_uiStatus.addEntityTemplate.nsIndex];
_stagedEntity = entityService().createEntity(kEntityStore_Staging, ns, _uiStatus.addEntityTemplate.name);
};
state.frameUpdateFn =
[this](CKTimeDelta dt) {
auto& hitResult = sceneRayTestResult();
if (hitResult) {
if (hitResult.body->entity != _stagedEntity) {
if (!hitResult.normal.fuzzyZero()) {
auto stagedBody = scene().findBody(_stagedEntity);
if (stagedBody) {
stagedBody->setPosition(hitResult.position, hitResult.normal);
}
}
}
}
if (ImGui::IsKeyPressed(SDLK_ESCAPE)) {
setIdleState();
}
else if (ImGui::IsKeyPressed(SDLK_RETURN) || ImGui::IsMouseClicked(0)) {
entityService().cloneEntity(kEntityStore_Default, _stagedEntity);
setIdleState();
}
};
state.endFn =
[this]() {
entityService().destroyEntity(_stagedEntity);
_uiStatus.displayMainUI = true;
};
_vsm.setNextState(std::move(state));
}
void EditorView::setTransformEntityState(UITransformStatus::Mode mode)
{
ove::ViewStateLogic state;
_uiTransformStatus.mode = mode;
state.id = kStateId_TransformEntity;
state.beginFn =
[this]() {
_uiStatus.displayMainUI = false;
_uiTransformStatus.option = UITransformStatus::kTransform_Free;
_uiTransformStatus.system = UITransformStatus::kSystem_Global;
_uiTransformStatus.lastMouseDir = ckm::vector3::kZero;
scene().addCategoryToBody(_activeEntity, ove::SceneBody::kStaging);
};
state.frameUpdateFn =
[this](CKTimeDelta dt) {
auto system = _uiTransformStatus.system;
updateTransformUI(_uiTransformStatus);
if (system != _uiTransformStatus.system) {
_uiTransformStatus.lastMouseDir = ckm::vector3::kZero;
}
handleTransformUI(_uiTransformStatus);
renderTransformUI(_uiTransformStatus);
if (ImGui::IsKeyPressed(SDLK_ESCAPE) || ImGui::IsMouseClicked(0)) {
setIdleState();
}
else if (ImGui::IsKeyPressed(SDLK_RETURN)) {
setIdleState();
}
};
state.endFn =
[this]() {
scene().removeCategoryFromBody(_activeEntity, ove::SceneBody::kStaging);
_uiStatus.displayMainUI = true;
};
_vsm.setNextState(std::move(state));
}
} /* namespace cinek */
| 32.87718 | 117 | 0.555978 | [
"geometry",
"render",
"transform"
] |
dfa121906ed829286bc06b941e745b8a1c2d3070 | 2,608 | cpp | C++ | SampleCode/Test.cpp | Team-Godel/Godel | 43bc2bb6ea28881a3db00dd69c1288cb04278d7d | [
"MIT"
] | null | null | null | SampleCode/Test.cpp | Team-Godel/Godel | 43bc2bb6ea28881a3db00dd69c1288cb04278d7d | [
"MIT"
] | null | null | null | SampleCode/Test.cpp | Team-Godel/Godel | 43bc2bb6ea28881a3db00dd69c1288cb04278d7d | [
"MIT"
] | null | null | null | #include <windows.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
LRESULT CALLBACK procedureFenetrePrincipale(HWND, UINT, WPARAM, LPARAM);
class Godel
{
public:
int constructor();
int destroyer();
int CreateWin(HINSTANCE cetteInstance, HINSTANCE precedenteInstance, LPSTR lignesDeCommande, int modeDAffichage);
public:
HINSTANCE instance;
HWND fenetrePrincipale; // The window
MSG message; // Events
WNDCLASS classeFenetre; // The class of the window
};
int Godel::constructor()
{
return 0;
}
int Godel::CreateWin(HINSTANCE cetteInstance, HINSTANCE precedenteInstance, LPSTR lignesDeCommande, int modeDAffichage)
{
instance = cetteInstance;
classeFenetre.style = 0;
classeFenetre.lpfnWndProc = procedureFenetrePrincipale;
classeFenetre.cbClsExtra = 0;
classeFenetre.cbWndExtra = 0;
classeFenetre.hInstance = NULL;
classeFenetre.hIcon = LoadIcon(NULL, IDI_APPLICATION);
classeFenetre.hCursor = LoadCursor(NULL, IDC_ARROW);
classeFenetre.hbrBackground = (HBRUSH)(1 + COLOR_BTNFACE);
classeFenetre.lpszMenuName = NULL;
classeFenetre.lpszClassName = "classeF";
if(!RegisterClass(&classeFenetre)) return FALSE;
fenetrePrincipale = CreateWindow("classeF", "Windows API Test", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, NULL, NULL, cetteInstance, NULL); // Create a window in 640 X 480
ShowWindow(fenetrePrincipale, modeDAffichage); // display the window
UpdateWindow(fenetrePrincipale); // update the state of the window
while (GetMessage(&message, NULL, 0, 0))
{
TranslateMessage(&message);
DispatchMessage(&message);
}
return 0;
}
int Godel::destroyer()
{
return 0;
}
int WinMain(HINSTANCE cetteInstance, HINSTANCE precedenteInstance, LPSTR lignesDeCommande, int modeDAffichage)
{
Godel GDL;
GDL.CreateWin(cetteInstance, precedenteInstance, lignesDeCommande, modeDAffichage);
return 0;
}
LRESULT CALLBACK procedureFenetrePrincipale(HWND fenetrePrincipale, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) // events
{
case WM_DESTROY: // Exit the program
{
PostQuitMessage(0);
break;
}
default:
{
return DefWindowProc(fenetrePrincipale, message, wParam, lParam);
break;
}
}
}
| 28.043011 | 201 | 0.649156 | [
"vector"
] |
dfa35ac454e548cf84d6636267394989d15cdbde | 614 | hpp | C++ | include/eve/constant/zero.hpp | orao/eve | a8bdc6a9cab06d905e8749354cde63776ab76846 | [
"MIT"
] | null | null | null | include/eve/constant/zero.hpp | orao/eve | a8bdc6a9cab06d905e8749354cde63776ab76846 | [
"MIT"
] | null | null | null | include/eve/constant/zero.hpp | orao/eve | a8bdc6a9cab06d905e8749354cde63776ab76846 | [
"MIT"
] | null | null | null | //==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#pragma once
#include <eve/detail/implementation.hpp>
#include <eve/as.hpp>
namespace eve
{
EVE_MAKE_CALLABLE(zero_, zero);
namespace detail
{
template<typename T>
EVE_FORCEINLINE auto zero_(EVE_SUPPORTS(cpu_), eve::as_<T> const &) noexcept
{
return T(0);
}
}
}
| 23.615385 | 100 | 0.456026 | [
"vector"
] |
dfa5f029db058fd56eacc3cc4684f5598212d6d6 | 1,075 | cc | C++ | lib/tests/pcp-test_test.cc | MikaelSmith/pcp-test | 7f830e0dc0d7128a5db3c660503f719cf80a5345 | [
"Apache-2.0"
] | null | null | null | lib/tests/pcp-test_test.cc | MikaelSmith/pcp-test | 7f830e0dc0d7128a5db3c660503f719cf80a5345 | [
"Apache-2.0"
] | 1 | 2016-09-09T10:56:21.000Z | 2016-09-09T13:43:24.000Z | lib/tests/pcp-test_test.cc | MikaelSmith/pcp-test | 7f830e0dc0d7128a5db3c660503f719cf80a5345 | [
"Apache-2.0"
] | 4 | 2016-08-25T10:18:46.000Z | 2021-03-26T11:47:21.000Z | #include <catch.hpp>
#include <pcp-test/pcp-test.hpp>
#include <pcp-test/client.hpp>
#include <pcp-test/client_configuration.hpp>
#include <pcp-test/root_path.h>
#include <pcp-test/version.h>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <utility>
#include <string>
#include <vector>
namespace fs = boost::filesystem;
SCENARIO("version() returns the version", "[configuration]")
{
REQUIRE(pcp_test::version() == PCP_TEST_VERSION_WITH_COMMIT);
}
SCENARIO("client ctor", "[configuration]")
{
auto certs_path =
(fs::path {PCP_TEST_ROOT_PATH} / "test-resources" / "ssl").string();
std::string client_type {"test_client"};
std::vector<std::string> uris {"wss://localhost:8142"};
pcp_test::client_configuration cc {std::string("0000agent"),
client_type,
uris,
certs_path,
1000, 12, 5, 5};
REQUIRE_NOTHROW(pcp_test::client {std::move(cc)});
}
| 28.289474 | 76 | 0.603721 | [
"vector"
] |
dfb99ca8fe8600a775535a5833b0096c68b3ae4e | 2,921 | cpp | C++ | GDP2019_20/ParticleEmitter.cpp | d01000100/gl_demo | 5c0894b1fabf5727836757e7d44528c8b513d2d5 | [
"MIT"
] | null | null | null | GDP2019_20/ParticleEmitter.cpp | d01000100/gl_demo | 5c0894b1fabf5727836757e7d44528c8b513d2d5 | [
"MIT"
] | null | null | null | GDP2019_20/ParticleEmitter.cpp | d01000100/gl_demo | 5c0894b1fabf5727836757e7d44528c8b513d2d5 | [
"MIT"
] | null | null | null | #include "ParticleEmitter.h"
const unsigned int ParticleEmitter::DEFAULT_NUM_PARTICLES = 1000;
Particle::Particle() {
position = glm::vec3(0.0f);
velocity = glm::vec3(0.0f);
lifetime = 0.0f;
color = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
}
void ParticleEmitter::Init(glm::vec3 min_vel,
glm::vec3 max_vel,
glm::vec3 min_delta_pos,
glm::vec3 max_delta_pos,
float min_life,
float max_life,
int min_particles_per_frame,
int max_particles_per_frame)
{
this->min_vel = min_vel;
this->max_vel = max_vel;
this->min_delta_pos = min_delta_pos;
this->max_delta_pos = max_delta_pos;
this->min_life = min_life;
this->max_life = max_life;
this->min_particles_per_frame = min_particles_per_frame;
this->max_particles_per_frame = max_particles_per_frame;
// Load the vector with the maximum number of particles
// makes the vector an initial size to avoid dynamic allocating
particles.reserve(ParticleEmitter::DEFAULT_NUM_PARTICLES);
for (int i = 0; i < ParticleEmitter::DEFAULT_NUM_PARTICLES; i++) {
Particle* part = new Particle();
part->lifetime = 0.0f;
particles.push_back(part);
}
return;
}
void ParticleEmitter::Step(float deltaTime) {
// Loop through the particles.
for (std::vector<Particle*>::iterator i = particles.begin();
i != particles.end(); i++) {
// if alive
if ((*i)->lifetime > 0) {
// Decrease the lifeTime by deltaTime
(*i)->lifetime -= deltaTime;
// Move the particle. Explicit Euler Integration (flex)
(*i)->velocity += acceleration * deltaTime;
(*i)->position += (*i)->velocity * deltaTime;
}
}
int new_particles_num = randInRange<int>(min_particles_per_frame, max_particles_per_frame);
for (int i = 0; i < new_particles_num; i++) {
createParticle();
}
}
void ParticleEmitter::getParticles(std::vector<Particle*>& out_particles) {
out_particles.clear();
out_particles.reserve(particles.size());
// Theres has to be enough space there
for (std::vector<Particle*>::iterator i = particles.begin();
i != particles.end(); i++) {
if ((*i)->lifetime > 0) {
out_particles.push_back(*i);
}
}
std::copy(particles.begin(), particles.end(), out_particles.begin());
}
void ParticleEmitter::createParticle() {
// find the first dead particle.
Particle* iPart;
for (std::vector<Particle*>::iterator i = particles.begin();
i != particles.end(); i++) {
if ((*i)->lifetime < 0.0f) {
(*i)->lifetime = randInRange<int>(min_life, max_life);
(*i)->velocity.x = randInRange<float>(min_vel.x, max_vel.x);
(*i)->velocity.y = randInRange<float>(min_vel.y, max_vel.y);
(*i)->velocity.z = randInRange<float>(min_vel.z, max_vel.z);
(*i)->velocity.x = location.x + randInRange<float>(min_delta_pos.x, max_delta_pos.x);
(*i)->velocity.y = location.y + randInRange<float>(min_delta_pos.y, max_delta_pos.y);
(*i)->velocity.z = location.z + randInRange<float>(min_delta_pos.z, max_delta_pos.z);
return;
}
}
return;
}
| 28.920792 | 92 | 0.693598 | [
"vector"
] |
dfbd6f017d34a4836425e40d1d55d246c8083878 | 17,495 | cpp | C++ | src/pathtracer/sdf.cpp | johannes-braun/myrt | bb7d96e9f5de264054f4a27de78722d0763c21a8 | [
"MIT"
] | 1 | 2020-12-05T18:00:23.000Z | 2020-12-05T18:00:23.000Z | src/pathtracer/sdf.cpp | johannes-braun/myrt | bb7d96e9f5de264054f4a27de78722d0763c21a8 | [
"MIT"
] | null | null | null | src/pathtracer/sdf.cpp | johannes-braun/myrt | bb7d96e9f5de264054f4a27de78722d0763c21a8 | [
"MIT"
] | null | null | null | #include "sdf.hpp"
namespace myrt
{
namespace detail {
std::optional<int> sdf_type::find_parameter_index_by_name(std::string const& name) const {
auto const it = std::find(begin(param_names), end(param_names), name);
if (it == param_names.end())
return std::nullopt;
return static_cast<int>(std::distance(begin(param_names), it));
}
sdf_instruction::sdf_instruction(std::shared_ptr<sdf_type> type)
: type(type) {
}
sdf_prim::sdf_prim(std::shared_ptr<sdf_type> type) : sdf_instruction(type) {}
void sdf_prim::set_parent(std::shared_ptr<sdf_instruction> p) {
child = p;
if (p != nullptr)
p->joint_element = shared_from_this();
}
sdf_op::sdf_op(std::shared_ptr<sdf_type> type) : sdf_instruction(type) {}
void sdf_op::set_lhs(std::shared_ptr<sdf_instruction> l) {
lhs = l;
if (l != nullptr)
l->joint_element = shared_from_this();
}
void sdf_op::set_rhs(std::shared_ptr<sdf_instruction> r) {
rhs = r;
if (r != nullptr)
r->joint_element = shared_from_this();
}
sdf_mod::sdf_mod(std::shared_ptr<sdf_type> type) : sdf_instruction(type) {}
void sdf_mod::set_parent(std::shared_ptr<sdf_instruction> p) {
child = p;
if (p != nullptr)
p->joint_element = shared_from_this();
}
std::shared_ptr<sdf_type> sdf_create_type(sdf_type::category type, std::string_view glsl, std::span<std::shared_ptr<parameter_type>const> params)
{
auto const mod = std::make_shared<sdf_type>();
mod->instruction_category = type;
mod->glsl_string = glsl;
mod->type_params.insert(mod->type_params.end(), std::begin(params), std::end(params));
return mod;
}
std::shared_ptr<sdf_type> sdf_create_type(sdf_type::category type, std::string_view glsl, std::initializer_list<std::shared_ptr<parameter_type>> params)
{
return sdf_create_type(type, std::move(glsl), std::span<std::shared_ptr<parameter_type> const>(params));
}
std::shared_ptr<sdf_type> sdf_create_type(sdf_type::category type, std::string_view glsl, std::shared_ptr<parameter_type> const& param)
{
return sdf_create_type(type, std::move(glsl), std::initializer_list<std::shared_ptr<parameter_type>>{ param });
}
std::string resolve_parameter(std::shared_ptr<parameter> param, std::stringstream& functions, std::stringstream& distance_function, std::unordered_map<size_t, int>& hash_reducers, int& hash_counter, std::unordered_set<size_t>& used_objects, std::unordered_set<parameter_type*>& used_param_types, std::unordered_map<size_t, int>& buffer_offsets, int& current_offset)
{
auto param_hash = hash_reduced(param, hash_reducers, hash_counter);
std::string param_name = "par" + to_hex_string(param_hash);
if (used_objects.emplace(param_hash).second) {
std::vector<std::string> block_names(param->type->buffer_blocks);
for (size_t i = 0; i < param->type->buffer_blocks; ++i)
{
parameter_link self{ param, i };
auto const& link = param->get_link(i);
size_t const own_hash = self.hash();
if (!link.is_linked())
{
// unlinked. use static block offset
buffer_offsets[own_hash] = current_offset;
block_names[i] = "_bk" + std::to_string(current_offset);
distance_function << "float _bk" << current_offset << "=_G(" << current_offset << ");";
current_offset++;
}
else
{
// resolve link.
auto const other_hash = link.hash();
if (auto const it = buffer_offsets.find(other_hash); it != buffer_offsets.end())
{
block_names[i] = "_bk" + std::to_string(it->second);
}
else
{
// link is not yet resolved.
auto const param_name = resolve_parameter(link.other,
functions, distance_function, hash_reducers, hash_counter, used_objects, used_param_types, buffer_offsets, current_offset);
auto const next_try = buffer_offsets.find(other_hash);
block_names[i] = "_bk" + std::to_string(next_try->second);
}
}
}
distance_function << param->type->type_name << " " << param_name << "=_r" << param->type->type_name << "(";
for (int i = 0; i < block_names.size(); ++i)
{
if (i != 0)
distance_function << ",";
distance_function << block_names[i];
}
distance_function << ");";
}
return param_name;
}
std::string generate_glsl_impl(std::shared_ptr<sdf_instruction> const& root, sdf_build_cache_t& cache)
{
const auto hash = hash_reduced(root->type, cache.hash_reducers, cache.hash_counter);
const auto fun_name = "_X" + to_hex_string(hash);
if (cache.used_functions.emplace(hash).second) {
for (auto const& par : root->type->type_params)
{
if (cache.used_param_types.emplace(par.get()).second)
cache.functions << par->function;
}
switch (root->type->instruction_category)
{
case sdf_type::category::prim:
cache.functions << "float " << fun_name << "(vec3 _L, inout _MT _mt";
break;
case sdf_type::category::op:
cache.functions << "float " << fun_name << "(float _D0, float _D1, _MT _mt0, _MT _mt1, inout _MT _mt";
break;
case sdf_type::category::mod:
cache.functions << "vec3 " << fun_name << "(vec3 _L, inout float _M";
break;
}
int i = 0;
for (auto const& par : root->type->type_params)
cache.functions << "," << par->type_name << " _P" << i++ << "";
cache.functions << "){" << root->type->glsl_string << "\n;}";
}
switch (root->type->instruction_category)
{
case sdf_type::category::prim:
{
auto h = hash_reduced(root, cache.hash_reducers, cache.hash_counter);
auto const dname = "p" + to_hex_string(h);
if (cache.used_objects.emplace(h).second) {
int off = cache.current_offset;
std::vector<std::string> param_names;
for (auto const& par : root->params)
{
auto param_name = resolve_parameter(par,
cache.functions,
cache.distance_function,
cache.hash_reducers,
cache.hash_counter,
cache.used_objects,
cache.used_param_types,
cache.buffer_offsets,
cache.current_offset);
param_names.push_back(std::move(param_name));
}
auto const p = std::static_pointer_cast<sdf_prim>(root);
std::string in_pos = "_L";
if (p->child)
{
in_pos = generate_glsl_impl(p->child, cache);
}
cache.distance_function << "_MT _mt" << dname << "=_mt;";
cache.distance_function << "float " << dname << "=" << fun_name << "(" << in_pos << ",_mt" << dname;
for (auto const& n : param_names)
cache.distance_function << "," << n;
cache.distance_function << ");";
}
return dname;
}
break;
case sdf_type::category::op:
{
auto h = hash_reduced(root, cache.hash_reducers, cache.hash_counter);
auto const dname = "o" + to_hex_string(h);
if (cache.used_objects.emplace(h).second) {
int off = cache.current_offset;
std::vector<std::string> param_names;
for (auto const& par : root->params)
{
auto param_name = resolve_parameter(par,
cache.functions,
cache.distance_function,
cache.hash_reducers,
cache.hash_counter,
cache.used_objects,
cache.used_param_types,
cache.buffer_offsets,
cache.current_offset);
param_names.push_back(std::move(param_name));
}
auto const p = std::static_pointer_cast<sdf_op>(root);
std::string in_pos1 = "_L";
std::string in_pos2 = "_L";
std::string in_mat1 = "_mt";
std::string in_mat2 = "_mt";
if (p->lhs)
{
in_pos1 = generate_glsl_impl(p->lhs, cache);
in_mat1 = "_mt" + in_pos1;
}
if (p->rhs)
{
in_pos2 = generate_glsl_impl(p->rhs, cache);
in_mat2 = "_mt" + in_pos2;
}
cache.distance_function << "_MT _mt" << dname << "=_mt;";
cache.distance_function << "float " << dname << "=" << fun_name << "(" << in_pos1 << "," << in_pos2 << ", " << in_mat1 << "," << in_mat2 << ",_mt" << dname;
for (auto const& n : param_names)
cache.distance_function << "," << n;
cache.distance_function << ");";
}
return dname;
}
break;
case sdf_type::category::mod:
{
auto h = hash_reduced(root, cache.hash_reducers, cache.hash_counter);
auto const dname = "m" + to_hex_string(h);
auto mul_name = "j" + dname;
cache.mul << "*" << mul_name;
if (cache.used_objects.emplace(h).second) {
cache.distance_function << "float " << mul_name << "=1.0;";
int off = cache.current_offset;
std::vector<std::string> param_names;
for (auto const& par : root->params)
{
auto param_name = resolve_parameter(par,
cache.functions,
cache.distance_function,
cache.hash_reducers,
cache.hash_counter,
cache.used_objects,
cache.used_param_types,
cache.buffer_offsets,
cache.current_offset);
param_names.push_back(std::move(param_name));
}
auto const p = std::static_pointer_cast<sdf_mod>(root);
std::string in_pos = "_L";
if (p->child)
{
in_pos = generate_glsl_impl(p->child, cache);
}
cache.distance_function << "vec3 " << dname << "=" << fun_name << "(" << in_pos << "," << mul_name;
for (auto const& n : param_names)
cache.distance_function << "," << n;
cache.distance_function << ");";
}
return dname;
}
break;
}
throw std::runtime_error("could not determinee instruction type.");
}
std::string minify_glsl(std::string const& original) {
std::string minified;
//preallocate a bit more than needed.
minified.reserve(original.size());
enum class state {
normal,
space,
preprocessor
} current_state = state::normal;
bool alphanumeric = false;
for (char c : original) {
switch (current_state) {
case state::space:
if (!is_space_or_newline(c) && !(c == '\n' || c == '\r'))
{
current_state = state::normal;
if (alphanumeric && !is_operator(c))
minified.push_back(' ');
}
case state::normal:
if (is_space_or_newline(c))
current_state = state::space;
else if (c == '#') {
if (!minified.empty() && !is_newline(minified.back()))
minified.push_back('\n');
current_state = state::preprocessor;
minified.push_back(c);
}
else {
alphanumeric = !is_operator(c);
minified.push_back(c);
}
break;
case state::preprocessor:
if (c == '\n' || c == '\r')
current_state = state::space;
minified.push_back(c);
break;
}
}
minified.shrink_to_fit();
return minified;
}
std::string generate_glsl(std::shared_ptr<sdf_instruction> const& root, sdf_build_cache_t& cache)
{
cache.mul << "1.0";
auto d = generate_glsl_impl(root, cache);
auto str = cache.functions.str() + "float _SDF(vec3 _L, inout _MT _mt) {" + cache.distance_function.str() + "_mt=_mt" + d + ";return " + cache.mul.str() + "*" + d + ";}";
str = replace(str, "in_param", "_P");
str = replace(str, "in_position", "_L");
str = replace(str, "in_distance", "_D");
str = replace(str, "out_multiplier", "_M");
str = replace(str, "in_block", "_B");
str = replace(str, "in_material", "_mt");
str = replace(str, "inout_material", "_mt");
str = replace(str, "mix_material", "_mxm");
str = replace(str, "load_material", "_ldm");
return minify_glsl(str);
}
void sdf_glsl_assembly::initialize_from_default(float* buf, std::shared_ptr<sdf_instruction> const& root) {
for (size_t i = 0; i < root->params.size(); ++i)
buffer_description.set_value(buf, root->params[i], root->params[i]->get_default_value().data());
switch (root->type->instruction_category)
{
case sdf_type::category::prim:
{
auto const p = std::static_pointer_cast<sdf_prim>(root);
if (p->child)
initialize_from_default(buf, p->child);
break;
}
case sdf_type::category::mod:
{
auto const p = std::static_pointer_cast<sdf_mod>(root);
if (p->child)
initialize_from_default(buf, p->child);
break;
}
case sdf_type::category::op:
{
auto const p = std::static_pointer_cast<sdf_op>(root);
if (p->lhs)
initialize_from_default(buf, p->lhs);
if (p->rhs)
initialize_from_default(buf, p->rhs);
break;
}
}
}
sdf_glsl_assembly sdf_glsl_assembler::append(std::shared_ptr<sdf_instruction> const& root)
{
sdf_glsl_assembly new_assembly;
size_t const offset_before = m_build_cache.current_offset;
prepare_build_cache();
const auto glsl_string = generate_glsl(root, m_build_cache);
new_assembly.buffer_description.buffer_offsets = std::move(m_build_cache.buffer_offsets);
new_assembly.buffer_description.id = m_current_id++;
new_assembly.buffer_description.blocks_required = m_build_cache.current_offset - offset_before;
std::stringstream stream;
stream << "#define _SDF _SDF" << new_assembly.buffer_description.id << '\n';
stream << glsl_string << "\n#undef _SDF\n";
m_full_glsl += stream.str();
append_map_case(new_assembly.buffer_description.id);
return new_assembly;
}
std::string sdf_glsl_assembler::get_assembled_glsl() const {
return "#line 0 \"myrt_gen_sdf\"\n" + m_full_glsl + m_map_function;
}
void sdf_glsl_assembler::append_map_case(int id) {
m_map_function.pop_back(); //}
m_map_function.pop_back(); //}
auto const id_str = std::to_string(id);
m_map_function += "case " + id_str + ": return _SDF" + id_str + "(p, _mt);}}";
}
void sdf_glsl_assembler::prepare_build_cache() {
m_build_cache.buffer_offsets.clear();
m_build_cache.used_objects.clear();
m_build_cache.functions.str("");
m_build_cache.mul.str("");
m_build_cache.distance_function.str("");
}
}
namespace sdf
{
basic_type::basic_type(category::category t, std::string_view glsl, std::span<std::shared_ptr<parameter_type> const> params, std::span<std::string const> param_names)
{
_type = std::make_shared<instruction_type>();
_type->instruction_category = t;
_type->glsl_string = glsl;
_type->type_params.insert(_type->type_params.end(), std::begin(params), std::end(params));
_type->param_names.resize(params.size());
if (param_names.size() == params.size())
_type->param_names.assign(std::begin(param_names), std::end(param_names));
}
basic_type::basic_type(instruction_type::category type, std::string_view glsl, std::initializer_list<std::shared_ptr<parameter_type>> params, std::initializer_list<std::string> param_names)
:basic_type(type, std::move(glsl), std::span<std::shared_ptr<parameter_type> const>(params)) {
}
basic_type::basic_type(instruction_type::category type, std::string_view glsl, std::shared_ptr<parameter_type> param, std::string param_name)
:basic_type(type, std::move(glsl), std::initializer_list<std::shared_ptr<parameter_type>>{ std::move(param) }, std::initializer_list<std::string const>{std::move(param_name)}) {
}
basic_type::operator std::shared_ptr<instruction_type> const& () const {
return _type;
}
prim::prim(basic_type type)
: sdf(type)
{
}
prim& prim::transform(sdf<basic_modifier> m) {
_ptr->set_parent(m.get_pointer());
return *this;
}
op::op(basic_type type)
: sdf(type)
{
}
op& op::set_left(sdf<basic_primitive> lhs) {
_ptr->set_lhs(lhs.get_pointer());
return *this;
}
op& op::set_right(sdf<basic_primitive> rhs) {
_ptr->set_rhs(rhs.get_pointer());
return *this;
}
op& op::set_right(sdf<basic_operator> rhs) {
_ptr->set_rhs(rhs.get_pointer());
return *this;
}
op& op::set_left(sdf<basic_operator> lhs) {
_ptr->set_lhs(lhs.get_pointer());
return *this;
}
mod::mod(basic_type type)
: sdf(type)
{
}
mod& mod::transform(sdf<basic_modifier> m) {
_ptr->set_parent(m.get_pointer());
return *this;
}
}
} | 36.524008 | 369 | 0.586911 | [
"vector",
"transform"
] |
254a30f85d168e7491cb9d50db243ecda1e3067d | 9,333 | cpp | C++ | gsplines_ros/src/gsplines_ros.cpp | rafaelrojasmiliani/gsplines_cpp_ros | aca23484a8ec4d18c309115f04a1dbe58091f022 | [
"MIT"
] | 3 | 2021-08-28T01:42:10.000Z | 2021-09-24T16:16:12.000Z | gsplines_ros/src/gsplines_ros.cpp | rafaelrojasmiliani/gsplines_cpp_ros | aca23484a8ec4d18c309115f04a1dbe58091f022 | [
"MIT"
] | 5 | 2021-08-17T15:05:24.000Z | 2022-03-27T16:09:38.000Z | gsplines_ros/src/gsplines_ros.cpp | rafaelrojasmiliani/gsplines_cpp_ros | aca23484a8ec4d18c309115f04a1dbe58091f022 | [
"MIT"
] | null | null | null | #include <gsplines_ros/gsplines_ros.hpp>
#define EIGEN_TO_STD_VECTOR(_eigen_vector) \
(std::vector<double>(_eigen_vector.data(), \
_eigen_vector.data() + _eigen_vector.size()))
namespace gsplines_ros {
gsplines::GSpline gspline_msg_to_gspline(const gsplines_msgs::GSpline &_msg) {
std::unique_ptr<gsplines::basis::Basis> basis =
gsplines::basis::string_to_basis(_msg.basis);
std::pair<double, double> domain{_msg.domain_left_boundary,
_msg.domain_right_boundary};
std::size_t codom_dim = _msg.codom_dim;
std::size_t number_of_intervals = _msg.number_of_intervals;
Eigen::VectorXd coefficients = Eigen::Map<const Eigen::VectorXd>(
_msg.coefficients.data(), _msg.coefficients.size());
Eigen::VectorXd interval_lengths = Eigen::Map<const Eigen::VectorXd>(
_msg.interval_lengths.data(), _msg.interval_lengths.size());
return gsplines::GSpline(domain, codom_dim, number_of_intervals, *basis,
coefficients, interval_lengths);
}
gsplines_msgs::GSpline gspline_to_msg(const gsplines::GSpline &_gspline) {
gsplines_msgs::GSpline result;
result.basis = _gspline.get_basis_name();
result.domain_left_boundary = _gspline.get_domain().first;
result.domain_right_boundary = _gspline.get_domain().second;
result.codom_dim = _gspline.get_codom_dim();
result.number_of_intervals = _gspline.get_number_of_intervals();
result.coefficients = EIGEN_TO_STD_VECTOR(_gspline.get_coefficients());
result.interval_lengths =
EIGEN_TO_STD_VECTOR(_gspline.get_interval_lengths());
return std::move(result);
}
gsplines_msgs::JointGSpline
gspline_to_joint_gspline_msg(const gsplines::GSpline &_gspline,
const std::vector<std::string> &_joint_names) {
gsplines_msgs::JointGSpline result;
result.gspline = gspline_to_msg(_gspline);
result.name = _joint_names;
return result;
}
trajectory_msgs::JointTrajectory
gspline_to_joint_trajectory_msg(const gsplines::GSpline &_gspline,
const std::vector<std::string> &_joint_names,
const ros::Duration &_step,
std_msgs::Header _header) {
trajectory_msgs::JointTrajectory result;
double t0 = _gspline.get_domain().first;
double t1 = _gspline.get_domain().second;
std::size_t number_of_segments = _gspline.get_domain_length() / _step.toSec();
Eigen::VectorXd time_spam =
Eigen::VectorXd::LinSpaced(number_of_segments + 1, t0, t1);
gsplines::functions::FunctionExpression gspline_diff_1 = _gspline.derivate();
gsplines::functions::FunctionExpression gspline_diff_2 = _gspline.derivate(2);
Eigen::MatrixXd gspline_evaluated = _gspline(time_spam);
Eigen::MatrixXd gspline_diff_1_evaluated = gspline_diff_1(time_spam);
Eigen::MatrixXd gspline_diff_2_evaluated = gspline_diff_2(time_spam);
for (std::size_t uici = 0; uici < gspline_evaluated.rows(); uici++) {
trajectory_msgs::JointTrajectoryPoint trj_point;
for (std::size_t uicj = 0; uicj < _gspline.get_codom_dim(); uicj++) {
trj_point.positions.push_back(gspline_evaluated(uici, uicj));
trj_point.velocities.push_back(gspline_diff_1_evaluated(uici, uicj));
trj_point.accelerations.push_back(gspline_diff_2_evaluated(uici, uicj));
}
trj_point.time_from_start = ros::Duration(std::fabs(time_spam(uici) - t0));
result.points.push_back(std::move(trj_point));
}
result.joint_names = _joint_names;
result.header = _header;
return result;
}
trajectory_msgs::JointTrajectory function_expression_to_joint_trajectory_msg(
const gsplines::functions::FunctionExpression &_trj,
const std::vector<std::string> &_joint_names, const ros::Duration &_step,
std_msgs::Header _header) {
trajectory_msgs::JointTrajectory result;
double t0 = _trj.get_domain().first;
double t1 = _trj.get_domain().second;
std::size_t number_of_segments = _trj.get_domain_length() / _step.toSec();
Eigen::VectorXd time_spam =
Eigen::VectorXd::LinSpaced(number_of_segments + 1, t0, t1);
gsplines::functions::FunctionExpression gspline_diff_1 = _trj.derivate();
gsplines::functions::FunctionExpression gspline_diff_2 = _trj.derivate(2);
Eigen::MatrixXd gspline_evaluated = _trj(time_spam);
Eigen::MatrixXd gspline_diff_1_evaluated = gspline_diff_1(time_spam);
Eigen::MatrixXd gspline_diff_2_evaluated = gspline_diff_2(time_spam);
for (std::size_t uici = 0; uici < gspline_evaluated.rows(); uici++) {
trajectory_msgs::JointTrajectoryPoint trj_point;
for (std::size_t uicj = 0; uicj < _trj.get_codom_dim(); uicj++) {
trj_point.positions.push_back(gspline_evaluated(uici, uicj));
trj_point.velocities.push_back(gspline_diff_1_evaluated(uici, uicj));
trj_point.accelerations.push_back(gspline_diff_2_evaluated(uici, uicj));
}
trj_point.time_from_start = ros::Duration(std::fabs(time_spam(uici) - t0));
result.points.push_back(std::move(trj_point));
}
result.joint_names = _joint_names;
result.header = _header;
return result;
}
trajectory_msgs::JointTrajectory
gspline_msg_to_joint_trajectory_msg(const gsplines_msgs::GSpline _trj,
const std::vector<std::string> _joint_names,
const ros::Duration &_step,
std_msgs::Header _header) {
gsplines::GSpline trj = gspline_msg_to_gspline(_trj);
return gspline_to_joint_trajectory_msg(trj, _joint_names, _step, _header);
}
trajectory_msgs::JointTrajectory joint_gspline_msg_to_joint_trajectory_msg(
const gsplines_msgs::JointGSpline &_trj, const ros::Duration &_step) {
gsplines::GSpline trj = gspline_msg_to_gspline(_trj.gspline);
return gspline_to_joint_trajectory_msg(trj, _trj.name, _step, _trj.header);
}
control_msgs::FollowJointTrajectoryGoal gspline_to_follow_joint_trajectory_goal(
const gsplines::GSpline &_gspline,
const std::vector<std::string> &_joint_names, const ros::Duration &_step,
std_msgs::Header _header) {
control_msgs::FollowJointTrajectoryGoal result;
result.trajectory =
gspline_to_joint_trajectory_msg(_gspline, _joint_names, _step, _header);
return result;
}
control_msgs::FollowJointTrajectoryGoal
function_expression_to_follow_joint_trajectory_goal(
const gsplines::functions::FunctionExpression &_trj,
const std::vector<std::string> &_joint_names, const ros::Duration &_step,
std_msgs::Header _header) {
control_msgs::FollowJointTrajectoryGoal result;
result.trajectory = function_expression_to_joint_trajectory_msg(
_trj, _joint_names, _step, _header);
return result;
}
control_msgs::FollowJointTrajectoryGoal
gspline_msg_to_follow_joint_trajectory_goal(
const gsplines_msgs::JointGSpline &_trj,
const std::vector<std::string> &_joint_names, const ros::Duration &_step,
std_msgs::Header _header) {
gsplines::GSpline trj = gspline_msg_to_gspline(_trj.gspline);
return gspline_to_follow_joint_trajectory_goal(trj, _joint_names, _step,
_header);
}
control_msgs::FollowJointTrajectoryGoal
joint_gspline_msg_to_follow_joint_trajectory_goal(
const gsplines_msgs::JointGSpline _trj, const ros::Duration &_step) {
gsplines::GSpline trj = gspline_msg_to_gspline(_trj.gspline);
return gspline_to_follow_joint_trajectory_goal(trj, _trj.name, _step,
_trj.header);
}
gsplines_msgs::FollowJointGSplineFeedback
follow_joint_trajectory_feedback_to_follow_joint_gspline_feedback(
const control_msgs::FollowJointTrajectoryFeedback &_msg) {
gsplines_msgs::FollowJointGSplineFeedback result;
result.joint_names = _msg.joint_names;
result.actual = _msg.actual;
result.desired = _msg.desired;
result.error = _msg.error;
result.header = std_msgs::Header();
result.header.stamp = ros::Time::now();
return std::move(result);
}
control_msgs::FollowJointTrajectoryGoal
follow_joint_gspline_goal_to_follow_joint_trajectory_goal(
const gsplines_msgs::FollowJointGSplineGoal &_msg,
const ros::Duration &_control_step) {
control_msgs::FollowJointTrajectoryGoal result;
result.goal_time_tolerance = _msg.goal_time_tolerance;
result.goal_tolerance = _msg.goal_tolerance;
result.path_tolerance = _msg.path_tolerance;
result.trajectory =
joint_gspline_msg_to_joint_trajectory_msg(_msg.gspline, _control_step);
return std::move(result);
}
control_msgs::FollowJointTrajectoryResult
follow_joint_gspline_result_to_follow_joint_trajectory_result(
const gsplines_msgs::FollowJointGSplineResult &_msg,
const ros::Duration &_control_step) {
control_msgs::FollowJointTrajectoryResult result;
result.error_code = _msg.error_code;
result.error_string = _msg.error_string;
return std::move(result);
}
gsplines_msgs::FollowJointGSplineResult
follow_joint_trajectory_result_to_follow_joint_gspline_result(
const control_msgs::FollowJointTrajectoryResult &_msg) {
gsplines_msgs::FollowJointGSplineResult result;
result.error_code = _msg.error_code;
result.error_string = _msg.error_string;
return std::move(result);
}
} // namespace gsplines_ros
| 34.062044 | 80 | 0.738134 | [
"vector"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.